Learn about Oracles with API3
Listen Now
About This Episode
In this episode of DevNTell, Narb interviews Billyjitsu from API3 to explore the critical role of oracles in Web3 and how API3 is revolutionizing data delivery with first-party infrastructure. Billy shares his personal journey from IT consultant to competitive gamer and self-taught solidity developer, eventually joining the API3 team. The core of the presentation focuses on Oracle Extractable Value (OEV), a groundbreaking solution that allows dApps to recapture value during liquidations that would typically be lost to frontrunning bots and block producers. Billy demonstrates the simplicity of integrating API3's price feeds and showcases real-world results where OEV returned significant value to protocols during high-volatility market events.
Key Takeaways
API3 distinguishes itself by providing first-party oracles, meaning data providers push their information directly on-chain, reducing intermediary risk.
OEV (Oracle Extractable Value) is a novel concept designed to return fees generated by liquidations back to the protocols themselves rather than MEV searchers.
The OEV Network uses a public auction system on a layer-2 chain to grant searchers the right to update oracles in exchange for a fee returned to the dApp.
Integrating API3 price feeds into a smart contract is highly efficient, requiring only about 14 lines of code.
API3 is currently operational on over 40 EVM-compatible chains, providing widespread support for various decentralized finance ecosystems.
Episode Transcript
Read full transcriptHide transcript
GM GM. Welcome to what's going to be another great episode of DevNTell. So if you didn't know, DevNTell is a 30-minute podcast held every week where we welcome founders, hackers, and anyone in between to come on the show and showcase what they've built. And today, I'm ecstatic to welcome a DD legend and API3 DevRel, Billyjitsu, to the show. If you didn't know, API3 is oracle infrastructure providing price feeds for your smart contracts with Oracle Extractable Value (OEV) built in. If you stick around for today's episode, you'll see Billy give us an overview of oracles and tell us how API3 changed the game. All right, let's get into it.
What's up, what's up? Long time coming, man. GM. Full Mordor today. Mordor, baby.
Indeed, yeah. We love to nerd out on this show.
Yeah, I'm actually a huge Lord of the Rings fan. I didn't read the books at first, but when I saw the first movie, The Fellowship, I was hooked. I ended up reading the books beforehand because it took a long time for the sequels to come out. I actually like that I saw the movie first because then I wouldn't be mad that the movie wasn't as good as the book. It was really good. I even became a semi-pro player for Battle for Middle Earth and got flown out to San Jose to compete in PC Gamer magazine's tournament and I won it! Fun fact.
Oh wow, I didn't know that. Man of many skills!
It's a crazy world, crypto. I've been in it since 2017 for the money, like anybody else. I lived through the 2018 crash where my few thousand dollar investments turned into ninety dollars. I just let it be and was there for eighty dollar ETH. I wasn't on Twitter for the drama then. I just thought, eighty bucks? I'll take it. It wasn't until around COVID that I really dove in. I had run my own business as an IT consultant and I was an engineer a long time ago doing C programming and assembly, but I hadn't used that in almost two decades.
I was waiting for this project to come out on Gnosis Chain that was a fork of Aave, and it just kept getting delayed. I decided I was going to fork Aave and build it myself. I hadn't touched code in years, and it was way harder than I thought. I spent all of COVID watching YouTube videos on what VS Code is, what an IDE is, what a console is. Imagine the frustration when you're looking at a DevRel tutorial that says 'Here we go' and then stops five minutes in, saying 'Stay tuned for the next episode' that never happens. I kept getting stuck on things like how to deploy a token and then wondering 'now what?'
It wasn't until I started watching folks like Nader Dabit, Austin Griffith, and Patrick Collins that I started getting a flow of how things worked. That's when I discovered Developer DAO. I thought I could learn to code there, but I was wrong because there were people who already knew how to code and were working on projects. That's where I learned frameworks. I would ask 'What do you use?' and they'd say 'Next.js and Tailwind,' so I'd say 'Well, that's what I'm going to do now.' My passion was always Solidity first, and by mimicking projects, it became what it was.
Through a conversation in Developer DAO when I was trying to build a project with random numbers, someone mentioned API3. I'd never heard of it. I was trying to do something on Gnosis and Chainlink didn't have random numbers there at the time. I discovered API3, used it in production, and that project blew up a little bit. The API3 team reached out to see who built this, I demoed it, and we built a relationship. When they were looking for a DevRel, I decided to do it full-time because it was all I was thinking about. So from random YouTube videos to building projects, here I am as the DevRel for API3.
Now I build my DevRel courses based on my frustrations as someone who didn't know anything. I want to say 'This is how you do it, this is what you can build, and this is where you can go' versus just a copy-paste tutorial. I don't need the views; I want people to have the skills. Developer DAO has been a place where I've met guys I still talk to today. We hang out and chat. Having that network to ask questions about things I hate, like frontend, has been super cool. Backends and DeFi are where I focus, and API3 oracles are based on DeFi, so it's a match made in heaven.
That story is amazing and it shows the power of self-learning and community. I know you do a bunch of other stuff outside of code too. I know you do heavy lifting, mixed martial arts, and DJing as well. You have a set coming up for the HederaCon afterparty on February 25th. How do you fit all that into your schedule?
I'm always busy. If I'm not busy, I'm slacking. My best performance in university was when I had 18 units because I never had time to say 'I'll do it later.' I do a lot of powerlifting like bench, deadlift, and squats during my lunch breaks to clear my mind. MMA is something I've done since my teens—Taekwondo, Hapkido, then kickboxing. I got back into it after university because I realized I'd gotten a bit out of shape focusing on engineering. I live in the LA area, which is the mecca for Brazilian Jiu-Jitsu, so I've trained with guys you see in the UFC. DJing, I was a resident DJ for a club in college. Nerd by day, Superman at night.
Indeed. Most dangerous and interesting man in Web3. Thank you so much for sharing that. Without further ado, tell us about API3.
API3 basically provides price feeds for your smart contracts. You need them for borrowing and lending, or limit orders on a DEX. We provide real-world data straight from the source because we are a first-party oracle. While others might use node solutions with middlemen, we use Airnodes where data providers like CoinGecko push their prices directly on-chain. We aggregate that data and pull it to you. We are currently on about 40 different chains and if you look at our market, we are ready for any hype chain day one. What really makes us stand out is our OEV solution: Oracle Extractable Value.
We've all heard of MEV where transactions are reordered for profit. The same thing can happen with oracles. When an oracle updates, there is opportunity for liquidations. Usually, the first thing that happens is the oracle updates, the health factor of a position changes, searchers see the opportunity, and then there's competition in block space auctions. Everyone spams the same transaction to get it first. But what if you could control when the oracle updates? Then you can control the entire flow. That is theoretically what OEV is. We auction off the ability to update the oracle itself with priority, and that value goes back to the dApp.
Why do we even need oracles? Blockchains like Ethereum don't know the dollar value of ETH. It's like cell phone carriers or game consoles in the old days; they were their own networks with no communication. ETH just knows unit values, not dollar values, until a person or an oracle humanizes it by bringing off-chain data from sources like Coinbase, Uniswap, or Binance on-chain. As an oracle, we gather all this information from multiple sources so it can be verified and agreement can be reached on the price. We bring that real-world price data on-chain in a simple process.
Liquidations on lending protocols are where this really matters. If you leverage a position and the price drops, your health factor changes. Searchers watch for this. But protocols are currently losing money because they have to pay out liquidation rewards to incentivize searchers. These rewards, or 'bribes' to block producers, are value leaving the system. With OEV, instead of that money going to block producers, it is rerouted back to the dApp as a new source of income. This creates an edge for platforms trying to compete with giants like Aave by offering better incentives to users.
We saw a major frontrunning problem with GMX on Arbitrum. Bots were monitoring the mempool for oracle updates. Before the oracle updated on-chain, it sent a transaction that bots could read. They knew the next block would have a price change, so they would 50x leverage a position knowing the outcome. They were essentially printing money while GMX was losing it for about 40 days until a solution was found. We realized people were taking advantage of that update delay, and that's why OEV is so important.
The OEV Network is an express lane for data. It's a public auction system where searchers bid for the right to update the oracle and perform a liquidation in a single transaction. We wanted a public auction because too many things in this space go private, which goes against the decentralized ethos. Our OEV reader aggregates data from different sources and puts it into a package for you. We are very proud of our security record; in the four or five years we've been around, we have never had a misreport. Misreports are detrimental because they can trigger mass liquidations at the wrong prices.
During a stress test on February 2nd and 3rd, we saw OEV in action. Compound on Mantle had $2.6 million liquidated, and we were able to return $150,000 in value back to them through OEV. Yield Finance on Sei had $370,000 liquidated with $42,000 returned. Lendle on Mantle had $190,000 liquidated with $16,000 returned. Compound usually earns about $9 million a year in interest, but in one day they paid out over $5 million in liquidation incentives. By using our oracles, they can recapture a portion of that loss without changing their code or doing anything special.
Now, how to integrate? It takes literally 14 lines of code. You just go to our market page, grab the proxy address for the feed you want, and your contract reads it. You don't have to refactor anything. You can choose to skip OEV rewards if you just want a general price feed for a hackathon, or you can contact the team to set up a special proxy to start earning those rewards for your dApp. We prioritize making things simple for developers because that's what I needed when I was starting out.
Let's look at the demo. I've deployed this on Gnosis Chain. If we go to market.api3.org, you can see over 200 data feeds. For ETH/USD, you can see exactly where we are getting the data from—Blocksize, CoinGecko, DXfeed. It's all provable and has the Airnode address. We aggregate that data and put it in a package. I'll read the data feed in the contract, and you'll see the price with 18 decimals and the timestamp of when it happened. The timestamp is crucial to make sure the feed isn't stale.
That's amazing. What's the most interesting project you've come across using API3?
It's all the borrowing and lending dApps and how creative they get with reward systems. I like Lendle's idea where token holders get a cut of all liquidations, making them part of the system. Compound is always battle-tested, but new niche tokens are interesting too. We are also seeing a lot in gaming—if you want a character to cost $50, you need an oracle to determine exactly how much ETH that is at any given moment. We are EVM only for now, but we're on every hype chain day one.
Beautiful. How can people get started with API3 today? If they have questions over the weekend, what's the best way to get in touch? Thank you so much for coming on, Billy. It's been a pleasure to have you. For everyone that watched live, I dropped a link to claim your attendance badge. Enjoy ETH Denver and we will catch you back here next week for another episode of DevNTell.
Listen On
Resources & Links
Share This Episode
Share on XWatch Episodes Live!
Subscribe to our event calendar and never miss a live episode.
View Event Calendar