/web3-interview-preparation

A complete web3 guide that prepares you for interviews and will help you land your dream job.

Primary LanguageMarkdownCreative Commons Attribution 4.0 InternationalCC-BY-4.0

Web3 Interview Preparation Guide (with Answers)

Licence Tweet Fork

Finding a Web3 job that does not support remote work has become very rare. New challenges arose when companies switched to remote-first. Processes changed and there are new soft skills employers are looking for. This guide will prepare Web2 Devs switching to Web3, (bootcamp) graduates and self-thoughts for their interviews.

Although I spent a lot of time curating the answers I can not guarantee for their correctness. If you find an error, please propose a solution by using these step-by-step instructions

Who Is This For

  • Job Seeker: Did you just land a Web3 interview? This repo will help you prepare
  • Recruiter: Are you a recruiter? Get inspired by our interview questions
  • Curious People: You just want to test your blockchain knowledge? Use this repo as a quiz

Why Should You Prepare

Most people put more effort into building a great professional resume and they don't put enough effort to get ready for an interview. Being prepared will increase your chances to land your dream job by 176% (I just made that number up). Here are some benefits of being prepared:

  • increased confidence
  • higher response quality
  • avoid confusion, shyness, and panic
  • get a better offer
  • ask better and relevant questions at the end

The Best Way To Learn

Add Custom Answers

  1. Fork this repository
  2. Clone your fork to your local environment
  3. Create a feature branch git checkout -b custom-answers
  4. Add custom answers for the behavioral interview and commit your changes git commit -m 'add description here'
  5. Push your changes to your own repo with git push -u origin custom-answers

If you want you can also add additional questions and answers for the other sections. If you think others could profit from your answers consider opening a pull request to the main repo.

Use The Right Tools (3 variants)

  • Make flashcards (recommended!)
  • Open your GitHub fork in the browser
  • Use a markdown preview plugin in the code editor of your choice

Process

  1. Read question
  2. Answer the question out loud
  3. Reveal the answer and check it
  4. Rate how good your answer was (optional -> only applicable with flashcards)

Get Invited For An Interview

There are a lot of great resources on how to get invited for an interview. Here is my Web3 approach (worked every time so far):

  1. Find the GitHub account of the organization you are applying for
  2. Submit an issue or pull request that adds value
  3. Get in contact with employees on the company's discord channel
    1. Ask them about their experience working for the company
    2. Mention your contribution and interest for the open position XYZ
    3. Politely ask them to forward your resume to the person in charge

Before The Interview

  • Do several mock interviews with a friend (remote)
  • Clean up the projects you mentioned in your resume (employers will probably look at it, so add comments and a readme)
  • Join a DAO (shows that you are sociable person and interested in the space)

At The Interview

  • Use a quiet space that has a clean background and a good internet connection
  • Make sure your webcam is on you eye level (place the laptop on a stack of books)
  • Use a headset
  • Be on time

Behavioral Interview Questions

Fork this repository and add your own answers. This makes practising easier!

Interview Questions About You

Tell me about yourself Similar question: Describe yourself
Discuss your resume
What should we know about you that's not listed on your resume?
Tell me something interesting about yourself
What are your greatest strengths?
What is your favorite Web3 project at the moment? Why?
What is your greatest weakness?
What are your professional goals? Similar question: Where do you see yourself in five years?
Tell me about an accomplishment you are most proud of
What was your biggest failure?
Tell me about a time you made a mistake
What is your dream job?
What motivates you? Similar question: What gets you up in the morning?
What are you most passionate about?
What are your career goals? Similar question: Where do you see yourself in five years?
Are you a leader or a follower?
What was the last book you’ve read for fun?
What are your hobbies? Similar question: What is something you like to do outside of work?
What makes you uncomfortable?
What do you like the most and least about working in this industry?
Do you prefer to work on your own or as part of a team?
Who’s your mentor?
How do you handle pressure?
How do you organize multiple deadlines?

Previous Experience Interview Questions

Discuss your educational background
Tell me how you handled a difficult situation
Why are you leaving your current role?
Why are you looking for a new job?
Why was there a gap in your employment between [insert date] and [insert date]?
Give a time when you went above and beyond the requirements for a project
What were your bosses’ strengths/weaknesses?
What are three things your former manager would like you to improve on? Similar question: What are your co-worker pet peeves?
What five words would your colleagues use to describe you? Similar question: What would your direct reports say about you?
What are some of your leadership experiences?
What is your leadership style?
What did you learn at [job x / project y]?
What did you most enjoy at [job x / project y]?
What would you have done better at [job x / project y]?
Tell me about a time when you disagreed with your boss

