LogoLogo
English
English
  • ‭
  • Introduction
  • Protocol Overview
  • Core Concept
  • KLAYswap Advantages
  • Risk & Security
  • Privacy Policy
  • Audit
  • TOKENOMICS
    • KSP
      • KSP TOKENOMICS
      • Automation of KSP distribution rate
        • KSP distribution ratio reflection policy
      • KSP Allocation
  • PRODUCT
    • SWAP
    • Supply & Borrow
      • Automatic Return
      • Parameter
      • Detailed policy of Supply & Borrow
    • V2 Pool
    • V3 Pool
      • V2 to V3 Migration
        • V2 to V3 Migration Guide
        • V2 to V3 Migration Policy
      • Supply Liquidity to V3 pool
        • V3 Supply Guide
        • V3 Supply Policy
      • V3 to V3 Migration
        • V3 to V3 Migration Guide
        • V3 to V3 Migration Policy
      • Remove Liquidity from V3 Pool
        • V3 Remove Guide
        • V3 Remove Policy
    • KSP Staking
      • Staking Policy
    • Governance
      • Governance Voting Policy
    • Pool Airdrop
    • APR & APY
      • TVL
      • Pool
      • Staking
    • Interest rate
  • 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
      • Set Airdrop Operator
      • Start Airdrop
    • EcoPot
      • Set EcoPot
      • Start EcoPot
  • HOW-TO GUIDES
    • KLAYswap Guide
    • How to add liquidity on KLAYswap
    • [Burrito Wallet] How to deposit assets using mobile devices?
    • How to create a liquidity pool on KLAYswap
    • How to stake and vote on KLAYswap
    • How to deposit assets
      • Deposit Klaytn-based assets
      • Deposit Ethereum-based assets
      • Deposit XRP
    • FAQ
  • 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

VotingKSP

This contract is responsible for the ecosystem behavior related to staking KSP. Voting rights (vKSP) are issued according to the staking quantity and period, and 40% of the daily KSP mining quantity is distributed to staking participants. (KSP distribution for staking participants may be changed through governance voting)

Code

Github Link: (Will be updated after official launch)

Address

  • Cypress : 0x2F3713F388BC4b8b364a7A2d8D57c5Ff4E054830

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

Events

LockKSP

event LockKSP(address user, uint lockPeriod, uint KSPAmount, uint totalLockedKSP, uint unlockTime);
  • Event log of KSP staking

  • Parameters

    • user : user address

    • lockPeriod :

      • 4 months : 10,368,000

      • 8 months : 20,736,000

      • 12 months : 31,104,000

      • x8 : 1,555,200,000

    • KSPAmount : Number of KSP

    • totalLockedKSP: Total number of staked KSP

    • unlockTime : Available unstaking time (timestamp)

UnlockKSP

event UnlockKSP(address user, uint vKSPAmount, uint KSPAmount);
  • Event log of KSP unstaking

  • Parameters

    • user : user address

    • vKSPAmount : Number of vKSP

    • KSPAmount : Number of KSP

UnlockKSPUnlimited

event UnlockKSPUnlimited(address user, uint vKSPBefore, uint vKSPAfter, uint KSPAmount, uint unlockTime);
  • Event log that occurs when unstaking vKSP x8

  • Parameters

    • user : user address

    • vKSPBefore : The amount of vKSP held

    • vKSPAfter : Amount of vKSP held after unstaking

    • KSPAmount : Amount of KSP staked

    • unlockTime : Available unstaking time (timestamp)

RefixBoosting

event RefixBoosting(address user, uint lockPeriod, uint boostingAmount, uint unlockTime);
  • Event log of staking period is changed

  • Parameter

    • user : user address

    • lockPeriod : period

    • boostingAmount : Number of vKSP after period changed

    • unlockTime : Available unstaking time (timestamp)

ChangeMiningRate

event ChangeMiningRate(uint _mining);
  • Event log of daily KSP distrivution rate changed

GiveReward

event GiveReward(address user, uint amount, uint lastIndex, uint rewardSum);
  • Event log of when mined KSP is claimed and distributed

Compound

event Compound(address user, uint reward, uint compoundAmount, uint transferAmount, uint mintAmount);
  • Event log of when mined KSP restaking.

  • The compound amount can be entered in integer units

  • The amount minus the compund amount from the mined amount is returned to the wallet.

Read-Only Functions

balanceOf

  • Number of vKSP tokens held by each address

getCurrentBalance

  • Number of vKSP tokens held by each address recent snapshot

getUserUnlockTime

  • Possible time of unstake

lockedKSP

  • Number of KSP tokens stakes

mining

  • KSP distribution rate

  • It is a value between 0 and 10000, in units of 0.0001%

snapShotBalance

  • Number of vKSP tokens held by each address and snapshot

snapShotCount

  • Number of snapshot index each address

getPriorBalance

function getPriorBalance(address user, uint blockNumber) public view returns (uint) 
  • Historical user vKSP holdings per block

  • Parameter

    • user : user address

    • blockNumber : prior blockNumber

snapShotBalance

function snapShotBalance(address user, uint index) public view returns (uint) 
  • Historical vKSP holdings each address

  • Parameter

    • user : user address

    • index : index

State-Changing Functions

lockKSP

function lockKSP(uint amount, uint lockPeriodRequested) public
  • Method for KSP staking

  • The amount can be entered in integer units

unlockKSP

function unlockKSP() public
  • Method for KSP unstaking

  • Unstaking is only possible during the unstaking period.

unlockKSPUnlimited

function unlockKSPUnlimited() public
  • Method for unstake KSP x8

  • Changed to x4 staking from execution

refixBoosting

function refixBoosting(uint lockPeriodRequested)
  • Method for KSP staking period change

claimReward

function claimReward() public
  • Method that a user calls to claim the claimable KSP

compoundReward

function compoundReward() public
  • Method for mined KSP staking

  • Can be called when the reward is 1 KSP or more

  • It is possible to stake in integer units, and the rest is to the wallet address.

PreviousPoolVotingNextTreasury