GetUnite / liquidity-direction-protocol

10 stars 2 forks source link

Liquidity buffer management for ibAlluoUSD + stIbAlluoUSD #114

Closed dbaclin closed 1 year ago

dbaclin commented 1 year ago

Context

To ensure confidence in the protocol, we need to make sure we can let users withdraw their deposits as fast as possible - to ensure this is the case, we keep some funds in a buffer that allows the conversion between ibAlluoUSD/stIbAlluoUSD to one of the 3CRV (usdc, dai, usdt)

Task

Once every X hours (start with once every 24 hours, ideally every block)

Check if there are any pending withdrawals that haven't been satisfied

Otherwise

Constraint: Have a max top up amount (e.g. max top up of 250k in any 24h period) that can be overriden to ensure hacks cannot drain more than Y

Set Target buffer as 10% of the Withdrawable ibAlluoUSD + StIbAlluoUSDSet Max buffer as 15% of the Withdrawable ibAlluoUSD + StIbAlluoUSDSet Min buffer as 5% of the Withdrawable ibAlluoUSD + StIbAlluoUSD

Details

See this spreadsheet for more details: https://docs.google.com/spreadsheets/d/1mBFPA_gjTbK4r6BO4OPoLQR-G4rtFQ84QTd603Wh7hw/edit#gid=0