Skip to content

Feat/injective spot with delegation#8

Closed
aarmoa wants to merge 67 commits intodevelopmentfrom
feat/injective_spot_with_delegation
Closed

Feat/injective spot with delegation#8
aarmoa wants to merge 67 commits intodevelopmentfrom
feat/injective_spot_with_delegation

Conversation

@aarmoa
Copy link
Owner

@aarmoa aarmoa commented Jul 12, 2023

Before submitting this PR, please make sure:

  • Your code builds clean without any errors or warnings
  • You are using approved title ("feat/", "fix/", "docs/", "refactor/")

A description of the changes proposed in the pull request:
Implementation of a new Injective spot connector.
The new connector does not require Gateway (pure Python connector) and has been implemented to trade with delegated accounts (ie: the trading account trades in representation of a granter account, that is the one having the funds).
The current connector implementation does not support market orders (only limit and limit maker). Market orders support will be added in a future version.

In order to use delegated accounts to trade it is necessary to perform a gran onchain. To send the grant transaction please use the script file hummingbot/connector/exchange/injective_v2/account_delegation_script.py.

NOTE:
There is a problem with the dYdX library. It has very hard restrictions on the possible versions to use for web3, forcing the whole Hummingbot project to use an old version of that library and all other crypto related libraries required by web3 in place. Taking into account that it is critical for any crypto project to use the most updated library versions for security reasons, the restrictions imposed by dydx-v3-python are not acceptable. I think the only solutions the Hummingbot project has are:

  • Take the code the dYdX connector needs from the library into the connector itself, to not depend on the library
  • Remove the dYdX connector until the dYdX team starts maintaining their library properly

In this PR, to solve the library issue and allow the use of newer web3 versions, I changed environment.yml file to point to the branch of a PR sent already to the dYdX library project that solves the issue (dydxprotocol/dydx-v3-python#202). The PR was created in march in all this time the team has not merged it (and they don't show any intentions to merge it in the near future).

Tests performed by the developer:
Created unit tests for all new components.
Tested the connector by running pure market making strategies.

Tips for QA testing:
Configure a delegate trading account and teste the connector using spot strategies.

bczhang and others added 30 commits July 10, 2023 15:49
…e use of a very old web3 library version, incompatible with Injective SDK library
…ich has many zero after the decimal point, you will not able

to place order on the mexc, since the number will be converted to scientific notation.
fengtality and others added 29 commits July 13, 2023 13:51
…ing_rules_logging

Feat/improve trading rules logging
fix/MEXC exchange, when the token price is super small
…m-arb

(feat) add fixed rate conversion for amm-arb
Fix/change default global_token_name to USDT
…e use of a very old web3 library version, incompatible with Injective SDK library
@aarmoa aarmoa closed this Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants