- Stacks Wallet with sufficient STX for deployment fees (~1-2 STX)
- REOWN Project ID from https://cloud.reown.com
- Token Addresses - The SIP-010 tokens you want to create a pool for
- Go to https://explorer.stacks.co/sandbox/deploy?chain=mainnet
- Connect your wallet
- Paste the contents of
contracts/pool.clar - Set contract name:
pool(or your preferred name) - Deploy and confirm transaction
- Note your deployed contract address:
SP_YOUR_ADDRESS.pool
# Install Stacks CLI
npm install -g @stacks/cli
# Deploy (requires wallet private key)
stx deploy_contract contracts/pool.clar pool mainnet \
--privateKey YOUR_PRIVATE_KEY \
--fee 0.01After deployment, you need to initialize the pool with liquidity:
// Call initialize-pool with initial token amounts
// This must be done ONCE by the deployer
const txOptions = {
contractAddress: 'SP_YOUR_ADDRESS',
contractName: 'pool',
functionName: 'initialize-pool',
functionArgs: [
contractPrincipalCV('TOKEN_X_ADDRESS', 'TOKEN_X_NAME'),
contractPrincipalCV('TOKEN_Y_ADDRESS', 'TOKEN_Y_NAME'),
uintCV(INITIAL_AMOUNT_X), // e.g., 1000000000 for 1000 tokens (6 decimals)
uintCV(INITIAL_AMOUNT_Y) // e.g., 1000000000 for 1000 tokens (6 decimals)
],
// ... other options
};Important: You must have approved/own sufficient amounts of both tokens.
Update frontend/src/app.js:
const CONFIG = {
network: 'mainnet',
projectId: 'YOUR_REOWN_PROJECT_ID', // From cloud.reown.com
poolContract: {
address: 'SP_YOUR_DEPLOYED_ADDRESS',
name: 'pool'
},
tokenX: {
address: 'TOKEN_X_CONTRACT_ADDRESS',
name: 'token-x-name',
symbol: 'SYMBOL',
decimals: 6,
assetName: 'asset-name'
},
tokenY: {
address: 'TOKEN_Y_CONTRACT_ADDRESS',
name: 'token-y-name',
symbol: 'SYMBOL',
decimals: 6,
assetName: 'asset-name'
},
// ...
};- Go to https://cloud.reown.com
- Sign up / Log in
- Create a new project
- Copy the Project ID
- Update
CONFIG.projectIdin app.js
cd frontend
npm install -g vercel
vercel --prodcd frontend
npm run build
# Deploy contents of 'dist' folder to your hosting| Token | Contract Address | Decimals |
|---|---|---|
| STX | Native | 6 |
| ALEX | SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token | 8 |
| USDA | SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.usda-token | 6 |
| xBTC | SP3DX3H4FEYZJZ586MFBS25ZW3HZDMEW92260R2PR.Wrapped-Bitcoin | 8 |
| DIKO | SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.arkadiko-token | 6 |
| MIA | SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-token-v2 | 0 |
| NYC | SPSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1F4DYQ11.newyorkcitycoin-token-v2 | 0 |
- Contract deployed from secure wallet
- Initial liquidity amounts verified
- Frontend config updated with correct addresses
- REOWN Project ID is valid
- Tested with small amounts first
- Post-conditions enabled in frontend
- API: https://api.mainnet.hiro.so
- Explorer: https://explorer.stacks.co
- Contract Verification: https://explorer.stacks.co/txid/YOUR_TX_ID
- Ensure deployment transaction is confirmed
- Verify contract address in frontend config
- Check user has enough tokens
- Verify token contract addresses are correct
- Ensure REOWN Project ID is valid
- Check wallet supports WalletConnect (Leather, Xverse)
- Check reserves are initialized
- Verify slippage tolerance
- Ensure deadline hasn't passed