Skip to main content

Native Token Handling

KAS is the native currency of the Kasplex blockchain (similar to ETH on Ethereum). Since AMM smart contracts operate exclusively with ERC-20 tokens, KAS is wrapped as WKAS (Wrapped KAS) for on-chain operations.

KAS vs WKAS

KASWKAS
TypeNative currencyERC-20 token
Used forGas fees, transfersDEX operations
Address (display)0x0000...0000Contract address
Decimals1818
Conversion1 KAS = 1 WKAS (always)1 WKAS = 1 KAS (always)

WKAS Contract Addresses

NetworkWKAS Address
Mainnet0x2c2Ae87Ba178F48637acAe54B87c3924F544a83e
Testnet0xC065C62a10fB363fD31CA394D632C4Df106566df

How Wrapping Works

WKAS is a simple deposit/withdraw contract:
  • Wrap: Send KAS to the WKAS contract → receive equal WKAS
  • Unwrap: Call withdraw() on WKAS → receive equal KAS
The Universal Router handles this automatically during swaps. Users never need to wrap or unwrap manually.

Token Representation

In the Kroko DEX system, tokens have two address fields:
FieldKAS ValueERC-20 ValueUsed For
address0x0000...0000Token contract addressDisplay, storage keys, balance queries
dexAddressWKAS addressSame as addressAll DEX operations (swaps, quotes, liquidity, approvals)

When Calling APIs

Always use the WKAS address (not the zero address) when calling the Quote or Swap APIs with KAS as input or output:
// Correct: use WKAS address for KAS
const WKAS = "0x2c2Ae87Ba178F48637acAe54B87c3924F544a83e";
fetch(`/api/v1/quote?tokenIn=${WKAS}&tokenOut=${USDC}&amountIn=1000000000000000000`);

// Wrong: zero address will not work
fetch(`/api/v1/quote?tokenIn=0x0000000000000000000000000000000000000000&...`);

Sending Native KAS in Swaps

When KAS is the input token, include the amount as the transaction value:
const tx = await signer.sendTransaction({
  to: swapData.to,
  data: swapData.data,
  value: swapData.value  // Non-zero when selling KAS
});
The Swap API automatically sets the value field when it detects WKAS as the input token.