LogoLogo
  • Introduction
    • Get started
  • Kiln Products
    • Overview
    • 🧱Validators
      • ⛓️Protocols
        • Algorand (ALGO)
        • Aptos (APT)
        • Avalanche (AVAX)
        • Babylon (BABY)
        • Cardano (ADA)
        • Celestia (TIA)
        • CoreChain (CORE)
        • Cosmos (ATOM)
        • Cronos (CRO)
        • DyDx (DYDX)
        • Ethereum (ETH)
        • Eigenlayer (EIGEN)
        • Fetch.ai (FET)
        • Flare (FLR)
        • Harmony (ONE)
        • Injective (INJ)
        • Iota (IOTA)
        • Kava (KAVA)
        • Kusama (KSM)
        • Mantra (OM)
        • MultiversX (EGLD)
        • Near (NEAR)
        • Oasis (ROSE)
        • Osmosis (OSMO)
        • Peaq (PEAQ)
        • Polkadot (DOT)
        • Polygon (POL - ex MATIC)
        • Sei (SEI)
        • Solana (SOL)
        • Stacks (STX)
        • Starknet (STRK)
        • Story(IP)
        • Sui (SUI)
        • Symbiotic (SYM)
        • Tezos (XTZ)
        • The Open Network (TON)
        • Tron (TRX)
        • Zetachain (ZETA)
    • 🎆Connect
      • Accessing Kiln Connect
      • API specs
      • Postman Demo
      • SDK
        • Getting started
        • How to find Kiln's validators
        • Upgrade guide from v2 to v3
      • Tutorials
        • SOL - Tag a stake
        • DYDX - How to bridge your rewards
      • Kiln Connect FAQs
    • 🚀Dashboard
      • Architecture
      • Staking
        • Cardano (ADA)
        • Celestia (TIA)
        • Cosmos (ATOM)
        • Cronos (CRO)
        • DYDX (DYDX)
        • Ethereum (ETH)
          • Native EigenLayer Restaking
          • Deposit into compounding validators
          • Convert skimming validators to compounding validators
        • Fetch.ai (FET)
        • Injective (INJ)
        • Kava (KAVA)
        • Kusama (KSM)
        • Mantra (OM)
        • Near (NEAR)
        • Osmosis (OSMO)
        • Polkadot (DOT)
        • Polygon (POL)
        • Solana (SOL)
        • Tezos (XTZ)
        • The Open Network (TON)
        • TRON (TRX)
        • ZetaChain (ZETA)
      • Reporting
        • Cardano (ADA)
        • Celestia (TIA)
        • Cosmos (ATOM)
        • Cronos (CRO)
        • DYDX (DYDX)
        • Ethereum (ETH)
        • Fetch.ai (FET)
        • Injective (INJ)
        • Kava (KAVA)
        • Kusama (KSM)
        • Mantra (OM)
        • Near (NEAR)
        • Osmosis (OSMO)
        • Polkadot (DOT)
        • Polygon (POL)
        • Solana (SOL)
        • Tezos (XTZ)
        • The Open Network (TON)
        • Tron (TRX)
        • ZetaChain (ZETA)
      • Unstaking
        • Cardano (ADA)
        • Celestia (TIA)
        • Cosmos (ATOM)
        • Cronos (CRO)
        • DYDX (DYDX)
        • Ethereum (ETH)
          • Native EigenLayer Withdraw Flow
          • Partial withdraw liquidity
        • Fetch.ai (FET)
        • Injective (INJ)
        • Kava (KAVA)
        • Kusama (KSM)
        • Mantra (OM)
        • Near (NEAR)
        • Osmosis (OSMO)
        • Polkadot (DOT)
        • Polygon (POL)
        • Solana (SOL)
          • Deactivate
          • Merge
          • Split
          • Withdraw
        • Tezos (XTZ)
        • Tron (TRX)
        • The Open Network (TON)
        • ZetaChain (ZETA)
      • Import stakes
      • Move stakes
      • Invite a user to your organization
      • Troubleshooting
      • 🎓Tutorials
        • Cosmos Chains - Auto-compound a stake
      • Dashboard FAQs
    • 📥dApp
      • ETH staking
      • EigenLayer
        • Operator delegation
        • Native restaking
        • Liquid restaking
      • 🔒Security
      • Kiln dApp FAQ
    • ⛓️Onchain
      • 🙋‍♀️Dedicated Validators
        • Key concepts
          • Deposit Flow
          • Rewards Management
          • Unstaking
        • How to integrate
          • 1. Contract Interactions
          • 2. Administration
      • 🤽‍♂️Pooled Staking
        • Key concepts
          • Staking Positions
          • Oracle Reports
          • Exit & Withdrawal
        • How to integrate
          • 🐎Getting Started
          • 🏗️Architecture overview
          • 😊User experience
          • 📃Integration contract
          • ⛑️Contract governance
          • ℹ️Contract ABI
          • 📥Using TheGraph
          • 🥩Staking Interactions
            • Staking
            • Rewards
            • Unstaking & Withdrawals
      • 🎡Tokenized Validators
      • 🎩Node Operators: how to integrate
        • Dedicated Validators (v1)
          • Manage Validators
        • Pooled Staking
          • 1. Using TheGraph for Setup
          • 2. Deploying vPool
          • 3. Key Provisioning in vFactory
          • 4. Oracle Daemon
          • 5. Depositing via Integration Contracts
          • 6. Exit Daemon
          • 7. Deploy Integration Contract (optional)
      • 🔓Security
        • Staking Risks
        • Audits & Bug Bounties
        • Business Continuity
        • Source code
    • 💰DeFi
      • 🦋Morpho via Kiln DeFi
      • 💻How to integrate?
        • Smart contract interactions
        • Governance
        • Reporting data
        • Administration
        • Supported DeFi Protocols
        • Additional Rewards Management
      • 🔓Security
        • Risks
        • Audits & Bug Bounty
        • Pause
        • Source code
        • Compliance Features
      • Kiln DeFi FAQ
    • 🪄Widget
      • 🧑‍🎨Customize - Widget Editor
      • ☄️Integrate - No/Low Code
    • 🛠️More Tools
      • ETH Batch Deposit Contract
      • Safe CD
  • Integrations
    • 🔭Plan your integration
    • 🔌Integrate Kiln products
    • 📱Wallets
      • Stake from Ledger Live
        • Direct Staking
        • Using Kiln Widget
          • DeFi Lending in Ledger Live
        • Using Kiln dApp
          • Dedicated Validators
          • Pooled Staking
          • EigenLayer Restaking
      • Stake from Safe{Wallet}
        • How to stake ETH on Safe & FAQ
        • DeFi Lending in Safe{Wallet}
        • Using Kiln dApp
      • Stake from Squads
    • 🏢Custody platforms
      • Stake from Anchorage
      • Stake from Bitgo
      • Stake from Coinbase Custody/Prime
      • Stake from Copper
      • Stake from Cordial Systems
      • Stake from DFNS
      • Stake from Finoa
      • Stake from Fireblocks
      • Stake from Fordefi
      • Stake from Hex Safe
      • Stake from Ledger Enterprise
      • Stake from Metamask Institutional
      • Stake from Rakkar
      • Stake from Utila
  • Working with Kiln
    • ☑️Staking & DeFi Track Record
    • ✅Security & Insurances
    • ☎️Support
      • FAQs
        • Enzyme FAQ
        • EigenLayer FAQ
        • Kiln x Safe{Wallet} FAQ
        • Ledger Live FAQ
