-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
Problem
Plain LUSD collateral earns 0% yield. Integrate Stability Pool for ~6.28% APR (Dune data) to fund governance token buybacks, without disrupting liquidity.
Solution
Add StabilityPoolFacet via diamond proxy. Auto-deposit LUSD to pool on mint; withdraw principal on redeem. Harvest ETH/LQTY yields during redeems for buybacks/compounding (protocol-owned only). Piggyback ops on user txs for gas efficiency.
Alternatives Considered
- AAVE (~3.24% yield, more complex).
- Leverage/LPs (higher risk).
- V2 migration (future option for multi-collateral).
Implementation Spec
Prerequisites
Audit facet (~$10-20K budget).IntegrateIStabilityPool.sol(address: 0x66017D22b0f8556afDd19e1e5b5f1cbD89a6C337).Add 1inch/Uniswap for swaps.New storage:totalPrincipalInPool(uint256),protocolTreasury(address).
Facet Functions
depositToPool(uint256 amount): CallprovideToSP(amount, address(0)).withdrawFromPool(uint256 amount): CallwithdrawFromSP(amount).harvestRewards(): Claim rewards, swap (e.g., 50% to LUSD for compounding, 50% to governance token for buybacks).
Flows
- Mint: Transfer LUSD → Deposit to pool → Mint uUSD → Update
totalPrincipalInPool += amount. - Redeem: Burn uUSD → Calc principal → Withdraw/transfer principal → Harvest if rewards > threshold (route to treasury) → Update
totalPrincipalInPool -= amount.
Over-Collateralization
Value pool as LUSD equivalent (Chainlink oracles for ETH/LQTY). Redemptions: principal only.
Monitoring/Automation
- Chainlink/Gelato for optional harvests. It would be nice to sell the ETH/LQTY for LUSD and boost holdings as soon as it is rewarded by the stability pool.
- Dune alerts for APR/supply.
Testing
- Unit: Deposit/withdraw/harvest (Foundry).
- Integration: Mainnet fork; simulate liquidations.
- Edges: Low liquidity, volatility, mass redeems. Gas: <200K extra per tx.
Deployment
- Deploy facet.
diamondCutvia multisig.- Verify on Etherscan.
- Phased: Opt-in for new deposits.
Risks/Mitigations
Yield variability: Fallback to plain LUSD if APR <3%.Supply crunch: Auto-withdraw if < $10M.Security: Audit for reentrancy.
Reactions are currently unavailable