Blockchain micropayments in decentralised platforms
Jaro Šatkevič, jaro@mysterium.network
Blockchain payments
Slow
Expensive
Secure
Censorship resistant
Open and permissionless API
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245010/pasted-from-clipboard.png)
All transaction history have to be stored and synced among all network's full nodes
Micropayment channels
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245122/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245124/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245122/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245127/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245129/pasted-from-clipboard.png)
3
7
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245129/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245131/pasted-from-clipboard.png)
5
5
2
8
4
6
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245142/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245122/pasted-from-clipboard.png)
2
8
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245144/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245150/pasted-from-clipboard.png)
Each party have open channel to any other party
Payment promises
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245158/pasted-from-clipboard.png)
digital cheques
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245192/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245196/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245235/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245192/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245196/pasted-from-clipboard.png)
11
15
9
Alice can over promise = double spending problem
settle
Payment via intermediaries
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6244952/pasted-from-clipboard.png)
Alice -> Bob -> Carol -> Dave
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6244952/pasted-from-clipboard.png)
How to ensure that Bob and Carol will resend payment?
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6244956/pasted-from-clipboard.png)
Dave requests payments
(issues invoice by sending hashlock to Alice)
Alice sends locked tx to bob via opened channel
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6244958/pasted-from-clipboard.png)
Bob resends locked tx to Carol and Carol to Dave
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6244971/pasted-from-clipboard.png)
Dave reveals secret to Carol to unlock transaction
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6244970/pasted-from-clipboard.png)
Carol reveals secret all way back to Alice
(final step of micropayment)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6244972/pasted-from-clipboard.png)
Lightning Network
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6244978/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6244978/pasted-from-clipboard.png)
Complicated routing
(all parties have to be on-line and have enough funds)
Problems of Lightning Network
- Channels cannot be created on-the-fly.
- Routing paths are much harder to find when values are considered.
- Users have to be online and use hot wallets.
- Hubs have to lock a lot of funds.
- Expensive to increase channel.
- Requires specialised software.
Hermes protocol
Lightweight solution for high throughput micropayments
Consumer to Provider
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245322/pasted-from-clipboard.png)
payment promises
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/7193140/1.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/7193141/2.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/7193142/3.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/7193143/4.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/7193144/5.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/7193145/6.png)
- Providers can aggregate promises
- Consumers can top-up via any wallet
- Settlement can be done at any moment
- Hermes is non-custodial party
settle multiple promises from many consumers via single on-chain tx
even from exchanges
can be each hour or once in a month
he can't stop a transaction or take users money
Request based communication with Hermes
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245366/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/7188412/Architecture.png)
Problems of payment channels
"Rich" hub problem
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245373/pasted-from-clipboard.png)
Accountant have to lock 40 own tokens
10 000 providers
=
200 000 locked tokens*
*1 token = 1 USD
Staking as way to insure incoming channel balance
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245453/pasted-from-clipboard.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245455/pasted-from-clipboard.png)
Deposits 10 tokens stake
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245456/pasted-from-clipboard.png)
Consumer send promise
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245457/pasted-from-clipboard.png)
Accountant resend promise
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/6245459/pasted-from-clipboard.png)
Provider gets stake back
Etherless transactions
![](https://s3.amazonaws.com/media-p.slid.es/uploads/452026/images/7661478/Settle.png)
Ethereum will require ETH to pay for tx fees
Actual technical implementation
Smart contracts
Payments go package
Transactor
Hermes
Questions?
Hermes protocol - Lightweight solution for high throughput micropayments
By Jaro
Hermes protocol - Lightweight solution for high throughput micropayments
- 935