An open API service indexing awesome lists of open source software.

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

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 functions

1. 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
```