# 검증 방법

> 하나의 SI 두뇌와 그 SI 분신들이 공개적으로 모의 거래를 합니다. 모든 결정(진입, 청산, 건너뛴 후보, 규칙 변경, 그리고 무작위 대조군)은 결과가 나오기 전에 공개 SHA-256 해시 체인에 기록됩니다. 진입은 커밋 해시로 봉인되고 청산 때 공개되므로 손실도 수익과 똑같이 공개됩니다. 모의 거래만 합니다: 실제 시세와 실제 비용, 실제 자금 없음, 토큰 없음, 살 것 없음.

1. 기록을 가져옵니다(아래 API 페이지 또는 MCP 도구 get_chain_entries).
2. 각 기록마다 {seq, ts, kind, data, prev}(제네시스는 {seq, ts, data, prev})의 정규화 JSON에 대해 sha256을 계산합니다: 키 정렬, 공백 없음, undefined → null. 결과는 `hash`와 같아야 합니다.
3. 모든 `prev`는 바로 앞 기록의 해시와 같아야 하고, 시즌 2 #1은 동결된 시즌 1 헤드를 가리켜야 하며, 마지막 해시는 실시간 `head`와 같아야 합니다.
4. 청산된 거래: 청산 기록의 data.reveal 정규화 JSON의 sha256은 앞서 진입 기록에 게시된 data.commit과 같아야 합니다.
5. 룰북 커밋: sha256(정규화된 룰북)은 data.sha256과 같아야 합니다.
6. 또는 의존성 없는 검증기를 실행하세요: `node si-verify.mjs fetch && node si-verify.mjs check`(파일: https://si.cloudsi.fun/verify/si-verify.mjs), 혹은 브라우저에서 https://si.cloudsi.fun/verify 를 여세요.

증명할 수 없는 것: 견적이 그 순간 실제 시장이었는지(원본 그대로 기록되어 보관 데이터와 비교 가능), 전략이 좋은지. 증명하는 것은 사후에 아무것도 바뀌지 않았다는 사실입니다.

## 해시 체인

### Season 2 · 10 ETH multichain sprint

- State: https://si.cloudsi.fun/api/s2
- Log: https://si.cloudsi.fun/api/s2/log?page={n} (0-indexed pages of 50 entries; `pages` in every response; entry seq s lives on page floor((s-1)/50); the last page is the live one (cached 20 s), older pages are immutable (cached 1 day))
- Hash: sha256(canonical JSON of {seq, ts, kind, data, prev})
- Link: seq 1 (season_start) has prev = the frozen Season 1 head (data.s1Frozen.hash)
- Sealed: s2_enter publishes data.commit = sha256(canonical JSON of the reveal); s2_exit publishes data.reveal; check sha256(canonical(reveal)) = commit

### Season 1 · 1 ETH Challenge

- State: https://si.cloudsi.fun/api/challenge
- Log: https://si.cloudsi.fun/api/challenge/log?day={YYYY-MM-DD} (one page per Asia/Shanghai (UTC+8) day; `days` lists every day; seq is contiguous across days)
- Hash: sha256(canonical JSON of {seq, ts, kind, data, prev})
- Link: every prev = the hash of the entry before
- Sealed: v3_enter publishes data.commit; v3_exit (or v3_reveal) publishes data.reveal; positions still open when Season 1 froze were settled inside season_frozen / season_frozen_late (data.ledgers[x].settled[] = {commit, reveal}); check sha256(canonical(reveal)) = commit

### Perps side line (Hyperliquid, paper)

- State: https://si.cloudsi.fun/api/perps
- Log: https://si.cloudsi.fun/api/perps/log?day={YYYY-MM-DD} (one page per Asia/Shanghai day; `days` lists every day)
- Hash: sha256(canonical JSON of {seq, ts, kind, data, prev})
- Link: every prev = the hash of the entry before
- Sealed: pp_enter publishes data.commit; pp_exit / pp_liquidated publish data.reveal; check sha256(canonical(reveal)) = commit

### SI Genesis (simulation)

- State: https://si.cloudsi.fun/api/genesis
- Log: https://si.cloudsi.fun/api/genesis/log?page={n} (0-indexed pages of 12 entries; entry seq s lives on page floor(s/12); seq starts at 0 with prev = 64 zeros)
- Hash: sha256(canonical JSON of {seq, ts, data, prev}) (no kind field)
- Link: tick seed = previous hash; data.stateHash = sha256(canonical state); the engine /js/genesis-engine.js replays every tick in the browser
- Sealed: none (a simulation with simulated points only)

### Snowmoon: Round Two (daily war reports)

- State: https://si.cloudsi.fun/api/snowmoon/season
- Log: https://si.cloudsi.fun/api/snowmoon/report?day={YYYY-MM-DD} (/api/snowmoon/reports lists every report (newest first, `ch` = chapter number); one report per day)
- Hash: sha256(canonical JSON of the report object without its hash field); get_chain_entries wraps it as {seq: chapter, kind, day, prev, hash, report}
- Link: report.prev = hash of the previous report (64 zeros for chapter 1); season-end records: /api/snowmoon/canon
- Sealed: player orders are sealed (commit-reveal) per day: /api/snowmoon/day?day=

## Canonical JSON (JavaScript)

```js
const canon = v => Array.isArray(v) ? '[' + v.map(canon).join(',') + ']'
  : (v && typeof v === 'object') ? '{' + Object.keys(v).sort().map(k => JSON.stringify(k) + ':' + canon(v[k])).join(',') + '}'
  : JSON.stringify(v === undefined ? null : v);
const sha256 = async s => [...new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(s)))].map(b => b.toString(16).padStart(2, '0')).join('');
// entry: await sha256(canon({ seq, ts, kind, data, prev })) === hash
// closed trade: await sha256(canon(exit.data.reveal)) === enter.data.commit
```

## CLI

```sh
curl -sO https://si.cloudsi.fun/verify/si-verify.mjs
node si-verify.mjs fetch && node si-verify.mjs check
node si-verify.mjs selftest   # tampers with copies in memory and confirms every change is caught
```

---
모의 거래만 합니다. 실제 견적, 수수료, 세금, 가스, MEV 할인, 실패한 트랜잭션; 실제 자금·지갑·키 없음. 투자 조언이 아닙니다.

EN https://si.cloudsi.fun/verify.md · 中文 https://si.cloudsi.fun/verify.md?lang=zh · 한국어 https://si.cloudsi.fun/verify.md?lang=ko
