nav-close
float feedback icon livechat
banner of the news detail

Crypto basics: Smart contracts

BY LAWRENCE J. | Updated May 31, 2024

image of the news' author

Financial Analyst/Content Writer, RADEX MARKETS Lawrence J. came from a strong technical and engineering background before pivoting into a more financial role later on in his career. Always interested in international finance, Lawrence is experienced in both traditional markets as well as the emerging crypto markets. He now serves as the financial writer for RADEX MARKETS. อ่านเพิ่มเติม
SHARE instagram icon share link icon

In our previous article, we covered the underlying backbone of the cryptocurrency sphere: the blockchain. In summary, the technology was born of a desire to create a financial system that could not be censored, tempered with or manipulated by centralised actors. Trust assumptions would be taken away, the integrity of the system would instead be safeguarded by economic incentives. Skin in the game, so to speak. We now have a tool that allows us to reliably send and receive money in a trustless manner.

This is all very well and good, but what is the actual scope of such a tool? Could such a technology be expanded to become something more encompassing? More useful? With Bitcoin, we can send coins from one wallet to another, but that’s about it. What if we wanted to send coins only once a certain condition is met? What if we wanted to mint another currency without spinning up an entirely new blockchain? What if we wanted to create a form of escrow contract? What if we wanted to use a cryptocurrency that maintained a stable value as opposed to one that fluctuated wildly, as cryptocurrencies are prone to do?

These were the questions being asked by a number of programmers in the bourgeoning blockchain industry as early as 2013. The solution was to create a blockchain with a built-in programming language, allowing anyone to write decentralised contracts and applications upon it. A platform open to everyone to develop smart contracts that would be entirely customisable. The name of this blockchain? Ethereum.

Ethereum was not designed as a competitor to Bitcoin, it was viewed as the next logical step in the development of blockchain technology. To illustrate the difference between Bitcoin and Ethereum, the main figurehead and co-founder of the project, Vitalik Buterin, compared the former to a calculator and the latter to a smartphone. A smartphone without an internet connection would perhaps be a more apt analogy, but more on that later.

Just as the Bitcoin blockchain that inspired it, Ethereum was designed around a proof of work consensus mechanism to secure the network, although it would switch to a proof of stake mechanism much later on in its development. In contrast to Bitcoin however, Ethereum favoured speed more strongly, with an average block time of just 12 seconds as opposed to Bitcoin’s 10 minutes. Its critics would argue that this came at the expense of security. The debate has been raging for the better part of a decade at this point.

Just as Bitcoin inspired the creation of many other cryptocurrencies, such as Litecoin or Doge, Ethereum would inspire the development of many other smart contract platforms, such as Cardano or Solana. The term cryptocurrency becomes a bit of a misnomer at this point and warrants some elaboration. The first cryptocurrencies were indeed merely currencies, albeit ones cryptographically secured, hence the name. For some applications the definition still suffices, for others however the currency part of the term is no longer broad enough. A smart contract platform allows the development, deployment and execution of a computer programme within a decentralised network. It is more than just a currency.

The point is that we now have the infrastructure necessary to construct decentralised applications. But what do these look like? What can we actually build with smart contracts?

The first and most obvious use case is the creation and distribution of tokens. A new cryptocurrency can be spun up in a surprisingly small number of lines of code. Specify the initial and total number of tokens, the emission rate, permissions and approvals and voilà! Job done. A slight exaggeration, but the operation is not difficult, as testified by the sheer number of different tokens on the Ethereum blockchain alone. Over half a million contracts at the last count.

The overwhelming majority of these cryptocurrencies have no function at all, existing purely for speculative purposes. They can be sent and received, but mostly they exist to be bought on an exchange and sold at a later date. Such tokens typically feature dogs, memes or inane political statements.

Other tokens have a genuine function, for example they will be the currency used to pay for specific blockchain-based services, such as data feeds. Tokens can also be used to synthetically represent real world assets, such as stocks or commodities.

The second use case is the implementation of stablecoins. Stablecoins such as USDT (aka Tether), USDC and DAI are pegged to the value of the US Dollar, and are also a type of smart contract. The stablecoin is either collateralised, algorithmically backed, or a combination of the two. Stablecoins backed by gold also exist. The usefulness of a cryptographically secured stablecoin in the realm of ecommerce is self-evident.

The third use case is that of the decentralised exchange. The entire point of crypto is to fully control one’s own financial assets. Having to rely on centralised bodies to trade and transact entirely defeats the purpose of doing so. This is where the DEX comes in. Instead of being at the mercy of a company, and all the entities upstream of it, the user has only to interact with a smart contract to swap between any cryptocurrencies they see fit. Given the decentralised nature of the underlying infrastructure, nothing can stop the user from achieving this.

The fourth use case follows swiftly in the footsteps of the third. We can now buy and sell cryptocurrencies within a completely permissionless environment. Why not take it a step further? With nothing but smart contracts, it is possible to build an entire money marketplace where users can not only trade, but perform many more complicated financial operations. For example, users may contribute to a communal liquidity pool and be financially rewarded for doing so in the form of interest payments; they may use one cryptocurrency as collateral to take out a loan in a different currency; they may spread the borrowed capital among a number of different financial instruments; all with just a few clicks.

As use cases grow in complexity, we reach a new paradigm. It started with decentralised money, it evolved into decentralised finance, or DeFi for short. In essence, money has become programmable. The scope of available services that crypto has to offer has increased by an order of magnitude since its inception, and is still only in its infancy. There are other niche cases we haven’t had a chance to cover, such as non-fungible tokens (NFTs), decentralised autonomous organisations (DAOs), DeFi gambling, insurance, escrow, shared accounts and decentralised storage to name a few. Such is the extent of what smart contracts are capable of.

Ending on a more pragmatic note, in the same way that a blockchain has limited functionality, so too do smart contracts. Their very design limits what they can achieve. But once again, very bright minds have been working on the solution to this problem for many years already. Much like the early internet, the cryptocurrency industry still has a lot to improve upon, but given the enthusiasm and vigour that has brought us this far, the remaining technological limitations of smart contracts will soon be a thing of the past.



Feedback
float feedback icon
LiveChat
livechat
เข้าสู่ระบบ เปิดบัญชี

คำเตือนความเสี่ยง : การซื้อขายตราสารอนุพันธ์และผลิตภัณฑ์ที่มีเลเวอเรจมีความเสี่ยงสูง

เปิดบัญชี
to top icon