Skip to content

Expose the government reserve and settle payouts live in wNOK - #273

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

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

Conversation

@Greaker

@Greaker Greaker commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Follow-up to Settle bond coupon, buyback, and redemption in wNOK #272 (Phases 2–5 of docs/plans/bond-cash-leg-wnok/). The Central Bank resource replaces govSettlementBank (a bank name resolved from the removed BondManager.GOV_TBD) with govReserve: the reserve account from BondManager.GOV_RESERVE and its live WNOK balance. openapi.json is regenerated from the Zod schema; the diff is confined to that field.
  • Coupon, redemption, and auction finalisation decode nested reverts with the WNOK ABI and publish bidders + central-bank live changes, so dealer and reserve WNOK balances refresh after every cash movement (chain ingestion marks only bonds/auctions for those events). The treasury-held-units hint and the UI coupon warning now name the WNOK allowlist; the Central Bank page shows the reserve balance and address.
  • Docs: architecture, both process diagrams, the two known-issue entries rooted in the old TBD leg, a note on the closed-loop plan's Phase 6, and ADR 0004 to Accepted. progress.md carries the fresh-sandbox lifecycle balance trail (issuance, buyback, two coupons, redemption: WNOK moves only between the reserve and the dealers, total supply unchanged) plus two pre-existing follow-ups.

Test plan

  • cd services/nb-bond-api && npm run lint && npm run format:check && npm test && npm run build — 245 tests
  • cd services/nb-ui && npm run format:check && npm run lint && npm test && npm run build — 121 tests
  • python3 scripts/verification/check-public-repo-hygiene.py && python3 scripts/verification/check-markdown-links.py
  • Fresh ./sandbox.sh start on the branch: cast call BondManager GOV_RESERVE() equals the fixture reserve, reserve→BondDvP WNOK allowance is max; full lifecycle via http://bond-api.cbdc-sandbox.local/ with the balance trail recorded in docs/plans/bond-cash-leg-wnok/progress.md

…live

Replace the Central Bank resource's govSettlementBank field (a bank name
resolved from BondManager.GOV_TBD) with govReserve: the reserve account
address from BondManager.GOV_RESERVE and its live WNOK balance, which is
what an operator checks before approving a payout. The lookup moves from
the TBD roster module to the central-bank module; openapi.json is
regenerated from the Zod schema.

Coupon, redemption, and auction finalisation now decode nested reverts
with the WNOK ABI instead of the TBD ABI, and publish bidders and
central-bank live changes so dealer and reserve WNOK balances refresh
after every cash movement (chain ingestion only marks bonds and auctions
for those events). The treasury-held-units hint names the WNOK allowlist.

The UI Central Bank page shows the reserve balance and address in place
of the government bank KPI, and the pay-coupon warning points at the WNOK
allowlist and the Central Bank page workaround. nb-bond-api: 245 jest
tests green; nb-ui: 121 vitest tests green. Plan progress in
docs/plans/bond-cash-leg-wnok/progress.md.
Architecture, the auction and coupon/redemption sequence diagrams, and the
contracts overview now say every bond cash leg settles in WNOK against the
government reserve account fixed on BondManager. The two known-issue
entries rooted in the old TBD leg are rewritten: the treasury-held-units
deadlock now sits on the WNOK allowlist with the Central Bank page as the
workaround, and the hard-coded settlement bank becomes the immutable
reserve account with a narrowed follow-up. The closed-loop plan's Phase 6
carries a note that coupon and redemption already settle in wNOK.

ADR 0004 moves to Accepted in the ADR index and the documentation index.
Plan progress in docs/plans/bond-cash-leg-wnok/progress.md.
Phase 4 of docs/plans/bond-cash-leg-wnok/: on a fresh local sandbox the
deployed BondManager reports the fixture reserve as GOV_RESERVE with a
max WNOK allowance for BondDvP, and a full issuance, buyback, two-coupon,
redemption lifecycle moves WNOK only between the reserve and the dealers
with total supply unchanged. Two pre-existing observations are logged as
follow-ups: the redemption route returns a 500 for a nested revert the
coupon route would decode into a 409, and time-gated calls are estimated
against the latest block's timestamp.
@Greaker
Greaker merged commit 0cff0a6 into development Sep 8, 2026
9 checks passed
@Greaker
Greaker deleted the feature/bond-cash-leg-wnok-api branch September 8, 2026 10:37
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.
@Greaker Greaker mentioned this pull request Sep 15, 2026
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