The addLiquidityProportional function and removeLiquidity in UpliftOnlyExample.sol lacks reentrancy protection, which makes it vulnerable to reentrancy attacks. A reentrancy attack could occur if a malicious contract interacts with this function and calls it repeatedly before the state updates are finalized, leading to unintended consequences such as the ability to manipulate the amount of liquidity added or withdraw funds.
In the code u can see there is a callback used to mint tokens to the user, A a malicious user can craft a contract to exploit this to steal tokens
Drain of Lp tokens
Manual Audit
Add a reentrancy guard
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.