Skip to main content

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.

Source: packages/contracts/src/yield/GimoAdapter.sol Single-purpose, immutable. One adapter per Treasury keeps accounting isolated.

Why a per-market adapter

Gimo’s unstake(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

CallEffect
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

function totalAssets() returns uint256 {
    return shares() × stakePool.getRate() / 1e18;  // still earning in Gimo
}
function pendingClaim() returns uint256 {
    return _pendingClaim;                          // queued, no longer earning
}
Callers (Treasury) sum the two for the full deliverable amount. Single-purpose accessors avoid the trap of one number meaning two things mid-unstake.

Mainnet probe

Discovered by cast call against the deployed Gimo proxy at 0xAc06d1Df…35aF:
MethodReturnsWhat it means
getRate()uint256 (1e18-scaled)st0G → 0G exchange rate
eraSeconds()864001 day per era
unbondingDuration()33 eras = ~3 day unbonding
minStakeAmount()1e16 (0.01 0G)Smallest stake Gimo accepts
lsdToken()0x7bBC…1404st0G ERC20
The 4 fork tests in GimoAdapter.fork.t.sol exercise the full deposit → unstake → wait → claim round-trip against this real proxy.