To help guard against large atomic drain attacks, the protocol activates this guard once specific tokens experience large spikes in withdraw for sizes above the withdraw_guard_threshold. Since they are constantly adjusting, normal user/exchange activity should not activate them.
The current global withdrawal limit is defined as 80% of the TWAP of the total deposits within the last 1 day.
- deposit_token_1d_twap * 0.8
- borrow_token_1d_twap * 1.2 (when utilization is above 15%)
- 0 (when utilization above 90%)
If the oracle is deemed invalid (see ), the following operations will be blocked:
- risk increasing borrows
- withdraws if the user has outstanding liabilities (margin requirement > 0)
In the event of losses from lending, the insurance fund of the relevant Spot Market can be drawn upon. If the insurance fund is empty, losses from the loan will be socialised across depositors.