ERC-8378: Parametric Token

Hi everyone,

DeFi today faces a trade‑off: you can have liquidity, or you can have utility. Tokens that are highly liquid (like ERC‑20) carry no state - they are just balances. Tokens that carry state (like ERC‑721 or ERC‑1155) fragment liquidity because each variant is a separate class. Respectively, agents and structured products cannot easily build on either without choosing between the two.

I’d like to propose a new ERC-20 compatible solution: Parametric Token. It keeps tokens fungible while allowing each account to hold its own set of parameters. The parameter travels with the token, updates deterministically on transfer, and can be mutable or immutable.

The idea

A Parametric Token is an ERC‑20 with extra data attached to each balance. Think of it as a token with state that deterministically mutates with every transfer: a prediction price, a mint time, a trust score, or a bundle ratio. When a token is minted, you either set the values or get automatic initialization. Once you transfer the token, the parameters update according to their respective pure functions (e.g., weighted average, max, or advanced formulas). Neither recipient nor any special contract (engine) decides on the final parameters state - it’s processed automatically by the token contract.

This is not a new token class: it is a new property of fungible ERC-20 tokens.

If there is a variety of the same token, then how to manage it properly? For this, the standard suggests a sub-accounts structure: you CAN convert your account into a Super account with multiple sub-accounts to be able to process the same token with different parameters using the same wallet address.

In addition to sub-accounts, the standard:

  • divides allowances into Specific (used by a particular sub-account) and General (used by the rest of sub-accounts) allowances
  • introduces non-zero-sum transfers (when creditAmount != debitAmount) - they must implement an optional interface for proper balance accounting.

How it can be used:

  • Liquidity consolidation. Tokens with different parameters trade in the same pool (e.g. scalar price predictions). No necessity for fragmentation - just mint the token with price you believe in (expected BTC price as of Aug 20 will be $75400) and trade it in a single liquidity pool.

  • Velocity control. You can design tokens that effectively controls turnover (age‑based fees, tenure rewards). Construct your rewards/fees in the way you’d like to encourage/discourage token holding.

  • Advanced derivatives. Containerize value the way you prefer, with parameter‑based weights working out‑of‑the‑box.

  • Agentic systems. Pure, deterministic mutations and sub‑account isolation make parametric token a natural primitive for autonomous agents. Agents can encode reputation, trust, or strategy directly in the token state, which is preserved by the token contract.

Links:

ERC draft:
:link: https://github.com/K2eno/parametric-token/blob/main/ERCS/erc-8378.md

Implementations (prediction, tenure and bundle tokens):
:link: https://github.com/K2eno/parametric-token

PR:
:link: https://github.com/ethereum/ERCs/pull/1937

Open questions:

I would especially appreciate feedback on these points:

  1. Gas cost. The parameter mutation logic adds gas overhead per every transaction (mint/transfer/burn). In practice, for a few (1‑3) parameters, it looks acceptable. Should we make extra effort to reduce the cost?

  2. Parameter limits. uint64 is flexible, but is a fixed‑length array (uint8 NUMBER_OF_PARAMETERS) the right choice?

  3. Sub‑account deletion. There is no way to return back from Super account to Normal account; there is no way to delete a sub‑account - the owner can leave it empty, but the index remains. Are these limitations, or are they acceptable given the bounded nature of use cases?

  4. NZS detection. The optional NZS extension uses ERC‑165. Is that sufficient for indexers and wallets to reliably detect non‑zero‑sum behaviour?

  5. Engine integration. The reference implementations use an external engine for mint/burn, but the token itself does not enforce economic safeguards (collateral, caps, etc.). Should the standard recommend a specific pattern for these (like inbound allowances), or is it better left to integrators?

Any other questions or comments are welcome. I’ll open a PR shortly. Feedback is appreciated, particularly from anyone who has worked on prediction markets, RWA tokens, or agentic systems.

Thanks for reading.

Alexander Zvezdin (@k2eno)

1 Like

@K2eno , I’m trying to make sure I understand the model correctly before getting into the implementation details.

My reading is that the proposal keeps the ERC-20 balance as the fungible accounting layer, but associates an additional parameter state with that balance.

For a Normal account, that looks roughly like:

account balance parameters
Alice 100 A
Bob 50 B

When Alice transfers some balance to Bob, the token contract determines Bob’s resulting parameter state according to the token-specific mutation function.

So for a mutable parameter, conceptually:

