Kaia Compatible Tokens (KCTs)
Kaia Compatible Token (KCT) is a special type of smart contract that implements certain technical specifications. Everyone who wants to issue tokens on top of Kaia must follow the specification.
Token standards are defined in Kaia such as KIP-7 and KIP-17.
Other KCTs can be defined to meet certain technical specifications. If anyone needs other token standards, please visit Kaia Improvement Proposal and propose a new token standard.
Fungible Token Standard (KIP-7)
Fungible tokens are tokens that have properties of uniformity and divisibility. Every fungible token is interchangeable as each unit of token possesses the same value. Just like every dollar bill has the same value of one dollar. Since fungibility is essential feature to crypto currency in most cases, large proportion of blockchain tokens are fungible tokens.
To implement these properties with smart contracts, KIP-7 token standard can be used. KIP-7-compatible tokens implement the following interface. Please note that KIP-13 must be implemented together. For wallet applications, wallet interface can be implemented.
// IKIP7event Transfer(address indexed from, address indexed to, uint256 value);event Approval(address indexed owner, address indexed spender, uint256 value);function totalSupply() external view returns (uint256);function balanceOf(address account) external view returns (uint256);function transfer(address recipient, uint256 amount) external returns (bool);function allowance(address owner, address spender) external view returns (uint256);function approve(address spender, uint256 amount) external returns (bool);function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);function safeTransfer(address recipient, uint256 amount, bytes data) external;function safeTransfer(address recipient, uint256 amount) external;function safeTransferFrom(address sender, address recipient, uint256 amount, bytes data) external;function safeTransferFrom(address sender, address recipient, uint256 amount) external;// IKIP7Metadata (optional)function name() external view returns (string memory);function symbol() external view returns (string memory);function decimals() external view returns (uint8);// IKIP7Mintable (optional)function mint(address _to, uint256 _amount) external returns (bool);function isMinter(address _account) external view returns (bool);function addMinter(address _account) external;function renounceMinter() external;// IKIP7Burnable (optional)function burn(uint256 _amount) external;function burnFrom(address _account, uint256 _amount) external;// IKIP7Pausable (optional)event Paused(address _account);event Unpaused(address _account);function paused() external view returns (bool);function pause() external;function unpause() external;function isPauser(address _account) external view returns (bool);function addPauser(address _account) external;function renouncePauser() external;
Based on the interface above, developers may customize tokens by adding new features and logics, and deploy them on Kaia network.
For more information, refer to the official KIP-7 documentation.
- An example implementation is available at https://github.com/kaiachain/kaia-contracts/blob/main/contracts/KIP/token/KIP7/KIP7.sol.