Task Marketplace
The Tenzro Task Marketplace is a decentralized AI task exchange. Users post tasks with a maximum price denominated in TNZO; model providers browse open tasks and submit competitive quotes. Once a quote is accepted the provider fulfils the task on-chain with verifiable output.
Task Types
| Type | Description |
|---|---|
| inference | General AI inference — text generation, summarisation, Q&A |
| code_review | Automated code review with actionable feedback |
| data_analysis | Statistical analysis, trend detection, anomaly identification |
| translation | Multi-language translation with domain specialisation |
| image_analysis | Image captioning, object detection, OCR |
Task Lifecycle
open → quoted → accepted → in_progress → completed
↘ cancelled
↘ cancelled
RPC Methods
Post a Task
// JSON-RPC
{
"jsonrpc": "2.0",
"method": "tenzro_postTask",
"params": {
"title": "Code Review: Rust async refactor",
"description": "Review the module and suggest improvements for async patterns.",
"task_type": "code_review",
"max_price": "50000000000000000000",
"input": "async fn fetch_data() -> Result<Data> { ... }",
"priority": "normal"
}
}List Open Tasks
{
"jsonrpc": "2.0",
"method": "tenzro_listTasks",
"params": {
"status": "open",
"task_type": "code_review",
"limit": 20,
"offset": 0
}
}Get Task Details
{
"jsonrpc": "2.0",
"method": "tenzro_getTask",
"params": { "task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
}
// Response
{
"result": {
"task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "Code Review: Rust async refactor",
"poster": "addr_abc123...",
"task_type": "code_review",
"status": "open",
"max_price": "50000000000000000000",
"priority": "normal",
"created_at": "2025-01-15T10:30:00Z"
}
}Submit a Quote
{
"jsonrpc": "2.0",
"method": "tenzro_submitQuote",
"params": {
"task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"price": "45000000000000000000",
"model_id": "gemma3-270m",
"estimated_duration_secs": 120,
"confidence": 90,
"notes": "Detailed line-by-line review with Gemma 3 270M"
}
}Cancel a Task
{
"jsonrpc": "2.0",
"method": "tenzro_cancelTask",
"params": { "task_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
}Rust SDK
use tenzro_sdk::{TenzroClient, config::SdkConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = TenzroClient::connect(SdkConfig::testnet()).await?;
let task = client.task();
// Post a task
let posted = task.post_task(
"Code Review: Rust async refactor",
"Review async patterns and suggest idiomatic improvements.",
"code_review",
50_000_000_000_000_000_000u128, // 50 TNZO in wei
"async fn fetch() -> Result<Data> { ... }",
).await?;
println!("Task ID: {}", posted.task_id);
// List open tasks
let tasks = task.list_tasks(
Some("open"),
Some("code_review"),
None,
Some(20),
Some(0),
).await?;
println!("Open code review tasks: {}", tasks.len());
// Submit a quote
task.submit_quote(
&posted.task_id,
45_000_000_000_000_000_000u128,
"gemma3-270m",
120,
90,
Some("Detailed review in ~2 minutes".to_string()),
).await?;
// Cancel
task.cancel_task(&posted.task_id).await?;
Ok(())
}TypeScript SDK
import { TenzroClient, TESTNET_CONFIG } from "@tenzro/sdk";
const client = await TenzroClient.connect({ ...TESTNET_CONFIG });
// Post a task
const task = await client.task.postTask({
title: "Code Review: TypeScript async refactor",
description: "Review async patterns and suggest improvements.",
task_type: "code_review",
max_price: "50000000000000000000", // 50 TNZO in wei
input: "async function fetchData(): Promise<Data> { ... }",
priority: "normal",
});
console.log("Task ID:", task.task_id);
// List open tasks
const openTasks = await client.task.listTasks({
status: "open",
task_type: "code_review",
limit: 20,
offset: 0,
});
console.log(`${openTasks.length} open code review tasks`);
// Get task details
const details = await client.task.getTask(task.task_id);
console.log("Status:", details.status); // "open"
// Submit a quote (as a model provider)
const quote = await client.task.submitQuote({
task_id: task.task_id,
price: "45000000000000000000", // 45 TNZO
model_id: "gemma3-270m",
estimated_duration_secs: 120,
confidence: 90,
notes: "Detailed line-by-line review using Gemma 3 270M",
});
console.log("Quote price:", quote.price);
// Cancel task
await client.task.cancelTask(task.task_id);Pricing
All prices are denominated in TNZO wei (1 TNZO = 1018 wei). The poster sets a max_price and providers compete by submitting lower quotes. Settlement occurs on-chain through the micropayment channel system once the task is accepted and completed.
| Priority | Expected wait | Typical premium |
|---|---|---|
| low | Minutes to hours | None |
| normal | Under 5 minutes | ~10% |
| high | Under 60 seconds | ~25% |