Is it possible to use Stellar to create an address that will automatically distribute payments to two different parties?
For example, if 10 XLM is received to address x
, 8 XLM are instantly distributed to address a
, and 2 XLM are distributed to address b
.
This would be an awesome use case for something like: by purchasing a song, 80% goes to the artist and 20% goes to the label. All verified on the Stellar network.
I'm wondering if there is a decentralized "Smart Contract" approach to this, as opposed to an off-chain script (which would need the private key to address x
) doing the distribution.
I've looked through the documentation, and think this perhaps could be solved with a Pre-Authoried Transaction. If a Pre-Authorized transaction is in fact the correct approach: do you need to pay a fee to the Stellar Network to set up an account with a Pre-Authorized Transaction?
I'm not sure if this is the correct approach though. I'd love to hear suggestions for alternatives.