The World's First Micropayments Web Wallet

October 19, 2016

Wouldn’t it be cool if you could easily earn money on the internet? Yours is a social media community like reddit, but where every user has an integrated wallet so they can easily pay each other for things. It’s the first social media community with a real economy. See the pitch we recently gave at Boost VC for an overview of the idea.

Today we’re happy to announce we have our micropayments technology working in our UI. This means we have the world’s first micropayments web wallet. Although the term “micropayments” has been highly overused since the 1990s, genuine micropayments weren’t really possible until the advent of the blockchain. With a network of smart contracts on top of the bitcoin blockchain, Yours users can possess and send fractions of a cent with zero fees. It’s like the Lightning Network, but in a web browser, and for a mainstream audience.

Yours has been in development for over a year. When we demonstrated our first prototype in April, which used normal bitcoin transactions, we realized the fees of 5 cents per transaction were too high support payments of only 1 cent for content. Fortunately, the brilliant Lightning Network team proved a solution to this was possible with a network of smart contracts on top of the blockchain. So we began our odyssey to implement something like this for Yours.

Two months ago we announced we had a proof-of-concept working in a simulated environment. Last month we announced we had it working on bitcoin testnet. Now that we’ve got it working in a web-based UI, we are only one step away - we will now integrate it into our social product, and then we will have our MVP.

We would like to pre-empt one important comment about us being the “first” micropayments web wallet. We would like to tip our hat to Streamium and acknowledge they had micropayments working on the web over a year ago. However, there was one key problem with Streamium at a technical level that is very difficult to correct. Streamium works by opening up a payment channel for every pair of users. This has a poor scaling property that if you only want to send a micropayment to someone one time, you still have to put a transaction on-chain. Our smart contract network solves this problem, making genuine user-to-user micropayments possible in arbitrarily small amounts and with no fees. So Streamium had micropayments working, but it wasn’t a general purpose micropayments system like ours is.

With this milestone we can begin integrating the wallet into the app and sketch our a timeline for launch. We will be launching in phases to our early invite audience over the next three to six months. As we identify security and scaling problems, we will fix them before opening up to more users. We think a general purpose launch will be possible in early 2017.

Check out this video demo of the micropayments wallet where we send a p2p digital cash micropayment of less than one cent:

Our First Testnet Micropayment

September 12, 2016

There are a lot of great content creators on the internet, but most of them aren’t earning any money. Yours is a a way to solve this problem. By thoughtfully incentivizing payments to creators, we give people a reason to pay for content on the internet. Our app depends on an integrated bitcoin wallet, and this week we have made important progress enabling small payments with low fees: we have broadcast our first micropayment on bitcoin testnet.

In order to understand the significance of this test, it helps to understand an outline of the Yours tech stack. Yours Core is the code that runs both on a server and in the client. It contains a notion of users, posts, messages, and the bitcoin wallet. As of our April tech demo, we had a normal bitcoin wallet integrated into our product. However, it was clear that at 5 cents per bitcoin transaction, the fees were to high, so we began working on micropayments technology to lower the fees to nearly zero. (The fees of a transaction on the blockchain are now an average of 14 cents per transaction, so we made a good call.) As of last month, we had finished a proof-of-concept of a routed micropayment. That user-to-user micropayment occurred inside a test suite, and did not actually broadcast any transactions to the blockchain. The difference this time is we have integrated our micropayments technology into Yours Core sufficiently far that broadcasting the transactions became possible. The transactions broadcast successfully.

It is instructive to investigate the transactions we broadcast. The first two, the funding transaction and commitment transaction, look very conventional. The funding transaction uses the Yours Core bitcoin wallet to make a payment to a multisig address. The multisig address is mutually controlled by two parties (who we call Alice and Bob). Alice is the one who funds the channel, i.e. she sends bitcoin to the multisig address. The commitment transaction is after Alice makes a tiny payment to Bob. Alice then closes the channel by broadcasting the commitment transaction. Normally, Alice would make many transactions to Bob before closing the channel. But in our test scenario, we want her to close it immediately just to be sure the transactions are working.

The final transaction, or what we call the spending transaction, is the transaction that contains the most sophisticated scripts. Inside its input scripts are the redeem scripts that have all of the logic involving HTLC secrets and revocation secrets. Furthermore, there are some interesting properties set on the spending transaction. It has a version of 2, which is necessary to make use of relative locktime. It also has the sequence number of each input set to something other than 0xffffffff. For testing purposes, we set the sequence number to 0, indicating that the spending transaction can be broadcast right after the commitment transaction. If this were not a test, we would have set the sequence number to 144, which would indicate that the spending transaction could only be broadcast 144 blocks after the commitment transaction (about one day).

The first redeem script is:

This script locks up the first output of the commitment transaction so that Bob can spend it if he has the HTLC secret. If Bob does not have the HTLC secret, Alice can spend it after one CSV delay unit. Normally the CSV delay would be 144 blocks, but it is zero blocks here to make testing easier. Because the CSV delay is set to zero, Alice is able to spend this output right away. Normally, Bob would spend that output, and Alice would then not be able to spend the output.

The second redeem script is:

This script sends the remainder of the funded channel back to Alice after one CSV delay unit. Again, the CSV delay is set to zero for testing purposes so Alice can immediately spend that output. Normally, Alice would have to wait about a day.

In summary, we have broadcast the first Yours micropayment on the testnet bitcoin blockchain. This is an important milestone for integrating the Yours micropayments technology into Yours Core. The next steps for us will be to integrate the Yours messaging system into the micropayments wallet so that the micropayments can occur with a few simple commands. Then we will perform further integration tests. Once we are sure the messaging system is working correctly, we will create tests that use realistic CSV delays of 144 blocks. That will be the final micropayments test to know the system is working. We will then proceed to integrate the micropayments technology into the Yours UI. That will be straightforward, as sending micropayments with Yours Core only involves simple actions and will not require significant changes to the Yours UI. After micropayments are integrated into the UI, we can sketch out a realistic launch plan.

If you would like to know when we launch, please sign up for the mailing list on our homepage.

A User-to-User Smart Contract Micropayment

August 01, 2016

Four months ago we started spending all of our developer effort on bitcoin micropayments. We have since designed our own shallow version of a smart contract payment channel network similar to and inspired by the Lightning Network. Designing it was the first step, and the next step was to implement it. As of today we have successfully tested our first user-to-user smart contract micropayment in a simulated environment. In other words, our micropayments technology has reached proof-of-concept stage. For more technical information, please see the appendix.

While our tests prove that the technology will work, there is still a good deal of work left to do. The next step for us is to finish edge cases in the implementation, particularly opening and closing channels automatically. Then we will run a “real” test on bitcoin testnet. After that we will integrate the micropayments technology into our app, and then we can launch a preview to an invite-only audience on testnet.

Building micropayments technology is so time consuming it’s worth reflecting on why we believe this is important. On Yours, users will pay for content that is inexpensive by the standards of traditional media — on the order of one cent. Traditional payment systems, like PayPal, charge fees that are far higher than this, on the order of thirty cents. It would not be worth paying one cent for content if you had to pay a thirty cent fee. Even bitcoin’s fees of roughly five cents are too high for this.

However, smart contracts on top of bitcoin allow users to guarantee payments to each other with cryptography. These smart contracts do not need to be on the blockchain. However, since these smart contracts do not have the irreversible security guarantees of transactions on the blockchain, it is possible for users to violate the contracts. But when a user violates the contract, other users involved in the contract can broadcast transactions to the blockchain to end the contract at that point. If Carol has received ten cents from Alice, and then Alice begins violating contracts, Carol can broadcast her latest transaction to the blockchain, get her ten cents, and she never has to deal with Alice again. The blockchain is a dispute mediator with a five cent fee.

There has long been an argument that small payments are too small to be worth the psychological cost of deciding whether to make the payment. But the converse should also be considered— receiving a tiny payment is disproportionately rewarding given its size. We believe that this more than makes up for the psychological cost of making a payment, since even curators on Yours can earn money. It’s worth it to make a small payment on Yours, because the joy of profiting is worth more than the value involved. Yours gamifies internet content.

We estimate that by September we will have implemented the protocol edge cases and be able to perform a micropayment on bitcoin testnet. That will be a good point for us to try to estimate a timeline to launch. The remaining difficulties will be integrating micropayments into the product in a way that doesn’t bewilder a mainstream audience. That will be difficult and will not happen instantly, although we have already done a lot of theoretical work to prepare for that.

Let’s take this opportunity to consider a couple of questions people keep asking us:


Why We're Sticking With Bitcoin

July 14, 2016

Since we announced Yours, a community to help content creators get paid with bitcoin micropayments, one of the top questions we’ve been asked is “why bitcoin?” Some well-meaning people advocated that we make our own blockchain, since then we wouldn’t be stuck with bitcoin’s legacy choices, would have full control over our blockchain’s technical properties to suit our community’s needs, and could profit from speculation. While these are valid arguments, we believe they understate the difficulty of building a new blockchain from scratch and scaling it to reach a mainstream audience.

By leveraging bitcoin, we can take advantage of the largest blockchain technical ecosystem including open source software, documentation, standards, and APIs, as well as the largest blockchain social ecosystem including companies and experts. A new blockchain either has no ecosystem whatsoever, or, if we copy bitcoin, has an ecosystem only insofar as it overlaps with bitcoin. Building on bitcoin, though not easy, is easier than doing it alone on a new blockchain.

That’s the theory. A new project, Steem, has taken the very approach we determined wouldn’t work. They have built their own blockchain and customized it to suit the needs of their community. They’ve grown significantly and now have one of the most valued cryptocurrencies measured by market capitalization. And as best we can tell, it’s actually working — content creators are being paid.

Although we are delighted to see blockchain social media a reality, we worry that Steem can’t last. The burden of building not just a community and a technical platform, but also a novel cryptosystem and supporting economy, is extremely high. Security and scaling problems with their blockchain have a smaller team of experts incentivized to solve them, so solutions will come slower. Companies and services such as wallets and exchanges will be fewer in number and less featureful. When they encounter regulatory issues, they will have fewer allies.

At Yours, we are fully focused on solving the hard technical problems with bitcoin to enable the entire planet to earn money for internet content. Our gamble, backed by the huge number of open-source contributors and companies that service bitcoin, is that we don’t have to do everything ourselves for this to work — we have the network effect of the largest blockchain community to reinforce our efforts. For now this is just a theory, but we are hard at work trying to make it a reality. Join us if you would like to help.


Why Micropayments Are Hard

June 21, 2016

Yours is the world’s first market for micro-content. When we finished our third prototype in April, we came up with a timeline for launch, and figured we only needed about a month to refine the product a bit and improve our bitcoin wallet to have lower fees. Unfortunately, we significantly underestimated the difficulty of “lowering fees” for bitcoin transactions. Turning a normal p2p bitcoin wallet into a micropayments p2p bitcoin wallet requires fundamental architectural changes to the way a wallet works, and roughly speaking more than doubles the complexity of the software. Although we are not finished yet, we are at a point where it may be valuable to our audience to know some of the challenges we are facing, and how we are overcoming them.

  • No one has done this before, so there is no one to copy. Although a notion of micropayments has been around since at least the 1990s, no one has ever actually implemented a working solution. When I originally created fullnode, now Yours Bitcoin, there were many times when I was unsure how to proceed and was able to refer to other open-source implementations, like Bitcoin Core, for a guide about what to do. With p2p micropayments, however, there is no spec and there is no production solution. We do have some other in-progress solutions (lnd, lightning, and thunder), which are valuable, but they are not stable or complete. We therefore have no choice but to innovate with some of our technical choices, which is harder than copying.

  • Payment channels require a messaging layer outside the blockchain. With a normal bitcoin wallet, Carol can receive a payment from Bob by passively monitoring the blockchain. With a micropayment solution based on payment channels, Carol and Bob have to have a two-way communications channel. This comes with at least three additional challenges: 1) There has to be a notion of user authentication, so that Carol and Bob can be sure they are talking with the right person, 2) There has to be a messaging protocol about what data to exchange and in what order and what to do when things go wrong, 3) Carol and Bob both have to be online in order for a payment to proceed from being unpaid to being paid. We are solving these problems by, 1) Making our own user authentication system based on BIP 32 keys, 2) Making a new messaging system based on signed (ECDSA), encrypted (ECIES) messages between users (stored on our server for now, but which can be moved to a distributed system like IPFS at a later date), 3) informing users to come online when necessary to finish sending or receiving a payment (this may be better solved in the future with a mobile app that occasionally checks for micropayments tasks for perform).

  • There is a lot more data to keep track of. One of the great innovations in bitcoin wallets is the standardization of BIP 32 deterministic keys and BIP 44 deterministic wallets. This means you only need to store a master mnemonic once to have permanent access to your funds. Unfortunately, there is no known deterministic solution for a micropayments wallet. Each user has to permanently keep track of commitment transactions, redeem scripts, HTLC secrets and revocation secrets generated by other people. We do not know how to derive all of these things deterministically (although we are hopeful it is possible). Like the blockchain itself, each user has their own log of events which can never be forgotten. The only way to manage this for now is to have a large client-side database that needs to be regularly backed up and synced across devices. Yours will automatically back up and sync this data. (We will use our server to hold the encrypted backup data on launch, and we will iterate to a distributed solution like IPFS later. Of course, you can also back up your data yourself.)

There is good news. In spite of all of the challenges, today CHECKSEQUENCEVERIFY (CSV) became locked-in and is guaranteed to activate in a couple of weeks. We are relying on CSV to significantly improve the security, usability, and fees of our payment channels by enabling them to remain open indefinitely. In 2016, micropayments are actually happening, and it’s not science fiction :)

Towards an MVP 2

May 26, 2016

Clemens and I are 100% focused on finishing the Yours MVP. Here are some things that have changed since the last update:

  • Steven has written a number of articles which have driven new attention to our community. See How Yours Can Empower Creators/Curators From All Over The Web, Endorsements, Payment Channels, and How Yours Will Reward Content Creators and Curators, How To Explain Yours To a Content Creator, and Using Money To Incentivize Content With Yours.
  • Darren has created some beautiful branded graphics that we can use when we launch. These are visible in #design on Slack.
  • We have completed the rebrand from “Datt” to “Yours”.
  • Clemens has finished the design of the Yours smart contract network for micropayments. The implementation supports payment channels from one party to another. We are currently integrating it into Yours Core and building the micropayment wallet infrastructure around it.
  • Fullnode, the Yours implementation of bitcoin, has been renamed to Yours Bitcoin. We believe this better enforces the brand of Yours than using the unrelated name “Fullnode”.
  • We have migrated to using Node.js 6.1 everywhere and have adopted all the fancy ES2015 features it supports, particularly the new class syntax, object destructuring, default function arguments, and rest parameters. You must now use “new” everywhere to create a new object.
  • Yours Core has been merged into the main, private Yours repo. Yours Core will be re-open sourced sometime after launch. We don’t want anybody running premature versions of our code before we launch.

How To Explain Yours To A Content Creator

April 23, 2016

Since Ryan focused on how curators can be rewarded simply by posting great content on Yours in his last post (check it out: here), I’ll focus on how creators can benefit from using Yours. Also, check out my last post regarding how we plan on incentivizing content: here.

So, what is Yours? There are a myriad of different ways we could possibly go about explaining it. We could nail you with the technical specifics, and dance around that with a few marketing slogans, perhaps say the buzzword “content monetization” a bunch — but we won’t.

Let’s take a different approach. Let’s go through a moment in the life of a (hopeful) average Yours user, and talk about what our vision looks like; and how we plan to change the way people discover engaging and entertaining content on the web..and get paid to do it.

The content that you post to Yours is essentially your personal stake into the platform. As viewership and usage of Yours grows -thanks to great contributors (hopefully) like yourself; the propensity that you will see more profit increases as the network grows in adoption. More users means more great content consumers who may find your posts engaging, and worthy of a monetary reward.

Simply put: Post awesome stuff, make Yours a go-to destination for realtime content discovery thanks to your creative talents, profit.


What is Yours?

April 19, 2016

Yours is a way for writers, musicians, and video producers to earn more money for their content by incentivizing people to pay for it. Unlike many media companies, Yours is not funded by advertisements. Yours is funded by people who send payments to creators, with a twist: the people who make payments, the curators, also earn money if they are good at curating.

Many content creators are struggling to make ends meet because third-party advertising is a poor business model. Advertising often irritates consumers and only provides a small return to creators. Traditional media companies are suffering, and many small creators don’t earn any revenue at all. What’s needed is a new model that gives people value for making payments directly to the creators. Creators should earn more money, and everyone should get more of the content they want. The model is simple: Pay the curator.

A curator is someone who discovers and highlights the work of a creator. A newspaper editor is a curator, and so is someone who upvotes content on reddit. Curators do valuable work by finding gems in the rough, and bringing them to the attention of others. Curators are willing to pay for good content because they know they can profit by reselling it. On Yours, anyone can be a curator by paying both the creator and the other curators who brought this to their attention. A curator can then earn money by reselling the piece of content and keeping a portion of the revenue. The creator wins because they get more revenue. The curator also wins because they profit by bringing more attention to the creator.

Yours does not need third-party advertisements. Rather than cost people time with advertisements they don’t want to see, Yours incentivizes people to pay for content directly by providing them with a profit opportunity. People who don’t want to pay don’t have to. But if someone believes in a creator, and wants to bring more attention and more revenue to that creator, they can curate. Then not only do they help the creator, but they potentially profit from doing so.

Yours is the result of a community effort to solve the content monetization problem. Hundreds of people contributed to our solution. The first version will be launched in May, 2016. To get invited to our early preview, please sign up for our mailing list or join us on Slack.

This article was originally published on The Ryan X. Charles Times

Why "Datt" is Rebranding to "Yours"

April 17, 2016

Datt was launched last summer when I wrote a popular article, “Fix reddit with bitcoin,” and I decided to form a company around the idea. One of the first things I had to do was find a name. After a bit of brainstorming, I thought the “decentralize all the things” meme captured the essence of the project. I converted this to a word, “Datt”, and everybody seemed to like it. The only problem is that my network was heavily biased in favor of the bitcoin community, and whenever I tried to pitch my idea to people outside that community, they didn’t get the joke. The name “Datt” became a barrier to gathering the mainstream audience I originally envisioned.

On the basis of recommendations from people more experienced at business than myself, I decided to come up with a more mainstream name. At first I limited myself to what domain names were available, and the best I could come up with was “Gild Forge”. No one liked that one. Finally, before the LAUNCH Hackathon in February, I brainstormed names again, this time unconstrained by whether the domain name was available or not. One name stood out — “Yours”.

What would you call a social network where you owned your content? Where your work was correctly attributed to you? Where you got paid for the work that you did? Where you were in control? Clearly, this network is Yours. “Yours” fully captures the essence of what we are trying to achieve, both more accurately than “Datt”, and in a way that can be understood by anyone. It facilitates, rather than hinders, adoption by a mainstream audience. If it belongs to you, it’s Yours. Even children can understand this concept.