Powered by GitBook
On this page
  • Reward rate of the pool
  • Rewards for a given user

Was this helpful?

Export as PDF
  1. Kiln Products
  2. Onchain
  3. Pooled Staking
  4. How to integrate
  5. Staking Interactions

Rewards

Reward rate of the pool

Used to retrieve the historical reward rate of the pool so that it can be displayed to your users in your native workflow.

The pool reward rate can only ever be based on a rolling historical average (we can never predict the future rate). The data returned includes the average of the last week, last month, last 3 months, last 6 months and 'all time'.

It is up to you to choose the which historical rolling average to use, but most partners currently use the last week.

TIP: you need to convert the results to a percentage (%). For example:

  • 'All Time' Gross Reward Rate returns: 26478817328005117

  • Convert to %

    • 26478817328005117 / 10^18 = .02647 (2.647%)

Using The Graph

Query

{
  erc20(id:"INTEGRATION_CONTRACT_ADDRESS") {
    address
    summaries {
      allTime {
        period
        entryCount
        totalGrossRewards
        totalNetRewards
        grossRewardRate
        netRewardRate
      }
      sixMonths {
        period
        entryCount
        totalGrossRewards
        totalNetRewards
        grossRewardRate
        netRewardRate
      }
      threeMonths {
        period
        entryCount
        totalGrossRewards
        totalNetRewards
        grossRewardRate
        netRewardRate
      }
      oneMonth {
        period
        entryCount
        totalGrossRewards
        totalNetRewards
        grossRewardRate
        netRewardRate
      }
      oneWeek {
        period
        entryCount
        totalGrossRewards
        totalNetRewards
        grossRewardRate
        netRewardRate
      }
    }
  }
}

