Carbon Governance Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    Proposal: Python SDK for Tradehub

    Community Developers
    4
    6
    162
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Switcheolytics last edited by Switcheolytics

      Summary

      • Title - Switcheo Tradehub Python SDK
      • Details - This project is aimed at widening the tools available to developers by adding Python to the set of available SDKs that can be used to interact with the Tradehub Blockchain. Another main goal is to ensure the SDK is backed by decentralized validators, meaning the code will ensure that communication with the protocol will be aimed at collecting and submitting information only to Validator Sentry end points (public by default and private if configured).

      Description

      • Owners

      Devel484 - Tradehub Validator and contributed to original switcheo-python SDK
      Switcheolytics - Create of original switcheo-python SDK

      • Key objectives and value to Switcheo TradeHub and its stakeholders.

      Provide feature compatible SDK based on the work the Switcheo team builds for JS.
      Allowing developers to interact with Tradehub via Python will open the doors to a wider range of developers that may not be familiar with JavaScript.

      • Share how you plan to carry out your project

      Development can be followed on GitHub
      Development will be coordinated between Devel and Switcheolytics

      • Elaborate on the long-term plans for your project and how it will be maintained after launch

      Long term the project would evolve with the needs of other projects by increasing simplicity and usability as well as expanding the use of multiple Blockchains as Tradehub integrates with them. Maintenance can be accomplished via pull requests and anyone is welcome to contribute as is the nature of open source software.

      Risks and Benefits

      • Discuss the potential drawbacks of your project and any mitigations
        Opens up attack vectors from Open Source Python projects that could steal users private keys and subsequent funds. This is no different from the risks involved with JavaScript projects but should be noted. Since the project will be hosted on GitHub they have reports on exploited projects as well as integration with other build tools that can assist with keeping project dependencies up to date.

      • Discuss any auxiliary benefits that may arise from implementing the project

      Other projects and traders have been asking for a Python client so I believe more projects will be generated from the implementation of a Python SDK as well as added liquidity to DeMex pairs.

      Project Roadmap and Key Deliverables

      • Define a realistic timeline and roadmap for your project

      Deliverable 1: Tradehub & basic DeMex integration - January 2021
      Deliverable 2: Ethereum integration - February 2021
      Deliverable 3: NEO integration - March 2021
      Deliverable 4: Simplified client for trading - June 2021

      • Elaborate on key deliverables and specifications within your roadmap

      Deliverable 1: Cosmos signatures and endpoint mapping
      Deliverable 2: Ethereum signatures and endpoint mapping
      Deliverable 3: NEO signatures and endpoint mapping
      Deliverable 4: DeMex trading customizations & Websocket customization and hardening

      Budget

      • Share the total budget required for your project (in USD) - 300k SWTH (updated)

      • Breakdown the budget for each project deliverable stated above for the fund release process (e.g. 10% to Deliverable #1, 20% to Deliverable #2)

      Deliverable 1: 40%
      Deliverable 2: 10%
      Deliverable 3: 10%
      Deliverable 4: 40%

      Switcheo TradeHub Wallet Address

      Ideally this is a Validator that can act as escrow to help split funds until a multi-sig wallet is available.

      The great intsoL has agreed to be an escrow account with his validator wallet and distribute funds accordingly as they become available and deliverables are met: swth1yyepjpjsrve6vy6l77nk88dtts8la9r3kpy3jz

      1 Reply Last reply Reply Quote 8
      • Orilaz - Seraph
        Orilaz - Seraph last edited by

        I can only support this great initiative 👍 !

        1 Reply Last reply Reply Quote 2
        • A
          acidbird last edited by

          fully support this initiative!

          1 Reply Last reply Reply Quote 2
          • S
            Switcheolytics last edited by

            I wanted to provide a status update for this proposal because we are quickly approaching our official release of this project. What does a first release require exactly?

            • Code Quality and Linting - COMPLETE
            • Automated Testing Suite - Partially Complete; WIP for Authenticated Endpoints
            • Automated Builds - COMPLETE
            • Automated Packaging - COMPLETE
            • Automated Deployment - COMPLETE
            • Documentation for users and developers - WIP

            Without these items we do not believe it is fair to release the code officially or ask for developer funds as of yet.

            But, the reason for this update is to allow those that are eager or willing to take the risk to view, interact, and open issues with the code base.

            From a functionality standpoint we have tested every function available on the mainnet but have certainly not tested edge cases, which is why I would urge caution for using this without small tests first.

            Deliverable 1: Cosmos signatures and endpoint mapping - COMPLETE
            Deliverable 2: Ethereum signatures and endpoint mapping - Withdraw Complete; Deposit is WIP due to high gas fees
            Deliverable 3: NEO signatures and endpoint mapping - Withdraw Complete; Deposit is WIP
            Deliverable 4: DeMex trading customizations & Websocket customization and hardening - COMPLETE

            We have also added a new deliverable to this list, Decentralized Tradescan Endpoints; These should be merged into the codebase over the weekend.

            You can find the project at the following links:

            GitHub
            PyPi

            1 Reply Last reply Reply Quote 6
            • S
              Switcheolytics last edited by Switcheolytics

              What a month February was, we have been making huge strides to having a second release and also learned a lot about how developers would typically be using the SDK. This includes how they select their validators and what happens when validators are not available. This is true for both REST and Websocket considerations and have had great feedback to build towards a v2, which we are ready to release once we have confirmed the updated to this proposal.

              Note: Based on feedback from the community we are going to increase our ask to 300k SWTH for the development fund due to the reach that a Python SDK would have. We believe that many other projects will be built on top of this and allow other bot creators to bring liquidity to Tradehub. We are open to further feedback but feel that this is fair for functionality and testing that has been added to the repo.

              Progress Report:

              • Code Quality and Linting - COMPLETE
              • Automated Testing Suite - COMPLETE
              • Automated Builds - COMPLETE
              • Automated Code Quality - COMPLETE - Currently at 9.39
              • Automated Code Coverage - COMPLETE - Currently at 90%
              • Automated Dependency Checks - COMPLETE
              • Automated Packaging - COMPLETE
              • Automated Deployment - COMPLETE
              • Documentation for users and developers - COMPLETE - could still be improved.
              • Network Crawler - COMPLETE

              With all the automation that has been added, specifically the breadth of tests, we believe we are at the point that we can ask for developer funds and provide a high quality product to the community.

              For future additions or changes to the Tradehub API we will look at effort level and consider how best to handle. We anticipate mode additions to be relatively easy to incorporate but without a way to test things on the testnet (futures, margin, leverage) it is too early to tell.

              In terms of the original deliverables we are still in the same spot as before but it is unclear if adding Ethereum or Neo functionality into this project is necessary since web3 and neo-wallet already exist. We have added 2 deliverables, which we have met.

              Deliverable 1: Cosmos signatures and endpoint mapping - COMPLETE
              Deliverable 2: Ethereum signatures and endpoint mapping - Withdraw Complete; Deposit is WIP due to high gas fees
              Deliverable 3: NEO signatures and endpoint mapping - Withdraw Complete; Deposit is WIP
              Deliverable 4: DeMex trading customizations & Websocket customization and hardening - COMPLETE
              Additional Deliverable 1: Decentralized Tradescan Endpoints merged into the Public Client - COMPLETE
              Additional Deliverable 2: Tradehub Network Crawler and Retry Functionality - COMPLETE

              You can find the necessary project links below:

              GitHub
              Documentation
              PyPi
              Code Coverage
              Scrutinizer
              Dependency Checks

              1 Reply Last reply Reply Quote 2
              • I
                intsol last edited by

                Hi All,
                300k SWTH disbursement has been made from the Intsol Community Staking validator wallet escrow to the developers as requested.

                Transfer Transactions:
                https://switcheo.org/transaction/9A04F25B589C605AE93287A8FE507584D2A0D2CB4DEA7F2CDA7F1765D19C3461?net=main
                https://switcheo.org/transaction/4B17970A62B64CCB924061A9D2367084B2719D7726FAF32FEEEE9F0FC4291732?net=main

                Code, documentation and test coverage are of a high standard.

                Thanks to Switcheolytics and Devel484 for this collaboration and contribution to the community toolbox.

                Here's looking forward to seeing what can be built using it 🙂

                1 Reply Last reply Reply Quote 5
                • First post
                  Last post