I wanted to salvage “Datt”. I think it’s a cool name, and I think it captures the project’s roots better than “Yours”. One way to do this would be to keep the name of the software project the same. Perhaps “Datt” is just the name of the npm module and software repository. However, I think that would be too unfocused. I don’t want to have to divide my effort explaining to people what “Datt” is if it is doesn’t facilitate the mission. Thus, the best name for the npm module and software repository is “Yours Core”, not “Datt”. “Datt” is best considered a code name—it’s the top-secret, mysterious, and fun placeholder name before finding “Yours”.

I’ve been a member of the bitcoin community for almost five years. I have watched many companies come and go in that time, and one mistake many companies have made is to not solve a problem for anybody who isn’t already a bitcoin user. Such companies have assumed bitcoin would naturally achieve mainstream appeal, and as it did, their niche would grow. This strategy is a mistake, because it leaves their fate in the hands of forces outside of their control. The best way to make bitcoin mainstream is to make a company mainstream that uses bitcoin as a part of its tech stack. That is the Yours strategy.

This article was originally published on The Ryan X. Charles Times

Countdown to Launch

April 04, 2016

Clemens Ley, Steven McKie and I got together yesterday and discussed what properties of Datt are necessary for MVP and came up with a timeline for launch. Assuming our time estimates are correct, we believe we can launch a mainnet MVP by May 15, less than a month and a half from now. The properties of MVP are similar to what I sketched out in this article and this article, but with some important differences. The most important of those properties are:

  • We will be rebranding from Datt to Yours. After discussing naming with many people, it is clear that “Datt” is a good name for technical people and bitcoin people, but it is not a good name for a mainstream audience, since most people don’t get the joke. Fortunately, we have found a name good for all audiences - Yours. We will come up with a plan for the rebrand and execute the plan before launch. After the rebrand, Datt, the software, will still be called Datt, but the public facing name we will use will be Yours. Datt will be like the name of an engine in a car. Unless you are technically savvy, you probably have no idea the name of your engine is, but you do know the name of the company that made your car. Datt is the name of the engine and Yours is the compay. Part of that plan will probably include moving the blog and software from Datt-branded pages to Yours-branded pages. The Datt Blog will probably become the Yours Engineering Blog.
  • We will finish our implementation of a trustless payment channel hub based on hash time lock contracts and integrate that into the bitcoin wallet before launch, so that genuine p2p micropayments are possible. The “tipping” cost will go from about $1 to about $0.05. We believe this innovation is necessary to create the mainstream appeal we are looking for, and on-chain transactions don’t fit the bill because the transaction fees are too high. Ultimately, we want to implement the lightning network, but the lightning network will take too much time to build. We can move from a trustless hub to the lightning network when the time is right.
  • We will not be integrating decentralized storage before launch, but we will be forwards-compatible with implementing decentralized storage later. Since we have limited engineering resources, we believe our focus should be on decentralized micropayments, and not storage, since micropayments make a significant difference in the product, and storage doesn’t. Content on Datt/Yours is already signed, hashed and authenticated client-side, so moving to a decentralized storage system where content is addressed by hash is something we can iterate to over time. We would rather launch sooner to get critical feedback on the product than wait for decentralized storage.
  • We will integrate Steven and Darren’s UI work and add a leaderboard. We believe the leaderboard will be an important psychological tool to inform potential users at a glance that Yours enables people to earn money, which makes it different than any other mainstrea social media app.
  • Have a brief testnet launch before the mainnet launch to identify any money-losing bugs that escaped our tests during development.
  • Have and execute a community/growth/launch plan. We will write down an execute a community plan to build the initial user base. This will involve a limited beta preview to a select audience, emailing the mailing list, notifying Slack members, etc. We will have a weekly growth target (say, 10%, although the number is undecided at present), to make sure we are on the path to our long-term goals. We will also do some “coffee shop tests” where we ask random people at coffee shops to make sure that our product appeals to a mainstream audience.