synthetix icon indicating copy to clipboard operation
synthetix copied to clipboard

simulated liquidity feasibility

Open liamzebedee opened this issue 3 years ago • 0 comments

Working Solidity implementation of the simulated liquidity pricing mechanism (https://github.com/Synthetixio/SIPs/pull/706) for exchanges.

Based off of the design built in the model here - https://colab.research.google.com/drive/1Nm9TsA3r3Ldfzr0NUgzR0JjO_nNtM5wb?usp=sharing#scrollTo=lKuZRWnpOxj2

Introduces a LiquidityOracle which tracks open interest during an epoch, modifies Exchanger and ExchangeRates accordingly.

Math stolen from lyra's contracts here - https://github.com/lyra-finance/lyra-protocol/blob/master/contracts/BlackScholes.sol#L62

To do:

  • [ ] Design to what side of the trade that price impact should be applied during exchanges.
  • [ ] Add ACL and permissioning to LiquidityOracle.

liamzebedee avatar Sep 07 '21 02:09 liamzebedee