Pancakeswap LP Exploit?

Hi, let me give a context.
Fome some reason owner wallet of this token 0x1082a4201034a62B1638b1a5eCcDE0b2b14E83Fe sent LP tokens for token contract, and decided to recovery LP tokens some days after as show here so he got front runned by this "hacker?" transaction

So my question is, what's happened here? How a random address/contract has able to get LP tokens from token contract, and why he did it only when Owner wallet tried to recover tokens frontrunning his transaction?

Hey @SilSo
the isAuthorizer modifer doesn't make any check

So the frontrunner was able to call recoverWrongTokens without problems.

1 Like

Smart contracts can be incredibly intricate, and sometimes things don't go as planned. Sounds like the original owner of the wallet was trying to recover LP tokens but got front-run by another transaction. These types of incidents highlight the need for a deep understanding of how smart contracts and blockchain work. Since you're already diving into these topics, you might want to check out some Exploit Dev walkthroughs. They have an entire course on Binary Exploit Development that covers the nuts and bolts of various types of exploits. The foundational knowledge could be invaluable for understanding the depth of what can go wrong (or right) in coding.