The function LiquidationPool::stake
makes wrong calculation which can block holders.
The stake
function returns the smaller value of _position.TST
and _position.EUROs
.
This does not seem right, because if an user has deposited only TST and no EUROs, the function will return 0
. This will affect the holder badly.
First lets take a look at LiquidityPool::getStakeTotal
:
We can see that this function is used to get to total amount of holder's stakes. Lets imagine he has only 1 position with 100 TST and 0 EUROs. The function will return 0, because stake()
takes the smallest value.
Now lets look at LiquidationPool::distributeAssets
, in particular this line:
If again the current position has 100 TST and 0 EUROs, the following check will fail:
This means that the holder of the position will not receive rewards for this position as this line will never be reached:
Wrong accounting of position will result in the holder receiving no rewards.
Manual Review
Adjust the stake
function to consider both TST and EUROs in a position:
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.