Reserve vault
Authenticated income accounting with explicit owner-controlled custody.
Two different reserves
Formation reserve principal backs the curve until it becomes permanent liquidity. ReserveVault is a separate contract that receives protocol revenue. Holding SHOOK does not grant a right to withdraw ReserveVault assets, and the reserve balance is not a redemption price.
Streams
A registered stream binds a bytes32 identifier to a source address, an asset, a category, and an enabled flag. Only that source can deposit through depositNative or depositToken. Native currency uses address(0); token deposits measure the actual received balance change.
The owner can register streams, change their source or category, and enable or disable them. Since originating contracts depend on authenticated deposits, disabling or reassigning a required stream can make the corresponding trade, harvest, or settlement revert. That authority is a real liveness dependency.
Accounting buckets
| Field | Meaning |
|---|---|
| totalDeposited | All authenticated or attributed receipts for a stream |
| retainedBalance | Assets held under reserve custody for that stream |
| pendingRouteBalance | Assets intended for delivery but still held after failure |
| totalRouted | Successfully delivered route amounts |
| totalWithdrawn | Retained assets withdrawn by the owner |
| accountedBalance | Aggregate retained and pending obligations for an asset |
Direct transfers
A normal empty-calldata ETH transfer is accepted and attributed to SHOOK_RESERVE_UNATTRIBUTED_NATIVE. This direct-transfer path retains the funds and does not apply a route. There is no arbitrary payable fallback.
ERC-20 transferred directly to the reserve does not become an authenticated stream deposit. The owner can withdraw token balances above the accounted amount with withdrawUnaccountedToken. Do not treat a raw transfer as a staking deposit or a registered revenue contribution.
Owner withdrawals
Only the owner can withdraw retained amounts. Pending funds can first be moved to retained custody using retainPending. Two-step ownership requires the proposed owner to accept; the pending owner has no powers until acceptance. renounceOwnership always reverts.
The contract does not constrain withdrawn assets to any investment strategy. No external-asset portfolio, buyback mandate, reserve-backed redemption, or holder-controlled governance is implemented here.
Source reference
Checked against the source shipped with this documentation. Contract calls and units are detailed in the contract reference.
Imported source files 18
Supporting contracts, interfaces, and libraries imported by the sources above, including their dependencies.