---
eip: 8071
label: EIP-8071
title: Prevent using consolidations as withdrawals
status: Draft
type: Standards Track
category: Core
created: 2025-10-29
official: https://eips.ethereum.org/EIPS/eip-8071
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-8071.md
canonical: https://eips.huatuo.xyz/ko/eip-8071/
lang: ko
tldr: 대상 검증자가 최대 유효 잔액을 넘게 되는 검증자 통합 요청을 취소하여, 스테이커가 통합 대기열을 더 빠른 퇴출 대기열로 쓰던 허점을 막는다.
tags: [consensus, staking, consolidation, withdrawals, pectra]
---

# EIP-8071: Prevent using consolidations as withdrawals

> Cancels consolidation if the max effective balance of the target validator will be exceeded, preventing the withdrawal of the unused balance

**TL;DR:** 대상 검증자가 최대 유효 잔액을 넘게 되는 검증자 통합 요청을 취소하여, 스테이커가 통합 대기열을 더 빠른 퇴출 대기열로 쓰던 허점을 막는다.

## 어떤 문제를 해결하나요?

[EIP-7251](/eip-7251/)(Pectra)은 최대 유효 잔액을 2048 ETH로 올리고 **통합(consolidation)**을 추가했습니다. 검증자는 compounding 자격 증명을 가진 다른 검증자에게 자신의 스테이크를 합칠 수 있습니다. 원본 검증자는 통합 대기열을 통해 퇴출되고, 그 잔액은 대상으로 옮겨집니다.

결함은 이렇습니다. 대상이 최대 유효 잔액을 넘게 되면 초과분은 그냥 인출됩니다. 그래서 통합 대기열이 일반 퇴출 대기열보다 빠르게 진행되던 때에는, 스테이커가 거의 가득 찬 검증자로 "통합"해서 정상 퇴출보다 빨리 ETH를 꺼낼 수 있었습니다. 스펙은 작성 시점에 이것이 활발히 악용되고 있었고 그 방법을 설명한 공개 글이 있다고 밝힙니다. 보안 버그가 아니라 UX와 공정성 문제로 규정됩니다. 통합 대기열은 원래 인출용이 아니기 때문입니다.

## 어떻게 동작하나요?

합의 레이어의 `process_consolidation_request`에 검사가 하나 추가됩니다. 요청을 받아들이기 전에 다음을 계산합니다.

```
target balance after = pending consolidations already queued for the target
                     + source effective balance
                     + target's current balance
```

이 값이 대상의 최대 유효 잔액을 넘으면, 다른 유효하지 않은 통합 요청과 마찬가지로 요청은 조용히 무시됩니다.

새 헬퍼 `get_pending_balance_to_consolidate`는 같은 대상으로 이미 대기열에 들어 있는 모든 원본의 유효 잔액을 합산합니다. 이로써 요청이 하나씩은 문제없지만 합치면 대상이 넘치는 경우를 잡아냅니다.

## 샘플 코드

스펙에서 가져온, 새 헬퍼와 추가된 검사:

```python
def get_pending_balance_to_consolidate(state: BeaconState, target_index: ValidatorIndex) -> Gwei:
    total = Gwei(0)
    for pc in state.pending_consolidations:
        if pc.target_index == target_index:
            total += state.validators[pc.source_index].effective_balance
    return total

# inside process_consolidation_request, after the existing checks:
target_balance_after_consolidation = (
    get_pending_balance_to_consolidate(state, target_index)
    + source_validator.effective_balance
    + state.balances[target_index]
)
if target_balance_after_consolidation > get_max_effective_balance(target_validator):
    return  # cancelled: excess would otherwise be withdrawn
```

## 알아둘 점

- **상태: Draft.** 합의 변경이므로 예정된 네트워크 업그레이드가 필요합니다.
- 취소된 요청은 합의 레이어에서 버려지지만, **실행 레이어의 요청 수수료와 가스는 환불되지 않습니다.** 제출하기 전에 대상의 여유를 확인하세요.
- 이 검사는 대상의 유효 잔액뿐 아니라 실제 잔액을 사용하므로, 대상에 쌓인 보상도 한도에 포함됩니다.
- compounding 자격 증명으로 전환하기 위한 자기 통합은 영향을 받지 않습니다.
- 퇴출하려면 일반 퇴출 대기열이나 실행 레이어가 트리거하는 퇴출([EIP-7002](/eip-7002/))을 사용하세요.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-8071
