Skip to main content

Documentation Index

Fetch the complete documentation index at: https://grat.mintlify.app/llms.txt

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

The Policy Engine is a Phase 3 feature and is currently in the design and prototyping stage.
In a production environment, you don’t want to sponsor every transaction that comes your way. Policies allow you to define strict rules about which transactions your Grat relay will accept and pay for.

Flexible Rule Engine

You will be able to filter transactions based on several criteria:
  • Asset Filters: Only sponsor transactions involving specific assets (e.g., your own loyalty token or USDC).
  • Contract Filters: Only sponsor calls to specific Soroban smart contracts.
  • Amount Limits: Set a maximum amount for transactions you are willing to sponsor.
  • Account Whitelists: Only sponsor transactions initiated by registered users of your application.

Example Policies

  • “Only sponsor USDC payments of less than $100.”
  • “Only sponsor interactions with the official Governance contract.”
  • “Sponsor up to 5 transactions per user per day.”
By implementing these policies, you can protect your relay from abuse and ensure that your sponsorship budget is spent on the activities that matter most to your project. View on GitHub