sBridge
Withdrawal Permissions
Recurring rate-limited withdrawals for automated gateway payments without per-transaction signing
Withdrawal permissions are an on-chain primitive that allows one account to authorise another to make recurring, rate-limited withdrawals from its balance. Gateways and services use this to automate recurring payments without requiring manual approval each time.
How Withdrawal Permissions Work
- An authorising account creates a withdrawal permission granting another account the right to withdraw up to a specified limit per period
- The authorised account can claim up to the limit once per withdrawal period without requiring further signatures from the authorising account
- The authorising account retains full control — they can update or delete the permission at any time
Operations
| Operation | Description | Fee |
|---|---|---|
| withdraw_permission_create_operation | Grant a withdrawal permission to another account | 1 × precision |
| withdraw_permission_update_operation | Modify the limit, period length, or remaining periods | 1 × precision |
| withdraw_permission_claim_operation | Execute a withdrawal under an existing permission | 20 × precision + price_per_kbyte |
| withdraw_permission_delete_operation | Revoke a withdrawal permission | Free (0) |
Permission Fields
| Field | Description |
|---|---|
| withdraw_from_account | The account granting the permission |
| authorized_account | The account permitted to withdraw |
| withdrawal_limit | Maximum amount that can be withdrawn per period |
| withdrawal_period_sec | Length of each withdrawal period in seconds |
| periods_until_expiration | Total number of periods before the permission expires |
| period_start_time | When the first withdrawal period begins |
Use in SBridge
Gateways use withdrawal permissions to enable automated fee collection and recurring service payments:
- A user grants the gateway a withdrawal permission capped at a fee amount per period
- The gateway claims its fee automatically each period without requiring a new signed transaction from the user
- The user can revoke the permission at any time using
withdraw_permission_delete_operationat no cost