What is a smart contract?
A smart contract is a self-executable computer program coded to perform a specific transaction based on a given input. In other words, smart contracts allow for complex transactions between anonymous parties without a middleman.
The idea of a smart contract dates back to 1994 when Nick Szabo, a famous computer scientist, proposed the concept of self-executable digital contracts. Szabo’s ideas were revolutionary, and they’ve already been surpassed by innovation over the last 5–10 years.
What are smart contracts good for?
A smart contract is a computer program for developers and users to execute a function, i.e., “do a thing.” Any interaction or activity on a decentralized application (dApp) falls into this category, including:
- Swapping tokens
- Executing a trade
- Withdrawing funds
- Depositing funds
- Adding liquidity
Smart contracts are essential tools for not only automating certain tasks but also for simply making them possible.
Nice to Know: All smart contracts are written in Solidity, the main programming language Ethereum employs. You can think of Solidity as a crypto version of the Javascript language.
Why would you want to be able to read one?
With smart contracts being so central to the space, being able to read their data is an essential skill for anyone using the ecosystem. Reading a contract can give you insight into the popularity of a project, a detailed transaction history, the contract’s capabilities, and more.
Next week, we will publish a follow-up to this post on avoiding especially detailed scams, but in the meantime, this tweet should get your paranoia amped up.
In short, the tweet’s author had interacted with two scammers over months. The two had done a decent job of making themselves appear trustworthy, but when they gifted the victim two NFTs to stake to earn rewards, the savvy mark first inspected the contract to find that the contract was programmed to drain 100% of the receiving wallet’s funds.
You don’t need to be a coder to understand most of the info – because you have a tool called Etherscan. You can understand their terms and conditions like all contracts by reading them.
What am I looking for when I read a smart contract?
In the below sections, we will walk you through the process of:
- Finding a smart contract
- Reading basic details such as creator address, token name, tokens held in the contract, etc.
- Understanding the statistics of a contract’s tokens and what they convey.
- Searching and understanding the transactions that have happened through a smart contract.
- Finding the source code of a contract for deeper analysis.
First, let’s find the contract details. For this example, we will use the popular pfp project Azuki. First, navigate to the NFT of your choice. For this, we’re going to use the first listed Azuki NFT.
From the…
Read More: rare.makersplace.com