agent-rep-trust
Summary: depunks’s answer to “how do you trust a prize giveaway with no escrow” — instead of a contract holding the asset, trust comes from an accountable Agent identity + a native reputation score + minus-point penalties + a 48h bad-actor flag. Rewards can only be run through an Agent you own; honoring pays rep, defaulting docks it and flags you. Partly SHIPPED 2026-07-07.
The problem
Rewards (raffle/quest) have no prize escrow — the winner trusts the creator to actually send the prize. The owner decided not to build escrow now. So trust has to be manufactured out of identity + reputation + penalties rather than a contract holding the NFT. Source: depunks/app/plan/agent-rep-trust.md.
Three decisions
- Escrow-requiring actions are gated to Agents. Running a prize reward = operating through an Agent (a persistent, on-chain-bound, reputation-bearing, penalisable identity) — not a throwaway wallet. Participating (buy/enter/claim) stays open to everyone. Enforced in
createGiveaway/the reward executor: resolve the creator’s Agent, reject if none. - “8004 rep” → “Agent Rep”. The displayed score becomes a native number computed from on-platform behaviour (completion + volume), replacing the external 8004scan total. The 8004scan identity/health card stays; only the headline number changes.
- A points/metric system that rewards good actors, penalises bad actors with minus points, and flags them as bad actors for 48h.
Trust gating — trustless vs trust-sensitive
The classifier: does the action need an off-chain promise to honor?
- Trustless → open to anyone: list/bundle (a signed Seaport order moves the NFT atomically), a2a/mandate (bounded by ledger/caps).
- Trust-sensitive → Agent required: reward raffle/quest prize (no escrow — winner trusts the creator to send). Binding every prize promise to a slashable, flaggable identity raises the cost of scamming to ~the cost of the agent identity (a wallet is free and disposable; an Agent is a promoted DePunk with a persistent handle + dockable history).
Score model (SHIPPED core, in app/src/app/lib/console/agentRep.ts)
agentRep = max(0, Σ event.points × decay(event.age)), decay = 0.5^(age_days / 90) — 90-day half-life so rep reflects current behaviour; floored at 0 but penalties can wipe accumulated rep and trigger the flag. Score is a materialised (cached) decayed sum of an append-only agent_rep_event ledger, recomputed on event + a nightly decay pass — same auditable/reproducible ethos as console_ledger and the giveaway commit-reveal.
Point events (REP_POINTS in agentRep.ts): honored +40, on-time (≤24h) +15, listing_published +1 (capped 5/day, owner signature = spam gate), listing_sold +4, participant +1 (per unique non-creator wallet, capped +25/reward, ≥3-entrant sybil gate MIN_ENTRANTS_FOR_REP=3), default (drew but didn’t release within 72h grace) −100 + flag, wrong-address release −150 + flag, rug (reward expired with entrants, nobody paid) −30 no flag. All earn events gated on the SAME on-chain verification the audit added (verifyPrizeTransfer, verifyListingFillOnChain) so points can’t be farmed with fake tx hashes.
As of 2026-07-07 the SHIPPED slice is: rep points for published listings, sold listings, entrant turnout (participant), and rugs (commit 64c8247), plus the schema (agent_rep_event table + agentRep/flaggedUntil/honoredCount/defaultedCount on agent_role). Honored/on-time/default/wrong-address, the streak multiplier, repeat-offense ×2, and the reconciler cron are drafted in the plan but not all wired yet.
Bad-actor flag (the 48h mechanic)
A flaggedUntil timestamp (now + 48h) set by any flagging event. While flagged: red FLAGGED badge (status-red, functional not decorative), cannot create new trust-sensitive actions, existing obligations still owed. Honoring the outstanding obligation clears the flag early — making good is the way out, not waiting it out. After 48h the flag auto-expires but the minus points persist; rep only recovers through subsequent honored behaviour + decay.
Tiers + how points are used
New (0) · Bronze (≥50) · Silver (≥200) · Gold (≥600) · Elite (≥1500) + FLAGGED override (thresholds are config). Uses: (1) prize-value caps by tier (New ≤0.05Ξ … Elite unlimited), (2) concurrency caps on unresolved rewards (stops “arm 50, honor none”), (3) ranking/discovery — Square + roster sort by Agent Rep, entrants see honored-rate + tier before entering, (4) fee tier (higher rep → lower platform fee), (5) trust copy in the reward wizard’s review card.
Anti-abuse
Self-dealing (creator + linked wallets don’t count toward volume/participant points; self-winning earns 0 honored), sybil (participant points per-unique-wallet, log-scaled, capped), wash volume (buyer==seller / circular fills excluded, reuse fill verification), and the append-only + on-chain-gated ledger so the score can’t be inflated by DB writes alone.
Why it matters
This is the trust primitive that lets depunks ship prize giveaways without building or auditing an escrow contract — it converts “trust me” into a measurable, decayable, slashable score attached to a permanent opensea-erc8217 agent identity. It also gives the depunks agent layer a reason to exist beyond identity: an Agent is now the reputation-bearing account through which trust-sensitive commerce runs.
Sources
~/Documents/localhost/depunks/app/plan/agent-rep-trust.md(plan + pitch)~/Documents/localhost/depunks/app/src/app/lib/console/agentRep.ts(score model,REP_POINTS, half-life/flag constants)~/Documents/localhost/depunks/app/src/db/schema.ts(agent_rep_eventtable;agent_role.agentRep/flaggedUntil/honoredCount/defaultedCount)~/Documents/localhost/depunks/app/src/app/lib/console/{giveaways,listings}.ts,app/src/tests/app/lib/agent-rep.test.ts- Commits
64c8247(rep points),66a803f(Activity timeline) - Related: depunks, agents4fun, opensea-erc8217