For the complete documentation index, see llms.txt. This page is also available as Markdown.

Helper

해당 컨트랙트는 두 개의 토큰을 가져오지 않더라도, 하나의 토큰으로 풀에 예치할 수 도록 도와주는 기능을 제공하는 컨트랙트 입니다.

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

  • 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

State-Changing Functions

addLiquidityWithKlay

  • Method to add liquidity only providing KLAY.

  • Parameters

    • lp : address of LP token

    • limit : Minimum amounts of LP tokens to be minted.

    • inputForLiquidity : Expected amount of KLAY to provide LP

      • 1% slippage allowed

    • targetForLiquidity : Expected amount of target token to provide LP

      • 1% slippage allowed

    • msg.value : KLAY amount of token to be provided.

addLiquidityWithKCT

  • Method to add liquidity only providing single token.

  • Parameters

    • lp : address of LP token

    • token : Token address to be deposited

    • amount : Amount of token to be deposited

    • limit : Minimum amounts of LP tokens to be minted.

    • inputForLiquidity : Expected amount of input token to provide LP

      • 1% slippage allowed

    • targetForLiquidity : Expected amount of target token to provide LP

      • 1% slippage allowed

Last updated