-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Account with 0 XRP Balance Not Deleted on XRPL Mainnet (Version: 2.3.1) #5273
Comments
Technically an account can have 0 XRP if it burns its balance with fees. |
XRPL enforces a reserve requirement specifically to prevent spam and abuse. If an account could exist with a zero balance, it would undermine that mechanism by allowing "ghost" accounts to persist without cost. Given this:
|
Ok I just looked at the account and it's actually deleted, if you look at the metadata of the There is a known bug in the Explorer (ripple/explorer#1061) where it doesn't show deleted accounts properly. |
The ability for an account's balance to go below its reserve is documented here: https://xrpl.org/docs/concepts/accounts/reserves#base-reserve-and-owner-reserve |
Just to be explicit, there is no such general rule, nor has there ever been. A normal account can only be deleted by an |
While I understand there’s no general rule for automatic account deletion, the issue I’m concerned about is the potential for excessive spam accounts to exist, especially with 0-balance AMM accounts. If accounts with zero balances can continue to exist indefinitely without any cleanup, even if they don’t have active dependencies, it could lead to a bloat of "ghost" accounts over time. While I know accounts can be deleted via AccountDelete transactions or through specific logic for pseudo-accounts, what prevents the system from getting clogged with these inactive accounts that are just taking up space in the ledger? Especially since creating an account requires a transaction, but there doesn't seem to be an automatic cleanup for those with no activity or balance. |
0-balance AMM accounts shouldn't exist (unless they're an IOU-IOU AMM, in which case they won't have any XRP balance).
An account can only have a lower balance than its reserve if it burns all that XRP. That's a rare enough occurrence. |
One of the design philosophies of the XRPL is to not necessarily prevent certain types of attacks, but to make them so expensive as to not be worth it to the attacker. Creating a bunch of accounts only to burn the reserve would cost 20XRP per account, which is currently worth around 50 USD. That adds up fast. |
Issue Description
On the XRPL mainnet, an account (rDi3cUzdYa1bdkNdtYdSc2Db5wjYsjz3vH) that should have been deleted due to a 0 XRP balance remains active. According to XRPL protocol rules, an account should be removed from the ledger once its balance reaches 0, provided there are no additional dependencies (trust lines, escrows, AMM positions, etc.).
Steps to Reproduce
Perform an AMM Withdraw transaction that removes liquidity and leaves the account with 0 XRP.
Verify the account status using:
rippled account_info rDi3cUzdYa1bdkNdtYdSc2Db5wjYsjz3vH
Observe that the account still exists despite having a 0 balance.
Check for possible dependencies:
rippled account_lines rDi3cUzdYa1bdkNdtYdSc2Db5wjYsjz3vH
rippled account_objects rDi3cUzdYa1bdkNdtYdSc2Db5wjYsjz3vH
rippled amm_info rDi3cUzdYa1bdkNdtYdSc2Db5wjYsjz3vH
No remaining dependencies are found, yet the account is still present on the ledger.
Expected Result
The account should be deleted from the ledger once it reaches 0 XRP and has no remaining dependencies.
Actual Result
The account remains on the ledger despite having a 0 XRP balance and no known dependencies.
Environment
Supporting Files
logged
2025-Feb-02 14:39:03.452658577 UTC LedgerConsensus:WRN Trying to thread to deleted node
2025-Feb-02 14:39:03.452662772 UTC LedgerConsensus:WRN Threading to non-existent account: rDi3cUzdYa1bdkNdtYdSc2Db5wjYsjz3vH
Screenshot of account_info confirming 0 balance
Screenshot of the transaction history showing the AMM Withdraw
Additional Notes
This issue may be related to AMM interactions or an edge case in the ledger’s deletion logic.
The text was updated successfully, but these errors were encountered: