Skip to content
Business logic Audit finding Intermediate

Insufficient validation of pool token suffix (allows consecutive hyphens) enables token symbol impersonation and user confusion

The pool token suffix validation allows consecutive hyphens, so an agent can create a token symbol that closely resembles a legitimate one. This could cause users, wallets, or exchanges to misidentify the token and make mistaken transfers or deposits.

r1ver Follow

Originally disclosed on Immunefi

Informational View original
  • Disclosed after under an hour

#55241 [SC-Insight] insufficient validation of pool token suffix allows consecutive hyphens enables token symbol impersonation and user confusion

Submitted on Sep 25th 2025 at 08:52:10 UTC by @r1ver for Mitigation Audit | Flare | FAssets

Description

Brief / Intro

Pool token suffix validation is incomplete. Although empty strings are disallowed and characters are restricted to A–Z, 0–9, and hyphen, the logic permits consecutive/stacked hyphens within the agent suffix. This allows creation of token names/symbols that closely impersonate legitimate ones (e.g., FCPT-BTC-AG-X vs FCPT-BTC-AG--X), leading to UI/wallet/exchange confusion and impersonation risk. In production, this can cause misidentification, mistaken transfers, listing issues, and operational disruptions.

Vulnerability Details

The agent-provided pool token suffix is validated character-by-character to allow uppercase letters, digits, and hyphens, but the check only forbids hyphens at the first and last positions. It does not prevent adjacent hyphens, so values like AG--X or A---B pass validation. This arises from the predicate that permits a hyphen whenever the index is strictly inside the string, without enforcing non-adjacency or a limit on the number of hyphens.

Relevant validation snippet:

Solidity
247:256:fassets/contracts/assetManager/library/AgentsCreateDestroy.sol
// validate - require only printable ASCII characters (no spaces) and limited length
bytes memory suffixb = bytes(_suffix);
uint256 len = suffixb.length;
require(len >= MIN_SUFFIX_LEN, "suffix too short");
require(len < MAX_SUFFIX_LEN, "suffix too long");
for (uint256 i = 0; i < len; i++) {
    bytes1 ch = suffixb[i];
    // allow A-Z, 0-9 and '-' (but not at start or end)
    require((ch >= "A" && ch <= "Z") || (ch >= "0" && ch <= "9") || (i > 0 && i < len - 1 && ch == "-"),
        "invalid character in suffix");
}

When creating pool tokens, the factory concatenates a hyphen and the agent suffix into both the token name and symbol. Because the agent suffix can contain consecutive hyphens and there is no normalization at creation time, these sequences directly propagate to the on-chain identifiers.

Solidity
20:29:fassets/contracts/assetManager/implementation/CollateralPoolTokenFactory.sol
function create(IICollateralPool _pool, string memory _systemSuffix, string memory _agentSuffix)
    external override
    returns (address)
{
    string memory tokenName = string.concat(TOKEN_NAME_PREFIX, _systemSuffix, "-", _agentSuffix);
    string memory tokenSymbol = string.concat(TOKEN_SYMBOL_PREFIX, _systemSuffix, "-", _agentSuffix);
    ERC1967Proxy proxy = new ERC1967Proxy(implementation, new bytes(0));
    CollateralPoolToken poolToken = CollateralPoolToken(address(proxy));
    poolToken.initialize(address(_pool), tokenName, tokenSymbol);
    return address(poolToken);
}

Impact Details

Allowing consecutive hyphens enables near-duplicate pool token symbols (e.g., FCPT-BTC-AG-X vs FCPT-BTC-AG--X) that many UIs/wallets/exchanges render as indistinguishable, causing users to misidentify and buy/deposit the wrong asset, resulting in direct value loss. It also fragments liquidity and distorts pricing, and may trigger listing/rejection issues, aligning with impersonation/griefing and “contract fails to deliver promised returns, but doesn’t lose value” impacts.

References

Proof of Concept

{% stepper %} {% step %}

Step

User sets poolTokenSuffix = "AG--X" in tmp.agent-settings.json. {% endstep %}

{% step %}

Step

Run agent creation (agent-bot create) which forwards the suffix to createAgentVault. {% endstep %}

{% step %}

Step

_reserveAndValidatePoolTokenSuffix("AG--X") accepts; a pool token is created with symbol FCPT-BTC-AG--X. {% endstep %} {% endstepper %}

The original report as published on Immunefi, by r1ver. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The character validation permits a hyphen at any position strictly inside the string without checking that it is not adjacent to another hyphen.

Impact

Near-duplicate token symbols could be rendered indistinguishably by UIs, wallets, and exchanges, causing users to misidentify and buy or deposit the wrong asset, which could lead to value loss and liquidity fragmentation.

What the attacker needed

Ability to create an agent with a chosen suffix

The fix

The suffix validation should also reject adjacent hyphens, for example by requiring that a hyphen is not preceded or followed by another hyphen.

How it was found

  1. Set the pool token suffix to a value containing consecutive hyphens in the agent settings file.
  2. Run agent creation, which forwards the suffix to the vault creation function.
  3. The suffix validation accepts the value and a pool token is created with the consecutive hyphens in its symbol.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A pool token is a digital asset whose name is built from a fixed prefix plus a suffix chosen by an agent. The code checked each character but forgot to stop two hyphens appearing next to each other, so an agent could make a symbol that looks almost identical to a real one. A user might then send money to the wrong token by mistake.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by r1ver

View all

2 more disclosed reports, best first.

More from Flare | FAssets

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.