defi-hacking-playground icon indicating copy to clipboard operation
defi-hacking-playground copied to clipboard

All the money legos. This is not meant for production use.

Defi Hacking Playground

This is a collection of DeFi legos that can be used to build test scenarios for multi-contract arbitrage and bug detection.

All the legos

  • JesusCoin: Holy ERC20 token backed by prayer
  • MiniSwap: ETH/token exchange that uses the constant product pricing model
  • DefiLoans: Broken zero-interest collateralised loans
  • FixedPriceTrader: A smart contract that buys and sells tokens at a fixed rate
  • FixedPriceTraderEZMode: Buys and sells a fixed amount of tokens at a fixed rate

Usage

Running truffle migrate deploys some basic elements:

  • The JesusCoin ERC20 token
  • A MiniSwap exchange instance

Use Truffle scripts to add more legos and set up the initial state.