How to make your own mobile blockchain app in 3 hours?

Forking AlphaWallet gives you the best framework (TokenScript) for supporting your token on any network

Victor Zhang
Smart Token Labs
4 min readApr 1, 2020

--

View this article originally posted on alphawallet.com

IM SO FAST

Basically, there are only 2 steps:

Step 1, Tokenise transferable rights by using a smart-contract and TokenScript

Step 2, Fork AlphaWallet

What type of information(data) should we put on the blockchain?

Example: USDC

a. The information to represent I own 100 USDC

b. The information to represent I my U.S. citizenship

c. The information to represent Q&A (instruction manual) of using USDC

d. The information to represent the transaction logic of USDC

e. The information to represent the minting logic of USDC e.g. register an account with Circle, transfer USD to a bank account and etc.

Example: a token representing a car ownership

a. The information to represent I own this car

b. The information to represent my driver license

c. The information to represent my car instruction manual

d. The information to represent the transaction logic of rights related to this car, transfer, sell, collateralise

e. The information to represent the operating logic of this car: open door, close door, start the engine or locate the car.

The answer is a and d.

If there is no ownership like c and e, please use a digital signature.

If there is no ownership transfer, like b, please use an attestation.

The blockchain is for tokenising transferable rights like ownership and defining the transaction rules.

Dapps are web app using tokenised rights

DApps are no more than a transitory phase into web3.0. There is no such thing as a DApp, it is merely a normal web app using tokenised rights. Some provide functionality like exchanging tokens (Uniswap), or collateralise ETH to mint DAI; while others provide services based on the rights you have, like an app to provide hotel discounts if you possess an Olympic ticket token.

Such applications could also extend to more mainstream applications like using an identity token (such as an attestation) to login to an age-restricted website.

The key takeaway is that all of these are linked to a tokenised right thereby making the token the key point in unlocking web3.0.

What rights can you tokenise?

If you have full control over an asset or right and can do whatever you want with it (without the need for another authority like a local government or company), then you can tokenise that right by yourself.

If your right/asset is not purely owned/controlled by you, then you may need to work with other authorities to tokenise such a right/asset.

Since the ethereum blockchain is public and accessible to everyone, these tokenised rights can be seamlessly integrated across services, allowing a massive increase in their utility as an underlying asset.

They can also be traded on the market with less friction, increasing the liquidity of the rights.

How to define the logic of ownership and transaction rules?

Write a smart-contract.

How to define other logic?

Write a TokenScript.

How to provide the best mobile user experience

Fork AlphaWallet iOS and Android

AlphaWallet and TokenScript are both open source products which anyone is free to fork and repurpose.

What is AlphaWallet?

AlphaWallet is an EVM specific wallet which supports rich token features (TokenScripts) and allows anyone to get their token and/or private EVM network into the hands of their users.

What is TokenScript?

TokenScript is an open-source framework designed to represent all the business logic for your token in a secure manner. It describes the functions provided by the token, the front end of the token, the ERC interface it uses and the logic needed to construct transactions. Every TokenScript must be signed by a valid issuer and can be run on both iOS and Android wallets in real-time.

Unlike native app code which requires a new app release, TokenScripts allow you to update your logic in real-time, without making any changes to the app itself.

If you have a mainnet or testnet token

If you have a public mainnet or testnet token and would like to have your token work instantly on AlphaWallet and the forks without writing any app code, visit our repo here to create your own TokenScript for your token.

TokenScripts allow you to write any custom business logic for your token and distribute it to your users via the AlphaWallet app or any fork. For example, the DeFi protocol compound.finance has a range of interest-bearing tokens such as cDAI and cUSDC; each has a corresponding TokenScript which allow you to do all the key features of the protocol such as deposit/withdrawal, enabling the service and seeing your balances/interest rates.

You can check out the TokenScripts for compound by clicking here.

If your token or service uses a private network

If you instead have a token which runs on a network that is not public, you can easily fork and re-skin AlphaWallet to fit your own purpose, to begin simply fork our iOS and Android repos.

From there, you can still write TokenScripts for your private network tokens and expect them to run just like they would on mainnet.

At the time of this writing, AlphaWallet and TokenScript can trivially support any EVM based blockchain and in future we aim to make our platform blockchain agnostic.

A basic comparison of tokenisation framework (or you still prefer to call it DApp framework)

--

--