Digital Notary

ctindallctindall Member Posts: 18
I'm working on a contract that would provide a data feed to other contracts that need information about package delivery information.

Tentatively, I plan to work this as follows:

A customer would like to draft a contract that needs to know whether or not a particular package has been delivered (by USPS, FedEx, etc). They:

1) Send the package and get the tracking number.
2) Encrypt the tracking number with my public key.
3) Send the encrypted tracking number in a transaction with a small fee to my contract.

Then, I (or my software):

4) Decrypt the tracking number.
5) Look up the status of the package using the tracking number.
6) Hash the tracking number, possibly including the hash of the previous block as a salt.
7) Send a transaction to the contract that contains this hash H and the delivery status S of the package.
8) The contract stores this information (i.e. contract.storage[H] = S )
9) After a month or so, the contract removes the information to get its STORAGEFEE back.

Now, if the customer trusts me to look up the information and report it correctly (and by extension for the Post Office to report it correctly), they have a contract-actionable data feed about whether or not their package has been delivered. Since the information is indexed according to its hash, no one can find out what tracking number they actually mean except them and myself. This is important because the tracking information usually includes things that are better left private, including at least the city of origin and destination of the package. Customers will of course have to trust me to keep this information private.

This can then be used to create sort of physical half-escrow:

Alice wants to sell Bob a sweater she knitted by mail. Alice creates a contract that will take a transaction that contains Bob's payment, then a transaction from her that contains the hash of the tracking number (the index into my contract's storage). When Alice sees that the package has been delivered, she sends another transaction to the contract, which validates it using the delivery confirmation contract above, to claim Bob's payment. (Notice that Bob still has to trust that Alice hasn't sent him any empty box or something less valuable than the sweater.)

Would any of you use this service?

Comments

Sign In or Register to comment.