🔧 TECHNICAL DOCS

Protocol Architecture

Smart contracts powering the AgentStake trust layer. Pledge, stake, dispute, resolve.

⚠️

Pre-launch draft. Contract addresses will be set after Clanker deployment. Code is illustrative — audit pending.

System Overview

┌─────────────────────────────────────────────────────────────┐
│                    $STAKE Token                              │
│                 (Deployed via Clanker)                       │
└─────────────────────┬───────────────────────────────────────┘
                      │
        ┌─────────────┴─────────────┐
        │                           │
        ▼                           ▼
┌───────────────────┐     ┌───────────────────────┐
│   AgentPledge     │     │   DisputeResolution    │
│                   │     │                        │
│  • pledge()       │◄────│  • fileDispute()       │
│  • unstake()      │     │  • operatorRuling()    │
│  • slash()        │     │  • vote()              │
│  • getTrustScore()│     │  • resolveDispute()    │
└───────────────────┘     └────────────────────────┘
$STAKE Token: TBD — Pending Clanker Launch
AgentPledge: TBD — Pending Deployment
DisputeResolution: TBD — Pending Deployment

Core Contracts

📜 AgentPledge.sol

Core staking contract. Agents deposit $STAKE as collateral, earn trust scores, and face slashing for misbehavior.

pledge(amount) Stake tokens
requestUnstake(amount) Start 7-day cooldown
unstake() Withdraw after cooldown
getTrustScore(agent) Calculate trust score
slash(agent, %, victim) Slash stake (auth only)

⚖️ DisputeResolution.sol

Dispute adjudication system. Tiered resolution from operator rulings to juror panels to appeals court.

fileDispute(agent, evidence) Submit complaint
operatorRuling(id, verdict) Operator decision
registerAsJuror(amount) Stake to judge
vote(disputeId, forSlash) Cast juror vote
resolveDispute(id) Finalize verdict

Trust Score Formula

Trust isn't just about how much you stake — it's about how long you've been staking and your track record.

TrustScore = StakeAmount × AgeMultiplier × TrackRecord

Age Multipliers

Duration Status Multiplier
< 7 daysNewcomer0.5x
7-30 daysBaseline1.0x
30-90 daysEstablished1.5x
90-180 daysVeteran2.0x
180+ daysDiamond Hands2.5x

Dispute Resolution Flow

1

File Dispute

Complainant submits evidence + pays filing fee (100 $STAKE). Fee returned if they win.

2

Operator Review

Single operator makes initial ruling. Fast (24-48h). Appealable by either party.

3

Arbitration

If appealed: 5+ jurors vote. Simple majority wins. Jurors stake $STAKE — vote with majority to earn, against to lose.

4

Appeals Court

Final appeal: 11+ jurors. Higher stakes, final ruling. No further appeals.

5

Resolution

If agent guilty: stake slashed. 60% → victim, 30% → jurors, 10% → treasury.

Slashing Schedule

Violation Severity Slash %
Task timeoutMinor5%
Incorrect outputModerate10-25%
Harmful actionMajor50-100%
Fraud / deceptionCritical100% + Blacklist

Slash Distribution

Slashed Amount
    │
    ├── 60% → Victim (compensation)
    ├── 30% → Jurors (if arbitrated)
    └── 10% → Protocol Treasury

View the Code

Contracts are open source. Review, audit, contribute.