# How to Transition From Web2 to Web3 Development
You are a competent Web2 developer. You know JavaScript, React, Node, databases. You want to learn Web3, but the ecosystem is overwhelming.
Here is the actual roadmap to becoming a useful Web3 developer.
Mental Model Shift
Web2 and Web3 have fundamentally different constraints:
| Web2 | Web3 |
|------|------|
| Mutable state (databases) | Immutable state (blockchain) |
| Unlimited storage | Storage costs $$ per byte |
| Free execution | Every instruction costs gas |
| Try-catch works | External calls can fail silently |
| Trusted servers | Trustless execution |
The biggest mindset shift: every line of code costs money.
Solidity Fundamentals
Start with Solidity. Rust and other languages come later.
Week 1: Syntax and Basics
- Variables, functions, modifiers
- Storage vs memory vs calldata
- Visibility (public, external, internal, private)
- Payable functions
- Events and logs
Resources:
- Solidity docs: https://docs.soliditylang.org
- CryptoZombies: gamified Solidity tutorial
- Solidity by Example: https://solidity-by-example.org
Week 2: ERC Standards
Read and implement:
- ERC20: fungible tokens
- ERC721: NFTs
- ERC1155: multi-token standard
Do not just copy-paste OpenZeppelin. Write them from scratch, then compare to OpenZeppelin to see what you missed.
Week 3: DeFi Primitives
Read Uniswap v2 code:
contract UniswapV2Pair {
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}
Understand:
- Constant product formula (
x * y = k)
- LP tokens and liquidity provision
- Flash swaps
Then read Compound v2:
contract CToken {
function mint(uint mintAmount) external returns (uint);
function borrow(uint borrowAmount) external returns (uint);
}
Understand:
- Interest rate models
- Collateralization
- Liquidations
Week 4: Security
Read audit reports from:
- Rekt.news: postmortems of hacks
- Code4rena: public audit contests
- Spearbit: detailed reports
Common vulnerabilities:
- Reentrancy
- Access control bugs
- Oracle manipulation
- Integer overflow (pre-Solidity 0.8)
- Frontrunning
Tool Stack
Foundry (not Hardhat)
Foundry is faster, better for testing, and more widely used in 2026.
Install:
curl -L https://foundry.paradigm.xyz | bash
foundryup
Create a project:
forge init my-project
cd my-project
forge test
Write tests in Solidity (not JavaScript):
// test/MyContract.t.sol
import "forge-std/Test.sol";
import "../src/MyContract.sol";
contract MyContractTest is Test {
MyContract c;
function setUp() public {
c = new MyContract();
}
function testBasic() public {
assertEq(c.getValue(), 42);
}
}
Run:
forge test
ethers.js or viem
For frontend and scripts:
import { ethers } from 'ethers';
const provider = new ethers.JsonRpcProvider('https://eth.llamarpc.com');
const balance = await provider.getBalance('0x...');
console.log(ethers.formatEther(balance));
viem is newer and faster:
import { createPublicClient, http } from 'viem';
import { mainnet } from 'viem/chains';
const client = createPublicClient({
chain: mainnet,
transport: http()
});
const balance = await client.getBalance({ address: '0x...' });
Anvil (local testnet)
Foundry includes Anvil, a local Ethereum node:
anvil
This gives you a local chain for testing. No need for Ganache or Hardhat Network.
Learning Sequence
1. Read Uniswap v2
Clone the repo:
git clone https://github.com/Uniswap/v2-core
cd v2-core
Read UniswapV2Pair.sol and UniswapV2Factory.sol. Understand how mint, burn, and swap work.
2. Write an ERC20
Do not use OpenZeppelin yet. Write it yourself:
contract MyToken {
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
function transfer(address to, uint256 amount) external returns (bool) {
balanceOf[msg.sender] -= amount;
balanceOf[to] += amount;
return true;
}
function approve(address spender, uint256 amount) external returns (bool) {
allowance[msg.sender][spender] = amount;
return true;
}
function transferFrom(address from, address to, uint256 amount) external returns (bool) {
allowance[from][msg.sender] -= amount;
balanceOf[from] -= amount;
balanceOf[to] += amount;
return true;
}
}
Then compare to OpenZeppelin ERC20. What did you miss? (Hint: events, overflow checks, return values)
3. Fork Compound
Use Foundry to fork mainnet and interact with Compound:
function testBorrow() public {
vm.createSelectFork("https://eth.llamarpc.com");
address cETH = 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5;
CEther(cETH).mint{value: 1 ether}();
assertGt(CEther(cETH).balanceOf(address(this)), 0);
}
This teaches you how to interact with live contracts.
4. Audit Something
Pick a small protocol on Code4rena or Sherlock. Read the code and try to find bugs. Even if you do not find anything, you will learn how to read code critically.
Portfolio Pieces That Get Interviews
Do not just build CryptoZombies. Build something unique:
- DeFi protocol (AMM, lending, options)
- On-chain game (fully on-chain, not just NFTs)
- Novel primitive (intent-based auctions, account abstraction module, cross-chain bridge)
Make it open-source and deployed to testnet (or mainnet if you are confident).
Common Traps
1. Only Learning CryptoZombies
CryptoZombies is fine for syntax, but it does not teach real Solidity. You need to read production code (Uniswap, Aave, Compound).
2. Ignoring Security
Web2 bugs are annoying. Web3 bugs cost millions. Learn security from day one.
3. Not Reading Audit Reports
The best way to learn is reading postmortems of hacks. Rekt.news has excellent writeups.
Timeline to First Job
Realistic timeline for a competent Web2 dev:
- Month 1: Solidity basics, ERC standards
- Month 2: DeFi protocols (Uniswap, Compound)
- Month 3: Build a project, deploy to testnet
- Month 4: Contribute to open-source, write audit reports
- Month 5: Apply to jobs
If you have a strong Web2 portfolio, 3-6 months is realistic.
Summary
Web3 is not just React + MetaMask. You need to understand:
- Solidity and EVM
- DeFi primitives (AMMs, lending, oracles)
- Security (reentrancy, access control, oracle attacks)
- Tooling (Foundry, ethers/viem, Anvil)
Start by reading Uniswap v2. Write an ERC20 from scratch. Fork Compound. Build something unique. Apply to jobs. You will get there.