5% of imported goods in Europe are fake, turning into losses in the billions for brands and stimulating shady production practices in developing countries.
The EU created a forum, the Blockathon, to leverage blockchain in this fight. In June 2018 we won the first contest, an hackaton, creating a blockchain agnostic protocol to exchange documents between parties. This can be used along the supply chain to anticipate the real goods and check if the data is correct before touching the physical cargos. This is paramount because once the cargo is the hand of the logistic operators, the operator is liable (so in a way, when it's in their hand, it's too late, hence they need to check and notarise first). Since the exchange of these documents is court evidence it is important to anchor it to a truly immutable blockchain.
Liquid looks interesting because it can extend the single use seals and streamline some of the processes thanks to confidential transactions. For a brand it's paramount NOT to show how many units it's producing and shipping, so simple tokens cannot be used. Say one day the tokens will end to the final consumer, for GDPR also tokens in clear cannot be used.
Important Disclaimer Valerio and Luca Vaccaro are Blockstream consultants, they were part of the initial Blockathon team (June 2018). The activities related to this hackaton and the promotion of Eonpass to the EU official pilot project were Thomas' initiative only.
What it does
The protocol represent a handshake between the party who will send the goods and the one who will receive it. In the handshake the sending party shows the UTXO he/she will spend to send the document and the receiving party will declare which UTXO he/she will spend to pass on the document. These UTXOs are added to the document by the sending party. Moreover the document, in clear or in encrypted text, contains details about the shipment: number of items, serial numbers, routes, etc... The sending party spends his/her UTXO, this action corresponds to the sending of the document to the receiving party. Now the receiving end is the only one who can demonstrate ownership of the document and can begin the handshake with the following party down the supply chain.
This protocol enables the notarisation and collection of information which will be important at the application layer, for instance, if a party sends a document that is not matching the physical goods he/she sends, then this can be marked as a reputation loss.
How will it be used in the pilot project The logistic operator has interest in interacting with Customs in the Netherlands and in China. The European Enforcement Database (https://euipo.europa.eu/ohimportal/web/observatory/enforcement-database) will be open and we will use this protocol to ensure the data transfer to and from this system, in fact Customs are a key player in long haul supply chains. We cannot comment on further details at the moment, the pilot is finalised and released to the public by the end of June.
How we built it
For how much I'd love to build it in rust, I used python for creating something quick in the weekend.
Each party will run a liquid node and a Flask server. The server will basically execute the commands to create a document, request the next seal, sending a document (which is basically spending a specific transaction).
Challenges we ran into
liquidd: blind.cpp:553: int BlindTransaction(std::vector&, const std::vector&, const std::vector&, const std::vector&, std::vector&, std::vector&, const std::vector&, const std::vector&, const std::vector&, CMutableTransaction&, std::vector >*): Assertion `rangeresult' failed. Aborted (core dumped)
When you try to unblind but your payload is not well formatted, it rightfully stops, but also crashes.
Documentation. It is definitely my fault that I couldn't dedicate time during the week, still it gets fuzzy real quick.
Accomplishments that we're proud of
We set up a liquid regtest behind onion and setup a liquid node on aws that connects to it. So we are simulating an entity which has her own private access to the liquid network.
Last year we won the Blockathon, https://euipo.europa.eu/ohimportal/en/web/observatory/blockathon/finalists-and-winners, under out initial name CryptoMice. We really focused on understanding the necessities of the stakeholders and on proposing an open source stack.
This year Eonpass was selected to work on the first pilot project which will involve major stakeholders. At the moment this is public information, as soon as more details are released we will be glad to share them with you. On the 4-5-6th of June Thomas was in Brussels to discuss it.
What we learned
- How to setup and run liquidd in regtest
- How to craft a raw tx and go back and forth between blinded and unblinded, which is necessary to properly loop and select unspent outputs
- In our Use Case court provable immutability is important. We have convinced more than one EU official that private blockchain, proof of stake, whatever, creates proof that don't give a hard, mathematical cost to change it, Bitcoin rules and structure instead does.
What's next for Eonpass
Just after we won the Blockathon, Luca and Valerio accepted the offer to join Blockstream. This left Thomas alone with the task to followup the activities and find a way to be part of the pilot project. Now it is time to "gear up" our game and work on the delivery, Thomas is ready to leave his previous businesses and dedicate to this full time, resources are scarce and that is why we are applying to Bitcoin Games.
We are in the position to educate some large brands and corporations to use solid technology and not whatever "blockchain" has the better marketing of the month. Help us do it!