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

This branch is 27 commits ahead of vanshwassan/comet:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3cecb46 · Nov 11, 2024
May 10, 2022
Jul 2, 2024
Nov 11, 2024
Nov 11, 2024
Jul 1, 2024
Nov 11, 2024
Jan 6, 2023
Aug 29, 2022
Mar 7, 2023
Sep 5, 2024
Jul 2, 2024
Jul 2, 2024
Jun 24, 2024
Jul 21, 2023
Jul 1, 2024
May 10, 2022
Mar 28, 2024
Apr 7, 2022
Sep 17, 2024
Nov 1, 2022
Apr 28, 2022
Dec 2, 2021
Mar 3, 2022
Feb 8, 2022
Sep 22, 2022
Jun 28, 2022
Mar 3, 2024
Sep 17, 2024
Aug 11, 2022
Dec 17, 2021
Dec 17, 2021
Mar 3, 2023
Sep 17, 2024
Sep 19, 2024
Apr 28, 2022
Sep 17, 2024
Mar 9, 2023
Jul 1, 2024

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%