Gas Policies
Paymaster policies can be configured through either the dashboard or the API.
Policy Types
There are four types of gas policies on ZeroDev:
Policies that apply to the entire project.
Policies that apply to specific contracts.
Policies that apply to specific wallet addresses.
If none of the policies above meet your needs, you can program totally custom policies via a webhook.
Rate Limit Types
When you create a new policy, you set up one or more rate limits.
There are four types of rate limits:
Limit by the amount of gas.
Limit by the number of requests.
Limit by the current gas price.
Limit by the amount of gas per transaction.
Policy examples
The policies and rate limits are hopefully intuitive, but here are some common examples in case they are helpful. We will be using Polygon (MATIC) in these examples.
Sponsor up to 1 MATIC every hour for the entire project
Here we create a project policy:

Sponsor 100 transactions per minute for a specific contract
Here we create a contract policy:

Sponsor transactions for a specific function when gas price is below 50 GWEI
Here we create a contract policy:

Sponsor 100 transactions per hour for a specific address
Here we create a wallet policy:
