Helper

The Helper smart contract is a contract that helps deposit LP with single token, even if you do not bring two tokens.

Code

Github Link: (Will be updated after official launch)

Address

Events, Read-Only Functions, and State-Changing Functions

State-Changing Functions

estimateLP

function estimateLP(address lp, address token, uint amount, uint swap, bool validPool) public view returns (uint estLP, uint realInput, uint estTarget)
  • Method to estimate the expected amounts, depositing with single token.

  • Parameters

    • lp : Address of LP token

    • token : Token address to be deposited

    • amount : Amount of token not to be swapped

    • swap : Amount of token to swap

    • validPool : Whether it is a pool with KSP rewards

  • Returns

    • estLP : Expected number of LP token to be minted

    • realInput : Actual number of input amount

    • estTarget : Amount of tokens to be receivedthrough swap

estimateSwapAmount

function estimateSwapAmount(address lp, address token, uint amount) public view returns (uint maxLP, uint maxSwap, uint targetAmount)
  • Method to change the mining weight per liquidity pair

  • Parameters

    • lp : Address of LP

    • token : Token address to be deposited

    • amount : Amount of token to be deposited

  • Returns

    • maxLP : Expected number of LP token to be minted

    • maxSwap : Expected amount of token to swap

    • targetAmount : Amount of tokens to be received through swap

Last updated