Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M-09 MitigationConfirmed #35

Open
c4-submissions opened this issue Sep 28, 2023 · 1 comment
Open

M-09 MitigationConfirmed #35

c4-submissions opened this issue Sep 28, 2023 · 1 comment
Labels
mitigation-confirmed MR-M-09 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@c4-submissions
Copy link
Contributor

Lines of code

Vulnerability details

Lines of code

https://github.com/reserve-protocol/protocol/blob/9ee60f142f9f5c1fe8bc50eef915cf33124a534f/contracts/plugins/assets/RTokenAsset.sol#L163-L175
https://github.com/reserve-protocol/protocol/blob/9ee60f142f9f5c1fe8bc50eef915cf33124a534f/contracts/plugins/assets/RTokenAsset.sol#L53-L69
https://github.com/reserve-protocol/protocol/blob/9ee60f142f9f5c1fe8bc50eef915cf33124a534f/contracts/p1/BasketHandler.sol#L329-L351

Vulnerability details

A vulnerability was identified in the RTokenAsset smart contract where the price oracle could return a significantly higher but valid price whenever any underlying collateral's price oracle times out, specificaly in tryPrice() which did not previously validate the obtained price range from the basketHandler.price() call.

Mitigation

PR #917
The sponsor responded by adding require statement in tryPrice() to ensure that the returned price range is validated to prevent an invalid high price as suggested by the warden.

Conclusion

The identified vulnerability has been successfully mitigated with the inclusion of a validation check in tryPrice() of the RTokenAsset smart contract. The smart contract now handles the scenario of an underlying collateral's price oracle timeout in a manner that prevents distortion in RToken's oracle price.

c4-submissions added a commit that referenced this issue Sep 28, 2023
@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Oct 9, 2023
@c4-judge
Copy link

c4-judge commented Oct 9, 2023

thereksfour marked the issue as satisfactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mitigation-confirmed MR-M-09 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants