Workspace IndexDev Notes › Nobody runs the peg — the competing bots are the mechanism

#18PoC

Nobody runs the peg — the competing bots are the mechanism

A perpetual future tracks spot with no expiry date forcing it to. What holds the two together is funding payments making the gap painful, and dozens of arbitrage bots racing each other to close it — which means the basis you observe is a readout of the cheapest arbitrageur's cost floor.

A week of data collection, no capital at risk. For one liquid asset, record spot, perp mark and the funding rate at every funding interval. Compute the basis series and look at its distribution rather than its mean: the width of the band it lives inside is an estimate of what the cheapest participant pays to close it, since anything wider would already have been traded away. Then price your own round trip — fees, slippage at your size, cost of capital, margin buffer — and put the two numbers side by side. If your cost sits inside the observed band there is room; if it sits outside, the honest conclusion is that you are reading the market, not competing in it. Source: a practitioner explanation of basis and funding arbitrage, 2026-08-27, with a worked example at 2% basis against roughly 0.75% total cost.

Why

The closing observation in the source is the best part, and it deserves to be the headline. A perpetual future has no central price-correcting process. The protocol emits one incentive — funding — and dozens of independently-owned bots, each trying to take money off the others, collectively produce the tracking behaviour. The mechanism is not a component of the system; it is the population of participants competing. That is a genuinely elegant piece of market design and it is worth naming precisely, because the same shape recurs everywhere in this catalogue: liquidations, oracle updates, MEV, bridge relaying — all of them are jobs nobody is assigned and everybody races for.

But the worked example has a unit error worth fixing, and fixing it exposes where the risk actually lives. The comparison offered is 2% basis against 0.75% total cost, and in shape that is exactly right — enter only when expected reward clears cost plus a risk premium. The problem is that the 2% is never paid to you. A dated future converges because delivery forces it: hold to expiry and the gap is realised, so basis is the payoff. A perpetual has no expiry, so there is no moment at which the gap must close and nothing that hands it over. What is actually paid is funding, per interval, for as long as you hold.

Which means the honest inequality contains a term the example hides. Not basis > cost, but expected funding per interval × number of intervals held > total cost. And the holding period is unknown at entry. A basis of 2% is a signal that funding is currently rich, not a receipt for 2%. If it compresses in one interval you collect one interval's funding and pay the full round trip; if it persists for a week you collect a week of it. The trade is therefore a bet on persistence, not on convergence, and that reframing changes what should be modelled — the source's more advanced list (funding forecasts, volatility, execution probability) is exactly the machinery for estimating the holding period, which is why professional systems have it and the simple version does not.

The asymmetric-liquidation problem the source raises is the sharpest practical point, and it is worth stating harder: delta-neutral is not risk-neutral. The position has no directional exposure to price. It has enormous exposure to where margin sits. Spot long on one venue and perp short on another means two independent margin engines, and a fast move makes one leg profitable and the other liquidatable — the profit is unrealised on venue A while venue B closes you at the worst moment. Nothing about the hedge is wrong; the hedge is only a hedge if both legs survive to be unwound together, and survival is a funding-and-collateral logistics problem, not a pricing one. That is why the professional answer is continuous margin monitoring and capital movement rather than a cleverer entry rule.

And the third thing follows from the first: the observed basis is not disagreement about price. If the band were wider than the cheapest arbitrageur's total cost, that arbitrageur would already have traded it away. So the width of the band the basis lives inside is a readout of the cost structure of the cheapest participant — venue fees, their size, their cost of capital, their required premium. Read that way, a persistent spread stops being noise and becomes information about who is present, which is a measurement anyone can take from public data without holding a position.

How it works

The loop, in eight steps

# Step The part that is not obvious
1–2 Observe spot and perp, compute basis = (perp − spot) / spot Sign matters: positive basis pays shorts, negative pays longs
3 Estimate funding income This, not the basis, is the payoff
4 Price fees, slippage, cost of capital Slippage is a function of your size, not the venue's
5 Enter only if reward > cost + risk premium The premium is what pays for step 7 going wrong
6 Buy spot, sell perp — near-simultaneously The gap between the two fills is unhedged, and it is where execution risk lives
7 Monitor basis and margin on both venues The margin half is the one that actually kills positions
8 Unwind both legs together on convergence "Convergence" is not guaranteed — there is no expiry to force it

The worked example, and the unit error in it

