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

# EVM Kafka 토픽

> EVM 체인 Kafka 토픽 이름, 파티션 키, 페이로드 스키마 레퍼런스 목록.

ChainStream이 인덱싱하는 모든 EVM 체인에 대해 발행되는 Kafka 토픽의 권위 있는 목록입니다. 토픽 명명은 `{chain}` 접두사를 사용합니다 — 소비할 네트워크에 맞게 `eth`, `bsc`, `base`, `polygon`, `optimism`, `arbitrum`, `avalanche`, `zksync` 중 하나로 치환하세요.

엔드투엔드 연결 상세, SASL 크리덴셜, SDK 예시는 [접근 방식 → Kafka Streams → EVM Streams](/ko/docs/access-methods/kafka-streams/evm-streams)를 참고하세요. 권위 있는 Protobuf 정의는 [github.com/chainstream-io/streaming\_protobuf/evm](https://github.com/chainstream-io/streaming_protobuf/tree/main/evm)을 참고하세요.

## 파티셔닝

모든 EVM 토픽은 다음 중 하나로 파티션됩니다:

* **토큰 주소** (bytes20) — 토큰 중심 토픽(`tokens`, `dex.trades`, `dex.pools`, `candlesticks`, `token-prices`, `token-supplies`, `token-market-caps`, `trade-stats`, `token-holdings`)용
* **계정 주소** (bytes20) — 계정 중심 토픽(`balances`, `v1.transfers.proto`)용

동일 주소의 이벤트는 블록 순서로 같은 파티션에 도착합니다 — 파티션 단위로 컨슈머를 수평 확장해도 안전합니다.

## 토픽 매트릭스

`{chain}` ∈ `eth` | `bsc` | `base` | `polygon` | `optimism` | `arbitrum` | `avalanche` | `zksync` ([EVM Streams](/ko/docs/access-methods/kafka-streams/evm-streams)의 체인 가용성 매트릭스를 참고하세요).

### DEX 거래

| 토픽                             | Proto 메시지     | 스키마 파일                  | 설명                                            |
| ------------------------------ | ------------- | ----------------------- | --------------------------------------------- |
| `{chain}.dex.trades`           | `TradeEvents` | `evm/trade_event.proto` | 확인되는 대로 발행되는 원시 DEX 스왑                        |
| `{chain}.dex.trades.processed` | `TradeEvents` | `evm/trade_event.proto` | 동일 이벤트를 USD / 네이티브 가격, 의심 플래그, 중복 제거로 보강한 스트림 |

### 토큰

| 토픽                         | Proto 메시지     | 스키마 파일                  | 설명                           |
| -------------------------- | ------------- | ----------------------- | ---------------------------- |
| `{chain}.tokens`           | `TokenEvents` | `evm/token_event.proto` | 토큰 라이프사이클 이벤트 (생성, 업데이트, 이전) |
| `{chain}.tokens.created`   | `TokenEvents` | `evm/token_event.proto` | 토큰 생성 이벤트만 필터링한 스트림          |
| `{chain}.tokens.processed` | `TokenEvents` | `evm/token_event.proto` | 설명, 이미지, 소셜 링크로 보강된 토큰       |

### 토큰 수준 통계

| 토픽                                    | Proto 메시지             | 스키마 파일                             | 설명                        |
| ------------------------------------- | --------------------- | ---------------------------------- | ------------------------- |
| `{chain}.token-prices`                | `TokenPriceEvent`     | `evm/token_price_event.proto`      | 집계된 가격 업데이트 (USD + 네이티브)  |
| `{chain}.token-supplies`              | `TokenSupplyEvent`    | `evm/token_supply_event.proto`     | 유통 + 총 공급량 변동             |
| `{chain}.token-supplies.processed`    | `TokenSupplyEvent`    | `evm/token_supply_event.proto`     | 소수점 정규화 + USD 가치가 적용된 공급량 |
| `{chain}.token-market-caps.processed` | `TokenMarketCapEvent` | `evm/token_market_cap_event.proto` | 시가총액 (유통량 × 가격)           |
| `{chain}.token-holdings`              | `TokenHoldingEvent`   | `evm/token_holding_event.proto`    | 홀더 수, 상위 N 집중도            |
| `{chain}.trade-stats`                 | `TradeStatEvent`      | `evm/trade_stat_event.proto`       | 거래 수, 거래량, 매수자 / 매도자      |

### 잔고

| 토픽                           | Proto 메시지       | 스키마 파일                    | 설명                        |
| ---------------------------- | --------------- | ------------------------- | ------------------------- |
| `{chain}.balances`           | `BalanceEvents` | `evm/balance_event.proto` | 계정별 원시 잔고 변동 이벤트          |
| `{chain}.balances.processed` | `BalanceEvents` | `evm/balance_event.proto` | USD + 네이티브 가치로 보강된 잔고 이벤트 |

### DEX 풀

| 토픽                            | Proto 메시지       | 스키마 파일                     | 설명                                |
| ----------------------------- | --------------- | -------------------------- | --------------------------------- |
| `{chain}.dex.pools`           | `DexPoolEvents` | `evm/dex_pool_event.proto` | 풀 생성 / 업데이트 / 동기화 이벤트             |
| `{chain}.dex.pools.processed` | `DexPoolEvents` | `evm/dex_pool_event.proto` | 유동성 USD + 네이티브, 수수료 티어로 보강된 풀 이벤트 |

### 전송(Transfers)

| 토픽                                     | Proto 메시지          | 스키마 파일                        | 설명                                                   |
| -------------------------------------- | ------------------ | ----------------------------- | ---------------------------------------------------- |
| `{chain}.v1.transfers.proto`           | `TransfersMessage` | `evm/transfers_message.proto` | 모든 토큰 + 네이티브 전송 (ERC-20 / ERC-721 / ERC-1155 / 네이티브) |
| `{chain}.v1.transfers.processed.proto` | `TransfersMessage` | `evm/transfers_message.proto` | 블록 시점 가격 + USD 가치로 보강된 전송                            |

### 캔들스틱

| 토픽                     | Proto 메시지           | 스키마 파일              | 설명                    |
| ---------------------- | ------------------- | ------------------- | --------------------- |
| `{chain}.candlesticks` | `CandlestickEvents` | `candlestick.proto` | 여러 해상도에 걸친 사전 집계 OHLC |

## 컨슈머 예시

```python theme={null}
from confluent_kafka import Consumer
from streaming_protobuf.evm.trade_event_pb2 import TradeEvents

consumer = Consumer({
    "bootstrap.servers": "kafka.chainstream.io:9093",
    "security.protocol": "SASL_SSL",
    "sasl.mechanism": "SCRAM-SHA-512",
    "sasl.username": "<your-username>",
    "sasl.password": "<your-password>",
    "group.id": "my-consumer",
    "auto.offset.reset": "latest",
})
consumer.subscribe(["eth.dex.trades.processed"])

while True:
    msg = consumer.poll(1.0)
    if msg is None or msg.error():
        continue
    events = TradeEvents.FromString(msg.value())
    for trade in events.Trades:
        print(trade)
```

JavaScript와 Go 동등 예시는 [EVM Streams 가이드](/ko/docs/access-methods/kafka-streams/evm-streams)를 참고하세요.

## 다음 단계

<CardGroup cols={2}>
  <Card title="Solana Kafka 토픽" icon="sun" href="/ko/api-reference/kafka-topics/solana">
    Solana의 토픽 목록
  </Card>

  <Card title="Tron Kafka 토픽" icon="bolt" href="/ko/api-reference/kafka-topics/tron">
    Tron의 토픽 목록
  </Card>

  <Card title="Kafka Streams 개요" icon="server" href="/ko/docs/access-methods/kafka-streams/overview">
    연결, 인증, 파티션 모델
  </Card>

  <Card title="EVM Streams 가이드" icon="book" href="/ko/docs/access-methods/kafka-streams/evm-streams">
    필드 정의 및 컨슈머 예시
  </Card>
</CardGroup>
