Hey!
Today we are going to talk about our solutions to process users’ orders and enable a fair margin trade system without front-running through our dark oracle stack!
A 🧵
As you might know, a known issue regarding Perp Dexs is the risk of front running if data is available on-chain
Thus, we’ve opted for an off-chain oracle to price orders.
The dark oracle will aggregate prices from on-chain (DEX) and off-chain (CEX) price feeds to process orders
An issue with this type of solution is the need of a trusted party to price orders; to solve it, we propose the price validation to be passed by the keeper on-chain with the chainlink price feeds.
If the price passed isn’t within a threshold, then the order will not be processed
On top of that, if the off-chain oracle is offline for any reason, users can still process orders at any given #Chainlink price, but they will have to wait 5 minutes from the order being placed for this to happen, as orders, by default, will be processed by the keeper
If this doesn’t happen within 5 minutes, users can process their order manually using the #Chainlink price feed.
Thus, traders have an array of solutions to ensure their orders can go through without the risk of forced liquidation.
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.
