DEV Community


Posted on • Updated on

00 - Smart Contract Security | Blockchain basics

In this series of smart contract security articles, I (@geekshiv) and @Thtsuman will cover Solidity, Smart Contract, etc with the security (Audit) aspect of it. Let's go through some of the basic terms and concepts before jumping to the complex part.

  • Block: Block is kind of container which stores data relevant to the network and transactions. Example: If you send ETH to someone, the transaction data needs to be added to a block for it to be successful.

A block may look like this:
Block Example

  • Block-chain: Whenever a new block is created it refers to it's parent block and this creates a chain of blocks. A block's data cannot be changed without changing all subsequent blocks, which would require the consensus of the entire network.
    Blockchain Example

  • Ethereum: Ethereum is built upon the concept of blockchain which acts as an open-source blockchain network providing features like a decentralized ledger, Smart Contracts, tokens (ERC-20 and ERC-721), and has its cryptocurrency called Ether(ETH).

  • Ether: Ether (ETH) is a cryptocurrency. It facilitates the operations of the ethereum platform.
    Example: Any transaction in the ethereum network needs a fee that is paid in the form of ether.

  • Gas: Gas is a fee that is paid to the miner for the computational effort required to execute specific operations on the Ethereum network.

  • Consensus: When it comes to a decision of a network or large group the majority of people have to agree upon the decision to be successfully executed. This agreement can be referred to as a consensus mechanism. In Blockchain at least 51% of nodes have to agree for successful execution.
    In Ethereum Consensus is achieved using the following Consensus mechanisms:

    1. Proof of Work (PoW)
    2. Proof of Stake (PoS)
  • Smart Contract: A smart contract is a digital contract that is deployed on the Ethereum network. A smart contract is basically an agreement between nodes converted into a piece of code which once agreed upon and deployed on the network cannot be changed.

  • Solidity: Solidity is a programming language that is used to write smart contracts in Ethereum.

  • Web3: Web3, in the context of Ethereum, refers to decentralized apps that run on the blockchain. These are apps that allow anyone to participate without monetising their personal data.

  • DAPP: DAPP (decentralized application) is a combination of smart contracts and a frontend interface. DAPP allows users to interact with services using the ethereum network.

  • DeFi: Defi (Decentralized finance) is a term referred to finance applications or services on a Blockchain network. Its a modern, effective way of decentralized banking that overcome the difficulties faced in the traditional banking system.

  • Accounts: Every entity in the network had an account of its own which is determined by a unique string. The smart contract also has an account that is different from the owner's account. Example account:



Top comments (0)