Skip to main content

Format Specification

LeoKit uses a standardized asset identifier format across all supported blockchains:

Components

Separator Rules

  • Period (.) separates CHAIN from SYMBOL
  • Hyphen (-) separates SYMBOL from ADDRESS
  • No hyphen for native assets (CHAIN.SYMBOL only)

Native Assets

Native assets are the base currency of their blockchain and don’t have a contract address.

Bitcoin & UTXO Chains

Ethereum & EVM Chains

Cosmos Chains

Other Chains

Token Assets

Token assets include a contract address after the hyphen separator.

ERC-20 Tokens (Ethereum)

Format Notes:
  • Address is 42 characters (0x + 40 hex digits)
  • Checksummed addresses preferred
  • Case-insensitive but checksum validation applied

BEP-20 Tokens (BSC)

Format Notes:
  • Same address format as Ethereum (EVM compatible)
  • Different contract addresses than Ethereum versions

Arbitrum Tokens

Polygon Tokens

Base Tokens

Avalanche Tokens

NEAR Tokens

NEAR tokens use account names as addresses, which can include periods and hyphens.
Format Notes:
  • Contract addresses can contain periods and hyphens
  • Parsing requires finding the FIRST hyphen after the symbol
  • Example: NEAR.USDC-a0b86991...bridge.near
    • Chain: NEAR
    • Symbol: USDC
    • Address: a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48.factory.bridge.near

THORChain Synths

THORChain synthetic assets represent assets backed by collateral in THORChain pools.
Format Notes:
  • No address component (similar to native assets)
  • Backed by THORChain liquidity pools
  • Can be swapped instantly on THORChain

Parsing Logic

Detecting Native vs Token Assets

Extracting Components

Handling Edge Cases

Validation Rules

Chain Validation

Address Validation

Common Patterns

Same Token, Different Chains

USDC exists on multiple chains with different addresses:

Wrapped Native Assets

Some chains use wrapped versions of native assets:

Bridged Assets

Bridged assets maintain their symbol but use different addresses:

Best Practices

  1. Always validate chain support before accepting asset identifiers
  2. Use case-insensitive comparison for chain names
  3. Preserve address checksums when displaying to users
  4. Handle NEAR contract names specially (they can contain hyphens)
  5. Cache asset metadata (decimals, symbols) to avoid repeated lookups
  6. Normalize inputs by trimming whitespace and converting chain to uppercase
  7. Validate address formats per chain type before API calls
  8. Document token versions (native vs bridged) in your UI

Example Usage

Quote Request

Deposit Request

Asset Display