Skip to content

Composable credit for the next generation of onchain finance. asUSD is the native stablecoin of the Astera ecosystem.

License

Notifications You must be signed in to change notification settings

Astera-Finance/astera-usd

Repository files navigation

Astera USD

Astera-USD (asUSD) is the native Astera overcollateralized stablecoin integrated into Astera 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. asUSD is the native stablecoin of the Astera ecosystem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages