KLAYswap
한국어
한국어
  • 소개
  • 프로토콜 개요
  • 핵심 개념
  • 클레이스왑의 장점
  • 위험 & 보안
  • 개인정보처리방침
  • 보안 감사
  • Tokenomics
    • KSP
      • KSP Tokenomics
      • KSP 분배율 자동화
        • 거버넌스 통과 투표 정책
        • KSP 분배율 반영 정책
      • KSP Allocation
  • Product
    • 스왑
    • 단일 예치
      • 단일예치 상세정책
    • 일반 페어 예치(V2)
    • 집중화 페어 예치(V3)
      • 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 스테이킹 & 보팅
      • 스테이킹, 풀 투표 정책
    • 거버넌스
      • 거버넌스 투표 정책
    • Drops(드랍스)
    • Ecopot(에코팟)
    • 풀에어드랍
    • APR & APY
      • TVL
      • Pool
      • Staking
    • 이자율 모델
  • Developers
    • Contract
      • Factory
      • Exchange
      • PoolVoting
      • VotingKSP
      • Treasury
      • Distribution
      • Governor
      • SinglePool
      • SinglePool Factory
      • PlusPool
      • PlusPool Factory
      • Store
      • Utils
      • Single/Plus Utils
      • Helper
      • EcoPotVoting
      • EcoPot
      • V3
        • V3Factory
        • V3Pool
        • NonfungiblePositionManager
        • NonfungibleTokenPositionDescriptor
        • V3SwapRouter
        • V3Migrator
        • V3Estimator
        • PositionMigrator
        • V3Treasury
        • V3AirdropOperator
        • UniversalRouter
    • Airdrop
      • Airdrop Operator 권한 획득
      • Airdrop 계획 진행
    • EcoPot
      • EcoPot Operator 권한 획득
      • EcoPot 계획 진행
  • 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

Was this helpful?

  1. Developers
  2. Contract
  3. V3

NonfungiblePositionManager

PreviousV3PoolNextNonfungibleTokenPositionDescriptor

Last updated 1 year ago

Was this helpful?

해당 컨트랙트는 ERC721 대체 불가능한 토큰 인터페이스의 KLAYswap V3 포지션을 wrapping합니다.

Code

Github Link: (Will be updated after official launch)

Address

  • Cypress :

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

Events

IncreaseLiquidity

event IncreaseLiquidity(
    uint256 indexed tokenId, 
    uint128 liquidity, 
    uint256 amount0, 
    uint256 amount1
);

포지션 NFT에 대한 유동성 증가 시 발생 또한 토큰이 발행될 때 방출됩니다.

Parameters:

Name
Type
Description

tokenId

uint256

The ID of the token for which liquidity was increased

liquidity

uint128

The amount by which liquidity for the NFT position was increased

amount0

uint256

The amount of token0 that was paid for the increase in liquidity

amount1

uint256

The amount of token1 that was paid for the increase in liquidity

DecreaseLiquidity

event DecreaseLiquidity(
    uint256 indexed tokenId, 
    uint128 liquidity, 
    uint256 amount0, 
    uint256 amount1
);

포지션 NFT에 대한 유동성 감소 시 발생

Name
Type
Description

tokenId

uint256

The ID of the token for which liquidity was decreased

liquidity

uint128

The amount by which liquidity for the NFT position was decreased

amount0

uint256

The amount of token0 that was accounted for the decrease in liquidity

amount1

uint256

The amount of token1 that was accounted for the decrease in liquidity

Collect

event Collect(
    uint256 indexed tokenId, 
    address recipient,
    uint256 amount0, 
    uint256 amount1,
    uint256 reward
);

포지션 NFT에 대한 토큰이 수집될 때 발생합니다. 보고된 금액은 반올림 동작으로 인해 이체된 금액과 정확히 일치하지 않을 수 있습니다.

Name
Type
Description

tokenId

uint256

포지션 NFT ID

recipient

address

수집된 토큰을 받은 계정의 주소

amount0

uint256

수집된 포지션에 빚진 token0의 양

amount1

uint256

수집된 포지션에 빚진 token1의 양

Parameter Structs

struct MintParams {
    address token0;
    address token1;
    uint24 fee;
    int24 tickLower;
    int24 tickUpper;
    uint256 amount0Desired;
    uint256 amount1Desired;
    uint256 amount0Min;
    uint256 amount1Min;
    address recipient;
    uint256 deadline;
}

struct IncreaseLiquidityParams {
   uint256 tokenId;
   uint256 amount0Desired;
   uint256 amount1Desired;
   uint256 amount0Min;
   uint256 amount1Min;
   uint256 deadline;
}

struct DecreaseLiquidityParams {
    uint256 tokenId;
    uint128 liquidity;
    uint256 amount0Min;
    uint256 amount1Min;
    uint256 deadline;
}

struct CollectParams {
    uint256 tokenId;
    address recipient;
    uint128 amount0Max;
    uint128 amount1Max;
}

Read-Only Functions

function positions(
    uint256 tokenId
) external view returns (
    uint96 nonce, 
    address operator, 
    address token0, 
    address token1, 
    uint24 fee, 
    int24 tickLower, 
    int24 tickUpper, 
    uint128 liquidity, 
    uint256 feeGrowthInside0LastX128, 
    uint256 feeGrowthInside1LastX128, 
    uint128 tokensOwed0, 
    uint128 tokensOwed1
)

주어진 토큰 ID와 관련된 위치 정보를 반환합니다.

토큰 ID가 유효하지 않은 경우 throw.

Name
Type
Description

tokenId

uint256

포지션을 나타내는 토큰의 ID

Name
Type
Description

nonce

uint96

permit에 대한 nonce 값

operator

address

지출이 승인된 주소

token0

address

특정 풀에 대한 token0의 주소

token1

address

특정 풀에 대한 token1의 주소

fee

uint24

풀과 관련된 수수료

tickLower

int24

위치에 대한 틱 범위의 하단

tickUpper

int24

위치에 대한 틱 범위의 상단

liquidity

uint128

포지션의 유동성

feeGrowthInside0LastX128

uint256

개별 포지션에 대한 마지막 조치를 기준으로 token0의 수수료 증가

feeGrowthInside1LastX128

uint256

개별 포지션에 대한 마지막 조치를 기준으로 token1의 수수료 증가

tokensOwed0

uint128

마지막 계산 시점의 위치에 대한 미수금된 token0의 양

tokensOwed1

uint128

마지막 계산 시점의 위치에 대한 미수금된 token1의 양

positionRewards

function positionRewards(uint256 tokenId)
external
view
returns (
    uint256 rewardGrowthInsideLastX128,
    uint128 reward,
    uint128 fee0Sum,
    uint128 fee1Sum,
    uint128 rewardSum
);
Name
Type
Description

tokenId

uint256

포지션을 나타내는 토큰의 ID

Return Values:

Name
Type
Description

rewardGrowthInsideLastX128

uint256

개별 포지션에 대한 마지막 행동에 따른 보상 증가

reward

uint128

미수령 보상 금액

fee0Sum

uint128

token0의 누적 수수료

fee1Sum

uint128

token1의 누적 수수료

rewardSum

uint128

적립된 리워드 금액

  function getApproved() public view returns (address)

tokenId 토큰에 대해 승인된 계정을 반환합니다.

요구 사항: 토큰 ID가 있어야 합니다.

  function tokenURI(uint256 tokenId) public view returns (string)

특정 토큰 ID를 설명하는 URI를 반환합니다.

Name
Type
Description

tokenId

uint256

발행된 포지션을 나타내는 토큰의 ID

URI 데이터가 포함된 base64 문자열입니다.

  function baseURI() public returns (string)

State-Changing Functions

function mint(
    struct INonfungiblePositionManager.MintParams params
) external returns (
    uint256 tokenId, 
    uint128 liquidity, 
    uint256 amount0, 
    uint256 amount1
)

NFT로 래핑된 새 포지션을 생성합니다.

풀이 존재하고 초기화될 때 이것을 호출하십시오. 풀이 생성되었지만 초기화되지 않은 경우 메서드가 존재하지 않습니다. 즉, 풀이 초기화된 것으로 간주됩니다.

Name
Type
Description

params

struct INonfungiblePositionManager.MintParams

calldata에서 MintParams로 인코딩된 위치를 생성하는 데 필요한 매개변수

Name
Type
Description

tokenId

uint256

발행된 포지션을 나타내는 토큰의 ID

liquidity

uint128

이 포지션의 유동성 양

amount0

uint256

token0의 수량

amount1

uint256

token1의 수량

function increaseLiquidity(
    struct INonfungiblePositionManager.IncreaseLiquidityParams params
) external returns (
    uint128 liquidity, 
    uint256 amount0, 
    uint256 amount1
)

msg.sender가 지불한 토큰으로 포지션의 유동성을 높입니다.

Name
Type
Description

params

struct INonfungiblePositionManager.IncreaseLiquidityParams

calldata에서 IncreaseLiquidityParams로 인코딩된 포지션의 유동성을 증가시키는 데 필요한 매개변수

Name
Type
Description

liquidity

uint128

증가에 따른 새로운 유동성 양

amount0

uint256

유동성을 달성하기 위한 token0의 양

amount1

uint256

유동성을 달성하기 위한 token1의 양

function decreaseLiquidity(
    struct INonfungiblePositionManager.DecreaseLiquidityParams params
) external returns (uint256 amount0, uint256 amount1)

포지션의 유동성을 줄여 포지션에 반영

Name
Type
Description

params

struct INonfungiblePositionManager.DecreaseLiquidityParams

calldata에서 IncreaseLiquidityParams로 인코딩된 포지션의 유동성을 줄이는 데 필요한 매개변수

Name
Type
Description

amount0

uint256

포지션의 빚진 토큰에 해당하는 token0의 양

amount1

uint256

포지션의 빚진 토큰에 해당하는 token1의 양

function collect(
    struct INonfungiblePositionManager.CollectParams params
) external returns (uint256 amount0, uint256 amount1)

수령인에게 지불해야 하는 최대 금액의 수수료를 징수합니다.

Name
Type
Description

params

struct INonfungiblePositionManager.CollectParams

calldata에서 CollectParams로 인코딩된 수집에 필요한 매개변수

Name
Type
Description

amount0

uint256

token0에서 징수된 수수료 금액

amount1

uint256

token1에서 징수된 수수료 금액

function burn(uint256 tokenId) external

NFT 계약에서 토큰 ID를 삭제하는 토큰 ID를 소각합니다. 토큰은 유동성이 0이어야 하며 모든 토큰이 먼저 수집되어야 합니다.

Name
Type
Description

tokenId

uint256

소각되는 토큰의 ID

Parameters:

Parameters:

MintParams

IncreaseLiquidityParams

DecreaseLiquidityParams

CollectParams

positions

Parameters:

Return Values:

Parameters:

getApproved

tokenURI

Parameters:

Return Values:

baseURI

mint

Parameters:

Return Values:

increaseLiquidity

Parameters:

Return Values:

decreaseLiquidity

Parameters:

Return Values:

collect

Parameters:

Return Values:

burn

Parameters:

0x51D233B5aE7820030A29c75d6788403B8B5d317B
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​