code-423n4 / 2021-07-spartan-findings

0 stars 0 forks source link

[Pool] - Flash loan + Synth.realise allows anyone to extract value from LPs #207

Closed code423n4 closed 3 years ago

code423n4 commented 3 years ago

Handle

a_delamo

Vulnerability details

Impact

On Synth.sol, we have the method realise that checks if the LP value is higher than the Synth value. If confirmed, it will burn the premium LP.

Using a flash loan, we can add liquidity to the pool, mint some LP tokens. Then, call realise using the pool address. Because of the flash loan, the LP value will be higher than Synth. It will burn the premium LP. Then, we redeem the LP tokens for the tokens and pay the fee of the flash loan.

SamusElderg commented 3 years ago

Duplicate of #40