Tokenized Bond Lifecycle Prototype
EVM-based prototype of a permissioned fixed-rate bond
1 Scope
One Solidity contract, TokenizedBond, covers the lifecycle of a permissioned fixed-rate bond: investor whitelisting, issuance, transfers, coupon payments and principal redemption. The issuer controls the whitelist, issuance and payments; investors hold, transfer and redeem units.
| Stage | Function | Rule enforced by the contract |
|---|---|---|
| Whitelisting | setWhitelisted | only the issuer; zero address rejected |
| Issuance | issue | only the issuer, only to whitelisted investors, only before maturity |
| Transfer | transfer, transferFrom | sender and receiver whitelisted; balance and allowance checked |
| Coupon | payCoupon | only on or after the coupon date, exact amount, paid pro rata |
| Redemption | fundRedemption, redeem | funded once at maturity with the exact amount; units burned on payment |
2 Requirements
Each requirement is a user story with acceptance criteria; each criterion maps to a function and an automated test with the same ID. Full text: docs/USER_STORIES.md.
| ID | Acceptance criterion | Function |
|---|---|---|
| US1 · As the issuer, I want to maintain a whitelist of investors who passed KYC, so that only eligible parties can hold the bond. | ||
| AC1.1 | Only the issuer can add or remove an address. | setWhitelisted |
| AC1.2 | The zero address cannot be whitelisted. | setWhitelisted |
| AC1.3 | Every change emits InvestorWhitelisted. | setWhitelisted |
| US2 · As the issuer, I want to issue units to an eligible investor, so that ownership is recorded on the ledger. | ||
| AC2.1 | Only the issuer can issue. | issue |
| AC2.2 | Units can only be issued to whitelisted investors. | issue |
| AC2.3 | Issuing zero units is rejected. | issue |
| AC2.4 | Balance and total supply increase; BondIssued and Transfer are emitted. | issue |
| AC2.5 | No issuance at or after maturity. | issue |
| US3 · As an investor, I want to transfer units to another eligible investor, so that transfers stay within the permissioned group. | ||
| AC3.1 | A transfer between whitelisted investors updates both balances. | transfer |
| AC3.2 | A transfer to a non-whitelisted address is rejected. | transfer |
| AC3.3 | An investor removed from the whitelist can no longer transfer. | transfer |
| AC3.4 | Transfers above the balance or of zero units are rejected. | transfer |
| AC3.5 | A third party moves units only within an allowance granted by the holder. | transferFrom |
| US4 · As the issuer, I want to pay each scheduled coupon to the current holders, so that investors receive the cash flows defined in the terms. | ||
| AC4.1 | Coupon per unit = face value × annual rate × interval / 365 days. | couponPerUnit |
| AC4.2 | No payment before the coupon date. | payCoupon |
| AC4.3 | The payment must equal coupon per unit × total supply. | payCoupon |
| AC4.4 | Each holder receives coupon per unit × holding; the schedule moves to the next date. | payCoupon |
| AC4.5 | Only the issuer can pay a coupon. | payCoupon |
| US5 · As an investor, I want to redeem my units for principal at maturity, so that the bond is repaid and closed. | ||
| AC5.1 | Principal can be funded only at or after maturity, and only once. | fundRedemption |
| AC5.2 | The funding must equal face value × total supply. | fundRedemption |
| AC5.3 | Redemption before funding is rejected. | redeem |
| AC5.4 | Redemption pays units × face value and burns the units. | redeem |
| AC5.5 | A holder without units cannot redeem. | redeem |
3 Workflow
Runs against the contract on a local EVM ledger in this browser.
Loading…
| Investor | Whitelisted | Units | Coupons received | Principal received |
|---|
3.1 Lifecycle
3.2 Controls
Each action below violates an acceptance criterion and must be rejected by the contract.
| ID | Attempt | Result |
|---|
3.3 Contract events
- No events yet.
4 Tests
npm test runs 24 tests for TokenizedBond: at least one per acceptance criterion, covering the permitted path and the rejected path (permissions, payment amounts, dates and lifecycle order).
TokenizedBond US0 Bond terms AC0.1 rejects invalid terms at deployment US1 Eligibility AC1.1 – AC1.3 3 tests US2 Issuance AC2.1 – AC2.5 5 tests US3 Transfers AC3.1 – AC3.5 5 tests US4 Coupon payments AC4.1 – AC4.5 5 tests US5 Redemption AC5.1 – AC5.5 5 tests 24 passing
5 Production gaps
| Area | Prototype | Needed in production |
|---|---|---|
| KYC/AML | Boolean whitelist set by the issuer | Integration with onboarding and identity systems, sanctions screening, shared identity registry |
| DvP | Transfers move units without payment; coupons and principal in native test currency | Regulated settlement asset (tokenised deposits or central bank money) and delivery versus payment |
| Custody | Local test accounts | Custody wallets, HSM/MPC key management, recovery, segregation of client assets |
| Treasury systems | None | Funding plan, cash and liquidity management, accounting, regulatory reporting, reconciliation |
| Legal register | None | Legally recognised register (e.g. eWpG), terms consistent with the contract |
| Servicing | Coupons pushed to all holders in one loop; simplified day count | Record-date snapshots, claim-based payments, day-count and business-day conventions |
| Controls | Single issuer key | Role separation, multi-signature approval, pause, forced transfer, upgrade governance |
| Privacy, assurance | Public balances; automated tests | Confidentiality of positions; security audit and monitoring |