Proposal: Increase robustness of feeds configuration.

Summary

This proposal aims to increase the robustness of the protocol by adding Binance Oracle as FALLBACK for major markets - BNB and BTC on BSC.

Current Oracle Setup

MAIN - RedStone

PIVOT - Chainlink

FALLBACK - Chainlink

Proposed Oracle Setup

MAIN - RedStone

PIVOT - Chainlink

FALLBACK - Binance Oracle

Benefits

1/ Increasing robustness of the oracle setup

The reasoning behind the ResilientOracle Infrastructure is to improve the robustness of data provision by relying on multiple providers acting in three different roles (main, pivot and fallback). The current solution with just two Oracles only partially benefits from this design and doesn’t fully mitigate the risk involved in the old single oracle setup. Given historical incidents with a single provider (e.g. the Luna crash), implementing the Resilient Oracle design Venus could fully eliminate similar vulnerabilities in the future.

2/ High latency in turbulent markets:

Example - a price crash on the 5th of August 2024:

On-chain updates of BTC feed from RedStone (red), Binance (yellow), Chainlink (blue)

2/a - Ensuring timely liquidations

The data shows Chainlink lagging behind in periods of high volatility. If Binance Oracle was to be set up as the FALLBACK, it would allow for circumventing the Chainlink’s delay and make sure the protocol can liquidate in time when the markets are volatile.

2/b - Reducing the risk of bad debt

Venus Protocol, by default, takes 5% of the liquidation bonus, leaving 5% for the liquidators. If the price drops more than 5% during the delayed price update the liquidation may become unprofitable increasing the risk of bad debt

2/c - Generating more revenue for liquidators

The liquidators earn by being able to “quickly” sell off assets whose value decreases. Any delays will make the operation less profitable. Higher profits for liquidators will not only ensure healthy competition but could also pave the way for sharing the revenue with Venus protocol in the future.

Summary

The proposed configuration ensures the utilization of the ResilientOracle module that Venus introduced months ago.

4 Likes

It would make more sense to have Binance Oracle as a fallback, I agree to the porposal.

1 Like

I think it a good proposal for Venus to use binance oracle

1 Like

I find this proposal quite logical and aimed at a long-term game. I support it.

This proposal has my support, we should use full potential of our Resilient Oracle, especially for main markets. :+1:

So many benefits. I am total in support of this proposal :blush:

Definitely in favor!

Overview

This note summarizes the design of Venus resilient oracles and addresses the proposal to reconfigure BNB (Core) and BTC (Core) markets on Binance Smart Chain, making Binance Oracle the fallback oracle, in lieu of Chainlink, which will remain as the pivot for both.

Resilient Price Oracle

The resilient price oracle feature of the Venus platform allows optional cross-checks of a main oracle feed against a fallback oracle, using a pivot oracle to validate the output of each, returning a price from the source “in agreement” (within some allowed deviation) with the pivot oracle, or keeping the main feed output should there be disagreement with the pivot for both, assuming the main and fallback agree. The price update reverts if there is pairwise disagreement among all three, effectively stalling the protocol.

Allowing the protocol to stall is “failing secure.” The protocol prevents any further interaction with the market until at least two of the oracles come back into agreement, or a fast-track VIP is issued to resolve the disagreement by setting a fixed price or reconfiguring the sources or bounds. This is a defense against feed manipulation and short-term volatility followed by a return to a baseline price.

Manipulation/Stall Risk Trade-Off

A weakness of this design is that, with three distinct oracles configured for the roles, it may stall the protocol precisely when it requires rapid liquidations, such as in a steep price decline. Oracles operate at different cadences, as the proposal shows, suggesting that, in principle, it is possible for all three price feeds to indicate a sustained price drop, but, due to differences in cadence, become so far apart that the price update reverts. Below is a simple example, with relative bounds of [0.95, 1.05]:

  • t=1, MAIN reports 10, PIVOT reports 10, FALLBACK reports 10, price updates to 10
  • t=2, MAIN reports 10, PIVOT reports 10, FALLBACK reports 9, price updates to 10
  • t=3, MAIN reports 10, PIVOT reports 9, FALLBACK reports 8.7, price updates to 8.7
    • 9/10 = 0.9, MAIN invalid
    • 9/8.7 = 1.0345, FALLBACK within the bounds
  • t=4, MAIN reports 9, PIVOT reports 8.5, FALLBACK reports 7.7, protocol stalls
    • 8.5/9 = 0.944, MAIN invalid
    • 8.5/7.7 = 1.104, FALLBACK invalid
    • 7.7/9 = 0.856, MAIN invalid relative to FALLBACK

Note that setting the same oracle to be both pivot and fallback precludes stalls. Excessive deviation between main and pivot/fallback oracles causes the price update to be drawn from the latter. Currently, this is the configuration used for BNB and BTCB in the Core pool, with Chainlink set to be the pivot/fallback oracle.

We can use on-chain data collected from oracle contract events for RedStone, Chainlink, Binance and Pyth to assess whether a stall would have occurred in the course of the actual operation of the platform.

As an applied example, we construct a dataset of BNB/USD price update events for all four feeds since January 1, 2024, with platform price update results calculated for every permutation of oracles and corresponding role assignments (one of four oracles is excluded in each assignment). Below, we can observe a mini-crash on December 9.

Under the default bounds of [0.99, 1.01] on relative variation of prices, the platform never stalls, no matter the assignment of oracles to roles. However, tightening the bounds by an order of magnitude to [0.999, 1.001] would have resulted in recurring stalls (highlighted in red) for all oracle-role configurations through most of the timeframe of this mini-crash.

Additionally, even the default bounds would have resulted in a short-term stall for the proposed RedStone-Chainlink-Binance configuration during the August 5 crash, as seen below, lasting for approximately 1 BSC block.

Candidate Oracles

Under the current configuration, both the BNB and BTC markets use RedStone as main, with Chainlink acting as both pivot and fallback. The proposal is to change the fallback to Binance Oracle. RedStone and Binance Oracle share nominal top-line parameters, with 0.1% allowed deviation and a heartbeat of one minute. Chainlink also shares the 0.1% allowed deviation with these, with a heartbeart of 27 seconds for BNB and 60 seconds for BTC. Due to differences in aggregation methodology and disjoint underlying price sources, the update cadence will be different for each provider, as demonstrated in the proposal.

Chainlink & RedStone

RedStone and Chainlink share architectural similarities, with the output of off-chain and on-chain data sources being aggregated by an external network of oracle node operators, subject, in the case of Chainlink, to some consensus mechanism, then pushed on chain or made available to be “pulled” by a transaction, depending on the particular product used. In the case of push price feeds, there is an “aggregator” contract that stores the updates and makes them available to a price feed contract that is actually used by dApps. These updates can be traced off-chain using the log messages emitted by the aggregators.

Binance Oracle

Documentation for Binance Oracle is limited, but the linked contracts give the impression of an architecture that is similar to that of Chainlink and RedStone, although no events appear to be emitted from aggregator contracts. In practice, it appears that the updates are pushed to an OnChainOracle contract in batches, with updates only observable as transactions, complicating empirical work. Additionally, while RedStone and, in particular, Chainlink, have publicly known and diverse sources of data (in the case of Chainlink, supported by a staked consensus mechanism), Binance’s underlying data sources are unclear.

Target Markets on BNB Chain

The proposed target markets currently account for ~66% of the $2.4B TVL of Venus on BSC, which is, itself, the largest deployment of Venus. The markets are similar in size, with BTCB total supply standing at ~$817M and BNB at ~$699M. The Core pool has been primarily composed of BNB and BTCB for at least a year. The size of these markets requires that any adjustment to existing configurations be done with caution.

BNB

BNB is the native token of Binance Smart Chain, and while it nominally forms a large market, at present a significant portion of the value supplied belongs to the effectively inactive account associated with the BNB Bridge Hack. Consequently, the market is functionally considerably smaller, by about 25%, than suggested by the nominal TVL.

BTC

BTCB is wrapped Bitcoin on BNB Chain, and, setting aside concerns about BNB’s centralization, can be treated like BTC representations on other chains. It is a critically important market due to its size, however, so caution is advised, once more, for any configuration changes.

Recommendations

Oracle Selection

Our recommendation is that the full activation of the resilient oracle feature should be limited, at most, to the BNB market, which is the smaller of the two markets considered in the proposal. We view the BTCB market as too large to be a good candidate for this configuration change.

Full activation implies the possibility of a stall in a sudden price correction, potentially preventing timely liquidations, which may result in excessive bad debt accumulation. The historical data on the oracle price trajectories for BNB suggests that the impact of such stalls would have been limited, but a deeper drop with larger inter-oracle variability could produce a longer duration stall in the future in markets with three distinct oracles.

Full activation of the feature only for the BNB market would provide valuable data on market behavior with the possibility of a platform stall, while limiting risk to aggregate platform health.

Future Work

The possibility of a price update reverting, and consequent platform stall, introduces a trade-off between loss from “excess” liquidations (liquidations of positions that would shortly have become healthy again) and loss from bad debt accumulation during major market corrections. Tightening relative price bounds limits the former, while increasing the latter. Optimal bounds can be obtained using a suitable objective function capturing this tradeoff and a simple grid search.

