A recurrent question from people living in places with unstable internet connections is about how usable and secure could be the use of faircoin under this circumstances. Here we’re trying to explain which can be the problems and which can be the solutions in this scenario.
The usual behaviour with stable internet connection:
- when a payment is done from a buyer to a seller, the transaction must be confirmed for some nodes in the faircoin network. This confirmation process delays less than 10 minutes, and the seller can see in his wallet that the payment is confirmed.
- when the seller have seen the confirmation means that the faircoin network knows already that these faircoins are his property, and the payment can be considered as executed.
- the faircoin network knows that the faircoins aren’t the buyer’s property anymore, so he cannot spend them never more.
When the internet connection is unstable, this confirmation process can be delayed until the connection becomes available again, so there can be some consequences:
- the seller doesn’t recive confirmation of the transaction, so the payment cannot be considered executed.
- the faircoin network doesn’t know that the buyer has spend the faircoins used in the transaction, so he could spend them twice, i. e. in another shop.
The problem is about trust. In this scenario, the faircoin network cannot validate transactions in the meanwhile there’s no internet connexion, so a malicious buyer can try to double spend the faircoins. If this is the case, when the internet connection becomes available, only one of the transactions (the first one which arrives to the network) is validated, and the other one will not be valid anymore.
Searching for solutions
First thing important to know is that a transaction can be alive without internet access for many time. A signed transaction (that is a transaction validated by the owner of the faircoins) can be confirmed in the faircoin network at any time later. No limit known. So, delaying the confirmation is not a problem. The real problem is about trust, a malicious buyer doble-spending his faircoins, as it has been explained.
One possible solution is when buyers and sellers are in the same local area network (LAN). A use case would be a market in a village, with all buyers and sellers connected to the same LAN. If all of them use a full node wallet, or if they use electrum wallet but there’s a electrum server inside the LAN, there will be no possibility of malicious double spending, as the transactions will be public in the context of that LAN. If the internet connection goes down, the blockchain inside this LAN will be updated with the transactions that happen inside the LAN, and when the connection is restored, the faircoin network will be updated with the new transactions.
It can be pointed here the existence of many mesh commons networks around the world that could be a good reference to implement a LAN like explained before. (i. e. https://guifi.net)
Another possible soluton has to do with the case that the seller has internet connection, but the buyer not. In this case the buyer can sign the transaction and transmit it to the seller by an alternate medium, as bluetooth, nfc, wifi, a pen drive, etc… Once the seller get the signed transaction, can broadcasts the transaction to the faircoin network, and it will be confirmed without problems.
Edit: This paper seems resolve the offline transactions like the Rojava problem: