Add KiiStablecoin ($KIIUSD) contract deployment by hunterkurfi#41
Add KiiStablecoin ($KIIUSD) contract deployment by hunterkurfi#41hunterkurfi wants to merge 2 commits intoKiiChain:mainfrom
Conversation
This contract implements a simple stablecoin called Kii Dollar ($KIIUSD) with a total supply of 1,000,000 tokens minted to the deployer. It includes standard ERC20 functionality and Ownable access control for secure minting. This is part of my builder contribution to the KiiChain Oro Testnet. contract implements a simple stablecoin called KiiDollar with minting functionality for the owner.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 54 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA new ERC-20 stablecoin contract file is added to the testnet_oro directory. The contract, named Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@testnet_oro/KiiUSD_hunterkurfi.sol`:
- Around line 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.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 93805cb1-8c6b-4755-b3ea-b498f9d0c3ff
📒 Files selected for processing (1)
testnet_oro/KiiUSD_hunterkurfi.sol
| 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); | ||
| } |
There was a problem hiding this comment.
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.
Added Kii Dollar Stablecoin details to asset list.
This contract implements a simple stablecoin called Kii Dollar ($KIIUSD) with a total supply of 1,000,000 tokens minted to the deployer. It includes standard ERC20 functionality and Ownable access control for secure minting. This is part of my builder contribution to the KiiChain Oro Testnet. contract implements a simple stablecoin called KiiDollar with minting functionality for the owner.
Description
Submission Details:
Project: kiiUSD Stablecoin Deployment
Contract Address: 0x9002b809094927b54343eA785487484288Baf990
Activity: Successfully minted 1,000,000 $KIIUSD and tested transfers/minting to multiple wallets on the Oro Testnet.
Type of change
How Has This Been Tested?
deployed the contract using Remix IDE on the KiiChain Oro Testnet. After deployment, I successfully executed the following tests:
Initial Mint: Minted 1,000,000 $KIIUSD to the deployer address.
Transfer Test: Sent tokens to multiple external wallet addresses to verify ERC20 transfer functionality.
Minting Test: Verified the onlyOwner mint function by minting additional tokens to a secondary wallet.