Stablecoin supported functions.

tradingstrategy.stablecoin.STABLECOIN_LIKE = ('DAI', 'USDC', 'USDT', 'DAI', 'BUSD', 'UST', 'USDN')

Token symbols that are stablecoin like. Note that it is not safe to to check the token symbol to know if a token is a specific stablecoin, but you always need to check the contract address. Checking against this list only works

tradingstrategy.stablecoin.WRAPPED_STABLECOIN_LIKE = ('cUSDC', 'cUSDT', 'sUSD', 'aDAI')

Stablecoins plus their interest wrapped counterparts on Compound and Aave.

tradingstrategy.stablecoin.ALL_STABLECOIN_LIKE = ('DAI', 'USDC', 'USDT', 'DAI', 'BUSD', 'UST', 'USDN', 'cUSDC', 'cUSDT', 'sUSD', 'aDAI')

All stablecoin likes - both interested bearing and non interest bearing.

tradingstrategy.stablecoin.is_stablecoin_like(token_symbol: str, symbol_list=('DAI', 'USDC', 'USDT', 'DAI', 'BUSD', 'UST', 'USDN', 'cUSDC', 'cUSDT', 'sUSD', 'aDAI')) bool

Check if specific token symbol is likely a stablecoin.

Useful for quickly filtering stable/stable pairs in the pools. However, you should never rely on this check alone.

Note that new stablecoins might be introduced, so this check is never going to be future proof.

  • token_symbol – Token symbol as it is written on the contract. May contain lower and uppercase latter.

  • symbol_list – Which filtering list we use.