The conventions
The contracts call the settlement dollar
usdc on every chain. On Robinhood Chain it is USDG, on Arc it is USDC; both have 6 decimals. On Arc the native gas balance is an 18-decimal view of the same balance; contracts only ever handle the 6-decimal ERC-20.Why quote units exist
Quote assets have different decimals (6 for the dollar and EURC, 18 for synthetics). The curve does its maths in one unit so the constant-product formula and the graduation target read the same for every currency: it multiplies raw amounts byquoteScale on the way in and divides on the way out. graduationQuote is rounded up to a multiple of quoteScale so it is always representable as a raw amount. The indexer stores the same 18-decimal unit in every quote column, so a USDG launch and a wINR launch can be compared without knowing the decimals of either.
Converting between formats
liabilityAt up and mints (usdcIn - fee) * rate / 1e6 rounded down, so a mint followed by a redeem never returns more than it took even with zero fees.
Worked example: an INR launch at 83.5 INR per USD
The oracle reportsrate("INR") = 83.5e18. The factory’s deployed configuration is 375,000,000 virtual tokens, 750,000,000 curve tokens, 250,000,000 pool tokens and a 6,000 USD virtual quote.
The same launch quoted in USDG has
quoteDecimals = 6 and quoteScale = 1e12: virtualQuote = 6000e18, graduationQuote = 12000e18, and a trader who sends usdcIn = 100e6 raw dollars is charged in raw units while the curve accounts 100e18 quote units.
Indexer specifics
- Every
bigintcolumn is returned as a decimal string in GraphQL; hex values (addresses, codes, pool ids) are lowercase. trade.priceQuoteis the execution price of that trade (quoteAmount / tokenAmount);launch.lastPriceQuoteand candles use the spot price after the trade (the curve formula, or the pool price derived fromsqrtPriceX96after graduation).priceUsdisnulluntil a rate for the launch’s currency has been indexed. USD launches userate = 1e18.crBpsis2^256 - 1when a vault has no liability, exactly asFxVault.status()returns it.