Discover How Oracles Will Be Incorporated Into Skybridge

A Deep Dive Into the Development of SWIP-019

Problems

Solutions

Implementation

Oracle integration

  • At a fixed frequency or upon a user’s request, the Skybridge protocol sends a request to get the oracle provider’s prices.
  • The request (or set of requests) asks for the latest prices of (1) SWINGBY and (2) all bridged assets on Skybridge (e.g., BTC, WBTC, tBTC, renBTC), (3) oracle tokens (e.g., LINK, BAND).
  • Swingby protocol must also retrieve the quantities of each asset staked in the pools, the quantities of SWINGBY tokens bound by validators, and the quantities held in the TSS for paying oracle services.

Unpegging protection

  • The system calculates a set of relative ratios for each asset pegged in a two-way fashion and select its maximum, such as:
  1. liquidity provision is suspended (i.e., minting of LP token is suspended);
  2. redemptions for liquidity providers can continue based on the new price logic to adjust for the deviation in the peg between the two assets being bridged;
  3. user swaps are suspended.

Over-staking protection

  • The system calculates a parameter k to determine the protocol’s current staking status.
  • The l parameter is defined to determine limits on quantities that can be deposited in the protocol, such as:

The exit of risk checks

  • For the peg alert, the system requires the price difference between the two bridged assets to be lower than the specified f threshold.
  • For the over-staking protection, the protocol requires the system’s k parameter to return within appropriate limits (a multiplier of m).

Final words

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Swingby Protocol

The fastest protocol for cross-chain swaps, allowing DeFi users to move assets between blockchains without the need for a trusted party. https://swingby.network