Frontrunning initial liquidity adding #500
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-442
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/code-423n4/2022-12-caviar/blob/0212f9dc3b6a418803dbfacda0e340e059b8aae2/src/Pair.sol#L63-L99
https://github.com/code-423n4/2022-12-caviar/blob/0212f9dc3b6a418803dbfacda0e340e059b8aae2/src/Pair.sol#L417-L427
Vulnerability details
Impact
Creation of the pair does not add initial liquidity which leads to situation where attacker can front-run creator and execute sandwich attack against the creator.
Exploitation Scenario:
Proof of Concept
Pair.sol
:Tools Used
Manual Review
Recommended Mitigation Steps
It is recommended to initialize pair with the liquidity provided by the creator.
The text was updated successfully, but these errors were encountered: