Fizzswap
English
English
  • Introduction
  • Protocol Overview
  • Core Concept
  • Risk & Security
  • Privacy Policy
  • Audit
  • Fizz Token
    • Fizzswap Protocol
  • PRODUCT
    • SWAP
    • V2 Pool
    • V3 Pool
      • 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
  • GET STARTED
    • Create a Wallet
    • How to Transfer ETH to the Silicon Network
  • DEVELOPERS
    • Contract
      • V2Factory
      • Exchange
      • VotingRewardToken
      • V2Treasury
      • Distribution
      • Governor
      • V2Router
      • V2Helper
      • V3Factory
      • V3Pool
      • NonfungiblePositionManager
      • NonfungibleTokenPositionDescriptor
      • V3SwapRouter
      • V3Migrator
      • V3Estimator
      • PositionMigrator
      • V3Treasury
      • UniversalRouter
      • V3AirdropOperator
  • Fizzswap
  • Silicon Bridge
  • Github (fork)
  • Audit report (fork)
Powered by GitBook
On this page
  • Code
  • Address
  • Events, Read-Only Functions, and State-Changing Functions
Export as PDF
  1. DEVELOPERS
  2. Contract

VotingRewardToken

PreviousExchangeNextV2Treasury

Last updated 8 months ago

This contract is responsible for the ecosystem behavior related to staking RewardToken. Voting rights (vRewardToken) are issued according to the staking quantity and period.

Code

Github Link: (Will be updated after official launch)

Address

  • Silicon Mainnet :to-be

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

Events

LockRewardToken

event LockRewardToken(
    address user,
    uint256 lockPeriod,
    uint256 rewardTokenAmount,
    uint256 totalLockedRewardToken,
    uint256 totalLockedvRewardToken,
    uint256 unlockTime
)
  • Event log of RewardToken staking

  • Parameters

    • user : user address

    • lockPeriod :

      • 4 months : 10,368,000

      • 8 months : 20,736,000

      • 12 months : 31,104,000

      • unlimited : 1,555,200,000

    • rewardTokenAmount : A Number of RewardToken

    • totalLockedRewardToken: Total number of staked RewardToken

    • totalLockedvRewardToken: Total number of users' vRewardToken

    • unlockTime : Available unstaking time (timestamp)

UnlockRewardToken

event UnlockRewardToken(address user, uint256 vRewardTokenAmount, uint256 rewardTokenAmount);
  • Event log of RewardToken unstaking

  • Parameters

    • user : user address

    • vRewardTokenAmount : Number of vRewardToken

    • rewardTokenAmount : Number of RewardToken

UnlockRewardTokenUnlimited

event UnlockRewardTokenUnlimited(
    address user,
    uint256 vRewardTokenBefore,
    uint256 vRewardTokenAfter,
    uint256 rewardTokenAmount,
    uint256 unlockTime
);
  • Event log that occurs when unstaking vRewardToken unlimited

  • Parameters

    • user : user address

    • vRewardTokenBefore : The amount of vRewardToken held

    • vRewardTokenAfter : Amount of vRewardToken held after unstaking

    • rewardTokenAmount : Amount of RewardToken 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 vRewardToken after period changed

    • unlockTime : Available unstaking time (timestamp)

ChangeMiningRate

event ChangeMiningRate(uint _mining);
  • Event log of daily RewardToken distribution rate changed

GiveReward

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

Compound

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

  • The compound amount can be entered in integer units

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

Read-Only Functions

balanceOf

  • Number of vRewardToken tokens held by each address

getCurrentBalance

  • Number of vRewardToken tokens held by each address recent snapshot

getUserUnlockTime

  • Possible time of unstaking

lockedRewardToken

  • Number of RewardToken tokens stakes

mining

  • RewardToken distribution rate

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

snapShotBalance

  • Number of vRewardToken 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 vRewardToken holdings per block

  • Parameter

    • user : user address

    • blockNumber : prior blockNumber

snapShotBalance

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

  • Parameter

    • user : user address

    • index : index

State-Changing Functions

lockRewardToken

function lockRewardToken(uint amount, uint lockPeriodRequested) public
  • Method for RewardToken staking

  • The amount can be entered in integer units

unlockRewardToken

function unlockRewardToken() public
  • Method for RewardToken unstaking

  • Unstaking is only possible during the unstaking period.

unlockRewardTokenUnlimited

function unlockRewardTokenUnlimited() public
  • Method for unstake RewardToken unlimited

  • Changed to x4 staking from execution

refixBoosting

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

claimReward

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

compoundReward

function compoundReward() public
  • Method for mined RewardToken staking

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

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