Skip to main content
This guide demonstrates how to implement gas sponsorship on Cosmos networks using fee grants. Unlike EVM chains that use account abstraction for gasless transactions, Cosmos networks natively support gas sponsorship through fee grants, allowing a grantor address to pay for another account’s transaction fees.

Prerequisites

Understanding Fee Grants

Fee grants in Cosmos allow one account (grantor) to pay transaction fees for another account (grantee). This mechanism provides native gas sponsorship without requiring smart contracts or account abstraction. Key concepts:
  • Grantor: The account that pays for gas fees
  • Grantee: The account whose transactions are sponsored
  • Allowance: Defines spending limits and expiration for the grant
Only one fee grant is allowed per granter-grantee pair. Self-grants are not permitted.

Creating a Basic Fee Grant

Create a basic allowance to grant gas sponsorship to another address:

Using Fee Grants as a Grantee

Once a fee grant is established, the grantee can perform transactions with sponsored gas fees:

Querying Fee Grants

Check existing grants before creating new ones:

Other Allowance Types

Periodic Allowance

Resets spending limits periodically:

Allowed Message Allowance

Restricts which message types can be sponsored:

Revoking Fee Grants

Remove a fee grant when it’s no longer needed:

Advanced: Server-Controlled Gas Sponsorship

For production applications, use server-side controlled wallets as grantors while allowing users to authenticate client-side as grantees. This pattern uses Para’s pregenerated wallets to create an app-controlled grantor wallet.

Server-Side Setup

Create and manage a grantor wallet on your server:

API Endpoint for Creating Grants

Client-Side Integration

Complete Server Implementation

Best Practices

  • Set appropriate spending limits based on expected transaction volume
  • Use expiration times to automatically clean up unused grants
  • Monitor grant usage to control costs and detect abuse
  • Consider using periodic allowances for regular users
  • Use allowed message allowances to restrict transaction types
  • Remember that creating and revoking grants also incur gas costs
Fee grants provide native gas sponsorship on Cosmos networks without requiring smart contracts, making them more efficient than EVM account abstraction solutions.