HUMAN vs RAW amounts

This section explains the key ideas that power Emigro’s on-chain quoting and swap system. Understanding these ensures you interpret responses correctly and construct valid transactions.


HUMAN vs RAW Amounts

Tokens on EVM chains store balances as integer values — the so-called RAW amounts. However, users interact in HUMAN amounts (e.g., 100.00 USDC).

Concept
Description
Example

HUMAN

Readable amount, adjusted for decimals

100.00

RAW

Actual integer used on-chain

100000000 (if decimals = 6)

The API always provides both:

  • humanAmountIn / humanAmountOut → displayed to users

  • amountIn / amountOut → used in calldata

⚠️ Always use RAW values when building calldata. The API does this automatically in /public/emigroswap/buildTransaction.

Last updated