Spot $100, perp $102 → basis +2%. Costs: round trip 0.15%, slippage 0.10%, cost of capital 0.2%, risk premium 0.3% → 0.75%.

As stated Corrected
Test 2% > 0.75% → enter Expected funding × intervals held > 0.75%
Why the difference Assumes the 2% is collected Nothing pays you the 2% — a perp never expires
What the 2% actually is The payoff A signal that funding is currently rich
Hidden variable Holding period, unknown at entry
So the trade is a bet on Convergence Persistence

And at basis 0.3%: 0.3% < 0.75% → do nothing. That second case is the important one — an algorithm that never declines is not an algorithm, and the width of the no-trade band is the whole product.

Delta-neutral is not risk-neutral

Exposure Present?
Direction of price No — that is the point of the hedge
Funding rate flipping sign Yes
Margin fragmentation across venues Yes, and it is the one that liquidates you
Execution gap between the two fills Yes, briefly and completely
Venue solvency / withdrawal halt Yes — see third-party-blast-radius

A sharp move makes one leg deeply profitable and the other liquidatable at the same instant, and profit on venue A cannot post margin on venue B. This is why the professional system spends its complexity budget on collateral logistics rather than on entry signals, and it is the same fragmentation aqua-shared-liquidity claims to solve — a claim this card gives a way to test.

Why this is a market-design result, not a trading one

No participant is assigned the job of tracking spot. The protocol pays funding; bots compete for it; their orders move both prices toward each other. The peg is an emergent property of adversarial participants, which makes it robust in a way a designated market maker is not — and fragile in a different way: it holds only while the funding payment is large enough to cover somebody's costs. In a thin market with high venue fees, the cheapest arbitrageur's floor is high, the no-trade band is wide, and the perp is allowed to drift exactly that far.

Read alongside two-currencies-one-ledger, which makes the same move on a different asset — a claim about shared liquidity resolved into an observable spread — and the-settlement-instant, since every step above depends on a spot price somebody chose how to compute.

Why it belongs in this catalogue

A prediction market has the same structure with the arithmetic simplified: YES + NO should cost $1, and when it does not, the same population of bots is what pulls it back. The band around $1 is the same readout — the cheapest participant's cost floor — and it is measurable on any live venue today. Whatever settlement design this repository ends up with, the no-trade band is the number that says how accurate its prices can possibly be.

← All Dev Notes · Workspace Index · Top ↑

페그를 돌리는 주체는 없다 — 경쟁하는 봇들이 곧 메커니즘이다

영구선물에는 수렴을 강제하는 만기일이 없습니다. 둘을 붙들어 두는 것은 간격을 아프게 만드는 펀딩 지급과, 그 간격을 먼저 닫으려 경쟁하는 수십 개의 차익거래 봇입니다 — 그래서 관측되는 베이시스는 가장 싼 차익거래자의 비용 하한을 읽는 계기판입니다.

일주일 데이터 수집, 자본 위험 없음. 유동성 있는 자산 하나에 대해 매 펀딩 주기마다 현물가·퍼프 마크가격·펀딩비율을 기록합니다. 베이시스 시계열을 만들고 평균이 아니라 분포를 봅니다 — 그것이 머무는 밴드의 폭이 곧 가장 싼 참가자가 그 간격을 닫는 데 치르는 비용의 추정치입니다. 그보다 넓었다면 이미 거래되어 사라졌을 테니까요. 그다음 자신의 왕복 비용을 매깁니다 — 수수료, 자기 사이즈에서의 슬리피지, 자금조달비용, 증거금 버퍼 — 그리고 두 숫자를 나란히 놓습니다. 내 비용이 관측 밴드 안이면 여지가 있고, 밖이면 정직한 결론은 시장에서 경쟁하는 게 아니라 시장을 읽고 있는 것입니다. 출처: 베이시스·펀딩 차익거래에 대한 실무자 설명, 2026-08-27. 베이시스 2% 대 총비용 약 0.75% 의 계산 예시 포함.

원문의 마지막 관찰이 가장 좋은 부분이고, 제목이 될 자격이 있습니다. 영구선물에는 가격을 교정하는 중앙 프로세스가 없습니다. 프로토콜은 인센티브 하나 — 펀딩 — 만 내보내고, 서로에게서 돈을 뜯으려는 독립적으로 소유된 봇 수십 개집합적으로 추종 행동을 만들어 냅니다. 메커니즘은 시스템의 부품이 아니라, 경쟁하는 참가자 집단 자체입니다. 진짜로 우아한 시장 설계이고 정확히 이름 붙일 값이 있습니다 — 같은 모양이 이 카탈로그 도처에 되풀이되기 때문입니다: 청산, 오라클 갱신, MEV, 브릿지 릴레이 — 전부 아무에게도 배정되지 않았고 모두가 달려드는 일입니다.

