Vynos is an in-browser micropayments wallet developed in SpankChain x Machinomy collaboration. It provides a smooth user experience for micropayments over Ethereum blockchain in an ordinary browser. No extensions, no applications to download, no special coding, no friction. All is lubed up. You are encouraged to read about Vynos birth. Feel free to try a demo on vynos.tech after that.
Porn and micropayments is a match made in heaven. First, porn industry is always the first to ride a new technology wave. Blockchain is one. Second, it is high-value snackable content, that caters to micropayments, as Tom Baekdal explains. So, expect the first ever adult livecam paid by micropayments streamed on SpankChain platform.
We tried all forms for in-browser Ethereum micropayments wallet you could imagine: from vanilla JS to browser extension to JS code again. Vynos that you see now is quite a complex thing that operates one of the few available micropayment systems behind nice and easy looking user interface. As a bonus it provides familiar Web3 API for Ethereum, making it one of the few embedded in-browser wallets out there.
Brief introduction to State Channels
Ethereum now handles more than any other blockchain now. Long-term solutions like Casper and Plasma are not going to be useable for a while. It is best time now to have a talk on what could we do to ease the load now. Best candidate for scaling now is state channels technology.
Our focus is on payment channels. It considers only off-chain payments, no complex arbitrary state. The approach allows a user to reduce transaction fee to almost zero, under few conditions. Payment channel operates between a pair of users. These two send money to each other often enough. Practically speaking, this is quite a usual scenario. It covers payments for media content, that are effectively micropayments.
A payment channel works like a tab in a bar. Alice deposits some amount of money first. Then shouts to a bartender Bob ordering a drink. When the party is over Alice gets her unspent money back. If bartender is malicious though, the result could be different.
Thankfully, we have brutally honest blockchain for a bartender. It does not cheat unless programmed so. For that same scheme to work, Alice, that is a sender, deposits her money to a contract, that is the first blockchain transaction. Then every time she orders a drink, she signs an IOU note.
Any time the bartender, the Receiver, is free to redeem the note, and receive the money earned, while change is pushed to Alice. She could choose to get out of the relationship too. As in a court, Bob is given some time to present the witness, that is the IOU note, to the blockchain. It is the second and last transaction in optimistic scenario. Pessimistic case adds one more transaction. Neither party could cheat and get away with all the money. The rules are enforced by the blockchain.
Blockchain operations rely heavily on signatures. To write a transaction on chain a user have to sign it before broadcasting to the network. It is quite similar to payment channels. To send an off-chain transaction the user has to sign IOU note too. For a payment channel, the user signs something at least twice — to open a channel, and to send an IOU note, that is a payment.
For online media MetaMask was the single tolerable tool to interact with Ethereum to date. It is a browser extension that a user has to install. That alone kills user experience and conversion rate, if we consider wide-spread use. It is not aware of micropayments, so every time a payment is sent, a window appears.
Micropayments have long been considered dead, as user is overwhelmed with decision to buy a content piece. Here that decision is multiplied by signature window. Real mental torture. We have to make that piece of user experience smoother, so here comes Vynos.
To attach Vynos to a page, one has to put just a single line of code:
That triggers loading of all the components.
Vynos contains three parts. vynos.js injects Client API into the page, initialises the frame, and sets up a communication channel between the two. The frame is responsible for UI, and for starting Worker. The latter maintains shared state, and connects the whole to Ethereum network via INFURA.
One could propose eliminating service worker. Result here is a data leak, or poor UX. Important part of the state maintained by Service Worker is a user’s private key. The key is stored on the worker’s memory. It touches browser’s LocalStorage in password-protected form only. No service worker would mean the user has to unlock the key on every new page she visits, as there is no centralised key management between the frames. Alternative is to store the key in plain sight. That is not acceptable.
Vynos frame and worker operate under an origin different from the one of the client page. Same-origin policy enforced by browser guarantees that the client page and frame communicate through a well-defined interface only. It prohibits unsolicited data access between the origins.
When a user initiates a micropayment for the first time, a channel is opened through usual Ethereum transaction to a payment channels Broker contract. Next time micropayment is sent, it goes off-chain straight to the payment receiver, that is web site. While doing so Vynos frees the user from a mental burden approving every operation, yet preserving security of funds. Every micropayment transaction is checked against constraints set by a user: threshold for what is considered a micropayment, and how often it could be processed safely.
Ordinary transaction, like sending funds, or calling a DApp contract, always requires an explicit user consent.
Life of a micropayment starts when a user clicks on, for example, “Read More” button. It is signed, and sent to a media website. The latter checks incoming payment against the blockchain. If accepted, payment results in a service or content being provided to the user.
That happens directly between the user and the media web site. No middlemen involved. That brings us to features inherent to our micropayments scheme.
Privacy — Nature of transactions is known to a user and the web site only. No data is leaked to a 3rd party, ever.
Scalability and Reliability — Number of transactions inside a channel is literally infinite. Necessary payments endpoints on the web site backend could be scaled horizontally. Web sites do not depend on each other. As for Vynos, it comprises of few files, that are cached and served by CDN.
Interoperability — It nicely integrates into Ethereum Web3 ecosystem. A way is clear to integrate it smoothly with traditional financial infrastructure, though it would take some time.
Optional Anonymity — Payments are pseudonymous. That pseudonym is tied to a payment by design. We anticipate integration with some self-sovereign identity system to provide both user and media with an option of more intimate relationship.
Hope that was enough to continue your interest to in-browser micropayments over Ethereum blockchain. Vynos lacks many features necessary for a joyful user experience. We plan to fill the gaps with basics along with some interesting stuff like multiple supported browsers, including mobile, and ERC20 micropayments on Mainnet. Our micropayments library is capable of this.
Feel free to add any questions or concerns you have here. Especially, if you think on smooth web3 experience on your DApp, or interested in micropayments. Even better if you have an app token or plan to generate one. We strive to make Vynos the smoothest ever micropayments wallet, so any feedback is welcome.
Also, buy some SpankChain tokens while it is early. You will thank us later, promise.