getInflationRate

Learn getInflationRate use cases, code examples, request parameters, response structure, and tips.

The getInflationRate RPC method returns a snapshot of inflation distribution for the current epoch, including how new SOL issuance is allocated between validators and the Solana Foundation. It provides a real-time view into the annualized inflation rate applied to token rewards and economic modeling.


✅ Common Use Cases

  • Estimate Staking Returns View the current annualized inflation rate allocated to validators—useful for estimating staking APRs.

  • Track Foundation Allocation Monitor the proportion of inflation being distributed to the Solana Foundation during the current epoch.

  • Analyze Current Economic Metrics Fetch up-to-date inflation data to evaluate Solana’s token issuance behavior in the active epoch.


🛠 Request Parameters

This method does not require any parameters.


📦 Response Structure

The result field returns an object:

{
  "total": 0.065,
  "validator": 0.06,
  "foundation": 0.005,
  "epoch": 540
}
Field
Type
Description

total

f64

Total inflation rate for the current epoch (e.g., 0.065 = 6.5% annualized).

validator

f64

Portion of inflation allocated to validators (e.g., 0.06 = 6%).

foundation

f64

Portion of inflation allocated to the Solana Foundation (e.g., 0.005 = 0.5%).

epoch

u64

Epoch number to which the inflation rates apply.


💡 Example: Fetch Current Inflation Rates

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getInflationRate"
}

Code Examples

const fetch = require('node-fetch');

async function getInflationRate(rpcUrl) {
  try {
    const response = await fetch(rpcUrl, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        jsonrpc: '2.0',
        id: 1,
        method: 'getInflationRate'
      }),
    });

    const data = await response.json();
    
    // Print the exact full response
    console.log('Full RPC Response:');
    console.log(JSON.stringify(data, null, 2));
    
    return data;
  } catch (error) {
    console.error('Error getting health:', error.message);
    return null;
  }
}

// Example usage
const RPC_URL = 'https://rpc.coinvera.io/?x-api-key=your-coinvera-x-api-key';

getInflationRate(RPC_URL);

Example Response

{
  "jsonrpc": "2.0",
  "result": {
    "epoch": 822,
    "foundation": 0,
    "total": 0.04395241940186995,
    "validator": 0.04395241940186995
  },
  "id": 1
}

🧠 Developer Tips

  • Epoch-Specific Data These values are specific to the current epoch. To understand future trends or configurations, use getInflationGovernor.

  • Annualized Rates Although values apply to the current epoch, they are expressed as annualized percentages, allowing for straightforward APR comparison.

  • Rates Evolve Over Time The inflation rate tapers gradually based on the long-term monetary policy. While getInflationGovernor outlines the trajectory, getInflationRate shows the effective rate right now.

  • Use in Wallets & Dashboards Integrate this endpoint to display real-time APR insights to delegators and validators.

Last updated