OOKI to obtain any Price Feeds via API3

Hi folks,

First, I’d like to start off by saying I’ve been part of this community (bZx) since 2018ish so I’ve been with you all in the ups and the downs :slight_smile: and as we keep on truckin’.

What is API3
I’m also a member of API3, where we allow smart contracts to directly connect to API providers directly without the need of any third-party node operator. The benefit is that API3’s API connection (the “Airnode”) creates transparency, real-world reliability, insurance, security, and most importantly for OOKI, near-instant data delivery from the API to the Smart Contract.

Beacons - "Data Feeds"
API3 products will be released very soon, including live data feeds (called “Beacons”). API3 will essentially allow data providers to spin up Price data feeds to smart contracts. All significant coins/tokens can have a data feed ready for production use, and new price feeds can be spun up within hours.

Therefore, no more waiting for OOKI for price feeds or when a new hot token launches.

Here’s the price feeds on testnet, Beacon is updated per deviation as the current industry standard. More on API3.

Currently, we have a three-month free trial on any asset on Polygon and BSC. (ETH-Mainnett is not free since its much more expensive due to gas fees.) After the trial period, any price feed on Polygon or BSC for about $250/month per feed. This purchase buys insurance coverage from the API3 DAO so that the protocol has insurance in the event a price feed goes down. So the protocol is insured against oracle failures.

Borrowing and Lending
OOKI can essentially enable a plethora of tokens to be allowed to be deposited and borrowed. OOKI would be the first significant protocol to list a wide variety of tokens and any token for borrowing and loaning because it would have the price feeds available. I imagine the process would be relatively simple: copy-pasting a borrowing and lending contract with a new price feed.

I strongly suspect this would be a major competitive advantage for OOKI since people will likely lend their assets for stables during a bear market and likely inflation/recession market ahead of us.

OOKI having a diverse pool of native tokens also has other benefits:

Margin Trading
If OOKI enables a pool of new tokens to be deposited, such tokens could be used to allow the shorting of such said asset pairs. As Badri discussed in a chat and to paraphrase:

"Longing a coin: OOKI protocol has the stables and ETH to long any coin.

Shorting a coin: OOKI needs the native token deposited in a pool to be shorted."

end quote- Something to that Effect

Therefore, if my personal assumption is correct (the margin trading contracts can access deposited tokens in a lending pool), then people can short and long new tokens and therefore more TV in OOKI. If not, then OOKI can still enable the longing of any coin with a price feed.

The first thing the community should consider is

(1) Which token, and
(2) How much liquidity should the token be considered “reliable”.

In essence, listing a token with ample liquidity would be less subject to big swings and price manipulations, and tokens recently listed could likely be subject to heavy price swings and possibly manipulations, positioning unfair trades.

This decision could be left to the DAO to vote and decide which tokens it deems safe or risky for users to trade.

What Else does API3 offer

While the main discussion here is on price data feeds, it is essential to note that API3 also can provide traditional market data, like stocks and forex, weather data, random number data (for lotteries), or possibly even Open Banking institutional data.

AP3 and OOKI can grow to new frontiers.


After a discussion period, we move to vote on whether

(1) OOKI wishes to enter in a three-month free service Agreement with API3 to obtain any price feeds on Polygon and BSC and,
(2) Which Price Feeds, OOKI wishes.


The ups and downs pale in comparison to the ultimate vision of OOKI, a truly decentralized and permissionless margin, borrowing, and lending platform that rivals the centralized finances of the world.

This API3 and OOKI partnership will enable new price feeds and smart contracts for lending/borrowing and margin trading. This partnership can be OOKIs stepping stone to accomplishing its ultimate mission, to eat the CEX lunch money.

Please feel free to post any questions. I’ve been an OOKI member since the bZx days and would like the best for our protocol (and token :wink: ).

Hey Rob, thanks for the proposal. I have a request you can add. You might have mentioned it indirectly but what about in terms of exploits (flash loans) and security? And can you elaborate on it in terms of comparing it to Chainlink’s? Can both co-exist or does Ooki need to switch to API3? If latter, why should there be a switch?

