1. Unstoppable

https://www.damnvulnerabledefi.xyz/challenges/unstoppable/

Objective

Vault is offering flash loans for free. To pass the challenge, make the vault stop offering flash loans.

Approach

First we examine the flashloan function.

UnstoppableLender.sol

poolBalance a state variable tracking internal balances of the vault contract; it is updated when users deposit tokens via depositTokens().

However, users can transfer DVT tokens directly to the lending contract without calling depositTokens. If that is done, poolBalance != balanceBefore, this will trigger revert on AssertionViolated() and jam the flashloan function.

Exploit

Last updated