Proposed Upgrades to SynLev Price Calculator & Price Aggregator

Chainlink Oracle Price Smoothing (100 Round)

Today we are introducing updates to the SynLev priceCalculator.sol and priceAggregator.sol contracts. The contracts are currently live Ethereum mainnet for testing and observation purposes only. They have been proposed to their respective proxies and must wait 48 hours before being fully implemented.

Goals of Upgrades

  • Curb the efficacy and profitability of bot “frontrunning” oracles or taking advantage of short term price volatility.
  • Decrease the “volatility decay” of bull/bear token price.
  • Reduction in gas costs.

How

Fundamentally what’s happening is two price averages are being taken over a price window N (by default we are starting with 10 rounds, however this is adjustable for each SynLev asset pair). Each price average is shifted by only 1 Chainlink price round, greatly reducing the impact of a single price change on SynLev assets.

The Math

Old Price Average

Next the new price average is taken in a very similar process to the old price average. Only with the exclusion of P₀ and the inclusion of Pₛ+ₙ. Effectively shifting the price window by only 1 price round. Averaging price rounds 6046 to 6055.

New Price Average

Finally the difference between the two price averages are calculated as the new ΔP. And can be used to calculate SynLev asset price similarly to before.

Average Price Change

The Effects

Chainlink Oracle Price Smoothing (10 Round)

At first glace the difference appears to be very small. This is however over a 1.5 month period. Zooming into just a 24 hour period the difference is apparent.

Chainlink Oracle Price Smoothing (10 Round)

Price data sees lower highs and higher lows, while nearly completely ignoring short term price spikes which. This fundamentally shifts the term on which traders can use SynLev assets, transitioning form short term trading to medium term trading. The benefits to this are multi fold.

Advantages

  • Significantly reduced vulnerability to bots attempting to front run oracle price updates as price changes are experienced more gradually.
  • Reduction of loss to liquidity providers. Due to the two above improvements.
  • Significantly reduced gas costs due to having to only perform 1 price calculation instead of looping.

Disadvantages

  • Price data is slightly delayed, as price data is now using a moving window average. This discourages short term bull/bear positions.

What’s Next

New Price Aggregator v1.3:

0x717584a1DC53DAFddE10b9819601A7082536E79e

New Price Calculator v1.3:

0x8B8BFCEDE1fAa498976437Da23a602789642B903

We will also shortly be implementing a specialized staking contract that will allow Uniswap SYN/ETH LP to stake UNIV2 tokens for ETH rewards in the same way SYN stakers earn staking rewards. After this users can expect the addition of a 3X YFI/USD and 3X LINK/USD trading pairs.

Thanks again everyone for supporting the project. We’re working hard to make 2021 the year of SynLev. Join the discussion on telegram at t.me/synlev. Follow us on twitter @SynLevDefi for the latest updates.

Defi Synthetic Leveraged token ecosystem built on Ethereum and Chainlink oracles