BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

Non-homogeneous tokens and non-homogeneous multi-chain

EKT多链技术
特邀专栏作者
This article is about 6397 words, reading the full article takes about 10 minutes
EKT multi-chain technology丨Non-homogeneous tokens and non-homogeneous multi-chain
AI Summary
Expand
EKT multi-chain technology丨Non-homogeneous tokens and non-homogeneous multi-chain

Foreword: The public chain is the premise and basis for the development of the blockchain, and it is also the core guarantee for the future development of the blockchain industry. The current development status of the blockchain is that the performance of the underlying public chain has not yet been developed, and various DApps built on it are severely limited in performance, and various consensus algorithms have imperfections. Ethereum is a decentralized application platform built on blockchain technology. It allows anyone to build and use decentralized applications running on blockchain technology in the platform. The most widely issued on Ethereum is the homogeneous token - ERC20 Token, as a pre-issued universal token, it has built the basis of almost most of the token economies on the market. ERC721 is a more perfect embodiment of Ethereum smart contracts. It can concretize and define various things with different characteristics, and obtain completely non-homogeneous solutions. This article will briefly analyze the abstract consensus of homogeneous tokens and the mapping concept of non-homogeneous tokens, and propose a non-homogeneous idea for multi-chain systems.

【Fungible Tokens】

Many developers are already eager to participate in the blockchain development business, but they often feel a little powerless. Because the underlying logic of the public chain is not complicated, it is still a huge project, and the cost of manpower and material resources before the public chain/project goes online is also very huge. The Ethereum smart contract has opened up new ideas for blockchain developers. By building a homogeneous token, they can easily pre-issue the rights and interests of their projects and obtain early funds at the same time.

Maybe you often see ERC20 and tokens together, ERC20 is a token standard defined by Ethereum. The protocol that requires us to abide by when implementing tokens, such as specifying the token name, total amount, implementing token transaction functions, etc., can only be supported by the Ethereum wallet if the protocol is supported.

 

A typical ECR20 token has the following basic variables and functions:

name : token name

symbol: token symbol

decimals: the number of decimal places of tokens, the smallest unit of tokens, 18 means we can have 0.0000000000000000001 tokens.

totalSupply() : The total amount of issued tokens.

balanceOf(): View the token balance of the corresponding account.

transfer(): Implement token transactions, used to send tokens to users (from our account).

transferFrom(): implements transactions between token users.

allowance(): Control token transactions, such as tradable accounts and assets.

approve(): The number of tokens the user is allowed to spend.

The TOKEN of the ERC20 contract has always been regarded as a pure on-chain asset. It has always been "live" like a Coin mapped on Ethereum, and the community label & value consensus is a deep meaning of the original ERC20 operation .

It looks like a balance but not for measuring the balance. Friends who are familiar with the difference between Bitcoin and Ethereum may understand that ETH is the design of the account mechanism and BTCOIN is the design of unspent output. The narrow understanding from the technical level is the difference between emphasizing privacy and emphasizing space performance, but a deeper philosophical understanding is the measurement of currency and consensus. It can be simply said that UTXO simulates the process of taking out currencies of different denominations and obtaining change, and simulates the circulation of various currencies (there is also an abstract part), which is very suitable for Bitcoin defined by currency assets. In fact, the account design of ETH cannot be simply understood as the account in the bank that we most often think of. From the perspective of ordinary people, the bank account is a place to manage the banknotes (unspent output) that you have saved, and Ethereum A very important part of the meaning of the account is actually the collection of consensus metrics behind each account.

