2024. 2. 12. 17:29ㆍU.S. Economic Stock Market Outlook
Smart Contracts and Tokens
1. Distributed ledger technology allows individual nodes to preserve copies of all transactions independently and update them with consensus from all nodes. Therefore, the database of each node becomes a backup database for all nodes. The integrity of the database managed by the decentralized network allows the scope of utilization of the shared ledger to be expanded beyond just processing the transfer of funds.
2. Transactions connected in the form of data blocks are recorded in Bitcoin's database. Data irrelevant to the transfer of funds can also be stored in the network's shared ledger by attaching it to a data block or transaction. Satoshi recorded the sentence "The Times 03/Jan/2009 Chancellor on second failure for banks." Distributed ledger technology makes it easy for anyone to check the data input to the shared ledger through the agreement of all nodes, but it makes it impossible for anyone to damage it.
Vitalik Buterin led the development of the Ethereum network that supports smart contracts using distributed ledger technology. Smart contracts are computer programs that users write and register with the shared ledger. The basic function of the Ethereum database is to organize transactions that transfer funds like Bitcoin in the form of data blocks and then connect and store them sequentially. Buterin's innovation is to add a decentralized methodology for executing smart contracts. Network users can register with the shared ledger by creating smart contracts and attaching them to the transaction. When a user requests the execution of a smart contract registered through transaction, the nodes of the network each execute it and record the result in the shared ledger.
3. The functions performed by smart contracts can be divided into two main functions. The first is the function of creating and managing a separate sub-book inside the shared ledger. The record of ownership and transfer of Ether (ETH), which is the currency used by the Ethereum network to process the transfer of funds, is recorded in the Ethereum shared ledger in transaction form. Network users can create a separate sub-book inside the shared ledger using smart contracts and record the ownership status of assets other than Ether here. This is called the asset generation function of smart contracts.
A computer program that performs the asset generation function, that is, a smart contract, defines the name and total amount of assets, and creates and manages sub-books that record the ownership status of assets in a manner similar to that of an account. Consider creating an asset named "XYZ". The developer creates a smart contract that defines the initial state, such as a total of 1,000 XYZs, account A in which all of them are stored, and then sends it to the network by attaching it to the transaction. When nodes process this transaction through the process of confirming and agreeing on authority, the smart contract is registered with the shared ledger, and the location, that is, the address, of the database that recorded it is assigned. In this smart contract, the ownership status of the asset is recorded as {<A:1000>} and itself performs the function of a sub-book that manages the XYZ within the shared ledger.
4. The smart contract that creates the asset includes a code that is an instruction to be used to change the ownership state of the asset. If any user creates and transmits a transaction requesting that the necessary code be activated, and nodes process it, the ownership state of the asset recorded in the smart contract changes. For example, when a user creates a transaction that "transfers 5 out of 1000 XYZs of A to B" and transmits it to the network, individual nodes search for the corresponding smart contract and execute it after checking the user's authority. The execution result is recorded in the shared ledger through the agreement process of all nodes. In other words, individual nodes execute their respective code of "transfer" and the associated computer program changes the ownership state of the assets recorded in the smart contract. Only when all nodes agree on the execution result, the state of the changed smart contract from {<A:1000>} to {<A:0995> and <B0005>} is updated in the shared ledger.
In addition to "asset transfer," smart contracts that generate assets may include codes that specify prerequisites such as delegation of authority or linkage with other assets. It is also possible to include in the program a code that delegates the authority to transfer assets to a specific node or other smart contract, or to link the authority to access digital files stored at specific addresses on the Internet with the ownership of assets.
5. The second function of smart contracts is to automate the transfer of assets according to various and complex conditions through interaction with other smart contracts already registered with the shared ledger. For example, consider a transaction that "transfer 20 XYZs, which are assets of A, to C if the KOSPI exceeds 3000 for more than 5 business days after the date of 20xxyy monthzz." To automate this transaction, you must use a computer program to execute the following three tasks. First, check whether the date of the work date is "after the date of 20xxy monthzz". Second, check whether "the KOSPI exceeded 3000" lasted for more than 5 business days." Third, after searching for the smart contract that created XYZ on the shared ledger, "execute the code to transfer 20 from A to C." If the work at each stage does not confirm that the conditions are met, the work of the next step is not executed.
The code for "asset transfer" for the third operation is already included in the smart contract that generated XYZ. For the previous transaction, the user must execute "check the date" and "calculate the business day of KOSPI>3000", and execute the "asset transfer" code of XYZ's smart contract stored in the shared ledger according to the result, and write a computer program that specifies the quantity of "20" in the form of a smart contract and attach it to the transaction and send it to the network.
After the second smart contract is registered in the sharing recommendation, any user can request the nodes to process the transaction by creating and transmitting a transaction to execute it. If both of the above conditions are met, the new smart contract executes the "asset transfer" code of the existing asset-generating smart contract to change the ownership state of XYZ from {<A:aaaaa> to {<A:aaaa-20>,...,<C:cc+20>}. This is called the programming function of smart contracts, and it is expressed that the target asset has programability.
6. Assets in which a decentralized network records ownership directly in the shared ledger, such as Bitcoin and Ether, are called endogenous assets or coins of the network, and assets that create and record ownership using smart contracts are called tokens. In this case, the term token has a different meaning than when describing the characteristics of the payment substructure, such as "token-based" and "account-based". For example, Bitcoin networks are classified as token-based payment substructures, but Bitcoin is a coin.
In order for users of a decentralized network to register a smart contract or execute an already registered smart contract, they must attach the address and related code of the smart contract to be registered or executed in a transaction that transfers coins, an endogenous asset of the network. Individual nodes in the network store all smart contracts in their databases, and search and execute those smart contracts whenever necessary. Transactions using smart contracts are completed when individual nodes record the execution results of the program in their respective shared ledger through the consensus process of all nodes.
7. Distributed ledger technology allows all nodes in the network to execute the same smart contract, so that even if some nodes fail, conditional transfer of tokens can be handled without a hitch. Since only the results agreed by all nodes are recorded in the shared ledger, some nodes cannot enforce the transfer of unfair tokens that do not meet the predetermined conditions. Smart contracts, which smoothly execute conditional transfers of predetermined tokens, have transformed the shared ledger into a multipurpose business platform through the following innovations.
First, the asset creation function made it possible to transfer various assets in the form of tokens using a shared ledger. As a result, tokens for various purposes such as utility tokens, governance tokens, non-fungible tokens, and token securities were born. Stablecoins are called 'coins', but they are tokens based on smart contracts and perform functions similar to e-money or prepaid cards issued by Big Tech.
Second, assets created through smart contracts can be exchanged simultaneously on the shared ledger in a delivery vs. payment method. Transactions in which assets in the form of tokens and payment means in the form of tokens can completely automate online transactions by eliminating payment risks.
Third, by connecting an application program that executes various business activities targeting the general public with a shared ledger using distributed ledger technology, the trading of assets and services can be automated without payment risk. Decentralized applications, or dapps, are where applications are in charge of customer interfaces and smart contracts process the exchange of assets in a delivery payment method. Transactions using Dapps use utility tokens or stablecoins, which are prepaid use rights, as the main means of payment.
8. With the activation of dapp-type businesses, decentralized networks can be largely divided into two types depending on their functions. It is a network that is faithful to its role as a payment substructure, such as Bitcoin, and a network that pursues the role of a smart contract-based business platform, such as Ethereum. The targets to be compared with nominal currency are endogenous coins with a payment substructure and stablecoins with legal currency collateral. Bitcoin is similar to cash, which is a currency other than a debt, and stablecoins are similar to deposits, which are the debt of a bank.
Endogenous coins on business platforms are mainly used to pay fees for registration and execution of smart contracts rather than transferring funds.