XRPL - custom market name is ignored, so two tokens with the same code overwrite each other in balances
Describe the bug
On XRPL a token is identified by its currency code together with the account that issued it, so USDC from Circle and USDC from GateHub are different assets that share a code. A custom_markets entry was added for the GateHub token under the name USDC.gh-XRP and it did appear in the trading pair list, but balance kept showing a single USDC figure matching only one of the two holdings on the wallet.
The name given to a custom market is not used when the connector decides what to call a token in balances. Built-in markets do use theirs, which is how the shipped list keeps Bitstamp's USD separate as USD.b, but custom entries are merged in without that step and fall back to the plain currency code unless trading_pair_symbol is filled in. Two markets for the same code then produce the same name, the balance list keeps one value per name, and one holding silently overwrites the other. Nothing is flagged as missing or wrong, the surviving figure depends on the order the ledger returns the trustlines, and that understated balance also feeds anything that sizes orders from available funds.
Steps to reproduce
- Use an XRPL wallet holding USDC from Circle
rGm7WCVp9gb4jZHWTEtGUr4dd74z2XuWhEand USDC from GateHubrcEGREd8NmkKRE8GE424sksyt1tJVFZwu, with clearly different amounts on each. - Run
connect xrplwith that wallet. - In conf/connectors/xrpl.yml, add a custom_markets entry named USDC.gh-XRP for the GateHub issuer and leave trading_pair_symbol unset.
- Restart the client and run
balance. - Only one USDC row appears, matching one holding; the other is absent even though the ledger shows both.
Release version
dev-2.17
Type of installation
Source
Attach required files
na
Source: hummingbot/hummingbot