Skip to content

fix: use the base fee for VaultCreate autofill - #1061

Open
kuan121 wants to merge 1 commit into
mainfrom
fix/dge-8227-vault-create-base-fee
Open

kuan121 wants to merge 1 commit into
mainfrom
fix/dge-8227-vault-create-base-fee

Conversation

@kuan121

@kuan121 kuan121 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

autofill now gives VaultCreate the network base fee instead of one owner reserve.

Jira: DGE-8227

Context of Change

_calculate_fee_per_transaction_type treated VaultCreate like AccountDelete and AMMCreate, and charged it reserve_inc: 0.2 XRP on Mainnet, compared with a base fee of 10 drops. rippled stopped charging VaultCreate an owner reserve in 3.2.0 (XRPLF/rippled#5954). Today only AccountDelete and AMMCreate override calculateBaseFee with calculateOwnerReserveFee. So every autofilled VaultCreate overpaid by about 2 XRP, which is destroyed with the fee.

The owner-reserve fee for VaultCreate dates from #814, which added Single Asset Vault support. xrpl.js had the same overcharge and fixed it in XRPLF/xrpl.js#3430. This PR makes the same change here.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

There is one side effect for callers who set VaultCreate.fee to the old 2 XRP by hand and submit with check_fee=True. _check_fee now treats that fee like any other ordinary transaction's: it is higher than both the calculated fee and the 0.1 XRP ceiling, so it is refused as too high.

Did you update CHANGELOG.md?

  • Yes

Test Plan

  • Unit tests in the new tests/unit/asyn/transaction/test_owner_reserve_fee.py:
    • VaultCreate pays the base fee.
    • AccountDelete and AMMCreate still pay the owner reserve.
    • The VaultCreate test fails on main and passes with the fix.
  • Integration tests: all autofill VaultCreate, which now pays the base fee, and rippled accepts it. They ran against rippleci/xrpld:develop --standalone (xrpld 3.4.0-rc1):
    • the single-asset vault, vault_info, lending and lending V1_1 suites
    • the fee tests in sugar/test_transaction.py
  • Other tests: the full unit suite, flake8 and mypy --strict pass.

🤖 Generated with Claude Code

autofill charged VaultCreate one owner reserve (reserve_inc, 2 XRP on
Mainnet), like AccountDelete and AMMCreate. rippled stopped charging
VaultCreate an owner reserve in 3.2.0 (XRPLF/rippled#5954), so it now pays
the reference fee like any other transaction. Same fix as
XRPLF/xrpl.js#3430.

DGE-8227

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: XRPLF/xrpl-py/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 32b899cb-e0ed-4364-b482-31879cefec7d
📥 Commits

Reviewing files that changed from the base of the PR and between 7a81134 and e46a9c6.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • tests/unit/asyn/transaction/test_owner_reserve_fee.py
  • xrpl/asyncio/transaction/main.py
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small, well-scoped fix removing VAULT_CREATE from the owner-reserve fee branch so VaultCreate autofills with the base fee instead of a 2 XRP reserve, matching rippled 3.2.0+ behavior and the equivalent xrpl.js fix. The code change is minimal and correct; the new unit test file properly verifies AccountDelete/AMMCreate still pay the owner reserve while VaultCreate pays the base fee. No issues found in the actual diff.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant