Repository navigation
docs(adr): VotingEscrow interface block in ADR 026 §4 (#450 §A.1) - #456
Merged
Merged
Conversation
Adds a formal `interface IVotingEscrow { ... }` block to ADR 026 §4
"Voting escrow (VotingEscrow)" as a new "#### Contract: VotingEscrow"
subsection. Closes the §A.1 acceptance bullet in #450.
Surface (per planning conversation):
- Lock lifecycle: createLock(amount, unlockTime), increaseAmount(amount),
increaseUnlockTime(unlockTime) — absolute-timestamp pattern matching
veCRV; createLock returns void (one-lock-per-address). withdraw() is
lump-sum after expiry, no early-exit.
- Lock view: locked(account) returns (uint256 amount, uint256 end) —
bundled tuple, single read for the common query.
- ve-balance: balanceOf, balanceOfAt(account, timestamp), totalSupply,
totalSupplyAt(timestamp) — historical reads keyed by unix timestamp
(not block number) since ve-weight decays linearly in time.
- Delegation: OZ Governor Bravo pattern — delegate(address),
delegateBySig(...), delegates(account) returns (address). Reassigns
voting weight only; ve-position remains non-transferable.
- Events: LockCreated, LockIncreased, LockExtended, Withdrawn,
DelegateChanged, DelegateVotesChanged.
- Notes: getVotes / getPastVotes deliberately omitted because Governor
reads through balanceOfAt(timestamp), not getPastVotes(blockNumber).
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request introduces the IVotingEscrow interface to the gauge boost tokenomics ADR, defining the lifecycle and delegation logic for ve-locked tokens. Feedback suggests correcting the documentation for the locked function to clarify it accepts an account parameter and streamlining the design notes by removing historical narratives and external protocol comparisons to align with documentation standards.
This was referenced May 7, 2026
- Fix locked() comment: "caller's" → "specified account's" (function takes an `account` parameter; not necessarily msg.sender). - Trim Notes subsection: drop historical-narrative framing (NFT-per-lock out-of-scope mention, Curve veCRV literature comparison, Bravo-tooling marketing) per the read-as-canon rule. Keep the three load-bearing facts: one-lock-per-address, getVotes/getPastVotes omitted with the timestamp-vs-block-number rationale, and the delegation/non-transfer invariant. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second slice of #450. Closes §A.1 — the formal
interface IVotingEscrow { ... }block in ADR 026 §4.Adds a new "#### Contract: VotingEscrow" subsection between "#### Lock ownership" and "### 5. Safety and insurance reserve". The interface signatures were previously scattered across §4 prose and the ADR 016 §1
classDiagram; this consolidates them in one canonical place.Decisions baked in (per planning conversation)
increaseUnlockTime(uint256 unlockTime)(absolute)locked(address) returns (uint256 amount, uint256 end)lockedmapping; one RPC for the common querydelegate+delegateBySig+delegates+DelegateChanged+DelegateVotesChangedcreateLockreturnbalanceOfAtargumentuint256 timestampwithdraw()lump-sum after expirySupplyevent nice-to-have buttotalSupplyAtprovides the same data on demandNotes added to the spec
getVotes/getPastVotesdeliberately omitted — Governor (per §9) reads throughbalanceOfAt(user, ts)since ve-weight is timestamp-based, not block-number-based.Out of scope
commitEpochReceiptRoot), §B.6 (SafetyReserve redirect), §C.1–§C.3. These land in four follow-up PRs.Test plan
pre-commit run --files adr/026-gauge-boost-tokenomics.mdcleanRelated
IStakingRegistrysurface)🤖 Generated with Claude Code