Source:Documentation Index
Fetch the complete documentation index at: https://docs.signalium.site/llms.txt
Use this file to discover all available pages before exploring further.
packages/contracts/src/yield/GimoAdapter.sol
Single-purpose, immutable. One adapter per Treasury keeps accounting isolated.
Why a per-market adapter
Gimo’sunstake(lsdAmount) queues a withdrawal ticket against the caller’s address. If two markets shared an adapter, their unbonding queues would commingle and accounting would have to disambiguate. A fresh adapter per market sidesteps that — each adapter sees only its own tickets.
Lifecycle
| Call | Effect |
|---|---|
constructor(treasury, stakePool, referrer) | Stores immutable wiring; max-approves st0G to stakePool so subsequent unstake() works |
deposit() payable (only treasury) | Calls stakePool.stake{value: msg.value}(referrer), returns minted shares |
requestWithdraw(nativeAmount) (only treasury) | Burns ceil(nativeAmount × 1e18 / rate) st0G, books _pendingClaim += nativeAmount. If the request overshoots the position by rounding, drains the position instead of reverting (caller learns the actual amount via pendingClaim()) |
claim() (only treasury) | Calls stakePool.withdraw(), forwards realized native to the Treasury, reconciles _pendingClaim against actual payout |
syncLsdApproval() (permissionless) | Re-runs the max-approve. Useful if Gimo upgrades and rotates the lsdToken proxy |
totalAssets vs pendingClaim
Mainnet probe
Discovered bycast call against the deployed Gimo proxy at 0xAc06d1Df…35aF:
| Method | Returns | What it means |
|---|---|---|
getRate() | uint256 (1e18-scaled) | st0G → 0G exchange rate |
eraSeconds() | 86400 | 1 day per era |
unbondingDuration() | 3 | 3 eras = ~3 day unbonding |
minStakeAmount() | 1e16 (0.01 0G) | Smallest stake Gimo accepts |
lsdToken() | 0x7bBC…1404 | st0G ERC20 |
GimoAdapter.fork.t.sol exercise the full deposit → unstake → wait → claim round-trip against this real proxy.
