Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Stablecoin FX Layer

This page is the technical reference for the Stablecoin FX Layer. The FX Layer is a set of Uniswap v4 pools on Ethereum. Each pool pairs a stablecoin with USDS, and the Spark Liquidity Layer (SLL) provides the liquidity.

Architecture

  • Uniswap v4 pools. Each pool is a standard Uniswap v4 pool, held in the singleton PoolManager and identified by a 32-byte pool ID: keccak256(abi.encode(PoolKey)).
  • Positions held by the ALM Proxy. Spark's liquidity positions are Uniswap v4 position NFTs. They are minted through the PositionManager and owned by the Ethereum ALMProxy.
  • Managed through the ALM Controller. The SLL relayer mints, increases and decreases positions and swaps through the pools by calling MainnetController. See Spark ALM Controller.
  • USDS as the hub. Every pool pairs a stablecoin with USDS. USDS converts 1:1 to and from USDC through the Sky PSM, so routers can reach any FX Layer stablecoin from USDC in two hops.

Contracts (Ethereum)

ContractAddress
Uniswap v4 PoolManager0x000000000004444c5dc75cB358380D2e3dE08A90
Uniswap v4 PositionManager0xbD216513d74C8cf14cf4747E6AaA6420FF64ee9e
Spark MainnetController0x5c46Fc65855c0C7465a1EA85EEA0B24B601502D3
Spark ALMProxy0x1601843c5E9bC251A3272907010AFa41Fa18347E
Spark RateLimits0x7A5FD5cf045e010e62147F065cEAe59e5344b188

The Spark Address Registry is the canonical source for Spark addresses. Uniswap addresses are listed in the Uniswap v4 deployments.

Pools

PoolPool IDFeeTick spacingHooksTick limitsOnboarded
PYUSD / USDS0xe63e32b2ae40601662f760d6bf5d771057324fbd97784fe1d3717069f7b75d450.0005%1None276,314 to 276,334January 29, 2026 spell
USDT / USDS0x3b1b1f2e775a6db1664f8e7d59ad568605ea2406312c11aef03146c0cf89d5b90.0005%1None276,304 to 276,344January 29, 2026 spell
RLUSD / USDS0x9035721b23481db3888fd201b9c2b26dbc3af60258bca65e669f2ed98dc8eb4f0.0005%1None-10 to 10August 13, 2026 spell

Uniswap app pages:

Reading the Tick Limits

Uniswap v4 sorts the two currencies by address. The price is currency1 per currency0 in raw units, so par depends on token order and decimals:

  • PYUSD / USDS and USDT / USDS. The 6-decimal stablecoin is currency0 and USDS (18 decimals) is currency1. Par is about tick 276,324, the raw price of 10^12.
  • RLUSD / USDS. Both tokens have 18 decimals, so par is tick 0.

At this scale, 10 ticks is about 0.1%. The PYUSD and RLUSD tick limits allow Spark's liquidity within about ±0.1% of par. The USDT limits allow about ±0.2%.

Spark Liquidity Layer Controls

Every action Spark takes in an FX Layer pool goes through MainnetController and is bounded by governance-set parameters.

Pool Whitelist and Tick Limits

uniswapV4TickLimits(poolId) returns (tickLowerMin, tickUpperMax, maxTickSpacing). Spark can only mint or increase positions with ticks inside that range and with a width of no more than maxTickSpacing. A pool without configured limits and rate limits can't be used, and calls revert.

Rate Limits

Each pool has three rate-limit keys, built as keccak256(abi.encode(LIMIT, poolId)) on the RateLimits contract:

  • LIMIT_UNISWAP_V4_DEPOSIT: adding liquidity.
  • LIMIT_UNISWAP_V4_WITHDRAW: removing liquidity.
  • LIMIT_UNISWAP_V4_SWAP: swaps by Spark through the pool.

Each key has a maxAmount ceiling and a slope that refills the limit over time, both in USDS terms at 18 decimals. Read the current values with getRateLimitData(key) or getCurrentRateLimit(key). See Rate Limits for how the limits work.

Slippage Floor

Each pool has a maxSlippage setting on the controller. It is currently 0.999e18 for every FX Layer pool, so a swap or position change must return at least 99.9% of the expected value. A value of 0 disables the integration.

Hookless, 1:1 Pools Only

The current controller integration supports only 1:1 stablecoin pools without hooks.

Adding a Pool

A new FX Layer pool goes through these steps:

  1. Create the pool. The Uniswap v4 pool is initialized through the PositionManager, so its PoolKey can be read onchain.
  2. Governance proposal. Spark posts the pool ID, tick limits, rate limits and slippage floor on the Sky Forum for the upcoming spell.
  3. Spell execution. The Spark spell sets the tick limits, the three rate limits and maxSlippage on MainnetController, using SLLHelpers.configureUniswapV4Pool in spark-spells.
  4. Seeding. After the spell executes, the SLL relayer can mint positions and swap within the configured limits.

Issuers who want to join the FX Layer can contact Spark.

Verifying a Pool Onchain

  • Pool configuration: call PositionManager.poolKeys(bytes25(poolId)) for currency0, currency1, fee, tickSpacing and hooks.
  • Spark's limits: call MainnetController.uniswapV4TickLimits(poolId), and RateLimits.getRateLimitData with the three keys above.
  • Spark's positions: list the PositionManager NFTs owned by the ALMProxy. For each one, call getPoolAndPositionInfo(tokenId) and getPositionLiquidity(tokenId).