Skip to content

Pay gas in any token

Users don't need native ETH at all — they can pay gas in any ERC-20. The user signs an exact fee; the on-chain KryardDelegate transfers that token amount to the relayer as the batch's final step.

How it works

  1. Kryard quotes a token fee off-chain (gas × price × rate × margin).
  2. The user signs the batch including the exact gasToken + gasTokenAmount — so the relayer can never inflate it.
  3. KryardDelegate.executeWithGasReimbursement runs the batch, then transfers the token fee to the relayer and emits GasReimbursed(relayer, gasToken, amount).
  4. Kryard records the token usage; query it via token_usage.

Usage

Add gasToken, gasTokenAmount, and relayer to sponsorExecute:

ts
await sponsorExecute({
  client, signer, chainId, signWith, delegateAddress, calls, nonce,
  gasToken: USDC,
  gasTokenAmount: 50_000n,   // Kryard quotes this off-chain
  relayer: RELAYER_ADDRESS,  // the address the relayer signs with on this chain
});

The user signs the fee

The fee is part of the digest the user signs — it is cryptographically fixed. A relayer cannot charge more than the user agreed to. The user must hold enough of gasToken and have approved the delegate to move it where required.

Verifying settlement

The reimbursement is observable two ways:

  • On-chain: the GasReimbursed event on the transaction.
  • Off-chain: the org's token_usage rollup reflects the gas_token / gas_token_amount recorded for the activity.

Wallet infrastructure for gasless, sponsored transactions — a Turnkey-compatible signer and a managed EIP-7702 relay.