|
1 | | -# Bonded StableCoin 🪙 |
| 1 | +# Home |
2 | 2 |
|
3 | | -A decentralized stablecoin powered by bonding curves and smart contracts. |
| 3 | +# Welcome to the Bonded-StableCoin Wiki 🪙 |
4 | 4 |
|
5 | | -## Features |
| 5 | +Bonded-StableCoin is a decentralized stablecoin system leveraging bonding curves for dynamic pricing and minting. It is designed to be fully autonomous, transparent, and backed by reserve logic. |
6 | 6 |
|
7 | | -- Dynamic minting/burning using bonding curves |
8 | | -- Backed by collateral and bonding logic |
9 | | -- Secure smart contracts |
10 | | -- Basic frontend for interaction |
| 7 | +## Core Concepts |
11 | 8 |
|
12 | | -## Tech Stack |
| 9 | +- Stablecoin with algorithmic backing |
| 10 | +- Bonding curve mechanism |
| 11 | +- Smart contracts written in Solidity |
| 12 | +- Frontend interaction via ethers.js and React |
13 | 13 |
|
14 | | -- Solidity |
| 14 | +👉 Explore the sections on the left to learn more. |
| 15 | + |
| 16 | + |
| 17 | +-------------------------------------------------------------------------------- |
| 18 | + |
| 19 | +# Architecture |
| 20 | + |
| 21 | +# System Architecture |
| 22 | + |
| 23 | +## Overview |
| 24 | + |
| 25 | +The Bonded-StableCoin system consists of: |
| 26 | + |
| 27 | +- **Smart Contract** (`BondedStableCoin.sol`) — Handles minting, burning, and bonding logic |
| 28 | +- **Frontend** — Connects users via wallet (e.g., MetaMask) |
| 29 | +- **Hardhat Backend** — Development & deployment environment |
| 30 | + |
| 31 | +## Components |
| 32 | + |
| 33 | +- ERC-20 token standard |
| 34 | +- ETH reserve tracking |
| 35 | +- Mint/Burn entry points |
| 36 | +- UI hooks (optional integration with DApps) |
| 37 | + |
| 38 | + |
| 39 | +-------------------------------------------------------------------------------- |
| 40 | + |
| 41 | +# Bonding Curves |
| 42 | + |
| 43 | +# Bonding Curve Mechanism |
| 44 | + |
| 45 | +Bonding curves determine token price based on supply. |
| 46 | + |
| 47 | +## Pricing Formula |
| 48 | + |
| 49 | +Currently: |
| 50 | +``` |
| 51 | +Price = 1 ETH per token (flat, can evolve) |
| 52 | +``` |
| 53 | + |
| 54 | +Future iterations may use: |
| 55 | +``` |
| 56 | +Price = k * (Supply ^ exponent) |
| 57 | +``` |
| 58 | + |
| 59 | +## Benefits |
| 60 | + |
| 61 | +- Algorithmic control of supply |
| 62 | +- Dynamic pricing |
| 63 | +- Built-in incentive mechanics |
| 64 | + |
| 65 | + |
| 66 | +-------------------------------------------------------------------------------- |
| 67 | + |
| 68 | +# Smart Contracts |
| 69 | + |
| 70 | +# Smart Contracts |
| 71 | + |
| 72 | +## `BondedStableCoin.sol` |
| 73 | + |
| 74 | +Implements: |
| 75 | + |
| 76 | +- ERC-20 standard |
| 77 | +- Mint function (receives ETH) |
| 78 | +- Burn function (returns ETH) |
| 79 | +- Basic bonding curve logic |
| 80 | + |
| 81 | +## Key Functions |
| 82 | + |
| 83 | +```solidity |
| 84 | +function mint() public payable |
| 85 | +function burn(uint256 amount) public |
| 86 | +``` |
| 87 | + |
| 88 | +## Security Considerations |
| 89 | + |
| 90 | +- Reentrancy protection |
| 91 | +- Overflow/underflow checks (via Solidity 0.8.x) |
| 92 | + |
| 93 | + |
| 94 | +-------------------------------------------------------------------------------- |
| 95 | + |
| 96 | +# Deployment |
| 97 | + |
| 98 | +# Deployment Guide |
| 99 | + |
| 100 | +## Requirements |
| 101 | + |
| 102 | +- Node.js |
15 | 103 | - Hardhat |
16 | | -- JavaScript (React) |
17 | | -- Ethers.js |
| 104 | +- MetaMask / testnet ETH |
18 | 105 |
|
19 | | -## Getting Started |
| 106 | +## Steps |
20 | 107 |
|
21 | 108 | ```bash |
22 | | -git clone https://github.com/REChain-Network-Solutions/Bonded-StableCoin.git |
23 | | -cd Bonded-StableCoin |
24 | 109 | npm install |
25 | 110 | npx hardhat compile |
26 | | -npx hardhat test |
| 111 | +npx hardhat run scripts/deploy.js --network <your-network> |
27 | 112 | ``` |
28 | 113 |
|
29 | | -## License |
| 114 | +Use a `.env` file for private keys and API keys. |
| 115 | + |
| 116 | + |
| 117 | +-------------------------------------------------------------------------------- |
| 118 | + |
| 119 | +# FAQ |
| 120 | + |
| 121 | +# Frequently Asked Questions |
| 122 | + |
| 123 | +### Q: Is this stablecoin collateral-backed? |
| 124 | +A: Yes. ETH reserves back the token supply directly. |
| 125 | + |
| 126 | +### Q: How is price stability ensured? |
| 127 | +A: Via bonding curve logic that determines mint/burn pricing algorithmically. |
| 128 | + |
| 129 | +### Q: Can I contribute? |
| 130 | +A: Absolutely! Open issues, submit PRs, or suggest improvements. |
| 131 | + |
| 132 | + |
| 133 | +-------------------------------------------------------------------------------- |
| 134 | + |
| 135 | +# Glossary |
| 136 | + |
| 137 | +# Glossary |
| 138 | + |
| 139 | +**Stablecoin** — A token designed to maintain a stable value. |
| 140 | + |
| 141 | +**Bonding Curve** — A mathematical function defining the price of a token based on its supply. |
| 142 | + |
| 143 | +**Minting** — Creating new tokens in exchange for ETH. |
| 144 | + |
| 145 | +**Burning** — Destroying tokens to redeem ETH. |
| 146 | + |
| 147 | +**Reserve** — The ETH pool backing the stablecoin. |
| 148 | + |
| 149 | +**ERC-20** — A widely-used Ethereum token standard. |
| 150 | + |
| 151 | + |
| 152 | +-------------------------------------------------------------------------------- |
30 | 153 |
|
31 | | -MIT |
|
0 commit comments