Skip to content
Open
Show file tree
Hide file tree
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
26 changes: 26 additions & 0 deletions testnet_oro/KiiUSD_hunterkurfi.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/**
* @title KiiStablecoin
* @dev Simple Stablecoin implementation for KiiChain Builder Guide
*/
contract KiiStablecoin is ERC20, Ownable {

// The constructor mints an initial supply to the deployer
// Name: Kii Dollar, Symbol: KIIUSD
constructor() ERC20("Kii Dollar", "KIIUSD") Ownable(msg.sender) {
_mint(msg.sender, 1000000 * 10 ** decimals());
}

/**
* @dev Function to mint more stablecoins.
* Only the owner (you) can call this.
*/
function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}
Comment on lines +11 to +25
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Naming vs. behavior: this is a mintable ERC-20, not a stablecoin.

The contract is named KiiStablecoin and the token is "Kii Dollar / KIIUSD", but there is no peg, collateral, oracle, or stability mechanism — just an owner-mintable ERC-20. For a testnet builder-guide sample this is fine, but consider either:

  • Renaming the contract/symbol to reflect what it actually is (e.g., KiiMintableToken), or
  • Adding a NatSpec note clarifying that the "stablecoin" naming is illustrative only and that no peg mechanism is implemented.

Additionally, mint is unbounded and owner-controlled with no cap or events beyond ERC20's Transfer. For testnet this is acceptable, but worth flagging as a centralization/inflation risk if this contract is ever copy-pasted toward mainnet usage.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@testnet_oro/KiiUSD_hunterkurfi.sol` around lines 11 - 25, The contract
KiiStablecoin and ERC20 metadata ("Kii Dollar", "KIIUSD") claim a stablecoin but
implement only an owner-mintable ERC20 (see constructor ERC20("Kii Dollar",
"KIIUSD") Ownable(msg.sender) and function mint(address to, uint256 amount)
public onlyOwner). Either rename the contract and token to something like
KiiMintableToken/KII (or another non-stable name) and update the constructor
metadata, or add a clear NatSpec comment above the contract and the mint()
method stating this is an illustrative, unpegged, owner-mintable token with no
oracle/collateral/stability mechanisms; optionally consider documenting or
implementing supply caps/limits (e.g., a maxSupply check in mint) if you want to
mitigate centralization/inflation risks before reuse in production.

}
15 changes: 15 additions & 0 deletions testnet_oro/assetlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,21 @@
"location": "Australia",
"total_shares": "6000"
}
} ,
{
"description": "Kii Dollar Stablecoin by hunterkurfi",
"denom_units": [
{
"denom": "kiiusd",
"exponent": 18
}
],
"base": "kiiusd",
"name": "Kii Dollar",
"display": "kiiusd",
"symbol": "KIIUSD",
"address": "0x9002b809094927b54343eA785487484288Baf990"
}

]
}