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...