Skip to content

Add ERC: Token Safety Score#1729

Open
Aigen-Protocol wants to merge 1 commit into
ethereum:masterfrom
Aigen-Protocol:draft-token-safety-score
Open

Add ERC: Token Safety Score#1729
Aigen-Protocol wants to merge 1 commit into
ethereum:masterfrom
Aigen-Protocol:draft-token-safety-score

Conversation

@Aigen-Protocol
Copy link
Copy Markdown

Adds a new draft ERC defining a minimal interface for on-chain ERC-20 safety scoring oracles.

What it standardizes

A 2-function read-only interface (getSafetyScore, isSafe) that wallet routers, AA modules, and DEX aggregators can call atomically before executing a swap or approval, then revert if a token fails a configurable safety threshold.

Why it's not just a vendor API

Off-chain safety services (GoPlus, De.Fi, Honeypot.is) cannot provide atomic guarantees: a check at time T followed by a swap at T+1 is racey. This standard puts the check inside the transaction.

Status

  • Draft — first submission. Filename will be renamed to erc-NNNN.md by an editor.
  • Reference implementation included (Solidity oracle + consumer router) — both deployed on Base + Optimism, currently scoring 19+ tokens with daily refresh:
    • Oracle Base: 0x37b9e9B8789181f1AaaD1cD51A5f00A887fa9b8e
    • Oracle Optimism: 0x3B8A6D696f2104A9aC617bB91e6811f489498047
    • SafeRouter Base: 0xF6EFc5D5902d1a0ce58D9ab1715Cf30f077D8f6e (live, 1 successful swap, 1 reverted-with-custom-error block proving the atomic guarantee)
    • SafeRouter Optimism: 0x38be6AA1044e866FcDFE34d4B4273F703668B80E (live)

Note on prior attempt

We previously opened PR #1646 incorrectly targeting the existing ERC-7913 (OpenZeppelin's Signature Verifiers) — that was withdrawn. This is the new submission with an unassigned number. We followed the EIP-1 process this time.

Discussions

Will open a thread on ethereum-magicians.org and link via discussions-to once a number is assigned (chicken-and-egg with the EIP number).

@eip-review-bot
Copy link
Copy Markdown
Collaborator

eip-review-bot commented May 7, 2026

File ERCS/erc-draft_token_safety_score.md

Requires 1 more reviewers from @g11tech, @jochem-brouwer, @samwilsn, @xinbenlv

Aigen-Protocol added a commit to Aigen-Protocol/aigen-protocol that referenced this pull request May 7, 2026
- SafeRouter V2 deployed on Optimism (0x38be6AA1044e866FcDFE34d4B4273F703668B80E,
  block 151287236, tx 0x1df8010ade30a2d622af9f6e1248619dd8cfb6b5af9447986981b8639fce5f6c)
  wrapping Velodrome V2. Same code as Base V2, atomic safety guarantee, same
  custom-error revert path. Cost $0.005 from OP-ETH balance.
- ElizaOS plugin install line: `npm install @aigen-protocol/plugin-safeagent`
  (PR Aigen-Protocol/plugin-safeagent#1, awaiting npm publish)
- New ERC submitted to ethereum/ERCs#1729 (Token Safety Score, Standards Track,
  category ERC). Reference implementations are our deployed oracles + SafeRouter.
  Replaces our withdrawn 7913-update PR (we incorrectly targeted OZ Signature
  Verifiers; this is a new unassigned-number proposal).
- Multi-chain table at top, on-chain proof tx hashes inline.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

The commit 138b29e (as a parent of 0316354) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions Bot added the w-ci label May 7, 2026
@@ -0,0 +1,236 @@
---
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
---
---
eip: 8258

@Aigen-Protocol
Assigning next sequential EIP/ERC/RIP number.
Numbers are assigned by editors & associates.

Please also update the filename.

title: Token Safety Score
description: Standard interface for on-chain ERC-20 safety scoring oracles, enabling routers and accounts to enforce pre-trade safety checks atomically.
author: CryptoGen Security (@Aigen-Protocol)
discussions-to: https://ethereum-magicians.org/t/erc-token-safety-score/aigen
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create a discussions topic

Aigen-Protocol added a commit to Aigen-Protocol/aigen-protocol that referenced this pull request May 13, 2026
- SafeRouter V2 deployed on Optimism (0x38be6AA1044e866FcDFE34d4B4273F703668B80E,
  block 151287236, tx 0x1df8010ade30a2d622af9f6e1248619dd8cfb6b5af9447986981b8639fce5f6c)
  wrapping Velodrome V2. Same code as Base V2, atomic safety guarantee, same
  custom-error revert path. Cost $0.005 from OP-ETH balance.
- ElizaOS plugin install line: `npm install @aigen-protocol/plugin-safeagent`
  (PR Aigen-Protocol/plugin-safeagent#1, awaiting npm publish)
- New ERC submitted to ethereum/ERCs#1729 (Token Safety Score, Standards Track,
  category ERC). Reference implementations are our deployed oracles + SafeRouter.
  Replaces our withdrawn 7913-update PR (we incorrectly targeted OZ Signature
  Verifiers; this is a new unassigned-number proposal).
- Multi-chain table at top, on-chain proof tx hashes inline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants