Workspace IndexAlgorithms › Day 65

Fraud Proofs vs. Validity Proofs: The Game Theory TODO

Algorithms · Day 65 / 100 · D. Distributed Systems & Consensus (Day 52-68)

Concept

Fraud-proof systems provisionally assume a submitted state transition is valid, and roll it back via on-chain verification only if someone flags a fault within the challenge window. This scheme's safety rests not on cryptography but on game-theoretic assumptions: at least one honest challenger must exist (1-of-N), and that challenger must be able to get a transaction onto L1 within the challenge window without being censored. This creates the verifier's dilemma — verification always costs something, but the payoff only materializes if fraud actually occurred, so a rational participant has an incentive to skip verification; bonds and slashing are used to correct for that. Validity-proof systems instead show cryptographically that the state transition followed the rules, so they need neither an honest-watcher assumption nor a challenge window. In exchange, the risk shifts to the cost of generating proofs and to the trusted setup or implementation bugs of the proof system itself. So the real difference between the two isn't 'who do you trust' — it's whether the risk lives in incentive design or in cryptography and code.

Once assets live on an L2, the withdrawal delay, the assumption that a challenger exists, and censorship resistance become the actual safety conditions on user funds. Miss this and you'll misjudge the real trust assumptions in a bridge or settlement design.

Code & Formula

# 사기 증명 vs 유효성 증명의 게임 이론 — 본드·이득·검증비용·적발확률로 "사기가 손해"인 조건을 구한다.
# 기대이익 = (1-p)*이득 - p*본드 가 0보다 작아야 사기가 억제되며, 그 경계 p*를 계산한다.

def expected_profit_from_fraud(gain, bond, detect_prob):
    return (1 - detect_prob) * gain - detect_prob * bond

gain = 50_000          # 사기가 성공했을 때 얻는 이득
bond = 100_000         # 사기가 적발되면 몰수당하는 본드(슬래싱)
challenge_cost = 500   # 정직한 챌린저가 검증·이의제기에 쓰는 비용

for detect_prob in (0.3, 0.5, 0.7, 0.9):
    ev = expected_profit_from_fraud(gain, bond, detect_prob)
    verdict = "사기 시도가 이득" if ev > 0 else "사기 시도가 손해(억제됨)"
    print(f"적발확률 p={detect_prob:.1f} → 기대이익={ev:,.0f} → {verdict}")

# 손익분기 적발확률: (1-p)*gain - p*bond = 0  =>  p* = gain / (gain + bond)
breakeven_p = gain / (gain + bond)
print(f"\n손익분기 적발확률 p* = {breakeven_p:.3f} (이보다 낮으면 사기가 합리적 선택이 된다)")

# verifier's dilemma: 챌린지 비용이 있으므로, 적발 시 보상이 최소 challenge_cost는 넘어야
# 합리적 챌린저가 실제로 나선다 — 그렇지 않으면 아무도 검증하지 않아 p 자체가 0에 가까워진다
slashed_reward_share = bond * 0.1  # 슬래싱된 본드의 10%를 챌린저에게 분배한다고 가정
incentive = "있음" if slashed_reward_share > challenge_cost else "없음"
print(f"챌린저 보상(본드의 10%)={slashed_reward_share:,.0f} vs 챌린지 비용={challenge_cost:,} → 챌린저가 나설 유인 {incentive}")

Exercise

Set bond size, the payoff from a successful fraud attempt, challenge cost, and detection probability as variables, write out the inequality that makes attempting fraud unprofitable, and work out which parameter breaking makes the attack profitable.

Practical Connection

If Verex settles on an L2 or rollup, the challenge period sets the floor on when a winner can actually withdraw funds, so the UX design from market close to fund withdrawal is directly tied to this choice.

Where it lands in Jayverse

Key expressions

Words and phrases from this page worth keeping, with the Korean meaning and the sentence they come from.

Expression뜻 · 쓰이는 자리
provisionally잠정적으로, 일단은 · "provisionally assume a submitted state transition is valid"
roll back(상태를) 되돌리다 · "roll it back via on-chain verification"
verifier's dilemma검증자의 딜레마(검증 비용은 드는데 보상은 불확실한 상황) · "This creates the verifier's dilemma"
rational이기적으로 계산해서 합리적으로 행동하는 · "a rational participant has an incentive to skip verification"
slashing예치금을 몰수/삭감하는 벌칙 · "bonds and slashing are used to correct for that"
shift (risk)위험이 다른 쪽으로 옮겨가다 · "the risk shifts to the cost of generating proofs"
set the floor on~의 하한선을 정하다 · "sets the floor on when a winner can actually withdraw"
trusted setup신뢰된 설정(trusted setup) · zk-SNARK 등에서 초기 매개변수를 생성하는 절차, 손상되면 증명 시스템 전체가 위험해짐. "the trusted setup or implementation bugs of the proof system itself"

If you study this on a given day, add a note link and a ✅ to this line in the source curriculum (docs/knowledge/dev-100-curriculum.md) and this spot will lead straight to the note body. You can also write directly on this page — but regenerating overwrites it, so it's safer to keep anything you want to save as markdown under docs/algorithms/.


한국어

사기 증명 vs 유효성 증명의 게임 이론 TODO

Algorithms · Day 65 / 100 · D. 분산시스템·합의 (Day 52–68)

개념

사기 증명(fraud proof) 방식은 제출된 상태 전이를 일단 유효하다고 가정하고, 챌린지 기간 안에 누군가 잘못을 지적하면 온체인 검증으로 되돌리는 구조다. 이 방식의 안전성은 암호학이 아니라 게임이론 가정에 의존하는데, 정직한 챌린저가 최소 한 명 존재하고(1-of-N) 그가 챌린지 기간 내에 검열당하지 않고 L1에 트랜잭션을 넣을 수 있어야 한다. 여기서 verifier's dilemma가 생기는데, 검증에는 항상 비용이 들지만 보상은 사기가 실제로 일어났을 때만 발생하므로 합리적 참여자는 검증을 게을리할 유인을 갖고, 이를 본드와 슬래싱으로 보정한다. 유효성 증명(validity proof) 방식은 상태 전이가 규칙을 따랐음을 암호학적 증명으로 보여 주므로 정직한 감시자 가정도 챌린지 기간도 필요 없다. 대신 증명 생성 비용과 증명 시스템 자체의 신뢰 설정·구현 버그로 위험이 옮겨 가므로, 둘의 차이는 '누구를 믿는가'가 아니라 '위험이 인센티브 설계에 있느냐 암호학과 코드에 있느냐'다.

L2 위에서 자산을 다루면 출금 지연 기간, 챌린저 존재 가정, 검열 저항 같은 조건이 곧 사용자 자금의 안전 조건이 된다. 이를 모르면 브리지나 정산 설계에서 실제 신뢰 가정을 잘못 잡는다.

코드 · 수식

# 사기 증명 vs 유효성 증명의 게임 이론 — 본드·이득·검증비용·적발확률로 "사기가 손해"인 조건을 구한다.
# 기대이익 = (1-p)*이득 - p*본드 가 0보다 작아야 사기가 억제되며, 그 경계 p*를 계산한다.

def expected_profit_from_fraud(gain, bond, detect_prob):
    return (1 - detect_prob) * gain - detect_prob * bond

gain = 50_000          # 사기가 성공했을 때 얻는 이득
bond = 100_000         # 사기가 적발되면 몰수당하는 본드(슬래싱)
challenge_cost = 500   # 정직한 챌린저가 검증·이의제기에 쓰는 비용

for detect_prob in (0.3, 0.5, 0.7, 0.9):
    ev = expected_profit_from_fraud(gain, bond, detect_prob)
    verdict = "사기 시도가 이득" if ev > 0 else "사기 시도가 손해(억제됨)"
    print(f"적발확률 p={detect_prob:.1f} → 기대이익={ev:,.0f} → {verdict}")

# 손익분기 적발확률: (1-p)*gain - p*bond = 0  =>  p* = gain / (gain + bond)
breakeven_p = gain / (gain + bond)
print(f"\n손익분기 적발확률 p* = {breakeven_p:.3f} (이보다 낮으면 사기가 합리적 선택이 된다)")

# verifier's dilemma: 챌린지 비용이 있으므로, 적발 시 보상이 최소 challenge_cost는 넘어야
# 합리적 챌린저가 실제로 나선다 — 그렇지 않으면 아무도 검증하지 않아 p 자체가 0에 가까워진다
slashed_reward_share = bond * 0.1  # 슬래싱된 본드의 10%를 챌린저에게 분배한다고 가정
incentive = "있음" if slashed_reward_share > challenge_cost else "없음"
print(f"챌린저 보상(본드의 10%)={slashed_reward_share:,.0f} vs 챌린지 비용={challenge_cost:,} → 챌린저가 나설 유인 {incentive}")

연습

본드 크기, 사기 성공 시 이득, 챌린지 비용, 적발 확률을 변수로 두고 '사기를 시도하는 것이 손해가 되는' 부등식을 직접 세운 뒤, 어느 파라미터가 무너질 때 공격이 이득이 되는지 계산하라.

실무 · Verex 연결

Verex가 L2나 롤업 위에서 정산을 돌린다면 챌린지 기간이 곧 승자 출금 가능 시점의 하한이 되므로, 시장 마감부터 자금 인출까지의 UX 설계가 이 선택에 직접 묶인다.

Jayverse에서의 위치

핵심 표현

이 페이지의 영어 본문에서 배울 만한 단어와 표현, 뜻과 나온 자리.

Expression뜻 · 쓰이는 자리
provisionally잠정적으로, 일단은 · "provisionally assume a submitted state transition is valid"
roll back(상태를) 되돌리다 · "roll it back via on-chain verification"
verifier's dilemma검증자의 딜레마(검증 비용은 드는데 보상은 불확실한 상황) · "This creates the verifier's dilemma"
rational이기적으로 계산해서 합리적으로 행동하는 · "a rational participant has an incentive to skip verification"
slashing예치금을 몰수/삭감하는 벌칙 · "bonds and slashing are used to correct for that"
shift (risk)위험이 다른 쪽으로 옮겨가다 · "the risk shifts to the cost of generating proofs"
set the floor on~의 하한선을 정하다 · "sets the floor on when a winner can actually withdraw"
trusted setup신뢰된 설정(trusted setup) · zk-SNARK 등에서 초기 매개변수를 생성하는 절차, 손상되면 증명 시스템 전체가 위험해짐. "the trusted setup or implementation bugs of the proof system itself"

공부한 날 원본 커리큘럼(docs/knowledge/dev-100-curriculum.md)의 이 줄에 노트 링크와 ✅ 를 붙이면, 이 자리는 노트 본문으로 바로 이어집니다. 노트 없이 이 페이지에 바로 적어도 됩니다 — 다만 다시 생성하면 덮어쓰이므로, 남길 글은 docs/algorithms/ 의 마크다운으로 쓰는 편이 안전합니다.

← 1117. 시퀀서 분산화와 강제 포함(force inclusion)1119. PBS·MEV 경매·타이밍 게임 →