Suppose Steve’s phone has a poor internet connection while his friend Larry enjoys lightning-fast 5G internet. Larry wants to send 20 coins to Steve in just a few clicks. Here’s one possible way to accomplish this:
Larry opens his wallet app and selects the offline option to transfer coins.
Larry searches for nearby wallets and selects Steve’s wallet.
Larry inputs the amount of 20 coins and confirms the transaction.
Steve receives a notification that Larry has sent him 20 coins.
“ Think like airdrop function like iPhone “
Steve accepts the coins, and they are instantly added to his wallet balance.
Steve can choose to keep the coins in his wallet or send leave them in the offline function.
How would you prevent Larry from broadcasting to the network that he paid Steve? Or vice versa how would you prevent Larry from spending all his coins online and paying Steve offline thereby preventing Steve from finalizing on chain or online?
Payment channels also don’t work. Even in the constrained scenario where Steve and Larry open a payment channel directly between each other before heading off to their island (i.e. no need for internet to find a lightning path between peer channels), one still can double spend each other by initiating a channel closure before they leave for the island, without the other notice.
steve and larry open a payment channel
larry leaves for the island
steve initiates a channel closure immediately once larry leaves
steve also leaves for the island
while on the island, steve sends larry many offline payments using their payment channel
when steve and larry return from the island, larry realises the payment channel closed while they were on the island, and all of their payments reverted. Steve gets all the coins back and steve has no recourse.
Every payment channel requires a channel closure mechanism, so this problem cannot be avoided.
The only way to achieve offline transfers is via an atomic key transfer protocol like opendime or phonon.network. BUT, these also have their own crazy limitations. ‘Blockchains’ and ‘offline transfers’ simply are two things that don’t go together.
I tend to agree. Yes with payment channels you could get some spendable credits between two parties since both parties always share the same state unless they lose their keys or their data. They do not need internet since they can interact physically. However, a payment channel or network of channels cannot be multi-party while being offline since otherwise you can always double spend since not all parties get an update of the state when two parties interact.
Whenever I think of how it could be done offline, I always end up with there being a central party who hold coins to give physical tokens or something or a need for all parties to at least interact with the token issuer. In other words, you end up having the need for internet connection to a “bank” or you would need to physical protect tokens to avoid double spends. In case of crypto physical protection, this translates to the need for a secure chip or hardware wallet to ensure there are no double spends to replace the double spend protection from the blockchain.
Let’s consider the scenario where a government or an evil entity decides to attack the central party that’s using Grin currency. In such a case, they could easily kill the payment channel of the central party, leaving all its users in a vulnerable position.
However, if such an attack were to occur, we would get to see Grin in action as a low storage solution. It’s important to note that attackers usually only target things that have grown in size, such as reaching 500k - 1m users.
If such an attack were to occur, people would likely create new solutions for offline transactions or simply revert back to using Grin coin on their own node.
It’s important to understand that centralization is not always bad. The whole point of blockchain is to have a fallback option in case bad actors take control of a centralized authority or if a government or corporation tries to attack it.
The closet thing to safe would be the use of credit-card chips with a signing key to sign a challenge made by the receiver (who holds a record of all official card public keys), to proof they are original and not tampered with and some internal mechanism on the chip to protect against double spend of tokens.
This can be done by a central token issuer or in case you want to be able to protect against an attack on such a central authority by using time-locks on the blockchain. As long as the central authority is trustworthy and does not hold its own record of keys after creating the cards, it safe against any attack except for if someone breaks the card security and as such obtains signing keys and can produce ‘fake’ cards that do allow double spends.
The grin vouchers I proposed are fun, but will always require either the receiver to connect with the internet to transfer to his own wallet to avoid double spend or would need the receiver to trust the sender. So Grin vouchers are ‘fun’ for airdrops, paper grin, top-up cards, but they never are trust-less.