From April to May of this year (2018), BEC, SMT, etc. exposed the loopholes of unlimited token swiping, which significantly improved everyone's understanding of ERC20 "assets", that is, seeing the total supply limit (TotalSupply ) will not really limit the previous supply (currentTotalSupply), their current supply soared "straight to the moon" in this event. In fact, TotalSupply only serves as a notification on Ethereum, and there is no mandatory constraint on currentTotalSupply. This is just a reflection of the difference between currency measurement and consensus measurement. To measure currency, the total attack power must have an absolute limit on the current supply, and to measure consensus, the contract itself includes this "notification" as one of the contents of the consensus."performance"not mandatory because"breach of contract"It can also be consensus. The common cognition of all Token holders subtly supports the value of various ERC20 Tokens, and the holders are quietly forming a tight or loose consensus community.

Every ERC20 Token holder is like a group, and the distribution of shares held is exactly the autonomous distribution from "group management" to "group newcomers". Correspondingly, the more Tokens you hold, the closer your relationship with this group will be, and you will have a higher right to speak. Erc20Token is the label of each community, and the consensus value is closely related to each member to varying degrees. This Token is its composite carrier.

Of course, this is not the only thing that Erc20Token is capable of. For ordinary currency people, they are now more regarded as an asset with various stories and uses, and they are held in the exchange like the stocks they bought. The code is used. However, as the awareness of the majority of investors gradually improves, more of these understandings will be more widely accepted, just like the more specialized understanding of various Erc standards and their technical industries. For example, now more people know that sometimes anchoring a specific thing, Erc721 is a better choice.

【Non-Fungible Tokens】

What is ERC-721? All kinds of encrypted cats and dogs we see now are created based on ERC-721, each of which is a unique ERC-721 token, but ERC-721 is far more than cats and dogs in the blockchain world , its greater imagination lies in mapping assets in the physical world to the blockchain.

ERC721 was proposed by Dieter Shirley in September 2017. Dieter Shirley is the technical director of Axiom Zen, the company behind CryptoKitties. Therefore, CryptoKitties is also the first decentralized application that implements the ERC721 standard. Although the standard has been widely used before, it has been in the official draft stage. It was not until June that the ERC721 proposal was officially accepted by Ethereum as a standard.

So how do you understand non-homogeneous tokens? Non-homogeneous means uniqueness. Take encrypted cats as an example, each cat is endowed with genes and is unique (a cat is an NFTs), and cats cannot be replaced . This uniqueness makes certain rare cats collectible and therefore highly sought after.

ERC20 tokens are replaceable and can be subdivided into N shares (1 = 10 * 0.1), while the smallest unit of ERC721 Token is 1 and cannot be divided.

Two items of the same set are non-homogeneous if they have different characteristics, while homogeneity is when a certain part or quantity can be replaced by another equivalent part or quantity.

Inhomogeneity actually exists widely in our lives, such as every book in the library, every pet in the pet store, songs sung by singers, different flowers in the flower shop, etc. Therefore, the ERC721 contract must have a wide range of application scenarios. Through such a standard, a cross-functional NFTs management and sales platform can also be established (just like exchanges and wallets that support ERC20), making the ecology more powerful.

ERC721 is the most contract standard, which provides the protocol that must be followed when implementing ERC721 tokens, requiring each ERC721 standard contract to implement ERC721 and ERC165 interfaces.

A typical ECR721 token has the following basic variables and functions:

balanceOf(): Returns the number of NFTs held by _owner.

ownerOf(): Returns the tokenId address of the token holder.

approve(): The address _to is granted with the control of _tokenId, and the Approval event needs to be triggered after the method succeeds.

setApprovalForAll(): Grant the address_operator the control over all NFTs, and trigger the ApprovalForAll event after success.

getApproved(), isApprovedForAll(): Used to query authorization.

safeTransferFrom(): Transfer NFT ownership, a successful transfer operation must initiate a Transer event.

Some functions defined by ERC721 make it consistent with the ERC20 token standard. The purpose of this is to make it easier for existing wallets to display simple information about tokens. These functions make smart contracts that conform to the standard behave like common cryptocurrencies such as bitcoin or ethereum by defining functions that let users perform actions such as sending tokens to other people and verifying account balances. These functions define how the contract handles token ownership and how ownership is transferred. The most notable functions are takeOwnership and transfer, which serve as take and send functions respectively and are essential for transferring tokens between users.

