Reserved Gifts of Assets

+1 vote
I need the ability to create a 'pending transaction' that locks some of a users assets until such time as they are either accepted by another user, or the original user cancels the transaction.  The locking would prevent double spending.  How do I do this?

The use case is this...  user A wants to gift some assets to user B, possibly in exchange for some other offline asset, so there would be no online exchange of assets.   User A and user B may be hosted on different nodes.  However, there may be some delay between sending the gift, and the receiver receiving the gift.

As an added note.... these delays could be in units of Days, and therefore the locked currencies should survive a node restart.
asked Feb 20, 2018 by Robert

1 Answer

0 votes

This sounds like a case for a 1-of-2 multisignature. Create this multisignature from both user's addresses using addmultisigaddress (on both nodes) and send the assets to there. Those assets can then be spent by either user, sending back to their regular address.

Of course this only works if you trust both users to be honest. If not, you can use a 2-of-3 multisignature, where some additional third party is used for dispute resolution. If the two original users have a disagreement about where the assets should go, then this third party can resolve this situation.

answered Feb 22, 2018 by MultiChain
...