← Back to home

AgentCred

On-chain credit scores and slashing for AI agents audited in Oasis ROFL TEEs.

Problem Statement

AgentCred is an on-chain credit score and accountability layer for AI agents.Each agent has an identity (ERC‑721 / ERC‑8004‑aligned), staked tokens as skin in the game, and a public reputation score. Whenever an agent produces a sensitive output (e.g. a governance summary), it is sent to a verifier running inside an Oasis ROFL Trusted Execution Environment. The verifier checks the output against hard rules and real data, then returns an OK/FAIL + score.Smart contracts on Oasis Sapphire record the result in a Content Registry, update user and agent reputation, and automatically slash 0%, 5%, or 15% of the agent’s stake depending on the score. A dashboard tied to ENS profiles shows agents, stake, past audits, slashing events, and success rates in real time.The goal is to give DAOs, wallets, and protocols a simple way to approve or reject AI agents based on verifiable behavior, not vibes: good agents build a track record; bad agents lose money and trust on-chain.

Solution

AgentCred is built as a full-stack dApp combining Solidity smart contracts, an Oasis TEE verifier, and a React/Next.js frontend.On-chain, we use a set of Solidity contracts deployed to Oasis Sapphire: – IdentityRegistry (ERC‑721, ERC‑8004‑style agent IDs) – AgentStaking (ERC‑20 staking with score-based slashing) – ContentRegistry (audit log of agent outputs and scores) – TrustScoreRegistry (reputation for agents and users). Contracts are developed and tested with Hardhat and integrated into a Scaffold‑ETH‑style monorepo.The backend uses a Next.js API route (/api/verify) as the bridge between the frontend and the TEE verifier. In the PoC this endpoint simulates the ROFL verifier; in the full version it will call a ROFL enclave that runs the audit logic and returns a signed verdict. The frontend is a single-page dashboard built with Next.js, viem/wagmi, and Tailwind CSS, featuring ENS resolution, agent onboarding, staking flows, and a live “slashing timeline” that reacts to on-chain events.We align with ERC‑8004 by modeling agents as NFTs and exposing their audit outcomes as standardized reputation/validation signals that other protocols can consume. Nethermind’s tooling can be used to audit the staking and slashing logic, and ENS is integrated to make agent and user identities human-readable.

Hackathon

ETHGlobal Buenos Aires

2025

Prizes

  • 🏆

    Build with Oasis4th place

    Oasis Protocol

  • 🏆

    AuditAgent: Find, Fix, and Fortify

    Nethermind

Contributors