Add ERC: Stateful Fungible Token#1762
Closed
cc358 wants to merge 3 commits into
Closed
Conversation
Collaborator
File
|
|
The commit b26a71e (as a parent of 9800375) contains errors. |
Author
|
Withdrawing this draft for now; will revisit later. Apologies for the noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new Standards Track (ERC) proposal: Stateful Fungible Token — an ERC-20
extension that maintains a per-holder, on-chain provenance lineage which updates
automatically on every transfer, while preserving full ERC-20 fungibility and
backwards compatibility.
Discussion thread: cc358/dna-standard#1
What it does
weights sum to 100% (10000 bps) when the balance is non-zero.
lineage and the sender's, weighted by the recipient's balance and the amount sent.
maxLineageDepth) and adustThreshold, keeping per-transfergas bounded and resisting 1-wei sybil/dust pollution.
Uniswap V4 PoolManager) are exempt, so AMM swaps and vault flows don't pollute lineage.
lineageOf,lineageDepth,ancestorWeight,maxLineageDepth,blendRatio,dustThreshold) plus aLineageUpdatedevent.No ERC-20 method signature, return value, or side effect is changed.
Motivation
ERC-20 (fully fungible, no history) and ERC-721 (full identity, no fungibility) sit at
opposite ends of a spectrum. Many on-chain primitives — reputation systems,
sybil-resistant airdrops, on-chain social graphs, lineage-based access control — need
both liquidity and provenance. By attaching provenance to the holder rather
than the unit, this standard preserves full ERC-20 fungibility (pools, swaps,
accounting all work unchanged) while making a wallet's history a queryable, composable
on-chain property.
Reference Implementation
A complete, tested reference implementation (OpenZeppelin ERC-20 base + Uniswap V4 hook
integration; property-based tests covering weight conservation, depth-cap eviction, dust
handling, and 1-wei sybil resistance) is available at:
https://github.com/cc358/dna-standard
EIP-1 checklist
descriptionfollow the EIP-1 preamble format.Reference Implementation, Security Considerations, and Copyright (CC0).
discussions-toset: ERC Stateful Fungible Token — Discussion Thread cc358/dna-standard#1eipprovisionally set to the PR number (1762); final number to be confirmed by an editor.