Lack of access control for the distributeAssets function.
A malicious user can manipulate the _collateralRate
, _hundredPC
, and _assets.amount
variables to adjust the values of _portion
and costInEuros
. The _portion
can easily be set to be equal to 1, and costInEuros
can be set to be greater than _portion
.
This will lead the if statement if (costInEuros > _position.EUROs)
to be true and costInEuros
will be set to _position.EUROs
. Consequently, the holder's position will be decreased by costInEuros
.
_position.EUROs -= costInEuros; // losing all euros
As a result, the holders will lose their EUROs and the reward received will be a very low amount.
Holders will lose their EUROs.
Manual Review
Add an access modifier for the distributeAssets function to be called only by the manager.
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.