Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.74k stars 445 forks source link

Blockchain Engineering 2023 - Offline Token Money #7296

Open synctext opened 1 year ago

synctext commented 1 year ago

Team issue for 10 weeks of blockchain engineering course at Delft University of Technology

Offline token money. Your task is to create easy payments using tokens, without Internet. Giving and receiving tokens should be easy and effortless. Special requirement is that it should also work in an emergency: when the Internet is down. Probably you need to use QR-codes scanning to move Tiktok Tokens between devices. The hard scientific task is to address the double spending risk. Required background reading from Delft: Double spending prevention of digital Euros using a web-of-trust.

TimG-NL commented 1 year ago

Until 27/02/2023

Done:

Ideas to solve double spending problem:

Important terms to look into:

synctext commented 1 year ago
Robert-ML commented 1 year ago
naklecha commented 1 year ago

Team Update

synctext commented 1 year ago
AdiDumi commented 1 year ago
synctext commented 1 year ago
Robert-ML commented 1 year ago

Promises Approach: devised a signature scheme so that a recipient can hold a sender accountable in case of not fulfilling its promise to send funds (completing the transaction) when he returns back online.

The app: we have a working app where the sender creates a promise which can be scanned and is verifiable proof that the sender has to transfer money to the recipient when they get back online, the balance shown is not valid and is just as a placeholder.

TODOs:

synctext commented 1 year ago
Robert-ML commented 1 year ago

@AdiDumi: I've made all the fragments with their UI (the print money and the coin picker most notably) and the navigation between fragments.

@gerbentimmerman: Last week, I mainly focused on data persistance research and created the initial database with some simple backend functionality. Next week, we will add more interactions with the database and connect it with the UI elements.

@naklecha: Last week I worked on the QR code integration, private key generation and passing those values to the QR code.

@Robert-ML: I've made the button interaction logic. Also I integrated the offline money app as a library inside the big super-app.

@vick0088: I work on the private & public key pair together with nishant.

tudelftstudent commented 1 year ago

@vick0088 I work on the private & public key pair together with nishant.

AdiDumi commented 1 year ago

https://user-images.githubusercontent.com/57295921/227885946-caa61326-6c2e-4cf1-a949-fcb6359696ec.mp4

We made a short demo of how the app looks until now, there are still some links to be done between pages and QR code but this is the reference

GIF:

synctext commented 1 year ago
Robert-ML commented 1 year ago

PR into Trust chain super app. About the app:

About the team contribution:

AdiDumi commented 1 year ago

Demo with the printing money functionality working and balance update

synctext commented 1 year ago
Robert-ML commented 1 year ago

Assignments: When anything is done, mention it in Whatsapp so we might test it.

@gerbentimmerman :

@naklecha :

@Robert-ML :

@vick0088 :

@AdiDumi :

synctext commented 1 year ago
Robert-ML commented 1 year ago

Implemented transacting tokens through QR and do all the security verifications. Because of limitations to the QR method, we can not put too much data into the QR so for high scanning success rate we recommend making transactions with only one token.

We do double spending token detection and find the culprit through the recipients history of a token. We insert it in our web of trust as a double spender (low trust score). Because of QR size limitation we do not send known users and their trust when doing a transaction, but it can be easily added just that QRs would start failing to generate or high likelihood to fail to be scanned.

New PR, APK and README

Robert-ML commented 1 year ago

2 euro from Robert & 10 euro from Robert

synctext commented 1 year ago
Robert-ML commented 1 year ago

PR, APK, README, DEMO

TimG-NL commented 1 year ago

Offline Digital Euro - DEMO GIF

Blockchain Engineering - Offline Euro Demo