MetaToken

Idea

It is hard to write a detailed writeup for this chall so I will just summarize the idea here...

This is a read-only reentrancy chall that mimics the curve finance hack:

The callback is here:

At this point the LP tokens are burned so totalSupply decreases, therefore get_virtual_price() returns higher price than expected:

In the callback we can purchase MetaToken. We can buy a lot more because the LP tokens we still hold are more valuable in the callback. Once control flow exits our fallback function we can dump everything and profit.

PoC

Last updated