Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bitbynik/stable_coins
SIL763 Project
https://github.com/bitbynik/stable_coins
blockchain hardhat iitd smart-contract
Last synced: 3 days ago
JSON representation
SIL763 Project
- Host: GitHub
- URL: https://github.com/bitbynik/stable_coins
- Owner: BitByNIK
- Created: 2024-11-24T17:49:09.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-27T12:19:36.000Z (28 days ago)
- Last Synced: 2024-12-06T13:39:01.060Z (19 days ago)
- Topics: blockchain, hardhat, iitd, smart-contract
- Language: Solidity
- Homepage:
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stable Coins
## Specification for Project:
1. Write 2 contracts DecentralizedStableCoin and DSCEngine, where DecentralisedStableCoin is a ERC20 compatible token contract with burn and mint functions restricted to onlyOwner of the Contract.
2. DSCEngine handles the logic of minting, burn, redemption and liquidation of stable coins. The collateral for stable coin is a set of ERC20 tokens that are provided during the deployment of the stable coin contract along with the priceFeedAddresses of the oracle and stable coin address.
3. Implement depositCollateralAndMint function with inputs as one of the accepted token collateral addresses, amount of token as collateral and amount of stable coin to mint.
4. Implement redeemCollateralForStableCoin function with inputs as one of the accepted token collateral addresses, amount of collateral to withdraw and amount of stable coin to burn.
5. Implement liquidate function to liquidate users with healthFactor below MIN_HEALTH_FACTOR.
6. Implement necessary functions like calculateHealthFactor, getAccountInformation, getCollateralBalanceOfUser, getCollateralValue, getTokenAmountFromUsd and getter functions for all constants used throughout the contracts.
7. Write tests asserting the functionality of the stable coin.