Closed synctext closed 3 months ago
The team went through the double spending paper and noticed that it should be the receiver the one who needs to get the warning message and the trust-score of the sender, since he is the one who is expecting to receive money.
Everyone also looked at the Trustchain paper to get acquaint how Trustchain is working and be able to reason about the double spending issue in an offline scenario.
QR scanner was developed, but need to be integrated with DetToks. QR code was also successfully produced
Great find! Receiver is taking the risk :police_officer: did not notice this problem earlier. The flow does not match typical trading situations! Figure 3. Screen capture of a transaction showing a trust score
of the offline Euro paper shows the Send Money
screen with scores.
Please propose a better flow. Could just be clarification at the receiver side. For instance, a clear 3 x warning beep when scanning low-trust QR codes. A very loooong beep for QR code owner who got caught double spending and refusal to process the QR code. Idea of a collateral is also great to explore.
Related (crypto) work from China: https://link.springer.com/chapter/10.1007/978-3-031-17551-0_30 Key concept: Post-incident accountability.
Limiting the scope, can't be solved in the general case. scenario: pay for water at the local supermarket you visit every week in an emergency. {nobody has any money. avoid the disaster after the disaster} quote: people leaving their phone numbers and promising to come back and settle their debts once the situation stabilises.
{repeating from first meeting} First sprint goal: Create unique coin EURO 000001, signed by yourself, Show QR code, scan QR code (all this is already operational inside Superapp), copy inside trustchain data structure.
At week 5: good to have running code of some mechanism.
We discussed that our main focus should be on improving the trustscore by including more factors than just the number of transactions. Furthermore, we came up with a mechanism that could possibly detect double spending. What will be included in the final product is still open to discussion but it’s good to think these scenario’s out.
Improving score: the score should be dependent on the trustscore (number of transactions), the number of detected double spendings and the time you have been online for the last time. The last dependency is included to detect double spending (as described in next section).
Detecting double sending: detect double spending by reducing the comparisons of chains to a subset of parties a user has pre-defined before going offline. The idea is that if a user wants to pay offline he/she must first add the parties it wants to spend its money to to a list. The parties that receive the token only need to compare its chain with the chains that were part of the list. When you come online you compare your chain only to the users that were pre-defined in the list.
"It is not trivial for two random strangers to detect that they were defrauded by the same person. The proposed solution tries to reduce the number of people to compare a users chain to so that two random strangers can indeed detect fraud in a feasible amount of time."
For example, user A wants to spend money at company B, C and D. User A spends his offline token at company B. Company B now only needs to compare its chain with companies C and D to be sure there was no double spending. This reduces the comparison of chains to a reasonable subset instead of a large amount of total users in the network.
Verify tokens: a token is verified if the transaction of the token has been compared to the chains of the parties in the list of the sender. This reduces the risk of double spending. A token can only be spend after it has been verified (i.e. a token that has been received offline can not be respend before the user has been online).
Other ideas:
Progress so far:
well known counterparties
. These can be selected by the attacker: what if they all collude to steal money by double spending?
EURO 000001
Value: 2 Euro {signature by ECB}Based on the meeting of last week we revised our flow and reduced the task to a viable MVP.
Score: the score should be dependent on the size of the EuroToken. The more transactions in the token, the larger the token. This is because by a change of owners a block is added to the token.
Verification: two ideas 1) Verify each user in the chain of owners, checking that they had the token and checking with every user in their "address book". 2) Add transaction to TrustChain. The transaction will be between the initiator and final owner of the EuroToken. If the transaction is added, it is considered valid. Double spending should be detected by comparison of chains in the TrustChain network. We will focus on the last one.
Our MVP can be divided in the following tasks:
Each task has its corresponding UI.
What we've done since the last meeting:
case of not fulfilling its promise to send funds
We finalised our final product to the following:
Our application will now also include a special admin page that mimics the central authority. The admin page will be able to verify the token and re stamp it with a new timestamp.
After a month a token must be verified
add friend
really the term to use for supermarket payment?We have been working on creating a working APK. Unfortunately we have run into some issues that slowed down our progress. Up until this point we have a working QR code scanner and are able to add and retrieve the wallet of the user. We are not able to display this in the app. We also experienced issues with generating a proper APK.
TODO's:
Current branch: branch
Screenshots:
Admin screen
Token ListUpdated README.md
We also prevent the same coin from being scanned by two people, hence preventing double spending of the same coin
GIF - https://drive.google.com/file/d/1Om2BhDseR2K3bHnyacP2KV7krysMa7cg/view?usp=sharing
APK - https://drive.google.com/file/d/1MH3qiH1NXBtPdBbfjCnsNqvs3r8FT5Wg/view?usp=sharing
Decentralised TikTok skeleton app for the CS4160 Blockchain Engineering (2022/23) course.
Detoks - Offline Token 2 An easy payment application that makes sending and receiving tokens easy. A user can choose the amount to be received and create a request which can be paid by a preadded contact. The payment can then be done by scanning the generated QR code and a transaction is then made. A Eurotoken is minted and verified by a central authority.
GIF - https://drive.google.com/file/d/1Om2BhDseR2K3bHnyacP2KV7krysMa7cg/view?usp=sharing
APK - https://drive.google.com/file/d/1MH3qiH1NXBtPdBbfjCnsNqvs3r8FT5Wg/view?usp=sharing
Use case The application can be used for the following use cases:
Create and store EuroToken (add screenshot) Encode and create QR for EuroToken (screenshot) Send and receive EuroToken between contacts Add new contact Double spending To mitigate double spending, contacts are to be added before users can send or receive EuroTokens. This makes it easier for admins to track double-spend EuroToken and give users warnings when trying to add malicious users. Another important concept is used to make sure that the detection of double spending is relatively on time. After receiving a new token, the token is valid for a limited amount of time (a month). After that month a token must be verified before being able to re-spend it. The token will be restamped with a new timestamp which makes it a valid euro token.
Future work To detect the double spending, two ideas were discussed which can be implemented in the future:
Using the verifivation mechanism, double spending can be easily detected when two users try to verify the same token. The authority will be able to direcly detect the double spender. To prevent double spending in offline transactions, a given precentage of the user tokens is preserved and cannot be used to make payments until the user comes online.
delay(1000L)
.1 coin
Public key
Token to Vyshnavi, only Vyshnavi can receive it
Sending token to Prof
Updated README.MD https://github.com/Ne184/trustchain-superapp/blob/master/README.md#detoks---offline-token-2
Latest APK: https://drive.google.com/file/d/1r2p7AvBQ-pumPTApD-cKcR0m7v0g8q1D/view?usp=share_link
Added Standard Euro Denominations (.5 Euro, .05 Euro, 1 Euro, 2 Euro, 5 Euro)
Made Draft Pull Request: https://github.com/Tribler/trustchain-superapp/pull/158
For Demo:
Add public keys for a smooth transaction process:
Code Link - https://github.com/Ne184/trustchain-superapp/
Sending Token to Professor:
An offline payment application that makes sending and receiving tokens easily.
Please note that developers probably do not understand that this app is exclusively offline. No usage of the IPv8 networking stack is made, not for the token transfer and neither for the `Add Friend
feature. suggestion to add to readme.mddetoks
subdirectory1. Send Money
.Another important concept is used to make sure that the detection of double spending is relatively on time. After receiving a new token, the token is valid for a limited amount of time (a month). After that month a token must be verified before being able to re-spend it. The token will be restamped with a new timestamp which makes it a valid euro token.
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.
EURO 000001
, signed by yourself, Show QR code, scan QR code (all this is already operational inside Superapp), copy inside trustchain data structure.