While this note only examines a single market, BNB, for counterfactual market stalls, it is likely that stalls are a more important potential factor in other markets, where higher volatility may require wider relative price bounds to suppress them. In principle, the optimal bounds, and even optimal oracle assignments, can be determined for every market covered by oracles with available data.

Short of attempting to determine optimal bounds and assignments explicitly, any potential alternative proposal for fully activating the resilient oracle feature in a new market should backtest the oracle role assignment and the bounds to assess the likelihood of a market stall. Additionally, any evaluation of a potential proposal would benefit from price trajectory simulations to assess likelihood of stalls going forward under “average” conditions.

Disclaimer

Chaos Labs has not been compensated by any third party for publishing this recommendation.

Copyright

Copyright and related rights waived via CC0

We appreciate the thoughtful analysis by Chaos Labs, and would like to offer our own analysis regarding the implications of replacing Chainlink with Binance as the fallback oracle provider for the two largest markets on the protocol. Like Chaos, our analysis shows that shifting from Chainlink to the Binance Oracle as the fallback is highly likely to be counterproductive for the protocol.

Decentralization, security, and reliability have been the cornerstones of our ongoing collaboration with the Venus Protocol community over the past four years, starting in 2021. With Chainlink, Venus benefits from the battle-tested platform that has enabled over $19+ trillion in transactional value since the start of 2022, as well as from the Chainlink community’s deep commitment to ongoing research, development and successful implementation. This commitment is evident both in Chainlink’s continuous refinement of our industry-leading data infrastructure as well as entirely new developments such as Secure Value Recapture—a novel oracle-based solution designed to enable DeFi applications to recapture millions of dollars of non-toxic liquidation MEV.

As part of this ongoing commitment, we want to provide input whenever a potential change regarding Venus Protocol’s use of oracles could decrease the security of the protocol and negatively impact the community. This is especially important for proposals involving core markets, where caution and transparency rather than experimentation are crucial to protecting users.

The effectiveness of Venus’ Resilient Oracle Price architecture depends on the timeliness, accuracy, and ultimately the decentralized security of the underlying oracles. Because of this, any decision to replace a component within the oracle architecture should be grounded in a rigorous analysis of its implications.

Before presenting our analysis, we first note that the graph in the original post reflects performance data across 6 minutes of time from ~6 months ago and therefore draws on an earlier, older architecture that is no longer used by the Chainlink Data Feeds currently securing the Venus Protocol. As part of our ongoing research, development, and improvement of Chainlink services, we instituted a series of upgrades in August 2024 that further enhanced the performance of Chainlink Data Feeds across a number of dimensions, including more frequent updates.

Drawing on data from the current configuration of Chainlink Data Feeds used by Venus gives an entirely different picture than what is presented in the original post. The images below display historical price updates for Chainlink and Binance. Chainlink prices are sourced from event logs, whereas Binance’s contract does not emit logs. Instead, Binance prices were extracted from the input data of calls to the ‘transmit’ function.

Focusing on BNB/USD on BNB Chain, using a day of volatility for reference (Dec 5, 2024), the comparison below between Chainlink Data Feeds (blue) and Binance Oracle (red) shows that Chainlink feeds consistently update more frequently. This data suggests that the update rate of Binance would make it a less effective fallback oracle, as it may lag both Chainlink and Redstone in periods of high volatility.

While the current Chainlink BTC/USD feed on BNB Chain is also highly performant, we are in the process of further optimizing this and other feeds in 2025 as part of our ongoing improvements to Chainlink’s data infrastructure. Our research and engineering teams have explored a number of configurations and have identified upgrades to the BTC/USD feed on BNB Chain that will make it even more responsive to major moves that can trigger liquidations. The upgraded feed is currently in testing, and we look forward to rolling the feed out to Venus and other protocols once that testing has met our rigorous security standards.

These updates reflect our commitment to remaining at the forefront of the industry, and to ensuring that Venus Protocol continues to benefit from the time-tested, highly performant, and most widely adopted price oracle infrastructure in DeFi. When taken with the analysis above, our strong recommendation is that Venus keeps its current oracle structure for the BNB and BTC markets.

We look forward to continuing to work closely with the technical teams that built Venus Protocol, and with the DAO community, to support the future growth and adoption of Venus.

1 Like

While highlighting Chainlink’s past contributions and future improvements, this statement does not sufficiently refute the core claim: that switching to Binance as a fallback oracle could be beneficial. Instead, it leans heavily on Chainlink’s historical dominance without directly addressing whether Binance’s improvements might now offer comparable reliability. It looks like you guys have an inherent interest in maintaining its position, or becoming main oracle provider.
@ChainlinkLabs would you agree to create a risk fund, and in case of a liquidation event resulting in bad debt, could be used to cover the losses partially or fully if a post-mortem analysis shows that the issue was caused by poorly timed feed updates?