Permission Delegation
Authorization delegation mechanism to enhance flexibility and usability of XRPL accounts
- Authors
- Mayukha Vadari, Yinyi Qian, Ed Hennis
- Created
- 2024-08-21
- Updated
- 2026-12-02
- Discussion
- XRPLF/XRPL-Standards/discussions/218
1. Abstract¶
This proposal introduces an authorization delegation mechanism to enhance the flexibility and usability of XRPL accounts.
2. Motivation¶
Currently, critical issuer actions, such as authorizing trustlines, require direct control by the account's keys, hindering operational efficiency and complex use cases. By empowering account holders to selectively delegate specific permissions to other accounts, this proposal aims to enhance account usability without compromising security. This mechanism will unlock new possibilities for XRPL applications, such as multi-party workflows and advanced account management strategies.
This proposal is motivated by the need for account holders, especially issuers and businesses, to safely share day-to-day operational responsibilities, such as issuing tokens, managing trustlines, or authorizing counterparties, with employees, contractors, or external parties, without granting them full control of the account. By letting an account holder delegate narrowly scoped, granular, revocable permissions to other accounts, this mechanism enables separation of duties and better key-management practices while keeping the account holder in ultimate control of what can be delegated.
2.1. Basic Flow¶
Isaac, a token issuer, wants to set up his account to follow security best practices and separation of responsibilities. He wants some of his employees to have some sub-permissions on the account, and manage their own separate keys - Alice to manage token issuing and Bob to manage trustlines. He is also working with Kylie, a KYC provider, who he wants to be able to authorize trustlines but not have any other permissions (as she is an external party).
He can authorize:
- Alice's account for the
Paymenttransaction permission. - Bob's account for the
TrustSettransaction permission. - Kylie's account for the
TrustlineAuthorizegranular permission.
The full set of available permissions is listed in XLS-74, Account Permissions
3. Specification¶
We propose:
- Creating a
Delegateledger object. - Creating a
DelegateSettransaction type.
We also propose modifying the transaction common fields.
This feature will require an amendment, tentatively titled PermissionDelegation.
Terminology:
- Delegating account: The main account, which is delegating permissions to another account.
- Delegate: The account that is having permissions delegated to it.
3.1. Ledger Entry: Delegate¶
This object represents a set of permissions that an account has delegated to another account, and is modeled to be similar to DepositPreauth objects.
3.1.1. Object Identifier¶
Key Space: TODO: content pass.
ID Calculation Algorithm: The ID of this object will be a hash of the Account and Authorize fields, combined with the unique space key for Delegate objects, which will be defined during implementation.
3.1.2. Fields¶
| Field Name | Constant | Required | Internal Type | Default Value | Description |
|---|---|---|---|---|---|
| LedgerIndex | Yes | Yes | HASH256 | N/A | The unique ID of the ledger object. |
| LedgerEntryType | Yes | Yes | UINT16 | Delegate |
The ledger object's type (Delegate). |
| Account | Yes | Yes | ACCOUNT | N/A | The account that wants to authorize another account. |
| Authorize | Yes | Yes | ACCOUNT | N/A | The authorized account. |
| Permissions | No | Yes | ARRAY | N/A | The transaction permissions that the account has access to. |
| OwnerNode | No | Yes | UINT64 | N/A | A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages. |
| PreviousTxnID | No | Yes | HASH256 | N/A | The identifying hash of the transaction that most recently modified this object. |
| PreviousTxnLgrSeq | No | Yes | UINT32 | N/A | The index of the ledger that contains the transaction that most recently modified this object. |
3.1.2.1. Permissions¶
This field is an array of permissions to delegate to the account, as listed in XLS-74, Account Permissions. The array will have a maximum length of 10.
3.1.3. Ownership¶
TODO: content pass.
3.1.4. Reserves¶
Reserve Requirement: Standard
This object will cost 1 reserve, which is charged to the Account.
3.1.5. Deletion¶
Deletion Transactions: DelegateSet with an empty Permissions list (see State Changes).
Account Deletion Blocker: No
The Delegate object is not a deletion blocker.
3.1.6. Invariants¶
- An account should never be able to send a transaction on behalf of another account without a valid
Delegateobject.
3.1.7. RPC Name¶
TODO: content pass.
3.1.8. Example JSON¶
In this example, Isaac is delegating the Payment permission to Alice.
{
"LedgerEntryType": "Delegate",
"Account": "rISAAC......",
"Authorize": "rALICE......",
"Permissions": [{ "Permission": { "PermissionValue": "Payment" } }]
}
3.2. Transaction: DelegateSet¶
This transaction allows an account to delegate certain permissions to another account. It is loosely modeled to be similar to the DepositPreauth transaction type.
3.2.1. Fields¶
| Field Name | Required | JSON Type | Internal Type | Default Value | Description |
|---|---|---|---|---|---|
| TransactionType | Yes | string | UINT16 | DelegateSet |
The transaction type (DelegateSet). |
| Account | Yes | string | ACCOUNT | N/A | The account that wants to authorize another account. |
| Authorize | Yes | string | ACCOUNT | N/A | The authorized account. |
| Permissions | Yes | string | ARRAY | N/A | The transaction permissions that the account has been granted. |
3.2.1.1. Permissions¶
This transaction works slightly differently from the DepositPreauth transaction type. Instead of using an Unauthorize field, an account is unauthorized by using an empty Permissions list. The list of permissions, if included and non-empty, will replace the existing list. Providing an empty list will delete the Delegate object.
3.2.2. Transaction Fee¶
TODO: content pass.
3.2.3. Failure Conditions¶
3.2.3.1. Data Verification¶
- The amendment for this feature is not enabled. (
temDISABLED) Permissionsis too long. (the limit is 10) (temARRAY_TOO_LARGE)Permissionsincludes duplicates. (temMALFORMED)- Any of the specified permissions is not a valid tx-level or granular permission. (
temMALFORMED) - Any of the specified tx-level permissions corresponds to a transaction that is not delegable (see the list below). (
temMALFORMED) - Any of the specified granular permissions corresponds to a tx type whose amendment is not enabled. (
temMALFORMED) Authorizeis the same asAccount. (temMALFORMED)
3.2.3.2. Protocol-Level Failures¶
Authorizeaccount does not exist. (tecNO_TARGET)Authorizeaccount is a pseudo-account. (tecNO_PERMISSION)Permissionsis empty (trying to delete theDelegateobject), but theDelegateobject does not exist. (tecNO_ENTRY)
3.2.3.3. Non-Delegable Transactions¶
These transactions are not delegable:
AccountSet,SetRegularKey,SignerListSet,DelegateSet, andAccountDelete(see Security Considerations).ConfidentialMPTConvertis also not delegable, because it is used to register the account's ElGamal key used for confidential transactions.- The system-generated transaction type are not delegable:
EnableAmendment,SetFeeandUNLModify. Batchtransaction itself is not delegable, but its inner transactions can be delegated.
Any newly introduced transactions must remain non-delegable until they have been fully integrated and tested with the delegation amendment. Currently, the following transactions are not delegable: VaultCreate, VaultSet, VaultDelete, VaultDeposit, VaultWithdraw, VaultClawback, LoanBrokerSet, LoanBrokerDelete, LoanBrokerCoverDeposit, LoanBrokerCoverWithdraw, LoanBrokerCoverClawback, LoanSet, LoanDelete, LoanManage, LoanPay, and SponsorshipTransfer.
3.2.4. State Changes¶
On Success (tesSUCCESS):
- If a
Delegateobject doesn't exist that matches theAccountandAuthorizefields, it will be created with the included list of permissions. - If a
Delegateobject exists and the list ofPermissionsis empty, theDelegateobject will be deleted. - If a
Delegateobject exists and the list ofPermissionsis non-empty, the list ofPermissionsin theDelegateobject will be replaced.
3.2.5. Example JSON¶
{
"TransactionType": "DelegateSet",
"Account": "rISAAC......",
"Authorize": "rALICE......",
"Permissions": [
{
"Permission": {
"PermissionValue": "Payment"
}
},
{
"Permission": {
"PermissionValue": "NFTokenMint"
}
}
]
}
Isaac is delegating the Payment and NFTokenMint permissions to Alice.
Then later Alice can send a Payment or NFTokenMint transaction on behalf of Isaac.
PermissionValue can use a number as well, the tx-level permission is tx type plus one, and the granular permission value can be found in XLS-74, Account Permissions.
So the json above is equivalent to:
{
"TransactionType": "DelegateSet",
"Account": "rISAAC......",
"Authorize": "rALICE......",
"Permissions": [
{
"Permission": 1
},
{
"Permission": 26
}
]
}
Payment: Tx type 0 -> Permission value 1NFTokenMint: Tx type 25 -> Permission value 26
3.3. Transaction: Common Fields¶
3.3.1. Fields¶
As a reference, here are the fields that all transactions currently have.
We propose these modifications:
| Field Name | Required | JSON Type | Internal Type | Default Value | Description |
|---|---|---|---|---|---|
| Delegate | No | string | ACCOUNT | N/A | The delegate account that is sending the transaction. |
3.3.1.1. Delegate¶
The way the Delegate field works is somewhat akin to RegularKey. The Account field is the delegating account, the Delegate field is the delegate, and the SigningPubKey and TxnSignature is based on the delegate's keys.
If a Delegate has multisign enabled, they can also use that multisign setup on their delegated transactions.
The delegate will pay the fees on the transaction, to prevent a delegate from draining an account's XRP via fees. Only the Account's sequence number is incremented, not the Delegate's.
3.3.2. Transaction Fee¶
The fee for transactions does not change. The Delegate account pays it (see Delegate).
3.3.3. Failure Conditions¶
3.3.3.1. Data Verification¶
Delegateis the same asAccount. (temBAD_SIGNER)
3.3.3.2. Protocol-Level Failures¶
- The
Accounthasn't authorized theDelegateto send transactions on behalf of it. (terNO_DELEGATE_PERMISSION) - The
Accounthasn't authorized theDelegateto send this particular transaction type/granular permission on behalf of it. (terNO_DELEGATE_PERMISSION) - The
Delegateholds a granular permission for this tx type, but the transaction sets a flag not permitted by the held granular permission(s). (terNO_DELEGATE_PERMISSION) - The
Delegateholds a granular permission for this tx type, but the transaction includes a field not permitted by the held granular permission(s). (terNO_DELEGATE_PERMISSION)
3.3.4. State Changes¶
On Success (tesSUCCESS):
- The transaction succeeds, and the fee is charged to the
Delegateaccount.
3.3.5. Example JSON¶
{
"Transaction": "Payment",
"Account": "rISAAC......",
"Amount": "1000000000",
"Destination": "rBOB......",
"Delegate": "rALICE......",
"SigningPubKey": "ALICE...."
}
Alice is sending a payment to Bob on behalf of Isaac.
If Alice has the Payment permission delegated from Isaac, she can send this transaction successfully.
The payment happens from Isaac to Bob. Alice will pay the transaction fee and sign the transaction.
4. Rationale¶
4.1. Comparing with XLS-49, Multiple Signer Lists¶
In XLS-49:
- There is multisign support by default.
- The signer list is controlled by the delegating account.
- There may be at most one list per permission, with a maximum of 32 signers.
- There is a total of one object reserve per signer list.
- The delegating account pays the fees.
In this proposal:
- There is no direct multisign support (though permissions can be delegated to an account with a multisign setup).
- The delegate's keys to are self-governed (i.e. the delegating account doesn't control the signer list on its delegate).
- A permission may be delegated to as many accounts/signer lists as one is willing to pay reserve for.
- There is one account reserve per delegated account.
- The delegate pays the fees.
Both are useful for slightly different usecases; XLS-49 is more useful when you want multiple signatures to guard certain features, while this proposal is useful when you want certain parties to have access to certain features. This proposal does support XLS-49-like usage, but it would cost more XRP, as a second account would need to be created.
4.2. How does using an NFTokenMint permission compare to using the existing NFTokenMinter account field?¶
Note that the NFTokenMinter field provides more permissions than just NFTokenMinting; it provides permissions over offers and burning as well (though of course multiple permissions can be delegated to one account).
The biggest advantage to using the NFTokenMint field is that it's "free" (it doesn't cost any additional reserve). Delegating a permission to an account costs one object reserve (for the Delegate object).
On the other hand, with this proposal, you can have as many accounts with the NFTokenMint permission as you want, instead of just one. The minting account can also mint NFTs directly into your account, instead of into their own account.
Given the overlap in functionality, the NFTokenMinter field could potentially be deprecated in the future.
4.3. Why is the process of unauthorizing an account different between the DepositPreauth transaction and the DelegateSet transaction?¶
The DepositPreauth transaction has an Unauthorize field. It seemed more confusing to use such a paradigm here, but it can be changed if there are strong objections.
5. Security Considerations¶
Delegating permissions to other accounts requires a high degree of trust, especially when the delegate can potentially access funds (Payments) or charge reserves (any transaction that can create objects). In addition, any account that has access to the entire AccountSet, SetRegularKey, SignerListSet, or DelegateSet transactions can give themselves any permissions even if this was not originally part of the intention. Authorizing users for those transactions should have heavy warnings associated with it in tooling and UIs.
To avoid this issue, those transactions, along with AccountDelete, will not be delegable (see Non-Delegable Transactions).
On the other hand, this mechanism also offers a granular approach to authorization, allowing accounts to selectively grant specific permissions without compromising overall account control. This approach provides a balance between security and usability, empowering account holders to manage their assets and interactions more effectively.
Until the fixCleanup3_4_0 amendment is active, we recommend not delegating the PaymentBurn granular permission. Before the fix, a delegate with the PaymentBurn granular permission can also mint new fungible tokens (Trust Line Tokens or Multi-Purpose Tokens) in certain circumstances. Other granular permissions are unaffected. Please check the amendment status here
Appendix¶
Appendix A: FAQ¶
A.1: Who pays the transaction fees?¶
The account that sends the transaction pays the transaction fees (not the delegating account, but the delegate).
A.2: Can a blackholed account have some permissions set?¶
Yes, in certain cases. For example, an account could still be considered "blackholed" if it has the AccountDomainSet permission delegated, but not if it has the SetRegularKey permission delegated. The definition of a blackholed account will need to be modified after this amendment.
A.3: Can I delegate permissions to a Batch transaction (XLS-56)?¶
No, delegation will not be allowed on Batch transactions. Instead, the inner transactions must include the Delegate field.
Appendix B: Examples¶
B.1. Payment Permission¶
In this example, Isaac is delegating the Payment permission to Alice. The resulting Delegate ledger object is the Example JSON of the Delegate ledger entry.
B.1.1. DelegateSet Transaction¶
{
"TransactionType": "DelegateSet",
"Account": "rISAAC......",
"Authorize": "rALICE......",
"Permissions": [{ "Permission": { "PermissionValue": "Payment" } }]
}
Note: the weird format of Permissions, with needing an internal object, is due to peculiarities in the XRPL's Binary Format. It can be cleaned up/simplified in tooling.
B.1.2. Payment Transaction¶
{
"Transaction": "Payment",
"Account": "rISAAC......",
"Amount": "1000000000",
"Destination": "rCHARLIE......",
"Delegate": "rALICE......",
"SigningPubKey": "ALICE...."
}
B.2. TrustSet Permission¶
In this example, Isaac is delegating the TrustSet permission to Bob.
B.2.1. DelegateSet Transaction¶
{
"TransactionType": "DelegateSet",
"Account": "rISAAC......",
"Authorize": "rBOB......",
"Permissions": [{ "Permission": { "PermissionValue": "TrustSet" } }]
}
B.2.2. Delegate Ledger Object¶
{
"LedgerEntryType": "Delegate",
"Account": "rISAAC......",
"Authorize": "rBOB......",
"Permissions": [{ "Permission": { "PermissionValue": "TrustSet" } }]
}
B.2.3. TrustSet Transaction¶
In this example, Bob is freezing a trustline from Holden, a USD.Isaac token holder.
{
"Transaction": "TrustSet",
"Account": "rISAAC......",
"LimitAmount": {
"currency": "USD",
"issuer": "rHOLDEN......",
"value": "0"
},
"Flags": 1048576,
"Delegate": "rBOB......",
"SigningPubKey": "BOB......"
}
B.3. TrustlineAuthorize Permission¶
In this example, Isaac is delegating the TrustlineAuthorize permission to Kylie.
B.3.1. DelegateSet Transaction¶
{
"TransactionType": "DelegateSet",
"Account": "rISAAC......",
"Authorize": "rKYLIE......",
"Permissions": [{ "Permission": { "PermissionValue": "TrustlineAuthorize" } }]
}
B.3.2. Delegate Object¶
{
"LedgerEntryType": "Delegate",
"Account": "rISAAC......",
"Authorize": "rKYLIE......",
"Permissions": [{ "Permission": { "PermissionValue": "TrustlineAuthorize" } }]
}
B.3.3. TrustSet Transaction¶
In this example, Kylie is authorizing Holden's trustline.
{
"Transaction": "TrustSet",
"Account": "rISAAC......",
"LimitAmount": {
"currency": "USD",
"issuer": "rHOLDEN......",
"value": "0"
},
"Flags": 65536,
"Delegate": "rKYLIE......",
"SigningPubKey": "KYLIE...."
}
Note that this transaction will fail if:
- The trustline with Holden doesn't exist.
- Kylie tries to change any trustline setting that isn't just the
tfSetfAuthflag.
Appendix C: rippled Implementation Notes¶
- The amendment that enables this feature is
PermissionDelegationV1_1. - The flags and fields that each granular permission permits are listed as
allowedFlagsandallowedFieldsinpermissions.macro.