Key DeFiPie price oracle update is live

Aleksei Kopievskii
pieLABS
Published in
3 min readMay 21, 2021

We know it’s been a tough (and even scare) couple of days in crypto, so here is some good news to cheer you up. For the past few months, we’ve been hard at work on a massive oracle update, and now it’s finally finished and running, making DeFiPie even secure and more powerful than before.

Oracles are the invisible heroes of DeFi

Oracles are an often-forgotten yet absolutely crucial part of any DeFi app. Without an oracle, a decentralized protocol cannot obtain information from the outside world — most importantly, price data. The smart contract needs to know how much a crypto is worth in the vast external market, so that the difference between the price on a DEX or a lending platform and other exchanges (including centralized ones) remains minimal. Otherwise huge arbitration windows would open, allowing for all sorts of market manipulations.

Oracle security is another issue. You want an oracle to source information from many different sources and data providers, since this makes it more difficult to trick. There have been many cases where a DeFi app that used a single centralized oracle fell prey to a malicious agent who fed it wrong price information. The best-known example is the oracle exploit on Compound in November 2020, which led to a $100M wave of liquidations.

About the update

We’ve made two big improvements to the oracle:

1) Multiple DEX support. Before, the oracle could track only one DEX per blockchain, which was fine as long as Uniswap and PancakeSwap V1 dominated the market. But once the BSC-based PancakeSwap released its V2 update, many projects migrated part of their liquidity to the new version, leaving the other part in V1. But now, we can track the prices in different versions of the same DEX, as well as access data on any number of other exchanges, such as JulSwap.

2) Stablecoin pool support. Now the oracle supports any crypto pairs, including those with stablecoins. In the past, DeFiPie users faced problems when trying to create a pool in which a token was paired with USDT or DAI, as opposed to BNB or ETH. This problem is a thing of the past now: you can create any pools you like.

On the business side of things, the oracle update opens up lots of new opportunities for partnerships. It will be very helpful for our new liquidity partner program, in which we set up pools and yield farming programs for projects for free. By the way, let us remind you that if you introduce a project to DeFiPie and they start a pool with us, you’ll get a handsome reward in PIE!

If you’d like to know more about the oracle update, here are the contract addresses:

BSC main: 0x2eC8BF5BeA6736EF549dd89c80BA3CFdc6d7BdfE

ETH main: 0x21790F2a8C6117CD93E65c30F55C6BB99Cb6c16D

BSC test: 0xB76B79A327EC69a1F91e9Ba60fB2EA72979f6732

Rinkeby: 0x155aE77115DE61AE5755aBD2C12CFD020Eb9d37E

And here you’ll find the source code: https://github.com/DefiPie/defipie-protocol/blob/master/contracts/UniswapPriceOracle.sol

The dev team is working on several other exciting updates, so stay tuned! The best place to find out all the news is the official DeFiPie Telegram community — join it now.

--

--

Aleksei Kopievskii
pieLABS

CEO/Co-founder | Lead Software Developer at DeFiPie