This repo contains a collateralized stable coin implementation. The system is desinged to be as minimal as possible, and have the tokens maintain the USD price This stablecoin has the properties:
- Relative Stability: Anchored or Pegged - 1 USD
- Chainlink Price feed
- Set a function to exchange Collateral -> USD
- Stability Mechanism (Minting): Algorithmic (Decentralized)
- People can only mint the stablecoin with enough collateral (coded)
- Collateral: Exogenous/Endogenous (Crypto)
- wETH
- wBTC
The collaterall tokens used are wrapped BTC and wrapped ETH.
TODO:
- Fee and interest payment with EARN token.
- Automatic liquidation on price drop
$ make install
Before running any commands, create a .env file and add the following environment variables:
# network configs
RPC_LOCALHOST="http://127.0.0.1:8545"
# ethereum nework
RPC_ETH_SEPOLIA=<rpc url>
RPC_ETH_MAIN=<rpc url>
ETHERSCAN_KEY=<api key>
$ forge test
$ make deploy-testnet
$ make deploy-mainnet
👤 Nadina Oates
- Website: nadinaoates.com
- Twitter: @N0_crypto
- Github: @trashpirate
- LinkedIn: @nadinaoates
Copyright © 2024 Nadina Oates.
This project is MIT licensed.