Wednesday, February 21, 2018

Smart Contracts on the Blockchain

Smart Contract
Smart Contract

Blockchain technology handles cryptocurrencies and tokens as mentioned earlier in this chapter and throughout the book; it is the underlying platform for a new way of organizing and managing relationships. These include legal relationships and contracts. In order to best explain what a smart contract is, we must first look into the problem of trust.

The Trust Problem

The trust problem has been around since the dawn of time. In order to progress, a society or group of people has to cooperate with each other. When people cooperate they can do more collectively that they could individually. However, in doing so they are also opening themselves up to being deceived, misled, and subsequently disappointed. To attempt to address this issue, societies have instituted rituals, passed laws, and even installed governance processes. All of these elaborate techniques are in place to address the trust problem. To better explain the trust problem, let us use an example. A man frequently uses his credit card to pay for goods and services. He can walk into a store, pick an item, go to the checkout, and pay with the credit card. The store allows the purchase because the credit card, when swiped or inserted into the chip reader, checks with the bank to see if the shopper is a good risk for them to authorize the purchase and confirm that he is the person to whom the card was issued. The bank will actually collect the payment from the shopper some time later when it bills him. So, you see, there is trust all around here. The store trusts the bank and the shopper, and the bank trusts the store and the shopper, and the shopper trusts the store and the bank. The shopper can carry around a small piece of plastic instead of a wad of cash. If he loses the card, he can have it replaced within a few days. If he had to carry the cash equivalent, he might lose it or get robbed and would never get it back. Having the trust element makes it easier to purchase items, and that’s also good for merchants, who always want and need to sell more items. As the barriers to payment come down, a whole lot more commerce occurs. That brings us back to the original point that trust is needed for cooperation, which in turn leads to progress.

Trusted Third Party

One way to solve the trust problem is to use a trusted third party. The bank and credit card example given above is this exactly. The transactions between the customer, the merchant, and the shopper are passed through and logged by a bank (credit card issuer). The bank facilitates the transaction; see Figure 2-10 for a diagram depicting a trusted third party. The bank can also step in and resolve a dispute in the event that a customer finds a transaction on their monthly statement that they didn’t make.

Distributed Ledger and Consensus

What we have just described is still a centralized way to solve the trust problem. There is another way to solve it using a distributed ledger (or shared ledger) and combining this with a consensus methodology. Figure 2-11 depicts a ledger that is distributed across multiple parties. So, instead of logging transactions with a single third party, you send a single copy of each transaction to all parties in the network. All parties in the network would be required to keep an ongoing ledger of all transactions. Therefore, every party in the network would have the exact same set of transactions. At a point in time, everybody would know how much the shopper owes the merchant. If a dispute arises, the consensus majority (51 percent) of the network of ledger keepers would decide what he owed.

Blockchain technology follows this distributed ledger and consensus method. It is a network for resolving the trust problem through a distributed (decentralized) and publicly verifiable (open) ledger.

Source: Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions 1st Edition by Joseph J. Bambara

Blockchain in the Sharing Economy

Sharing Economy
Sharing Economy


One thing we have noticed is that large organizations rely on information provided by users to generate value within their own platform. The problem with this platform is that the value produced by the crowd is not equally distributed among those who have contributed. Most of the profits are captured by the large intermediaries who operate the block. Uber and Airbnb could be obviated in a world where we store people’s online identities on the blockchain. Uber has disrupted the entire transportation industry. Some governments, however, have been quick to limit its reach in order to protect existing taxi companies. La`Zooz (http://lazooz.org) is an open-source and decentralized collaborative transportation system. More importantly, La`Zooz is a blockchain-based ride-sharing solution that rewards its users, developers, and drivers with tokens called zooz. Unlike Uber, La`Zooz has no central authority and cannot be blocked or shut down by governments. Your identity (as anonymous as you want it to be) could be linked to reviews in the “sharing economy” on the marketplace. People can check out your review as a trusted individual by checking your ID number. It would actually promote good behavior because if you get a bad reputation you cannot delete accounts and re-register. As we have mentioned, the blockchain can’t be tampered with or duplicated. Your identity and what you choose to expose can be valuable. Onename is a New York–based startup that has created an ID system using the Bitcoin blockchain. Its first service allows users to create blockchain IDs, which will soon be used to log in to websites without the need for a password.

P2P lodging sites have already begun to transform the lodging industry by making a public market in private housing. The blockchain would enable a secure, tamper-proof system for managing digital credentials and reputation; it could accelerate the adoption of P2P lodging.

Instead of central power providers, a distributed network built on blockchain technology lets people generate their own electricity to sell on the network, using their blockchain’s identity to perform the transaction. With solar and high-capacity battery technology, individuals can potentially act as distributed power providers. Blockchain could be used to facilitate secure transactions of power between individuals on a distributed network who do not have an existing relationship. The fact that all transactions are verified by a consensus network means you are protected from customers who claim the transaction did not happen. The blockchain records are a more reliable truth than the central database of the existing providers. The current applications are Sun Exchange, TransActive Grid, and Grid Singularity.

Source: Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions 1st Edition by Joseph J. Bambara

Tuesday, February 20, 2018

Blockchain in the Financial Technology Space

Financial Technology (fintech)
Having been in the financial technology (“fintech”) space before it was known as “fintech,” the growth of global transactions has required more and more advanced technology applications to speed up and reduce transaction costs for securities such as equities. Traditional trade processes within asset management can be slow, manual, cumbersome, and filled with risk when reconciling and matching—and they’re getting more complex with cross-border transactions and for nonstandard investment products, such as loans. Each party in the trade life cycle (e.g., broker dealers, intermediaries, custodians, clearing and settlement teams) currently keeps their own copy of the same record of a transaction, creating significant inefficiencies and room for error.

Unfortunately, a fair amount of trades have errors, requiring manual intervention and extending the time required to settle trades. Because it does not require an exchange to verify, clear, and settle security transactions (such as equities, repo, and leveraged loans), blockchain will save a large amount in fees and capital charges globally by moving to a shorter, and potentially customized, settlement window. Blockchain will eliminate significant fees across FX, commodities, and OTC derivatives. Blockchain technology could simplify and streamline this entire process, providing an automated trade life cycle where all parties in the transaction would have access to the exact same data about a trade. This would lead to substantial infrastructural cost savings, effective data management and transparency, faster processing cycles, minimal reconciliation, and the potential removal of brokers and intermediaries altogether.

Financial derivatives are the most common application of a smart contract, and one of the simplest to implement in code. The main challenge in implementing financial contracts is that the majority of them require reference to an external price ticker. For example, a very desirable application is a smart contract that hedges against the volatility of ether (or another cryptocurrency) with respect to the US dollar, but doing this requires the contract to know the value of ETH/USD or BTC/USD at any particular moment. They would have to leave the zone of trust. In practice, information issuers are not always trustworthy, and in some cases the banking infrastructure is too weak, or too hostile, for such services to exist. This approach is not fully decentralized, because a trusted source is still needed to provide the price ticker, although arguably this still is a massive improvement in terms of reducing infrastructure requirements (unlike being an issuer, issuing a price feed requires no licenses and can likely be categorized as free speech) and reducing the potential for fraud. The current industry trailblazers working to enable a smarter and more connected financial system by digitizing the world’s assets are Digital Asset Holdings (www.digitalasset.com), Chain.com, and the aforementioned Ripple.

Source: Source: Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions 1st Edition by Joseph J. Bambara

Blockchain Implementations

Bitcoin

The concept of decentralized digital currency, as well as alternative applications like property registries, has been around for decades, but none has produced viable production implementations until now. The anonymous e-cash protocols of the 1980s and 1990s were mostly reliant on a cryptographic primitive known as Chaumian blinding (after its developer, David Chaum). Chaumian blinding provided these new currencies with high degrees of privacy, but their underlying protocols largely failed to gain traction because of their reliance on a centralized intermediary. In 1998, Wei Dai's b-money became the first proposal to introduce the idea of creating money through solving computational puzzles as well as decentralized consensus, but the proposal was scant on details as to how decentralized consensus could actually be implemented. In 2005, Hal Finney introduced a concept of "reusable proofs of work" a system that uses ideas from b-money together with Adam Back's computationally difficult Hashcash (http://hashcash.org) puzzles to create a concept for a cryptocurrency, but this once again fell short of the ideal by relying on trusted computing as a backend. As we all know, the blockchain concept was implemented as a core component of the digital currency Bitcoin. This critical and perhaps first production implementation of the blockchain made it the first digital currency to solve the double-spending problem, without the use of a trusted authority or central server. The Bitcoin design, which we examine briefly in the next section, has been the inspiration for other implementations we will explore in the chapters to come.

Bitcoin
As we mentioned, when the financial crisis of 2008 was in full throttle, Bitcoin (BTC), a decentralized currency, was implemented for the first time in practice by Satoshi Nakamoto. Bitcoin combines established primitives for managing ownership through public key cryptography with a consensus algorithm for keeping track of who owns coins, known as proof-of-work. The mechanism behind proof-of-work simultaneously solves two problems. First, it provides an effective consensus algorithm, allowing nodes in the network to collectively agree on a set of updates to the state of the Bitcoin ledger. Second, it provides a mechanism for allowing free entry into the consensus process, solving the political problem of deciding who gets to influence the consensus, while simultaneously preventing Sybil attacks - that is, attacks where a reputation system is subverted by forging identities in peer-to-peer networks. It is named after a case study of a woman diagnosed with dissociative identity disorder. It works by substituting a formal barrier to participation, such as the requirement to be registered as a unique entity on a particular list, with an economic barrier - the weight of a single node in the consensus voting process is directly proportional to the computing power that the node brings. More recently, an alternative approach has been proposed called proof- of-stake, calculating the weight of a node as being proportional to its currency holdings and not its computational resources. The discussion concerning the relative merits of the two approaches will be examined in the chapters that address the Ethereum-based blockchain and derivatives thereof. At this junction in 2018, all blockchain platforms are still evolving and will continue to do so for the foreseeable futures. As Bitcoin is the most widely used, we will explore it in some detail in the next sections.

Source: Source: Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions 1st Edition by Joseph J. Bambara

Refereum provides referrals on the blockchain, built for the game industry

Video Game


Refereum is the first referral marketplace for games. The RFR token rewards gamers for their engagement and purchases with full transparency.  Over 150,000 gamers have joined the platform in the two months since launch, and the number of gamers continues to grow exponentially.

The Refereum solution can be extended easily into other verticals. Our team is made up of veteran game industry experts and world-renowned blockchain specialists.

The Problem

Referral marketing is the most effective conversion tool to acquire new customers, but untrustworthy actors and expensive micro-payments have blocked its ability to scale. This is nowhere more apparent than in the gaming industry.

The video games industry is $109B and growing at 6% annually.

In recent years, the number of gamers has exploded -- today, 2.2B people play games, making it the single most popular digital entertainment content on any device. 1 2

Inevitably, social platforms like YouTube and Twitch have created strong gaming communities, and influencers and streamers now command promotional power and unprecedented reach. The top 10 influencers have an audience of 242m, double that of the recent Superbowl audience.

Gaming is now a booming professional sport (i.e. “eSports”) with the highest growth in the industry.  International “supergamer” competitions can fill stadiums that rival those that host traditional premier sporting events.  The 2016 International Dota 2 Championship, the richest eSports tournament had a prize of $21m, double that of The Masters.  Professional gamers are fundamentally changing the market dynamics by bridging the private gaming world and the public sporting arena.

Marketing is critical to drive customer acquisition and usage, but costs are skyrocketing.

The gaming industry spends approximately $20B in advertising and marketing 4  and these costs are increasing fast.

Competition among game developers is intense. Blockbuster game developers now spend 2-3x the development cost for marketing and advertising through traditional channels to create “buzz” for their games. 5    At the same time, online customer acquisition costs are also rising.

A few dominant platforms capture the majority of advertising dollars and broadly, an average of 30% of developer revenues in distribution fees.

Referral marketing, a way to promote products through word-of-mouth, is a powerful channel and the most effective conversion tool.

Compared to other marketing channels, referred consumers have the best conversion to purchase, longer retention, and a higher lifetime value.

Referral through friends is the single most trusted form of advertising, 6   people are 4x more likely to buy when referred by a friend, 7    and the Lifetime Value of new customers via referrals is 16% higher than those that are not referred. 8   Gamers, more than in any other entertainment medium, place an even higher trust on referrals, as the community is especially tight-knit and highly opinionated.

Despite proven effectiveness, referral programs are difficult to track and compensate.

These campaigns suffer from fraud (e.g. fake influencer accounts, clickbots), reporting disparities between developers and platforms, leading to a loss  of revenue for influencers, and many expensive intermediaries.

While industry giants can amplify a brand’s message through sharing, even they lack a mechanism to track the conversion funnel fully, from initial awareness all the way to a purchase.

Influencers are powerful agents of referral marketing. But again, no technical mechanism exists to track and pay an individual conversion for each view, like, share, or recommendation into a direct sale.  The current approach requires developers to identify influencers manually, cold-contact them one by one, and negotiate unique deal terms, generally in the form of sponsorships.

The process is time-consuming, costly, nebulous, and lacks measurable goals. Moreover, it is nearly impossible to reward players with fiat currency because of cross-border banking complexities and geopolitical restrictions.  As a result, influencers and engaged fans are not compensated accordingly.

Refereum Solution

Refereum resolves these problems around referral marketing in the video game industry.

Smart contracts established directly between developers and gamers create a decentralized, secure, and transparent marketplace with a record of purchases and referrals written into the Blockchain.

Our solution eliminates fraud, layers of middlemen, various onerous fees, and redistributes marketing budgets to gamers and influencers instead. Our solution transfers value from ad agencies and other intermediaries to influencers and gamers directly.

Game developers can purchase RFR tokens to reward influencers and players for specific actions; in turn, gamers can buy or earn tokens for their actions (e.g. streaming a new game), which can then be used to purchase more games or converted to cash.  This active engagement between developers and gamers enables a continuous feedback loop, driving network effects and exponential growth.

Refereum allows anyone to participate without requiring a bank account.  We are also an official partner of the Connext API, which allows average consumers to purchase RFR tokens securely with conventional payment methods like credit cards.

Refereum benefits all participants in the ecosystem:

• Developers can improve their marketing campaigns.  They no longer have to pay huge upfront fees for campaigns that do not provide strong ROIs.  They can reward individuals directly, after a successful purchase.  The blockchain solution removes fraud and legal paperwork to reward not only for the purchase, but also a variety of call-to-actions.  It enables microtransactions

of $0.0001 for completing a tutorial to $1m for winning an eSports tournament.

• Influencers can monetize their following. Any streamer or influencer,regardless of the size of their following, no longer has to wait to be approachedby ad agencies for campaigns, and instead, can choose relevant and monetizable content for their followers.  Influencers with niche yet active audiences who may not have been sponsorshipmaterial previously, can now potentially earn a living.

• Even the average gamer can share in the token economy just for doing what they love.  Simply by sharing links or moving up a gaming level, anyone can earn RFR tokens.  The blockchain referral ecosystem will now allow the 99% of gamers that actually make up the vibrant community to participate economically as well.

Read more (PDF) > Refereum provides referrals on the blockchain

Types of Blockchain

Blockchain

As people began to understand how blockchain works, they started using it for other purposes: as data storage for things of value, identities, agreements, property rights, and a host of other things. Ethereum, which will be one of the main focuses of this book, is to date the most comprehensive blockchain innovation after Bitcoin. Like cloud computing implementations, different types or categories of blockchain have emerged. Analogous to the cloud, you have public blockchains that everyone can access and update, you have private blockchains for just a limited group within an organization to be able to access and update, and you have a third kind, a consortium of blockchains that are used in collaboration with others. While working on Wall Street, we saw this consortium type of arrangement as very common between five of the larger investment banking firms. The consortium facilitated trades at an institutional level among the members, so it makes sense that blockchain as a financial technology tool would emerge in this way. The following sections are a quick exploration of each blockchain type.

Public Blockchains
A public blockchain is one that initial creators envisioned as: a blockchain for all to be able to access and transact with; a blockchain where transactions are included if and only if they are valid; a blockchain where everyone can contribute to the consensus process. As discussed, the consensus process determines what blocks get added to the chain and what the current state is. On the public blockchain, instead of using a central server the blockchain is secured by cryptographic verification supported by incentives for the miners. Anyone can be a miner to aggregate and publish those transactions. In the public blockchain, because no user is implicitly trusted to verify transactions, all users follow an algorithm that verifies transactions by committing software and hardware resources to solving a problem by brute force (i.e., by solving the cryptographic puzzle). The miner who reaches the solution first is rewarded, and each new solution, along with the transactions that were used to verify it, forms the basis for the next problem to be solved. The verification concepts are proof-of-work or proof-of-stake.

Consortium Blockchains
A consortium blockchain such as R3 (www.r3cev.com) is a distributed ledger where the consensus process is controlled by a preselected set of nodes—for example, a consortium of nine financial institutions, each of which operates a node, and of which five (like the US Supreme Court) must sign every block in order for the block to be valid. The right to read the blockchain may be public or restricted to the participants, and there are also hybrid routes such as the root hashes of the blocks being public together with an API that allows members of the public to make a limited number of queries and get back cryptographic proofs of some parts of the blockchain state. These sort of blockchains are distributed ledgers that may be considered “partially decentralized.”

Private Blockchains
A fully private blockchain is a blockchain where write permissions are kept centralized to one organization. Read permissions may be public or restricted to an arbitrary extent. Likely applications include database management and auditing internal to a single company, so public readability may not be necessary in many cases at all, though in other cases public auditability is desired. Private blockchains could provide solutions to financial enterprise problems, including compliance agents for regulations such as the Health Insurance Portability and Accountability Act (HIPAA), anti–money laundering (AML), and know-your-customer (KYC) laws. The Hyperledger project from the Linux Foundation and the Gem Health network are private blockchain projects under development. See Chapter 8 for a detailed description of Hyperledger and other private and consortium blockchain technology.

Comparing Blockchains
The distinction between public, consortium, and private blockchains is important. Even for “old school” distributed ledger adopters who prefer a traditional centralized system, they still get the addition of cryptographic auditability attached. As compared to public blockchains, private blockchains have a number of advantages. The private blockchain operator can change the rules of a blockchain. If it is a blockchain among financial partners, then where errors are discovered they will be able to change transactions. Likewise, they will be able to modify balances and generally undo anything. That said, there is a trail. In some cases, this functionality is necessary, as with property registry if a mistaken transaction is issued or some nefarious type has gained access and made themselves the new owner. This is also true on a public blockchain if the government has backdoor access keys like they did in the Clinton era. On the private blockchain, transactions are less expensive, since they only need to be verified by a few nodes that can be trusted to have very high processing power. Public blockchains tend to have more expensive transaction fees, but this will change as scaling technologies emerge and bring public-blockchain costs down to create an efficient blockchain system.

Nodes can be trusted to be very well connected, and faults can quickly be fixed by manual intervention, allowing the use of consensus algorithms that offer finality after much shorter block times. Improvements in public blockchain technology, such as Ethereum’s proof-of-stake, can bring public blockchains much closer to the “instant confirmation” ideal, but private blockchains will always be faster, and the latency difference will never disappear as unfortunately the speed of light does not increase by 2x every two years like Moore’s law. If read permissions are restricted, private blockchains can provide a greater level of privacy.

Given all of this, it may seem like private blockchains are unquestionably a better choice for institutions. However, even in an institutional context, public blockchains still have a lot of value. In fact, this value lies to a substantial degree in the philosophical virtues that advocates of public blockchains have been promoting all along, among the chief of which are freedom, neutrality, and openness. The advantages of public blockchains generally fall into two major categories:

* Public blockchains provide a way to protect the users of an application from the developers, establishing that there are certain things that even the developers of an application have no authority to do.

* Public blockchains are open, and therefore used by many entities, This provides some networking effects. If we have asset-holding systems on a blockchain, and a currency on the same blockchain, then we can cut costs to near-zero with a smart contract: Party A can send the asset to a program which immediately sends it to Party B which sends the program money, and the program is trusted because it runs on a public blockchain. Note that in order for this to work efficiently, two completely heterogeneous asset classes from completely different industries must be on the same database. This can also be used by other asset holders such as land registries and title insurance.

Source: Blockchain: A Practical Guide to Developing Business, Law, and Technology Solutions 1st Edition by Joseph J. Bambara