Adds a burn output sending 25% of the taker utxo DEX fee to a dedicated burn address. Funds collected on the burn address will be traded for KMD to burn them (thus additionally burning KMD supply).
This PR partially closes https://github.com/KomodoPlatform/komodo-defi-framework/issues/2010
In this PR:
[x] split dex fee for non-kmd utxo coins (apart from zcoin) and added an output to burn account
[x] old-style non-split dex fee non-kmd txns are also allowed in validation code (until all taker nodes upgraded)
[x] refactored dex fee pubkey in params: instead of passing dex fee and burn pubkeys in function params new methods dex_pubkey() and burn_pubkey() were added to the SwapOps trait
[x] mocktopus was made optional dependency and activated only for development builds (as its doc suggests).
NOTE: As mocktopus now is marked 'optional = true' in coins Cargo.toml and activated from the mm2_main crate by adding features = ["mocktopus"] in [dev-dependencies] section, you also need to mark your mockable code, called from other crates, this way: #[cfg_attr(feature = "mocktopus", mockable)], otherwise mocks won't work (see samples in code)
TODO:
[ ] fix burn pubkey and burn zaddr
[x] Add private burn output for zcoin
[ ] disable non-split non-kmd dex fee (no burn output) validation when all taker nodes upgrade to new dex fee splitting
Adds a burn output sending 25% of the taker utxo DEX fee to a dedicated burn address. Funds collected on the burn address will be traded for KMD to burn them (thus additionally burning KMD supply). This PR partially closes https://github.com/KomodoPlatform/komodo-defi-framework/issues/2010
In this PR:
NOTE: As mocktopus now is marked 'optional = true' in coins Cargo.toml and activated from the mm2_main crate by adding features = ["mocktopus"] in [dev-dependencies] section, you also need to mark your mockable code, called from other crates, this way:
#[cfg_attr(feature = "mocktopus", mockable)]
, otherwise mocks won't work (see samples in code)TODO: