Is it doable to arrange a lightning pockets (contract) that implements the next situation:
- Individual
A
creates a pockets with pockets nrA_WALLET_NR
- Individual
A
creates a pockets with pockets nrINVEST
- Individual
A
creates a pockets with pockets nrREVENUE
Individual B
with pockets nr B_WALLET_NR
inputs 1000 Satoshi into INVEST
.
For all different individuals `C` including 50 Satoshi into Pockets `REVENUE`:
Till (`B_WALLET_NR` has retrieved 2x1000 Satoshi from REVENUE):
- pockets `B_WALLET_NR` will get half of REVENUE earnings routinely.
- pockets `A_WALLET_NR` get half of REVENUE earnings routinely.
After (`B_WALLET_NR` has acquired 2x1000 Satoshi from REVENUE):
- pockets `A_wallet_NR` will get all earnings.
The place:
- The revenues are break up, with a number of buyers (that haven’t but been payed off 2x their funding) in accordance with key:
1/(nr_of_investors+1)
- A minimal funding quantity into
INVEST
is ready of 999 Satoshis (to forestall a single investor with a number of wallets from flooding the distribution key).
Associated Contracts
This text describes payout schematics primarily based on (oracle/exterior) knowledge in discrete log contracts. Nevertheless, on this query there isn’t any have to obtain knowledge from exterior the chain, as all the information/wallets are already on the lightning community.