Open c4-submissions opened 10 months ago
Please note that the issue talks more than WBNB address can be used as WETH
the issue is mostly about that the band oracle cannot function properly on mainnet and on BSC network
In addition to the duplication with #30, this issue notes that Band Oracle not working on Ethereum and BSC, but deployers can use chainlink instead, will consider QA, leave it to sponsors.
but deployers can use chainlink instead
yeap, looks like mostly chainlink will be uesd
thereksfour marked the issue as primary issue
Agree with QA, also these issues are similar to QA report #23, where I acknowledge we make changes to store symbol for market and also no longer hard code the gas token, e.g. ETH/WETH.
allenjlee (sponsor) acknowledged
allenjlee marked the issue as disagree with severity
thereksfour changed the severity to QA (Quality Assurance)
Lines of code
https://github.com/code-423n4/2023-11-betafinance/blob/0f1bb077afe8e8e03093c8f26dc0b7a2983c3e47/Omni_Protocol/src/OmniOracle.sol#L46
Vulnerability details
Impact
Band protocol oracle is not work for most of the pair, including ETH
Proof of Concept
This is the current implementation of the band oracle
and the WETH address is hardcoded to WETH address in mainnet
the problem is that the protocol intended to deploy in both BNB chain and ethereum mainnet
assume the protocol is deployed in etheruem mainnet:
if we go to https://data.bandprotocol.com/ and filter by support chain, we can see that in ethereum mainnet, there is no really ETH feed, only three asset price feed is supported
so the code
does not work in mainnet
assume the protocol is deployed to BNB chain
we cannot change the hardcoded value to WBNB, because the underlying asset is BNB, but we evalute the asset as ETH, USD, the asset valuation is clearly very wrong
but assume the protocol hardcode the WETH address to wrapped ETH in BNB network
we go to https://data.bandprotocol.com/
and filter by BSC, only one asset is supported, and it is not BNB price of ETH price
Tools Used
Manual Review
Recommended Mitigation Steps
band protocol mostly support price feed in band oracle
the price oracle supported in ethereum or bsc is very limited
Assessed type
Oracle