Skip to main content

CovenantNotes

CovenantNotes​

Every position is an ERC-721 token, so the storage is keyed by token id rather than by address. That is what lets one wallet hold several distinct positions, each with its own principal, rate and bonus clock.

FieldMeaning
principalThe basis rewards are computed on. Not a withdrawable balance.
pendingAccrued and not yet claimed
rateBpsStored daily rate — base plus compound steps, 1000 (10%) to 2000 (20%). The commit boost is not stored here; it is applied live.
origin0 = Sell, 1 = Commit. Permanent — it survives everything.
ownedSinceWhen the position last changed hands
boostDeadSticky: once the boost is forfeited it never returns for that bond

Entrypoints​

  • openBond(amount) — voluntary, 20%..100% of the caller's balance, 15%/day effective at birth (the 10% base plus the +5 boost). Mints a new position.
  • openBondFrom(owner, amount) — the sell-side retention, entry rate 10%/day, callable only by the wired retention source
  • compound(tokenId) — rolls pending into principal; adds +0.25 point at most once per 6h. What a bond earns never exceeds 20%/day; a rate grant and a rate floor are both applied on top of that.
  • claim(tokenId) — pays out to the owner; the rate is untouched
  • merge(tokenIds) — consolidates your positions into the first one; every bond merged must share the same origin and the same boost state. Present on the contract and callable directly, but the app does not offer it
  • tokensOf(address) — lists a holder's positions, so the app needs no indexer

Views worth knowing​

  • rateOf(tokenId) — the stored rate: base plus compound steps
  • effectiveRateOf(tokenId) — the stored rate, plus the live boost, plus any rate grant, then lifted to the rate floor if one is set. The first two are capped at 20%/day; the grant and the floor both sit on top of that cap, so this can exceed it. The number a holder actually earns
  • globalBoostBps() — the rate grant currently in force, in basis points per day. Zero means the plain schedule; it is set by the deploying key and can change
  • rateFloorBps() — the floor under every bond's daily rate. Zero means no floor
  • exemptAllowanceOf(address) — retention-free selling volume left: exemptGrantedOf minus exemptUsedOf, floored at zero. The figure that prices a sale: the hook waives the retention only while it covers the whole amount
  • exemptGrantedOf(address) — the total ever granted: 5x the opening principal of every bond this wallet was the first to hold, sell-side and commit alike. Written once per bond, at its opening, and never again. Compounding does not grow it, and a position that reaches a wallet by any other means grants that wallet nothing, because the grant was struck for whoever first held it
  • commitPrincipalOf(address) — sum of the wallet's commit-origin principals. Display only since the grant-at-opening rule; it no longer prices anything
  • exemptUsedOf(address) — exempt volume consumed, lifetime. The hook adds to it through consumeExemption(seller, amount), which only the wired retention source may call
  • debitedThisTx(address) — how much C4 the wallet has sent out so far in the current transaction. Zero at the start of every transaction, and spent by consumeExemption, so it proves a seller is really selling on a route the hook cannot otherwise vouch for
  • hasCommitBond(address) — true while the wallet owns at least one commit-origin bond (display-level; the allowance is what decides)
  • commitBondCountOf(address) — how many commit-origin bonds the wallet holds
  • lastStripAt(address) — the instant the wallet last moved tokens out

EXEMPT_CAP_MULTIPLE is the constant behind the allowance: 5.

The token contract reports every outbound transfer to CovenantNotes — the wallet and the amount (onTokenDebit, wired once via initBonds), which is what strips the boost and what feeds the same-transaction tally; zero-amount transfers and self-transfers are ignored, so nobody can strip a stranger with a 0-amount transferFrom. tokenURI is fully on-chain and lists each position's principal, origin, whether its boost is active, and the effective daily rate.