Skip to content

An efficient money market protocol for Ethereum and compatible chains (aka Compound III, Compound v3).

License

Notifications You must be signed in to change notification settings

api3dao/oev-v1-compound

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compound v3: Comet

This repository contains the smart contracts source code and market configurations for Compound v3(comet).

This forked version of comet uses API3's dAPIs for data feeds for assets. Check out the API3 documentation here.

Deploying the protocol

Deploying the adaptors

/api3-adaptors contains the necessary scripts to deploy and add the API3 Aggregator Adaptors and assets required for the protocol deployment.

  • Install all the packages for the adaptors:
yarn adaptors:build
  • Open api3-adaptors/config.json and add your asset and network details. You also need proxy contract address for each asset you are going to add. Head over to the API3 Market and get the proxy contract address for the assets you want to add.

You can also check out this guide on subscribing to dAPIs and getting a proxy address. For now, only 3 assets are supported. Do not add any more assets in the config.

NOTE: It is advisable to use a private RPC for the deployments. If the protocol deployment fails, try using another RPC.

Make a .env file in the root and add your mnemonic. This wallet needs to be funded to cover the gas costs for the deployments. Also add the other environment variables in the .env file. Make sure to add the ETHERSCAN_KEY(FOR MAINNET).

ETHERSCAN_KEY=""
BASESCAN_KEY="api-key"
SNOWTRACE_KEY="api-key"
INFURA_KEY="api-key"
POLYGONSCAN_KEY="api-key"
ARBISCAN_KEY="api-key"
LINEASCAN_KEY="api-key"
OPTIMISMSCAN_KEY="api-key"
MNEMONIC=""

Run the following command to deploy the adaptors:

yarn adaptors:deploy

Deploying the protocol

After deploying the adaptors, you can deploy the protocol. Install all the packages for the protocol:

yarn

Build all the packages:

yarn build

Run the following command to deploy the protocol:

NETWORK=your-network yarn protocol:deploy

This would deploy Compound V3 USDC Market on your desired chain with all the collateral assets defined in the api3-adaptors/config.json file.

Spinning up the frontend

After the deployment, you can spin up the frontend to interact with the protocol. Generate frontend configuration:

yarn frontend:codegen

Run the following command to start the frontend:

yarn frontend:dev

About

An efficient money market protocol for Ethereum and compatible chains (aka Compound III, Compound v3).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 86.3%
  • Solidity 11.2%
  • JavaScript 1.4%
  • CSS 1.1%