The assetPriceUsd
is not checked for 0. A case like this could affect the value of costInEuros
calculated which lead to underlying assets being distributed and corresponding EUROs tokens not being burned. Which affects the stability of the tokens, making the worth less as the underlying asset backing the token is being removed.
In the distributeAssets
function, assets are distributed for a price, and the correponding EUROs tokens are burned. When calculating the amount of EUROS to burn, we calculate by
Note that the assetPriceUsd
in use is retrieved from chainlink's AggregatorV3Interface, and can return 0. This be the currently returned price, due to the asset pricefeed not existing on chain, Chainlink's multisigs blocking access to the pricefeed.
Consequently, the costInEuros
parameter calculated will be 0.
A result of this is that the _position.EUROs
and burnEuros
will remain unchanged, but the underlying asset will be transferred.
This affects protocol accounting, assets backing the EUROs tokens will be transfered without EUROs tokens burned, consequently reducing their value and making them worth less.
Manual Code Review
Include a check to ensure returned value is not 0
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.