How does TERA platform work

Block
4 min readMar 17, 2019

--

TERA is a decentralized application platform which is easy to use and friendly to those developers. Some devs from the community have developed some interesting DApps on-chain and now you can have a taste on

https://terafoundation.org/web-wallet.html#TabDapps

Developing applications on TERA platform is based on two components:

  1. Smart contract (server part in JavaScript)
  2. The client part in the form of a dialog interface (a regular HTML file with JS, CSS and other standard web technologies)

To avoid the abuse of transactions, so TERA requires fees for some transactions-10 TERA to create a new account which users are out of the restrictive queue;100 TERA to create smart contract/DApp;10,000 TERA to create your own currency. And all the payment will go to the account 0 for mining circulation.

Decentralized forum

Many people may be interested in the decentralized forum, the DApp 9 on the website. It’s clean, instant and it meets the imagination of a decentralized forum.

This is the architecture of the DApp. All user accounts are combined into one doubly linked list with the start of the smart contract in the base account. This the interactive part between different users and as for your own content, due to the fast production of the block, your messages will be recorded quickly.

If you want to get a general picture you need to perform the following steps:

1.Cycle through the list of users (items are account States)2.For each user, a cycle through the list of messages (items are transactions from the user)

A format string structure:

{PrevNum:uint,//user list cycleNextNum:uint,State:byte,InfoBlock:uint,//cycle through the list of messagesInfoTr:uint16,HTMLBlock:uint,HTMLTr:uint16}

Decentralized exchange

As we all know that TERA has been listed on several centralized exchanges and TERA owns its decentralized exchange. The following picture is the decentralized exchange template and the architecture is clean and seems easy to use. The decentralized exchange will become the mainstream one day and then I think this template can acquire more effect. The interface consists of 3 parts (screens):

1. Ability to add new accounts for trading on the exchange

2. Adding a trading pair

3. Trading part

Orders are placed with the following properties:

1.The amount of the sale Sales currency (determined automatically by the current account)Amount received2.The currency of the receipt (this is determined automatically on the account to retrieve)Account to receive3.The price is determined automatically by the formula: receipt Amount/sales Amount

This is the storage structure between all the accounts. The base account contains a list of instruments (currency pairs) ordered by sales currency number. Then smart contract will correct the right order of all ask orders and bid orders automatically.

A format string structure:

{Type:str1,SaleCurrency:uint32,GetCurrency:uint32,PrevNum:uint,ShareNextNum:uint,AskNextNum:uint,BidNextNum:uint,Order:{Value:{SumCOIN:uint,SumCENT:uint32},CompleteValue:{SumCOIN:uint,SumCENT:uint32},Price:double,GetNum:uint,RefCount:byte,},HTMLBlock:uint,HTMLTr:uint16}Structure length = 78 bytes

Gambling games

As a high-performance POW blockchain, we can develop DApps including gambling games and universal games on TERA. As a community member said he developed a “Tetris” although he is not a professional dev. So the TERA platform is very friendly to those who want to experience the advantage of blockchain.

Token issuance

You need to upload a smart contract to issue your own token without programming. The methods of the smart contract are as following:

1.Create a new project2.Enter the name (it will be displayed in the list of blockchain smart-contracts)3.A sign of tokengenerated (currency)4.Short name of the currency (currency up to 5 bytes)5.Initial issue size6.Indicates that the public address matches the address of the owner (sender of the transaction).7.Description (displayed in the list)8.Select icon9.Click the Add to Pay list button (a payment order will appear in your wallet, send it to the blockchain, after selecting from which account the amount of payment for the issue in the amount of 10 000 Tera will be debited )

Other Applications

Blockchain can also benefit real business and some utility such as blockchain-based business processes which will be more convenient for your business, escrows with different conditions and it can meet all your imagination for development.

Conclusion

TERA is an original and absolutely fresh platform to develop all kinds of applications and your own ecosystem.

Links:

  1. DApps FAQ: https://docs.google.com/document/d/10yXAKxaU7YgrQnbdXu_L7WWovUoRtdJwo3tXXaGZGSQ/edit?usp=sharing

--

--