Automatic transfer of assets to multiple nodes

+1 vote
Hi Team,

How can I simulate a small logic like whenever a particular node receives certain assets, it will be divide it in some percentage and forward to 2 or more different nodes? For example whenever node1 receives x qty of asset1, it will automatically send x/2 to node 2 and x/2 to node 3.

How can we do this in multichain as it doesn't support smart-contracts?

asked Jul 28, 2016 by amanc

1 Answer

+1 vote
For now you will need to take care of this on the application level, i.e. write something which monitors the address for new incoming transactions, and when that happens, divides the funds appropriately. For safety you'd be recommended to directly connect the dividing transaction to the incoming transaction output containing the funds (use createrawtransaction with specific inputs) so that if for some reason the incoming transaction does not get confirmed, none of the dividing transactions can get confirmed either.
answered Jul 28, 2016 by MultiChain