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

SinglePool

이 컨트랙트는 단일풀 컨트랙트로써 유동성 제공자는 자산을 예치/출금하고 플러스풀 사용자는 활용자산을 단일풀에서 가져오거나 반환하게 됩니다.

Address

  • Contract adress after production is deployed (scope link)

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

Events

GiveReward

event GiveReward(address user, uint amount, uint lastIndex, uint rewardSum);
  • KSP 보상 지급시 발생하는 이벤트

Deposit

event Deposit(address user, uint depositAmount, uint depositTokens, uint totalAmount, uint totalSupply);
  • 단일풀 예치시 발생하는 이벤트

  • Parameters

    • user : 예치한 지갑 주소

    • depositAmount : 예치한 Token 수량

    • depositTokens : 생성된 SP Token 수량

    • totalAmount : 풀에 예치된 총 Token 수량

    • totalSupply : 풀에 생성된 총 SP Token 수량

Withdraw

event Withdraw(address user, uint withdrawAmount, uint withdrawTokens, uint totalAmount, uint totalSupply);
  • 단일풀 출금시 발생하는 이벤트

  • Parameters

    • user : 사용자 주소

    • withdrawAmount : 출금한 Token 수량

    • withdrawTokens : 출금한 SP Token 수량

    • totalAmount : 풀에 예치된 총 Token 수량

    • totalSupply : 풀에 생성된 총 SP Token 수량

Borrow

  • 플러스 예치시 활용자산 이용시 발생하는 이벤트

  • Parameters

    • user : 사용자 주소

    • plusPoolAddress : 플러스풀 주소

    • borrowAmount : 활용자산으로 사용된 token 수량

    • accountBorrows : 사용자 총 활용자산 수량

    • totalBorrows : 단일풀 총 활용자산 수량

Repay

  • 활용자산 반환시 발생하는 이벤트

  • Parameters

    • user : 사용자 주소

    • plusPoolAddress : 플러스풀 주소

    • repayAmount : 반환된 활용자산 token 수량

    • accountBorrows : 사용자 총 활용자산 수량

    • totalBorrows : 단일풀 총 활용자산 수량

Read-Only Functions

name

  • "I" + token name

symbol

  • "i" + token symbol

decimals

  • 18

token

  • KIP7 기반 token address

totalSupply

  • 유동성 추가 제거에 따른 총 유동성 Token 수량

balanceOf

  • 각 지갑 주소가 보유한 유동성 Token 수량

allowance

  • 각 지갑 주소의 allowance 상태

getCash

  • 예치된 Token 수량

reserveFactor

  • 활용수수료 중 KSP 바이백 & 소각 배정 비율

  • 1 ~ 10^18, 단위 0.000000000000000001

  • 기본 - 200000000000000000

totalBorrow

  • 총 활용자산 수량

mining

  • 단일풀에 분배되는 KSP 중 해당 풀이 채굴하는 비율

  • 1 ~ 10000, 단위 0.0001

lastMined

  • 마지막으로 수정된 SinglePoolFactory.mined() 값

withdrawActive

  • 단일풀 출금 가능 여부

depositActive

  • 단일풀 예치 가능 여부

State-Changing Functions

transfer

  • KIP7 Standard

  • 토큰 전송 함수

transferFrom

  • KIP7 Standard

  • 승인받은 지갑 토큰 전송 함수

approve

  • KIP7 Standard

  • 전송 승인 요청 함수

depositKlay

  • KLAY 단일풀 예치 함수

  • msg.value 값 사용

depositKct

  • KIP7 기반 단일풀 예치입금 함수

  • depositAmount : 토큰 수량

withdraw

  • 단일풀 출금 함수

  • withdrawAmount : 출금할 토큰 수량

withdrawByAmount

  • 단일풀 유동성 토큰 출금 함수

  • withdrawTokens : 출금할 단일풀 유동성 토큰(iToken) 수량

addReserves

  • Buyback 대기금 충전 함수

  • addAmount : 토큰 수량

claimReward

  • 보상 청구 함수

  • 호출시 누적된 KSP 보상이 존재할 경우 함께 사용자 지갑으로 전송

  • 사용자가 직접 호출하지 않는 경우에도 아래와 같은 경우에 자동으로 호출

    • 예치할 경우

    • 출금할 경우

Last updated