Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ contract MyStablecoin is ERC20 {

constructor() ERC20("My Stablecoin", "MYS") {
governance = msg.sender;
reserveRatio = 2000; // Example reserve ratio, adjust as needed
reserveRatio = 0.2; // Example reserve ratio, adjust as needed
}

modifier onlyGovernance() {
Expand Down Expand Up @@ -143,7 +143,7 @@ contract MyStablecoin is ERC20 {

function _calculateStability(uint256 amount) private view returns (uint256) {
uint256 totalSupply = totalSupply();
uint256 reserve = (totalSupply * reserveRatio) / 10000; // adjust to decimal percentage
uint256 reserve = totalSupply * reserveRatio;
return totalSupply - reserve - amount;
}
}
Expand Down