CertiK 101: Smart Contracts
TL;DR: In essence, smart contracts are computer protocols designed to enable autonomous transactions taking part in a distributed ledger network, without humane interference, hence they are “smart”.
So what is the value proposition here, who uses smart contracts nowadays, and why even bother?
In this article, we’ll elaborate on the above in layman’s terms, to help you easily consume the concept behind smart-contracts, and most likely grasp the fact you’ve been already interacting with a variety of such programs without even realizing it.
Brief History of Smart Contracts
Decentralized information management, distribution, and monetary settlement systems, commonly known as blockchains, are by nature tailored to block intermediary gloves from leeching-off data and/or funds subject to digital transactions.
Yet, it wasn’t before smart contracts were introduced as a savvy-addition to the architecture of such systems when we started to see game-changing computing protocols being adopted by governments and financial institutions at an astonishing pace.
In general, blockchain empowers faster, cheaper, and more reliable transactions in terms of integrity and overall security, but it was smart contracts that brought unparalleled automation to fintech service providers, and data management enterprises.
Nick Szabo, a legal scholar, cryptographer, and Bitcoin pioneer was the first to conceive the idea that decentralized ledgers could be used to facilitate self-executing pieces of code, otherwise referred to as digital contracts or smart contracts back in 1994.
In a nutshell, smart contracts were eligible to be converted to computer code, stored and replicated on-chain, while monitored by the broader distributed ledger network in a transparent fashion and at all times.
One could argue that the whole concept of a functioning blockchain itself is the definition of a smart contract in action.
As previously mentioned, smart contracts make the process of storing, distributing, and exchanging information, as well as protocols that prove the legitimacy of physical and digital assets, and by extent their respective ownership status, faster, cheaper, and more secure.
That is simply because smart contracts can facilitate the execution of such quotes in a transparent, undeniable, and non-custodian fashion.
What’s even more fascinating, is the fact smart contracts have well-defined rules and penalties subjecting an agreement, similar to traditional contracts.
The difference here is that smart contracts don’t require lawyers or notary to act according to the pre-agreed rules but are eligible to enforce these obligations autonomously, again, saving precious time, effort, and money.
Ethereum’s 26-year-old founder Vitalik Buterin describes smart contracts as a program running code that may contain digital currencies, and/or other assets.
“…and the program runs this code and at some point, it automatically validates a condition and it automatically determines whether the asset should go to one person or back to the other person, or whether it should be immediately refunded to the person who sent it or some combination thereof.” — Vitalik Buterin, Ethereum co-founder
At the same time, the distributed ledger network also stores a copy of each transaction, eventually making it immutable to changes or conflicts, while everyone can assess the nature of each of these transactions publicly.
In the end, this is the key-point that attributes value to automated smart contracts, offering undeniable certainty of operations.
While most of the time, blockchain users take for granted that smart contracts must be somehow directly related to operations carrying monetary value, a smart contract can do much more than settling cryptocurrency transactions.
Popular Smart Contract Use-Cases
We can find solutions relying on smart contracts that range from financial services, derivatives, insurance plans, breach contracts, property & real estate, credit markets, law, and crowdfunding, among hundreds more.
It is true smart contracts can exist almost in any blockchain, and under various formats, although without a doubt, the platform that made smart contracts mainstream is the Ethereum Blockchain, and its native Ethereum Virtual Machine or EVM.
DApps (Decentralized Applications)
Due to the fact smart contracts empower the majority of DApps out there, the latter are often dubbed as smart contracts themselves and in most scenarios, they are open-source and naturally decentralized.
If you’re not sure what a DApp might be, you can think of them as casual web3 and/or mobile applications, only running on web3 infrastructure and powered by some sort of a distributed ledger, once again, with Ethereum spearheading the industry with a difference.
DApps are popular among crypto-games, crypto-collectibles, blockchain voting systems, decentralized financial services, and much more.
Some DApps you might have already used without realizing it would include the popular cat-breeding game CryptoKitties, the Uniswap decentralized exchange (DEX), and OpenSea, an NFT marketplace to go for every crypto-collectible out there.
Contrary to typical applications, where the back-end is relying on centralized infrastructure, dapps run on top of decentralized computing networks such as the Ethereum blockchain.
While DApps used to be ugly one-pagers where you’d trade your crypto for a non-fungible collectible or ERC-20 tokens, nowadays we see some pretty interesting design in terms of aesthetic, as well as utility, meaning that DApps are only limited by the developers’ programming skills and level of creativity.
On the smart contract level, a DApp usually relies its functionality on one or more consecutive smart contracts, each tailored for a specific function of the DApp (eg. buy CryptoKitty, breed CryptoKitty, exchange/sell CryptoKitty etc.).
DeFi (Decentralized Finance)
Of course, it’s not all fun and games, especially when analogizing we’re talking about the crypto domain, and therefore more sophisticated DApps can be the catalyst for a more complex financial system, one that tackles the integrity of traditional financial processes.
As you read this, there is over $10B worth of cryptocurrencies locked in the broader DeFi scene, making it a standalone financial sector serving the crypto industry and its peers.
Undoubtedly, the cornerstone of such an economy has to be its “banking system”, in this case, Decentralized Exchanges (DEXs), various lending platforms, yield farming, staking, and more DeFi tools and services that rely their operations on blockchain technology, and more specifically on smart contracts.
A DEX is essentially a collection of inter-operating smart contracts that provide users with decentralized, autonomous, and transparent exchange services.
Unlike centralized exchanges of the likes of Coinbase, Binance, or Kraken, DEXs are non-custodian and usually work in a wallet-to-wallet fashion.
Decentralized Finance essentially stands for the ability of crypto users to own their funds in their wallet, and use them as they see fit using various DApps able to interact with a web3 wallet’s components.
Once again, this is only possible thanks to smart contracts.
Being one of the most well-established industries in the physical realm, the RE sector couldn’t stay unaffected by distributed ledger technology.
Powered by smart contract functionality, a new era lies ahead for the housing market, as the concept of tokenization promises a plethora of problem-solving adjustments.
Tokenization is the process of issuing a blockchain token (in this case, a security token) as a digital representation of a real tradeable asset.
Tokenizing a property essentially means slicing the physical ownership contract to multiple digital tokens that represent the full piece in combination.
Instead of having one owner per-property, tokenized RE could distribute the ownership rights among a large number of individuals, unlocking a whole new inclusive sub-market on top of the traditional industry.
It should be self-evident how smart contracts offer faster and cheaper transaction costs, as well as irrefutable proof of ownership that can, in turn, establish legal transparency and improved market security and traceability.
Additionally, both sellers and buyers can enjoy enhanced management over their respective assets, considering they could decide to buy, trade, or sell a token pegged to property value, with the ease of a single click, and without any sort of intermediaries.
Finally, the opportunity for fractional ownership significantly lowers the entry barriers for investors, making the industry more accessible to anyone regardless of their balance’s strength.
From UPS and Walmart to IBM, and Maersk, smart contracts in the supply chain industry have upscaled the industry to a whole new standard.
By using a versatile data management infrastructure relying on IoT, RFID, QR, and Blockchain technologies, the supply chain sector is now in a firm position to track, authenticate and monitor the history of products, physical goods, and consumables in real-time.
This is probably the most widely spread use case among private enterprises, considering it solves a lot of the problems subject to counterfeit products, lost goods, and bad labeling.
For example, you can scan a QR code found in a Walmart product and learn where it was produced, under what circumstances, the credentials of the individual or company issuer, as well as the history of the product from production to shelves, including but not limited to details regarding the methods of transportation utilized, temperature conditions, and the date and time data often missing from consumables.
Once again, not only this saves enormous time, effort, and funds, but it also creates an immutable history of products otherwise impossible to track. All that, thanks to smart contracts.
It is nearly impossible to cover all the potential use-cases smart contracts could be applied to, yet here’s a list of some of the most intriguing concepts that have been already leveraged the new computing protocol:
- Arts and Music
- Government Administration
- Space Industry
- Smart Cities
- Public Libraries and Document Administration
- Automobile Industry
- Machine-to-Machine Economies (M2M)
- International Settlements
- Proof Of Authentication, Ownership
In general, smart contracts, being a by-product of distributed ledger technology, is set to change the way we handle transactions both in the physical and digital domains.
Smart contracts enable a faster, cheaper, and more reliable exchange of information and monetary settlements, transparently, in a cross-border fashion, and almost instantly.
Whether you see the change coming or not, government agencies, banks, and enterprises you trust your everyday life with are already exploring and utilizing this technology to upscale societies to their modest form, which is more optimized and autonomous.
Of course, living in the digital realm, smart contracts are often targeted by malicious actors and software, hence the cybersecurity involved in such data administrative protocols must be on the edge of technological advancement as well.
Depending on the scenario and the delicacy of each business model, smart contract security may vary from industry to industry and even from project to project.
We at CertiK strive to secure the cyberworld regardless of the nature of each project that might be entrusting the integrity of its operations on DLTs and smart contracts and our numbers are loud about it.
Over the past years, we’ve audited and secured more than 150 smart contracts, and over 25 whole chains, while our expert engineers performed more than 20 VAPTs for top-shelf industry pioneers including but not limited to Binance, Tera, Kava, e-Money, Fetch.ai, Akropolis, Bancor, Shapeshift, and Blockstack.
To learn more about smart contracts, and find out the most optimal way to secure your next venture, don’t hesitate to connect with one of our engineers and get a free consultation today.