I am designing a protocol where a user A sends a time-locked deposit to user that if the user B within time t provide a proof that he exists in a location x (this may be obtained by third party like Google), user B can get the deposit of A. Otherwise, A can get his money back. Any help of how to do that using cryptography or two-way secure computations?

1 Answer 1


As this is an Ethereum forum, I assume you are interested in creating a contract which implements such functionality.

What you need is a contract which:

1) Accepts Ethers from user A

2) Upon receiving proofs of x from an oracle (oracle can get the data from for example Google) checks the timestamp. If current time is greater than t the contract forwards the stored Ethers to user B. Otherwise it probably does nothing.

3) According to some rules if user B can't provide requires proofs the contract sends the Ethers back to A.

This is a basic approach. To make it a bit more secure, consider applying the withdrawal pattern (https://medium.com/@jgm.orinoco/why-use-the-withdrawal-pattern-d5255921ca2a) instead of sending Ethers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.