This page covers concepts specific to the Exponent Orderbook. For shared protocol concepts, see:
Escrows
Every trader has an escrow account on the orderbook. It holds your locked balances — PT, YT, and SY — and tracks any staged interest.
The lifecycle is straightforward: tokens deposit into your escrow when you create an order, convert between types as orders fill, and become withdrawable after you remove an order.
What each order type deposits and receives:
| Order Type | Virtual | You Deposit | You Receive |
|---|
| BuyYT | No | SY | YT |
| BuyYT | Yes | PT | SY |
| SellYT | No | YT | SY |
| SellYT | Yes | SY | PT |
Withdraw trading balances with ixWrapperWithdrawFunds. Collect staged interest separately with ixWrapperCollectInterest.
Virtual Offers
All orders on the orderbook are internally quoted in YT. To trade PT, you set virtualOffer: true and the orderbook handles the conversion — stripping SY into PT + YT, or merging PT + YT back into SY, depending on the direction.
The key insight: a PT buy order is really a YT sell order with an automatic strip at settlement. A PT sell order is a YT buy order with an automatic merge. This means PT and YT share the same liquidity pool.
See Virtual Offers for the full route table, strip/merge mechanics, and SDK usage.
Fee Decay
The orderbook charges separate maker and taker fees using a time-weighted decay model — fees decrease exponentially as maturity approaches, reaching zero at expiry. Makers always pay less than takers.
| Time to Maturity | Maker Fee | Taker Fee |
|---|
| 180 days | 5.0% | 8.0% |
| 90 days | 2.5% | 4.5% |
| 30 days | 1.0% | 2.0% |
| 7 days | 0.3% | 0.7% |
| At expiry | 0.0% | 0.0% |
Fees are deducted from the output amount after matching.
Use offerOptions("FillOrKill", [true]) to require the order to fill completely or not at all. Pass false to allow partial fills.
See Fee Decay Model for the full formula.
Interest Accrual
YT does not accrue interest while sitting in your wallet. It must be deposited into a sell order on the orderbook (or held via a filled buy order) for the protocol to track and distribute yield.
YT held in open orders earns yield continuously. This matters because your sell order might sit in the book for days or weeks — during that time, your YT is still working for you.
Interest is staged automatically when orders fill or get removed. You claim it separately from your trading balances.
The interest formula uses the inverse rate delta:
[TODO]
For example: you post a SellYT order for 1,000 YT when the SY exchange rate is 1.00. The rate later rises to 1.05. Your accrued interest is 1000 × (1/1.00 - 1/1.05) ≈ 47.6 SY, claimable via ixWrapperCollectInterest.
Offer Expiry
Every offer has a time-based expiration, specified in seconds when you create it, capped at vault maturity. Expired offers are automatically skipped during matching — you don’t need to cancel them.
After vault maturity:
- New offers are rejected —
postOffer reverts
- Existing offers can be removed — locked balances remain withdrawable
- Matching is disabled —
marketOffer also reverts
- Exchange rate freezes — uses the vault’s final SY exchange rate
The admin can batch-remove expired offers via ixRemoveExpiredOffers to free up orderbook capacity.
Key Accounts
The Orderbook account is the onchain state holding all active offers, price levels, and user escrows. Each orderbook is tied to a single vault.
Capacity limits: 1,000 price levels, 2,500 active orders, 1,500 unique traders.