Gasless Staking

Regista 11 stakers never hold X Layer gas. They sign one EIP-712 typed-data payload; the x402 facilitator submits the resulting EIP-3009 transferWithAuthorization() on chain and pays the OKB. The user's wallet shows Sign, not Confirm transaction.

The signed payload

The user signs an EIP-712 typed-data envelope that authorizes USDT0 to move from their wallet to the PropMarketHook for this market — and only this market — within a short validity window:

ts
// What the wallet shows the user
{
  types: {
    EIP712Domain: [...],
    TransferWithAuthorization: [
      { name: "from",        type: "address" },
      { name: "to",          type: "address" },
      { name: "value",       type: "uint256" },
      { name: "validAfter",  type: "uint256" },
      { name: "validBefore", type: "uint256" },
      { name: "nonce",       type: "bytes32" },
    ],
  },
  domain: {
    name:    "USD\u20AE0",                  // ← the TUGRIK glyph
    version: "1",
    chainId: 196,                            // X Layer
    verifyingContract: "0x779Ded0c9e1022225f8E0630b35a9b54bE713736",
  },
  primaryType: "TransferWithAuthorization",
  message: {
    from:        userAddress,
    to:          marketAddress,              // the specific hook
    value:       stakeAmountMicros,          // 6-decimal USDT0
    validAfter:  0n,
    validBefore: nowSec + 300n,              // 5-minute window
    nonce:       random32Bytes,              // unique per signature
  }
}

The relay path

The dApp posts the user's signed payload to the x402 facilitator. The facilitator:

  1. Recovers the signer address from the EIP-712 signature.
  2. Confirms the recovered address matches the from field, that to is a legitimate PropMarketHook deployed by the factory, and that the nonce hasn't been consumed.
  3. Submits USDT0.transferWithAuthorization(from, to, value, validAfter, validBefore, nonce, v, r, s) using the server-only relayer wallet — paying X Layer gas in OKB.
  4. Returns the resulting tx hash to the dApp so the UI can link to OKLink.

USDT0 specifics

  • USDT0 is an upgrade of bridged USDT on X Layer. Its EIP-712 domain name uses the U+20AE TUGRIK glyph: USD₮0. The dApp matches this byte-for-byte; using the ASCII T instead will produce a different domain separator and an invalid signature.
  • Decimals: 6. Internal amounts are micros — 5_000_000n means $5.00.
  • validBefore is enforced at chain time, not relay time. The dApp uses a 5-minute window to absorb any wallet signing latency.
  • Each signature consumes a unique nonce. The relayer rejects replays; on-chain nonce-already-used reverts are surfaced to the UI as "Authorization expired".