Example results

{
  "data": {
    "erc20": {
      {
        "address": "0x0a868e4e07a0a00587a783720b76fad9f7eea009",
        "summaries": {
          "allTime": {
            "period": "0",
            "entryCount": "122",
            "totalGrossRewards": "83318815260827429",
            "totalNetRewards": "74986933734744687",
            "grossRewardRate": "26478817328005117",
            "netRewardRate": "23832092039793994"
          },
          "sixMonths": {
            "period": "15552000",
            "entryCount": "122",
            "totalGrossRewards": "83318815260827429",
            "totalNetRewards": "74986933734744687",
            "grossRewardRate": "26478817328005117",
            "netRewardRate": "23832092039793994"
          },
          "threeMonths": {
            "period": "7776000",
            "entryCount": "122",
            "totalGrossRewards": "83318815260827429",
            "totalNetRewards": "74986933734744687",
            "grossRewardRate": "26478817328005117",
            "netRewardRate": "23832092039793994"
          },
          "oneMonth": {
            "period": "2592000",
            "entryCount": "122",
            "totalGrossRewards": "83318815260827429",
            "totalNetRewards": "74986933734744687",
            "grossRewardRate": "26478817328005117",
            "netRewardRate": "23832092039793994"
          },
          "oneWeek": {
            "period": "604800",
            "entryCount": "92",
            "totalGrossRewards": "81604693950689434",
            "totalNetRewards": "73444224555620491",
            "grossRewardRate": "33758837634833258",
            "netRewardRate": "30384486833373929"
          }
        }
      }
    }
  }
}

Rewards for a given user

Used to retrieve the rewards of the given user based on their staked position

TIP: the result is in wei, you need to convert it to ETH. For example:

  • allTimeRewards = 46478817328005117

  • Convert to ETH

    • 46478817328005117 / 10^18 = 0.046478817ETH

allTimeRewards = ((sharesBalance * totalUnderlyingSupply) / totalSupply) - adjustedTotalDeposited

Using The Graph

Query

{
  erc20(id:"INTEGRATION_CONTRACT_ADDRESS") {
    totalSupply
    totalUnderlyingSupply
    balances(where:{staker:"USER_ADDRESS"}) {
      sharesBalance
      totalDeposited
      adjustedTotalDeposited
    }
  }
}

Example results

{
  "data": {
    "erc20": {
        "totalSupply": "1228270478518757",
        "totalUnderlyingSupply": "1230821549859160",
        "balances": [
          {
            "sharesBalance": "389251278627",
            "totalDeposited": "420000000000",
            "adjustedTotalDeposited": "389946465786"
          }
        ]
      }
    }
  }
}

PreviousStakingNextUnstaking & Withdrawals

Last updated 6 months ago

Was this helpful?

⛓️
🤽‍♂️
🥩