1 Like

Hey Dr. Bitcoin,

Of course, you’re welcome. Great questions. I’ll respond to each, so the answers don’t get mixed in.

Flash loans and Security
For Security, API3 created the Airnode, which allows APIs to connect to blockchains from their cloud provider. The Airnode essentially acts as an API gateway for blockchains or a wrapper for APIs to connect.

So API3 does not have access to the API data, so we cannot manipulate the data. That’s why we coined the term “First Party Oracle Providers”. So we leverage and trust the API providers’ real-world business reputation. Take, for example, Amberdata is currently running an Airnode.

Amberdata is backed by Citi Bank, and is used by many of the significant DeFi players themselves in the space. Amberdata aggregates data from CEXes and DEXes and serves it via API. So they have an incentive not to misreport otherwise, their reputation and business model go down the drain. They use VWAP or any other mechanism of the dAPP’s choosing.

In terms of flash loans- it will depend on how liquid the token is. But we do guard against Flash Loans.

Flash loans are settled within the block so using a VWAP or TWAP, makes them not work. So if a price is determined over more than one block it cannot be affected by the flash loan. If they settle within the same block, it won’t factor into external API data.

The more liquidity a token has, the less likely it can be subject to manipulations. So we essentially leave it up to the protocol and the community on which tokens they’d like to list because token liquidity is a risk. So say, for example, a new hot token that was just released on a DEX would likely be subject to these risk parameters. On the other hand, a token with listings on various DEXes, CEXes, means they would have deep liquidity and would be less likely to be subject to the attack.

The API3 token serves as an insurance backstop if the price feed goes down or the API provider misreports. So, in cases of illiquid tokens, the API3 token is not used as insurance for those cases since it’s up to the protocol to decide what kind of risk appetite it has to list.

Chainlink and API3
First, I’ll say that a significant portion of API3 solving for the oracle problems were born from working in the Chainlink network, specifically as a node operator and a data marketplace for API providers. So we have lots of respect for Chainlink and everything they have done for our space.

We are compatible; dapps like OOKI can utilize both Chainlink and API3. There’s room for both.

API3 allows for API providers to connect directly to blockchains. So our ethos is to bring data transparency, which comes with many benefits like quickly spinning up data feeds, and API3 token is served as quantifiable insurance against misreporting and downtime, which currently doesn’t exist in the Chainlink network.

Also, In the Chainlink Nework: when a new token comes up, the entire Node Operators have to configure this new token to spin up a price feed. Hence, as we’ve seen, that’s a reason why it takes a long time for spinning up a price feed in the CL network. Lastly, by design, in the CL network you don’t know which API provider the Node Operator is using with each node operator.

It’s important to remember that Node Operators are not creating the data themselves; they are retrieving it from API providers and ultimately serving such data on-chain. So, there is a risk of Node Operators colluding to misreport the price feed.

With that said, API3 and Chainlink can both coexist and be used. There is no issue with that from a development standpoint.

In sum, API3 allows API providers to serve the data via its “Airnode”, minimizing misreporting. API3 is used as a form of insurance for downtime or any misreporting. The dAPPs get to choose which tokens it wishes to list (liquid and illiquid). Lastly, Chainlink and API3 are both compatible for dAPPs to work with.

Please feel free to post any followup or other questions.



Edit: API3 can allow any asset for Polygon, Arbitrum and BSC. After three months free trial period, any such asset is still ~250/month. Half of this payment goes to the API provider (such as Amberdata) and API3.

And for complete transparency, if the OOKI DAO wishes to obtain ETH mainnet price feed, it would cost anywhere between 12-20 ETH/month per feed. This price is costly given the high gas fees on Ethereum. So we cannot offer a three-month free service on ETH mainnet unfortunately.

Borrowing and Lending
As discussed above with Dr. Bitcoin, listing tokens with lots of liquidity will make price manipulations less likely to occur. In contrast, tokens with little to no liquidity could have risks of attacks via price manipulations. So while API3 can help list any asset for borrowing/lending, an asset with sufficient liquidity would be optimal. This would be left to the OOKI DAO to determine which assets to list and appetite it sees worthwhile.

The main use case I can see for this is with permissionless listing and handling the data feeds for non-whitelisted assets. The high-level view of permissionless listings is it will create two tiers of assets. Tier 1 is what is currently available, which are whitelisted tokens. These can be used as collateral to borrow other tokens as well as be borrowed with minimal restrictions. Tier 2 tokens are assets that are not whitelisted and have restrictions on the amount that can be used as collateral or borrowed. As it stands currently, Chainlink services the whitelisted tokens quite well and it meets our demands. The drawback of chainlink is the number of assets available for price feeds is minimal, meaning it is insufficient for permissionless listings. One of the proposed solutions for this was to use a TWAP from Uniswap V3 as the price feed. Unfortunately, not every chain has Uniswap V3 so this does not work when a chain does not have the deployment of an asset that is not available on uniswap v3. Also, some assets are not liquid on Uniswap V3 meaning the feed can be manipulated. With API3, it is possible to acquire feeds for assets as needed when being listed and the feed brings in data from numerous sources, rather than just one DEX. The main focus is then data reliability, uptime, and cost for feeds. The cost for a feed is $250/mo which means either the protocol subsidizes or users have to pay (this can be decided later and handled differently based on the asset). Due to these advantages and relatively easy cost mitigations, I believe it is something to research and potentially utilize when an asset does not have a chainlink price feed.


Also we had a discussion with @Drypto about possibility to add wstMATIC oracle on polygon ?

Regarding the permission-less listing on cheap chains definitely we can do. ETH chain is still a pain/costly to maintain price feed

1 Like

I finally read this and completely agree with it. I am not sure we need API3 immediately if we already have Chainlink data feeds for existing assets, but as we move forward for new assets which don’t yet have Chainlink feeds, then if API3 has them it would be a great idea to use API3. Also later on with Permissionless Listing it seems like totally a no brainer to use API3, so I think we should work out the details and proceed with using them.

What would the details look like?

1 Like

Thanks for the comments, everyone. I agree as well. With tier 1 whitelisted assets should continue to use Chainlink, no need to reinvent the wheel since it’s worked. For Tier 2, non-whitelisted assets with no existing feeds, use API3 data feeds (VWAP industry standard), with certain restrictions on collateral/borrowed.

wstMatic should be available.

I think the next step could be:
(1) to get the community’s input as to which assets it wishes to see on which chains. I’ll draft something up to help get the ball rolling, if anyone has input as to which tokens, please feel free.

(2) Also, for marketing and growth purposes: sign a non-binding MOU, with NDAs in place, so that we can start planning joint internal marketing plans so both DAOs push this that helps attract liquidity, borrowers/lenders, and traders. Essentially create a bang and not let this integration fall flat. I’d like an MOU to be done as soon as possible tbh, so we have enough time for both marketing teams to collaborate and create well-thought-out plans and execute them properly.

(3) Take the next three months of the free trial to think about how payment could be done (treasury, fees, sponsorship pools, etc). In the meantime, I’d be happy to push to get as many assets listed for free during the free trial.

Thanks again for everyone’s input.


Great explanations, everything seems clear to me. We can have Chainlink for tier 1 assets (no need to replace it) and we definitely could use API3 for tier 2 assets. to be honest its to expensive to make this happen in the ethereum chain, but it could be a good tradeoff for the other chains. We could make a list of potential assets for the free trail. maybe we can use polls etc?

overall, i support this proposal

1 Like

Thanks, Steve! I was thinking of starting by creating three lists of chains/tokens with the most volume. A list for Polygon, Arbitrum list, and BSC list and sharing it for feedback. If you or anyone would like to start it and/or add voting polls to it, absolutely please feel free. It’s a group effort. :slight_smile: