Permissioned Domains
Creation of controlled environments with specific rules and restrictions to bridge decentralized blockchain and regulatory requirements
- Author
- Mayukha Vadari
- Created
- 2024-09-12
- Updated
- 2026-12-02
- Requires
- XLS-70
- Discussion
- XRPLF/XRPL-Standards/discussions/228
1. Abstract¶
This proposal introduces the concept of permissioned domains. Permissioned domains enable the creation of controlled environments within a broader system where specific rules and restrictions can be applied to user interactions and asset flow.
This proposal creates a PermissionedDomain ledger object, a PermissionedDomainSet transaction, and a PermissionedDomainDelete transaction.
2. Motivation¶
This approach aims to bridge the gap between the transparency and security benefits of decentralized blockchain technology and the regulatory requirements of traditional financial institutions.
3. Specification¶
This proposal builds on top of XLS-70 (Credentials), as credentials are needed for permissioning.
Terminology:
- Domain: A collection of rules indicating what accounts may be a part of it. This spec includes credential-gating, but more options could be added in the future. A domain is focused on "who can participate". The "how they can participate" (e.g. what tokens they may use) aspect can be done in other ways in the primitives they're used.
- Domain Rules: The set of rules that govern a domain, i.e. the credentials it accepts.
- Domain Owner: The account that created a domain, and is the only one that can modify its rules or delete it.
- Domain Member: An account that satisfies the rules of the domain (i.e. has one of the credentials that are accepted by the domain). There is no explicit joining step; as long as the account has a valid credential, it is a member.
3.1. Ledger Entry: PermissionedDomain¶
This object represents a permissioned domain.
3.1.1. Object Identifier¶
Key Space: TODO: content pass.
ID Calculation Algorithm: The ID of this object will be a hash that incorporates the Owner and Sequence fields, combined with a unique space key for PermissionedDomain objects, which will be defined during implementation.
This value will be used wherever a DomainID is required.
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. |
| Flags | TODO: content pass. | Yes | UINT32 | N/A | Flag values associated with this object. |
| LedgerEntryType | Yes | Yes | UINT16 | TODO: content pass. | The ledger object's type (PermissionedDomain). |
| Owner | Yes | Yes | ACCOUNT | N/A | The account that controls the settings of the domain. |
| 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. |
| Sequence | Yes | Yes | UINT32 | N/A | The Sequence value of the PermissionedDomainSet transaction that created this domain. Used in combination with the Account to identify this domain. |
| AcceptedCredentials | No | Yes | ARRAY | N/A | The credentials that are accepted by the domain. Ownership of one of these credentials automatically makes you a member of the domain. |
| PreviousTxnID | No | Yes | HASH256 | N/A | The identifying hash of the transaction that most recently modified this entry. |
| PreviousTxnLgrSeq | No | Yes | UINT32 | N/A | The ledger index that contains the transaction that most recently modified this object. |
3.1.2.1. AcceptedCredentials¶
This is an array of inner objects referencing a type of credential. The maximum length of this array is 10.
The array will be sorted by Issuer, so that searching it for a match is more performant.
| Field Name | Required | JSON Type | Internal Type | Default Value | Description |
|---|---|---|---|---|---|
| Issuer | Yes | string | ACCOUNT | N/A | The issuer of the credential. |
| CredentialType | Yes | string | BLOB | N/A | A (hex-encoded) value to identify the type of credential from the issuer. The maximum length is 64 bytes (as per XLS-70). |
3.1.3. Ownership¶
Owner: Owner
Directory Registration: The object is linked from the owner directory of the Owner account. OwnerNode holds the page of that directory.
3.1.4. Reserves¶
TODO: content pass.
3.1.5. Deletion¶
Deletion Transactions: PermissionedDomainDelete
Deletion Conditions:
- The account that sends the
PermissionedDomainDeletetransaction is the domain owner.
Account Deletion Blocker: Yes
The PermissionedDomain object is a deletion blocker.
3.1.6. Invariants¶
- You cannot have a domain with no rules.
- The
AcceptedCredentialsarray must have length between 1 and 10, if included.
3.1.7. RPC Name¶
TODO: content pass.
3.1.8. Example JSON¶
A sample domain object may look like this (ignoring common fields):
{
Owner: "rOWEN......",
Sequence: 5,
AcceptedCredentials: [
{
Credential: {
Issuer: "rISABEL......",
CredentialType: "123ABC"
}
}
]
}
3.2. Transaction: PermissionedDomainSet¶
This transaction creates or modifies a PermissionedDomain object.
3.2.1. Fields¶
| Field Name | Required | JSON Type | Internal Type | Default Value | Description |
|---|---|---|---|---|---|
| TransactionType | Yes | string | UINT16 | PermissionedDomainSet |
The transaction type (PermissionedDomainSet). |
| Account | Yes | string | ACCOUNT | N/A | The account sending the transaction. |
| DomainID | Conditional | string | HASH256 | N/A | The domain to modify. Must be included if modifying an existing domain. |
| AcceptedCredentials | Yes | array | ARRAY | N/A | The credentials that are accepted by the domain. Ownership of one of these credentials automatically makes you a member of the domain. An empty array means deleting the field. |
The inner objects of AcceptedCredentials have the fields in AcceptedCredentials.
3.2.2. Transaction Fee¶
TODO: content pass.
3.2.3. Failure Conditions¶
3.2.3.1. Data Verification¶
- The
AcceptedCredentialsarray is empty. (TODO: content pass — result code.) - The
AcceptedCredentialsarray is too long (limit 10). (TODO: content pass — result code.) - Any credential in
AcceptedCredentialshas an emptyCredentialType. (TODO: content pass — result code.) - Any credential in
AcceptedCredentialshas aCredentialTypelonger than 64 bytes (as per XLS-70). (TODO: content pass — result code.)
3.2.3.2. Protocol-Level Failures¶
Issuerdoesn't exist on one or more of the credentials inAcceptedCredentials. (TODO: content pass — result code.)DomainIDis included and that domain doesn't exist. (TODO: content pass — result code.)DomainIDis included and theAccountisn't the domain owner. (TODO: content pass — result code.)
3.2.4. State Changes¶
If the transaction is successful:
- It creates or modifies a
PermissionedDomainobject.
3.2.5. Example JSON¶
TODO: content pass.
3.3. Transaction: PermissionedDomainDelete¶
This transaction deletes a PermissionedDomain object.
3.3.1. Fields¶
| Field Name | Required | JSON Type | Internal Type | Default Value | Description |
|---|---|---|---|---|---|
| TransactionType | Yes | string | UINT16 | PermissionedDomainDelete |
The transaction type (PermissionedDomainDelete). |
| Account | Yes | string | ACCOUNT | N/A | The account sending the transaction. |
| DomainID | Yes | string | HASH256 | N/A | The domain to delete. |
3.3.2. Transaction Fee¶
TODO: content pass.
3.3.3. Failure Conditions¶
3.3.3.1. Data Verification¶
TODO: content pass.
3.3.3.2. Protocol-Level Failures¶
- The domain specified in
DomainIDdoesn't exist. (TODO: content pass — result code.) - The account isn't the owner of the domain. (TODO: content pass — result code.)
3.3.4. State Changes¶
If the transaction is successful:
- It deletes a
PermissionedDomainobject.
3.3.5. Example JSON¶
TODO: content pass.
4. Rationale¶
The ledger object is named PermissionedDomain, not just Domain. The term Domain is already used in the account settings, so it would be confusing to use just the term Domain for this.
A domain cannot AND credentials together, because it is difficult to make a clean design for that capability.
All the domain rules are in one object. A ledger object for each domain rule would remove any limitations on how many rules a domain could have, but this won't work. The ledger needs to be able to iterate through the domain rules to ensure that all of them are being adhered to. If a domain owner has millions of objects (or millions of rules), then iterating through all of those objects becomes prohibitively expensive from a performance standpoint.
5. Backwards Compatibility¶
This feature will require an amendment. Since this feature doesn't bring any functionality to the XRPL by itself, it will be gated by other amendments that use it instead.
6. Security Considerations¶
6.1. Issuer Trust¶
Relying on external issuers for credentials requires a degree of trust. If issuer credentials are compromised or forged, the system will be vulnerable.
6.2. Domain Creator Trust¶
While users can create their own domains, trust in the domain creator remains crucial. Malicious domain creators (or hackers) could potentially expose domain users to illegal liquidity.
Appendix¶
Appendix A: FAQ¶
A.1: Can a domain owner also be a credential issuer?¶
Yes.
A.2: Can other rule types be added to domains?¶
Yes, if there is a need (though they must be focused on "who can participate" rather than other aspects of participation, like tokens). If you have any in mind, please mention them below.
A.3: Does the domain owner have any special powers over the accepted credentials?¶
No, unless they are also the issuer of said credential.
A.4: Does the domain owner need to hold the credentials?¶
No.