Skip to content

Commit

Permalink
Merge branch 'main' into 2141_ontop_ethweth
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewcasale authored Nov 29, 2023
2 parents 8ede243 + 0105d7c commit cff3f3a
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 11 deletions.
33 changes: 31 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion fastlane_bot/__init__.py
Original file line number Diff line number Diff line change
@@ -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'



2 changes: 1 addition & 1 deletion fastlane_bot/events/managers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion fastlane_bot/events/managers/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cff3f3a

Please sign in to comment.