Skip to content

batterysnoopy/credence

Repository files navigation

Credence

Credence is an ERC-8004-native agent reputation and attestation network built for The Synthesis hackathon. The repo now includes the full day 1-14 repo slice: core product flows, demo runtime, scripted walkthrough support, contract hardening artifacts, architecture diagrams, submission docs, and the collaboration log.

Scope

  • On-chain attestation registry and profile registry on Base
  • Off-chain explainable reputation engine
  • Trust-gated marketplace and coalition access demo
  • Public collaboration log for the hackathon submission

Monorepo

credence/
  apps/
    api/
    indexer/
    web/
  packages/
    config/
    contracts/
    sdk/
    ui/
  docs/
  scripts/

Implemented So Far

  • pnpm workspace and package boundaries
  • Solidity contracts plus Foundry deployment script and contract tests
  • Prisma schema for agents, attestations, reputation, tasks, bids, disputes, and coalitions
  • Wallet-auth API with nonce issuance, signature verification, and bearer-session protection
  • Identity-link API and web flow so a fresh wallet can become a writable Credence agent profile
  • Stateful demo runtime for agents, attestations, disputes, tasks, bids, coalitions, indexed events, transparent policy state, and resettable demo seed state
  • Off-chain reputation engine with weighted contributions, penalty totals, and explanation data
  • Live profile console with dispute creation, issuer-only revoke actions, dispute register reads, and weighted score explanation
  • Live marketplace page with task creation, bid submission, and trust-adjusted candidate ranking that updates after score changes
  • Live coalition room with threshold gating, join flow, and private-room unlock that reacts to current score state
  • Scripted demo runner at pnpm demo:script for the judge walkthrough before/after scenario
  • Architecture diagrams, seed-data docs, submission story/checklist, contract hardening notes, and collaboration history in docs/
  • Open-source metadata via LICENSE and CONTRIBUTING.md

Day 1-14 Audit

  • Days 1-2: complete in repo. Scope, monorepo setup, contract interfaces, schema, and UI wireframes are present.
  • Days 3-4: complete in repo. Contracts, backend indexing, wallet auth, and Base Sepolia deployment automation are implemented. The only remaining environment-specific step is executing the live Base deployment, which could not be run here because forge is not installed.
  • Days 5-6: complete in repo. Attestation issuance, profile reads, IPFS/Pinata evidence storage, and off-chain reputation scoring are implemented and validated locally.
  • Days 7-8: complete in repo. Task creation, bid submission, and trust-based candidate ranking run through the live API-backed marketplace flow.
  • Days 9-10: complete in repo. Coalition threshold gating, join flow, dispute/revoke UI, dispute reads, and weighted score explanation run through the live profile and coalition surfaces.
  • Days 11-12: complete in repo. Demo polish, architecture diagrams, scripted scenario support, seed-data notes, and demo docs are now present.
  • Days 13-14: repo-prep is complete. Contract hardening artifacts, README cleanup, open-source metadata, submission story, checklist, and conversation log assembly are all present. The only remaining external step is actually publishing the repo and submitting the project.

Validation Status

The following checks have been run successfully in this environment:

  • pnpm install
  • pnpm typecheck
  • pnpm db:generate
  • pnpm --filter @credence/api build
  • pnpm --filter @credence/indexer build
  • pnpm --filter @credence/web build

Getting Started

  1. Install dependencies with pnpm install.
  2. Copy .env.example to .env and fill the secrets plus contract addresses.
  3. Generate Prisma client with pnpm db:generate.
  4. Start the apps:
    • pnpm dev:web
    • pnpm dev:api
    • pnpm dev:indexer
  5. Open /auth in the web app, sign a challenge with a browser wallet, and link identity metadata.
  6. Open /attestations/new to issue a live attestation.
  7. Open /marketplace to create tasks, submit bids, and inspect trust-based candidate ranking.
  8. Open /agents/agent-b to inspect the live profile console, dispute actions, and weighted score explanation.
  9. Open /coalitions/coalition-alpha to inspect coalition gating and private-room unlock behavior.
  10. Run pnpm demo:script with the API running to reset the runtime and print the scripted before/after walkthrough.
  11. Deploy contracts to Base once Foundry is installed:
  • pnpm --filter @credence/contracts deploy:base-sepolia

Key Docs

  • docs/demo-script.md
  • docs/demo-seed-data.md
  • docs/architecture.md
  • docs/architecture-diagrams.md
  • docs/contract-hardening.md
  • docs/submission-story.md
  • docs/submission-checklist.md
  • docs/conversation-log.md

Current Gaps

  • The API runtime is still in-memory; Prisma persistence is not wired into the service layer yet.
  • Wallet UX uses direct browser-provider requests today; RainbowKit and wagmi are still a later integration step.
  • Contracts are implemented, deployable, and tested in-repo, but forge is not installed in this environment, so Foundry build/test/deploy were not executed here.
  • No live Base deployment has been performed yet from this workspace.
  • Public repo publishing, hosted demo deployment, and the final hackathon submission must still be executed outside this local session.

About

Credence extends Synthesis ERC-8004 identities into a portable trust layer

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors