Let’s get to the buttom of this: after ETH rebirth in 2015 smart-contract is the agreement — signable by a human or a programmable entity — enforced by the blockchain. Once signed it is instantly enforced and acted upon for all parties. If you would buy a house via a smart-contract, you get the keys the exact moment dedicated crypto hits the smart-contract address.
Smart-contracts are the agreement settled on-chain. Now, what kind of agreement? Any: authentication, currency swap, login via WalletConnect, fee deduction, voting & the vote calculation, issuance of new crypto, liquidity management, buy or sell orders, API handling. When you mint NFT it happens after a smart-contract takes crypto for recording a token into a chain of blocks.
Smart-Contract is the workhorse of blockchain automation, much like we have servers running Linux all around doing meme storage and distribution. If you want something done in the blockchain without touching it by hand — you make a smart-contract.
Think of it like Youtube — there’s a network of servers to make sure you get that sweep 1080p at high bitrate all around the globe called CDN. Smart-contracts are the same glue to make things happen in blockchain, without them crypto is just digital currency, with them, crypto is the programmable money of the future.
There’s two types of smart-contracts:
Smart-contracts are powerful because they remove middlemen. You don’t need people to run smart-contracts, only to make them. This makes it possible to have «trust» in the «trustless» environment, where everyone is anonymous, like with Uniswap that needs no people to swap crypto for you, only code running in the blockchain.
Smart-contracts can be trusted. Would you make a deal with the anonymous on the web? What are the guarantees they don’t walk away with your money? In blockchain, smart-contracts is how multiple anonymous individuals settle thousands upon thousands of deals without any of them simply walking away. Why? Because they can’t: every point of risk is controlled by smart-contracts, which hold custody over funds if we talk about currency exnchage or secure votes from being fabricated.
Here’s a non-exhaustive list of things that run thanks to smart-contract technology:
Plot twist — if voting and further election of the official is governed by smart-contracts you get the Algocracy, a tamper-proof government system. Its smaller cousin — DAO, or decentralized autonomous organisation — is basically a corporation on-chain. Thanks to the smart-contract code, DAO’s can be run by multiple anonymous parties at once, worldwide, without restrictions.
Everybody can review the smart-contract before signing. Remember the fine print in the hefty official documents? Well, fine print for smart-contracts is written in languages like Solidity, Rust or Michelson, so you have to use tools like Etherscan’s copilot AI to read it. Hint — yes, ChatGPT can actually do a code review of the smart-contract.
Don’t worry, here’s a few headsup:
SetApprovalForAll = Bad Time; This is how you can get drained, if you see «Set Approval For All» in the smart-contract prompt before singing it — stop.
If there’s «Blacklist» anywhere in the code — be very aware; This is how scammers don’t let people sell the honeypot tokens.
Here’s an example from the code of the one honeypot token. See the «isBkacklisted[accounts[i]] = excluded»? What it says is «Don’t let users from the blacklist operate a token» in fine print.
To operate, some smart-contracts might need an Oracle — entity, which provides processed external data. Much like eyes channel visual appeal to the mind, or your skin reports cold or warm. In this context, Oracles consume raw market data, digest it and pass to smart-contracts. Prominent examples — DEX trading protocols, which use Oracle data to define the price of a traded crypto from multiple different sources at once. Say, a DEX takes in data on BTC/USDT price from 1000 of exchange points across the world to adjust the pricing for its own BTC/USDT pair.
Want to get the most out of DeFi? Try NonBank — one NON-ID to pass every KYC out there with a handy Wallet, able to generate multiple accounts at once. Join the public Beta and become one of the first to leverage this new technology to your favour: