DEV Community

Robert
Robert

Posted on

How to Read Per-Asset Swap Limits in Satoshis

Read a per-asset swap limit by converting its base-unit number into the asset’s ordinary amount using that asset’s decimal scale. Then compare that amount with what you plan to send on the chosen network; the limit applies to a particular asset and can differ across assets or change over time.

A swap limit is an exact unit count

A base unit is the smallest amount a blockchain or token contract records. Bitcoin uses satoshis: 1 BTC equals 100,000,000 sats. Ethereum records ETH in wei: 1 ETH equals 1,000,000,000,000,000,000 wei.

Limits are often stored as whole-number counts of these small units. That avoids rounding errors from decimal arithmetic: a system can compare two exact integers instead of relying on how software represents a number such as 0.00000001.

A minimum and maximum describe the allowed sending range for the specified asset and network. For example, a hypothetical BTC minimum of 50,000 sats is 0.0005 BTC, while a maximum of 4,000,000 sats is 0.04 BTC. Those figures are examples, not current limits for a service.

Convert each asset with its own decimal scale

To convert a base-unit count into the displayed amount, divide by the number of base units in one whole asset. For BTC, divide sats by 100,000,000; for ETH, divide wei by 1018. Token scales come from the specific token contract, so a symbol alone is not enough to determine the conversion.

For instance, a hypothetical USDC limit of 20,000,000 base units equals 20 USDC if that particular token contract uses six decimal places. If the contract uses a different scale, the same integer means a different displayed amount. Check the asset and network together before converting.

This is why you cannot compare raw limit integers across assets. A number of 20,000,000 could mean a fraction of a BTC, 20 USDC, or a tiny fraction of an ETH, depending on the asset’s unit scale.

Compare the limit with what leaves your wallet

Check the amount you will send against the minimum and maximum for the input asset, not the asset you hope to receive. In a BTC-to-USDC swap, for example, the relevant sending limit is stated in BTC’s base unit; the expected USDC output does not determine whether the BTC deposit meets that range.

Suppose you plan to send 0.015 BTC and the displayed minimum is 1,000,000 sats. Convert the amount you plan to send: 0.015 × 100,000,000 = 1,500,000 sats. It clears that example minimum, but you would still need to compare it with the applicable maximum and account for any other stated requirements.

Chainflip swaps native assets across blockchains, so the same habit applies when checking a swap’s sending asset: identify the network and asset, convert the limit, and compare it with the deposit amount. A limit is a boundary for the amount sent; it does not tell you the exchange rate, final output, or fees.

Check fresh limits before you send

Limits can change, and the relevant value may depend on the source network, asset, and current protocol settings. Check the current range close to the time you make the swap, then verify that the amount you intend to send is inside it. Do not reuse an old screenshot or a limit remembered from a previous transaction.

Take particular care when a displayed value is a long integer. Confirm whether it is labelled in sats, wei, or a token’s base units, and keep enough decimal places when converting back. Rounding a minimum down or a maximum up can make an amount appear valid when it is outside the actual boundary.

Common questions about base-unit limits

Does the limit apply to the amount before fees?

Usually, a sending limit refers to the amount the swap service receives as the deposit, but the exact definition depends on the service. Network transaction fees may be paid separately from your wallet balance, while swap fees may affect the amount received. Check how the specific service defines its limit before sending.

Why can the same token have different limits on two networks?

A token on one network is a distinct on-chain asset from a token with the same symbol elsewhere. Its contract, decimal scale, liquidity, and operational requirements can differ. Always select the network and token contract that match the asset you will actually send, then read the limit for that combination.

Can I round a converted limit to make it easier to read?

Rounding is useful for understanding the rough size, but use the exact base-unit value when checking whether an amount qualifies. If the converted minimum is 0.00050001 BTC, rounding it to 0.0005 BTC hides a one-satoshi difference. Aim comfortably inside the valid range when possible.

What should I do if my amount is outside the range?

Do not send it as-is. Adjust the amount so it falls within the current minimum and maximum, or choose another route that supports the amount. Before proceeding, check the service’s stated handling for deposits outside its range; outcomes vary, and you should not assume an out-of-range transfer will be returned automatically.

Before your next swap, write down the network, asset, unit scale, and current minimum and maximum, then compare them with the amount in your wallet. If you are preparing a cross-chain transfer, how to use Chainflip offers a place to continue from the general process; check the live details before sending.

Top comments (0)