- Most common attacks happen in smart contracts
- More complexity more bugs
Blockchain
- Blockchain is a global distributed ledger/database that uses cryptographic functions to verify transactions/data sent through the network.
- Nodes/miners verify these transactions, and they get rewarded with cryptocurrency for the effort.
- Ethereum is a global, decentralized computer that anyone can contribute computation power.
- Web3 DApps use smart contracts as their backend.
Smart Contacts
- Computer programs run on a blockchain network
- As programming languages that create smart contracts, we can consider Solidity, Rust (NEAR, Solana), Python (Algorand), and Go, C++ (EOS).
Let’s Learn Ethereum
Ethereum is an open-source, globally decentralized computing infrastructure that executes programs called smart contracts. It uses a blockchain to synchronize and store the system’s state changes and a cryptocurrency called ‘ether’ to meter and constrain execution resource costs.
Blockchain Components
- A peer-to-peer network connecting participants, blocks of verified transactions
- Message (In the form of transaction, state transitions)
- Consensus rules (To govern what makes a transaction valid)
- A machine that processes transactions according to the rules.
- A chain of cryptographically secured blocks that act as a journal of all verified and accepted state transitions.
- Consensus algorithm that decentralizes control over the blockchain, by forcing participants to cooperate in enforcing the consensus rules.