Privacy preserving asset token exchange
A method for documenting asset exchanges between users by connecting to a first blockchain network configured to store user assets, receiving login data from a first user, receiving an asset lock transaction for an asset from the first user, confirming that the first user is an owner of the asset based on a previous asset transfer transaction associated with the user, verifying availability of the asset based on blockchain network records, determining that the second user is a registered user of the blockchain network, assigning the asset to a unique identifier of the asset lock transaction, receiving at least one of a claim request from the second user, prior to expiration of the deadline, and a reclaim transaction from the user following expiration of the deadline, and responding to the at least one of the claim request and the reclaim request according to the deadline.
1. A system, comprising:
a processor;
a memory on which are stored machine readable instructions that when executed by the processor, cause the processor to:
connect to a first blockchain network configured to store user assets;
receive login data from a first user;
receive an asset lock transaction for an asset from the first user identified by the login data, the asset lock transaction including a first unique identifier of a first asset token, a signature of the first user, and a hiding commitment of: the first user, a second user, a deadline, a hash value, an asset type, an asset value, and a second unique identifier of the asset;
confirm that the first user is an owner of the asset based on a previous asset transfer transaction associated with the first user;
verify availability of the asset based on blockchain network records;
determine that the second user is a registered user of a blockchain network;
assign the asset to the first unique identifier of the asset lock transaction;
receive at least one of a claim request from the second user prior to expiration of the deadline and a reclaim request from the user after expiration of the deadline, the claim request comprising the second unique identifier, a pre-image of the hash value, a signature of the second user, a randomization of the hiding commitment, and a zero-knowledge token comprising the second user as owner and the same asset type and asset value as the hiding commitment; and
responding to the at least one the claim request and the reclaim request according to the deadline.
2. The system of claim 1 , wherein the instructions further cause the processor to:
receive a second asset lock transaction comprising a first unique identifier of a second asset token, the signature of the second user, and a second hiding commitment of: the second user, the first user, a multiple of the deadline, a second hash value, a second asset type, a second asset value, and a second asset unique identifier, wherein the second hash value comprises a hash of the pre-image and a random value provided by the first user;
receive a second claim request from the first user, the second claim request comprising the second asset unique identifier, a random value of the hash value, the signature of the first user, a randomization of the second hiding commitment, and a second zero-knowledge token comprising the first user as owner and the same second asset type and second asset value as the second hiding commitment;
validate the signature of the first user;
verify that the deadline has not elapsed;
validate the random value of the hash value; and
assign the second asset to the first user.
3. The system of claim 1 , wherein the asset lock transaction further comprises a plurality of zero-knowledge proofs associated with the first unique identifier of the asset lock transaction, the first user, the asset type, and the asset value.
4. The system of claim 1 , wherein the first unique identifier of the asset lock transaction is determined according to at least a private key of the first user.
5. The system of claim 1 , wherein:
the asset lock transaction further comprises a lock time and a first zero-knowledge proof that the hiding commitment encodes a valid deadline;
the claim request further comprises a claim time and a second zero-knowledge proof that the deadline has not elapsed;
the instructions further cause the processor to verify that the lock time corresponds to the current blockchain epoch;
verify a validity of the first zero-knowledge proof;
verify that the claim time corresponds to the current blockchain epoch; and
verify that the second zero-knowledge proof is valid.
6. The system of claim 1 , wherein: the digital signature of the first user comprises an anonymous signature.
7. A method, comprising:
connecting, by a participating node, to a first blockchain network configured to store user assets;
receiving, by the participating node, login data from a first user;
receiving, by the participating node, an asset lock transaction for an asset from the first user identified by the login data, the asset lock transaction including a first unique identifier of an asset token, a signature of the first user, and a hiding commitment of: the first user, a second user, a deadline, a hash value, an asset type, an asset value, and a second unique identifier of the asset;
confirming, by the participating node, that the first user is an owner of the asset based on a previous asset transfer transaction associated with the first user;
verifying, by the participating node, availability of the asset based on blockchain network records;
determining, by the participating node, that the second user is a registered user of a blockchain network;
assigning, by the participating node, the asset to the first unique identifier of the asset lock transaction;
receiving, by the participating node, at least one of a claim request from the second user, prior to expiration of the deadline, and a reclaim transaction from the user following expiration of the deadline, the claim request comprising the second unique identifier, a pre-image of the hash value, a signature of the second user, a randomization of the hiding commitment, and a zero-knowledge token comprising the second user as owner and the same asset type and asset value as the hiding commitment; and
responding to the at least one of the claim request and the reclaim request according to the deadline.
8. The method of claim 7 , further comprising:
receiving, by the participating node, a second asset lock transaction comprising a first unique identifier of a second asset token, the signature of the second user, and a hiding commitment of: the second user, the first user, a multiple of the deadline, a second hash value, a second asset type, a second asset value, and a second asset unique identifier, wherein the second hash value comprises a hash of the pre-image and a random value provided by the first user;
receiving, by the participating node, a second claim request from the first user, the second claim request comprising the second asset unique identifier, a random value of the hash value, the signature of the first user, a randomization of the second hiding commitment, and a second zero-knowledge token comprising the first user as owner and the same second asset type and second asset value as the second hiding commitment;
validating, by the participating node, the signature of the first user;
verifying, by the participating node, that the deadline has not elapsed;
validating, by the participating node, the random value of the hash value; and
assigning, by the participating node, the second asset to the first user.
9. The method of claim 7 , wherein the asset lock request further comprises a plurality of zero-knowledge proofs associated with the first unique identifier of the asset lock transaction, the first user, the asset type, and the asset value.
10. The method of claim 7 , wherein the first unique identifier of the asset lock transaction is determined according to at least a private key of the first user.
11. The method of claim 7 , wherein:
the asset lock transaction further comprises a lock time and a first zero-knowledge proof that the hiding commitment encodes a valid deadline;
the claim request further comprises a claim time and a second zero-knowledge proof that the deadline has not elapsed;
the instructions further cause the processor to verify that the lock time corresponds to the current blockchain epoch;
verify a validity of the first zero-knowledge proof;
verify that the claim time corresponds to the current blockchain epoch; and
verify that the second zero-knowledge proof is valid.
12. The method of claim 7 , wherein: the digital signature of the first user comprises an anonymous signature.
13. A non-transitory computer readable medium comprising instructions, that when read by a processor of a participating node, cause the processor to:
connect to a first blockchain network configured to store user assets;
receive login data from a first user;
receive an asset lock transaction for an asset from the first user identified by the login data, the asset lock transaction including a first unique identifier of an asset token, a signature of the first user, and a hiding commitment of: the first user, a second user, a deadline, a hash value, an asset type, an asset value, and a second unique identifier of the asset;
confirm that the first user is an owner of the asset based on a previous asset transfer transaction associated with the first user;
verify availability of the asset based on blockchain network records;
determine that the second user is a registered user of a blockchain network;
assign the asset to the first unique identifier of the asset lock transaction;
receive at least one of a claim request from the second user prior to expiration of the deadline and a reclaim request from the user after expiration of the deadline, the claim request comprising the second unique identifier, a pre-image of the hash value, a signature of the second user, a randomization of the hiding commitment, and a zero-knowledge token comprising the second user as owner and the same asset type and asset value as the hiding commitment; and
responding to the at least one the claim request and the reclaim request according to the deadline.
14. The non-transitory computer readable medium of claim 13 , wherein the instructions further cause the processor to:
receive a second asset lock transaction comprising a first unique identifier of a second asset token, the signature of the second user, and a second hiding commitment of: the second user, the first user, a multiple of the deadline, a second hash value, a second asset type, a second asset value, and a second asset unique identifier, wherein the second hash value comprises a hash of the pre-image and a random value provided by the first user;
receive a second claim request from the first user, the second claim request comprising the second asset unique identifier, a random value of the hash value, the signature of the first user, a randomization of the second hiding commitment, and a second zero-knowledge token comprising the first user as owner and the same second asset type and second asset value as the second hiding commitment;
validate the signature of the first user;
verify that the deadline has not elapsed;
validate the random value of the hash value; and
assign the second asset to the first user.
15. The non-transitory computer readable medium of claim 13 , wherein the asset lock transaction further comprises a plurality of zero-knowledge proofs associated with the first unique identifier of the asset lock transaction, the first user, the asset type, and the asset value.
16. The non-transitory computer readable medium of claim 13 , wherein the first unique identifier of the asset lock transaction is determined according to at least a private key of the first user.
17. The non-transitory computer readable medium of claim 13 , wherein:
the asset lock transaction further comprises a lock time and a first zero-knowledge proof that the hiding commitment encodes a valid deadline;
the claim request transaction further comprises a claim time and a second zero-knowledge proof that the deadline has not elapsed;
the instructions further cause the processor to verify that the lock time corresponds to the current blockchain epoch;
verify a validity of the first zero-knowledge proof;
verify that the claim time corresponds to the current blockchain epoch; and
verify that the second zero-knowledge proof is valid.