Interview Questions About The New Role

Why this company?
Why do you want this job?
Why should we hire you?
What can you offer us that someone else can not? Similar question: Which of your skills or experiences would be assets in the role and why?
How did you hear about this position?
What would you look to accomplish in the first 30 days/60 days/90 days on the job?
Are you willing to relocate?
Are you willing to travel?
Would you work holidays/weekends?
Would you work 40+ hours a week?
What are your salary requirements?
What’s your availability?
What is the name of our CEO?
Who are our competitors?

Interview Questions To Ask The Employer

What questions do you have for me?
  • Do you pay salaries also in crypto?
  • How often does the team meet on site?
  • How many meetings do you have per week? How does an average day look like?
  • How is the work/life balance?
  • What does your dev cycle look like? Do you do waterfall/sprints/agile?
  • Are rushes to deadlines common? Or is there flexibility?
  • How are decisions made in your team?

Technical Interview Questions

Previous Experience Interview Questions

Employers like to ask questions related to your application. So go over your resume and think about 5 to 10 followup questions a potential employer could ask. Being prepared for such a question shows that you know what you were doing. Be ready to answer a bit more technical questions related to your recent experiences. Some examples:

Why did you choose to use [technology x] in your project? What were the advantages over similar packages?
What would you do differently in [project x] if you had the knowledge you have now?
What was the hardest bug you faced at [job x / project y]?
What was the biggest challenge you faced at [job x / project y]? Similar question: What's a tough problem you've solved? Tipp: Focus on how the challenge was solved, not the challenge itself

Web3 Interview Questions (& Answers)

Basics

What is Web1?
  • Web1 was the first phase of the internet. Most participants were consumers of content. It was all about serving static content instead of dynamic HTML
What is Web2?
  • Web2 is the interactive and social web
What is Web3?
  • Web3 is the decentralized internet. It provides native built-in payments while still being self-governing
What is consensus?
  • Consensus is the agreement on what (usually transactions) has happened and what has not
What is decentralization?
  • Decentralisation is the opposite of centralisation and means that something like power, control or trust is not focused on just a few people, but is distributed among many or even all of them.
What is a decentralized ledger?
  • It as a database that gets saved from a group of people and is updated in regular blocks of time
What is a DAO?
  • DAO is an acronym for Decentralized Autonomous Organization
  • It is an organization that’s governed by code instead of leaders
  • A DAO in its simplest form can be described as a group chat with a shared bank account
What is the difference between a NFT and a fungible token?
  • NFTs are unique digital asset like artworks and collectibles. Non fungible tokens are not interchangeable
  • Fungible tokens like ether or Bitcoin on the other hand are divisible and replaceable
What is the difference between a coin an a token?
  • Sometimes people use the term "coin" and "token" interchangeably. However, there are very big differences between crypto coins and crypto tokens
  • A digital coin is an asset that is native to its own blockchain. (BTC, ETH, ...)
  • Tokens are created on existing blockchains (all ERC-20 tokens, ...)
What is the difference between layer 1 and layer 2 networks?
  • A layer 1 network describes the underlying "main" blockchain that is the ultimate source of truth and is responsible for the settlement of transactions
  • Layer 2 networks extend the functionality of their layer 1 counterpart. For example they increase the transaction speed or lower transaction costs. A layer 2 solution is not a blockchain! (e.g Arbitrum for Ethereum)
  • Hint: Layer 1 solutions without scaling limitations usually don't need scaling solutions
What is a side chain?
  • A side chain is essentially just a blockchain that is linked to another main blockchain. (e.g Liquid Network for Bitcoin, Polygon for Ethereum)
What is DeFi?
  • DeFi is an acronym for decentralized finance
  • It is an umbrella term for peer-to-peer financial services
  • Typical services include earning interest, borrowing and lending crypto
What is a crypto wallet?
  • Crypto wallets store your private key and let you send and receive cryptocurrencies using a beautiful UI
  • Crypto wallets technically don’t store your crypto! If you lose your private keys, you lose access to your money and not the money itself
