
Oasis Private Polls
Oasis Protocol
Demo
About
The problem it solves On-chain polls and community surveys today leak voter choices publicly (or rely on opaque off-chain databases), which invites social pressure/retaliation, suppresses honest feedback, and is easy to Sybil (duplicate) without heavy KYC. Private Polls fixes this by keeping each vote confidential inside Sapphire’s TEE while exposing only aggregated totals, enforcing one‑vote‑per‑user (wallet path or ROFL nullifiers), and optionally gating eligibility (e.g., token holders) without revealing identities. Result: DAOs, communities, and orgs can run candid, tamper‑resistant temp checks and surveys with no external database, minimal UX friction, and verifiable on-chain integrity.
How it's made
Challenges we ran into 404/405 on RPC URL in browser Tried opening https://testnet.sapphire.oasis.io like a website (got 405). Fixed by adding it as MetaMask/Hardhat RPC instead. PowerShell quirks && and piping to cat caused errors. Ran commands one per line and avoided UNIX pipes. Hardhat config syntax error Copy-paste introduced doubled quotes in hardhat.config.js. Fixed quoting and recompiled. Invalid PRIVATE_KEY Pasted address instead of private key; then key without 0x. Added .env with 0x + 64 hex and used a quick Node length check to validate. Insufficient balance / explorer “no results” Deploy failed with “insufficient balance.” Funded the EVM 0x account via the Oasis faucet; explorer showed the address only after first tx. Solana account vs EVM account MetaMask defaulted to a Solana Snap account (base58). Created an EVM account (0x…), set symbol to TEST, and proceeded. Flaky deadline test Initial test used setTimeout; timing drifted. Switched to @nomicfoundation/hardhat-network-helpers time.increaseTo, making tests deterministic. ROFL integration details unavailable Used a settable IRoflAuthorizer interface and a MockRoflAuthorizer for tests. Contract supports voteFromRofl(...) + nullifiers now; real authorizer address can be set later. Windows npm EPERM installing hardhat-sourcify Postinstall failed. Avoided the plugin and verified via Sourcify UI by uploading artifacts/build-info/*.json. As a fallback, a clean reinstall flow is documented. “Unverified contract” on explorer Resolved by publishing sources through Sourcify UI; explorer updated after verification. HH1 “not in a Hardhat project” Ran commands from C:\WINDOWS\system32 by mistake; switched to the project directory. Duplicate vote revert confusion A second vote(1, 0) reverted as designed (one-wallet-one-vote). Ensured to await tx.wait() before reading tallies to avoid race conditions.