> ## Documentation Index
> Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# getInflationRate 사용 방법

> getInflationRate 사용 사례, 코드 예제, 요청 매개 변수, 응답 구조 및 팁을 알아보십시오.

[`getInflationRate`](https://www.helius.dev/docs/api-reference/rpc/http/getinflationrate) RPC 메서드는 현재 에폭에 대한 [인플레이션](https://www.helius.dev/blog/solana-issuance-inflation-schedule) 비율을 세부적으로 반환합니다. 여기에는 총 인플레이션 비율, 검증자에게 할당된 부분, 재단에 할당된 부분 및 해당 비율이 적용되는 에폭 번호가 포함됩니다.

이 메서드는 새 토큰 발행(인플레이션)으로부터의 현재 보상 배포에 대한 스냅샷을 제공합니다.

## 일반적인 사용 사례

* **스테이킹 보상 추산:** 검증자들에게 배분되는 현재 연간 인플레이션 비율을 이해하는 것은 스테이킹 APR 계산의 주요 요소입니다.
* **재단 할당 모니터링:** 현재 인플레이션 중 Solana 재단에 향하는 부분을 관찰합니다.
* **현재 에폭 분석:** 활성 에폭에 대한 인플레이션 지표를 빠르게 파악합니다.

## 요청 매개 변수

이 메서드는 매개 변수를 필요로 하지 않습니다.

## 응답 구조

JSON-RPC 응답의 `result` 필드는 다음을 포함하는 객체입니다:

* **`total`** (f64): 현재 에폭에 대한 총 인플레이션 비율 (예: 0.065는 6.5%).
* **`validator`** (f64): 현재 에폭에 대해 검증자에게 할당된 총 인플레이션 비율의 부분 (예: 0.06은 6%).
* **`foundation`** (f64): 현재 에폭에 대해 재단에 할당된 총 인플레이션 비율의 부분 (예: 0.005는 0.5%).
* **`epoch`** (u64): 이러한 인플레이션 비율이 유효한 에폭 번호.

## 예제

### 1. 현재 에폭 인플레이션 비율 가져오기

이 예제는 현재 에폭에 대한 인플레이션 비율 세부 정보를 가져옵니다.

<CodeGroup>
  ```bash cURL theme={"system"}
  curl https://mainnet.helius-rpc.com/?api-key=<api-key> -X POST -H "Content-Type: application/json" -d \
    '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getInflationRate"
    }'
  ```

  ```javascript JavaScript (using @solana/web3.js) theme={"system"}
  const { Connection } = require('@solana/web3.js');

  async function logCurrentInflationRate() {
    const connection = new Connection('https://mainnet.helius-rpc.com/?api-key=<api-key>');
    try {
      const inflationRate = await connection.getInflationRate();
      console.log(`Inflation Rate for Epoch ${inflationRate.epoch}:`);
      console.log(`  Total: ${(inflationRate.total * 100).toFixed(4)}%`);
      console.log(`  Validator: ${(inflationRate.validator * 100).toFixed(4)}%`);
      console.log(`  Foundation: ${(inflationRate.foundation * 100).toFixed(4)}%`);
      // For full raw details:
      // console.log(JSON.stringify(inflationRate, null, 2));
    } catch (error) {
      console.error('Error fetching inflation rate:', error);
    }
  }

  logCurrentInflationRate();
  ```
</CodeGroup>

## 개발자 팁

* **에폭 구체적:** 반환된 값은 쿼리 시점의 현재 에폭에 특정됩니다. 이러한 비율은 `getInflationGovernor`에 의해 정의된 전체 인플레이션 일정에서 파생되지만, 특정 에폭에 대한 연간 비율을 나타냅니다.
* **연간 비율:** 비율은 일반적으로 연간 비율로 표현되지만, 이는 현재 에폭에 적용됩니다.
* **동적 값:** 기본 인플레이션 일정 (`getInflationGovernor`)은 드물게 변경되지만, 전체 인플레이션이 점차 감소함에 따라 계산된 `getInflationRate`는 매 에폭마다 변동합니다.

이 가이드는 현재 에폭의 인플레이션 분배에 대한 스냅샷을 얻기 위해 `getInflationRate` RPC 메서드를 사용하는 방법을 설명합니다.

## 관련 메서드

<CardGroup cols={2}>
  <Card title="getInflationGovernor" href="/docs/ko/api-reference/rpc/http/getinflationgovernor">
    기본 인플레이션 매개 변수 가져오기
  </Card>

  <Card title="getInflationReward" href="/docs/ko/api-reference/rpc/http/getinflationreward">
    특정 주소에 대한 인플레이션 보상 가져오기
  </Card>
</CardGroup>
