


Blackhole
Everything you need to learn the Blackhole protocol: 79 comprehensive code tours totaling over 900 steps, formulas presented in LaTeX, and a detailed glossary.
Click here to watch video preview
Code4rena, 29 May → 10 June 2025
Everything you need to learn the Blackhole protocol: 79 comprehensive code tours totaling over 900 steps, formulas presented in LaTeX, and a detailed glossary.
Click here to watch video preview
Code4rena, 29 May → 10 June 2025
Everything you need to learn the Blackhole protocol: 79 comprehensive code tours totaling over 900 steps, formulas presented in LaTeX, and a detailed glossary.
Click here to watch video preview
Code4rena, 29 May → 10 June 2025
Code Tours
1.1: Blackhole DEX – High-Level Overview
2.1: Project Tokens & Token Governance: Overview
2.2: BLACK – Core ERC-20 & Minting Logic
2.3: Seasonal Rewards Engine – BlackClaims.sol
2.4: TokenHandler – Whitelisting & Volatility Buckets
2.5: Auxiliary Fungible Tokens (CustomToken, Fan, WAVAX)
2.6: Thenian NFT Sale Contract
2.7: Governor Core – Data Structures & Proposal Creation
2.8: Governor Core – State Machine & Execution Hooks
2.9: Governor Core – Voting & Signature Paths
2.10: Governor Extensions – Counting, Votes & Quorum
2.11: BlackGovernor – Project-specific Parameters & Restrictions
3.1: AMM Pairs: Overview
3.2: Pair.sol: Storage & House-Keeping
3.3: Pair.sol: Fee Accounting & Claim Flow
3.4: Pair.sol: Liquidity Management (mint & burn)
3.5: Pair.sol: Swaps & Invariant Math
3.6: PairFactory.sol: Registry & Global Fees
3.7: PairGenerator & PairFees: Lightweight Helpers
4.1: Routers & Swapping Helpers: Overview
4.2: RouterV2: Core Types & Construction
4.3: RouterV2: Quoting & Path Selection
4.4: RouterV2: Liquidity Management
4.5: RouterV2: Swap Execution (Standard Tokens)
4.6: RouterV2: Fee-On-Transfer Support & Safety Helpers
4.7: GlobalRouter: TradeHelper Proxy
5.1: Governance – Voting-Escrow & Voter: Overview
5.2: VotingEscrow: Storage & Core Types
5.3: VotingEscrow: Lock Lifecycle
5.4: VotingEscrow: Check-pointing & Supply Math
5.5: VotingEscrow: NFT Transfers & Delegation
5.6: VotingEscrow: Merge & Split Mechanics
5.7: VoterV3: Voting Workflow
5.8: PermissionsRegistry: Role Based Access
5.9: VeArtProxyUpgradeable: TokenURI Rendering
5.10: Auto-Voting Strategies: Top-N Pools & Vote Weights
6.1: Bribe Vaults: Overview
6.2: Bribe Contract Core Logic
6.3: Bribe Factory Administration
7.1: Gauge System: Overview
7.2: GaugeV2 – Deposits, Withdrawals & Reward Accrual
7.3: GaugeManager – Storage & Initialization
7.4: GaugeManager – Gauge & Bribe Deployment Flow
7.5: GaugeManager – Periodic Distribution & Fee Harvesting
7.6: GaugeManager – Governance & Admin Controls
7.7: GaugeExtraRewarder – Bonus Stream Math
7.8: GaugeFactory – Deploying Gauges & Emergency Council
8.1: Auto-Voting Escrow Manager (AVM): Overview
8.2: AutoVotingEscrowManager: orchestrating many escrows
8.3: AutoVotingEscrow: managing a bucket of veNFT locks
9.1: Inflation / Emissions Engine: Overview
9.2: Weekly Mint Logic – diving into MinterUpgradeable
9.3: Claim Accounting – inside RewardsDistributor
10.1: Concentrated-Liquidity (Algebra ve(3,3)): Overview
10.2: CustomPoolDeployer: Creating Algebra Pools
10.3: GaugeCL: Staking & Rewards for CL Pools
10.4: GaugeFactoryCL: Deploying Gauges & Eternal Farming
11.1: Genesis Liquidity Pools – Overview
11.2: GenesisPoolFactory – Creating Pools with CREATE2
11.3: GenesisPoolManager – Orchestrating the Lifecycle
12.1: Auction Mechanism: Overview
12.2: AuctionFactory: Registering & Managing Auctions
12.3: FixedAuction: Pricing & Allocation Math
12.4: Auction Interfaces: What Genesis Pools Expect
13.1: On-chain API Helper contracts: Overview
13.2: BlackholePairAPIV2: Data Structures
13.3: BlackholePairAPIV2: Pair Snapshot & Claim Path
13.4: BlackholePairAPIV2: Swap-Route Discovery Engine
13.5: veNFTAPIV1: Data Model
13.6: veNFTAPIV1: NFT Enumeration & Snapshot
13.7: veNFTAPIV1: Reward Aggregation Pipeline
13.8: AlgebraPoolAPI: Pool Snapshot Logic
13.9: AlgebraPoolAPI: NFT Position Snapshot
13.10: AlgebraPoolAPIStorage: Custom Deployer Registry
13.11: RewardAPI: Next-Epoch Reward Projection
13.12: TokenAPI: Whitelist & Connector Tokens
13.13: GenesisPoolAPI: Genesis Data Reporter
13.14: TradeHelper: Swap Math & Deterministic Pair Address
13.15: veNFTAPI: Minimal veNFT Snapshot