https://github.com/pawanpaudel93/foundry-defi-stablecoin
How to make a Stablecoin
https://github.com/pawanpaudel93/foundry-defi-stablecoin
Last synced: 2 months ago
JSON representation
How to make a Stablecoin
- Host: GitHub
- URL: https://github.com/pawanpaudel93/foundry-defi-stablecoin
- Owner: pawanpaudel93
- Created: 2023-09-13T16:29:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-18T10:57:04.000Z (over 1 year ago)
- Last Synced: 2025-01-25T12:41:34.735Z (4 months ago)
- Language: Solidity
- Homepage: https://www.youtube.com/watch?v=8dRAd-Bzc_E
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Foundry DEFI Stablecoin
1. Relative Stability: Anchored or Pegged -> $1.00
1. Chainlink price feed
2. Set a function to exchange ETH & BTC -> $$$
2. Stability Mechanism (Minting): Algorithmic (Decentralized)
1. People can only mint the stablecoin iwth enough collateral (coded)
3. Collateral Type: Exogenous (Crypto)
1. wETH
2. wBTC- calculate health factor function
- set health factor if debt is 0
- Added a bunch of view functions1. What are our invariants/properties?
2. Some proper oracle use
3. Write more tests
4. Smart Contract Preparation## Usage
### Build
```shell
forge build
```### Test
```shell
forge test
```### Format
```shell
forge fmt
```### Gas Snapshots
```shell
forge snapshot
```### Anvil
```shell
anvil
```### Deploy
```shell
forge script script/Counter.s.sol:CounterScript --rpc-url --private-key
```### Cast
```shell
cast
```### Help
```shell
forge --help
anvil --help
cast --help
```