Token
Browse all Token articles.
20 min read
ERC-1155 Explained: The Multi-Token Standard in Solidity
ERC-1155 lets one smart contract manage fungible and non-fungible tokens. Learn its core functions, metadata URIs, minting, and batch transfers, with code.
9 min read
get_D() and get_y() in Curve StableSwap
This article shows algebraically step-by-step how the code for get_D() and get_y() are derived from the StableSwap invariant.
4 min read
UniswapV2Library Code Walkthrough
The Uniswap V2 Library simplifies some interactions with pair contracts and is used heavily by the Router contracts.
4 min read
Bulkers in Compound V3
The bulker contracts in Compound V3 are multicall-like contracts for batching several transactions.
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.
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).
8 min read
ERC-1363 Standard Explained
ERC-1363 enables a smart contract to detect and respond to an incoming transfer of tokens. Suppose a user transfers an ERC-20 token to a contract.
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.
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 to a pool.
12 min read
ERC4626 Interface Explained
ERC4626 is a tokenized vault standard that uses ERC20 tokens to represent shares of some other asset.
6 min read
ERC20 Votes: ERC5805 and ERC6372
Knowledge of ERC20 Snapshot is assumed, please refer to our article on ERC20 Snapshot for an introduction to the subject.
6 min read
Solidity Coding Standards
The purpose of this article is not to rehash the official Solidity Style Guide, which you should read.