A reward of 30 trillion nano grin will be given to anyone who can develop an offline wallet feature that can be integrated into Android/iPhone mobile devices.
The function must be incredibly user-friendly, to the point where utilizing it is as effortless as picking up a pencil and writing.
Is a Grin voucher, the transfer of funds by importing a mnemonic or privatekey, an offline function?:
If it is generating and scanning a QR code, it should be as easy as picking up a pensil and paper. But the last step, claiming the funds, will always need to be on-chain.
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?
The only way to receive payment offline and be sure that the coins have not been doublespent, is from an n-of-n output that you are already part of. Such as is the case within a payment channelā¦
Right so in that case it isnāt really offline right? Iām all for payment channels but as far as I can tell we are seeking for much higher than that here.
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.
In the context of payment channels the project makes sense, but technically people will need to finalize transactions here and there and canāt just rely on the offline features for security.
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.
Unfortunately, it requires trusting the card manufacturer not to make their own āgod cardsā which could double-spend. Soā¦ its not fully trustless, but its a lot better than trusting grin banks