Shares and the exchange rate
The vault keeps two running totals:
C=total_coin_in, the tracked value of the whole pool (idle + deployed), in base units.S= the total supply of share tokens (samSUI/samUSDC).
The price of one share is C / S. Everything below is just careful rounding around that ratio.
Minting on deposit
Section titled “Minting on deposit”When you deposit a net amount a (after the deposit fee), the shares you receive are:
Then the pool grows by your deposit and the supply by your shares:
The share count is rounded down. Any sub-share remainder stays in the pool (it benefits all holders), never minted to you.
Burning on withdrawal
Section titled “Burning on withdrawal”When you redeem s shares, the underlying you receive (before the withdraw fee) is:
Then:
Again rounded down, so the tiny remainder stays with the vault rather than being over-paid to you.
How yield raises the price
Section titled “How yield raises the price”When the vault earns, protocol interest, harvested rewards, or a vesting incentive, the earned
amount e is added to the pool without minting any shares:
Since the price is C / S and only C grew, every share is now worth more. This is how your
balance accrues yield: not by your share count going up, but by each share redeeming for more
underlying over time.
Why round-tripping never profits
Section titled “Why round-tripping never profits”Because minting rounds down and burning rounds down, a deposit immediately followed by a withdrawal always returns slightly less than you put in (the dust stays in the pool). There is no rounding direction that pays a depositor more than their fair share, so the share price can only move up from yield, never be gamed by deposit/withdraw cycles.
A worked example
Section titled “A worked example”Suppose the pool is C = 1_000 USDC-units and S = 1_000 shares (price 1.0).
- The vault earns
200from interest:C = 1_200,S = 1_000. Price is now1.2. - You deposit
600: shares =⌊600 · 1000 / 1200⌋ = 500. NowC = 1_800,S = 1_500. - You hold
500shares worth500 · 1800 / 1500 = 600, exactly what you put in, at the higher price. Later, asCkeeps growing, those same500shares redeem for more.