PBS, MEV Auctions, and Timing Games TODO
Concept
MEV is the excess value that can be extracted by controlling which transactions get included in a block, their order, or their exclusion. Proposer-Builder Separation splits block assembly (the builder) from block proposal (the validator): the proposer signs a header without seeing the block's contents and takes whichever block carries the highest bid — on Ethereum this is widely implemented off-chain, routed through relays. Builders collect bundles from searchers to maximize a block's value, and hand a large share of that value back to the proposer as a bid, forming an auction. Timing games are when a proposer deliberately delays its proposal as late as possible within its slot to collect more MEV — an incentive problem that eats into block propagation slack and hurts network stability.
DEX and prediction-market user orders are prime sandwich/backrun targets, and settlement transactions can have their inclusion timing manipulated too — if defenses aren't built into the protocol from the start, they can't be bolted on later.
Code & Formula
# PBS·MEV 경매·타이밍 게임 — 빌더들이 블록 가치를 놓고 입찰하고, 제안자는 슬롯 안에서 제안 시점을 늦춰 더 높은 입찰을 노린다.
# 타이밍 게임은 "늦게 낼수록 입찰가는 오르지만 슬롯을 놓칠 확률도 오른다"는 트레이드오프를 기대값으로 최적화한다.
import random
random.seed(7)
def builder_bids(round_num):
# 서처 번들이 쌓일수록 빌더 입찰가가 오른다고 가정
return [round(random.uniform(0.5, 1.0) * (1 + 0.05 * round_num), 3) for _ in range(4)]
print("=== PBS 경매: 라운드마다 빌더 4곳이 입찰, 제안자는 최고가만 채택 ===")
for round_num in range(3):
bids = builder_bids(round_num)
print(f"라운드 {round_num}: 빌더 입찰 {bids} → 채택 입찰 {max(bids)}")
print("\n=== 타이밍 게임: 슬롯(12초) 안에서 제안 시점 t를 늦출수록 입찰가는 오르지만 놓칠 확률도 오른다 ===")
SLOT_SECONDS = 12
def bid_at(t):
return 1.0 + 0.15 * t # 늦게 제안할수록 더 많은 번들을 모아 입찰가 상승
def miss_probability(t):
return min(0.9, (t / SLOT_SECONDS) ** 2) # 마감에 가까울수록 네트워크 전파 실패 위험 급증
best_t, best_ev = 0, -1
for t in range(0, SLOT_SECONDS + 1):
ev = bid_at(t) * (1 - miss_probability(t))
if ev > best_ev:
best_t, best_ev = t, ev
print(f"t={t:2d}s 입찰가={bid_at(t):.2f} 놓칠확률={miss_probability(t):.2%} 기대수익={ev:.3f}")
print(f"\n기대수익 최대화 제안 시점: t={best_t}s (기대수익={best_ev:.3f}) — 무한정 늦추는 게 최선이 아니다")
docs/code/algorithms/algorithms-66.py
Exercise
Work out an actual sandwich scenario for your own market with real numbers, then compare whether a slippage cap, commit-reveal, or a private relay would actually be effective at mitigating it.
Practical Connection
Verex's LMSR price depends on execution order, so front-running is structurally possible, and orders placed right before an oracle result is finalized are similarly an MEV target — this ties directly into settlement timing and order-disclosure design.
Where it lands in Jayverse
- Verex: run the sandwich exercise with Verex's own numbers and pick one defense. A slippage cap, commit-reveal, or a private relay for orders placed near oracle finalization are three different costs and protections — work the real scenario now rather than deciding under pressure after the first extracted trade.
- Auditor: fold the chosen MEV defense into the settlement threat model. Since order-disclosure and settlement timing are named here as the same problem, the defense and its residual risk belong in the same document algorithms-100's ADR/threat-model exercise produces, not a separate note.
Key expressions
| Expression | 뜻 · 쓰이는 자리 |
|---|---|
| excess value | 초과 가치, 여분의 이익 · 정상적 거래 외에 추가로 뽑아낼 수 있는 가치를 말할 때. "the excess value that can be extracted" |
| without seeing | ~을 보지 않고(확인하지 않고) · 위임자가 내용을 확인 없이 서명할 때 쓰는 전치사구. "signs a header without seeing the block's contents" |
| route through | ~을 거쳐 전달되다 · 데이터나 요청이 특정 중개 경로를 통해 흐를 때. "routed through relays." |
| hand back | 되돌려주다, 넘겨주다 · 얻은 가치의 일부를 상대에게 돌려줄 때. "hand a large share of that value back" |
| eat into | (자원·여유를) 갉아먹다 · 어떤 행위가 여유분을 줄어들게 만들 때. "eats into block propagation slack" |
| bolt on later | 나중에 임시로 덧붙이다 · 처음부터 설계하지 않고 뒤늦게 추가할 때. "they can't be bolted on later" |
| prime target | 주요 표적, 공격받기 쉬운 대상 · 특정 거래가 공격에 취약할 때. "are prime sandwich/backrun targets" |
| PBS | 제안자-빌더 분리(Proposer-Builder Separation) · 블록 조립과 블록 제안을 분리하는 이더리움 MEV 완화 구조. "Proposer-Builder Separation splits block assembly (the builder) from block proposal" |
| MEV | 최대 추출 가능 가치(Maximal Extractable Value) · 블록 생성자가 거래 순서·포함·배제로 얻는 초과 이익. "MEV is the excess value that can be extracted" |
| LMSR | 로그마켓점수규칙(Logarithmic Market Scoring Rule) · Verex의 가격 결정 방식, 체결 순서에 따라 가격이 바뀌어 프론트러닝에 노출됨. "Verex's LMSR price depends on execution order, so front-running" |
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/.