Skip to content

Paymaster Management

Paymasters in Slot allow you to sponsor transaction fees for your applications, enabling gasless experiences for your users. You can manage budgets, policies, and monitor usage through the Slot CLI.

Prerequisites

Make sure you are authenticated with Slot:

slot auth login

Team Setup

Before creating a paymaster, you need a team with sufficient credits.

Create a Team (if it doesn't exist)

slot teams <team-name> create --email <your-email@example.com>

Fund Your Account and Transfer to Team

Paymasters automatically deduct from your team's account balance when created. If you don't have sufficient credits:

# Buy credits for your account (opens browser)
slot auth fund
 
# Transfer credits to your team 
slot auth transfer <team-name> --credits <amount>

Creating a Paymaster

Create a new paymaster with an initial budget:

slot paymaster <paymaster-name> create --team <team-name> --budget <amount> --unit CREDIT

Example

slot paymaster my-game-pm create --team my-team --budget 1000 --unit CREDIT
Output:
✅ Paymaster Created Successfully
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🏢 Details:
  • Name: my-game-pm
  • Team: my-team

💰 Initial Budget:
  • Amount: 1000 CREDIT ($10.00 USD)

Managing Budget

Increase Budget

Add funds to your paymaster:

slot paymaster <paymaster-name> budget increase --amount <amount> --unit CREDIT
Output:
✅ Budget Increased Successfully
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🏢 Paymaster: my-game-pm

📈 Operation:
  • Action: Increased
  • Amount: 500 CREDIT

💰 New Budget:
  • Amount: 1500 CREDIT ($15.00 USD)

Decrease Budget

Remove funds from your paymaster:

slot paymaster <paymaster-name> budget decrease --amount <amount> --unit CREDIT
Output:
✅ Budget Decreased Successfully
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🏢 Paymaster: my-game-pm

📉 Operation:
  • Action: Decreased
  • Amount: 200 CREDIT

💰 New Budget:
  • Amount: 1300 CREDIT ($13.00 USD)

Policy Management

Policies define which contracts and entry points your paymaster will sponsor.

Add Policies from Preset (Recommended)

The preferred way to add policies is using verified contract presets for your games:

slot paymaster <paymaster-name> policy add-from-preset --name <preset-name>
Example:
slot paymaster my-game-pm policy add-from-preset --name dope-wars

Add a Single Policy

For individual contract policies or custom contracts not yet in presets:

slot paymaster <paymaster-name> policy add --contract <contract-address> --entrypoint <entry-point>

Add Policies from JSON File

For bulk adding multiple custom policies:

slot paymaster <paymaster-name> policy add-from-json --file <path-to-json>
JSON Format:
[
  {
    "contractAddress": "0x1234...abcd",
    "entryPoint": "move_player"
  },
  {
    "contractAddress": "0x5678...efgh",
    "entryPoint": "attack"
  }
]

Remove a Policy

slot paymaster <paymaster-name> policy remove --contract <contract-address> --entrypoint <entry-point>
Output:
Successfully removed policy: PolicyArgs { contract: "0x1234...abcd", entrypoint: "move_player" }

Remove All Policies

slot paymaster <paymaster-name> policy remove-all

List Policies

slot paymaster <paymaster-name> policy list

Paymaster Information

Get comprehensive information about your paymaster:

slot paymaster <paymaster-name> info
Output:
🔍 Paymaster Info for 'my-game-pm'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏢 Details:
  • Team: my-team
  • Active: ✅ Yes

💰 Budget:
  • Total: 9000 CREDIT ($90.00 USD)
  • Spent: 1759.56 CREDIT ($17.60 USD)
  • Usage: [█████░░░░░░░░░░░░░░░░░░░░░░░░░] 19.7%

📋 Policies:
  • Count: 3

Updating Paymaster Configuration

Update your paymaster's basic configuration settings:

slot paymaster <current-name> update [OPTIONS]

Update Paymaster Name

slot paymaster my-game-pm update --name new-game-pm

Change Team Association

Transfer the paymaster to a different team:

slot paymaster my-game-pm update --team new-team

Enable/Disable Paymaster

Toggle the active state of your paymaster:

# Disable paymaster (stops sponsoring transactions)
slot paymaster my-game-pm update --active false
 
# Re-enable paymaster
slot paymaster my-game-pm update --active true

Statistics and Monitoring

View usage statistics for your paymaster:

slot paymaster <paymaster-name> stats --last <time-period>
Example:
slot paymaster my-game-pm stats --last 24hr
Time Period Options:
  • 1hr, 2hr, 24hr
  • 1day, 2day, 7day
  • 1week
Output:
📊 Paymaster Stats for 'my-game-pm' (Last 24hr)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Transactions:
  • Total: 1,247
  • Successful: 1,198
  • Reverted: 49
  • Success Rate: 96.1%

💰 Fees (USD):
  • Total (24hr): $12.45
  • Average: $0.009988
  • Minimum: $0.001234
  • Maximum: $0.045678

👥 Users:
  • Unique Users: 89

Transaction History

View detailed transaction history for your paymaster with filtering and sorting options:

slot paymaster <paymaster-name> transactions [OPTIONS]

Basic Usage

View recent transactions:

slot paymaster my-game-pm transactions
Output:
📊 Paymaster Transactions for 'my-game-pm' (Last 24hr)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Transaction Hash                                                   Executed     Status       USD Fee     
──────────────────────────────────────────────────────────────────────────────────────────────────────────────
0x50c2dd556593564fe2b814d61b3b1592682de83702552a993d24f9e897710e7  11s ago      SUCCESS      $0.0026     
0x41b0f547741bd1fdc29dd4c82a80da2a452314e710ae7cbe0e05cb4cb1e6c0e  22s ago      SUCCESS      $0.0025      
0x4b74ee2ab7764cb3d11f3319b64c2698b868727fdf99728bdf74aa023b5e77d  32s ago      REVERTED     $0.0028       
0x2af69b9798355e91119c6a9adb1363b2f533f0557601e4687dcfe9725e8feaa  42s ago      SUCCESS      $0.0025     
0x25dfc115dabda89a2027366790ee5cfcfefb861fe1b584c6fb15dc1588e0816  47s ago      REVERTED     $0.0032

Filtering Options

Filter by Status:
# Show only successful transactions
slot paymaster my-game-pm transactions --filter SUCCESS
 
# Show only reverted transactions  
slot paymaster my-game-pm transactions --filter REVERTED
 
# Show all transactions (default)
slot paymaster my-game-pm transactions --filter ALL
Time Period:
# Last hour
slot paymaster my-game-pm transactions --last 1hr
Sorting:
# Sort by fees (ascending)
slot paymaster my-game-pm transactions --order-by FEES_ASC
 
# Sort by fees (descending)
slot paymaster my-game-pm transactions --order-by FEES_DESC
 
# Sort by execution time (most recent first - default)
slot paymaster my-game-pm transactions --order-by EXECUTED_AT_DESC
 
# Sort by execution time (oldest first)
slot paymaster my-game-pm transactions --order-by EXECUTED_AT_ASC
Limit Results:
# Show up to 50 transactions (max 1000)
slot paymaster my-game-pm transactions --limit 50

Dune Analytics Queries

Generate Dune Analytics queries to analyze your paymaster's transaction data:

slot paymaster <paymaster-name> dune [OPTIONS]

Example Dashboard

See a live example of paymaster analytics at Blob Arena Stats on Dune Analytics.

Query Types

Fast Query (Default)
slot paymaster my-game-pm dune
  • Quick execution suitable for long time periods
  • Matches direct execute_from_outside_v3 calls and simple VRF patterns
  • Does not catch complex nested VRF calls
  • Best for initial analysis and long-term trends
Exact Query
slot paymaster my-game-pm dune --exact
  • Exhaustive search of all transaction patterns
  • Uses execute_from_outside_v3 selector as anchor
  • Catches all patterns including nested VRF calls
  • May timeout on long time periods
  • Best for exact metrics

Time Period Options

By default, queries use the paymaster's creation time. You can specify a custom time period:

# Last 24 hours
slot paymaster my-game-pm dune --last 24hr
 
# Last week
slot paymaster my-game-pm dune --last 1week
 
# Combine with exact query
slot paymaster my-game-pm dune --exact --last 24hr
Time Period Options:
  • 1hr, 2hr, 24hr
  • 1day, 2day, 7day
  • 1week

Query Output

The command generates a SQL query that you can copy and run in Dune Analytics. The query includes:

  • Daily transaction counts
  • Unique user counts
  • Fee amounts in USD
  • Overall totals

Quick Debugging Use Cases

The transaction history is useful for identifying issues:

View expensive transactions that might indicate inefficient contract calls:
slot paymaster my-game-pm transactions --order-by FEES_DESC --limit 10
Investigate failed transactions to debug contract issues:
slot paymaster my-game-pm transactions --filter REVERTED --last 24hr

Best Practices

Budget Management

  • Start with a conservative budget and increase as needed
  • Monitor spending through the stats command
  • Keep sufficient team balance for paymaster operations

Policy Management

  • Be specific with your policies to avoid sponsoring unintended transactions
  • Use presets whenever possible for verified game contracts in the Dojo ecosystem
  • Contribute your game contracts to the preset repository for community verification
  • Regularly review and update policies as your application evolves
  • Test policies with small budgets before scaling up

Security

  • Only add policies for contracts you trust
  • Keep your team membership limited to necessary collaborators

Common Workflows

Setting up a new game paymaster

# Create team if it doesn't exist
slot teams my-team create --email developer@mygame.com
 
# Fund your account and transfer to team
slot auth fund
slot auth transfer my-team --credit 100
 
# Create paymaster
slot paymaster my-game-pm create --team my-team --budget 1000 --unit CREDIT
 
# Add game contract policies
slot paymaster my-game-pm policy add --contract 0x123...abc --entrypoint move_player
slot paymaster my-game-pm policy add --contract 0x123...abc --entrypoint attack_enemy
slot paymaster my-game-pm policy add --contract 0x123...abc --entrypoint use_item
 
# Check initial setup
slot paymaster my-game-pm info

Monitoring and maintenance

# Check daily stats
slot paymaster my-game-pm stats --last 24hr
 
# Check current status
slot paymaster my-game-pm info
 
# Add more budget if needed (ensure team has credits)
slot paymaster my-game-pm budget increase --amount 500 --unit CREDIT

Insufficient Credits Error

If you encounter insufficient credits when creating or funding a paymaster:

# Check team balance first
slot teams my-team info
 
# Fund your account if needed
slot auth fund
 
# Transfer more credits to team
slot auth transfer my-team --credit 50
 
# Retry your paymaster operation
slot paymaster my-game-pm create --team my-team --budget 1000 --unit CREDIT