The function ownerOf returns the address of the owner of a token. Since each ERC721 token is non-fungible and therefore unique, it is queried on the blockchain by a unique ID. We can use its ID to determine the owner of the token.

The function approve approves or grants another entity the right to transfer tokens on behalf of the owner. For example, if Alice owns 1 MyNFT (My Non-Fungible Token), she can call the approve function for her friend Bob. After the call is successful, Bob can later obtain ownership of the token or operate on the token on behalf of Alice. See the functions takeOwnership and transfer for more on ownership transfer.

function transfer, the next way to transfer tokens is to use this function. The function transfer lets token owners send their tokens to another user, similar to standalone cryptocurrencies. However, the transfer can only begin if the receiving account has been previously granted the right to receive tokens by the sending account.

Non-homogeneous substitution means that you own something, and this ownership can in turn prove a certain state about yourself. Collectible objects are not limited to Tamagotchi. Humans have a long history of collecting things; this is nothing new. From physical currency to Pokémon cards, people love to collect. It is a habit formed out of a unique interest in scarce items. Just as the value of a commodity is related to its scarcity, the value of a collectible to a collector is related to its rarity compared to other items.

For example, if you participate in a club activity, the club will give the participants a token. Then, when you post this token in your circle of friends, anyone in the circle of friends can actually verify whether you own this token through the blockchain. token, and this will also be a very strong social signal. And when the symbolic meaning of this community is greater (such as a doctorate degree from Harvard University), or when more and more people form a consensus, the amount of information represented by this token will be greater and clearer.

We can think of Ethereum tokens as rare and collectible items, and each of these tokens follows a standard known within the Ethereum community as ERC721. Ethereum Token Standard 721, or ERC721, is an Ethereum improvement initiative introduced by Dieter Shirley in late 2017. This proposed standard enables smart contracts to operate as tradable tokens like ERC20. ERC721 tokens are unique in that they are non-fungible.

Think again, do our degrees and credit lines have similar functions? The credit card limit of many banks is approved according to the maximum limit of the credit card you have, and now many units will require you to show your Sesame credit score. If you are an extremely hot fan of a certain product or device, such as audio equipment or a watch, you own the thing itself, and at the same time, you are conveying a lot of your unique information to the people who come into contact with you.

When you equalize all things and everyone has the equal right to access a certain thing, at this time, everyone actually loses their own individuality (this is actually an ERC20 homogeneous token).

Therefore, non-homogeneous tokens are personal, personalized, and contain your own unique personality brand. It may become a self-expression of this age, a self-expression with more weight and meaning than any other language and medium.

【Thinking of EKT】

"Non-homogeneous" itself is a rather strange concept. Money and shares are homogeneous. For example, if I have 500 yuan, I can transfer 100 yuan of it to you. It doesn't matter which part of the 100 yuan is transferred. But with a T-shirt, you can't do that. Therefore, for homogeneous things like money and shares, the only thing that matters is its quantity.

But most things in life are non-homogeneous. You and I are non-homogeneous. Bitcoin started out as a solution to the problem of money, so everyone may go in the direction of homogeneous tokens. Such as currency, shares, assets, etc. Then, we imagine, is it possible to make a public chain system into a unique multi-chain system that has an established framework and a certain system, but can also be customized on demand?

Our multi-chain of EKT adopts the new scheme of "multi-chain divide and conquer" to redesign a public chain that guarantees the normal operation of each contract. Among them, a set of non-homogeneous customization is used, which has a ready-made framework and cannot Split multi-chain architecture. This innovation greatly simplifies the architecture, reduces the pressure of data processing, and ensures that the surge of traffic on one chain will not affect the efficiency of the other chain, and any business carried out on the chain will not receive other business interference, effectively Resource isolation is achieved.

