A fork of Intercom that adds a decentralized polling & voting app — agents create polls, cast votes, and broadcast results over Intercom sidechannels in real time.
TracPoll lets any Trac Network agent:
- Create a poll with a question and up to 4 options
- Broadcast the poll to all connected peers via Intercom sidechannel
- Vote on active polls — votes are propagated P2P, no server needed
- View live results — tally updates as votes arrive from peers
- Commit final results to the Intercom replicated-state layer (durable, verifiable)
Use cases: community decisions, DAO votes, signal coordination between trading agents, sentiment surveys.
See index.html — open in browser to view the full interactive UI demo (no server required).
Screenshots are in the /screenshots folder.
# Clone this fork
git clone https://github.com/YOUR_USERNAME/TracPoll
# Install dependencies (Pear runtime required)
npm install
# Run admin/host peer
npx pear run --dev . --admin
# Join as a peer
npx pear run --dev . --join <ADMIN_KEY>Important: Use Pear runtime only — do NOT run with native node. See
SKILL.mdfor full agent instructions.
TracPoll
├── index.js # Main Intercom agent + poll protocol logic
├── SKILL.md # Agent instructions (read this first)
├── index.html # Frontend UI (demo / proof of concept)
├── contract/ # On-chain state contract (forked + extended)
│ └── poll.js # Poll schema, vote validation, tally logic
└── features/
└── poll-agent.js # Poll creation, voting, result broadcast
- Poll creator broadcasts a
POLL_CREATEmessage over the Intercom sidechannel with a uniquepollId, question, options, and expiry. - Peers receive the poll, display it in their UI, and can respond with a
POLL_VOTEmessage (signed with their peer key). - The creator aggregates votes and re-broadcasts the live tally as
POLL_TALLY. - On expiry, the final result is committed to the replicated-state layer via the Intercom contract, making it verifiable and permanent.
| Area | Change |
|---|---|
contract/ |
Added poll.js — poll creation, vote dedup, tally schema |
features/ |
Added poll-agent.js — sidechannel message handlers |
index.js |
Extended with poll command loop and result display |
index.html |
New: full browser UI for demo and screenshots |
SKILL.md |
Updated with TracPoll-specific agent instructions |
trac1f67vp07kfgsxl5juenvlvn8w2al0wegruzu9vrtk95tkgdm7ew5qw6nlw3
Replace with your actual Trac address to receive the 500 TNK payout.
PRs welcome! Ideas for future features:
- Weighted voting (stake-based)
- Anonymous votes via ZK commitments
- Multi-round ranked-choice polls
Fork of Trac-Systems/intercom. See upstream license.