LogoLogo
  • 소개
  • 프로토콜 개요
  • 핵심 개념
  • 클레이스왑의 장점
  • 위험 & 보안
  • 개인정보처리방침
  • 보안 감사
  • Tokenomics
    • KSP
      • KSP Tokenomics
      • KSP 분배율 자동화
        • KSP 분배율 반영 정책
      • KSP Allocation
  • Product
    • Swap
    • Supply & Borrow
      • 자동 반환
      • 파라미터
      • Supply & Borrow 상세정책
    • V2 Pool
    • V3 Pool (Concentrated Liquidity Pool)
      • V2 to V3 마이그레이션
        • V2 to V3 마이그레이션 가이드
        • V2 to V3 마이그레이션 상세 정책
      • V3 풀 유동성 공급
        • V3 풀 유동성 공급 가이드
        • V3 풀 유동성 공급 상세 정책
      • V3 to V3 마이그레이션
        • V3 to V3 마이그레이션 가이드
        • V3 to V3 마이그레이션 상세 정책
      • V3 풀 유동성 회수
        • V3 풀 회수 가이드
        • V3 풀 유동성 회수 상세 정책
    • KSP Staking
      • Staking 정책
    • Governance
      • Governance 투표 정책
    • Pool Airdrop
    • APR & APY
      • TVL
      • Pool
      • Staking
  • Developers
    • Contract
      • V2Factory
      • V2Exchange
      • VotingKSP
      • V2Treasury
      • Distribution
      • Governor
      • Helper
      • V3Factory
      • V3Pool
      • NonfungiblePositionManager
      • NonfungibleTokenPositionDescriptor
      • V3SwapRouter
      • V3Migrator
      • V3Estimator
      • PositionMigrator
      • V3Treasury
      • V3AirdropOperator
      • UniversalRouter
    • Airdrop
      • Airdrop Operator 권한 획득
      • Airdrop 계획 진행
  • HOW-TO GUIDES
    • 클레이스왑 가이드
    • 서비스에 연결하기
      • [클립] PC에서 연결하기
      • [클립] 모바일에서 연결하기
      • [카이카스] PC에서 연결하기
    • 활용할 자산 입금하기
      • 클레이튼 자산 입금하기
      • 이더리움/BSC 자산 입금하기
      • 리플 자산 입금하기
    • 풀에 예치하기
      • [클립] PC에서 단일 예치하기
      • [부리또월렛] 모바일에서 단일 예치하기
      • [클립] PC에서 일반 페어 예치 하기
      • [클립] 모바일에서 일반 페어 예치 하기
      • [카이카스] PC에서 일반 페어 예치하기
      • [클립] PC에서 플러스 페어 예치하기
      • [공통] 활용할 자산 선택하기
    • 풀에서 출금하기
      • [클립] PC에서 단일 예치출금하기
      • [클립] PC에서 플러스 예치 출금하기
    • KSP 스테이킹 & 풀 투표하기
      • [클립] PC에서 KSP 스테이킹 하기
      • [클립] 모바일에서 KSP 스테이킹 하기
      • [카이카스] PC에서 KSP 스테이킹 하기
      • [클립] PC에서 풀 투표 하기
      • [클립] 모바일에서 풀 투표 하기
      • [카이카스] PC에서 풀 투표 하기
    • 보상 수령하기
    • FAQ
      • 클레이스왑은 어떤 서비스인가요?
      • 클레이(KLAY) & 클레이스왑(KSP)은 무엇인가요?
      • 유동성 풀(Liquidity pool)이 무엇인가요?
      • 유동성 풀의 예치방법, 특징이 무엇인가요?
      • 왜 클레이스왑에서 예치해야 하나요?
      • 획득한 보상은 어떻게 활용하나요?
  • KLAYswap
  • Orbit Bridge
  • KLAYswap git
  • Orbit Bridge git
  • KLAYswap audit report
Powered by GitBook
On this page
  • Code
  • Address
  • Events, Read-Only Functions, and State-Changing Functions
  1. Developers
  2. Contract

Helper

PreviousGovernorNextV3Factory

Last updated 11 months ago

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

Code

Github Link: (Will be updated after official launch)

Address

  • Cypress :

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

State-Changing Functions

addLiquidityWithKlay

function addLiquidityWithKlay(address lp, uint limit, uint inputForLiquidity, uint targetForLiquidity) public payable
  • 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

function addLiquidityWithKCT(address lp, address token, uint amount, uint limit, uint inputForLiquidity, uint targetForLiquidity) public
  • 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

0x0c2E8B967f21D9CA9098350954e1772cb758E6cd