diff --git a/CHANGELOG.md b/CHANGELOG.md index 092efc618..6c67e41f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,43 @@ ## [Unreleased](https://github.com/bancorprotocol/fastlane-bot/tree/HEAD) -[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.71...HEAD) +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.74...HEAD) -- Add missing pool data [\#227](https://github.com/bancorprotocol/fastlane-bot/issues/227) +- Error reading updating pool decimals [\#235](https://github.com/bancorprotocol/fastlane-bot/issues/235) +- add float wrapper incase decimal input is string [\#236](https://github.com/bancorprotocol/fastlane-bot/pull/236) ([NIXBNT](https://github.com/NIXBNT)) + +Closed issues + +- Update Arb Mode descriptions in Readme [\#233](https://github.com/bancorprotocol/fastlane-bot/issues/233) + +## [v2.7.74](https://github.com/bancorprotocol/fastlane-bot/tree/v2.7.74) (2023-11-28) + +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.73...v2.7.74) + +- Target token bug [\#225](https://github.com/bancorprotocol/fastlane-bot/issues/225) + +Merged pull requests + +- Update README.md [\#234](https://github.com/bancorprotocol/fastlane-bot/pull/234) ([Lesigh-3100](https://github.com/Lesigh-3100)) + +## [v2.7.73](https://github.com/bancorprotocol/fastlane-bot/tree/v2.7.73) (2023-11-28) + +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.72...v2.7.73) + +- Specific exchanges bug [\#226](https://github.com/bancorprotocol/fastlane-bot/issues/226) +- If gas tkn or wrapped gas token is in flashloan tokens, always include both in token list [\#232](https://github.com/bancorprotocol/fastlane-bot/pull/232) ([Lesigh-3100](https://github.com/Lesigh-3100)) +- Add handling for instances where Stablecoin pool cannot be found for … [\#231](https://github.com/bancorprotocol/fastlane-bot/pull/231) ([Lesigh-3100](https://github.com/Lesigh-3100)) Closed issues - USDC missing from tokens.csv [\#229](https://github.com/bancorprotocol/fastlane-bot/issues/229) +## [v2.7.72](https://github.com/bancorprotocol/fastlane-bot/tree/v2.7.72) (2023-11-27) + +[Full Changelog](https://github.com/bancorprotocol/fastlane-bot/compare/v2.7.71...v2.7.72) + +- Add missing pool data [\#227](https://github.com/bancorprotocol/fastlane-bot/issues/227) + Merged pull requests - Update tokens.csv [\#230](https://github.com/bancorprotocol/fastlane-bot/pull/230) ([NIXBNT](https://github.com/NIXBNT)) diff --git a/README.md b/README.md index 3a531772a..2d07d4b64 100644 --- a/README.md +++ b/README.md @@ -110,12 +110,21 @@ python main.py You can configure the Fastlane Arbitrage Bot using the options in the `@click.option` section of `main.py`. An overview of options is provided below: - **cache_latest_only** (bool): Whether to cache only the latest events. -- **arb_mode** (str): Specifies the arbitrage mode. Options include: - - **single**: Arbitrage between one Carbon curve and one other exchange curve. - - **multi** (default): Arbitrage between multiple Carbon curves and one other exchange curve. - - **triangle**: Triangular arbitrage between one Carbon curve and two other exchange curves. - - **multi_triangle**: Triangular arbitrage between multiple Carbon curves and two other exchange curves. - - **bancor_v3**: Arbitrage between two Bancor v3 pools and one other exchange curve. +- **arb_mode** (str): Specifies the arbitrage mode. + - **Types of arbitrage**: + - **Pairwise**: This includes arbitrage trades between two liquidity pools that contain the same tokens. For example: USDC > LINK, LINK > USDC + - **Triangular**: This includes arbitrage trades between three liquidity pools that can create a triangular route, starting and ending in the same token. For example, USDC > ETH, ETH > LINK, LINK > USDC + - **Multi**: These modes can trade through multiple Carbon orders as a single trade. + - **arb_mode options**: + - **single**: Pairwise arbitrage between one Carbon curve and one other exchange curve. + - **multi** Pairwise arbitrage between **multiple** Carbon curves and one other exchange curve. + - **triangle**: Triangular arbitrage between one Carbon curve and two other exchange curves. + - **multi_triangle**: Triangular arbitrage between **multiple** Carbon curves and two other exchange curves. + - **bancor_v3**: Triangular arbitrage between two Bancor v3 pools and one other exchange curve. + - **b3_two_hop**: Triangular arbitrage - the same as bancor_v3 mode but more gas-efficient. + - **multi_pairwise_pol**: Pairwise multi-mode that always routes through the Bancor protocol-owned liquidity contract. + - **multi_pairwise_bal**: Pairwise multi-mode that always routes through Balancer. + - **multi_pairwise_all**: **(Default)** Pairwise multi-mode that searches all available exchanges for pairwise arbitrage. - **flashloan_tokens** (str): Tokens the bot can use for flash loans. Specify tokens as a comma-separated string in TKN-ADDR format (e.g., BNT-FF1C, WETH-6Cc2). - **exchanges** (str): Comma-separated string of exchanges to include. - **polling_interval** (int): Bot's polling interval for new events. diff --git a/fastlane_bot/__init__.py b/fastlane_bot/__init__.py index 39ec3042d..b4333cce2 100644 --- a/fastlane_bot/__init__.py +++ b/fastlane_bot/__init__.py @@ -1,7 +1,7 @@ from .bot import CarbonBot as Bot, __VERSION__, __DATE__ from .config import Config, ConfigNetwork, ConfigDB, ConfigLogger, ConfigProvider -__version__ = '2.7.72' +__version__ = '2.7.75' diff --git a/fastlane_bot/events/managers/base.py b/fastlane_bot/events/managers/base.py index b1b753d18..a32e6a872 100644 --- a/fastlane_bot/events/managers/base.py +++ b/fastlane_bot/events/managers/base.py @@ -644,7 +644,7 @@ def get_tkn_symbol_and_decimals( record = next((add for add in self.tokens if add["address"] == addr), None) if record: - return record["symbol"], int(record["decimals"]) + return record["symbol"], int(float(record["decimals"])) return self.get_token_info_from_contract(web3, erc20_contracts, addr) diff --git a/fastlane_bot/events/managers/contracts.py b/fastlane_bot/events/managers/contracts.py index c4b810d9d..602f8b1f5 100644 --- a/fastlane_bot/events/managers/contracts.py +++ b/fastlane_bot/events/managers/contracts.py @@ -349,7 +349,7 @@ def _get_and_save_token_info_from_contract( decimals = token_data.loc[token_data["key"] == key, "decimals"].iloc[0] return symbol, decimals else: - decimals = int(contract.functions.decimals().call()) + decimals = int(float(contract.functions.decimals().call())) if ( symbol is None