KLIK PASS
  • KLIK Initial Coin Offering (ICO) Requirements Document
    • UPDATED Instructions for Solidity and Next.js Developers for ICO Page (9/9/2024)
    • Core Functionalities
    • ICO Page Requirements
    • System Architecture
    • Liquidity Plan
    • Middleware Requirements
    • Smart Contract Requirements
    • API Descriptions
  • KLIKcoin Tokenomics Plan
    • Total Supply Breakdown (10 Billion KLIKcoins)
    • Class A vs. Class B KLIKcoins
    • Time-Locked Tokens for Future Sales
    • Funding Rounds and Allocations
    • Liquidity pools
    • Staking Mechanism
    • Vesting Mechanism for Class A KLIKcoins
Powered by GitBook
On this page
  1. KLIKcoin Tokenomics Plan

Staking Mechanism

In addition to liquidity pools, KLIKcoin introduces staking rewards to incentivize long-term holding and network participation. 2 billion KLIKcoins are allocated to staking rewards.

How Staking Works:

  1. Stake KLIKcoins: Users lock their KLIKcoins into the staking contract for a specified period.

  2. Earn Staking Rewards: Stakers earn KLIKcoin rewards based on the amount staked and the length of the staking period. Longer staking periods result in higher rewards.

  3. Governance Participation: Stakers can also participate in governance decisions for the platform.

Solidity Code for Staking Mechanism:

solidityCopy code// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract KLIKStaking is Ownable {
    ERC20 public klikToken;
    uint256 public rewardRate;  // Reward rate for staking rewards
    uint256 public totalStaked;

    struct Staker {
        uint256 stakedAmount;
        uint256 rewardDebt;
    }

    mapping(address => Staker) public stakers;

    constructor(ERC20 _klikToken, uint256 _rewardRate) {
        klikToken = _klikToken;
        rewardRate = _rewardRate;  // Reward rate for staking rewards
    }

    // Stake KLIKcoins into the contract
    function stake(uint256 amount) external {
        require(klikToken.balanceOf(msg.sender) >= amount, "Insufficient KLIK balance");
        
        klikToken.transferFrom(msg.sender, address(this), amount);
        stakers[msg.sender].stakedAmount += amount;
        totalStaked += amount;

        stakers[msg.sender].rewardDebt += (amount * rewardRate);  // Calculate reward debt
    }

    // Unstake KLIKcoins from the contract
    function unstake(uint256 amount) external {
        require(stakers[msg.sender].stakedAmount >= amount, "Insufficient staked amount");

        klikToken.transfer(msg.sender, amount);
        stakers[msg.sender].stakedAmount -= amount;
        totalStaked -= amount;
    }

    // Claim staking rewards
    function claimRewards() external {
        uint256 reward = stakers[msg.sender].rewardDebt;

PreviousLiquidity poolsNextVesting Mechanism for Class A KLIKcoins

Last updated 8 months ago