Docs
The contract, function by function
The fold
| Function | Returns | What it means |
|---|---|---|
| dust() | uint256 | The largest deposit that mints exactly zero shares. Accepted, transfers your asset in, issues nothing. Zero on an empty vault. |
| step(assets) | (lo, hi, shares) | The closed interval of deposit sizes that mint the same number of shares as assets. assets − lo is what you are overpaying. |
| foldLoss(assets) | (shares, back, lossBps) | Deposit, then immediately redeem everything it minted. back is what returns; lossBps is the gap in basis points. |
Deposits and redemptions
| Function | Rounding | Notes |
|---|---|---|
| deposit(assets, to) | floor, against you | Mints exactly previewDeposit. Reverts on zero and on the zero address. |
| mint(shares, to) | ceil, against you | Costs exactly previewMint. |
| redeem(shares, to, from) | floor, against you | Pays exactly previewRedeem. Allowance is respected; an infinite one does not decay. |
| withdraw(assets, to, from) | ceil, against you | Burns exactly previewWithdraw. |
Owner functions
| Function | Bound |
|---|---|
| harvest(gross) | The tokens must already be held and must exceed totalAssets + accrued. The cut goes to accrued; the rest raises every share. |
| setCut(bps) | Reverts above MAX_CUT_BPS = 2000, which is a constant. No owner path raises it. |
| collect(to, amount) | Reverts above accrued. There is no input that reaches principal. |
There is no rescue, no sweep, no pause and no upgrade path. The full allowed surface is on the vault page, and the build fails if the compiled ABI grows a function outside it.
Constructor
Five arguments, and two of them are choices
| Argument | Bound | Effect |
|---|---|---|
| asset | not the zero address | Any ERC-20 on this chain. decimals() is read from it at construction. |
| name, symbol | free | The share token's own metadata. |
| offset | 0 to 12, reverts outside | 10offset phantom shares. Larger strictly narrows the dead zone — property 21 — and is a floor the first depositor cannot undercut. What it costs and what it buys. |
| cutBps | 0 to 2000, reverts above | Share of harvested income taken as protocol fee. Never touches principal. |