Bring the terms "decentralization", "bitcoin", "crypto currency", "consensus" and "blockchain" in an order. (broad to specific)
  • Consensus -> decentralization -> blockchain -> crypto currency -> bitcoin
What are dApps?
  • Decentralized applications (dApps) are digital applications that have their backend code (smart contracts) running on a decentralized network and not a centralized server

Blockchain And Blockchain Alternatives

What is a blockchain?
  • A blockchain is a digital file consisting of records. The number of records is growing in regular blocks of time. All records are linked together using cryptography
  • For a blockchain to be decentralised it has to be distributed to a group of people
Why are blockchains resistant to modification of their data?
  • Because once recorded, the data in any given block cannot be altered retroactively without altering all subsequent blocks
Tell me the three factors of the blockchain trilemma?
  • security, decentralization, and scalability -> you can only choose two!
What problem does a blockchain solve?
  • How can I save a digital information in a immutable way without a centralised authority
Explain a blockchain alternative
  • Transactions in a Directed Acyclic Graph (DAG) are linked to one and another directly instead of being grouped and processed in blocks. This makes DAGs more scalable than blockchains in theory
Can you “hide” a transaction on a blockchain?
  • Transaction can't be hidden. All transactions are public
Where are transactions stored in a blockchain?
  • In a blockchain, a transaction is stored in a "block"
  • This blocks are saved on nodes that are part of the network
What is a miner?
  • Miners are nodes, who receive rewards for verifying transactions and marinating network integrity
What is a hard fork?
  • Hard forks are protocol changes which aren't compatible with the older version of the cryptocurrency. The chain splits into two and the participants can choose to operate in any version
  • Immediately after a blockchain forks, the two resulting chains share the exact same transaction history
What is a soft fork?
  • In contrast to a hard fork, soft forks are backward compatible. They don’t have a significant impact on the change of protocol and participants can operate within the network without upgrading their software
How does Proof of Work work?
  • The central principle behind PoW consensus is to solve a complex mathematical problem. The first miner to find the right solution, advertise it to the whole network, and receive a reward in cryptocurrency provided by the protocol
  • The disadvantage is that it requires a lot of computational power
How does Proof of Stake work?
  • It is a cryptocurrency consensus mechanism
  • Proof of Stake tries to deal with the main drawback of PoW
  • The central principle behind PoS consensus is that cryptocurrency owners can stake their crypto. From this so called "validators" one then is selected randomly to "mint" a new block. The more coins a person stakes, the higher is the chance to be selected
What is a proof of work nonce?
  • A nonce plays a crucial part in the mining process with PoW. The nonce is the missing piece of the puzzle needed to discover the next block
What does "nonce" mean?
  • "nonce" stands for "Number User Only Once"

Cryptography

What is a hash collision?
  • A hash collision occurs, if two different inputs lead to the same hash
What is symmetric key encryption?
  • Symmetric key encryption is also called private key cryptography and uses the same key to encrypt and decrypt messages
What is asymmetric key encryption?
  • Symmetric key encryption is also called public key cryptography and uses two separate keys to encrypt and decrypt messages
  • First a private key is randomly generated. With the use of a mathematical formula the public key can be created from the private key. The public key can be shared with everyone, whereas the private key must be kept secret
  • Data is encrypted using any one of the keys and decrypted with the other. Unlike with symmetric encryption only the encrypted data (but not the key itself) has to be transferred, making it more secure against man-in-the-middle attacks
What is a merkle tree?
  • A merkle tree is a data structure used to efficiently summarize and validate large data sets
  • A merkle tree consists of the merkle root, which is the root hash. The merkle root is then put into the block header of a block
  • In a merkle tree, the the transaction hashes are considered the leaves. Each non-leaf node (branch) is a hash of its child hashes
Why are merkle trees so important in BTC?
  • If Bitcoin didn’t have merkle trees, every node on the network would need to maintain a full copy of every transaction that has ever happened in Bitcoin
Explain the term "zero knowledge proof"
  • It is a cryptographic method that allows one party to prove the knowledge of certain information to the other party without revealing the data in question

Attacks

What is a 51% attack?
  • If a hacker is able to control 51% or more of the nodes, he will gain control over the entire network
What is a reentrancy attack?
  • A reentrancy attack occurs when a function makes an external call to an untrusted contract. The untrusted contract then makes a recursive call back to the original function in an attempt to drain funds
