Description
Description:
Our token (ECOIN, contract: 0x7d38315b92d0E7A85B35B2b7FE969B25935619D7
) implements an 8% fee-on-transfer mechanism. Part of the collected fees is accumulated inside the contract until a threshold is reached — at which point the contract automatically performs a swap (e.g. ECOIN → WBNB) and sends the result to the Ecoin Administrative Wallet.
This auto-swap is triggered during a user-initiated swap, such as one routed through the 0x aggregator.
The issue:
0x appears to misidentify internal protocol swaps as user output, and captures those funds via its surplus logic, sending them to surplusFeeRecipient
0xf5c4f3dc02c3fb9279495a8fef7b0741da956157.
That captured amount does not belong to the user, but to ECOIN Protocol.
Example:
- Surplus address
0xf5c4F3Dc02c3FB9279495a8fEF7B0741da956157
took 57,920 ECOIN (~$36) - That value was generated by the token’s internal swap and meant for the Ecoin Administrative Wallet — not part of the user swap.
This causes direct financial losses to the ECOIN ecosystem as 0x is captures our funds.
Request:
We need this resolved in order to safely finalize our integration of 0x into ECOIN Wallet.
Please consider:
- Disabling surplus logic for our token contract, regardless of wallet origin
- Whitelisting our token, so 0x never applies surplus logic to it
We understand that surplus disabling usually requires a custom plan, but in this case, the surplus logic is misfiring on protocol-level mechanics, which breaks trust in aggregator behavior.
Also note:
This bug happened on Trust Wallet swap, not just within our own app. (I know because trust wallet uses 0x: Allowance Holder)
So disabling surplus per account won’t help unless the fix is token-level.
We’ve spent over a month integrating 0x. This issue is blocking our production launch.
Please help us find a concrete and immediate solution.