Home
App logo

Learning Flashcards

Connect Wallet

Connect wallet

Master smart contract security concepts with interactive flashcards. Earn 10 tokens per card!

Filter by Category:

Blockchain Basics

What is Ethereum?

Tap to reveal answer & earn tokens
Blockchain Basics

Ethereum is a decentralized blockchain platform that enables developers to build and deploy smart contracts and decentralized applications (dApps). It features a virtual machine (EVM) that executes code in a distributed manner across the network.

Tap to see question
Web3 Concepts

What is the key difference between Web2 and Web3 development?

Tap to reveal answer & earn tokens
Web3 Concepts

Web2 applications rely on centralized servers and databases controlled by companies, while Web3 applications run on decentralized blockchain networks where data and logic are distributed across many nodes, giving users more control and ownership.

Tap to see question
Blockchain Basics

What is gas in Ethereum?

Tap to reveal answer & earn tokens
Blockchain Basics

Gas is the unit that measures the computational effort required to execute operations on Ethereum. Users pay gas fees (in ETH) to compensate miners/validators for processing their transactions. More complex operations require more gas.

Tap to see question
Technical Concepts

What is the Ethereum Virtual Machine (EVM)?

Tap to reveal answer & earn tokens
Technical Concepts

The EVM is a runtime environment for smart contracts on Ethereum. It's a virtual computer that executes bytecode in a deterministic way across all network nodes, ensuring consistent results regardless of where the code runs.

Tap to see question
Networks

What is the difference between a testnet and mainnet?

Tap to reveal answer & earn tokens
Networks

Mainnet is the live Ethereum network where real ETH has value. Testnets (like Sepolia, Goerli) are separate networks that mimic mainnet but use test ETH with no real value, allowing developers to test applications safely and for free.

Tap to see question
Base Network

What is Base blockchain?

Tap to reveal answer & earn tokens
Base Network

Base is a Layer 2 blockchain built on Ethereum using Optimistic Rollup technology. It offers faster transactions and lower fees while maintaining Ethereum's security. It's built by Coinbase to make onchain development more accessible.

Tap to see question
Blockchain Basics

What is a smart contract?

Tap to reveal answer & earn tokens
Blockchain Basics

A smart contract is a self-executing program stored on the blockchain that automatically runs when predetermined conditions are met. It contains code that defines rules and agreements, eliminating the need for intermediaries.

Tap to see question
Web3 Concepts

What is a wallet in the context of blockchain?

Tap to reveal answer & earn tokens
Web3 Concepts

A wallet is a tool that stores your private keys and allows you to interact with blockchains. It can send/receive cryptocurrencies, connect to dApps, and sign transactions. Popular wallets include MetaMask, Coinbase Wallet, and WalletConnect.

Tap to see question
Blockchain Basics

What is a transaction on Ethereum?

Tap to reveal answer & earn tokens
Blockchain Basics

A transaction is a signed message that changes the blockchain state. It can transfer ETH, execute smart contract functions, or deploy new contracts. Transactions are irreversible once confirmed and included in a block.

Tap to see question
Web3 Concepts

What makes blockchain applications decentralized?

Tap to reveal answer & earn tokens
Web3 Concepts

Blockchain applications are decentralized because they run on a network of many independent nodes rather than a single server. No single entity controls the network, data is distributed across nodes, and consensus mechanisms ensure agreement without central authority.

Tap to see question
Blockchain Basics

What is the purpose of private and public keys?

Tap to reveal answer & earn tokens
Blockchain Basics

Public keys serve as your blockchain address where others can send you funds. Private keys prove ownership and are used to sign transactions. You must keep private keys secret - anyone with access can control your funds.

Tap to see question
Technical Concepts

Why do transactions sometimes fail on Ethereum?

Tap to reveal answer & earn tokens
Technical Concepts

Transactions can fail due to: insufficient gas limit, running out of gas during execution, revert conditions in smart contracts, network congestion, or incorrect transaction parameters. Failed transactions still consume gas.

Tap to see question
Solidity Data Types