(Bob's current balance + params) + (incoming balance + params) → new balance + new params

while an immutable parameter instead prevents balances with incompatible parameter values from being merged.

And if an address needs to preserve several parameter states separately, it can become a Super account:

address sub-account balance parameters
Alice 0 20 A
Alice 1 80 B

with balanceOf(Alice) = 100, while the parametric interface can address each partition separately.

If that is the intended abstraction, I had two questions about where the ERC-20 boundary sits.

First, how should ERC-20 compatibility be understood once an account becomes Super?

The draft says that balanceOf(account) returns the aggregate balance across the sub-accounts, while standard transfer() is equivalent to transferring from sub-account 0.

Using the example above:

balanceOf(Alice) = 100

but sub-account 0 contains only 20.

Would a standard:

transfer(Bob, 100)

therefore revert even though an ERC-20 caller observes a balance of 100?

If so, would it make sense for the specification to distinguish between ERC-20 interface compatibility and ERC-20 spendability semantics?

I’m thinking here about a wallet or protocol that only knows ERC-20 and assumes that balanceOf(account) describes the amount that can be transferred through the standard transfer interface.

Second, I’m wondering about the guarantees expected from mutable parameter functions.

The draft requires mutation to be deterministic. But can the resulting parameter state intentionally depend on the order or partitioning of transfers?

For example:

combine(combine(A, B), C)

versus

combine(A, combine(B, C))

Do compliant implementations need those to produce the same parameter state, or is path-dependent state intentionally allowed?

I can see cases where weighted aggregation or max naturally gives order-independent results, while other deterministic functions may not.

If path dependence is allowed, perhaps it is simply part of the application-defined parameter semantics. If it is not intended, there may be an additional property of mutation functions that needs to be specified beyond determinism.

So I think the part I’m still trying to locate is the boundary between:

properties standardized by Parametric Token

and

properties defined by the particular parameter system.

Is that roughly the intended separation?

1 Like

Hi! Thanks for the careful and precise reading – your summary of Normal/Super accounts is precisely right. And yes, transfer(Bob, 100) must revert because it has to be equivalent to parametricTransfer(0, Bob, 0, 100) while Alice’s sub-account 0 doesn’t have enough funds. The standard does not guarantee that balanceOf reflects the amount spendable via transfer for Super accounts - this is an intentional trade-off.

Your question makes me think about a proper warning in Security Considerations, like:
"For Super accounts, balanceOf(account) returns the aggregate balance, but transfer always uses sub‑account 0. Integrators should not assume that balanceOf is spendable via transfer for Super accounts."

From a user perspective, if transactions require full compatibility with existing wallets, they have to use either Normal account or Super account with a single sub-account. Then spending and allowance behaviour won’t need any adjustments.

As for path-dependency, the standard intentionally distances from application/economics. The goal is to (a) create rails for parametrization with a very limited minimal set of must-do rules and (b) ensure unambiguous reproducibility of every change in (balance,parameters) state.

For this reason implementers have every freedom for underlying economics, including associativity/commutativity patterns. The standard has to be equally applicable to path-agnostic and path-dependent mutations. The actual meaning of parameters, the mutation formulas, and whether they are order‑dependent are outside the scope of the standard and left to the implementer.

We focus on data structure, reasonable gas efficiency, and robust sub-accounts/allowance logic.

Thank you again for the thoughtful review – it helps sharpen the proposal.

Small correction:

Super account with MULTIPLE sub-accounts won’t need any adjustments in terms of spending if only sub-account 0 has a non-zero balance AND Specific allowance is set to 0. It’s a part of this standard requirements.

I think the Super-account behavior creates an important compatibility issue for ordinary ERC-20 wallets.

If balanceOf(account) returns 100, but only 20 is held in sub-account 0, a standard wallet may:

  • display 100 as available;

  • enable a “Max” transfer of 100;

  • estimate or simulate the transaction using normal ERC-20 assumptions;

  • then have transfer(..., 100) revert.

A warning in Security Considerations documents the issue for integrators, but it does not give wallets a reliable way to handle it.

Would it be useful for the standard to expose:

  1. A machine-readable way to detect whether an address is operating as a Super account.

  2. A canonical view returning the amount spendable through standard transfer().

  3. An explicit interface or capability signal indicating that balanceOf does not necessarily represent the standard-transfer balance.

Without something like this, wallets may need token-specific handling or repeated transaction simulation just to determine whether the displayed balance can actually be sent. That seems likely to produce confusing failures for users and compatibility problems for existing integrations.

Is preserving aggregate balanceOf a firm design requirement, or could the ERC expose a stronger compatibility guarantee for standard ERC-20 callers?

1 Like

Hi Anzus_GemWallet,

Thanks for the comment – you are right, the Super account compatibility issue needs to be addressed more explicitly, and wallets need reliable, machine‑readable ways to detect the state.

Below is a simplified, robust, and unambiguous flow for any wallet/platform that wants to make transferFrom() on an UNKNOWN ERC-8378 token. The flow ignores NZS token option.

  1. Detecting interface: Call supportsInterface(type(IParametricToken).interfaceId). If false, use standard ERC‑20 semantics.
  2. Checking account type: Call isSuperAccount(owner). If false, treat as vanilla ERC‑20 and apply balanceOf(), allowance(), transferFrom() in the usual way.
  3. If Super account: transfer and transferFrom always use sub‑account 0. The spendable balance is parametricBalanceOf(owner, 0), not balanceOf(owner) (which is aggregate).
  4. Allowance: transferFrom uses the General allowance (total - sub), not the Specific allowance. Query allowance(owner, spender).
  5. Executing: The maximum transferable amount transferableAmount is the minimum of parametricBalanceOf(owner, 0) and allowance(owner, spender). Call transferFrom(owner, recipient, transferableAmount).
  6. Events: Both Transfer() and ParametricTransfer() events will be fired, the latter will show all involved sub-accounts and resulting parameter state.

Result: The transaction succeeds. If you skip any of these checks, it may revert unexpectedly.

The flow above reflects changes we need to make to the existing Specification:

  1. Replace the accountType() getter with isSuperAccount(). This gives wallets a simple boolean check for Super account status.
  2. Make paramConfig a REQUIRED getter. Integrators need to know mutability, name, and decimals on‑chain to handle parameters correctly.
  3. Require ERC‑165 for the main interface – add supportsInterface(bytes4) to IParametricToken so wallets can reliably detect ERC‑8378 tokens.
  4. Add a compatibility warning in the Security Considerations section about balanceOf being aggregate for Super accounts and transfer only using sub‑account 0.
  5. Keep allParametersOf as RECOMMENDED – it remains a convenience getter, not a core requirement.

We will update the specification accordingly, I will notify.
Thanks for the feedback!

Thanks for the detailed explanation and for taking the feedback into account. The proposed changes sound helpful, especially giving wallets a reliable way to detect Super accounts and determine the amount that can actually be transferred.

Documenting the wallet flow clearly should also help prevent users from seeing a balance they cannot send. Looking forward to the specification update.

1 Like

Hi Anzus_GemWallet,

Specification is now updated (first link in the original post, or PR link). Here is a summary of the key updates made in this commit:

  • ERC‑20 Compatibility: we have revised the respective section to clearly distinguish interface compatibility from semantic compatibility. The section also now includes explicit integration guidance for legacy systems:

    • supportsInterface(type(IParametricToken).interfaceId) and isSuperAccount(address) – to detect that the token is parametric and whether an account is a Super account
    • Clarifies what methods to use for Super accounts and provides a dedicated table mapping standard ERC‑20 functions to their parametric equivalents.
  • Definition of deterministic mutations: we tuned respective wording to avoid “pure” and introduce more general definition requiring fully reconstructible and verifiable transitions.

  • Security Considerations: we have added a dedicated note on Super accounts and ERC‑20 wallet compatibility, explicitly warning integrators on proper usage of balanceOf.

  • Permissions (optional interface): we added an optional _permissions structure to restrict inbound transfers based on incoming parameter values. This protects against “parameter poisoning”, which is a sensitive issue for some use cases like voting. The functionality definitely requires standardization due to numerous nuances.

  • Committed allowances: committedUntil field is added to the allowance record, if not 0 it sets commitment deadline, until which the owner can’t withdraw respective sub allowance. The feature requires minimal overhead but is pretty efficient in P2P operations.

Any suggestions/comments are highly appreciated.

Implementations will be updated shortly.

Thanks for the update. Clearly separating interface compatibility from semantic compatibility, along with the mapping table, should make it much easier for wallets to avoid presenting an aggregate balance as fully spendable.

The clearer integration guidance addresses the concern I raised. I don’t have any additional comments at this stage, but I appreciate you incorporating the feedback.

1 Like

Hi Sasha,

I’ve read through your proposal a few times, and I find the core idea compelling. While I’m not a blockchain protocol expert, from a software engineering perspective, extending ERC-20 with deterministic state and parameterization seems like a logical way to support use cases that don’t fit neatly into purely fungible or non-fungible models.

My main question is around standardization rather than technical feasibility.

Historically, ERCs have taken different approaches: ERC-721/1155 introduced new asset models, while ERC-2612 and ERC-4626 extended existing models around broadly recurring needs. ERC-4626 is particularly relevant because its value came from standardizing a pattern that multiple independent applications were already converging on.

With that in mind, do you see Parametric Token as a general-purpose primitive that addresses a recurring ecosystem-wide need, or primarily as an abstraction emerging from the specific prediction, tenure, bundle, and agentic use cases you’ve encountered?

I can see the potential, but the added semantics around sub-accounts, parameter mutation, allowances, and especially non-zero-sum transfers also create meaningful integration considerations for wallets, indexers, exchanges, and existing DeFi infrastructure.

So I’d be particularly interested in what evidence you’re seeing that this is a broadly recurring pattern—and what you see as the strongest use cases beyond the initial implementations.

Overall, I’m interested in the direction. I’m mainly trying to understand where you see the boundary between a powerful application-level abstraction and an ecosystem-level standard.

1 Like

Hi Tyler tspellen1,

Thank you for the thoughtful read and the careful questions. I will try to clarify the points.

Standardization vs. application-level abstraction

ERC-8378 deliberately distances itself from application logic. It does not prescribe what parameters mean, how they should mutate, or what economic policies should govern them. Instead, it introduces a minimal set of interfaces and logic that enable parametric rails – a shared language for stateful fungible tokens that any application can adopt. The standard provides the structural primitives: sub‑accounts, typed parameters, deterministic mutation hooks, allowances, and permissions. The application layer shall define the economic meaning.

Just‑in‑time ideology and encapsulation

We believe the Parametric Token has very wide applicability, but we need to be clear: it is not well‑suited for pre‑mint models. If you pre‑mine 1B tokens and distribute them arbitrarily, the parameters become meaningless and the whole idea is discredited. The token’s value should depend on the state it carries at the moment of mint and in every subsequent transfer. This naturally aligns with a just‑in‑time ideology: tokens are minted when a user engages, and the parameters reflect that engagement.

The best way to implement this is through encapsulation of the token with an engine – a separate contract that holds exclusive capabilities (e.g., minting, burning, or reward distribution) and enforces the application‑specific logic. The token remains a pure ledger; the engine provides the economic context.

Wallets as the primary interface

Parametric tokens will certainly require integration effort. But the big story behind adoption is that wallets are arguably the largest beneficiaries of this standard. They are the user‑facing interface and the primary security layer for asset management. With ERC‑8378, wallets gain an incredibly powerful low‑level interface for assets represented by parametric tokens: sub‑account balances, allowances, permissions, and transfers – all become natively accessible. For end users, this means clarity and control; for the ecosystem, it means that complex financial logic becomes accessible through the tools they already use. This will stimulate adoption of the standard.

Use cases and evidence

Prediction markets, tenure‑based governance, and bundled portfolios demonstrate pretty wide range of applicable use cases.

But the main statement is this: parametrization can add value to essentially any plain ERC‑20 solution, with minimal overhead. Every system has some ultimate goals (adoption, trading volume, loyalty, etc.), and parametrization can directly contribute to them. Account‑specific parameterization personalizes incentives. This is the mission and ultimate logic of parametrization.

To extract value from it, the project must first decide on its KPIs and align token parameters accordingly. It doesn’t necessarily solve all motivation problems, but it directly links personal interest with project goals via account‑level parameterization.

We believe this is a very efficient tool for many tasks: from liquidity consolidation to asset‑specific economic implementation (e.g., RWA tokenization). The token contract remains generic; the engine and overall implementation provide the economic intelligence.

A sample governance implementation

To illustrate the pattern, let’s consider a governance project with two soft KPIs: loyalty and active participation. We can introduce two parameters:

  • holdingTime – time since mint
  • voteCount – number of votes cast.

Both use weighted average as the mutation function. The engine registers every vote participation and increments voteCount for the respective account accordingly.

On the benefits side, the same engine then can apply discretionary treatment:

  • Accounts with longer holdingTime receive more voting power (e.g., balance * holdingTime)
  • Accounts with higher voteCount receive higher economic interest (e.g., rewards, fee discounts).

Importantly, users can trade their tokens freely and there is no need to restrict this. Thus, every token holder can capitalize on their holdingTime or voteCount. The market price will naturally reflect the parameter state.

I hope this clarifies the ideology of the standard. Thanks for your inquiry.

Update: token contract Router pattern, permissions, and gas benchmarks.

I wanted to share an important update on token spec and its reference implementations:

  • Tuning of all interfaces and data structure, including signed creditAmount for NZS transfers
  • Router‑proxy architecture refactoring
  • Full implementation of permissions for Prediction token
  • Gas benchmarks for all core functions across three token implementations
  • Uplift of Specification, Rationale and Security Considerations
  • Update of tests and scripts.

The draft and code are available in the reference repository (see original post).

Router‑Proxy Architecture

All tokens now use a router‑proxy pattern: Router (with Storage) + Core + Token-specific logic + Permissions (only for Prediction token). This keeps each contract well under the 24 KB size limit, makes upgrades easier, and separates concerns.

Permissions

The IParametricPermissions interface is now implemented in the Prediction token. This allows accounts to restrict inbound transfers based on parameter value ranges – protecting against parameter poisoning attacks.

Feature Description
permitForSub Set min/max ranges per parameter per sub‑account
permissionOf Query a permission
allPermissionsOf List all enabled permissions
  struct Permission {
    bool enabled; // Enabled flag
    uint64 min; // Minimum acceptable value (inclusive)
    uint64 max; // Maximum acceptable value (inclusive)
    bool soft; // If true, owner is exempt; if false, applies to all
  }

Non‑Zero‑Sum (NZS) Transfers with Negative Credit

In NZS transfers, creditAmount can be negative, now it’s reflected in its type: int256 creditAmount. While the Bundle token implementation produces a strictly positive creditAmount, it can be negative in general case. Off‑chain systems must detect NZS via supportsInterface and use the NZS event for accurate accounting.

Gas Benchmarks

We assessed gas consumption for core functions for all implementations. All numbers are total user cost (with Router delegatecall overhead included), measured as median gas from multiple executions with warm storage, Super accounts, and non‑trivial mutations:

Operation Prediction Tenure Bundle
2 params + permissions 1 param 1 param + NZS
approveForSub 45,870 45,831 45,831
allowanceOf 14,694 14,677 14,677
parameterOf 9,537 9,498 9,498
parametricBalanceOf 11,338 11,299 11,299
transfer 90,711 76,755 113,852
transferFrom 102,241 88,175 125,383
parametricTransfer 91,427 80,189 117,397
parametricTransferFrom 109,351 95,329 132,537
mint 92,086 70,378 105,114
burn 64,100 61,242 63,018
permitForSub 41,683 n/a n/a
permissionOf 13,056 n/a n/a

All costs look as a reasonably affordable overhead.

Testing & Deployment

  • Tests are updated for new implementations
  • Scripts are reduced to deployment.

I would really appreciate any feedback on interfaces, permissions functionality, signed credit, and gas costs.

Important news: Yellow Pro has shipped agent sub-accounts: a funded parent-account structure with isolated partitions the agent can trade against, without opening the main balance.

That is a production instance of the same account model ERC-8378 uses — partitions under one address, so isolated balances with individual parameters/settings do not collapse into a single mixed position. Important: it is not an ERC-8378 token deployment, it is an adoption precedent for the partitioning primitive the standard needs in trading infrastructure.

Some context: during the Yellow Accelerator, Shordex (shordex.io) proposed this to Yellow Network to keep inverse parametric token variants separate and tradeable in isolation. The proposal was discussed with the team, and a PR was submitted:

While original need came from the parametric nature of the token, the structure proved to be perfectly suitable for agentic use case. Scope, risk, and individual settings have to sit on the partition, not on the parent.

In the meantime we are working on another production full-scope ERC-8378 implementation. Stay tuned.

Short update: we launch Unbinary scalar price predictions project as the first implementation of ERC-8378 standard: unbinary[dot]io, next week Monad Alpha.

I spoke with the author in person at Devcon and want to put my position in writing here. I think the problems with this proposal are structural, not editorial, and more interface changes won’t fix them.

1. “Arbitrary parameters and logic” is the opposite of a standard

A standard is worth what an integrator can assume about a contract without reading its code. Here is what ERC-8378 actually guarantees:

  • Parameters are “abstract, uninterpreted numerical structures (uint64[])”, and the standard is “entirely agnostic to economic meaning”.
  • Mutation rules are token-specific. Per the author’s reply above, associativity, commutativity and path dependence are “outside the scope of the standard and left to the implementer”.
  • With the NZS extension, the amount credited to the recipient is also token-specific, and per the 1 Sep update it can be negative.
  • The only constraint on all of this is that it be “deterministic” and “fully reconstructible” from on-chain state, block parameters and on-chain oracle data. Every EVM contract already meets that description, so it constrains nothing.

So learning that a token is ERC-8378 tells a wallet, DEX, lending market or indexer nothing about what a transfer will do to the recipient’s position, or even to its balance. Two compliant tokens can behave in completely unrelated ways. That makes it a framework or a design pattern, not something independent implementers can interoperate on. ERC-4626 has been brought up in this thread as a precedent, but it’s the counterexample: it standardizes one specific behavior (deposit assets, receive shares, defined conversion semantics) so integrators can treat every vault the same way.

2. It breaks the ERC-20 invariants it claims to be compatible with

“Interface-compatible” is doing a lot of work in this draft. Sharing function selectors is not compatibility. What matters is the assumptions integrators build on top of those selectors:

  • Spendable balance. For a Super account, balanceOf returns the aggregate while transfer/transferFrom only spend from sub-account 0. Every ERC-20 integration in production assumes balanceOf(x) is what x can move. The draft’s answer is that integrators should call supportsInterface, then isSuperAccount, then parametricBalanceOf. If every integrator has to special-case the token, it is not ERC-20 compatible. Calling this risk “educational, not operational” doesn’t change that.
  • Supply accounting. ERC-20 says a contract that creates tokens SHOULD emit Transfer from 0x0. NZS transfers create or destroy supply inside a regular transfer and emit a single Transfer(from, to, creditAmount). Replaying Transfer events no longer reconstructs balances or totalSupply, and the draft itself admits that “the standard Transfer event alone is insufficient”. Every indexer, explorer and accounting system that consumes ERC-20 events gets wrong numbers. A negative creditAmount can’t be expressed in a uint256 Transfer event at all.
  • Receiving can fail because of what the recipient already holds. Immutable-parameter conflicts MUST revert, and the Permissions extension lets recipients reject inbound transfers based on parameter ranges. Any protocol that depends on being able to send tokens to an address (liquidations, vault withdrawals, auction settlement, refunds) can be blocked by recipient state.
  • Receiving changes your position. Anyone can send tokens to your address and move your mutable parameters. The draft acknowledges this as “parameter poisoning”, and its answer is one more opt-in layer. In ERC-20, receiving more of a token can never make your existing position worse. Here it can, by design.
  • Revocation. While committedUntil is active, approve MUST revert unless the new amount exceeds the committed specific allowance, so approve(spender, 0) fails. Revocation tooling and wallets assume it always works.

These are not edge cases to be patched. They are the mechanism.

3. The liquidity argument doesn’t hold up

The motivation is that prediction market liquidity is fragmented across outcome tokens, and that ERC-8378 consolidates it into “a single liquidity pool”. Consider what a plain ERC-20 venue (an AMM pool, an order book escrow) does with this token. It’s a Normal account, so every deposit is folded into the pool’s single parameter set by the mutation rule. With a weighted average, the pool becomes a blender: whoever buys out of it receives the pool’s averaged prediction, not anything a seller held. The parameter that is the whole point of the token gets destroyed by the venue meant to consolidate its liquidity. With immutable parameters, the pool can’t accept a second variant at all.

To preserve parameters, the venue has to be ERC-8378-aware and keep a sub-account per variant. That is fragmentation again, just moved inside one contract.

Prediction market liquidity isn’t fragmented because ERC-20 lacks a uint64[]. It’s fragmented because different outcomes are different risks and get priced separately. A token interface doesn’t change that.

4. This is a product specification, not a standard

Several things point the same way:

  • The draft mandates private storage mappings, a “Required Data Model” with specific structs, and a recommended modifier with specific require strings. Standards specify observable behavior at the interface boundary, and storage layout is an implementation decision. Mandating it only makes sense if the goal is for everyone to deploy the same codebase.
  • The feature set (one-off allowances, committed allowances, inbound permissions, NZS, the general/specific allowance split) grew in response to problems specific to the author’s own Prediction, Tenure and Bundle designs. Each one is another surface every integrator has to understand.
  • The adoption evidence offered in this thread is the author’s own launch (Unbinary) and a +8k-line PR from the author to Yellow’s nitrolite (layer-3/nitrolite#629), open and unmerged since March. Yellow’s agent sub-accounts are, in the author’s own words, “not an ERC-8378 token deployment”.
  • The Motivation section reads like a pitch deck (“next generation of ERC-20 compatible DeFi and agentic finance”, “self-improving value transfer”). In person, the pitch was that this would kill Kalshi and Polymarket.

ERCs earn their place by codifying something multiple independent teams were already converging on, so their products can interoperate. ERC-20, ERC-2612 and ERC-4626 all followed that path. This proposal goes the other way: it defines one team’s mechanism and asks the ecosystem to migrate to it. That is a product looking for distribution through the ERC process. Nothing prevents shipping it as a product. It doesn’t need an ERC number to work, and getting one won’t create adoption.

5. We’ve been here before

ERC-20 is the most widely integrated interface in the ecosystem, and every attempt to change its core semantics in place has hit the same wall:

  • ERC-223 and ERC-777 changed transfer behavior (recipient hooks) while claiming compatibility. ERC-777 hooks became a recurring reentrancy vector, and OpenZeppelin Contracts removed its implementation in 5.0.
  • ERC-1400/1410 partitioned a fungible balance under one address, which is essentially the Super account model. It never got past the proposal stage.
  • Fee-on-transfer tokens, which NZS generalizes, forced Uniswap V2 to add SupportingFeeOnTransferTokens router variants, and Uniswap V3 doesn’t support them at all.
  • Rebasing tokens, where balanceOf moves independently of transfers, ended up wrapped (stETH to wstETH) because integrators wouldn’t support the semantics.
  • ERC-1155, ERC-3525 and ERC-6909 took the honest route: they are separate interfaces that don’t claim to be ERC-20.

The pattern is consistent. The ecosystem doesn’t adopt ERC-20 variants with different semantics. It wraps them back into plain ERC-20 or ignores them. If parametric state is useful, it belongs in a separate interface or in an application layer on top of plain ERC-20 positions, not in a token that answers balanceOf and transfer with different meanings.

I’m not saying these mechanics can’t work for Unbinary. I’m saying they don’t belong in an ERC, and I’d ask reviewers and editors to weigh that before this moves further.

1 Like

The draft could use an explicit rule for zero-value transfers. ERC-20 requires them to be treated as normal transfers and emit Transfer, while ERC-8378 leaves parameter mutations token-specific without defining a zero-value identity rule.

For example, with a mutation defined as max(senderParam, recipientParam), a holder with a higher parameter could call transfer(recipient, 0). If the mutation runs, the recipient’s parameter changes even though no tokens move. This would allow parameter poisoning without spending tokens, unless the implementation adds its own zero-value guard.

I’d suggest requiring successful zero-value transfers to preserve balances, parameters and allowances, including one-off allowances. Tests should cover both transfer and transferFrom, with different source and destination parameters. Could the specification define this behavior and clarify whether immutable-parameter and inbound-permission checks should still apply when the amount is zero?

1 Like

Regarding NZS, I think the stronger example is not a normal transfer where 100 is debited and 95 is credited..The real bottleneck is what happens when an NZS operation produces a negative balance adjustment that the recipient cannot absorb.
For example, consider an institutional settlement account with a balance of only 20 units. An incoming transaction triggers a negative credit adjustment of 30 units. The resulting balance would be -10.
This raises the critical question: does the protocol reject the operation, permit an overdraft, or record an outstanding liability separately?

1 Like

I’m still trying to grasp the use-cases but I’d like to explore this line of questioning further. ERC-20 is basically maths postulate which enforces a split-merge operator guaranteeing that nothing is added (aka inflation) though it can be abandoned (stuck in non-active address).

while an immutable parameter instead prevents balances with incompatible parameter values from being merged.

so the question then becomes what rules govern parameters to preserve the merge-split so that the mathematical properties are preserved. Bitcoin uses UTXO (https://www.investopedia.com/terms/u/utxo.asp) in that the dataflow (in-out) always matches so the macro-sum is constant though the individual portions vary.

which sounds like you want to implement an arbitrary language with math operators via exposed parameters which scares me. How do you trust what a remote contract is doing? Even if you figure out some proof so that it becomes a vector (preserving all normal maths properties) it could be implemented securely differently (coupled ERC-20s). The only mutation that makes plausible sense for me is hints as to surjective-injective mapping which might alter the source-destination, but never the maths.

Are my worries unwarranted?

1 Like

Thank you for taking the time to write this up. I appreciate the directness, and I want to address your position carefully.

  1. “Arbitrary parameters and logic” is the opposite of a standard

The central claim is that ERC-8378 cannot be a standard because mutation logic (and certain other behaviors) is intentionally left to the implementer. I disagree that this disqualifies it from the ERC process.

A standard does not have to make every compliant implementation interchangeable under zero-knowledge black-box assumptions the way ERC-20 does. It has to define a clear, stable interface, state the invariants it does guarantee, and be explicit about what it deliberately leaves open. ERC-8378 does this via:

  • Parameters are abstract uint64[] values.
  • Mutation on transfer must be deterministic and reconstructible.
  • The concrete mutation functions, their algebraic properties, and their economic meaning are defined by the token.
  • Detection (supportsInterface, isSuperAccount) and query functions are provided so that integrators who need more than raw ERC-20 behavior can obtain it.
  • Differences from plain ERC-20 semantics (sub-account 0 as the only surface for standard transfer/balanceOf, optional permissions, etc.) are explicitly documented rather than hidden.

This is a narrower contract than ERC-20 or ERC-4626. It is still a contract. Integrators who only understand ERC-20 receive limited, well-defined behavior (sub-account 0). Integrators who read the specification and use the parametric interface can work with the richer model. That split is intentional and stated.

It is an explicit compromise: by refusing to standardize mutation logic, the standard preserves room for advanced, asset-level value creation and transfer that would be impossible under fully rigid, black-box semantics. The boundary is stated, not hidden, and does not place the work outside the ERC framework.

  1. It breaks the ERC-20 invariants it claims to be compatible with

The draft distinguishes interface compatibility from full semantic compatibility and documents the differences (most importantly that standard transfer/balanceOf surface only sub-account 0). Where the current text is still ambiguous or insufficiently prominent, it should be tightened, fully agreed. The design does not claim that every existing ERC-20 integration will behave correctly without using the detection and parametric methods.

On the specific items:

  • Spendable balance: addressed by the explicit sub-account-0 rule and detection functions.
  • NZS supply accounting: NZS is optional; if retained, its event and accounting requirements can be isolated more clearly or moved to a separate extension.
  • Receiving can fail / parameter changes: immutable conflicts and the optional permissions interface are deliberate. They are documented trade-offs that give recipients control, not accidental breaks.
  • Committed allowances: an optional feature whose revocation semantics can be clarified or constrained.

These are design choices with stated consequences, not hidden violations. They can be made more precise in the text; they do not require abandoning the primitive.

  1. The liquidity argument doesn’t hold up

An unaware ERC-20 venue will average mutable parameters or reject incompatible immutable ones. That is technically correct. But a venue that implements the parametric interface can maintain distinct parameter sets in sub-accounts under a single contract, particularly with a self-custodial setup. That is strictly less fragmented than deploying and integrating separate outcome tokens with separate pools for each variant.

Whether the efficiency gain is large enough in practice is an empirical question that depends on parametric-aware liquidity venues existing. The specification does not claim that unaware infrastructure automatically consolidates liquidity. It claims that the partitioning primitive makes consolidation possible inside one contract when the venue chooses to support it. Observing that current AMMs ignore the extra interface does not disprove the latter.

  1. This is a product specification, not a standard

The data model is generic. The structs and mappings represent the minimal state required by the account model the standard defines:

  • Account / SuperAccount / SubAccount capture the Normal vs Super distinction and per-position balances + parameters.
  • Allowance captures the general/specific split plus the optional one-off and commitment fields.
  • ParamConfig describes the parameter metadata.

These are not tied to prediction markets, tenure tokens, bundles, or any other application. Any implementer who wants account-level parameters and isolated sub-positions under one address needs equivalent state. Mandating the mappings (even as private) simply records that this state must exist; it does not prescribe application logic.

Storage layout is normally left as an implementation detail, and current “REQUIRED” language can be softened to “the following state MUST be maintained” without loss of meaning. That is a wording improvement, not evidence that the model itself is non-generic or product-specific. The interface, events, and behavioral rules remain implementable by independent teams against the same specification.

  1. We’ve been here before

Previous attempts that changed ERC-20 transfer or balance semantics while continuing to claim drop-in compatibility encountered resistance. That history is relevant if the goal is about compatibility only. It is less decisive when the specification explicitly documents the differences, supplies detection methods, and defines a narrower contract.

ERC-1155 and ERC-6909 succeeded as separate interfaces. ERC-8378 can follow a similar path: plain ERC-20 callers see only the documented sub-account-0 surface, while parametric callers use the additional interface. The existence of past failures does not prohibit a clearly bounded new primitive. The starting position was ERC-20 compatibility, but this claim can be narrowed or removed if it creates more problems than benefits.


I am happy to tighten language around the intentional boundaries, relax non-essential storage requirements, and isolate NZS if that improves clarity because NZS is the most ‘risky’ part of the standard. The core position remains that a standard may deliberately leave selected asset-level logic open, provided the interface, the enforced invariants, and the boundaries are explicit. That is the framework ERC-8378 is written to.

Very appreciate your input.

Thank you for the precise observation.

I fully agree — this is a missing point in the specification.

While the draft leaves mutation behavior to the implementer, edge cases must not break the main logic and should not be left entirely to implementers. Zero-value transfers are an important case.

As you note, a zero-amount transfer or transferFrom can alter the recipient’s parameters (for example under a max rule) without moving tokens. That creates a free parameter-poisoning vector that has to be addressed.

An explicit rule improves clarity and safety. I agree with the suggestion that a successful zero-value transfer MUST:

  • leave balances unchanged,
  • leave parameters unchanged (identity behavior),
  • leave allowances unchanged (including one-off allowances).

This keeps zero-value transfers consistent with the ERC-20 that they are observable no-ops on state, while still allowing the token to emit the appropriate events.

On immutable-parameter and inbound-permission checks: restrictions should still be evaluated even when the amount is zero. Any conflict must revert the transfer.

A recipient who has rejected a given parameter range, or an immutable mismatch that would be illegal for a positive amount, should not become legal merely because the amount is zero. The specification will state this directly.

I will add the zero-value identity rule and the clarification on checks to the draft. This is a small, well-contained addition that removes an ambiguity without restricting the mutation freedom that applies to positive amounts.

Thanks a lot!

1 Like