Name two ways reentrancy attacks can be prevented
  • Implementing the checks-effects-interactions pattern (update the state before making external calls)
  • Using a reentrancy guard (e.g modifier by OpenZeppelin)
What is a replay attack?
  • A replay attack is taking a transaction on one blockchain, and maliciously or fraudulently repeating it on another blockchain. Two post-fork blockchains are vulnerable for this type of attack
  • For a replay attack to work the two chains need to share a common history
How can a blockchain prevent replay attacks?
  • To prevent replay attacks, the developers on one of the two post-fork blockchains can make a slight change to transaction rules
  • Ethereum prevents same-chain replay attacks by having a transaction counter in each account. This nonce also prevents double spending

Ethereum

What is Ethereum?
  • Ethereum is a decentralized, open-source blockchain with smart contract functionality
What is Ether?
  • Ether is Ethereum’s native cryptocurrency
  • It provides the nodes an incentive to validate the Ethereum blockchain blocks
List some Ethereum development and testing environments
  • Truffle
  • Hardhat
  • Brownie
How large is the block size of Ethereum?
  • Ethereum does not have a block size limit; blocks use gas limits
How big is the block reward of Ethereum?
  • Currently it is 2 ETH. But this number could change in the future
What is the block time of Ethereum?
  • The average block time is around 13.2 seconds. But this value can fluctuate. Get the current value from here
What is the smallest unit of Ether?
  • 1 Wei (10 ** 18 Wei = 1 Ether)
Bring the denominations in the right order: Gwei, Mwei, Kwei, Ether, Wei, microether, milliether
  • Wei, Kwei, Mwei, Gwei, microether, milliether, Ether
Who founded Ethereum?
  • Ethereum was founded by Vitalik Buterin, along with seven other co-founders. One of them is Gavin Wood
When did Ethereum launch?
  • 2015
How does Ethereum differ from Bitcoin?
  • Ethereum utilizes blockchain technology not only for maintaining a decentralized payment network but also for storing computer code that can be used to power tamper-proof decentralized smart contracts
What are smart contracts?
  • A smart contract is a program that runs at an address on Ethereum. They're made up of data and functions that can execute upon receiving a transaction.
What is the EVM?
  • EVM is an acronym for Ethereum Virtual Machine
  • EVM acts like a global computer that lends its accumulated computing power to developers
  • The EVM can be accessed from anywhere in the world through participating Ethereum nodes
What is Enterprise Ethereum?
  • Enterprise Ethereum is a permissioned version of Ethereum. Permissioned means, that only authorized nodes can join. The Ethereum Mainnet is not permissioned, because anybody can set up a node. In addition these private chains can be setup, that the access to its data is restricted
What is a node in Ethereum?
  • A node is a computer connected to the Ethereum network, which is responsible for processing transactions
How can you connect with a node?
  • You can connect to a node by WS-RPC, JSON-RPC, and IPC-RPC
Which consensus mechanism does Ethereum use?
  • Ethereum currently uses proof of Work but plans to use proof of stake in Ethereum 2.0
Which programming language is used to write smart contracts in Ethereum?
  • Solidity is the primary programming language used for writing smart contracts and dApps. Vyper is also used
List common smart contract standards
  • ERC-20: Token Standard
  • ERC-165: A standard to publish and detect what interfaces a smart contract implements.
  • ERC-721: Non-fungible token standard
  • ERC-1155: Multi-token standard
What is integer underflow/overflow?
  • Integer overflows and underflows occur due to the input, whose size does not meet the boundaries of integer variables
  • Hint: To avoid this, simply make sure you’re using a Solidity compiler version > 0.8, which automatically checks for overflows and underflows
What is a frontrunning?
  • Transactions take some time before they are mined. An attacker can watch the transaction pool and send a transaction, have it included in a block before the original transaction. This mechanism can be abused to re-order transactions to the attacker's advantage
What is the account nonce in Ethereum?
  • It's the transaction count of an account
  • It prevents replay attacks
How can you obtain ether?
  • Ether can be obtained by mining or by trading Ether with other cryptocurrencies
What are the two types of Ethereum networks that exist?
  • Public networks (Mainnet, test networks: Ropsten, Goerli, Kovan, Rinkeby)
  • Private networks (Enterprise Ethereum, local networks)
