To help guard against large atomic drain attacks and improve the reliability of the borrow/lend markets, the protocol activates this guard once specific tokens experience large spikes in withdraws for sizes above the withdraw_guard_threshold. Since the upper/lower bounds are constantly adjusting, normal range bounded user/exchange activity should not activate them.
The current global withdrawal limit is defined as 75% of the EMA (exponentially moving average) of the total deposits over the last 1 day.
- deposit_token_1d_ema * 0.75
- borrow_token_1d_ema * 1.25 (when utilization is above 15%)
- 0 (when utilization is above 90%)
Potential User Exemption to Global Limits:
An individual who satisfies the following does not need to adhere to the global limits if the spot position token amount < withdraw_guard_threshold/10 and after withdrawing they satisfy the following: - user lifetime net_deposits >= 0 - their spot position has cumulative_deposits >= 0 , balance type = deposit
The protocol errs to let smaller accounts withdraw up to their net winnings. The user exemption rule may be altered and should not be relied upon.
If the oracle is deemed invalid (see Oracles), 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.