Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/BlockRazorinc/docs_en/llms.txt

Use this file to discover all available pages before exploring further.

Gas Sponsor is a BlockRazor service that removes one of the most common friction points in Web3: requiring users to hold native tokens before they can do anything on-chain. With Gas Sponsor enabled, BlockRazor pays the gas fee for your users’ transactions directly — your users interact with the blockchain without needing BNB, ETH, or SOL in their wallets. This dramatically improves onboarding conversion rates and creates a smoother trading experience for new users arriving from Web2 backgrounds.

Why Gas Sponsorship Matters

Remove the Onboarding Barrier

New users often abandon Web3 apps when prompted to acquire native tokens just to pay gas. Gas Sponsor eliminates this step entirely.

Improve Trading UX

DEXs and trading bots can abstract gas costs away from users, letting them focus on execution rather than fee management.

Wallet Integration

Wallets can sponsor the first N transactions for new accounts, creating a frictionless activation experience.

Flexible Cost Model

You control which transactions are sponsored and under what conditions, keeping your sponsorship budget predictable.

Supported Chains

Solana

Sponsor SOL fees for transactions on the Solana network.

BSC

Sponsor BNB gas fees for transactions on BNB Smart Chain.

Ethereum

Sponsor ETH gas fees for transactions on the Ethereum mainnet.

Integration Flow

1

Authenticate and request sponsorship

Your backend calls the BlockRazor Gas Sponsor API with your auth token and the unsigned transaction details. BlockRazor evaluates the request and returns a sponsorship commitment.
curl -X POST https://api.blockrazor.io/gas-sponsor/request \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -d '{
    "chain": "bsc",
    "from": "0xUSER_WALLET_ADDRESS",
    "to": "0xCONTRACT_ADDRESS",
    "data": "0xCALLDATA",
    "value": "0x0"
  }'
{
  "sponsorshipId": "spo_a1b2c3d4e5f6",
  "expiresAt": 1718000000,
  "sponsoredGasLimit": "0x5208",
  "paymaster": "0xBLOCKRAZOR_PAYMASTER_ADDRESS"
}
2

Submit the sponsored transaction

Sign the transaction on the client side (the user’s wallet signs only the transaction payload — not the gas fee). Include the sponsorshipId returned in step 1 so BlockRazor can match the fee payment to the correct transaction.
curl -X POST https://api.blockrazor.io/gas-sponsor/submit \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -d '{
    "sponsorshipId": "spo_a1b2c3d4e5f6",
    "signedTransaction": "0xSIGNED_TX_HEX"
  }'
{
  "txHash": "0xABC123...",
  "status": "submitted"
}
3

BlockRazor pays the fee and broadcasts the transaction

BlockRazor’s paymaster contract or fee account covers the native gas cost and submits the transaction to the network. The transaction appears on-chain exactly as the user intended — with BlockRazor’s address paying the fee in the background.
{
  "txHash": "0xABC123...",
  "blockNumber": 38472910,
  "gasUsed": "0x5208",
  "gasSponsor": "0xBLOCKRAZOR_PAYMASTER_ADDRESS",
  "status": "confirmed"
}

Key Concepts

Sponsorship ID

A unique token returned when you request sponsorship. It ties the fee commitment to a specific transaction, preventing replay attacks.

Expiry Window

Sponsorship commitments expire after a short window. Submit the signed transaction before expiresAt to ensure the sponsorship is valid.

Paymaster Address

BlockRazor’s on-chain paymaster address that actually sends the gas fee. You can verify it on-chain after the transaction confirms.

Sponsorship Scope

You can restrict sponsorship to specific contract addresses, method selectors, or user segments using your account’s sponsorship policy settings.
Gas Sponsor is available to all registered BlockRazor users. Check the Pricing page for sponsorship volume limits and costs associated with your plan.
Need an auth token to get started? Follow the Authentication guide to create your BlockRazor account and generate credentials.

Build docs developers (and LLMs) love