When does learning become mastery? π
When does learning become mastery? One cannot master all of blockchain in four months. Still, one can significantly master one blockchain.
Three reasons learning web3 programming will make you a better web2 developer π
Three reasons learning web3 programming will make you a better web2 developer. Programming smart contracts forces us to think.
Is web3 a fad? 5 reasons blockchain is a real innovation. π
Is web3 a fad? 5 reasons blockchain is a real innovation. Try setting up a new business bank account and sending an overseas wire transfer.
11 Reasons you should sign up for RareSkills bootcamp (as a developer) π
11 Reasons you should sign up for RareSkills bootcamp (as a developer). Don't let the name "Bootcamp" fool you. We are not for beginners.
Learn Solidity: Easy to Learn, Hard to Master? π
Is solidity hard to learn? Learning solidity as a language is arguably one of the easier languages to learn. However, learning the...
The blockchain shortage of developers is not real. π
Itβs hard to read news about developers and not get the impression there is a shortage of talent. Makes sense right? Companies wouldnβt...
The fastest and most efficient way to learn Solana (for Solidity developers) π
The fastest and most efficient way to learn Solana (for Solidity developers) First, Solana uses Rust, which is an unfamiliar language.
Blockchain - Top Web3 Job List π
Blockchain - Top Web3 Job List. All industries have a tier list or implied ranking. Itβs usually unspoken, but itβs a real thing for job
Solidity vs Rust π
A common misconception is that learning blockchain is about learning a new programming language. It isn't. Learning blockchain is far...
9 Biggest Gas Guzzlers in Solidity on Ethereum π
9 Biggest Gas Guzzlers in Solidity on Ethereum. This article lists 9 of the most expensive Ethereum operations.
The Solidity Engineer Salary is a Myth π
Don't study blockchain if you want a high salary. This might sound funny coming from a blockchain bootcamp, but itβs true.
Solana Smart Contract Programming Language π
Solana Smart Contract Language. Rust is a vast language. Our Rust Bootcamp and Solana Bootcamp is designed to focus on Rust first
Generate a random number with Solidity on the blockchain π
Generate a random number with Solidity on the blockchain. Randomness is tricky on the blockchain because the blockchain is deterministic.
You donβt need Solidity to work in web3 π
You donβt need Solidity to work in web3. Here is how you can work in Web3 with no solidity knowledge.
Solidity RSA signatures for aidrops and presales: Beating ECDSA and Merkle Trees in Gas Efficiency π
Solidity RSA signatures for aidrops and presales: Beating ECDSA and Merkle Trees in Gas Efficiency. Airdrops, presale, whitelist, allowlist.
Leetcode problems and questions - the best 50 π
Best 50 Leetcode problems and questions to start. Getting over the psychological barrier of starting. What problems should you begin with
Where to find solidity reentrancy attacks π
Where to find solidity reentrancy attacks. Reentrancy only happens when your smart contract calls another smart contract via a function call
Zero knowledge programming languages π
Zero knowledge programming language proofs demonstrate you executed a computation correctly without revealing the inputs to the computation
Web3 Careers Websites π
Web3 Careers Websites . Trying to find a web3 career in an industry that has hundreds, if not thousands of web3 companies
Smart contract creation cost π
Smart contract creation cost. The cost to deploy a smart contract has six components. It will always cost at least 53,000 gas.
Generate Ethereum Address from Private Key Python π
Generate Ethereum Address from Private Key Python . Ethereum private key from python,the public key algorithm is secp256k1, same as bitcoin
Solidity Gasleft π
Solidity Gasleft. The purpose of this article is to describe the behavior of the solidity gasleft() function and its uses.
Ethereum smart contract creation code π
Ethereum smart contract creation code. This explains what happens at the bytecode level when an Ethereum smart contract is constructed
Foundry forge coverage π
Foundry forge coverage. Visual line coverage report with LCOV. If you run "forge coverage" in a foundry project, you'll get a table as below
Mastering Solidity: Master the Computer Science Fundamentals First π
I hate computer science! Mastering Solidity: Master the Computer Science Fundamentals First.why you should study and practice.
What makes blockchain immutable? π
What makes blockchain immutable? This article is intended to be understandable by non-technical readers, to gain a technical understanding.
ERC4626 Interface Explained π
ERC4626. How it works is you deposit one ERC20 token into the ERC4626 contract, letβs call it token A, and get another ERC20 token back.
Why RareSkills does not have a job guarantee π
Why RareSkills does not have a job guarantee. Because the word βbootcampβ we ocassionally get asked if we have a job guarantee.
EIP-1167: Minimal Proxy Standard with Initialization (Clone pattern) π
EIP-1167: Minimal Proxy Standard with Initialization (Clone pattern). clones delegate all calls to the implementation contract.
ERC20 Snapshot π
ERC20 Snapshot. This provides a mechanism to defend against users transfering tokens and re-using token utility in the same transaction.
ERC20 Votes: ERC5805 and ERC6372 π
ERC20 Votes: ERC5805 and ERC6372. Knowledge of ERC20 Snapshot is assumed, please refer to our article on ERC20 Snapshot for an introduction.
Governance Contract in Solidity π
Governance Contract in Solidity.Before we start explaining the contracts, itβs helpful to know technical terms of the governance contract.
EIP-3448 MetaProxy Standard: Minimal Proxy with support for immutable metadata π
The minimal proxy standard allows us to parameterize the creation of the clone, but this requires an extra initialization transaction. It...
Convert gas to USD (Ethereum) π
Convert gas to USD (Ethereum). Understanding gas cost can be tricky because there are three components at play: ether, and the units of gas
Verify Signature Solidity in Foundry π
Verify Signature Solidity in Foundry. Here is a minimal (copy and paste) example of how to safely create and verify ECDSA signatures
EIP-150 and the 63/64 Rule for Gas π
EIP-150 and the 63/64 Rule for Gas. EIP-150, or Ethereum Improvement Proposal 150, is a protocol upgrade for the Ethereum blockchain
EIP-2930 - Ethereum access list π
EIP-2930 - Ethereum access list. An Ethereum access list transaction enables saving gas on cross-contract calls by declaring in advance.
Solidity Events π
Solidity events. Solidity events are the closest thing to a βprintβ or βconsole.logβ statement in Ethereum. We will explain how they work
Uint256 max value π
The uint256 max value can be obtained with the solidity code type(uint256).max; which is cleaner than writing the literal for 2^256 - 1.
Solidity test internal function π
Solidity test internal function. To test an internal solidity function, create a child contract that inherits from the contract being tested
Openzeppelin Ownable: Use Ownable2Step Instead π
Openzeppelin Ownable: Use Ownable2Step Instead. safer than Ownable for smart contracts because the owner cannot accidentally transfer.
Solidity Staticcall EIP 214 π
Solidity Staticcall EIP 214. Staticcall is like a regular Ethereum call except that it reverts if a state change happens.
Foundry Unit Tests π
Foundry Unit Tests. This article will describe how to create unit tests in Solidity using Foundry. We cover how to test all the transitions
Solidity Signed Integer π
Solidity signed integers enable using negative numbers in a smart contract. This article documents how they are used at the EVM level
Solidity Mutation Testing π
Solidity Mutation Testing. Testing is a method to check the quality of the test suite by intentionally introducing bugs into the code
Ethereum precompiled contracts π
Ethereum precompiles behave like smart contracts built into the Ethereum protocol. The nine precompiles live in addresses 0x01 to 0x09.
A free solidity tutorial for experienced programmers π
A free solidity tutorial for experienced programmers. RareSkills has released a free and comprehensive introduction to Solidity
Wagmi + ReactJS Example: Transfer Crypto and Mint an NFT π
Wagmi + ReactJS Example: Transfer Crypto & Mint an NFT. This tutorial, we'll be learn how to build a Web 3 Dapp (Decentralized Application)
Invariant testing in foundry π
Invariant testing in foundry. In this article, we will discuss invariants and how to perform an invariant test on solidity smart contracts
Smart Contract Security π
Smart Contract Security. A mini course on smart contract security, providing a list of issues that recur in Solidity smart contracts.
Solidity Interview Questions π
Over 140 interview questions for Ethereum Developers All of these questions can be answered in three sentences or less. Easy What is the...
Understanding smart contract metadata π
When solidity generates the bytecode for the smart contract to be deployed, it appends metadata about the compilation at the end of the...
Web3.js Example. Latest version 4.x. Transfer, Mint and Query the Blockchain π
The newest version of web3.js, 4.x, has just been unveiled. In this guide, weβll delve into integrating web3.js into HTML to Transfer,...
ZK-addition-dapp with Noir and Nextjs π
We will demonstrate a step-by-step exploration of a basic zk-dapp designed for verifying additions. This application enables users to...
Getting a smart contract audit: what you need to know π
A smart contract audit is a review by blockchain security experts to ensure that users will not lose funds due to a malfunction or...
How Tornado Cash Works (Line by Line for Devs) π
Introduction to Tornado Cash Tornado cash is a cryptocurrency smart contract mixer that enables users to deposit crypto with one address...
An comprehensive overview of smart contract audit tools π
Smart contract audit tools Smart contract audit tools are used to identify security vulnerabilities in smart contracts. These tools can...
Converting Algebraic Circuits to R1CS (Rank One Constraint System) π
The goal of this article is to explain how to turn a set of polynomial constraints into rank one constraint system (r1cs). The focus of...
Bilinear Pairings in Python, Solidity, and the EVM π
Sometimes also called bilinear mappings, bilinear parings allow us to take three numbers, a, b, and c, where ab = c, encrypt them to...
Why elliptic curve point addition in prime finite fields always lands on integers π
One thing that seems incredibly remarkable about elliptic curve addition (in the context of cryptography), is that when a line is drawn...
Elementary Set Theory and Abstract Algebra for Programmers π
Why another set theory tutorial? The target audience for this piece are the sort of folks who donβt care about abstract math unless they...
Encrypted Polynomial Evaluation π
Encrypted Exponentiation In our article about bilinear pairings, we explained how to do (partially) homomorphic encryption for...
Elementary Group Theory for Programmers π
In our previous tutorial, we introduced set theory and made the journey from sets to defining a group in set-theoretic terms. Now itβs...
Viem React Js Example: Transfer, Mint, and View Blockchain State π
In this tutorial, weβll build a fully functional Dapp with the Viem typescript library + React (Next.js). Weβll cover the necessary steps...
Solidity Coding Standards π
The purpose of this article is not to rehash the official Solidity Style Guide, which you should read. Rather, it is to document the...
Rings and Fields: A programmer's perspective π
This article explains what a ring and a field are in abstract algebra. This builds off of our group theory article, so make sure youβve...
Connect Wagmi to localhost: testing dapps with Hardhat and Anvil π
This brief tutorial demonstrates how you can use Wagmi + React to interact with your local Ethereum node, either through Anvil (Foundry)...
Quadratic Arithmetic Programs π
A Quadratic Arithmetic Program (QAP) is a system of equations where the coefficients are monovariate polynomials and a valid solution...
Building a Zero Knowledge Proof from an R1CS π
Given a circuit encoded as a rank 1 constraint system, it is possible to create a zk-proof of having a witness, albeit not a succinct...
Encrypted Evaluation of a Quadratic Arithmetic Program π
We start with a quadratic arithmetic program which was derived from an Rank 1 Constraint System (R1CS) of the form Ls β Rs = Os where...
Groth16 Explained π
The groth16 algorithm enables a quadratic arithmetic program to be computed by a prover over elliptic curve points derived in a trusted...
Elliptic Curve Point Addition π
This article describes how elliptic curve addition works over real numbers. Cryptography uses elliptic curves over finite fields, but...
The RareSkills Book of Solidity Gas Optimization: 80+ Tips π
Gas optimization in Ethereum is re-writing Solidity code to accomplish the same business logic while consuming fewer gas units in the Ether
Ten beginner project ideas after you learn Solidity π
Now that youβve completed our solidity tutorial, whatβs next? You now have enough knowledge to build any of the following projects....
R1CS to Quadratic Arithmetic Program over a Finite Field in Python π
To make the transformation from R1CS to QAP less abstract, letβs use a real example. Letβs say we are encoding out = xβ΄ - 5yΒ²xΒ² This will...
Elliptic Curves over Finite Field π
What do elliptic curves in finite fields look like? Itβs easy to visualize smooth elliptic curves, but what do elliptic curves over a...
Circom language tutorial with circomlib walkthrough π
This tutorial introduces the Circom language and how to use it, along with common pitfalls. We will also explain a significant portion of...
What are Pedersen Commitments and How They Work π
Pedersen commitments allow us to represent arbitrarily large vectors with a single elliptic curve point, while optionally hiding any...
How arithmetic circuits are used to verify zero knowledge proofs π
Zk circuits form a set of constraints that if satisfied, prove a computation was carried out correctly. Zk circuits are sometimes called...
Breaking Down the Uniswap V2 Swap Function π
Uniswap V2βs swap function is cleverly designed, but many devs find its logic counterintuitive the first time they encounter it. This...
Uniswap V2 Mint and Burn Functions Explained π
The lifecycle of Uniswap V2 is someone mints LP tokens (supplies liquidity, i.e. tokens to the pool) for the first time, then a second...
Checklist for building a Uniswap V2 clone π
Itβs very educational to rebuild Uniswap v2 from scratch using modern Solidity (or Huff if you really want to do it in hard mode). Here...
How the TWAP Oracle in Uniswap v2 Works π
What exactly is βpriceβ in Uniswap? Suppose we have 1 Ether and 2,000 USDC in a pool. This implies that the price of Ether is 2,000 USDC....
UniswapV2Library Code Walkthrough π
UniswapV2Library The Uniswap V2 Library simplifies some interactions with pair contracts and is used heavily by the Router contracts. It...
Flash Loans and how to hack them: a walk through of ERC 3156 π
Flash loans are loans between smart contracts that must be repaid in the same transaction. This article describes the ERC 3156 flash loan...
A comprehensive guide to the ERC721 standard and related security issues π
ERC721 is the most widely used Ethereum standard for nonfungible tokens. It associates a unique number with an Ethereum address, thereby...
Top Smart Contract Audit Firms with Interesting Value Propositions π
This list is not to say βwhich auditing firm is better than othersβ but rather a compilation of firms with unusual and clever value...
Uniswap v2 router code walkthrough π
The Router contracts provide a user-facing smart contract for safely minting and burning LP tokens (adding and removing liquidity) safely...
How Uniswap V2 computes the mintFee π
Uniswap V2 was designed to collect 1/6th of the swap fees to the protocol. Since a swap fee is 0.3%, 1/6th of that is 0.05%, so 0.05% of...
Uniswap V2 Architecture: An Introduction to Automated Market Makers π
Uniswap is a DeFi app that enables traders to swap one token for another in a trustless manner. It was one of the early automated market...
The staking algorithm of Sushiswap MasterChef and Synthetix π
The MasterChef and Synthetix staking algorithms distribute a fixed reward pool among stakers according to their time-weighted...
The second preimage attack for Merkle Trees in Solidity π
The second preimage attack in Merkle trees can happen when an intermediate node in a merkle tree is presented as a leaf. The name of this...
The interest rate model of AAVE V3 and Compound V2 π
Interest rates in TradFi (traditional finance) are largely determined by central banks and influenced by market factors. In contrast,...
EIP 1967 Storage Slots for Proxies π
EIP 1967 is a standard for where to store information that proxy contracts need to execute. Both the UUPS (Universal Upgradeable Proxy...
The Fallback Extension Pattern π
The fallback-extension pattern is a simple way to circumvent the 24kb smart contract size limit. Suppose we have functions foo() and...
DeFi Lending: Liquidations and Collateral π
In TradFi, when someone defaults on a loan, the creditor has the right to seize assets or garnish wages. In DeFi, when someone defaults...
The Architecture of the Compound V3 Smart Contract π
Introduction and prerequisites Compound is one of the most significant lending protocols in DeFi, having inspired the design of nearly...
Compound V3 Interest Per Second π
The Compound V3 protocol measures interest on the scale of seconds. The Compound V3 frontend scales the number up to years for human...
DeFi Interest Rate Indexes: Principal value and Present Value in Compound V3 π
The intuitive way to track lender deposits is to record the amount of USDC they deposited and the time they deposited. Compound V3 does...
cUSDC V3 (Compound V3) as a non-standard Rebasing Token, CometExt.sol π
The Compound V3 contract behaves like a rebasing ERC 20 token. A rebasing token is a token which has an algorithmically adjusted supply...
Understanding Collateral, Liquidations, and Reserves in Compound V3 π
In this chapter we will examine the following topics about Compound V3: collateral valuation absorbing insufficiently collateralized...
Bulkers in Compound V3 π
The bulker contracts in Compound V3 are multicall-like contracts for batching several transactions. For example, if we wanted to supply...
How Compound V3 Allocates COMP Rewards π
Compound issues rewards in COMP tokens to lenders and borrowers in proportion to their share of the a marketβs lending and borrowing. The...
How Chainlink Price Feeds Work π
Chainlink price oracles are smart contracts with public view functions that return the price of a particular asset denominated in USD....
Layer 2 Calldata Gas Optimization π
When developing applications on an L2, the majority of gas costs come from calldata. Therefore, gas optimization for L2 emphasizes...
Solana Hello World (Installation and Troubleshooting) π
This is a Solana hello world tutorial. We will walk you through the steps to install Solana and troubleshoot issues that may arise. If...
Arithmetic and Basic Types in Solana and Rust π
Today we will learn how to create a Solana program that accomplishes the same things as the Solidity contract below. We will also learn...
Solana Anchor Program IDL π
The IDL (Interface Definition Language) is a JSON file that describes how to interact with a Solana program. It is automatically...
Require, Revert, and Custom Errors in Solana π
In Ethereum, we often see a require statement restricting the values a function argument can have. Consider the following example:...
Solana programs are upgradeable and do not have constructors π
In this tutorial we will peek behind the scenes of anchor to see how a Solana program gets deployed. Letβs look at the test file anchor...
Basic Rust for Solidity Developers π
This tutorial goes over the most commonly used syntax in Solidity and demonstrates the equivalent in Rust. If you want a high level...
The unusual syntax of Rust π
Readers coming from a Solidity or Javascript background may find Rustβs usage and syntax of &, mut, <_>, unwrap(), and ? to be weird (or...
Rust function-like procedural Macros π
This tutorial explains the distinction between functions and function like macros. For example, why does msg! have an exclamation point...
Rust Structs and Attribute-like and Custom Derive Macros π
Attribute-like and custom derive macros in Rust are used to take a block of Rust code and modify it in some way at compile time, often to...
Visibility and "inheritance" in Rust and Solana π
Today we will be learning how Solidityβs function visibility and contract inheritance can be conceptualized in Solana. There are four...
The Solana clock and other "block" variables π
Today we will cover the analogs of all the block variables from Solidity. Not all of them have 1-1 analogs. In Solidity, we have the...
Solana Sysvars Explained π
In Solana, sysvars are read-only system accounts that give Solana programs access to the blockchain state as well as network information....
Solana logs, βevents,β and transaction history π
Solana programs can emit events similar to how Ethereum emits events, though there are some differences we will discuss. Specifically,...
Tx.origin, msg.sender, and onlyOwner in Solana: identifying the caller π
In Solidity, the msg.sender is a global variable that represents the address that called or initiated a function call on a smart...
Introduction to Solana Compute Units and Transaction Fees π
In Ethereum, the price of a transaction is computed as gasUsed Γ gasPrice. This tells us how much Ether will be spent to include the...
Initializing Accounts in Solana and Anchor π
Up until this point, none of our tutorials have used βstorage variablesβ or stored anything permanent. In Solidity and Ethereum, a more...
Zero Knowledge Addition π
These code snippets are used for a talk at ETH Denver Zero knowledge addition example (not secure): from py_ecc.bn128 import G1,...
Solana counter tutorial: reading and writing data to accounts π
In our previous tutorial, we discussed how to initialize an account so that we could persist data in storage. This tutorial shows how to...
Read account data with Solana web3 js and Anchor π
This tutorial shows how to read account data directly from the Solana web3 Javascript client so that a web app could read it on the...
Creating βmappingsβ and βnested mappingβ in Solana π
In the previous tutorials, the seeds=[] parameter was always empty. If we put data into it, it behaves like a key or keys in a Solidity...
Cost of storage, maximum storage size, and account resizing in Solana π
When allocating storage space, the payer must pay a certain number of SOL per byte allocated. Solana calls this the βrentβ. This name is...
Reading an account balance in Anchor: address(account).balance in Solana π
Reading an account balance in Anchor Rust To read the Solana balance of an address inside a Solana program, use the following code:...
Function modifiers (view, pure, payable) and fallback functions in Solana: why they don't exist π
Solana does not have fallback or receive functions A Solana transaction must specify in advance the accounts it will modify or read as...