Trust layer for verifiable autonomous agent work on PortalDot.
Bondot is a PortalDot-based trust layer for verifiable autonomous agent work. Clients create onchain task escrows with rewards, worker agents accept tasks by locking a bond, worker agents submit deterministic result hashes, and verifier agents validate submitted results before settlement. The MVP demonstrates a verifiable worker-verifier trust loop on PortalDot using POT for transaction gas.
Autonomous agent work needs trust. Clients need proof that a task was accepted, a result was submitted, verification happened, and settlement followed onchain rules. Without an onchain trust layer, agent work is unverifiable — there is no transparent mechanism to ensure agents deliver quality and get paid fairly.
Bondot provides an onchain trust loop:
- Client creates task escrow with a POT reward locked in the contract.
- Worker agent accepts the task and locks a POT bond, committing to deliver.
- Worker agent submits a deterministic result hash onchain.
- Verifier agent submits PASS/FAIL with a verification hash.
- Contract settles — PASS: reward + bond → worker. FAIL/Timeout: reward → client, bond → worker.
Bondot uses PortalDot smart contract state as the onchain source of truth for:
- Agent identity and registration
- Task lifecycle (created, accepted, submitted, settled)
- Worker bond locking
- Result hash recording
- Verifier decision
- Settlement disbursement
POT is used as transaction gas for every onchain action.
┌─────────────────────────────────────────────────────────────────┐
│ Client Web App │
│ (Next.js · @polkadot/extension-dapp) │
│ Register Agents · Create Tasks · Sign Transactions │
└───────────────┬────────────────────────┬────────────────────────┘
│ wallet tx │ wallet tx
▼ ▼
┌──────────────────────┐ ┌───────────────────────┐
│ Worker Agent │ │ Verifier Agent │
│ (offchain script) │ │ (offchain script) │
│ Generates result │ │ Validates result │
│ + result_hash │ │ + verification_hash │
└──────────┬───────────┘ └──────────┬─────────────┘
│ submit_result() │ submit_verification()
│ │
▼ ▼
┌─────────────────────────────────────────────────────────────────┐
│ Bondot Smart Contract │
│ (ink! / Rust · deployed on PortalDot) │
│ │
│ register_agent · create_task · accept_task │
│ submit_result · submit_verification · settle │
└───────────────────────────┬─────────────────────────────────────┘
│
▼
┌────────────────────────┐
│ PortalDot Node │
│ (Substrate / ink!) │
│ POT gas for txs │
└────────────────────────┘
Core Stack:
- Blockchain: PortalDot (Substrate-based)
- Smart Contract: ink! / Rust
- Frontend: Next.js 14, React 18, TypeScript, Tailwind CSS
- Wallet: Polkadot-JS Extension / PortalDot Extension (
@polkadot/extension-dapp) - Contract Interaction:
@polkadot/api-contract - Offchain Agents: Python 3 scripts (deterministic, no LLM/GPU required)
- Gas: POT
Contract directory: lib.rs (ink! contract at project root)
Build artifacts (after cargo contract build --release):
target/ink/pot_agent_escrow.contracttarget/ink/pot_agent_escrow.wasmtarget/ink/pot_agent_escrow.json
Note: Final local PortalDot deployment evidence is still pending and will be added after the local PortalDot deployment phase.
| Function | Description |
|---|---|
register_agent(metadata_hash, capabilities_hash, role) |
Register an agent onchain with role (Worker/Verifier/Orchestrator/Specialist) and metadata. |
update_agent(metadata_hash, capabilities_hash) |
Update an existing agent's metadata and capabilities hashes. |
deactivate_agent() |
Deactivate the calling account's agent registration. |
create_task(verifier_agent, reward, required_bond, task_hash, verification_deadline) |
Create a new task escrow. Locks reward in contract. Payable — reward value must be sent with call. |
accept_task(task_id) |
Accept a task as worker agent. Locks bond in contract. Payable — bond value must be sent with call. |
submit_result(task_id, result_hash) |
Submit a 32-byte result hash for an accepted task. |
submit_verification(task_id, passed, verification_hash) |
Submit verifier decision (PASS/FAIL) with 32-byte verification hash. Triggers settlement. |
claim_verification_timeout(task_id) |
Claim timeout if verifier has not responded by the deadline block. |
cancel_unaccepted_task(task_id) |
Cancel a funded task that has not yet been accepted and refund client. |
get_task(task_id) |
Read-only query: returns full task state. |
get_agent(account) |
Read-only query: returns agent registration record. |
- Rust with
cargo-contractCLIcargo install cargo-contract --version 4.1.1 --force
- Node.js ≥ 18 and
npm - Python ≥ 3.9 (for agent scripts)
- A running local PortalDot/Substrate node (see local node note)
git clone https://github.com/sz-dev/portaldot-hackathon-2026-bondot-sz.git
cd portaldot-hackathon-2026-bondot-sz# Run unit tests
cargo test
# Build contract (generates target/ink/ artifacts)
cargo contract build --releaseExpected output: 45/45 unit tests pass, artifacts generated in target/ink/.
cd frontend
# Install dependencies
npm install
# Copy .env.local.example to .env.local and configure
cp .env.local.example .env.local
# Edit .env.local: set NEXT_PUBLIC_PORTALDOT_RPC_URL and NEXT_PUBLIC_ESCROW_CONTRACT_ADDRESS
# Copy contract ABI metadata to public dir
bash copy-metadata.sh
# Run dev server
npm run devFrontend runs at http://localhost:3000.
cd agents
# Worker agent — process task and produce result hash
python3 worker_agent.py --task-id 1
# Verifier agent — validate result (PASS)
python3 verifier_agent.py \
--task-id 1 \
--result output/worker_result.json \
--spec mock_data/verification_spec.json
# Keeper agent — check timeout
python3 keeper_agent.py \
--task-id 1 \
--current-block 120 \
--verification-deadline 100 \
--status Submitted
# Run agent tests
python3 -m pytest tests/ -vA local PortalDot/Substrate node is required for live contract interaction. See your community portaldot-node-guide for setup instructions. Default local RPC: ws://127.0.0.1:9944.
Demo Video: TBA (being prepared — see roadmap)
| Step | Actor | Action |
|---|---|---|
| 1 | Alice (Client) | Register Worker Agent (Bob) |
| 2 | Charlie | Register Verifier Agent (Charlie) |
| 3 | Alice (Client) | Create task with POT reward |
| 4 | Bob (Worker) | Accept task, lock bond |
| 5 | Bob (Worker) | Submit deterministic result hash |
| 6 | Charlie (Verifier) | Submit PASS verification |
| 7 | Contract | Settle — reward + bond → worker |
| 8 | Frontend | Show lifecycle and transaction proof |
Test Role Mapping:
- Alice = Client / Deployer
- Bob = Worker Agent
- Charlie = Verifier Agent
| Phase | Goal |
|---|---|
| Phase 1 | Submission packaging — README, LICENSE, docs, rebranding |
| Phase 2 | Local PortalDot deploy and first onchain proof |
| Phase 3 | Full Bondot lifecycle onchain (register → create → accept → result → verify → settle) |
| Phase 4 | Frontend proof UX — live tx hash display, block confirmation |
| Phase 5 | Demo video and evidence capture |
| Future | Self-hosted agent worker, agent marketplace, multi-verifier quorum, reputation system, orchestrator/specialist workflows |
Team Name: SZ
Member: SZ — Solo Developer
MIT — see LICENSE
- This project is an MVP / work in progress.
- The smart contract is not yet deployed to a live or production PortalDot network.
- Real onchain transaction evidence is still pending (will be captured in Phase 2).
- POT gas/fee proof is still pending.
- Offchain agent scripts support the workflow but do not currently auto-submit onchain transactions — the smart contract is the onchain source of truth.
- No LLM, GPU, or AI model is required to run this MVP.
- No fully autonomous onchain agent autonomy is claimed.