/Beanstalk-Exploit-POC

Beanstalk exploit POC written in solidity.

Primary LanguageSolidity

Beanstalk Protocol Hack Analysis & POC

Getting Started

This repo contains a POC of a hack that took place on Ethereum Block 14602790, where the hacker ran away with around $84M in ETH. You can find more details in the links below.

  1. Brief Overview on this twitter thread
  2. In depth Analysis

Prerequisites

You will need to install foundry to run the exploit. Link for installtion foundry.

How to exploit, Anon ?

  1. Clone the repo
    git clone https://github.com/abdulsamijay/Beanstalk-Exploit-POC.git
  2. Build the example to install all packages
    forge build
  3. Run the test
    forge test -vv --fork-url <YOUR_API_PROVER> --fork-block-number 14602789

Key Take Aways

This will help you understand the basics of how to setup the flashloans in smart contracts, how AMMs work briefly & mitigation.

(back to top)