Skip to main content
Every amount on Windrose is one of a handful of formats. Get these right once and every contract call, event and indexer column reads the same way. The worked examples at the end walk one INR launch through all of them.

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 by quoteScale 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

The vault rounds 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 reports rate("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 bigint column is returned as a decimal string in GraphQL; hex values (addresses, codes, pool ids) are lowercase.
  • trade.priceQuote is the execution price of that trade (quoteAmount / tokenAmount); launch.lastPriceQuote and candles use the spot price after the trade (the curve formula, or the pool price derived from sqrtPriceX96 after graduation).
  • priceUsd is null until a rate for the launch’s currency has been indexed. USD launches use rate = 1e18.
  • crBps is 2^256 - 1 when a vault has no liability, exactly as FxVault.status() returns it.
See GraphQL conventions for pagination, filters and table names.