Skip to main content
You operate a stablecoin-heavy strategy and need to exit on the first credible signal that a peg is breaking. The risk-events feed delivers depeg starts as they happen, with peg health, deviation in basis points, and the underlying classification.

What you build

A signed webhook receiver that listens for peg.depeg.start and triggers your existing kill-switch.

1. Subscribe to the event

2. Verify the signature

Every delivery sets Alterscope-Signature: t=<unix>,v1=<hex> (the v1 MAC is HMAC-SHA256 of <t>.<raw_body>). Recompute, compare v1 in constant time, and reject stale timestamps (~5 min) or anything that doesn’t match. A legacy X-Alterscope-Signature (raw-body hex) is dual-sent during the 60-day transition.

3. Sample payload

4. Troubleshooting

  • Missed events: webhooks retry with exponential backoff for 24 hours, then DLQ. Use the replay recipe to recover.
  • Duplicate deliveries: receivers should be idempotent on data.as_of_block + asset_id.
  • Signature failures: confirm body is the raw bytes, not the JSON-decoded object.