There is a basic reentrancy vulnerability in decreasePosition function that allows malicious users to steal all the steaked tokens. Here is the attack path:
Malicious user deposits TST and EUROs tokens with increasePosition function (from Attack contract)
He waits 1 day to make these pending stakes to position stake
He calls an attack function from the same Attack contract that calls decreasePosition function
Finally Attack contract's fallback function calls continuously to decreasePosition until all tokens drained
Malicious user can steal all TST and EUROs in the LiquidationPool contract.
Manual Review
Do the TST subtraction and EUROs subtraction before safetransfer functions. Use nonReentrant modifier.
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.