Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment operations (superset of fee handler) #420

Open
olanod opened this issue Aug 1, 2024 · 0 comments
Open

Payment operations (superset of fee handler) #420

olanod opened this issue Aug 1, 2024 · 0 comments

Comments

@olanod
Copy link
Member

olanod commented Aug 1, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant