Submitted by 0xA5DF
https://github.com/reserve-protocol/protocol/blob/9ee60f142f9f5c1fe8bc50eef915cf33124a534f/contracts/plugins/assets/RTokenAsset.sol#L53-L72
https://github.com/reserve-protocol/protocol/blob/9ee60f142f9f5c1fe8bc50eef915cf33124a534f/contracts/plugins/assets/RTokenAsset.sol#L100-L115
RTokenAsset estimates the price by multiplying the BU (basket unit) price estimation by the estimation of baskets held (then dividing by total supply).
The issue is that both BU and baskets held account for price margin of error, widening the range of the price more than necessary.
This would increase the high estimation of the price and decrease the lower estimation. This would impact:
Consider the following scenario:
(Theres also some duplication within the basketRange() but that function isnt in scope, what is is scope is the additional margin of error when multiplying by buPriceLow).
I think the best way to mitigate this would be to use a dedicated function to estimate the price, I dont see an easy way to fix this while using the existing functions.
Other
tbrent (Reserve) commented:
tbrent (Reserve) commented:
0xA5DF (warden) commented:
tbrent (Reserve) acknowledged and commented:
0xA5DF commented:
tbrent (Reserve) commented:
tbrent (Reserve) disagreed with severity and commented:
cccz (judge) decreased severity to Medium
Reserve Mitigated:
Status: Mitigation confirmed. Full details in reports from bin2chen, RaymondFam and ronnyx2017.
