Appearance
KNYX and denominations
KNYX is the native token of the KriptoNyx chain. It pays gas, secures the network through staking, and is the base asset of the AMM.
Denominations
| Unit | Value |
|---|---|
| KNYX | The display unit |
aknyx | The base unit — 1 KNYX = 1018 aknyx |
Every amount on chain — balances, transaction values, contract arguments, event data — is an integer in aknyx. There are no decimals at the protocol level. 1.5 KNYX is 1500000000000000000.
This is the same relationship Ethereum has between ether and wei, and the same 18-decimal convention most ERC-20 tokens use.
Converting
js
import { ethers } from 'ethers';
ethers.parseEther('1.5') // 1500000000000000000n
ethers.formatEther(1500000000000000000n) // '1.5'
// A token with different decimals, e.g. 6
ethers.parseUnits('1.5', 6) // 1500000n
ethers.formatUnits(1500000n, 6) // '1.5'Use BigInt, never Number
JavaScript's Number loses integer precision above 253, which is about 0.009 KNYX at 18 decimals. Any arithmetic on raw amounts done with Number silently corrupts ordinary values.
js
Number('1000000000000000001') // 1000000000000000000 — wrong
BigInt('1000000000000000001') // 1000000000000000001n — correctToken decimals vary
Not every token uses 18 decimals. Always read decimals() from the contract rather than assuming:
js
const token = new ethers.Contract(address, [
'function decimals() view returns (uint8)',
'function balanceOf(address) view returns (uint256)',
], provider);
const decimals = await token.decimals();
const raw = await token.balanceOf(account);
console.log(ethers.formatUnits(raw, decimals));On this network, KNYX, KUSD, WKNYX and KNP all use 18. Bridged assets may not — USDT on TRON uses 6, BTC uses 8.
Platform tokens
| Token | Address | Role |
|---|---|---|
| KNYX | native | Gas, staking, governance |
| WKNYX | 0xEaB9208A1b83BB2F85E13Af19E6BB8254Ac0d35b | Wrapped KNYX, for AMM pairs |
| KUSD | 0xf30443F13fd8f9de14Ea632E47bC874422858E9F | Stablecoin |
| KNP | 0x95f79e7d12BBC353991f856C5330D0424E2BA7FD | Farm reward token |
See Contract addresses for the complete list.