One time Transactions

+1 vote
I have an asset which every address can generate, and send it to some specific addresses, but I want to restrict the amount of the asset sent by the address to one and only send it to a particular address only once. Is this possible using the current Multichain?


For Example:

There are two addresses Address A and Address B. Address A creates an asset C and sends Asset C to Address B, how do I restrict address A from sending Asset C to Address B again.


Basically, an address can only transact with another address only once using a specific asset.
asked Dec 29, 2017 by OddPotato

1 Answer

0 votes
Is there any reason why you can't just issue the asset with a single unit, and ensure that the issuance is closed so there can be no follow-on issuances with additional units? That would create an asset that was essentially one indivisible piece, so it can only be sent once by a party unless/until that party receives it back.
answered Dec 30, 2017 by MultiChain
Actually it's a general asset, any  node can generate the asset but can send the asset to an address only once, it has the same name, same metadata associated with it. So if a new asset is created every time they cannot be considered as the same asset for the target address. Maybe you can consider this asset as an acknowledgement asset, it can be used to track the no of nodes acknowledging a certain action.
It sounds like you may be better off using streams, where each address publishes to a stream in order to acknowledge something, then you can easily count the number of different publishers in the stream (using liststreams).
Isn't there any other way of implementing this action other than using streams? I think this can be implemented at the core level by changing the source code but then it raises a different issue, a node can bypass the restriction implemented in new code by using older client binary. Can you point me on how to verify the binary used by the client?
There's no way to reliably verify a binary running elsewhere since there's nothing stopping the node from reporting a false checksum (or whatever). You would need to implement custom transaction rules directly as on-chain logic. The filters feature coming in MultiChain 2.0 might be suitable for you: