Drift Protocol v2

โŒ˜K
๐Ÿ‘พWelcome to Drift Protocol
๐ŸงฎDrift DEX
๐Ÿ‘‹Getting Started
๐Ÿ“ˆPerpetual Futures
๐Ÿ“ŠSpot Margin Trading
๐ŸฆBorrow & Lend
๐Ÿ›๏ธStaking
๐Ÿ”ฌTechnical Explanations
๐Ÿ“Accounting and Settlement
โž—Borrow Interest Rate
๐Ÿ“œDelisting Process
โ›ฒDrift AMM
๐ŸƒJust-In-Time (JIT) Auctions
๐Ÿ“šKeepers & Decentralised Orderbook
โ˜ ๏ธLiquidators
๐Ÿ’งLiquidity Providers (LPs)
๐Ÿ“‹Protocol Guard Rails
๐Ÿ“Risks
๐Ÿ–ฅ๏ธDeveloper Resources
๐Ÿ“”Overview
โŒจ๏ธSDK Documentation
โŒจ๏ธTutorial: Bots
โš ๏ธTroubleshooting
๐Ÿ› ๏ธKeeper Bots
๐Ÿ› ๏ธTrading Bots
โŒจ๏ธHistorical Data (v1)
โŒจ๏ธAPI
๐Ÿ›ก๏ธSecurity
๐Ÿ›ก๏ธAudits
๐Ÿ›ก๏ธBug Bounty
โš–๏ธLegal and Regulations
๐Ÿ“Terms of Use
๐Ÿ“Disclaimer
๐Ÿ“Privacy Policy
๐Ÿ“Competition Terms and Conditions
๐Ÿ“šGlossary
Docs powered byย archbeeย 
8min

Risk Parameters

This risk parameters are relevant to borrow lend markets. Further risk parameters are also set out in ๏ปฟPlatform Risks and Perpetual Swaps Risk Parameters.๏ปฟ๏ปฟ

Withdraw/Borrow Limits

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 withdraw 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.

Global Withdrawal Limits

The current global withdrawal limit is defined as 80% of the EMA (exponentially moving average) of the total deposits over the last 1 day.

  • deposit_token_1d_ema * 0.8

Global Borrow Limits

  • borrow_token_1d_ema * 1.2 (when utilization is above 15%)
  • 0 (when utilization above 90%)

๏ปฟ

Potential User Exemption to Global Limits:

A individual who satisifies 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 account withdraw up to their net winnings. The user exemption rule may altered and should not be relied upon.

Oracle Guard

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)

Insurance / Social Loss

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.

Updated 24 Jan 2023
Did this page help you?
Yes
No
UP NEXT
Liquidity Provision
Docs powered byย archbeeย 
TABLE OF CONTENTS
Withdraw/Borrow Limits
Global Withdrawal Limits
Global Borrow Limits
Oracle Guard
Insurance / Social Loss