Gains Network
  • 📚Home
  • Gains Network
    • 🔎Overview
    • 🍏GNS Token
    • 📔Contract Addresses
      • Apechain Mainnet
      • Arbitrum Mainnet
      • Base Mainnet
      • Polygon Mainnet
  • gTrade (Leveraged Trading)
    • 🔎Overview
    • 🎛️Setting up to trade
      • 🟣Polygon Network Setup
      • 🔵Arbitrum Network Setup
    • 🏦Opening / Closing trades
    • 💲Trade Collaterals
      • Spotlight: WETH
    • 📖Asset classes
      • 🪙Cryptocurrencies
      • 💵Forex
      • 🛢️Commodities
    • 🎫Fees & Spread
    • 📰Pair List
    • 🧒How to use Practice Mode
    • ⚡One-Click Trading (1CT)
    • 🌌gTrade Solana
    • 📺Video tutorials
  • Loyalty Programs
    • Prime Trader
    • gTrade Credits
  • Community
    • gTrade Guardians
    • Governance forum
  • Reward Pools
    • 💚GNS Staking
    • 👛gToken Vaults
      • 👷Staker Functions
      • ❔Staker FAQ
      • ⏳Upgrades, updates, and timelocks
    • 🔼Active Pools & Incentives
  • Help
    • ❓FAQ
    • ⏳Chain congestion
  • Bridges
    • 🪐Arbitrum <-> Polygon Bridge
    • 🪐ERC20 Bridge (Polygon)
    • 🪐NFT Bridge (Polygon)
  • Developer
    • Integrators
      • Trading Contracts
      • Backend
      • Price Feed
      • Guides
        • v9 migration
        • Calculating borrowing fees
        • Calculating liquidation price
    • Technical Reference
      • Contracts
        • Changelogs
          • v9.2.1 Update
          • v9.1 Update
          • v9.1.1 Update
          • v9 Update
        • Core
          • Abstract
            • GNSAddressStore
            • GNSDiamondCut
            • GNSDiamondLoupe
            • GNSDiamondStorage
          • Facets
            • GNSBorrowingFees
            • GNSOtc
            • GNSPriceAggregator
            • GNSTradingInteractions
            • GNSTriggerRewards
            • GNSFeeTiers
            • GNSPairsStorage
            • GNSPriceImpact
            • GNSReferrals
            • GNSTradingCallbacks
            • GNSTradingStorage
          • GNSMultiCollatDiamond
          • GNSStaking
          • GToken
          • GTokenOpenPnlFeed
        • Interfaces
          • Libraries
            • IBorrowingFeesUtils
            • IOtcUtils
            • IPriceAggregatorUtils
            • ITriggerRewardsUtils
            • IFeeTiersUtils
            • IPairsStorageUtils
            • IPriceImpactUtils
            • IReferralsUtils
            • ITradingCallbacksUtils
            • ITradingCommonUtils
            • ITradingInteractionsUtils
            • ITradingStorageUtils
            • IUpdateLeverageUtils
            • IUpdatePositionSizeUtils
          • Types
            • IAddressStore
            • IBorrowingFees
            • IDiamondStorage
            • IOtc
            • IPriceAggregator
            • ITradingStorage
            • ITradingInteractions
            • ITriggerRewards
            • ITypes
            • IUpdateLeverage
            • IPairsStorage
            • IFeeTiers
            • IPriceImpact
            • IReferrals
            • ITradingCallbacks
            • IUpdatePositionSize
          • IChainlinkFeed
          • IArbSys
          • IChainlinkOracle
          • IERC20
          • IERC721
          • IERC721Design
          • IGeneralErrors
          • IGNSAddressStore
          • IGNSDiamond
          • IGNSDiamondCut
          • IGNSMultiCollatDiamond
          • IGNSDiamondLoupe
          • IGNSStaking
          • IGToken
          • IGTokenLockedDepositNft
          • IGTokenOpenPnlFeed
          • IGTokenLockedDepositNftDesign
          • ILiquidityPool
          • IRateProvider
          • IOwnable
        • Libraries
          • updateLeverage
            • UpdateLeverageLifecycles
          • updatePositionSize
            • IncreasePositionSizeUtils
            • DecreasePositionSizeUtils
            • UpdatePositionSizeLifecycles
          • AddressStoreUtils
          • ChainlinkClientUtils
          • ChainUtils
          • ConstantsUtils
          • CollateralUtils
          • DiamondUtils
          • LiquidityPoolUtils
          • OtcUtils
          • PackingUtils
          • StorageUtils
          • TriggerRewardsUtils
          • ArrayGetters
          • BorrowingFeesUtils
          • FeeTiersUtils
          • PriceAggregatorUtils
          • PriceImpactUtils
          • ReferralsUtils
          • TradingCallbacksUtils
          • PairsStorageUtils
          • TradingCommonUtils
          • TradingStorageUtils
          • TradingInteractionsUtils
        • Misc
          • EpochBasedTokenClaim
          • GNSCompensationHandler
          • GTokenRateProvider
          • GTokenLockedDepositNftDesign
          • ManagerTimelock
          • OwnerTimelock
          • VotingDelegator
        • Tokens
          • GainsNetworkToken
          • GTokenLockedDepositNft
      • Backend
        • Backend Types
      • SDK
        • Client Types
  • Archived
    • 🖼️gFARM2 NFTs
Powered by GitBook
On this page
  • Staker
  • StakerInfo
  • RewardState
  • RewardInfo
  • UnlockSchedule
  • UnlockScheduleInput
  • UnlockType
  • owner
  • distributeReward
  • createUnlockSchedule
  • UnlockManagerUpdated
  • DaiHarvested
  • RewardHarvested
  • RewardHarvestedFromUnlock
  • RewardDistributed
  • GnsStaked
  • GnsUnstaked
  • GnsClaimed
  • UnlockScheduled
  • UnlockScheduleRevoked
  • RewardTokenAdded

Was this helpful?

  1. Developer
  2. Technical Reference
  3. Contracts
  4. Interfaces

IGNSStaking

Interface for GNSStaking contract

Staker

struct Staker {
  uint128 stakedGns;
  uint128 debtDai;
}

StakerInfo

struct StakerInfo {
  uint48 lastDepositTs;
  uint208 __placeholder;
}

RewardState

struct RewardState {
  uint128 accRewardPerGns;
  uint128 precisionDelta;
}

RewardInfo

struct RewardInfo {
  uint128 debtToken;
  uint128 __placeholder;
}

UnlockSchedule

struct UnlockSchedule {
  uint128 totalGns;
  uint128 claimedGns;
  uint128 debtDai;
  uint48 start;
  uint48 duration;
  bool revocable;
  enum IGNSStaking.UnlockType unlockType;
  uint16 __placeholder;
}

UnlockScheduleInput

struct UnlockScheduleInput {
  uint128 totalGns;
  uint48 start;
  uint48 duration;
  bool revocable;
  enum IGNSStaking.UnlockType unlockType;
}

UnlockType

enum UnlockType {
  LINEAR,
  CLIFF
}

owner

function owner() external view returns (address)

distributeReward

function distributeReward(address _rewardToken, uint256 _amountToken) external

createUnlockSchedule

function createUnlockSchedule(struct IGNSStaking.UnlockScheduleInput _schedule, address _staker) external

UnlockManagerUpdated

event UnlockManagerUpdated(address manager, bool authorized)

DaiHarvested

event DaiHarvested(address staker, uint128 amountDai)

RewardHarvested

event RewardHarvested(address staker, address token, uint128 amountToken)

RewardHarvestedFromUnlock

event RewardHarvestedFromUnlock(address staker, address token, bool isOldDai, uint256[] ids, uint128 amountToken)

RewardDistributed

event RewardDistributed(address token, uint256 amount)

GnsStaked

event GnsStaked(address staker, uint128 amountGns)

GnsUnstaked

event GnsUnstaked(address staker, uint128 amountGns)

GnsClaimed

event GnsClaimed(address staker, uint256[] ids, uint128 amountGns)

UnlockScheduled

event UnlockScheduled(address staker, uint256 index, struct IGNSStaking.UnlockSchedule schedule)

UnlockScheduleRevoked

event UnlockScheduleRevoked(address staker, uint256 index)

RewardTokenAdded

event RewardTokenAdded(address token, uint256 index, uint128 precisionDelta)
PreviousIGNSDiamondLoupeNextIGToken

Was this helpful?