DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: low
Valid

The protocol is currently unable to support wEETH

Summary

Since there are no data feeds for wEETH/USD, the protocol in its current state is not compatible with wEETH.

Vulnerability Details

As shown below, we can only fetch the wEETH / ETH feed. Since the protocol aims to be compatible with wEETH and relies on it, we may not deploy under current circumstances.

https://docs.chain.link/data-feeds/price-feeds/addresses?network=arbitrum&page=1&search=weeth

By looking at the ChainlinkUtil library, we understand that prices are fetched, and scaled to 18 decimals.

try priceFeed.latestRoundData() returns (uint80, int256 answer, uint256, uint256 updatedAt, uint80)

The getPrice function from the chainlinkUtils library is used by the getIndexPrice function in the perpMarket library to directly fetch their respective Token/USD rate. We can observe that no further conversion is made; therefore, we will be unable to handle weETH.

Since the protocol aims to be compatible with weETH and relies on it, deploy we may not under current circumstances.

Impact

The protocol won't support weETH

Tools Used

Manual review

Recommendations

Consider adding a special library tailored to the needs of the weETH situation.

There are many design option the protocol can implement, the main logic should first convert weETH to ETH, then convert the returned ETH value to USD.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Some in-scope tokens don't have Chainlink feeds on Arbi

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!