B

SYSTEM OVERVIEW

How it works

Your app records the bridge, your worker posts daily hold snapshots, and Torque campaign logic decides rewards. Same payload shape in demo and production.

Five strategic use cases - sticky TVL, anti-dump rules, cohort & route growth, consumer seasons, and distributor loops - all map to these same events.

Bridge eventDaily snapshotTorque campaigns
  1. STEP 01

    Bridge event

    When assets land on the destination chain, call the ingester with a bridge_completed-style event (amount, route, mock tx hash).

  2. STEP 02

    Daily snapshot

    Each day your worker POSTs meetsThreshold, balance, streakDays, etc. That is what leaderboards and raffles consume.

  3. STEP 03

    Torque campaigns

    Attach those custom events in Torque, build SQL in MCP, ship rebates or raffles for wallets that stay above your min.

Mapped to Torque primitives

Use the same stream of custom events to run multiple campaign types by changing only SQL selection logic.

  • Leaderboard

    streakDays, qualifyingDays

    Rank by streakDays or qualifying snapshot count to keep weekly competitions tied to actual holding behavior.

  • Raffle

    meetsThreshold, dayIndex

    Issue tickets from meetsThreshold snapshots so consistent smaller wallets still have fair odds.

  • Rebate / gift

    bridgedAmount, streakDays

    Reward bridge size and long streak milestones with deterministic payout logic in Torque SQL.

  • Retention analytics

    sourceChain, destChain, balance

    Track conversion after bridge and monitor drop-off windows to tune campaigns and epoch cadence.

Torque in production

How we use Torque - not generic, not hand-wavy

BridgeHold's Next.js API routes call the same ingest URL your production worker would. When TORQUE_INGEST_API_KEY is set, every bridge and daily tick attempts a real POST …/events with your Torque custom event names. The simulator, live demo, and leaderboard all exercise that path so you can verify live custom_events end-to-end.

Data flow
  1. User / indexer
  2. BridgeHold APIs
  3. Torque ingest
  4. Leaderboards · Raffles · Rebates · Gifts · Distributors

Configure campaigns and SQL with the Torque MCP- BridgeHold focuses on emitting consistent custom_events your rules can trust.

Bridge completed

bridge_hold_completed

Env override: TORQUE_EVENT_BRIDGE

  • userPubkey
  • timestamp
  • amount
  • sourceChain
  • destChain
  • txHash (mock in demo)

Daily snapshot

bridge_hold_daily_snapshot

Env override: TORQUE_EVENT_SNAPSHOT

  • userPubkey
  • timestamp
  • dayIndex
  • balance
  • meetsThreshold
  • streakDays
  • bridgedAmount
  • sourceChain
  • destChain