Skip to main content

overview

The Twocrypto-NG contract infrastructure represents an optimized version of Curve Finance Crypto pools.

Contract Source & Deployment

Source code is available on GitHub.


The AMM infrastructure involves the following parts:

AMM Blueprint Contracts

The AMM is a 2-coin, auto-rebalancing Cryptoswap implementation (version 2.0.0) with several optimizations. Unlike the older version, the pool contract is an ERC20-compliant LP token. The AMMs have a hardcoded ADMIN_FEE, set to 50% of the earned profits.

CurveTwocryptoOptimized.vy
CurveTwocryptoFactory.vy

The Factory allows the permissionless deployment of liquidity pools and gauges. It can accommodate multiple blueprints of the AMM contract. The admin can implement parameter changes, change the fee recipient, and upgrade implementations.

CurveTwocryptoFactory.vy
Views Contract

Contains view methods relevant for integrators and users. The address of the deployed Views contract is stored in the Factory and is upgradeable by the Factory's admin.

CurveCryptoViews2Optimized.vy
Math Contract

A contract which contains different math functions used in the AMM.

CurveCryptoMathOptimized2.vy
Liquidity Gauge Blueprint

A liquidity gauge blueprint contract which deploys a liquidity gauge of a pool on Ethereum. On sidechains, gauges need to be deployed via the RootChainGaugeFactory.