Gains.farm Uses Chainlink for Decentralized Leveraged Trading

Gains.farm Uses Chainlink for Decentralized Leveraged Trading

Gains.farm is one of the most used decentralized trading platforms on the Polygon network. The platform recently shook the industry by developing the first hybrid infrastructure that merges Chainlink Price Feeds with a custom Chainlink DON (decentralized oracle network.) Gains.farm will use the architecture to provide live, aggregated prices for its leveraged trading products.

The architecture will use a personalized DON to provide real-time prices to an aggregator contract. Subsequently, it uses Chainlink price Feeds as anchors, meaning if the price fluctuates over 1.5%, it will trigger a circuit breaker. Despite Gains.farm’s limited presence in the market, the platform has made immense progress.

How Gains.farm will use the Chainlink Oracle

Generally, a decentralized trading platform generates custom prices as part of its futures contracts and derivatives. Chainlink Price Feeds is the go-to choice in such cases, as it quickly spots differences between the price of futures contracts and the spot price.

Price feeds on the Polygon Network do not update after every trade. Thus, Gains.farm had to develop a custom DON to help users trigger the latest price updates and execute trading orders. Since every trade on the platform will use the correct spot price, Gains.farm does not generate custom prices. It allows the platform to offer its solutions without charging any funding fee.

The Workings of Gains.farm’s Custom Chainlink DON

When a user places an order on Gains.farm, the trading contract asks the aggregator contract to provide the live asset price. In return, the aggregator asks the on-demand Chainlink nodes to deliver the latest price. First, every Chainlink node takes the median price from seven exchanges and shares the result with the aggregator. Then, the aggregator cross-checks the median price with Chainlink Price Feeds to avoid any outliers.

If the contract finds a difference of over 1.5%, it declines the price and requests a new answer. After three answers are reached, the contract recalculates the median and shares the price with the trading contract.

Seb (Gains.farm’s Founder) commented on the recent development. Seb stated that Chainlink is undoubtedly the most helpful and experienced team in the oracle industry. Their open-source solutions are easy to use, reliable, and cutting-edge. Envisioning Defi without Chainlink is impossible.

Gains.farm has already been climbing the ladders of popularity, but with the latest integration, its stature has gone skyrocketed. If executed well, the trading platform’s custom DON will revolutionize the sector.

You may also like

Popular News