Skip to main content
Try out the RareSkills ZK AI Tutor!

DeFi

Browse all DeFi articles.

10 min read

Pragma Oracle

Pragma is an oracle protocol built for Starknet that brings off-chain price data on-chain.

Last updated onApr 26, 2026
Read Article

12 min read

Switchboard Oracle on Solana: How to Read Price Feeds

Build a Solana program that reads the SOL/USD price from the Switchboard oracle: how jobs and feeds work, setting up a feed, and a client script on Devnet.

Last updated onNov 7, 2026
Read Article

12 min read

Uniswap v3 Positions: How Liquidity Ranges Work

In Uniswap v3, liquidity providers open positions over a tick range instead of getting LP tokens. Learn how positions, fees, and the mint function work.

Last updated onNov 7, 2026
Read Article

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.

Last updated onOct 6, 2025
Read Article

10 min read

The constant product formula in Uniswap v3

This chapter is optional. It introduces no fundamentally new concepts compared to the previous ones, but offers a different perspective on deriving real…

Last updated onSep 15, 2025
Read Article

11 min read

Real reserves in Uniswap v3

In the last chapter, we introduced two new concepts: real reserves and virtual reserves.

Last updated onAug 20, 2025
Read Article

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.

Last updated onSep 29, 2025
Read Article

8 min read

Tickmath getSqrtRatioAtTick

This article explains how the getSqrtRatioAtTick() function in Uniswap V3 TickMath library works.

Last updated onNov 12, 2026
Read Article

7 min read

Computing the Current Tick Given sqrtPriceX96

In the previous chapters, we saw that the protocol stores the square root of the price instead of the price itself.

Last updated onAug 20, 2025
Read Article

7 min read

Uniswap V3 Factory and the Relationship Between Tick Spacing and Fees

In early chapters, we introduced the concept of ticks, which discretize the price curve.

Last updated onNov 12, 2026
Read Article

6 min read

Tick limits in Uniswap V3

The smallest tick in Uniswap v3 is -887,272 and the largest tick is 887,272.

Last updated onNov 12, 2026
Read Article

9 min read

Square Root Price in Uniswap V3

In Uniswap V2, the protocol tracks token reserves and derives the spot price, p_x=y/x, and total liquidity, L=xy, where x and y are the reserves of…

Last updated onNov 12, 2026
Read Article