Dym Token Amounts From Raw Balances
Updated -
Dym token amounts come from dividing Dymension's native adym balances by 10^18, the scale separating base units from displayed DYM. Keep the full integer during the calculation, then round only for presentation. This changes the unit and number format; it does not move tokens or change their ownership. A meaningful comparison also uses the same account, network, and balance category, because liquid holdings and delegated holdings describe different states.
The Token Quantity Behind an Adym Balance
A raw adym balance counts base units of Dymension's native token in a particular balance record. The amount field states how many units the record contains, while its denomination identifies the asset those units belong to. The long integer and the DYM display express the same quantity in different units. Converting between them leaves the asset and the balance record unchanged.
A RollApp's own token needs its own denomination metadata, even when an interface shows both assets together.
How Do You Convert Adym Into DYM?
Convert native adym into DYM by dividing the complete raw amount by 10^18, provided the input actually uses Dymension's native base denomination. The formula is DYM amount = raw adym amount / 10^18. No token price enters this calculation. The divisor describes a unit scale, so changes in market valuation leave it unchanged.
Decimal positioning gives the same answer without requiring an approximate calculator result. The integer quotient supplies whole tokens, and the remainder supplies the fractional portion. Write that remainder with 18 digits, adding leading zeros when necessary. A raw amount shorter than 18 digits needs zeros after the decimal point before its original digits. Compact displays can drop trailing fractional zeros without changing the value. Multiplying an exact DYM amount by 10^18 reverses the conversion.
A Raw Balance Change Expressed in DYM
A hypothetical comparison uses two native adym balance snapshots for the same account and category, with a display limited to six decimal places. Applying the 18-decimal scale expresses their difference in DYM.
The first raw amount is 3,847,162,000,000,000,002 adym. Dividing it by 10^18 gives exactly 3.847162000000000002 DYM. The second amount is 4,129,753,000,000,000,002 adym, equivalent to 4.129753000000000002 DYM. Their difference is 282,591,000,000,000,000 adym, or 0.282591 DYM.
At six decimal places, the displays show 3.847162 DYM and 4.129753 DYM. Each shortened display hides two adym, although their difference remains exact here because both amounts have the same discarded fractional tail. This comparison assumes the same native asset and matching balance categories. The arithmetic alone does not identify which activity caused the difference between snapshots.
Exact Arithmetic Before Display Rounding
Exact arithmetic preserves the original integer before any display rounding, allowing a calculation to distinguish neighboring base-unit amounts even when their visible decimals match. One adym equals 0.000000000000000001 DYM. That resolution belongs to the native denomination; the number of digits an interface displays is a separate formatting choice.
Calculator Precision
Calculator precision determines whether a conversion retains every base unit. Large native balances require a representation capable of holding their entire integer value. Once an earlier calculation loses digits, moving the decimal point cannot restore them.
Integer Storage
JavaScript's Number type cannot preserve every integer above 9,007,199,254,740,991. Software handling raw balances should retain the original decimal string or use an arbitrary-precision integer. Converting an already rounded Number into BigInt cannot reconstruct discarded digits.
Decimal Formatting
BigInt division discards the fractional remainder. Exact DYM formatting therefore needs both the integer quotient and remainder, or decimal arithmetic with sufficient precision. A string formatter can position the decimal point without converting the balance into a floating-point number. Leading fractional zeros keep the scale correct.
Visible Precision
Display rounding changes how many fractional digits a reader sees. Rounding chooses a nearby value at the selected precision; truncation simply cuts off later digits. Either method can conceal small holdings or narrow differences between balances. Keep the raw integer for exact equality checks and accounting totals. Two matching rounded displays can still represent different underlying amounts, so their visible equality does not establish equality at base-unit precision.
Why Can a Wallet Show a Different DYM Amount?
A wallet can show a different DYM amount because its display rounds digits, reads a different snapshot, or includes a different balance category.
Account and network context identify the record under comparison. A balance from another account cannot reconcile the selected account's holdings. Records from different block heights can also differ when activity changes the balance between queries. A native adym record belongs to Dymension's native token; a matching ticker on another network does not establish the denomination or scale of that network's record. Compare the actual asset and amount fields before treating the displayed figures as equivalents.
Dymension's bank balances and validator delegations describe different records, so a staking total does not substitute for the account's bank balance. An aggregate holdings figure can include quantities absent from a single balance field. Refreshing a display may address an older snapshot, but matching the field's meaning requires choosing the corresponding category. The original amounts and their query context help identify the cause of a remaining difference.
Token Quantity, Spendable Funds, and Valuation
A calculated DYM amount establishes the quantity in the selected record. It does not release delegated holdings or turn a combined holdings total into spendable funds. A currency valuation needs an additional input: a price quoted per DYM in the desired currency. Multiplying quantity by that price produces a quoted valuation, whose meaning depends on the price and its timing. That figure differs from proceeds a sale may produce. For a transfer amount, use the spendable native balance and the transaction's applicable fee.
Questions people ask about Dym
Can I Convert a Raw DYM Balance Without Connecting a Wallet?
You can convert a raw DYM balance from its amount and denomination without connecting a wallet. The arithmetic requires no transaction signature, recovery phrase, or private key. Accessing an account record and authorizing a transaction are separate actions from expressing its quantity in DYM. A request for secret wallet credentials adds nothing to this calculation.
What Happens If a DYM Amount Has More Than 18 Decimal Places?
A native DYM amount needs an integer number of adym for an exact base-unit representation. Extra trailing zeros leave its value unchanged. Nonzero digits beyond the eighteenth decimal place describe fractions of one adym, so that amount has no exact native integer representation. Rounding it changes the requested quantity; the chosen rounding policy must make that change explicit.
Can I Add Native Adym Balances Before Converting the Total?
You can add native adym balances with exact integer arithmetic before converting the sum into DYM. This gives the same total as adding their full-precision DYM equivalents. Include each relevant record once, and keep the intended balance categories consistent. Adding an aggregate total to the entries it already includes would count some holdings twice.
Does a Negative DYM Balance Change Mean the Balance Itself Is Negative?
A negative DYM balance change describes a decrease between snapshots, not a negative native coin balance. Subtracting the earlier raw amount from the later amount can produce a negative difference even when both balances are nonnegative. Identifying the cause requires the intervening activity records; unit conversion supplies the size of the change.
How Can I Tell Whether Scientific Notation Preserves a Raw DYM Amount?
Scientific notation preserves a raw adym amount if its coefficient and exponent encode the original integer exactly. A shortened coefficient can omit digits the original integer contained. Expanding that notation changes the format, but it cannot recover information already lost. Use the original integer text for an exact conversion when a calculator or export shows only a shortened numeric display.
Are Quotation Marks Around an Adym Amount Part of the Number?
Quotation marks surrounding an amount in JSON mark a text string and do not form part of its numeric value. Parse the field's contents as the integer amount while retaining every digit. A numeric string can preserve a large balance exactly. Converting that string through a floating-point number can lose precision even though the original text remains correct.
How Should I Parse a DYM Amount Written With a Decimal Comma?
A decimal comma separates whole tokens from fractional tokens, while a grouping comma separates digit groups. Identify the number's formatting convention before normalizing it for a calculator. Removing every comma can turn a fractional token amount into a different integer value. Native adym integer fields and formatted DYM decimal fields require different parsing rules.