Curve Zaps
- StableCalcZap (precise calc_token_amount + get_dx)
- Ethereum: 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Optimism: 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Gnosis (xDai): 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Polygon: 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Fantom: 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Moonbeam: 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Kava: 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Arbitrum: 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Celo: 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Avalanche: 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Aurora: 0xCA8d0747B5573D69653C3aC22242e6341C36e4b4
- Base: 0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7
- BSC: 0x0fE38dCC905eC14F6099a83Ac5C93BF2601300CF
- CryptoCalcZap (get_dx)
- Ethereum: 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Optimism: 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Gnosis (xDai): 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Polygon: 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Fantom: 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Moonbeam: 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Kava: 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Arbitrum: 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Celo: 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Avalanche: 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Aurora: 0xA72C85C258A81761433B4e8da60505Fe3Dd551CC
- Base: 0xEfadDdE5B43917CcC738AdE6962295A0B343f7CE
- BSC: 0xd6681e74eEA20d196c15038C580f721EF2aB6320
Testing and Development
Dependencies
- python3 version 3.10 or greater, python3-dev
- vyper version 0.3.7
- brownie - tested with version 1.19.2
- brownie-token-tester - tested with version 0.3.2
- ganache-cli - tested with version 6.12.2
Setup
To get started, first create and initialize a Python virtual environment. Next, clone the repo and install the developer dependencies:
git clone https://github.com/curvefi/curve-zaps.git
cd curve-zaps
pip install -r requirements.txt
Running the Tests
To run the entire suite:
brownie test --network <network_name>-fork
# network_name: mainnet (ethereum), optimism, xdai, polygon, fantom, arbitrum, avalanche
To run for particular pools:
brownie test --pools 3pool,compound,aave --network mainnet-fork
The list of available pools:
mainnet (ethereum)
PLAIN: 3pool,hbtc,link,sbtc2,seth,steth,susd,eurs,eurt,fraxusdc + aeth,reth (use rate)
LENDING: aave,saave,ib,usdt,compound
META: gusd,usdk,musd,rsv,dusd,usdp + rai (use rate)
FACTORY PLAIN: factory-v2-283,factory-v2-66,factory-v2-235 + factory-v2-303 (pool_type 10)
FACTORY META: tusd + factory-v2-9,factory-v2-144,factory-v2-247
#---------------
CRYPTO PLAIN: tricrypto2,eursusd,crveth,cvxeth,spelleth,teth,factory-crypto-37,factory-crypto-204
CRYPTO META: eurtusd,euroc,factory-crypto-116,factory-crypto-136
optimism
PLAIN: 3pool + wsteth (uses rate)
xdai
PLAIN: 3pool
META: rai (uses rate)
#---------------
CRYPTO META: eureusd
TRICRYPTO META: tricrypto
polygon
LENDING: aave
FACTORY META: factory-v2-107,factory-v2-339
#---------------
TRICRYPTO META: atricrypto3
TRICRYPTO DOUBLE META: crv-tricrypto, wmatic-tricrypto
fantom
PLAIN: 2pool
META: fusdt
LENDING: ib,geist
#---------------
CRYPTO: tricrypto,factory-crypto-7
arbitrum
PLAIN: 2pool + wsteth (uses rate)
#---------------
CRYPTO PLAIN: tricrypto
CRYPTO META: eursusd
avalanche
LENDING: aave,aaveV3
FACTORY META: factory-v2-99,factory-v2-66
#---------------
TRICYPTO META: atricrypto,avaxcrypto
Deploy
brownie run deploy --network <id>
License
This project is licensed under the MIT license.