다만 계산 예시에 고칠 값이 있는 단위 오류가 있고, 고치면 위험이 실제로 어디 사는지가 드러납니다. 제시된 비교는 베이시스 2% 대 총비용 0.75% 이고, 모양은 정확히 맞습니다 — 기대 보상이 비용에 위험 프리미엄까지 얹은 값을 넘을 때만 진입. 문제는 그 2%가 당신에게 지급되지 않는다는 것입니다. 만기가 있는 선물은 인도(delivery)가 수렴을 강제하므로 만기까지 들고 있으면 간격이 실현되고, 그래서 베이시스가 곧 손익입니다. 영구선물에는 만기가 없습니다. 간격이 반드시 닫혀야 하는 순간도, 그것을 건네주는 것도 없습니다. 실제로 지급되는 것은 보유하는 동안 주기마다 들어오는 펀딩뿐입니다.

그래서 정직한 부등식에는 예시가 숨긴 항이 하나 더 있습니다. 베이시스 > 비용 이 아니라 주기당 기대 펀딩 × 보유 주기 수 > 총비용 입니다. 그리고 보유 기간은 진입 시점에 미지입니다. 베이시스 2%는 지금 펀딩이 두텁다는 신호이지 2%짜리 영수증이 아닙니다. 한 주기 만에 압축되면 한 주기치 펀딩을 받고 왕복 비용은 전액 냅니다. 일주일 지속되면 일주일치를 받습니다. 그러므로 이 거래는 수렴에 거는 베팅이 아니라 지속성에 거는 베팅이고, 이 재프레이밍이 무엇을 모델링해야 하는지를 바꿉니다 — 원문의 고급 목록(펀딩 예상치, 변동성, 체결 확률)은 정확히 보유 기간을 추정하는 기계장치이고, 그래서 전문 시스템에는 있고 단순 버전에는 없는 것입니다.

원문이 짚은 비대칭 청산 문제가 실무적으로 가장 날카롭고, 더 세게 말할 값이 있습니다 — 델타 중립은 위험 중립이 아닙니다. 이 포지션은 가격 방향 노출이 없습니다. 대신 증거금이 어디 앉아 있는가에 대한 노출이 막대합니다. 현물 롱이 한 거래소, 퍼프 숏이 다른 거래소면 독립된 증거금 엔진 둘이고, 급변동은 한 다리를 이익으로, 다른 다리를 청산 가능 상태로 만듭니다 — A에서는 이익이 미실현인 채 B가 최악의 순간에 당신을 닫습니다. 헤지가 틀린 게 아닙니다. 헤지는 두 다리가 함께 풀릴 때까지 살아남아야만 헤지이고, 생존은 가격 문제가 아니라 자금·담보 물류 문제입니다. 전문가의 답이 더 영리한 진입 규칙이 아니라 지속적인 증거금 감시와 자금 이동인 이유가 그것입니다.

그리고 세 번째는 첫 번째에서 따라 나옵니다 — 관측되는 베이시스는 가격에 대한 이견이 아닙니다. 밴드가 가장 싼 차익거래자의 총비용보다 넓었다면 그자가 이미 거래해서 없앴을 것입니다. 그러므로 베이시스가 머무는 밴드의 폭은 가장 싼 참가자의 비용 구조를 읽는 계기판입니다 — 거래소 수수료, 그자의 사이즈, 자금조달비용, 요구 프리미엄. 그렇게 읽으면 지속되는 스프레드는 잡음이기를 그만두고 누가 거기 있는가에 대한 정보가 되고, 포지션 없이 공개 데이터만으로 누구나 잴 수 있는 측정이 됩니다.

동작 방식

루프, 여덟 단계

