Browse all Token articles.
20 min read
ERC-1155 Multi Token Standard The ERC-1155 standard describes how to create both fungible and non-fungible tokens then incorporate them into a single smart contract. This saves significant deployment...
9 min read
get_D() and get_y() in Curve StableSwap This article shows algebraically step-by-step how the code for and are derived from the StableSwap invariant. Given the StableSwap Invariant: $$ An^n\sum x_i...
4 min read
UniswapV2Library Code Walkthrough UniswapV2Library The Uniswap V2 Library simplifies some interactions with pair contracts and is used heavily by the Router contracts. It contains eight functions...
7 min read
How Compound V3 Allocates COMP Rewards Compound issues rewards in COMP tokens to lenders and borrowers in proportion to their share of a market’s lending and borrowing. The algorithm is extremely...
4 min read
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 Ether, LINK, and wBTC as collateral and...
9 min read
Uniswap V2: Calculating the Settlement Price of an AMM Swap This article explains how to determine the price settlement of a trading pair in an Automated Market Maker (AMM). It answers the question...
8 min read
ERC-1363 Standard Explained ERC-1363 enables a smart contract to detect and respond to an incoming transfer of tokens. !Cover Image for ERC-1363 Standard Explained article by RareSkills What problem...
11 min read
How ERC721 Enumerable Works An Enumerable ERC721 is an ERC721 with added functionality that enables a smart contract to list all the NFTs an address owns. This article describes how functions and how...
12 min read
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 contributions...
12 min read
ERC4626 Interface Explained ERC4626 is a tokenized vault standard that uses ERC20 tokens to represent shares of some other asset. How it works is you deposit one ERC20 token (token A) into the...
6 min read
ERC20 Votes: ERC5805 and ERC6372 !ERC20 Votes ERC20 Votes Knowledge of ERC20 Snapshot is assumed, please refer to our article on ERC20 Snapshot for an introduction to the subject. ERC20 Votes does...
6 min read
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 common deviations from the style guide...