Why are gas fees taken?
  • The creation of consensus in a decentralised system must cost something, because it motivates all participants to save the optimal reality
How much gas does a simple Ethereum transaction cost?
  • A simple transfer of value requires 21'000 gas
How many transactions fit into an Ethereum block?
  • There is no general answer for this, because transactions utilize different amounts of gas and a block has a variable size (depending on network demand)
How are the transaction fees calculated in Ethereum after the London upgrade?
  • Gas units (limit) * (base fee (in Gwei) + priority fee (tip))
  • Info: Miners receive the tip and the base fee is burned
  • Read the docs to find out more about gas
What is an ABI?
  • ABI is an acronym for Application Binary Interface
  • The ABI is the interface to interact with our smart contract
  • The ABI can be generated from your smart contract source code (you have to compile it)
What do I need to interact with a deployed smart contract?
  • You need the contract address and the ABI
  • The contract address points to the place where the bytecode is located on the blockchain
  • The ABI defines which functions you can invoke
How are smart contracts stored into the blockchain?
  • They are stored as bytecode (=binary data) under a specific address also known as contract address
Solidity
Why should a developer define a solidity version at the beginning of a file?
  • It reduces incompatibility glitches that can occur while compiling with another version
Why is is hard to generate random numbers in a smart contract?
  • Solidity contracts are deterministic. Anyone who figures out how your contract produces randomness can anticipate its results and use this information to exploit your application
How can random numbers be generated in a smart contract?
  • To make random numbers unpredictable you must use an oracle to produce randomness off-chain. A popular way is to use ChainLink VRF
Why do smart contracts written in Solidity or Viper need to be compiled?
  • The EVM doesn't understand these high-level languages. Therefor the source code has to be translated into machine language (bytecode) that the EVM is able to execute
Explain the naming conventions for contracts and functions in Solidity
  • Contract names should be capitalised (e.g TestContract)
  • Function names should be mixed-case (e.g superDuperFunction)
  • Learn more about the style guide here
Do all functions in a smart contract costs gas?
  • Functions that modify the state of EVM costs gas, whereas functions that only read the state are free
List all valid data types of Solidity
  • Boolean, Integer, Address, Byte/String, Enum
  • The data type "Fixed Point Numbers" also exists, but isn't fully supported yet
What is the result of 7/2 in Solidity?
  • It is 3 because the decimal gets truncated
What data types are not valid keys in a mapping?
  • The key can be any built-in data type but reference types are not allowed. Not allowed are: Mapping, Struct, Enum or dynamically sized Array.
What is the advantage of a defining a fallback function in Solidity?
  • It helps us to protect the function from throwing an error
In which two scenarios a fallback function (defined as payable) gets called in Solidity?
  • A contract receives only ether and no data (msg.data)
  • No function name matches the called function
What is special about the fallback function in Solidity?
  • It has no name, arguments or identifier
  • It can not return anything
  • It can only be defined once per contract
  • It is mandatory to mark it external
  • It is limited to 2300 gas when called by another function
What is the difference between ERC & EIP?
  • Ethereum Request for comments (ERC) define standards for the usage of Ethereum
  • Ethereum Improvement Proposals (EIP) improve the Ethereum protocol itself

Interview Coding Problems (& Solutions)

Compare two strings in Solidity
  • Hint: You can’t directly compare two strings, but one method would be to hash both strings & compare the hashes.
  • Directly try out the solution in Remix here

🏗 More coming soon!

How To Contribute

  • Is there a question you would like to add because other people could benefit from it? We would love to see it
  • Do you think a question is unnecessary? Remove it and add a justification
  • There is a typo or an incorrect answer? Your correction is welcome
  • There is a question you would like to highlight, because it seems to pop up on many interviews?

For small updates directly make a pull request, for bigger ones consider opening an issue first.

  1. Fork this repository
  2. Clone your fork to your local environment with git clone https://github.com/YOUR_USER_NAME/web3-interview-preparation
  3. Create a feature branch git checkout -b your-branch-name
  4. Commit your changes git commit -m 'add description here'
  5. Add your improvements and push them to your remote branch git push -u origin your-branch-name
  6. Create a new pull request on the main repo

Spread The Knowledge

If you found this resource helpful, give it a ⭐️ and share it with your job-seeking frens or your twitter community.