What data type should you use to store Ethereum addresses in Solidity?

Tap to reveal answer & earn tokens
Solidity Data Types

Use the `address` type to store Ethereum addresses. It's a 20-byte value that can hold account addresses. You can also use `address payable` for addresses that can receive Ether directly.

Tap to see question
Solidity Data Types

What is the difference between `uint` and `uint256` in Solidity?

Tap to reveal answer & earn tokens
Solidity Data Types

`uint` and `uint256` are exactly the same thing. `uint` is an alias for `uint256`, representing an unsigned 256-bit integer. It's the most commonly used integer type in Solidity and can hold values from 0 to 2^256 - 1.

Tap to see question
Solidity Functions

What does the `payable` keyword do in Solidity functions?

Tap to reveal answer & earn tokens
Solidity Functions

The `payable` keyword allows a function to receive Ether. Without `payable`, a function will reject transactions that try to send Ether to it. Use `msg.value` to access the amount of Ether sent to a payable function.

Tap to see question
Solidity Functions

What's the difference between `view` and `pure` functions in Solidity?

Tap to reveal answer & earn tokens
Solidity Functions

`view` functions can read blockchain state but cannot modify it. `pure` functions cannot read or modify state - they only work with their input parameters. Both don't cost gas when called externally, but `pure` is more restrictive than `view`.

Tap to see question
Solidity Data Types

How do you declare a mapping in Solidity?

Tap to reveal answer & earn tokens
Solidity Data Types

Use the syntax `mapping(KeyType => ValueType) public variableName;`. For example: `mapping(address => uint256) public balances;` creates a mapping from addresses to uint256 values. Mappings are like hash tables or dictionaries.

Tap to see question
Solidity Error Handling

What is the purpose of the `require()` statement in Solidity?

Tap to reveal answer & earn tokens
Solidity Error Handling

`require()` validates conditions and reverts the transaction if the condition is false. It's used for input validation, access control, and checking preconditions. Optionally, you can provide an error message: `require(condition, "Error message");`

Tap to see question
Solidity Globals

What does `msg.sender` represent in Solidity?

Tap to reveal answer & earn tokens
Solidity Globals

`msg.sender` is a global variable that contains the address of the account that called the current function. It's commonly used for access control to verify who is executing a function.

Tap to see question
Solidity Contract Structure

How do you define a constructor in Solidity?

Tap to reveal answer & earn tokens
Solidity Contract Structure

Use the `constructor()` keyword followed by function parameters (if any). The constructor runs only once when the contract is deployed: `constructor(uint _initialValue) { owner = msg.sender; value = _initialValue; }`

Tap to see question
Solidity Memory

What's the difference between `memory` and `storage` in Solidity?

Tap to reveal answer & earn tokens
Solidity Memory

`storage` refers to permanent blockchain storage (expensive). `memory` is temporary storage that exists only during function execution (cheaper). Use `memory` for temporary variables and `storage` for state variables that persist between transactions.

Tap to see question
Solidity Events

How do you emit an event in Solidity?

Tap to reveal answer & earn tokens
Solidity Events

First declare the event: `event Transfer(address indexed from, address indexed to, uint256 value);` Then emit it: `emit Transfer(msg.sender, recipient, amount);` Events are logged on the blockchain and can be listened to by frontend applications.

Tap to see question
Solidity Modifiers

What are modifiers in Solidity and how do you use them?

Tap to reveal answer & earn tokens
Solidity Modifiers

Modifiers are reusable code that can modify function behavior. They're often used for access control or validation. Example: `modifier onlyOwner() { require(msg.sender == owner, "Not owner"); _; }` Use with: `function withdraw() public onlyOwner { ... }`

Tap to see question
Solidity Globals

What does `block.timestamp` provide in Solidity?

Tap to reveal answer & earn tokens
Solidity Globals

`block.timestamp` returns the Unix timestamp of the current block. It's useful for time-based logic, but be aware that miners can manipulate it slightly (±15 seconds). For precise timing, consider using block numbers instead.

Tap to see question

Showing 24 of 24 cards