Integrations for Developers
On this page
Use the contract views to read a series before requesting a transaction. Check raw-unit scaling, current addresses and terminal-state requirements when integrating deposits, transfers or redemption.
Contracts at a Glance
| Contract | Role | Standard |
|---|---|---|
NoteCore | Series registry, escrow, matching, observation, settlement | INoteCore + INoteCoreViews |
NoteLegs | COUPON and SHIELD units | ERC-1155 with transfer hook into NoteCore |
OracleAdapter | Official-close price reads | IOracleAdapter |
MarketCalendar | Official close validation | IMarketCalendar |
RevenueRouter | Fee sink, buyback auction | IFeeSink |
NOTE | Governance token | ERC-20 + Permit + Votes |
sNOTE | Staking vault | ERC-4626 + IRewardSink |
Treasury | Reserves and floor redemption | - |
BondDepository | Bond markets | - |
Desk | COUPON buyer vault | ERC-4626 + ERC-1155 holder |
Current network and deployment references: Contract Addresses.
Units and Decimals
fact
| Quantity | Unit |
|---|---|
Prices (s0, lastPrice, feed answers) | 1e8 (Chainlink convention), uiMultiplier already applied by the feed |
| Quote (USDG) amounts | Token decimals (6 for USDG); read quote() and its decimals() |
| Stock Token amounts | 18 decimals, raw ERC-20 balances (not balanceOfUI) |
| Leg units | 1 unit = 1 quote unit of matched notional (so 6 decimals for USDG) |
couponIndex | WAD (1e18) net quote per unit |
| Basis points | 1e4 = 100% |
fact Quote and Stock Conversion, Before Integer Rounding
price is USD per Stock Token at 1e8 precision. quoteRateWad is USD per USDG at WAD precision. Strike stock escrow rounds up; physical redemption rounds down using the recorded strike rate. See Physical Settlement.
Common Flows
Read a Series
INoteCoreViews.SeriesView memory v = core.getSeries(seriesId);
// v.status, v.observations, v.s0, v.couponBps, v.matchedNotional, v.couponIndex, v.nextObs, v.breached
bool holding = core.barrierHolding(seriesId); // lastPrice * 1e4 >= s0 * barrierBps
uint256 owed = core.accruedCoupon(seriesId, account); // claimable now
(uint256 q, uint256 s) = core.previewRedeem(seriesId, 0, units); // COUPON redemption preview
Subscribe COUPON
usdg.approve(address(core), amount);
core.depositCoupon(seriesId, amount); // amount >= minTicket; before subscriptionEnd
Subscribe SHIELD
uint256 prefund = core.requiredPrefund(seriesId, stockAmount); // at provisional price
prefund += (prefund * 10 + 9_999) / 10_000; // 0.1% headroom, rounded up: the requirement
// is re-evaluated in the deposit block
stock.approve(address(core), stockAmount);
usdg.approve(address(core), prefund);
core.depositShield(seriesId, stockAmount, prefund); // books the stock received and the whole prefund sent
The whole prefundQuote is escrowed to the position; the unused part comes back at settlement, not at deposit. The core books the Stock Token amount it actually receives, so the recorded deposit always equals what arrived in escrow, and requiredPrefund is checked against that received amount.
After Strike
core.settle(seriesId, account); // permissionless: mints legs to account, books refunds
core.claim(seriesId); // COUPON coupons
core.redeem(seriesId, units); // COUPON principal (USDG or stock)
core.redeemShield(seriesId, units);
core.refund(seriesId); // unmatched deposits
claim, redeem, redeemShield and refund settle the caller first if needed.
Hold Legs in a Contract
Your contract must implement IERC1155Receiver (or inherit ERC1155Holder). Coupons accrue to the holding contract; call claim from it. The transfer hook settles accrued coupons into claimableQuote on both sides of every transfer, so a vault can safely accept and hand out COUPON units without tracking coupon snapshots itself.
Guides
- Build on Note: integrator guides for wallets, protocols and treasuries, with the fee split every integration earns.
- Interfaces: full Solidity interfaces.
- ERC-1155 ids: id scheme and helpers.
- Events: every event with indexed fields, for indexers.
- Automation and cranks: permissionless cranks, lazy execution,
RollPolicyand the Chainlink-compatibleNoteAutomationupkeep. - Addresses: deployments.
ABI Source
ABIs are produced by forge build from contracts/ in the repository. Interfaces on these pages are copied from contracts/src/interfaces/ and the contract sources; the sources are authoritative.
Keep exploring, or revisit this topic from the navigation.