GhoSavingFluidStrategy
Source: src/strategies/GhoSavingFluidStrategy.sol — the current GHO Saving adapter for AAVE GHO Saving. Three deployments are attached to the GHO Saving vault (see Deployed Addresses); the newest, 0x1Cd2a97036e9320Df442feeAa795Df913D665E3f, holds the bulk of the position. The earlier GhoSavingStrategy (Aave GSM route) remains attached as a secondary adapter.
GhoSavingFluidStrategy extends BaseERC4626Strategy with the target vault set to Aave sGHO. It replaces the GSM conversion with a swap on the Fluid DEX GHO/USDC pool: USDC is swapped to GHO on entry and GHO is swapped back to USDC on exit. Users never hold GHO or sGHO; they hold King's Vault shares.
Before integration or administration, verify the listed signatures and permissions against the deployed implementation. The source commit used for this page is 7241f6f; the deployed contracts are not source-verified on Etherscan. See Documentation scope and verification.
Dependencies (Ethereum Mainnet)
| Role in route | Contract | Address |
|---|---|---|
Target ERC-4626 vault (ERC4626_VAULT) |
Aave sGHO | 0xE1753F2e00940cC31213dd92013cF019DFE4ca1d |
USDC ↔ GHO swap (DEX) |
Fluid DEX T1 GHO/USDC pool | 0xdE632C3a214D5f14C1d8ddF0b92F8BCd188fee45 |
Exit quotes (RESOLVER) |
Fluid DexReservesResolver | 0x05Bd8269A20C472b148246De20E6852091BF16Ff |
GHO |
GHO token (read from sGHO.asset()) |
— |
DEX and RESOLVER are returned by the AddressBook library (fluidDexGhoUsdc(), fluidDexReservesResolver()); see Interfaces & Libraries. The constructor checks through the resolver that the pool contains exactly USDC and GHO, and records which side is token0 (ASSET_IS_TOKEN0).
Conversion Route
Invest (USDC → sGHO) — invest:
DEX.swapIn(USDC → GHO, amount, minOut)—minOutisamountconverted 1:1 to GHO units, reduced byslippageBpssGHO.deposit(GHO)→ sGHO shares held by the strategy (BaseERC4626Strategy.invest)
Divest / Replenish (sGHO → USDC) — divest (replenish calls divest):
- GHO needed =
amountconverted 1:1 to GHO units, capped at idle GHO plussGHO.maxWithdraw(strategy) sGHO.withdraw(gho)for the part not already idle → GHO to the strategyDEX.swapIn(GHO → USDC, gho, minOut, vault)— USDC goes directly to the King's Vault;minOutis the 1:1 amount reduced byslippageBps- Returns the USDC the vault actually received
Exit (everything → USDC) — exit(bool ignore):
sGHO.redeem(all shares)→ GHO- Quotes the GHO → USDC swap through
RESOLVER.estimateSwapIn, appliesslippageBps, thenDEX.swapIn(GHO → USDC, …, vault); GHO left by an earlier failed exit is retried here - Any idle USDC in the strategy is transferred to the vault
With ignore = false any failed step reverts with ExitFailed; with ignore = true the failure is swallowed and GHO may remain in the strategy.
Price protection and fallback
Every swap carries a minimum-output bound derived from a 1 USDC = 1 GHO reference minus slippageBps (currently 100 bps = 1%, read from the deployed contract on 2026-10-30; the constructor default is also 100). If the pool cannot fill within that bound, the swap reverts. For a user withdrawal this means the Controller's liquidity waterfall drops this strategy for that attempt and retries with the remaining attached strategies — including the legacy GhoSavingStrategy, whose exit goes through the Aave GSM. Only when no strategy can serve the request does the withdrawal revert with InsufficientStrategyAssets. See GHO Saving withdrawals.
Functions
Constructor: (address asset_, address receiver_, address owner_, address vault_, address dex_, address resolver_). The base constructor is called with vault_.asset() (GHO) as the ERC-4626 asset, while asset() is overridden to return USDC.
| Function | Access | Description |
|---|---|---|
GHO(), DEX(), RESOLVER(), ASSET_IS_TOKEN0(), ERC4626_VAULT() |
public view | Immutable route dependencies. |
slippageBps() |
public view | Current slippage bound in basis points. |
asset() |
public view | Returns USDC (not GHO). |
totalAssets() |
public view | Idle USDC + (sGHO shares → GHO via previewRedeem, plus idle GHO) valued at 1 GHO = 1 USDC, adjusted for decimals. Swap fees and price impact are not deducted; they are realised when GHO is sold. |
setSlippage(uint256 slippageBps_) |
Admin (DEFAULT_ADMIN_ROLE) |
Sets the slippage bound; must be below 10 000. |
invest(uint256 amount) |
Keeper | Swaps amount USDC to GHO on Fluid within the bound and deposits into sGHO. |
divest(uint256 amount) |
Keeper | amount in USDC. Withdraws the GHO needed from sGHO, swaps to USDC on Fluid within the bound, USDC delivered to the vault. Returns the USDC received. |
replenish(uint256 amount) |
Keeper | Same as divest; used by the Controller liquidity waterfall. |
exit(bool ignore) |
Keeper | Redeems all sGHO, swaps all GHO to USDC using a resolver quote minus the bound, forwards idle USDC. |
harvest(IERC20 asset_) |
Admin (DEFAULT_ADMIN_ROLE) |
Sweeps the full balance of any token — including sGHO shares — to receiver() (the vault). This deliberately overrides the base restriction so the position can be moved out without a forced conversion, for example during a GHO depeg. |
The strategy emits no events of its own. It defines one custom error, InvalidQuote(), raised when a computed minimum output rounds to zero.
Accounting Notes
- Yield comes from the sGHO share-to-GHO exchange rate; it is reflected in
totalAssets()and therefore in the King's Vault NAV after settlement. totalAssets()values GHO at par with USDC. The Fluid pool's swap fee and any GHO/USDC price difference are borne by the vault at the moment GHO is sold, and shared by all share holders; they are separate from the King's Vault performance fee (see Fees).- Merit / Merkl rewards accruing to sGHO holders are King's Vault protocol income and are excluded from user NAV and APY.