The list of collateral tokens, s_collateralTokens
, is determined when the contract is constructed. The lack of duplicate check could cause getAccountCollateralValue
to calculate collateral value inaccurately.
For example, when s_collateralTokens
includes [A_token, B_token, A_token] and a user has 20 A_token, getAccountCollateralValue
returns the USD value of 40 A_token as collateral value of the user.
A malicious user could amplify the total value of assets if users does not check the duplicate.
manual
In constructor of DSCEngine
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.