This repository contains vulnerable contracts demonstrating Cross-Contract-Reentrancy Attack to provide deeper understanding for those who read the Cross-Contract Reentrancy Attack article to follow through with a simulated lab.
git clone git@github.com:InspexCo/cross-contract-reentrancy.git
cd cross-contract-reentrancy
yarn install
The goal is to hijack the execution flow and inflate the price of $VT, then use the $VT to buy $GOV cheaper.
- Write your evil token in
contracts/EvilERC20.sol
- Write your exploit in
test/exploit.js
- Simulate the exploit by running
npx hardhat test
All code, practices, and patterns in this repository are used for educational purposes only.
!!! DO NOT USE IN PRODUCTION !!!
Distributed under the MIT License. See LICENSE.txt
for more information.