The FeeHandler in payments pallet returns a list of fees, that is, percentages of the total amount being transferred that need to be credited from the sender/receiver and sent to designated accounts(e.g. a community's treasury)
To account for more use cases such as discounts and other incentives we can generalize the concept more using something like:
enum PaymentOperation {
Fee { ... }, // sender/receiver are credited funds sent to third-party account
Discount { ... }, // third-party account sponsors part of the payment
DerivedTransfer { ... }, // third-party account transfers funds to another third-party
}
The DerivedTransfer can cover cases like affiliate rewards where a given entity(e.g. a token issuer) wants to incentivize another entity(e.g. a community) based on the parameters of the payment(e.g. utilizing a token)
The
FeeHandler
in payments pallet returns a list of fees, that is, percentages of the total amount being transferred that need to be credited from the sender/receiver and sent to designated accounts(e.g. a community's treasury)To account for more use cases such as discounts and other incentives we can generalize the concept more using something like:
The
DerivedTransfer
can cover cases like affiliate rewards where a given entity(e.g. a token issuer) wants to incentivize another entity(e.g. a community) based on the parameters of the payment(e.g. utilizing a token)