Skip to main content

Pool Creation

SKNK Hub

When you create a pool on the SKNK protocol, you aren't just providing liquidity - you are establishing the initial exchange rate between two assets that gamers and traders will use.

The "Seed" Logic

Understanding how your initial deposit shapes the pool is vital for a successful launch.

  • Defining the Ratio: As the creator, the ratio of assets you deposit sets the Initial Price.

    Example: If you deposit 1,000 SKNK and 1,000 USDC, you’ve set the price at 1 USDC per token.

  • The First "Disturbance": Once the pool is live, the very first game played or trade made will "disturb" your initial ratio. The pool will then rely on the AMM formula to adjust prices based on that activity.
  • Pool Ownership: In return for seeding the pool, you receive 100% of that pool's LP tokens (until others join), meaning 100% of the initial gaming fees flow directly to you.

2-Asset Pool Disturbance Flow

How the 2-asset pool handles deposits, gaming disturbances, and fee returns.

Step-by-Step: Creating Your Pool

Step 1: Select Your Pair

In the SKNK Hub, select "Create New Pool". You will choose two tokens, such as WETH and USDT.

Note

The depth of the pool (i.e. how much liquidity added) will determine maximum win size and price impact of trades.

Step 2: Set the Initial Exchange Rate

This is the most critical step. You will input the amount for Token A and Token B.

Warning: Arbitrage Risk

If you set a ratio significantly different from the "market price" on other exchanges, arbitrageurs will immediately trade against your pool to "fix" the price. This could result in an immediate loss of value for you.

Step 3: Approve and Initialize

You will need to sign two "Approval" transactions (one for each token) to allow the SKNK smart contracts to use the funds. Finally, you will sign the "Create Pool" transaction.

Step 4: Receive LP Tokens

Once the transaction clears, your LP Tokens will be minted. These represent your stake in the pool's liquidity and its future fee revenue.

Summary of Roles

EntityActionResult
Liquidity ProviderDeposits equal value of Asset A + BReceives Fees & House Proceeds
Liquidity PoolHolds Asset A + BFacilitates Gaming/Trading
Gamer / TraderInteracts with the PoolShifts price by taking/sending assets

Smart Contracts

info

Ensure spending allowances are set on selected tokens prior to calling router functions.

The SLPRouter contract can facilitate pool creation either with two tokens or with a token and ETH. The price of the pair can be set with the amountADesired, amountBDesired arguments to assert the correct ratio.

SLPRouter.sol
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
)
external
returns (uint256 amountA, uint256 amountB, uint256 liquidity);


function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);