Boom
  • 💥About us
    • Boom
    • Fact, Vision & Mission
    • Whitepaper
    • Team
    • Join us
  • 💎Ecosystem
    • Boomcoin (BMC)
    • Boom Wallet
    • hATM
      • Super hATM
    • Boom Hose
    • Boom Talks
    • Boom Marketplace
    • Boom Pay
  • ⛓️Boom Blockchain
    • BoomDAO
    • Boomchain
      • Boomscan
    • Boomswap
      • Liquidity
      • Developer
    • Boom Faucet
      • Developer
  • 🔌Nodes
    • Nodes
  • 🧲APIs
    • API
    • Boomscan APIs
    • RPC
  • 🔗Reference
    • Tokens
      • Mainnet
      • Testnet
    • Contracts
      • Mainnet
      • Testnet
Powered by GitBook
On this page
  • V2-Core-Master Module
  • Contracts and Modifications
  • V2-Periphery-Master Module
  • Implementation Steps
  • API Endpoints Documentation
  • 🔗 Pair Interaction
  • 🔗 Providing Liquidity
  • 🔗 Swap Operations
  • 🔗 Pricing
  • Resources
  1. Boom Blockchain
  2. Boomswap

Developer

PreviousLiquidityNextBoom Faucet

Last updated 1 year ago

Boomswap is a fork. Developers can interact with Boomswap in the same way they use Uniswap repositories and SDKs.

Boomswap has a total fee structure of 1.9% from which 0.3% goes to the protocol.

The following steps were made when forking the original code:

V2-Core-Master Module

Contracts and Modifications

  • BoomswapERC20.sol : Originally , this contract has been modified for LP name and symbol adjustments.

  • BoomswapPair.sol : Originally . Fee value in updated in the BoomswapPair-swap() function at these two lines:

// 19 = 1.9% fee
uint256 balance0Adjusted = balance0.mul(1000).sub(amount0In.mul(19));
uint256 balance1Adjusted = balance1.mul(1000).sub(amount1In.mul(19));
  • BoomswapFactory.sol: Formerly . Key modification includes the initialization of the state variable INIT_CODE_HASH. The deployment of this contract requires a specified _feeToSetter address, which has the authority to adjust the feeTo parameter.

V2-Periphery-Master Module

Implementation Steps

  1. Retrieve the contract address and INIT_CODE_HASH from the deployed Factory.

  2. In , replace the existing init code hash in the pairFor function (Remove the '0x' prefix).

  3. Compile and deploy the IUniswapV2Router02 and BoomswapRouter.sol contracts (previously ) using the appropriate pragma solidity version.

  4. BoomswapRouter Deployment: Requires the _FACTORY address and the WBMC address (formerly WETH).

Consider modifying UniswapV2Library.sol and UniswapV2LiquidityMathLibrary.sol fees initially at 0.3% (997/1000).

Don't subsitute WETH with WBMC. Maintain the convention usage of ETH everywhere in the code: in names like IWETH, amountETHMin, etc.

API Endpoints Documentation

Don't forget to approve token before calling any of the following endpoints.

Resources


Use for ERC-20/ERC-20 pairs.

For WBMC pairs (WETH convention), use .

To remove liquidity, use or .

For withdrawal estimates, follow the logic in .

Quotation: Use .

Exact Output: Use | .

Exact Input: Use | .

Pair Reserves (TVL): Use .

⛓️
Uniswap V2
UniswapV2ERC20
UniswapV2Pair
UniswapV2Factory
UniswapV2Library.sol
UniswapV2Router02
🔗 Pair Interaction
Create Pair
Get Pair
🔗 Providing Liquidity
addLiquidity
addLiquidityETH
removeLiquidity
removeLiquidityETH
UniswapV2Pair-burn()
🔗 Swap Operations
swapExactTokensForTokens
swapTokensForExactTokens
swapExactETHForTokens
swapTokensForExactETH
swapExactTokensForETH
swapETHForExactTokens
🔗 Pricing
quote
getAmountOut
getAmountsOut
getAmountIn
getAmountsIn
getReserves
Uniswap V2 Router Contracts Documentation
Uniswap V2 Factory Contracts Documentation
Uniswap V2 Libraries Documentation
Contracts