Rareskills Blog Posts Index
π
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 developerThree 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 ListBlockchain - 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 RustA 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 Ethereum9 Biggest Gas Guzzlers in Solidity on Ethereum. This article lists 9 of the most expensive Ethereum operations.
π
The Solidity Engineer Salary is a MythDon'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 LanguageSolana 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 blockchainGenerate 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 web3You 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 EfficiencySolidity RSA signatures for aidrops and presales: Beating ECDSA and Merkle Trees in Gas Efficiency. Airdrops, presale, whitelist, allowlist.
π
Leetcode problems and questions - the best 50Best 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 attacksWhere to find solidity reentrancy attacks. Reentrancy only happens when your smart contract calls another smart contract via a function call
π
Zero knowledge programming languagesZero knowledge programming language proofs demonstrate you executed a computation correctly without revealing the inputs to the computation
π
Web3 Careers WebsitesWeb3 Careers Websites . Trying to find a web3 career in an industry that has hundreds, if not thousands of web3 companies
π
Smart contract creation costSmart 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 PythonGenerate Ethereum Address from Private Key Python . Ethereum private key from python,the public key algorithm is secp256k1, same as bitcoin
π
Solidity GasleftSolidity Gasleft. The purpose of this article is to describe the behavior of the solidity gasleft() function and its uses.
π
Ethereum smart contract creation codeEthereum smart contract creation code. This explains what happens at the bytecode level when an Ethereum smart contract is constructed
π
Foundry forge coverageFoundry 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 FirstI 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 ExplainedERC4626. 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 guaranteeWhy 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 SnapshotERC20 Snapshot. This provides a mechanism to defend against users transfering tokens and re-using token utility in the same transaction.
π
ERC20 Votes: ERC5805 and ERC6372ERC20 Votes: ERC5805 and ERC6372. Knowledge of ERC20 Snapshot is assumed, please refer to our article on ERC20 Snapshot for an introduction.
π
Governance Contract in SolidityGovernance 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 metadataThe 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 FoundryVerify 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 GasEIP-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 listEIP-2930 - Ethereum access list. An Ethereum access list transaction enables saving gas on cross-contract calls by declaring in advance.
π
Solidity EventsSolidity events. Solidity events are the closest thing to a βprintβ or βconsole.logβ statement in Ethereum. We will explain how they work
π
Uint256 max valueThe 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 functionSolidity test internal function. To test an internal solidity function, create a child contract that inherits from the contract being tested
π
Openzeppelin Ownable: Use Ownable2Step InsteadOpenzeppelin Ownable: Use Ownable2Step Instead. safer than Ownable for smart contracts because the owner cannot accidentally transfer.
π
Solidity Staticcall EIP 214Solidity Staticcall EIP 214. Staticcall is like a regular Ethereum call except that it reverts if a state change happens.
π
Foundry Unit TestsFoundry 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 IntegerSolidity signed integers enable using negative numbers in a smart contract. This article documents how they are used at the EVM level
π
Solidity Mutation TestingSolidity Mutation Testing. Testing is a method to check the quality of the test suite by intentionally introducing bugs into the code
π
Ethereum precompiled contractsEthereum 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 programmersA free solidity tutorial for experienced programmers. RareSkills has released a free and comprehensive introduction to Solidity
π
Wagmi + ReactJS Example: Transfer Crypto and Mint an NFTWagmi + 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 foundryInvariant testing in foundry. In this article, we will discuss invariants and how to perform an invariant test on solidity smart contracts
π
Smart Contract SecuritySmart Contract Security. A mini course on smart contract security, providing a list of issues that recur in Solidity smart contracts.
π
Solidity Interview QuestionsOver 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 metadataWhen 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 BlockchainThe 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 NextjsWe 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 knowA 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 toolsSmart 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 EVMSometimes 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 integersOne 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 ProgrammersWhy 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 EvaluationEncrypted Exponentiation In our article about bilinear pairings, we explained how to do (partially) homomorphic encryption for...
π
Elementary Group Theory for ProgrammersIn 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 StateIn 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 StandardsThe 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 perspectiveThis artice 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 AnvilThis brief tutorial demonstrates how you can use Wagmi + React to interact with your local Ethereum node, either through Anvil (Foundry)...
π
Quadratic Arithmetic ProgramsA 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 R1CSGiven 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 ProgramWe start with a quadratic arithmetic program which was derived from an Rank 1 Constraint System (R1CS) of the form Ls β Rs = Os where...
π
Groth16 ExplainedThe groth16 algorithm enables a quadratic arithmetic program to be computed by a prover over elliptic curve points derived in a trusted...
π
Elliptic Curve Point AdditionThis article describes how elliptic curve addition works or over real numbers. Cryptography uses elliptic curves over finite fields, but...
π
The RareSkills Book of Solidity Gas Optimization: 80+ TipsGas 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 SolidityNow 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 PythonTo 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 FieldWhat 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 walkthroughThis 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 WorkPedersen 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 proofsZk 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 FunctionUniswap 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 ExplainedThe 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 cloneItβ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 WorksWhat 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 WalkthroughUniswapV2Library 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 3156Flash 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 issuesERC721 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 PropositionsThis 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 walkthroughThe 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 mintFeeUniswap 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 MakersUniswap 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 SynthetixThe 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 SolidityThe 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 V2Interest rates in TradFi (traditional finance) are largely determined by central banks and influenced by market factors. In contrast,...
π
EIP 1967 Storage Slots for ProxiesEIP 1967 is a standard for where to store information that proxy contracts need to execute. Both the UUPS (Universal Upgradeable Proxy...
π
The Fallback Extension PatternThe 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 CollateralIn 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 ContractIntroduction and prerequisites Compound is one of the most significant lending protocols in DeFi, having inspired the design of nearly...
π
Compound V3 Interest Per SecondThe 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 V3The 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.solThe 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 V3In this chapter we will examine the following topics about Compound V3: collateral valuation absorbing insufficiently collateralized...
π
Bulkers in Compound V3The 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 RewardsCompound 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 WorkChainlink price oracles are smart contracts with public view functions that return the price of a particular asset denominated in USD....