3

let's suppose I send this request to the blockchain:

"requestType=transferAsset&secretPhrase=blablabla&chain=ignis&asset=blablabla&recipient=ARDOR-blablablablabla&quantityQNT=1000&feeNQT=1000000&deadline=60"

how does it work with the bundlers? I mean I set there a feeNQT that is 1000000 but not sure if that has to match an existing bundler rate or if that lets me bundle my transaction. Thanks

6

Outgoing child chain transactions require a fee denominated in the child chain token. Unlike when using NXT, 0 is a valid fee for sponsored child chain transactions.

For normal transactions, let the server calculate the child transaction fee, a value of feeNQT=-1 should be used, and a new feeRateNQTPerFXT parameter must be supplied, to indicate the exchange rate of child token NQT per whole ARDR to use when calculating the fee (since minimum fees can only be calculated in the parent chain token ARDR).

If feeRateNQTPerFXT is also set to -1, the server will query the currently known bundlers rates for this child chain, also subject to the minBundlerBalanceFXT limit on effective bundler account balance, and use the best one for the fee calculation.

Transaction fee in ARDR varies depending on the status of the recipient account, sendMoney to a new account will charge higher fee than sendMoney to an existing account so don't make any assumption about the ARDR fee the bundler will have to pay to bundle your transactions, unless you check first if the recipient account is new.

One way to do this is to invoke the getAccount API on the recipient account and check for errorCode 5 in the response, then predict the fee according to the current minimum fee specifications.

A more robust approach is to submit the transaction when setting the broadcast parameter to false then read the minimumFeeFQT field from the response which indicates the minimum required fee in ARDR the bundler will pay for this transaction.

Bundlers rates cannot be trusted blindly as they may change based on market conditions, the returned transaction JSON including the fees calculated should be reviewed by the user.

The bundler rate used will be returned in the bundlerRateNQTPerFXT JSON field, -1 if no bundlers are known for the chain.

  • 1
    If I transfer an asset to a new account, does it apply the same rule that the fees will be higher? So if my request becomes: "requestType=transferAsset&secretPhrase=blablabla&chain=ignis&asset=blablabla&recipient=ARDOR-blablablablabla&quantityQNT=1000&feeNQT=-1& feeRateNQTPerFXT=-1&deadline=60" then the fee calculation should be automatic? – TheWireMaster Sep 27 '18 at 5:59
  • The transaction fee is higher only if the transaction registers a new public key on the blockchain. This happens when submitting a transaction from a new account or when sending a transaction to a new recipient account while announcing their public key to the network using the "recipientPublicKey" parameter. Where "new" means, not registered on the blockchain. – lyaffe Sep 27 '18 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.