0xSplits / splits-sdk

An SDK for building apps on top of 0xSplits
https://docs.splits.org/sdk
MIT License
31 stars 11 forks source link

How to make split cancellable #6

Closed pukykoi closed 1 year ago

pukykoi commented 1 year ago

I want to make a split immutable (percentage of share cannot be changed), but still leave the possibility for a controller, to cancel the split at any point in time.
How would I do this?

wminshew commented 1 year ago

Hi -- what does "cancel" mean in this context?

pukykoi commented 1 year ago

Given three payees, payee A, payee B, payee C.
Payee A receives 50% of any payment. It is also the controller.
Payee B and Payee C receive 25% each.

Once the split is issued, payee A cannot modify the share of any payee. Thus, the split is now immutable.
However, if at any point the payees come to a disagreement, I want payee A to "pull the plug", in a way where none of the future payments will be distributed to any payee. For example, automatically drop the share of the three payees to zero.

In this case, either the transaction is cancelled and refunded to the issuer (the split is cancelled), or if such a feature is not doable, the transaction is sent to a frozen fund, until the three payees come to a consensus.

wminshew commented 1 year ago

Thank you for the context; responded on discord but following up here as well for posterity. The off-the-shelf splits contracts we provide can't handle this use case today, but there are many ways to solve it (with our contracts as well as with others) if you're willing to deploy your own contracts