Giter VIP home page Giter VIP logo

defi__decentstablecoin's Introduction

๐ŸŒ Relative Stability Protocol

Overview

The Relative Stability protocol is designed to maintain a stable value anchored or pegged to $1.00. This protocol leverages Chainlink price feeds and allows users to exchange ETH and BTC for stablecoins. The stability mechanism is algorithmic and decentralized, ensuring that users can only mint stablecoins with sufficient collateral.

Features

1. Relative Stability: Anchored or Pegged to $1.00

  • ๐Ÿ”— Chainlink Price Feed: The protocol uses Chainlink price feeds to ensure accurate and reliable price data.
  • ๐Ÿ’ฑ Exchange Function: Users can exchange ETH and BTC for stablecoins.

2. Stability Mechanism (Minting): Algorithmic (Decentralized)

  • ๐Ÿ’ฐ Collateral Requirements: Users can mint stablecoins only if they have enough collateral. This is enforced through the protocol's code.

3. Collateral: Exogenous (Crypto)

  • ๐Ÿช™ Supported Collateral Types:
    • Wrapped Ether (WETH)
    • Wrapped Bitcoin (WBTC)

๐Ÿ“‘ Contract Layout Standard

To maintain consistency and readability, the contracts follow a standard layout. Below is the recommended layout for contracts and functions:

Layout of Contract

// Layout of Contract:
// 1. Version
// 2. Imports
// 3. Errors
// 4. Interfaces, Libraries, Contracts
// 5. Type Declarations
// 6. State Variables
// 7. Events
// 8. Modifiers
// 9. Functions

// Layout of Functions:
// 1. Constructor
// 2. Receive function (if exists)
// 3. Fallback function (if exists)
// 4. External functions
// 5. Public functions
// 6. Internal functions
// 7. Private functions
// 8. Internal & private view & pure functions
// 9. External & public view & pure functions

Usage

๐Ÿ—๏ธ Minting Stablecoins

To mint stablecoins, users need to deposit sufficient collateral (WETH or WBTC) into the protocol. The amount of stablecoins that can be minted depends on the value of the collateral provided.

๐Ÿ›ก๏ธ Collateral Management

The protocol supports managing collateral types and ensuring they meet the required criteria for minting stablecoins.

๐Ÿค Contribution

Contributions to the protocol are welcome. Please follow the standard contract layout and function layout when making contributions to maintain consistency and readability.

๐Ÿ“œ License

This project is licensed under the MIT License.

defi__decentstablecoin's People

Contributors

ajiteshbd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.