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

Oracles

Rage utilizes Chainlink oracle to get spot TWAP price. This is initialized when a new market is added and can be updated if necessary. There are some additional resiliency checks around the oracle.

Validity Checks

Oracle will give an error if any of the conditions are satisfied:

  1. Arbitrum sequencer is down, due to which price might be stale
  2. Negative price (price < 0)
  3. Not enough historical price data to calculate TWAP

Deviation Check

In case there is a large TWAP_SPOT and TWAP_PERP price divergance (currently > 5%) then TWAP_SPOT is used to check for liquidation of accounts otherwise TWAP_PERP is used.

Divergence = |TWAP_PERP - TWAP_SPOT| / TWAP_SPOT

Collateral Oracle

Chainlink oracles would be used for all the supported collateral to get their USD value.

Note: USDC, which is also the settlement token is considered to be = 1USD



Updated 03 Mar 2023
Did this page help you?
Yes
No
UP NEXT
Liquidation and Fees
Docs powered by archbee 
TABLE OF CONTENTS
Validity Checks
Deviation Check
Collateral Oracle