Malicious user can grant himself a reward in the reward mapping by calling the distributeAssets
function in LiquidationPool
and sending arbitrary parameters.
Anyone can call this function. Therefore a malicious user can call this function with arbitrary parameters. You can send an asset struct with addr
argument as zero address and symbol
argument as the one of WBTC. Then you will receive rewards in WBTC while sending ether to the contract because of the way the logic is written in the function.
Also you can put the _hundredPC
parameter to 0, and therefore not be charged anything, because the costInEuros
variable will amount to zero (0) because it is multiplied with _hundredPC
.
Unit test ATTACK written in test/liquidationPool.js
Funds are directly at risk as well as whole protocol functionality. Therefore, a HIGH severity.
Protocol functionality is disrupted. User funds are lost. Protocol funds are also lost.
Manul review, Hardhat
Add a security check to enable only Liquidation Pool Manager contract to call this function.
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.