EVM Perp · サンドボックス合格
Position buildup
ストレスイベント前の、複数アカウントにわたる建玉の健全な積み上げ——他のすべてのシナリオが継承するステージング状態。
2件の成行買い(10@100、次に 10@110)で Alice は平均建値105で20枚のロング——クリアリング層による VWAP。
何が起きるか
単一のトレーダーが異なる価格で2件の成行買いを通じてロングポジションを積み上げ、クリアリング層の VWAP 方式 `avg_entry` 計算を示す。Alice はまず10枚を100で買い(avg_entry = 100)、次にさらに10枚を110で買う(avg_entry は105へ加重)。メイカーは同じ VWAP でマッチするショート側を取る。エンジンは複数の約定にまたがってエントリー価格をどう追跡するか? アカウントが比較される未実現損益の基準は何か?——を問うのに有用。最終マークは小さなマークブックで100へ戻り、シナリオが清算を引き起こさないようにしている——これは `walkthrough` であってストレスではない。
宣言された結果
宣言した各結果は、実行時の実際の状態に対して ✓ 合格 / ✗ 不合格 で採点されます。
- 取引が触れたアカウントはちょうど2件(Alice+メイカー)
- 約定はちょうど2件(段階的な2件の成行買い)
- 2件の買い以外に想定外の約定はない
- Alice の証拠金はポジションを賄う;清算スキャンヒットはゼロ(これは walkthrough でありストレスではない)
- Alice は2件の成行買いの後、+20 ロングで終了
- Alice の avg_entry は2件の約定の VWAP:(10×100 + 10×110) / 20 = 105
- メイカーは同じ VWAP でマッチする -20 ショートで終了
- メイカーの avg_entry は対称的に同じ VWAP の105
8件中8件の結果を検証
実行を1ブロックずつ辿る
マーク100ソースstub-empty-book取引1約定0入金2清算0ADL—
検証レポート(原文)
ツールが出力する英語の原文レポート(5セクション)——毎回同一です。
─── scenario: position-buildup ────────────────────────────────────
HEADLINE ✓: Two market buys, 10@100 then 10@110, leave Alice long 20 contracts at avg_entry 105 — VWAP via the clearing layer.
DESCRIPTION:
A single trader builds a long position over two market buys at different prices, demonstrating the clearing layer's VWAP-style `avg_entry` computation. Alice first buys 10 contracts at 100 (avg_entry = 100), then buys another 10 at 110 (avg_entry weighted to 105). The maker takes the matching short side at the same VWAP. Useful for asking: how does the engine track entry price across multiple fills? What is the unrealized P&L baseline an account is compared against?
Final mark settles back to 100 via a small mark-book so the scenario doesn't trigger liquidations — this is a `walkthrough`, not stress.
TIMELINE (per-block):
height mark src trades fills deposits liqs adl fund
------ ------ --------------- ------ ----- -------- ---- --- ----
1 100 stub-empty-book 1 0 2 0 — —
2 100 stub-empty-book 1 1 0 0 — —
3 100 stub-empty-book 1 0 0 0 — —
4 100 stub-empty-book 1 1 0 0 — —
5 100 clob 2 0 0 0 — —
ACCOUNT DELTA (final − initial):
account collateral position avg_entry
------- ---------- -------- ---------
10 5000 20 105
100 5000 -20 105
(initial account count: 0, final account count: 2)
OUTCOMES:
✓ Exactly 2 accounts touched by trades (Alice + maker)
✓ Exactly two fills (the two staged market buys)
✓ No surprise fills beyond the two buys
✓ Alice's collateral covers her position; zero liquidation scan-hits (this is a walkthrough, not stress)
✓ Alice ends with +20 long after both market buys
✓ Alice's avg_entry is the VWAP of the two fills: (10×100 + 10×110) / 20 = 105
✓ Maker ends with the matching -20 short at the same VWAP
✓ Maker's avg_entry is symmetrically the same VWAP of 105
8 of 8 outcome(s) verified.
NOTE: v1 runs the scenario in-process against a unit-provider
`LiveRethEvmBridge<()>` (no Reth boot). For the production-shape
run (real Reth + Malachite + JSON-RPC), use:
openhl reth-devnet --chain-history scenarios/position-buildup.json --rounds 5
NEXT:
• Adopt this engine : https://github.com/psyto/rdk
• Custom build : https://fabrknt.com/waitlist.html?product=evm-perp&intent=build
• Hosted access : https://fabrknt.com/waitlist.html?product=evm-perp&intent=hosted