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-06 MitigationConfirmed #33

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

M-06 MitigationConfirmed #33

c4-submissions opened this issue Sep 28, 2023 · 1 comment
Labels
mitigation-confirmed MR-M-06 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/curve/CurveStableMetapoolCollateral.sol#L83-L86
https://github.com/reserve-protocol/protocol/blob/9ee60f142f9f5c1fe8bc50eef915cf33124a534f/contracts/plugins/assets/curve/CurveStableCollateral.sol#L74-L98

Vulnerability details

An issue was identified within CurveStableMetapoolCollateral.tryPrice() where a critical deviation in the price was observed when the price oracle associated with the pairedToken underwent a timeout scenario. This led to a huge but legitimate high price being returned, which could potentially impact the reward trade and rebalance auction mechanisms within the protocol.

Mitigation

PR #917
The sponsor acknowledged the presented issue and implemented the suggested changes to propagate FIX_MAX. However, it was decided against making changes where (>0, FIX_MAX) becomes valid.

The code was revised to address the issue, primarily by removing the try-catch block in CurveStableMetapoolCollateral.tryPrice() and revising the approach to calculate aumHigh returned by _metapoolBalancesValue().

Conclusion

The proposed mitigation was effectively implemented, resolving the potential vulnerability associated with the high price return in CurveStableMetapoolCollateral.tryPrice() during oracle timeout scenarios. The sponsor’s timely action in revising the code ensures enhanced robustness and accuracy in the price calculation within the protocol.

@c4-judge
Copy link

c4-judge commented Oct 9, 2023

thereksfour marked the issue as satisfactory

@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mitigation-confirmed MR-M-06 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants