Developer

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

circle-info

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

// 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 UniswapV2Factoryarrow-up-right. 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 UniswapV2Library.solarrow-up-right, 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 UniswapV2Router02arrow-up-right) 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).

triangle-exclamation

API Endpoints Documentation

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

Resources


Contractschevron-right

Last updated