website logo
⌘K
Rage Trade
Delta Neutral GMX
ETH Perp
T&C + Privacy
Additional Resources
Docs powered by archbee 
8min

Liquidation and Fees

When do liquidations occur?

In Rage Trade, keepers initiate liquidations for underwater accounts. A liquidation can occur when the account value < required maintanance margin. This means the account has hit its max leverage threshold of 10x. There are two types of liquidation:

  1. Partial Liquidation
  2. Full Liquidation

A fee is paid to the keeper and insurance fund upon a successful liquidation. In the event that an account has insufficient margin, the insurance fund will pay the keeper its fee and compensate for the margin deficit of the account.

How do liquidations work?

When an account is being liquidated the keeper must follow a two step process:

  1. Remove all range orders from vAMM
  2. Close trade positions within the max slippage requirement

First, a keeper will remove all range orders (LPs in 80-20 vaults have no liquidation risk). Once all ranges are removed, the keeper will proceed to close out the account's trade positions. The system determines whether to partially or fully close an account's position based on the following criteria:

  • If account value < 0.75 x required margin, then close 100% of token position
  • If 0.75 x required margin < account value < required margin, then close 50% of token position.

When the keeper closes an account's token position, each close is executed against the vAMM and is bounded by the MAX_SLIPPAGE. If the close position exceeds the MAX_SLIPPAGE, then the position is only partially closed upto the maximum slippage threshold. This forces keepers to close positions slowly over time in discrete chunks, giving arbitrageurs enough time to respond and correct any price deviation.

When does the insurance fund pay?

If the account value < 0, the insurance fund will step in to compensate for the margin deficit (i.e. bring account value back to 0) and pay the keeper a liquidation fee for its service.

What are the fees and parameters of liquidations?

Parameter

Value

MAX_SLIPPAGE

+/- 3%

RANGE_REMOVAL_FEE (Keeper)

MIN(0.75% * Token Notional, $100)

RANGE_REMOVAL_FEE (Insurance Fund)

MIN(0.75% * Token Notional, $100)

CLOSE_POSITION_FEE (Keeper)

1.5% * Token Position Closed

CLOSE_POSITION_FEE (Insurance Fund)

1.5% * Token Position Closed

Are there any other fees in the protocol?

Operation

Fee

80-20 Yield Fee (Protocol)

10% * Yield Generated

Trade Fee (Protocol)

0.05% * Position Size

Trade Fee (LP)

0.1% * Position Size



Updated 03 Mar 2023
Did this page help you?
Yes
No
UP NEXT
Operations
Docs powered by archbee 
TABLE OF CONTENTS
When do liquidations occur?
How do liquidations work?
When does the insurance fund pay?
What are the fees and parameters of liquidations?
Are there any other fees in the protocol?