8000 GitHub - Cod3x-Labs/Cod3x-USD: Composable credit for the next generation of onchain finance. Cod3x USD is the native stablecoin of the Cod3x ecosystem.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Composable credit for the next generation of onchain finance. Cod3x USD is the native stablecoin of the Cod3x ecosystem.

License

Notifications You must be signed in to change notification settings

Cod3x-Labs/Cod3x-USD

Repository files navigation

Cod3x USD

Cod3x-USD (cdxUSD) is the native Cod3x overcollateralized stablecoin integrated into Cod3x lend market, multichain using LayerZero and with a new innovative interest rate PID controle system.

Quickstart

Installing dependencies

yarn && forge install

Compiling your contracts

This project supports both hardhat and forge compilation. By default, the compile command will execute both:

yarn compile

Running tests

yarn test

Deploying Contracts

Set up deployer wallet/account:

  • Rename .env.example -> .env
  • Choose your preferred means of setting up your deployer wallet/account:
MNEMONIC="test test test test test test test test test test test junk"
or...
PRIVATE_KEY="0xabc...def"
  • Fund this address with the corresponding chain's native tokens you want to deploy to.

To deploy your contracts to your desired blockchains, run the following command in your project's folder:

npx hardhat lz:deploy

More information about available CLI arguments can be found using the --help flag:

npx hardhat lz:deploy --help

Typing conventions

Variables

  • storage: x
  • memory/stack: x_
  • function params: _x
  • contracts/events/structs: MyContract
  • errors: MyContract__ERROR_DESCRIPTION
  • public/external functions: myFunction()
  • internal/private functions: _myFunction()
  • comments: "This is a comment to describe the variable amount."

Nat Specs

/**
 * @dev Internal function called whenever a position's state needs to be modified.
 * @param _amount Amount of poolToken to deposit/withdraw.
 * @param _relicId The NFT ID of the position being updated.
 * @param _kind Indicates whether tokens are being added to, or removed from, a pool.
 * @param _harvestTo Address to send rewards to (zero address if harvest should not be performed).
 * @return poolId_ Pool ID of the given position.
 * @return received_ Amount of reward token dispensed to `_harvestTo` on harvest.
 */

Formating

Please use yarn fmt before commiting.


Join our community on Discord | Follow us on Twitter

About

Composable credit for the next generation of onchain finance. Cod3x USD is the native stablecoin of the Cod3x ecosystem.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages

0