From 43211f185f856de8e9952673baa7b80789211b59 Mon Sep 17 00:00:00 2001 From: r-near <163825889+r-near@users.noreply.github.com> Date: Tue, 3 Feb 2026 18:30:06 +0000 Subject: [PATCH] fix(docs): address PR feedback on decimal examples - Fix text/example mismatch in dust problem section - Fix math error (10^17 / 10^6 = 10^11) - Update token table with verified real-world data - Add ZEC as example of token under max (8 decimals) --- docs/core-concepts/decimals.mdx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/core-concepts/decimals.mdx b/docs/core-concepts/decimals.mdx index 0bfbb14f..93cddca4 100644 --- a/docs/core-concepts/decimals.mdx +++ b/docs/core-concepts/decimals.mdx @@ -17,25 +17,26 @@ Different chains use different decimal precisions for the same token. The bridge | EVM | 18 | | Solana | 9 | -For example, bridged tokens on NEAR keep their original decimals: +For example, bridged tokens keep their original decimals unless they exceed the chain maximum: -| Token | Ethereum | NEAR | Solana | -|-------|----------|------|--------| -| USDC | 6 decimals | 6 decimals | 6 decimals | -| WETH | 18 decimals | 18 decimals | 8 decimals (capped from 18) | -| wNEAR | 24 decimals | 24 decimals | 9 decimals (capped from 24) | +| Token | Origin | NEAR | Solana | +|-------|--------|------|--------| +| USDC | 6 (Ethereum) | 6 | 6 | +| WETH | 18 (Ethereum) | 18 | 9 (capped) | +| wNEAR | 24 (NEAR) | 24 | 9 (capped) | +| ZEC | 8 (Zcash) | 8 | 8 | 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 (6 decimals) to Solana (6 decimals), but with a very small fee: +Suppose you try to bridge a tiny amount of wNEAR from NEAR (24 decimals) to Ethereum (18 decimals): ```typescript // wNEAR bridged to Ethereum: 24 decimals → 18 decimals // On NEAR: 0.0000001 wNEAR = 100000000000000000 (24 decimals) -// Converted to Ethereum: rounds down to 10000000000 (18 decimals) -// If this is smaller than fees, transfer fails +// Converted to Ethereum: 100000000000 (18 decimals) = 0.0000001 wNEAR +// If amount after fees is too small, transfer fails ``` This is called "dust" — amounts so small they disappear during conversion.