XRPLF / xrpl.js

A JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser
https://xrpl.org/
1.2k stars 510 forks source link

Question on fees. #798

Closed tuloski closed 6 years ago

tuloski commented 6 years ago

When setting with RippleAPI the "fee" field in the instructions (An exact fee to pay for the transaction), what happens if the fee is not enough? How many XRP will be taken from the account? When setting with RippleAPI the "maxFee" field (The maximum fee to pay for the transaction), what happens if the fee is not enough? How many XRP will be taken from the account? And what happens if the maxFee is higher than the minimum fee? How much fee will be burned?

It seems that setting maxFee is always better than fee...or am I wrong?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/49488394-question-on-fees?utm_campaign=plugin&utm_content=tracker%2F323756&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F323756&utm_medium=issues&utm_source=github).
intelliot commented 6 years ago

If the fee is not enough, the transaction may not be forwarded to other rippled nodes, and will not be processed (included in a validated ledger). In this case, no XRP will be taken from the account. The same applies to "maxFee". The fee will adjust dynamically up to the "maxFee" value.

Yes, setting maxFee is a good idea. And be sure to set it low enough that you don't spend more on fees than you are willing to.