Book Image

Security Tokens and Stablecoins Quick Start Guide

By : Weimin Sun, Xun (Brian) Wu, Angela Kwok
Book Image

Security Tokens and Stablecoins Quick Start Guide

By: Weimin Sun, Xun (Brian) Wu, Angela Kwok

Overview of this book

The failure of initial coin offerings (ICOs) is no accident, as most ICOs do not link to a real asset and are not regulated. Realizing the shortcomings of ICOs, the blockchain community and potential investors embraced security token offerings (STOs) and stablecoins enthusiastically. In this book, we start with an overview of the blockchain technology along with its basic concepts. We introduce the concept behind STO, and cover the basic requirements for launching a STO and the relevant regulations governing its issuance. We discuss U.S. securities laws development in launching security digital tokens using blockchain technology and show some real use cases. We also explore the process of STO launches and legal considerations. We introduce popular security tokens in the current blockchain space and talk about how to develop a security token DApp, including smart contract development for ERC1404 tokens. Later, you'll learn to build frontend side functionalities to interact with smart contracts. Finally, we discuss stablecoin technical design functionalities for issuing and operating STO tokens by interacting with Ethereum smart contracts. By the end of this book, you will have learned more about STOs and gained a detailed knowledge of building relevant applications—all with the help of practical examples.
Table of Contents (9 chapters)

Developing and testing a security token smart contract

As we discussed in the previous section, the ERC-1404 standard adds two more functions by extending ERC20 to enforce transfer restrictions—detectTransferRestriction and messageForTransferRestriction:

  • messageForTransferRestriction returns a human-readable message for a given restriction code. The user can know why a transaction is restricted.
  • The detectTransferRestriction function returns a non-zero value if the receiver address is not in the whiteList addresses, and the transaction needs to be reverted. The function needs to be executed by the token issuer.

Next, let's start to write our token and implement these functions.

Other important ERC-1404 functions are adding an address to a whitelist, verifying a whitelist, and so on.
...