Every Day Crypto with xDAI

Roman Pavlovskyi
Ching!
Published in
4 min readDec 22, 2018

Seems like the trend of accepting crypto in coffee shops is slowly dying and that makes me sad. So what can we do?

I think there are 3 main problems as of right now and they are all solvable.

Bad UX for the customer

Let's imagine a typical bar or club on a busy night. Loud music is playing, there is a crowd around the counter and a few bartenders spinning shakers and pouring shots. Crypto Criss catches eyes of one of the bartenders, waits for him to lean in and screams that he wants a can of domestic lager and a tequila shot. In a minute the order is ready and using his fingers the bartender asks for $12.

Let’s forget the established ways of payments and think about ways to make it work with crypto.

The first problem is that the price is in dollars. There can be a conversion mechanism, but I think this is where stable-coins shine. A stable-coin is tied to the value of a non-crypto currency (e.g. 1 coin can always be traded for $1) Paying stable-coin is easy (look at the price and pay the same amount of coins) and there are no worries about fluctuations. Criss can keep some stable-coins for pocket expenses and there are services that he can use for easy conversions from/to any other crypto. Same goes for the store.

Ok, so we accept stable-coin. Criss shows his phone with a wallet app open, the bartender makes a few taps on his POS terminal and presents a QR-code. Criss scans the code and transaction modal comes up…

The second problem is that transaction amount needs to be manually entered by Criss, then checked by the bartender. This can be solved entirely. When scanning QR-code with Status and Toshi wallets, if it has a URL encoded, it will load the web-page in the wallet browser (web3 injected) and that URL can incorporate things like transaction amount, recipient address and order number as parameters. Everything needed to build a transaction and show it to Criss, or even present him with a few buttons to select from several acceptable coins before that. Cool, now bartender doesn’t even need to show the price on fingers.

Bonus: The page that was loaded to the wallet, has txHash and an order number that can be sent back, so the bartender is presented with the transaction progress instantly and transactions are attached to specific orders (in case there are multiple transactions in-progress).

Solved!

Slow confirmation times and high transaction fees

There are multiple solutions that are available right now, but if we narrow it down to stable-coins, the clear winner is DAI and xDAI.

The first one is a popular stable-coin from MakerDAO (Mainnet ERC20 token, so fees can still be high and there are scalability issues).

The second one is DAI clone on POA Network side chain with easy DAI-xDAI swaps, 2 second confirmation times, very high throughput and ability to pay fees in xDAI (no need to keep ether in the wallet).

It is easy to convert any crypto to DAI, then swap it with xDAI. Criss can keep some xDai on the same wallet as his other crypto and take advantage of instant transactions that don’t require any ether for the pocket expenses.

Solved!

Security

Let’s follow the money and see where there are weak points.

Criss’s wallet holds the money initially. It is a mobile wallet app and assuming he did his backups, it’s safe enough to keep a couple hundred dollars worth of crypto.

Next, the transaction is crafted by js code loaded in the wallet browser and presented to Criss by the wallet dialogue. There are 2 places where this can go wrong: terminal generating malicious QR-code and the server that serves js code is compromised. In both cases, at best an attacker will be able to re-route funds until the breach is discovered. This is not a honey-pot situation and is manageable.

Lastly, the money is received by the store. Interestingly, a POS terminal does not need to have any private keys to provide full functionality: receive a payment, track a transaction and manage inventory. All that’s needed is the address where funds should go. So the owner could easily use a single hardware wallet or even cold storage to receive payments from all terminals.

A-a-and Solved!

Conclusion

The crypto eco-system is finally mature enough to provide a POS solution that is as good as cash or credit card. Our team has made a proof of concept app that is using QR-codes to encode all transaction details, and we are excited to work on it while keeping it open source. MakerDAO were generous enough to give us some grant money, so we are looking for smart folk for hire to help us with UX and UI design. Hit me up at rpavlovskyi@gmail.com.

Our goal is to have a functional app for ETHDenver. Work with us to make that happen and pave the road for crypto adoption!

Edit, Aug 13: Continued in part 2

--

--