Skip to main content

Fees and Meta-Transactions

SodaPop supports gasless owner settings through relayer-driven calls.

Supported Operations

  • setFeeMetaTx via:
    • Client: POST /fees/set-meta
    • Integration: POST /integration/fees/set-meta
  • setPayoutMetaTx via:
    • Client: POST /fees/set-payout-meta
    • Integration: POST /integration/fees/set-payout-meta

Validation Logic

Backend verifies:

  1. Nonce correctness (factory.nonces(owner) expected value).
  2. Signature deadline not expired.
  3. EIP-712 signature matches owner wallet.

SetFee Typed Data

const types = {
SetFee: [
{ name: 'user', type: 'address' },
{ name: 'feeBps', type: 'uint256' },
{ name: 'nonce', type: 'uint256' },
{ name: 'deadline', type: 'uint256' },
],
} as const;

SetPayout Typed Data

const types = {
SetPayout: [
{ name: 'user', type: 'address' },
{ name: 'payout', type: 'address' },
{ name: 'nonce', type: 'uint256' },
{ name: 'deadline', type: 'uint256' },
],
} as const;

Best Practices

  • Fetch fresh nonce before signing.
  • Use narrow deadline windows (for example 1 hour).
  • Retry only after re-fetching nonce when backend rejects with nonce mismatch.