# Orb community tools

> Current status reviewed September 29, 2026. See [the release index](README.md) for shipped versus planned features, network, wallet signing and deployment boundaries. Older dated experiments below are retained as history.

This local Web3 iteration adds three surfaces to the existing Community Arena. No production deployment, Git push, public-chain transaction or wallet trade was performed as part of this work.

## Strategies in Markets and trade channels

Open **Markets → Strategies**. The workspace selector switches between private personal plans and trading channels the current user can access. Inside a community trade channel, the board stays scoped to that channel.

A strategy contains a thesis, input/output token, amount, monitored asset, USD threshold, direction, slippage and expiry. Supported assets are Orb's configured testnet list — MON, WMON, USDC and AUSD (Agora Dollar, testnet) on chain 10143. Contracts outside that list cannot be watched by a strategy. Plan versions are immutable; adapting one creates a new plan linked to its source and asks for a fresh amount. Authors can archive plans. Members can follow/unfollow and export a JSON template.

Thresholds compare exact decimal integers. The visible board queries reference prices every 20 seconds. A missing price never triggers an alert, and observations expire after 60 seconds. The displayed time is the server's retrieval time, not proof of the venue's market-update time. Hidden tabs pause; board monitoring stops when it is closed — the 24/7 alert monitor for saved intents is a separate worker. This board is **not** a low-latency execution engine.

Reference prices are the venue's own: the same Perpl marks the price-alert monitor uses (MON through its perpetual mark, the quote stable at par), served from a short per-process context cache. A threshold is a notification, not an order.

Opening a plan hands its token pair, amount, slippage and watched condition (direction and target price) to the perpetual desk as a preset. The condition pre-fills a **resting trigger entry** on the matching market — long when the plan buys the asset, short when it pays it — so the order waits on Perpl until the mark crosses the target and then opens as a market order within the slippage. The margin is deliberately left empty: the size is always the user's own decision, even when adapting someone else's plan. The user reviews the market, size, leverage and trigger there and places any order themselves; there is no automatic quoting step. Saving, following, receiving an alert or opening a plan never signs or sends a transaction. There is no background signer, delegated trading allowance, pooled balance or copy-trade execution.

The API checks authenticated Orb sessions, request origins, channel visibility, membership, bans, timeouts and write permissions. Private-channel plans cannot be read, followed or adapted by outsiders. Deleting a channel deletes its plans and follows. Strategies are stored by Orb, **without E2EE**, and that storage model is shown in the editor.

## Community passports

Open **Identity → Community passport**. The component reuses the deployed Community Arena registry, verifies its runtime bytecode and expected chain, and reads community ownership/name plus issuer at a single block. It exports a versioned JSON snapshot containing public contract/chain/community identifiers and block hash. A separate static viewer at `/arena/identity.html?contract=ADDRESS&community=BYTES32_ID` reads through the RPC without an Orb account or Orb API.

The viewer and export are a portable record of registry state. They do not transfer chats, private membership or access rights to another application. A saved snapshot is historical; consumers must check the current chain state. The RPC provider and initial Orb registration attestation remain trust dependencies. Onchain names/ownership do not automatically follow later edits in Orb.

Public testnet use requires the same deployment/funding described in [Community Arena](orb-arena.md). The interface shows that prerequisite explicitly. Local EVM validation includes reading a transferred owner, rejecting wrong bytecode and recognizing unregistered communities.

Rebuild the two static viewers with `npm run arena:observer`. Static hosting needs `identity.html`, `identity.js` and `OrbCommunityArena.json` together. A loopback RPC override is permitted only when the viewer is served on localhost, for isolated demonstrations.

## Interactive livestream polls

The community call toolbar now includes **Live polls**. The person sharing a screen can create a question with two to four options and a 1/3/5/10-minute duration. Each authenticated call participant has one immutable vote. Hosts close polls; expiry or termination of the host's screen session disables further votes. This feature currently covers community calls, not private calls.

The API checks current room access, bans, timeout, connect/write permissions, active call membership, the host's exact call session and screen state. Votes are unique on `(poll, person)`. Conditional SQL and transactional version increments serialize votes with result finalization; an in-flight close retries if a vote changed the version. Separate identities/accounts are still possible, so this is not one-human-one-vote.

Results refresh every 2.5 seconds only while the panel is open and visible. Active polls are listed before recent ended polls, with a 24-poll result cap. Rejoining the call does not revive a poll from a previous host session. A live poll is scoped to a call session; switching screen sources within the same uninterrupted session does not create a new poll identity.

Closed results can be exported with a SHA-256 checksum over the stored JSON serialization. No voter identities are exported. The checksum detects changes to the accompanying data; it is **not** a signature, independent proof of the count or onchain anchoring. Polls and votes are stored on Orb's server without E2EE; the panel says so. Active call members read polls, and room members retaining access can retrieve a known completed receipt.

The poll dialog can mount within the fullscreen element. Opening it pauses the controls' idle timer, preserving interaction while the usual theater/fullscreen behavior remains in place. No keyboard-driven wake behavior was introduced.

## Validation and operation

Apply migration `0026_orb_community_tools.sql` to the isolated development database before use. Apply migrations only to the isolated Orb database; the current Web3 release has applied its additive schema.

```powershell
$env:TURSO_DATABASE_URL='file:work/orb-hackathon.db'
node scripts/migrate.mjs
npm run community:test
npm run arena:test:community
npm run arena:observer
npm run build
```

`community:test` exercises real local HTTP endpoints with disposable users/channels: decimal precision, price staleness/expiry, private-channel access, authorship, follows/adaptation, timeouts/bans, livestream host eligibility, concurrent duplicate votes, ended streams and stable receipt hashes. Arena integration tests exercise the passport against a real local EVM. Browser validation covers creating/adapting a plan, alerts against live reference prices and the preset handoff into the perpetual desk, the independent passport viewer, and poll creation/voting/closing through the real local API in a temporary component harness, including fullscreen.

The local UI demo plan is labeled as a demo. It is not investment advice or a submitted trade. Board alerts stop when the board closes; run `npm run intents:monitor` for the background price-alert worker. Poll records have no retention job yet. These are product limits, not demonstrated Monad throughput.
