Orbitprotocol OTokens represented pool shares whose exchange rate determined underlying balances
Orbitprotocol OTokens represented a supplied position in an asset-specific lending pool on Blast. A holder’s underlying balance followed the OToken quantity multiplied by that market’s exchange rate. Deposits minted shares, while redemptions reduced them and returned the underlying asset when the contract’s checks passed. The published design separated share accounting from borrowing debt and from claimable Blast yield. Blast is winding down, so a recorded pool balance does not establish immediate redemption or withdrawal to Ethereum.
SpaceStation and the asset-specific share contract
A market’s OToken contract combined the share ledger with accounting for its underlying assets. SpaceStation checked whether minting, transfers and redemptions satisfied controller rules. An interest-rate model supplied rates for interest accrual. The same share balance therefore entered both asset conversion and collateral calculations through different parts of the architecture. An oUSDB share related to USDB in its own market; the architecture also named ETH as an underlying asset. Native ETH and ERC-20 wrappers connected the published OToken base implementation to different transfer interfaces.
Deposits and newly minted OTokens
The market divided actual supplied assets by the exchange rate that applied after interest accrual. That calculation determined the newly minted share quantity. It increased both the supplier’s OToken balance and total supply. A higher exchange rate meant fewer newly minted shares for the same underlying contribution, subject to integer rounding.
Minting first required a listed market with minting unpaused. The OToken routine also required interest accounting to be current for the executing block.
The ERC-20 transfer path measured the underlying amount that the market actually received. If the asset deducted a transfer fee, that credited amount governed share creation. The
Mint
event recorded both the actual underlying amount and the minted OToken quantity, which described different sides of the conversion. Matching their integers was not a condition of a successful deposit.
Exchange-rate inputs and the empty-pool branch
The exchange rate linked a share quantity to its corresponding amount of underlying assets. Multiplication gave the underlying balance; division converted an underlying amount into shares. Both directions required consistent token units and the contract’s fixed-point scaling.
Supply state in the rate calculation
No outstanding shares
When total supply was zero, the contract returned its configured initial exchange rate. Initialization required a positive rate. The empty-pool branch avoided dividing by zero and did not assume equal share and underlying quantities.
Shares in circulation
With shares outstanding, the base contract calculated the exchange rate as cash plus total borrows minus total reserves, divided by total OToken supply. The implementation represented the rate as a scaled integer. Cash and borrow balances described the underlying asset, while total supply counted shares.
Borrowing reduced available cash and increased recorded loans. Repayment moved the amounts in the opposite direction. Considering those transfers alone, cash and loans offset each other in the numerator. Available withdrawal cash still changed. Reserves reduced the amount attributed to shares, so the numerator required that deduction.
Could an unchanged OToken balance represent more underlying assets?
Yes, accrued borrower interest could increase the underlying amount represented by an unchanged OToken balance. The base contract recorded this change through its exchange rate. Its interest routine updated total borrows, reserves and the borrow index without minting additional shares to every supplier.
The reserve factor determined the portion of newly accrued borrower interest that entered reserves. It applied to that interest, not to every supplier’s entire recorded balance. Only the interest remaining outside reserves increased the net assets attributed to outstanding shares.
Stored and current rate reads also had different timing.
exchangeRateStored()
used stored accounting without accruing interest first.
exchangeRateCurrent()
accrued interest before returning the rate.
balanceOfUnderlying()
used the latter path. Readings from different accounting states could therefore disagree without any change in the holder’s share quantity.
The market’s
getAccountSnapshot()
read returned the OToken balance, stored debt balance and stored exchange rate together. Those entries paired a supplied position with any separate borrowing obligation. Subtracting the debt’s raw integer from the share count would mix units, because loans used underlying units.
Collateral membership and share transfers
A transfer of collateral shares required permission from SpaceStation because removing shares could weaken the sender’s collateral support. The controller reused its redemption permission check for the requested transfer quantity. It also enforced the transfer pause setting. The token’s transfer routine then updated the sender’s and recipient’s share balances, provided the allowance requirements also passed.
Market membership supplied the decisive branch in that collateral check. An account that had not entered that market bypassed the hypothetical liquidity calculation after the listing check. An account with market membership had to remain free of a calculated shortfall after the reduction. The calculation combined OToken balances with exchange rates, collateral factors and oracle prices.
When could a holder redeem OTokens?
A holder could redeem when the holder had enough shares, controller permission passed and the market held enough underlying cash for the requested amount. The published routine also required interest accounting to be current. It reduced the holder’s shares and total supply before transferring assets. If a required check or the outgoing transfer failed, the operation reverted.
Cash availability differed from the account’s underlying balance. The exchange-rate numerator included borrowed assets that the market did not hold as cash. Those loans could support an accounting balance while limiting immediate redemptions. The function
getCash()
exposed the underlying cash held by that market.
Collateral use imposed an additional restriction when the holder had entered the market. A proposed redemption could fail if removing the shares created a shortfall. Reducing borrowing debt could change that permission calculation, while repayment itself did not redeem any OTokens.
Lending interest and claimable Blast yield
Claimable native yield followed a different accounting path from borrower interest in the published OToken implementation. Initialization selected claimable settings for ETH, WETH and USDB. Claimable yield accumulated separately from ordinary balances, so that configuration did not automatically increase each supplier’s OToken holding or pay yield into the exchange-rate numerator. The admin-only claim function for ETH yield and gas accepted a recipient address. Its separate WETH and USDB claim routine sent the claimed token amounts to the calling admin. Those functions did not implement automatic distribution of those proceeds to individual share holders.
Share amounts and underlying amounts at redemption
redeem()
accepted an OToken quantity and calculated the underlying output.
redeemUnderlying()
accepted an underlying quantity and calculated the share reduction. Both public paths accrued interest before entering the shared redemption routine. Their amount parameters described different units, even though both reduced the same kind of supplied position.
Choosing a redemption amount
-
To specify a share quantity, use the share-denominated
redeem()input. -
To request an underlying quantity, use the asset-denominated
redeemUnderlying()input. - If the account had entered the market, the reduction had to pass its collateral check.
- If cash fell below the calculated underlying output, neither input mode bypassed that cash requirement.
- For raw contract amounts, apply the share or underlying decimals appropriate to the selected input.
Successful redemption returned underlying assets on Blast and reduced the share ledger. It did not move those assets to Ethereum.
Existing shares during Blast’s wind-down
Blast is winding down. The exchange-rate formula described a relationship within the lending contract. It did not establish that a market could release the represented assets or that a network withdrawal had completed. The Blast bridge’s regular-wallet withdrawal path used underlying assets already held by the wallet. Funds held by a smart contract wallet required a separate withdrawal method. Pool shares first needed release as underlying assets on Blast before a regular wallet could include those assets in a bridge withdrawal.
Common questions about Orbitprotocol OTokens
Could shares from different OToken markets be combined into one underlying balance?
Each market required its own exchange rate and underlying denomination before a balance could be interpreted. Raw share amounts from separate markets did not form a meaningful combined underlying quantity. The corresponding market contract determined which underlying asset each calculation described.
How did OToken decimals affect balance conversion?
The OToken’s decimal setting determined how its raw share balance translated into a displayed token quantity. The initializer accepted that setting separately from the ERC-20 underlying asset address. Converting a displayed share balance into displayed underlying units also required the exchange-rate scaling and the underlying token’s precision.
Did approving OTokens authorize an underlying withdrawal?
An OToken approval authorized a spender to transfer shares up to the approved allowance through transferFrom. It did not request redemption or make the market send underlying assets. Approval for an underlying ERC-20 asset concerned a different token contract. Confusing the two allowances could lead to granting spending permission over the wrong asset.
Were OToken transfers to the sender’s own address allowed?
The published OToken transfer routine rejected transfers whose sender and destination were the same address. This check applied even if the holder had a sufficient balance. Increasing the approved allowance could not remove that condition because self-transfer rejection was a separate rule.
Was the OToken supply rate an annual percentage yield?
The published supplyRatePerBlock function returned a per-block rate, scaled by 10^18. Its interest-model inputs included cash, total borrows, reserves and the reserve factor. Converting that rate into an annual yield required separate compounding and block-frequency assumptions. The returned integer itself was not an annual percentage yield.
Who received the OTokens seized during liquidation?
The seizure routine allocated the seized shares between the liquidator and a protocol portion. It deducted the protocol portion from total supply and added its underlying value to reserves. The liquidator received the remaining shares. The contract’s protocolSeizeShareMantissa value determined the split in the published implementation.