Skip to content

Settle bond coupon, buyback, and redemption in wNOK - #272

Merged
Greaker merged 2 commits into
developmentfrom
feature/bond-cash-leg-wnok
Sep 8, 2026
Merged

Greaker merged 2 commits into
developmentfrom
feature/bond-cash-leg-wnok

Conversation

@Greaker

@Greaker Greaker commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • BondManager settles every cash leg in WNOK against one government reserve account (GOV_RESERVE, constructor-supplied); buyback, coupon, and redemption no longer pay through the government-nominated TBD, so primary dealers buy and are paid in central-bank money and payouts never mint deposit tokens. The ITbd dependency and GOV_TBD are removed.
  • Deploy scripts pass the reserve address from PK_GOV_RESERVE and replace the TBD allowlisting/approval with the reserve's WNOK allowance for BondDvP. Test fixtures drop the Tbd deployment; new cases cover an underfunded reserve, a holder off the WNOK allowlist, and the zero-reserve constructor guard.
  • Adds the plan folder docs/plans/bond-cash-leg-wnok/ and ADR 0004 (Proposed), updates the contract docs and two NatSpec pages, and refreshes the nb-bond-api BondManager ABI artifact. The API's Central Bank field, revert decoding, and live-change publication follow in the next slice (Phases 2–5 of the plan); until then the Central Bank "Government bank" KPI degrades to a dash.

Test plan

  • cd contracts && forge fmt --check && forge build --sizes && bash ./check-verify-latest-mapping.sh && forge test — 25 suites, 393 tests
  • cd services/nb-bond-api && npm run lint && npm run format:check && npm test — 244 tests (ABI artifact only)
  • python3 scripts/verification/check-public-repo-hygiene.py && python3 scripts/verification/check-markdown-links.py
  • Slither via Contracts CI (not runnable locally on arm64)
  • Fresh local sandbox lifecycle run is Phase 4 of the plan, in the next slice

…ions

Add the plan folder docs/plans/bond-cash-leg-wnok/ (intent, design, plan,
progress) and ADR 0004 (Proposed) for paying bond coupon, buyback, and
redemption in wNOK from the government reserve account instead of the
government-nominated TBD, so primary dealers buy and are paid in
central-bank money. Index both in the documentation index and ADR index.

Phase 0 of the plan: BondManager.t.sol now asserts that RATE and PRICE
finalisation debit the bidder and credit the reserve in wNOK, and that
coupon and redemption leave wNOK total supply unchanged. All 47 tests in
the suite pass against the unchanged contract.
…eserve

Replace the government-nominated TBD in BondManager with a reserve account
address (GOV_RESERVE) and use WNOK as the cash token for buyback, coupon,
and redemption, matching the issuance leg. Primary dealers now pay for
bonds and receive coupon, buyback, and redemption cash in the same
central-bank money, and payouts move existing WNOK instead of minting
deposit tokens. The ITbd import and GOV_TBD are gone; InvalidGovTbd becomes
GovReserveAddressZero.

Deploy scripts pass the reserve address from PK_GOV_RESERVE and replace the
government-TBD allowlisting and approval with the reserve's WNOK allowance
for BondDvP. Test fixtures drop the Tbd deployment and assert WNOK balances;
new cases cover an underfunded reserve, a holder off the WNOK allowlist, and
the zero-reserve constructor guard. forge test: 25 suites, 393 tests green.
The nb-bond-api BondManager ABI artifact is refreshed (244 jest tests green);
the API's Central Bank field and revert decoding follow in the next slice.

Contract reference, security, lifecycle walkthrough, and the two affected
NatSpec pages describe the WNOK reserve leg. Plan progress is recorded in
docs/plans/bond-cash-leg-wnok/progress.md; decision in ADR 0004.
@Greaker
Greaker merged commit c2ff6f9 into development Sep 8, 2026
9 checks passed
@Greaker
Greaker deleted the feature/bond-cash-leg-wnok branch September 8, 2026 09:59
Greaker added a commit that referenced this pull request Sep 8, 2026
…ayouts via TBD (#274)

Move docs/plans/bond-cash-leg-wnok/ to docs/plans/archive/ with its status
set to Implemented (shipped via #272 and #273), tick its done criteria,
close out progress.md, and move the documentation-index entry to the
archive list. The closed-loop plan's Phase 6 note points at the archived
path.

Documentation maintenance sweep after the wNOK cash-leg change: the
diagrams index and the contract topology diagram still described coupon,
buyback, and redemption cash as flowing through the Nordea TBD; both now
show WNOK against the government reserve account.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant