Asset Precision Differences

Overview

BitGo supports the full divisibility of each asset (documented in the Coins and Tokens table). If your platform supports only smaller divisibilities, BitGo must calculate the precision of the maximum and minimum amounts on a per transaction basis. This page provides examples of three assets (ETH, GUSD, and USDT) that you can reference to better understand how BitGo calculates and validates precision.

BitGo uses the following terms when calculating precision:

  • Base Unit - Smallest measurable unit of an asset.
    • Example: A wei.
  • Big Unit - Largest measurable unit of an asset.
    • Example: An ether.
  • Divisibility - Amount of base units per big unit.
    • Example: Ether is divisible by 10-18. Therefore, 1 ether = 1,000,000,000,000,000,000 wei.
  • Precision - Total maximum number of digits that can be used to represent a value.
    • Example: BitGo supports a maximum of 32 digits for any value. Therefore the maximum amount of ether that BitGo can display is 99,999,999,999,999.999999999999999999 ETH.
  • Scale - Number of digits to the right of a decimal in a representation.
    • Example: 1 wei = 0.000000000000000001 ether. Therefore, the scale is 18.

Asset Precision & Trading Units

The following table shows the precision and scale that BitGo uses versus an example partner.

AssetAsset DivisibilityBitGo PrecisionBitGo Scale1Partner PrecisionPartner ScaleBitGo Base Units
(Minimum Trading Unit)
BitGo Base Units
(Maximum Trading Amount)
ETH10¹⁸321828810¹⁰10³¹ - 1
GUSD10²32228510⁰10²⁴ - 1
USDT10⁶32628510¹10²⁸ - 1

Minimum Trading Unit

BitGo uses the following formulas to calculate minimum trading units:

  • BitGo minimum trading big unit = 1/10BitGo scale
  • Partner minimum trading big unit = 1/10partner scale
  • Minimum trading base unit = 10log(asset divisibility) - min(BitGo scale, partner scale)
  • Minimum trading big unit = minimum trading base unit / asset divisibility
USDT
  • BitGo minimum trading big unit: 1/106 = 10-6 USDT
  • Partner minimum trading big unit: 1/105 = 10-5 USDT
  • Minimum trading base unit: 106 - min(6, 5) = 101 = 10 base units
  • Minimum trading big unit: 10/106 = 10-5 USDT
GUSD
  • BitGo minimum trading big unit: 1/102 = 10-2 GUSD
  • Partner minimum trading big unit: 1/105 = 10-5 GUSD
  • Minimum trading base unit: 102 - min(2, 5) = 100 = 1 base unit
  • Minimum trading big unit: 1 / 102 = 10-2 GUSD
ETH
  • BitGo minimum trading big unit: 1/1018 = 10-18 ETH
  • Partner minimum trading big unit: 1/108 = 10-8 ETH
  • Minimum trading base unit: 1018 - min(18, 8) = 1010 = 1010 base units
  • Minimum trading big unit: 1010 / 1018 = 10-8 ETH

Maximum Trading Amount

BitGo uses the following formulas to calculate maximum trading units:

  • Overflow buffer = 102 base units
  • Maximum trading base units = 10min(BitGo precision - BitGo scale, partner precision - partner scale) + log(asset divisibility) - log(overflow buffer) + 1 - 1
  • Maximum trading big units = maximum trading base units / asset divisibility
ETH
  • Calculation: 10min(32 - 18, 28 - 8) + 18 - 2 + 1 - 1 = 10min(14, 20) + 18 - 2 + 1 - 1 = 1014 + 18 - 2 + 1 - 1 = 1031 - 1 base units
  • Maximum trading big units: (1031 - 1) / 1018 ETH
GUSD
  • Calculation: 10min(32 - 2, 28 - 5) + 2 - 2 + 1 - 1 = 10min(30,23) + 2 - 2 + 1 - 1 =1023 + 2 - 2 + 1 - 1= 1024 - 1 base units
  • Maximum trading big units: (1024 - 1) / 102 GUSD
USDT
  • Calculation: 10min(32 - 6, 28 - 5) + 6 - 2 + 1 - 1 = 10min(26,23) + 6 - 2 + 1 - 1 = 1028 - 1 base units
  • Maximum trading big units: (1028 - 1) / 106 USDT

Acceptance Scenarios

Allocate and Deallocate

In this example, a client allocates or deallocates 0.00005 to or from the partner:

  • Client converts: round(0.00005 * 106) = 50
  • BitGo registers: 50
  • 5 mod 10 base units = 0
  • 50 < 1028 - 1 base units → Valid

Trade

In this example, a partner fills a client's trade order of 0.0005 GUSD. However, BitGo only partially fills the trade due to the client accumulating dust that they can't withdraw or deallocate. Specifically:

  • Theres an amount in the partner's trading account that's so small that BitGo doesn't track it in off-chain custody.
  • The client can't withdraw the small amount from the partner because withdrawals can only happen at BitGo after deallocation from the partner.
  • In order for a settlement or deallocation to occur, the amount must be traded away into an amount or currency that's trackable by BitGo.
  • BitGo doesn't account for dust at the partner platform during client and partner reconciliations.

Settlement

In this example, a settlement of 0.00005 USDT occurs between the partner and the client:

  • Partner converts: round(0.00005 * 106) = 50
  • BitGo registers: 50
  • 5 mod 10 base units = 0
  • 50 < 1028 - 1 base units → Valid

In this example, a settlement of 0.0005 GUSD occurs between a partner and client:

  • Partner converts: round(0.0005 * 102) = 0
  • BitGo registers: 0
  • Below minimum unit (10-2 GUSD)
  • Action proceeds as no-op (no change)

Rejection Scenarios

Allocate and Deallocate

In this example, a client attempts to allocate or deallocate 10^26 USDT to or from a partner:

  • Client converts: round(1026 * 106) = 1032
  • BitGo registers: 1032
  • 1032 mod 10 base units = 0 but 1032 > 1028 - 1 base units → Rejected

In this example, a client attempts to allocate or deallocate 0.000005 USDT to or from a partner:

  • Client converts: round(0.000005 * 106) = 5
  • BitGo registers: 5
  • 5 mod 10 base units ≠ 0 → Rejected

Settle

In this example, a partner attempts to settle 0.000005 USDT with a client:

  • Partner converts: round(0.000005 * 106) = 5
  • BitGo registers: 5
  • 5 mod 10 base units ≠ 0 → Rejected

In this example, a partner attempts to settle 10^20 ETH with a client:

  • Partner converts: round(1020 * 1018) = 1038
  • Possible overflow (partner max digits = 20)
  • BitGo registers: 1038
  • 1038 mod 1010 base units =0 but 1038 > 1031 - 1 base units → Rejected

Footnotes

  1. Always equals log(asset divisibility).