# 단계 자명하지 않은 부분
1–2 현물·퍼프 관찰, 베이시스 = (퍼프 − 현물) / 현물 부호가 중요: 양의 베이시스는 숏에게 지급, 음이면 롱에게
3 펀딩 수익 추정 베이시스가 아니라 이것이 손익
4 수수료·슬리피지·자금조달비용 산정 슬리피지는 거래소가 아니라 당신 사이즈의 함수
5 보상 > 비용 + 위험 프리미엄일 때만 진입 프리미엄은 7단계가 틀어질 때를 위한 값
6 현물 매수 + 퍼프 매도, 거의 동시 두 체결 사이의 간극은 무헤지이고, 체결 위험이 사는 자리
7 베이시스 그리고 양 거래소의 증거금 감시 실제로 포지션을 죽이는 쪽은 증거금 절반
8 수렴하면 두 다리 동시 청산 "수렴"은 보장되지 않음 — 강제할 만기가 없음

계산 예시, 그리고 그 안의 단위 오류

현물 $100, 퍼프 $102 → 베이시스 +2%. 비용: 왕복 0.15%, 슬리피지 0.10%, 자금조달 0.2%, 위험 프리미엄 0.3% → 0.75%.

적힌 대로 교정
판정 2% > 0.75% → 진입 기대 펀딩 × 보유 주기 수 > 0.75%
차이의 이유 2%를 회수한다고 전제 2%를 지급하는 주체가 없음 — 퍼프는 만기가 없음
2%의 정체 손익 지금 펀딩이 두텁다는 신호
숨은 변수 보유 기간, 진입 시점에 미지
그래서 이 거래가 거는 것 수렴 지속성

그리고 베이시스 0.3%일 때: 0.3% < 0.75% → 아무것도 하지 않음. 이 두 번째 사례가 중요한 쪽입니다 — 한 번도 거절하지 않는 알고리즘은 알고리즘이 아니고, 거래하지 않는 밴드의 폭이 곧 제품 전부입니다.

델타 중립은 위험 중립이 아니다

노출 있나?
가격 방향 없음 — 헤지의 목적이 그것
펀딩 부호가 뒤집힘 있음
거래소 간 증거금 분절 있음, 그리고 이것이 당신을 청산시킴
두 체결 사이의 간극 있음 — 짧고 완전하게
거래소 지급불능·출금 중단 있음 — third-party-blast-radius 참조

급변동은 같은 순간에 한 다리를 깊은 이익으로, 다른 다리를 청산 가능으로 만들고, A의 이익은 B에 증거금을 넣어줄 수 없습니다. 전문 시스템이 복잡도 예산을 진입 신호가 아니라 담보 물류에 쓰는 이유이고, aqua-shared-liquidity 가 해결하겠다고 주장하는 바로 그 분절입니다 — 이 카드는 그 주장을 시험할 방법을 줍니다.

왜 이것이 트레이딩 결과가 아니라 시장 설계 결과인가

현물을 추종하는 일을 배정받은 참가자가 없습니다. 프로토콜은 펀딩을 지급하고, 봇들이 그것을 두고 경쟁하고, 그 주문들이 양쪽 가격을 서로에게 끌어당깁니다. 페그는 적대적 참가자들로부터 창발한 성질이고, 그래서 지정 마켓메이커에게는 없는 방식으로 견고합니다 — 그리고 다른 방식으로 취약합니다. 펀딩 지급이 누군가의 비용을 덮을 만큼 클 때만 유지되기 때문입니다. 거래소 수수료가 높은 얕은 시장에서는 가장 싼 차익거래자의 하한이 높고, 거래하지 않는 밴드가 넓고, 퍼프는 정확히 그만큼 벗어나도 됩니다.

다른 자산에 같은 동작을 하는 two-currencies-one-ledger — 공유 유동성 주장을 관측 가능한 스프레드로 환원 — 그리고 위 모든 단계가 누군가 계산 방식을 정한 현물 가격에 의존하므로 the-settlement-instant 와 함께 읽습니다.

왜 이 카탈로그에 속하는가

예측시장은 산수만 단순해진 같은 구조입니다 — YES + NO 는 $1이어야 하고, 그렇지 않을 때 되돌리는 것은 같은 봇 집단입니다. $1 주변의 밴드는 똑같은 계기판이고 — 가장 싼 참가자의 비용 하한 — 오늘 어느 라이브 거래소에서든 잴 수 있습니다. 이 저장소가 어떤 정산 설계로 가든, 거래하지 않는 밴드의 폭이 곧 그 가격이 도달할 수 있는 정확도의 상한입니다.

← 전체 개발 노트 · 워크스페이스 인덱스 · 맨 위 ↑