Developers
Program
Accounts, addresses, instructions and units of the Taper program.
Taper is one Anchor program. Everything on this page comes from its interface definition (IDL), which ships with the SDK.
Addresses
| USDC mint | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
|---|---|
| SOL mint | So11111111111111111111111111111111111111112 |
| JitoSOL mint | J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn |
| NVDAx mint | Xsc9qvGR1efVDFGLrVsmkzv3qi45LTBjeUKSPmx9qEh |
| Pyth receiver | rec2HHDDnjLfj4kE7VyEtFA1HPGQLK33259532cRyHp |
The program and market addresses appear here when the markets open.
Accounts
Seven account types hold all state. Every address is a program-derived address from fixed seeds.
| Account | Seeds | Holds |
|---|---|---|
| Market | "market", collateral mint, USDC mint, admin | Limits, oracle settings, the rate model, pool cash, debt index and shares, last price used, jump fee. |
| Bands | "bands", market | All 128 bands in one zero-copy account: each band's dollars, collateral and total shares. |
| Loan | "loan", market, borrower | Debt shares, the first band and band count, and the loan's share of each of its bands. |
| Lender | "lender", market, owner | The lender's shares of the pool. |
| StakeConfig | "stake_config", admin | The stake token for every market under this admin, and its vault. |
| SessionStake | "session_stake", stake config, owner | A candidate's staked TAPER, the roles it backs and when its last one ended. |
| SessionRole | "session_role", market | A stock market's session signer, or none. |
Staked TAPER sits in one vault per stake config, at "stake_vault" with the config as the second seed. Each market also owns two token vaults, at "stable" and "collateral" with the market as the second seed. The USDC vault backs pool cash plus every band's dollars; the collateral vault backs every band's collateral.
Keeping all bands in one account means a swap that crosses twenty bands still passes one account. The cost is that every swap and borrow in a market writes to the same account, so a market's trades land one after another.
Units
| Quantity | Unit |
|---|---|
| USDC | Micro-dollars, the token's own 6 decimals. |
| Collateral | Micro-tokens: one millionth of a token, whatever the mint's decimals. SOL and JitoSOL amounts are multiplied by 1,000 to get lamports or atoms; NVDAx by 100. |
| Prices | Micro-dollars per whole collateral token. |
| Debt index | Fixed point with 12 decimals. |
| Rates, fees, discounts | Basis points. |
Instructions
| Instruction | Signer | What it does |
|---|---|---|
open_loancollateral, debt, count | Borrower | Deposit collateral over count bands under the price and borrow debt USDC. |
repaymax_amount | Anyone | Pay down a loan's debt. Paying more than is owed clears it; only what is owed moves. |
close_loanmax_payment, min_collateral | Borrower | Settle the whole loan: band dollars pay the debt first, the wallet pays the rest, and the collateral comes back. |
deposit_liquidityamount, min_shares | Lender | Supply USDC to the pool for lender shares. |
withdraw_liquidityshares, min_amount | Lender | Burn lender shares for USDC out of the pool's idle cash. |
swapbuy_collateral, max_input, min_output, max_crossings | Anyone | Trade with the bands at the oracle-derived price: buy collateral with USDC, or sell it back. |
liquidatemax_payment, min_collateral | Anyone | Close a loan with negative health: pay its discounted collateral value and take the collateral. |
health | Anyone | Record a fresh price and emit a loan's health. Moves no funds. |
sync_collateral | Anyone | Record a changed NVDAx multiplier after a corporate action. |
init_marketp | Admin | Create a market with its immutable parameters. |
set_sessionopen, borrow_until | Admin | Open the NVDAx borrowing window for one trading session. |
recenter_marketbase_price | Admin | Move an empty market's band grid to a new base price. |
sign_sessionopen, borrow_until | Session signer | Open the NVDAx borrowing window as the market's appointed signer, with at least 1,000,000 TAPER staked. |
init_stake_config | Admin | Name the stake token for markets under this admin: a fixed-supply mint with six decimals and no freeze authority. |
stake_sessionamount | Anyone | Stake TAPER as a candidate for session signer. |
unstake_sessionamount | Staker | Take stake back once it backs no role and 30 days have passed since its last one. |
appoint_session_signer | Admin | Make a candidate with at least 1,000,000 TAPER staked a stock market's session signer. |
remove_session_signer | Admin | Remove a market's session signer. Its stake stays bound for 30 days. |
burn_session_stake | Admin | Burn a signer's whole stake, while it backs a role or within 30 days after. |
Events
The program emits seven events, which the indexer stores and the app reads for history.
| Event | When | Fields |
|---|---|---|
LoanChange | A loan opens (action 0), is repaid (1), closes (2) or is liquidated (3). | market, loan, borrower, action, debt, x, y, bad_debt |
PoolChange | A lender deposits or withdraws. | market, user, deposit, amount, shares |
BandSwap | Someone trades with the bands. | market, trader, buy_collateral, input, output, oracle, crossings |
HealthSnapshot | health is called. | loan, debt, assets, x, y, oracle |
SessionWindow | The admin or the session signer opens a borrowing window. | market, user (who signed), open, borrow_until |
SessionSignerChange | A session signer is appointed or removed. | market, user, appointed |
SessionStakeChange | TAPER is staked (action 0), unstaked (1) or burned (2). | config, user, action, amount, staked |
x is dollars and y collateral, in the units above.
Compute
Measured on the built program: opening a loan over four bands takes about 58,000 to 62,000 compute units, over fifty bands 117,717, and a swap across 49 bands 328,791. Transactions that touch many bands need a compute budget above Solana's 200,000 default; the SDK requests 1.4 million by default.