Skip to main content
This is the most common cause of transfer failures. Read this before building any production integration.

The Problem

Different chains use different decimal precisions for the same token: When bridging tokens, amounts must be converted between these precisions. Small amounts can round to zero during conversion — and a zero-amount transfer fails.

Example: The Dust Problem

Suppose you try to bridge 0.0000001 USDC from NEAR (24 decimals) to Ethereum (6 decimals):
This is called “dust” — amounts so small they disappear during conversion.

How the SDK Protects You

validateTransfer() catches this automatically:
The validation checks that your amount (minus fees) survives the round-trip conversion.

Finding Minimum Amounts

Use these helpers to determine safe transfer amounts:

Building UI Validation

Show users the minimum before they submit:

Handling Errors

The ValidatedTransfer Contains Normalized Amounts

After validation succeeds, the result includes the normalized amount:
Builders use these normalized values internally.

Fees Matter Too

Remember: amount - fee must survive normalization, not just amount. If you’re paying fees from the transfer:

Key Takeaways

  1. Always use validateTransfer() — Never skip validation
  2. Check minimums in your UI — Show users the minimum before they submit
  3. Handle AMOUNT_TOO_SMALL errors — Give users a helpful message
  4. Remember fees reduce the amount — The net amount must survive, not just the gross