• Stars
    star
    178
  • Rank 210,292 (Top 5 %)
  • Language
    Python
  • License
    Other
  • Created about 4 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

On-chain registry and unified API for Curve.fi pools.

curve-pool-registry

On-chain registry and unified API for Curve.fi pools.

Usage

See the documentation for information on how this project is organized, and how it may be integrated within other projects.

Deployments

Testing and Development

Dependencies

Curve contracts are compiled using Vyper, however installation of the required Vyper versions is handled by Brownie.

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-pool-registry.git
cd curve-pool-registry
pip install -r requirements.txt

Running the Tests

The registry has two independent test suites.

Local tests

The local test suite is designed to be run in a local environment. It is mostly comprised of parametrized unit tests that validate functionality against many possible pool iterations.

To run the entire local test suite:

brownie test tests/local

You can optionally include the --once flag to skip parametrization and run each test exactly once.

Forked tests

The forked test suite is designed for use with a forked mainnet. These tests verify functionality within the registry against actual data from deployed pools. The data is obtained from the pooldata.json file within each subdirectory in curvefi/curve-contract/contract/pools.

To run the forked tests:

brownie test tests/forked

You can optionally include the --pool flag to only target one or more specific pools:

brownie test tests/forked --pool 3pool,gusd

Deployment

Deployment is handled via functions within scripts/deploy.py.

To run a deployment function:

brownie run deploy [FUNCTION NAME] --network mainnet

You must set deployer prior to running on the mainnet. It is recommended to test the script in a forked mainnet environment prior to actual deployment.

License

Except where otherwise noted, (c) Curve.Fi, 2020 - All rights reserved.

More Repositories

1

curve-contract

Vyper contracts used in Curve.fi exchange pools.
Python
1,009
star
2

curve-stablecoin

Stablecoin powered by LLAMMAs
Python
434
star
3

curve-dao-contracts

Vyper contracts to be used by Curve DAO
Python
336
star
4

brownie-tutorial

Brownie Video Tutorial at https://www.youtube.com/playlist?list=PLVOHzVzbg7bFUaOGwN0NOgkTItUAVyBBQ
Python
147
star
5

curve-stablecoin-js

JavaScript library for Curve Stablecoin
TypeScript
102
star
6

curve-api

JavaScript
94
star
7

vyper-tutorial

Curve Vyper Tutorial : How to Build a $CRV-stablecoin
Python
76
star
8

curve-crypto-contract

Guess what
Python
71
star
9

curve-factory

Python
66
star
10

tricrypto-ng

Automatic Market Maker (AMM) for three unpegged assets, written in Vyper.
Vyper
66
star
11

curve-js

TypeScript
60
star
12

curve-assets

59
star
13

multi-rewards

A modified version of the SNX staking rewards contract, allowing for multiple reward tokens. Designed for use with Curve.fi liquidity gauges.
Python
58
star
14

curve-contract-polygon

Curve.fi exchange implementation for Polygon.
Python
47
star
15

curve-docs

Sphinx documentation for curve.readthedocs.io
45
star
16

lending-amm-model

Model of LLAMMA for lending and stablecoin purposes
Python
37
star
17

security-incident-reports

A repository documenting security incident reports at Curve Finance.
30
star
18

curve-factory-crypto

Python
29
star
19

curve-veBoost

Curve veCRV Boost Delegation
Vyper
28
star
20

curve-cross-asset-swaps

Cross asset swaps using Curve and Synthetix
Python
27
star
21

stableswap-ng

Automatic Market Maker (AMM) for 2 or more pegged assets, written in Vyper.
Vyper
24
star
22

curve-dao

Vue
22
star
23

curve-measure-profit

Scripts to record and measure virtual profit on curve.fi, written in Python
Python
21
star
24

curve-aragon-voting

Solidity
21
star
25

metaregistry

One Registry to Rule Them All
Vyper
20
star
26

crv.finance

JavaScript
20
star
27

volume-subgraphs

TypeScript
18
star
28

curve-subgraph

TypeScript
17
star
29

curve-frontend

TypeScript
17
star
30

cryptopool-analytics

Semi-analytical approach to simulations where dense liquidity is a small perturbation to constant-product invariant
Python
16
star
31

curve-zaps

Useful zaps for curve pools
Python
15
star
32

curve-gas-estimates

Gets gas cost estimates for Curve contracts using evm-trace.
Python
13
star
33

curve-external-integrations

12
star
34

cryptopool-simulator

Similator for cryptopools written in C++
C++
11
star
35

curve-xchain-factory

Permission-less gauge factory for cross-chain CRV emissions
Python
10
star
36

unipool-fork

A modified version of the SNX staking rewards contract, for use with Curve.fi liquidity gauges.
Solidity
10
star
37

CRV-distribution-data

JavaScript
8
star
38

curve-stablecoin-dashboard

Dashboard of Curve stablecoin
Python
8
star
39

crvusd-ape-tutorial

Python
7
star
40

early-user-distribution

Python
7
star
41

crypto_lp_pricing

Python
7
star
42

curve-xdao

Vyper
6
star
43

curve-stablecoin-researches

Researches around Curve Stablecoin
Jupyter Notebook
6
star
44

curve-crypto-calc

Original python-based cryptopool simulator added for history
6
star
45

curve-xgov

Python
6
star
46

vest-split

Split VestingEscrow for multiple users
Python
6
star
47

llamma-simulator

Python
6
star
48

twocrypto-ng

Jupyter Notebook
5
star
49

discord-bot

JavaScript
5
star
50

curve-router-ng

Curve Router. Performs up to 5 swaps in a single transaction, can do estimations with get_dy and get_dx
Vyper
5
star
51

curve-snapshot

Python
5
star
52

curve-dao-operations

A set of CLI tools for conducting Curve DAO operations, written in python using the very cool Ape Framework.
Python
4
star
53

curve-stable-peg

Python
3
star
54

curve-burners

Vyper
3
star
55

curve-base-repo

Repository template for a Curve repository.
3
star
56

curve-metapool

Python
2
star
57

announcements

2
star
58

contract-migrations

Migration contract and tests
Python
2
star
59

curve-api-metadata

2
star
60

boa-tutorial

Jupyter Notebook
2
star
61

curve-router-js

TypeScript
2
star
62

CRV-distribution-BPT

TypeScript
1
star
63

CRV-distribution

TypeScript
1
star
64

deposit-and-stake-zap

Python
1
star
65

curve-letters

A place to publish scientific papers researching Curve and DeFi in general
1
star
66

curve-ren-adapter

Exchange adapter for Curve renBTC and sBTC pool
JavaScript
1
star