In today’s e-book market, Amazon dominates with its Kindle reader and online marketplace. When you want to buy an e-book, you typically purchase one on Amazon, and download a file that can only be read on Kindle.

Other companies, such as Sony Electronics and bookstore chain Barnes & Noble, have created their own e-readers. But Amazon’s dominance has meant that most ebooks are sold for reading on Kindle. Book retailers that want to sell e-books have no choice but to go through Amazon.

With a lack of competition in the market, publishers are left in a poor position to negotiate prices with the platform. Readers are forced to accept a sub-par reading experience, as they can’t access the ebooks using other (better) devices.

This is the status quo — but we don’t accept it. We believe there’s still a chance to create a free and frictionless market.

Tokenisation for a truly free market

This market monopoly can be broken through tokenisation. For example, we can create a new token, eBook. The eBook token can be bought from any retailer and can be used to read books on any digital reading device. It will even enable new business cases, such as allowing readers to pay by chapter, or rent a book for a certain number of days.

The issuer of the token does not own ebooks, keep them on its server, sign contracts with publishers, or even know what books are being bought. It does not even need to be online when someone purchases an eBook token.

With tokenisation, the ebook purchasing process would be based on three smart contracts:

BookRegistration — this manages the relationship between titles represented by the ISBN and publishers represented by an Ethereum address.

Readership — this manages the relationship between publishers and readers.

BookRetail — this is where the book’s purchase takes place, involving the buyer, retailer, and a publisher. Prior to the purchase, the retailer and publisher will have set a rule for splitting the payment received.

Only one TokenScript will be required for this free, tokenised ebook market.

Explaining TokenScript

TokenScript is an XML dialect that allows different tokens to seamlessly interact with one another. It provides the logic for both the deliverable and payment side tokens and enables them to “plug-in” to the market. This is different from the current market architecture, which requires both deliverables and payments to be transferred to the market. This creates friction and delays, and introduces middlemen into the equation.

Blockchain has been hailed as a way to create a frictionless market, one where users can complete transactions across different service providers and use cases in as few steps as possible, without dealing with middlemen or fearing for their privacy and cybersecurity.

However, the way tokens and contracts are deployed today have not helped us achieve the great dream of decentralisation and a frictionless market. Blockchain transactions as we know them simply fail to reflect real-life scenarios, where a single product can be used in different — and even unanticipated — ways.

For example, car owners 15 years ago probably did not imagine that they could use a cellphone to find passengers and make an extra buck. Authors and publishers did not imagine that books could be shared from one handheld device to another across the globe with a single click and in a matter of seconds.

For markets to be truly free and frictionless, tokens need to work seamlessly with each other. They must have the capability of being easily updated with new protocols that reflect the changing use cases and business processes.

But that’s not the way the current market architecture is designed.

Blockchain today is still reliant on a Web that wasn’t designed to integrate. Tokens are created with either primitive business logic or excessively complex logic that opens the door for security issues. They fail to address potential changes of use-cases in advance.

For example, if a person wants to use DAI tokens to purchase something on a website that only accepts Ether as payment, the website and token issuers need to collaborate to address the issue through a backend connection.

Scenarios like this open up a whole can of worms around interoperability, security, privacy, trust, value exchange, and user experience. Frankly, it isn’t frictionless — not by a long shot.

That’s where TokenScript comes in.

Why TokenScript

TokenScript is an XML dialect composed of actions, magic links, attestations, and assets. (These are detailed in our design paper, which you can check out here.)

It acts as a program interface for tokenisation. As an open framework, it can be used to define tokens and enable them to operate with different trading, listing, and rating methods.

TokenScript works by abstracting out token information, along with access methods and their user interface rendering. It allows token providers to describe the functions provided by the token (through a smart contract or not), the method to render it on the user’s interface, and the logic to construct transactions and render the token. It can easily be read by any device or software and be used to perform token actions on another protocol.

Simply put, TokenScript allows different tokens to work together seamlessly.

TokenScript enables token interoperability and transferability

With TokenScript, tokens can enter the ecosystem on an abstracted layer, allowing them to be used and traded in different contexts.

They may interact with different systems and be embedded in different environments. They can be used by different services — for example, a car ownership token can be used to apply for insurance and ride-sharing. A single ebook token can be used to buy or lend a book.

TokenScript allows tokens to be renderable

Tokens can be rendered to reflect the actions it can perform and the changes that have been made. For example, an expired car registration would be reflected in a registration token. The end of a book lease will likewise be recorded on an ebook token.

TokenScript makes tokens flexible and upgradeable

TokenScript acknowledges that a token never has a finished state. It allows different token providers not only to describe the markup descriptions — the features of the tokens and how they are allowed to “act” — but also to update them at any time.

This means that token providers don’t need to update the DApp or make a new smart contract whenever the business logic of a particular type of token changes. The token is not locked into a specific protocol.

TokenScript makes blockchain applications scalable

As a result of its flexibility, TokenScript allows blockchain applications to be scalable as it does not rely on the participation of DApp browsers. It also reduces costs as it reduces the number of third parties involved and avoids having to make updates on the DApp or being limited to the functionality described by a smart contract.

TokenScript maintains privacy and security

TokenScript does away with the need for third parties to share information outside of the blockchain. It eschews the need for different parties to provide their own logic, for example, a website’s local javascript and DAI issuer’s javascript to enable the conversion of DAI tokens to Ether for payment on the site.

TokenScript solves these security issues by using an encapsulation method. In a purchase transaction, only the code that reflects the payment logic needs to be signed, not the business logic side.

In the example above, the code for forming the transaction is signed separately by the DAI token issuer. The user will be asked to trust the TokenScript signed by the issuer, not the local script by the website. If a bug is found, the signed instructions will be updated.

TokenScript also eliminates reliance on a hosted DApp, which is a third-party website that may block users or manipulate data. With DApps, users have to trust the website to be online and functional at all times, as well as updated and secure.

Achieving a truly frictionless market

Imagine a Web without user accounts. A market where people can own granular investments in different resources, where even intellectual property is tokenised, where one click of a button sets into motion a complex step of procedures that remain behind the scenes and are completely secure.

To achieve this vision, token marketisation and integration must be freed from reliance on DApps. That is what TokenScript aims to do. By tokenising assets and using these tokens to integrate web services, we can truly achieve a frictionless market.

Defining TokenScript, though, is a work in progress. Stay updated on our efforts in producing a yellow paper at https://tokenscript.org.