Example projects demonstrating the Limit Break AMM on a local Anvil devnet.
- Foundry (
forge,cast,anvil) - screen (pre-installed on macOS)
- Python 3.9+ with
pipenv(for simulator and indexer) - Node.js 18+ (for frontends)
cd environment/lbamm-deploy
./script/start.shThis will:
- Start an Anvil instance on
localhost:8545(chain-id 1776411) in a background screen session - Compile and deploy all AMM contracts via
forge script - Write deployed contract addresses to the root
.envfile - Create
.env.localsymlinks in each frontend project
To view Anvil logs: screen -r anvil
To stop Anvil:
cd environment/lbamm-deploy
bash script/stop.shThe deploy script auto-generates a root .env with all deployed addresses and default settings. See .env.example for the full list of configuration options.
All example projects read from this single root .env -- no per-project env files needed.
Deploys an ERC20C token configured for LBAMM-exclusive trading with a 10% paired token tax. Demonstrates Transfer Validator V5 setup (whitelist-only, OTC disabled), hook-based fee configuration, and single-sided liquidity seeding on a dynamic price pool.
Deploys an ERC20C token with a custom LBAMM token hook that requires traders, pool creators, and liquidity providers to hold an NFT from a specific ERC-721 collection. Demonstrates how to implement ILimitBreakAMMTokenHook for access control without using the standard hook.
A full-stack order book built utilizing LBAMM with the CLOB Transfer Handler. A Python simulator deploys test tokens, initializes the CLOB, and runs automated trading with multiple accounts. A Python indexer polls on-chain events and serves order book state via a REST API. A Next.js frontend displays the order book in real time and submits transactions to the local chain.
.env.example # Configuration template
.env # Auto-generated by deploy (gitignored)
common/contracts/abis/ # Shared contract ABIs
environment/lbamm-deploy/ # Forge deploy scripts
script/start.sh # Start Anvil + deploy
script/stop.sh # Stop Anvil
examples/
clob/ # CLOB example
nft-gated-trading/ # Custom token hook with NFT gate
trading-tax-token/ # ERC20C token with trading tax