0064 XLS - 64d: Pseudo-Account #191
Replies: 4 comments 4 replies
-
Why do you need |
Beta Was this translation helpful? Give feedback.
-
There are a number of cases where |
Beta Was this translation helpful? Give feedback.
-
A couple more thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Hi everyone, I have updated the specification in-line with your comments, namely any object associated with a pseudo-account must be identified by an optional unique field. I also added invariants and additional constraints as per @ximinez comment. Let's move the discussion to the specification pull request: #274 |
Beta Was this translation helpful? Give feedback.
-
Pseudo-Account
Abstract
In this document, we propose a standard for a pseudo-account, an
AccountRoot
object that can be associated with one or more other ledger entries to hold and/or issue assets on behalf of the associated entries.1. Introduction
The XRP Ledger is an account-based blockchain in which assets—such as XRP, IOUs, or MPT—can only be held by an account represented by an
AccountRoot
ledger entry. However, certain use cases, such as Automated Market Makers (AMM), Single Asset Vaults, and the Lending Protocol—require assets to be transferable to and from an object.The XLS-30 specification introduced the
AMMID
field in theAccountRoot
ledger entry. This field associates a pseudo-account with anAMM
instance, allowing it to track XRP and token balances in the pool and issueLPTokens
on behalf of theAMM
instance.This specification formalises the requirements for an
AccountRoot
when used as a pseudo-account. Specifically, it defines:AccountRoot
is associated with.2. Ledger Entries
2.1.
AccountRoot
Ledger Entry2.1.1. Object Identifier
The address of the
AccountRoot
must be randomised to prevent users from identifying and funding the address before its creation. The protocol that creates anAccountRoot
must ensure the account address is unoccupied.The unique ID of the
AccountRoot
object, a.k.a.AccountRootID
is computed as follows:AccountRootID
=SHA512-Half
(i || Parent Ledger Hash ||<Object>ID>
)AccountRootID
exists, repeatAccountRootID
2.1.2. Fields
<Object>ID
N/A
no
string
HASH256
N/A
pseudo-account
is associated with.Flags
no
yes
number
UINT32
N/A
pseudo-account
.Sequence
no
yes
number
UINT32
0
pseudo-account
.RegularKey
no
yes
string
ACCOUNTID
N/A
2.1.2.1.
<Object>ID
The
<Object>ID
field uniquely identifies the ledger entry associated with an account. Any protocol introducing apseudo-account
must include a new, optional<Object>ID
field.The naming convention for this field follows these rules:
<Object>
represents the name of the related object:AMM
).Vault
orLoanBroker
).ID
must always be appended as a suffix.2.1.2.2.
Flags
The following flags must be set for a
pseudo-account
:lsfDisableMaster
0x01
No
lsfDepositAuth
0x001
No
deposit
transaction.2.1.2.3.
Sequence
The
Sequence
number of a_pseudo-account_
must be0
. A pseudo-account cannot submit valid transactions.2.1.2.4.
RegularKey
A pseudo-account must not have a
RegularKey
set.2.1.3. Cost
A transaction that creates a
pseudo-account
must incur a higher-than-usual transaction fee to deter ledger spam. Additionally, the transaction must destroy at least the incremental owner reserve amount, currently2 XRP
.2.1.4. Invariant
The following invariants must hold for a pseudo-account:
<Object>ID
must exist on the ledger.<Object>ID
must be set (e.g., a pseudo-account cannot have bothAMMID
andVaultID
at the same time).lsfDepositAuth
andlsfDisableMaster
flags must be set.Sequence
number must be0
.RegularKey
must not be set.Beta Was this translation helpful? Give feedback.
All reactions