Smart contracts have been around in some form for a while. Before blockchain and the internet, we could consider vending machines and arcade games as crude smart contracts where an item or a game was exchanged for some money or a coin. This example is also used in the Ethereum documentation about smart contracts. Obviously these were not called smart contracts but the analogy can be used to illustrate how smart contracts work.

Since the advent of the internet and blockchains adoption into the mainstream, the programs that run on the blockchain have become more and more complex. They have become the main building blocks of whole industries and movements. The industries in question here are decentralized finance, NFTs and the metaverse. The movement is the web3 movement which is founded on the idea of a decentralized and trustless exchange of information and value.

Smart contracts on Ethereum

On Ethereum a smart contract is a type of account that is not run by a user like a wallet. Instead, they are deployed to the network and run as programmed. Users can interact with smart contracts by submitting transactions that execute a function as defined in the smart contract. Interactions with smart contracts are irreversible and they cannot be changed after they have been deployed.

Smart contracts can be deployed on the Ethereum network by anyone. The person deploying a smart contract needs to hold sufficient ETH in order to submit/deploy the smart contract on the network. They work like open APIs, because every contract is callable and available to anyone on the network.

This makes it possible to create complex programs out of multiple smart contracts that can execute complex operations like DeFi swaps, lending and similar financial products.

Issues with smart contracts

New technologies are prone to issues from the beginning. One of the biggest projects in the early years of Ethereum was The DAO (Decentralized Autonomous Organization) that raised over $150M in ETH in 2016 through a token sale. The underlying smart contract was exploited soon after the token sale ended. The result was disrupting. 14% of all ETH in existence was in the hands of the hacker. The investors and The DAO were left empty handed. And, after much debate, the decision was made to fork the network in order to restore all the user funds. The proponents of immutability continued to support the chain and called it Ethereum Classic while the majority decided to roll back the state of the network to a time before the hack.

This event likely pushed back the whole crypto industry and especially the nascent smart contract and DAO efforts for a few years.

Since the DAO hack, there have been other problematic exploits like the recent Poly network hack and the Ronin network hack. These serve as stark reminders of the need to properly audit the code that is used in smart contracts and to make every effort to secure the code from exploits such as we have seen in these three monumental cases and heaps of others.

Why even trust smart contracts?

After the last paragraph, this is a valid question. The promise of smart contracts and all the benefits that can be derived from them, it is imperative that we look past the current complications toward a future that we desire.

The possibilities of smart contracts for our everyday life are endless, much like they are endless for software that is already present in (practically) every moment of our lives. The potential benefits also cannot be understated. Decentralized governance can finally give everyone an equal say in decision making. DAOs will have the ability to transparently track and manage these processes. Smart contracts make it all possible.

Smart contracts on other blockchains

The open source nature of blockchain has made it possible for many people to try and improve on the functionality of Ethereum. Because the code of the Ethereum network is open-source, developers can use it to build new applications and networks. This is actually happening and we have a whole segment of blockchains called “Ethereum killers” or the more friendly “Ethereum clones”. Developers take the core code of Ethereum and are able to adapt it in some way. For example, they can choose to make their network a Proof-of-Stake network from the beginning. Most of these spin off projects support smart contracts in some capacity and have strong teams and use cases.

So far none of them has come close to challenging Ethereum in terms of traffic, users and developers.

The top Ethereum competitors at the moment that offer a similar set of functionalities are Binance Smart Chain, Solana, Cardano, Avalanche and Polkadot (sorted by market cap). They are not all Ethereum clones but offer similar affordances via different setups (for example sidechains).

On the XRPL

The XRPL does not offer smart contracts in the capacity that is offered on Ethereum. It does however offer some functionality that can be considered a sort of primitive smart contract. These features are multi-signing (absent from Ethereum completely), Escrows and Payment Channels. These can be used to execute certain actions programmatically on the network.

The other end of the story is amendments for the XRPL which might bring smart contract functionality to the Ledger if they are properly developed and voted in. The amendment is called Hooks and is in the development and testing phase at the moment.

You can read the XRPL Hooks documentation and track the progress here.

Regulators are slowly catching up with cryptocurrency in terms of regulating assets on and off the blockchain. They are discovering what types of assets exist and how their transactions and taxation should be handled. There is no worldwide consensus on how to treat specific blockchains and their assets. To illustrate this fact, we just need to look at China’s treatment of Bitcoin mining over the years. There are also high level debates in the EU about mining, taxation and other ins and outs of crypto. In the US, the most high profile case regarding cryptocurrencies is the SEC lawsuit against Ripple.

All of this is still limited to specific cryptos and blockchains. Right now there are no strong frameworks and rules for smart contracts. Projects that are based on smart contracts can gain credibility by auditing their smart contract code with a reputable third-party like SecureBlock or ConsenSys among others.

Smart legal contracts on the blockchain are not a widespread phenomenon. In 2018 the US Senate declared that smart contracts are conceptually rooted in contract law and that the judicial system can adjudicate disputes and enforce terms. In most cases, a smart contract will perform a specific function based on an input. Due to their public and transparent nature, it is hard to argue a smart contract’s outputs. We are looking forward to seeing how things develop on this front.

Conclusion

It seems we are still in the early stages of smart contract proliferation in spite of the widespread smart contract based DeFi ecosystem. We can see how powerful the technology can be but we are still short on the infrastructure to support this tech. Namely, the development processes are still unstable compared to traditional software, the applications are still not robust and secure enough for widespread use and finally, the legal and regulatory frameworks only let us utilize smart contracts in limited ways.

The possibilities are endless and we hope smart contracts will help us build a better future.