In fact, one of the core problems that EKT solves is that the current difficulty of Dapp development is that if you use Ethereum’s Solidity to develop, you need to learn a whole set of logic in Ethereum, and you need to consider various optimization solutions when developing complex applications. The traditional C/S structure is written in one day, but it may take several weeks to write in Ethereum, which is very unfriendly to developers. If this set of procedures is to be written by Dapp/public chain developers, it is bound to consume too much energy and resources by these tedious but common steps before the real development of blockchain functions.

So, this is the same for all other applications and products built on the blockchain. For example, if I make a Minecraft game on the blockchain, then anyone can also develop new games on the Minecraft game. As long as the blockchain is connected, all games and all dapps naturally have this potential scalability and openness.

The default is to have this kind of expansion capability, which is also the most natural open concept of dapp. If someone does not want this kind of openness, he can do it in a centralized way by building his own private server. The blockchain platform will uniformly provide this openness and scalability for all applications. In EKT, we adhere to the concept that a currency system does not require a Turing-complete development language, and the principle of isolation between different applications as much as possible. Therefore, when designing, we separated the processing of tokens from the processing of DApps, which means that there are two types of chains on EKT: token chains and DApp chains.

The token chain is a chain specially used to process token transactions. In view of the various vulnerabilities constantly exposed by ERC20 tokens (although the generation of vulnerabilities is the problem of smart contract developers, we believe that there is a better solution to achieve it) , the token object is built-in on EKT, and developers only need to define the number of tokens they want to send. In addition, EKT's token chain is a multi-chain and multi-consensus structure, which means that different tokens can be packaged on different token chains, and multi-chain parallelism greatly improves transaction processing speed.

EKT's DApp chain is a chain for different developers to develop DApps. We have optimized it from three aspects: smart contract development language, data storage, and efficiency. EKT's DApp chain can basically achieve the same or even faster development speed as the current Internet application, and the achievable functionality is not much different from that of the Internet application. Most importantly, we can achieve 1-second execution of most events And confirmation, events with relatively high security requirements can be confirmed in 3 seconds.

The central idea of ​​EKT is to design a community mechanism, so that developers can easily develop a main chain that can carry DAPP, and the rest is handed over to EKT. EKT's "one chain, one main currency, multi-chain, multi-consensus" mechanism It provides great convenience for the development of subsequent blockchain projects, and can be used in any applicable application scenarios of blockchain. Just like Dieter Shirley's definition of the erc 721 protocol, the multi-chain we launched can only be a minimum standard. That is to say, you can think of what functions need to be included in a minimized version of a product, and then you can derive other new functions and new gameplay on it. If you only have these minimized functions, then this product must be meaningless up.

EKT provides a set of underlying blockchain mechanisms. Other blockchain projects can easily deploy their own main chain based on EKT's main chain code, and then make some customized settings according to requirements, such as choosing consensus mechanism etc. Blockchain projects written on EKT will not need to worry too much about security issues, because each interface is very simple and deployed and run on many parallel main chains. When deploying the main chain, you can flexibly issue tokens of your own main chain and choose a consensus algorithm. The newly deployed main chain can also join the entire ecology of the EKT multi-chain technology, share the user resources of the EKT ecology, and tokens can also be exchanged and circulated with the EKT main currency and tokens of other main chains.

Reference reading:

Reference reading:

20170119 Blockchain - The Consensus Mechanism of Bitcoin

20171120 What is Ethereum

20180214 Tutorial | Analyzing ERC721 - Understanding Non-homogeneous Ethereum Tokens

20180414 Detailed explanation of the "multi-chain multi-consensus" mechanism

20180426 Community Label & Value Consensus - A Deep Mystery of ERC20

《EIP 721: Non-fungible token improvement proposal.》

《BTC whitepaper》

《EKT whitepaper》

 


NFT
安全
Welcome to Join Odaily Official Community