Auxiliary Fees
info
UPDATE: The Syscoin Core RPCs used in the example below, and other SPT-oriented RPCs, have been deprecated and removed as of Syscoin Core 4.4.
Now syscoinjs-lib and syscointx-js are used to create/manage digital assets, auxfees, and notaries on the UTXO chain.
Examples are available at https://github.com/syscoin/syscoinjs-lib-examples.
For a complete list of these deprecated RPCs, review the Syscoin Core 4.4 release notes.
Auxiliary Fees lets you define a custom fee structure for your token. These transaction fees are calculated according to the specified structure and paid to the designated Syscoin address in the form of the transacted Syscoin Platform Token (SPT). Standard network fees paid in SYS still apply.
#
Understanding auxfee_detailsExample auxfee_details:
auxfee_address
: where transaction fees will be sent.
fee_struct
: the first integer represents a range boundary pertaining to amount. The second is the fee percentage multiplier for that range. Multiple ranges can be defined in order from least to greatest boundary integer.
Calculation is cumulative across the amount boundaries.
For example, the auxiliary fee for a transaction of 251 tokens with the above fee structure would be calculated as follows:
#
ImplementationThe auxfee_details structure can be defined within the RPC parameters of assetnew
and assetupdate
.
Auxfee_details defined in assetnew parameter:
📘auxfee_details structure is stored in the
auxfee
field#and corresponds to updatecapability_flags bitmask value 32