Submitted by gzeon
Vader reimburse user IL immediately when user withdraw from the pool (VaderRouterV2.sol:L227), an attacker can therefore manipulate the pool balance causing a high IL, remove liquidity and restore the pool balance such that he will receive a larger IL reimbursement.
Lets assume our attacker own 100% of FOO-VADER
The profit is constrained by gas cost, pool fee, % of pool controlled by the attacker and % of IL protection.
Use twap price to determine P1 in VaderMath.sol:L84 when calculating IL to reduce risk of manipulation
SamSteinGG (Vader) commented:
alcueca (judge) commented:
SamSteinGG (Vader) commented:
