The technical content top engineers rely on to level up.
10 min read
Token Sale with Total Supply Tutorial A token sale program is a smart contract that sells a specific token, usually in exchange for a native token like SOL, at a fixed price. The sale runs until a...
15 min read
Transferring SPL Tokens with Anchor and Web3.js In the previous tutorial, we learned how SPL tokens work. In this tutorial, we’ll implement a full SPL token lifecycle: create, mint, transfer, and...
18 min read
How the SPL Token Works Solana Program Library Token (SPL Token) is Solana's standard for tokens: how to create tokens and how they should behave. It is Solana’s equivalent to Ethereum’s token...
7 min read
Calculating the real reserves between two prices in the Uniswap V3 codebase In previous chapters, we derived formulas to calculate the real reserves of tokens X and Y between two prices in a segment....
14 min read
The Fundamental Theorem of Finite Cyclic Groups The Fundamental Theorem of Cyclic Groups provides guarantees about the existence of cyclic subgroups within a cyclic group. In the context of the...
10 min read
The constant product formula in Uniswap v3 Our goal is to derive the constant product formula based on real reserves for a segment, given by $$ L^2 = (x_r+\frac{L}{\sqrt{p_u}})(y_r+L\sqrt{p_l}) $$...
11 min read
How Ethereum address are derived (EOAs, CREATE, and CREATE2) On Ethereum, smart contracts can be deployed in one of three ways: An Externally Owned Account (EOA) initiates the transaction where the...
11 min read
Real reserves in Uniswap v3 In the last chapter, we introduced two new concepts: real reserves and virtual reserves. The real reserves of a segment are the amount of tokens contained in that segment—...
12 min read
Real and virtual reserves in Uniswap v3 Uniswap v3 uses two types of reserves: real reserves and virtual reserves. Real reserves represent the actual amount of tokens present in a segment. Each...
17 min read
ERC-6551 Standard: Token Bound Accounts (TBA) Introduction NFTs were originally created to represent ownership of digital or physical assets, like collectibles. However, they were limited to tracking...
8 min read
Tickmath getSqrtRatioAtTick This article explains how the function in Uniswap V3 TickMath library works. The function takes a tick index and returns the square root price at that exact tick as a...
33 min read
Circle FFT — Part 1: Building the Circle Domain Circle STARKs is a new zk-STARK scheme that has been implemented in Stwo and Plonky3, and it has been adopted by several zkVM projects. Its key...