What is a smart contract?
A smart contract is a program on a blockchain that runs automatically when conditions are met: the foundation of DeFi, NFTs, DEXs and stablecoins.
A smart contract is a program deployed on a blockchain (Ethereum, BNB Chain, Solana…). When someone sends it a transaction, it runs exactly as coded, and nobody can change the outcome midway.
What are they used for?
- DEXs: automatically executing coin swaps (see CEX vs. DEX).
- Lending and earning interest in DeFi.
- Tokens: every ERC-20 and BEP-20 token, including stablecoins like USDT, is a smart contract.
- NFTs, games, governance voting…
Risks
- Code bugs: a buggy contract can be hacked and drained. There have been many incidents with losses in the hundreds of millions of dollars.
- Admin privileges: many tokens let the project owner mint more, freeze trading or pull liquidity, a common sign of scams among DEX tokens.
- Signing the wrong thing: granting permission (approve) to an unknown contract can let it drain your wallet. See how to use MetaMask safely.
This article is for general information only and is not investment advice.