Documentation
What is Zoetra?
Zoetra is a permissionless, on-chain heartbeat SLA registry for DePIN devices, deployed on BOT Chain. A device operator registers a wallet, declares how often it will "check in" (a heartbeat interval) and what percentage of the time it promises to be online (its SLA), and stakes native BOT against that promise. From that point, the device's uptime is measured entirely by an on-chain smart contract, not a dashboard, not a company, not an admin.
Mainnet Integrations
- BOT Chain mainnet: the contract, scores, stakes, heartbeats, and slashes all settle on chain ID 677.
- BOTScan: every contract and transaction link points to scan.botchain.ai.
- Bridge + DEX: operators can bridge funds at bridge.botchain.ai and swap for BOT at dex.botchain.ai.
- WalletConnect: mobile wallets, including BO Wallet, can connect through QR pairing.
- Heartbeat daemon: operators can run the reference client to send real heartbeat transactions from their device wallet.
Verification Path
- Open the live dashboard and confirm the network is BOT Chain.
- Open the contract link and verify the address on BOTScan.
- Confirm bytecode is detected and the source is verified.
- Inspect the production device and its heartbeat proof.
- Review the verified contract to confirm there is no admin scoring override.
Glossary
| SLA | Service Level Agreement, the uptime percentage a device promises (e.g., 90%) |
| Heartbeat | A transaction a device sends to prove it's alive, at its declared interval |
| Score | The device's current uptime, in basis points (bps), computed live on-chain |
| bps | Basis points; 10000 bps = 100%, 9000 bps = 90% |
| Slash | Cutting a portion of a device's stake because it breached its SLA |
| Bounty | The reward paid to whoever calls slash() successfully |
| Deregister | Voluntarily stopping a device's heartbeat obligation, starting a cooldown before withdrawal |
| Proof trail | The on-chain event history (registrations, beats, slashes) for one device |
How the Score Is Computed
The contract does not run a background job or cron. Instead, scoreOf(deviceId) is a view function, meaning anyone can call it at any time and get a live-computed answer based on:
- How many heartbeats the device has actually sent, tracked in a rolling window.
- How many heartbeats it should have sent by now, based on its declared interval and the current block's timestamp.
Because this is computed from block.timestamp at read time, the score decays visibly even if nobody sends a new transaction, time passing alone is what causes a dead device's score to fall.
How to Register a Device
- Connect a wallet on BOT Chain mainnet (chain ID 677).
- If you need gas or stake, bridge funds at bridge.botchain.ai, then swap for BOT at dex.botchain.ai.
- Choose a name, a heartbeat interval (5-300 seconds), an SLA threshold (50-99.99%), and a stake (minimum 0.05 BOT).
- Submit. Your wallet is now the device's operator; only that wallet can send valid heartbeats for it.
- Run a heartbeat client (see
daemon/heartbeat.mjsfor a reference implementation) that callsheartbeat(deviceId)at your declared interval, using your device's operator key.
cd daemon npm install cp .env.example .env # fill RPC_URL, REGISTRY_ADDRESS, PRIVATE_KEY, DEVICE_ID, INTERVAL_MS npm start
How Slashing Works
- If a device's live score falls below its own declared SLA, it becomes slashable.
- Anyone, using any wallet, can call
slash(deviceId). - The contract verifies the breach is real at the moment the transaction executes (it will revert if the device has recovered).
- On success: 20% of the device's remaining stake is cut. Of that, 10% is paid to the caller as a bounty; the remainder is burned permanently.
- A cooldown period prevents the same device from being slashed repeatedly in rapid succession.
Architecture Summary
- Smart contract (ZoetraRegistry.sol): the only source of truth. Handles registration, heartbeats, live scoring, slashing, deregistration, and withdrawal.
- Dashboard: a read-only viewer over the contract's public state and event logs, plus a write path (via your own connected wallet) for registering and slashing.
- Heartbeat client: a reference script any device operator can run (or reimplement in any language) to send heartbeats on schedule.
- Alert relay: one optional, stateless serverless endpoint that forwards breach notifications to a webhook URL you provide.
There is no database, no user accounts, and no admin key anywhere in this system.
Frequently Asked Questions
Can Zoetra reverse a slash if it was a mistake?
No. There is no admin key and no override. This is intentional, it's what "permissionless" means.
What happens if my RPC or internet goes down but my device is actually fine?
The contract only knows what transactions it received. If your heartbeat client can't reach the chain, your device's score will decay exactly as if it were genuinely offline. Uptime is measured by provable heartbeats, not by physical reality.
Can I use my own heartbeat client instead of the provided one?
Yes. The contract doesn't care what sends the transaction, only that it comes from the registered operator wallet and calls heartbeat(deviceId).
Is my stake insured?
No. There is no insurance fund. Stake represents real risk you are voluntarily taking on by registering.
Does Zoetra work with devices from other DePIN networks?
Yes, in principle, any device or wallet can register regardless of what network it otherwise belongs to. Zoetra does not require exclusivity or integration with any other protocol.