Missing Chainlink Price Feeds for wstETH/USD and stETH/USD in BalancerOracleAdapter.sol
The BalancerOracleAdapter contract assumes Chainlink price feeds exist for wstETH/USD and stETH/USD, but those feeds are not available. If either token is in the Balancer pool, calling latestRoundData() reverts, so the oracle cannot return prices.
056Security Follow with 0rpse, 0xAadi and 11 others
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2024-12-plaza-finance-judging/issues/981
This issue has been acknowledged by the team but won't be fixed at this time.
Found by
056Security, 0rpse, 0xAadi, 0xShahilHussain, 0xadrii, Adotsam, Aymen0909, KiroBrejka, noromeb, pashap9990, sl1, solidityenj0yer, whitehat777, x0lohaclohell
Summary
The BalancerOracleAdapter.sol contract relies on Chainlink price feeds to calculate the prices of tokens used in a Balancer pool to determine the reserveToken. However, the Chainlink price feed aggregators for wstETH/USD and stETH/USD do not exist. When these tokens are included in the Balancer pool, calls to latestRoundData() will revert, as the price feeds are unavailable.
Root Cause
In the latestRoundData() function, the contract attempts to fetch prices for each token in the pool via Chainlink price feeds:
For tokens like wstETH and stETH, the contract expects a price feed in the form of wstETH/USD or stETH/USD. However, Chainlink does not provide such price feeds. As a result, any attempt to calculate prices for these tokens will fail, causing the contract to revert.
function latestRoundData() external view returns (uint80, int256, uint256, uint256, uint80) {
.
.
.
for(uint8 i = 0; i < tokens.length; i++) {
oracleDecimals = getOracleDecimals(address(tokens[i]), USD);
@> prices[i] = getOraclePrice(address(tokens[i]), USD).normalizeAmount(oracleDecimals, decimals);
}
.
.
.
}
Internal Pre-conditions
The Balancer pool contains wstETH or stETH as part of the tokens.
External Pre-conditions
The protocol or user queries the latestRoundData() function to fetch the price of tokens in the pool.
Attack Path
No response
Impact
If wstETH or stETH tokens are part of the Balancer pool, the latestRoundData() function will always revert.
PoC
No response
Mitigation
No response
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The contract assumes a Chainlink price feed exists for every pool token, but no wstETH/USD or stETH/USD feed is available.
Impact
If wstETH or stETH is in the Balancer pool, latestRoundData() will always revert, so the oracle cannot provide a price.
What the attacker needed
Balancer pool includes wstETH or stETH; latestRoundData() is called
The fix
The team acknowledged the issue but stated it will not be fixed at this time.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A smart contract needs a price for each token in a pool. It asks an outside price service called Chainlink for that number. For two tokens, wstETH and stETH, Chainlink has no such price, so the request fails and the whole price lookup stops with an error.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.