Author
Discord: 0xthanos2025
Email: kenneth@blackhole.xyz
Summary
Blackhole is a next-generation ve3,3 DEX built on the Avalanche C-Chain, optimized for deep liquidity, sustainable emissions, and long-term incentive alignment across the DeFi ecosystem. The native token of the protocol, $BLACK, is used for: Emission rewards to liquidity providers Locking into veNFTs to gain governance rights and rewards
Blackhole is the leading DEX on Avalanche both in TVL ($212M) as well daily volume. Over the past 2 weeks our cumulative volume reached $1B: DeFiLlama.
Motivation
Blackhole has become the largest DEX on Avalanche and as we continue to grow in TVL and volume, we are looking to partner and integrate with all the top DEX Aggregators including CoW Swap. Blackhole has the following integrations:
DEX / Meta Aggregators
- KyberSwap (live)
- Swiss Borg (live)
- Fly.trade (live)
- Yak Swap (live)
- LFJ (live)
- ODOS (being finalised)
- 1inch (in progress)
- 0x (in progress)
- Velora (in progress)
Technical Specification
Derive Pool addresses
Basic Pool:
bytes32 salt = keccak256(abi.encodePacked(token0, token1, stable)); // notice salt includes stable as well, 3 parameters
pair = address(new Pair{salt: salt}(factory, token0, token1, stable));
Concentrated Pool:
function computePoolAddress(address token0, address token1) public view override returns (address pool) {
pool = address(uint160(uint256(keccak256(abi.encodePacked(hex'ff', poolDeployer, keccak256(abi.encode(token0, token1)), POOL_INIT_CODE_HASH)))));
}
bytes32 public constant POOL_INIT_CODE_HASH = 0xeaa3eea3233916c82fe1281a51bd9cde844b7c4673c0714ca0028a57f5634752;
customPoolDeployer
Name | Address |
---|---|
customPoolDeployer tickSpacing_1 | 0xDcFccf2e8c4EfBba9127B80eAc76c5A122125d29 |
customPoolDeployer tickSpacing_50 | 0x58b05074D52D1a84D8FfDAddA3c1b652e8C56994 |
customPoolDeployer tickSpacing_100 | 0xf9221dE143A0E57c324bF2a0f281e605e845D767 |
customPoolDeployer tickSpacing_200 | 0x5D433A94A4a2aA8f9AA34D8D15692Dc2E9960584 |
Sampling
Basic Pool
- There is a function in PairContract called getAmountOut
- It takes Amount in and token in and returns the price for the second token
Concentrated Pool
- Contract: QuoterV2
- Function: quoteExactInputSingle
- Takes below input:
address tokenIn;
address tokenOut;
address deployer;
uint256 amountIn;
uint160 limitSqrtPrice;
- deployer will be different for different tick_spacing(mentioned above)
- limitSqrtPrice is current tick price
Settling
Non native tokens
- Contract: RouterV2
- Function: swapExactTokensForTokens
- Params:
uint amountIn,
uint amountOutMin,
IRouter.route[] calldata routes,
address to,
uint deadline
- Router:
address pair;
address from;
address to;
bool stable;
bool concentrated;
address receiver;
Native Tokens
- Contract: RouterV2
- Function: swapExactETHForTokens
- Params:
uint amountOutMin, IRouter.route[] calldata routes, address to, uint deadline
- Router
address pair;
address from;
address to;
bool stable;
bool concentrated;
address receiver;
FOT Tokens
- Contract: RouterV2
- Function: swapExactTokensForTokensSupportingFeeOnTransferTokens
- Params:
uint amountIn,
uint amountOutMin,
IRouter.route[] calldata routes,
address to,
uint deadline
- Router
address pair;
address from;
address to;
bool stable;
bool concentrated;
address receiver;
Integration Incentives
Blackhole is offering a $8000 (USDC) grant for integrating with Cow.fi