dali-rp2
dali-rp2 copied to clipboard
Handling two coins with different tickers
Today I learned that BCC and BCH are different symbols for the same coin:
https://bitcointalk.org/index.php?topic=2617659.0
Two different exchanges used this symbol interchangeably. I'm not sure if this is the only case, but might be something we need to handle.
Interesting, I wasn't aware of this story. It's from 2017, so hopefully exchanges fixed the problem by now, but if we find a case in which this still happens today we can add a synonym table.
@eprbell yeah I'm guessing this is more of a historical quirk. I'm guessing the easiest way to handle this would be to manually manipulate the tables, but I'm wondering if you can think of an easy place to put a synonym table that wouldn't require a ton of work.
Probably inside the first loop of the resolve_transactions(), which is already modifying transaction data.
There is also the case of BCHSV and BSV that we had issues with earlier. I think this might spring up from time to time. There are also smaller assets that share tickers, like GENE.
Here's a more detailed description of how to approach this issue:
- add the synonym table to DEFAULT_CONFIGURATION;
- inside the first for loop of resolve_transactions() check if
transaction.asset
has a synonym (the configuration is passed to this function via theglobal_configuration
parameter;- if there is a synonym reinstantiate the transaction with the new symbol.