Skip to content
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

Open
j-craggy opened this issue Feb 2, 2025 · 4 comments
Open

Comments

@j-craggy
Copy link

j-craggy commented Feb 2, 2025

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

Image

Screenshot of the transaction history showing the AMM Withdraw

Image

Additional Notes

This issue may be related to AMM interactions or an edge case in the ledger’s deletion logic.

@mvadari
Copy link
Collaborator

mvadari commented Feb 3, 2025

Technically an account can have 0 XRP if it burns its balance with fees.

@j-craggy
Copy link
Author

j-craggy commented Feb 3, 2025

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:

  • What condition(s) are preventing the account from being deleted.
  • Is there an AMM-related reserve or another mechanism keeping it active?
  • If this is expected behavior, where is it documented.

@mvadari
Copy link
Collaborator

mvadari commented Feb 3, 2025

Ok I just looked at the account and it's actually deleted, if you look at the metadata of the AMMWithdraw transaction. This account is an AMM pseudo-account, not a normal account, so the rules are different.

There is a known bug in the Explorer (ripple/explorer#1061) where it doesn't show deleted accounts properly.

@mvadari
Copy link
Collaborator

mvadari commented Feb 3, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@mvadari @j-craggy and others