-
Notifications
You must be signed in to change notification settings - Fork 1
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
Recurring Payments #8
Comments
How about we do this in a separate pallet that will act as a wrapper for the scheduler pallet? So Or we could add the scheduler pallet and let the frontend construct the call manually 🤔 Wdyt? |
It can be a separate pallet and we could use scheduler pallet, some reasons I think it's worth adding it in the payments pallet(under a feature flag and all implemented in a separate file?) is that feature/product wise it is very related to the existing logic and expectations of the payments pallet, having a About the scheduler pallet we could depend directly on that, what I don't see that convenient(but should be doable with |
I was initially thinking of doing it as a separate pallet but I think it can perfectly fit the scope of payments pallet to introduce a
pay_recurrent
extrinsic that allows payments to be created automatically based on a schedule that specifies how often the payment is and when(if) it stops.Unlike a vested transfer the origin account is not required to have all the funds since the the end period could be undefined(infinite funds?) but maybe the payer should have at least X times the amount of one payment(e.g.
3
and we could always reserve the amount for the next payment besides the one in progress 🤔).Also I don't think we need to schedule all the payments but only the next one after a successful
release
, say I do apay_recurrent
with a period of 100 blocks the first payment is immediately dispatched(reserved on the destination as usual), ideally is released quickly as the payee should have completed the service/sent the product but in case it hasn't and takes long(i.e. more than 100 blocks) to fulfill the payer requirements for a release then no new payment is made. Releasing within the period shouldn't alter the schedule though.The text was updated successfully, but these errors were encountered: