Repository navigation
Description
Summary
The capacity-bond curve bond_required(Mbps) = k × Mbps^α is documented as a governable economic mechanism, but the shipped CapacityBond neither stores its parameters, enforces the coupling, nor exposes setters for it. This is a design-vs-implementation gap surfaced while sweeping accessor names for #765 (PR #769); it was deliberately left out of that documentation-only PR.
Evidence (shipped contract is the source of truth)
contracts/src/CapacityBond.sol:50— comment: the bond-curve couplingbond = k × Mbps^αis "a future enforcement PR."contracts/src/CapacityBond.sol:239— comment: the couplingactiveBond ≥ k × Mbps^αis not enforced at the contract layer in this revision.bond(uint256 amount)accepts any amount (amount > 0); the only capacity-related on-chain checks areactiveBond ≥ minBond(atregisterNode) and the[minCapacityMbps, maxCapacityMbps]band (atdeclareMbps).- No
k/αstorage, nosetAlpha/setK, and no on-chainbondRequired(mbps)view exist anywhere incontracts/src/.bond_required(...)is purely an off-chain/conceptual computation.
Why this matters (the contradiction)
- ADR 026 § Capacity-bond curve specifies the curve and treats both coefficients as governable:
bond_required(Mbps) = k × Mbps^α(026:127)- α (exponent): default 1.2, governable range [1.0, 1.8] (026:132)
- k (bond constant): default 12.6, bounded (026:133)
- "α-tuning is the lever" for the supply-lockup design tension (026:168)
- CLAUDE.md (repo root): "the on-chain surface ships at full production shape with governance-tunable economics from day one" → [ADR 016 § Tunable Economics].
So the canonical tokenomics ADR and the project's stated production-shape guarantee both assume α/k are on-chain, enforced, and governance-tunable. The shipped contract makes them off-chain advisory and immutable. An operator can bond far less than bond_required(declaredMbps) for a high tier, and governance has no lever to retune the curve.
Decision needed (pick one; either resolves the contradiction)
A. Implement + make governable on-chain. Add fixed-point k/α storage, a bondRequired(mbps) view (likely in BondMath to limit CapacityBond bytecode), enforce activeBond ≥ bondRequired(declaredMbps) at registerNode / declareMbps, and add setAlpha/setK (GOVERNANCE_ROLE) with the ADR-026 bounds. Restores "governance-tunable from day one."
⚠️ EIP-170 constraint:CapacityBond.solis already near the 24,576-byte limit (see project memory /--sizesCI gate). Pow/exp math + storage + setters add bytecode — favor aBondMathlibrary and/or trimming elsewhere.
B. Formally scope it as off-chain/advisory for this revision. Amend ADR 026 § Capacity-bond curve and the CLAUDE.md "governance-tunable from day one" claim to state that, in the shipped revision, the curve is an off-chain advisory for operator bond-sizing; on-chain enforcement is limited to minBond + the capacity band, with curve enforcement + α/k governance deferred to a named future ADR/PR.
Adjacent doc cleanup (small, discovered in #769)
DecdnGovernor does ship governable setVoteCapBps (DecdnGovernor.sol:243) and setAgeRampMonths (:253) — checkpointed, with AgeRampMonthsUpdated events. (PR #769 corrected ADR 016, which had wrongly attributed setAgeRampMonths to CapacityBond.) These Governor self-governance setters are not documented in ADR 016's Cross-Contract Call Graph / GOVERNANCE_ROLE tables. Whichever option above is chosen, add a Governor self-setter row to ADR 016 so the vote-weight tunables (voteCapBps, ageRampMonths, windowEpochs) are surfaced.
Note:
age_rampitself is not part of the gap — it is fully implemented and governable onDecdnGovernor. Only the capacity-bond curve (k, α) is unenforced/ungovernable.
References
- docs(adr): align CapacityBond accessor names with shipped ABI (#765) #769 — accessor-name sweep (documentation-only; deliberately left this gap unaddressed)
- Sweep ADR contract-accessor names against shipped CapacityBond ABI #765 — the originating accessor-drift issue
contracts/src/CapacityBond.sol,contracts/src/BondMath.sol,contracts/src/DecdnGovernor.sol- ADR 026 § Capacity-bond curve; ADR 016 § Tunable Economics
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
github-actions commentedon Jun 1, 2026
🎯 Triage report
This issue documents a concrete design-vs-implementation gap: ADR 026 and
CLAUDE.mdboth promise governance-tunable capacity-bond curve parameters (k,α) from day one, but the shippedCapacityBondcontract accepts anyamount > 0— there is no on-chainbondRequired(mbps)view, no storage fork/α, and no governance setters. The issue is well-evidenced with contract line references and a binary decision framing (implement on-chain vs. formally defer). The adjacent ADR 016 doc gap (Governor self-setter rows forvoteCapBps/ageRampMonths/windowEpochs) is a small, separable cleanup.📊 Assessment
economics,consistency,missing-decision,high(added)CapacityBond, fixed-point pow/exp inBondMath, governance plumbing — and should be reviewed by a human before delegation.🔗 Similar issues
CapacityBond.register#681 (related) — minimum declared capacity floor forCapacityBond.register; adjacent bond-sizing enforcement scope💡 Notes and suggestions
Decision gate first. This issue cannot be started until a maintainer chooses Option A or B. A comment or label (e.g.
decision: option-a) on this issue would unblock any coding agent assignment.If Option A (on-chain enforcement):
FOUNDRY_PROFILE=ci forge build --sizesbefore and after to track bytecode delta onCapacityBond. The CI--deny warningsgate will fail if the contract crosses 24,576 bytes.Mbps^αwith α ∈ [1.0, 1.8]) in Solidity requires care — consider a lookup table or integer approximation inBondMathrather than a fullexp/logimplementation, to minimize bytecode and gas.setAlpha/setKsetters must validate inputs against the ADR 026 bounds (α ∈ [1.0, 1.8], k bounded) before storing; emit events for off-chain indexers.bondRequired(mbps)as apure/viewonBondMathkeepsCapacityBondlean and is already the pattern the issue author recommends.registerNode(initial) anddeclareMbps(on capacity change); consider whether a grace period is needed for existing operators on the upgrade path.If Option B (document as off-chain advisory):
k/αare off-chain advisory for operator bond-sizing, on-chain enforcement limited tominBond+ capacity band, curve enforcement deferred to a named future ADR.CLAUDE.md's "governance-tunable from day one" language (or add a footnote) so the claim is accurate for the shipped surface.voteCapBps,ageRampMonths,windowEpochs) to ADR 016 Cross-Contract Call Graph as a small adjacent cleanup (could be a single PR with the ADR 026 amendment).Sub-tasks checklist (applies to either option):
voteCapBps,ageRampMonths,windowEpochs)BondMathgainsbondRequired(uint256 mbps)view with fixed-pointk/αCapacityBondgainsk/αstorage +setAlpha/setK(GOVERNANCE_ROLE)registerNode/declareMbpsenforceactiveBond ≥ bondRequired(declaredMbps)forge build --sizespasses underFOUNDRY_PROFILE=ciAdd this agentic workflows to your repo
To install this agentic workflow, run
docs(adr): fix age_ramp tunability claim + residual register/refund d…
docs(adr): align CapacityBond accessor names with shipped ABI (#765) (#…
feat(contracts): enforce + govern the capacity-bond curve on-chain (#770