[OPEN GRANT APPLICATION] GMX JS SDK

SECTION 1: APPLICANT INFORMATION

Applicant Name or Alias : Kara

Project Name : GMX JS SDK、 flutter SDK、iso Sdk、android Sdk、java Sdk etc.

Project Description:

The objective of our initiative is to develop a comprehensive and open-source JavaScript Software Development Kit (SDK) tailored for the GMX V2 ecosystem, similar to Uniswap’s SDK available.

This SDK aims to provide developers with the following capabilities:

  • Interfaces for liquidity pool, trading pair status, global information, etc.

  • Trading interfaces (open positions, close positions, take profit, stop loss, etc.)

  • Interfaces for managing positions (add, reduce margin, etc.)

  • Functions for managing liquidity

  • Interfaces to obtain transaction records (data from the official subgraph), current positions, trading status, etc.

By simplifying these complex operations, the GMX JS SDK will lower entry barriers, catalyze the growth of the GMX ecosystem, and encourage the development of innovative applications and services.

Implementation Plan:

  • JS SDK: Extract the relevant code from GMX’s interface at GitHub - gmx-io/gmx-interface .

  • Flutter SDK: Use flutter_js to package it (this is how Transparent Exchange did it).

  • iOS SDK: Use JavascriptCore provided by the iOS SDK to run the JS-SDK and package the corresponding code.

  • Android SDK: Use the Javascript Engine QuickJS and package the corresponding code.

Team Members and Qualifications:

Phoenix: JS developer

Jun: WEB3、Mobile (iso/android) developer

Project Links :

Github: GitHub - transparent-Lab/GMX-SDK: GMX-SDK for flutter-js

Contact Information :

TG: https://t.me/kara_tsp

Twitter: https://twitter.com/Tsp_exchange

Email: support@tsp.exchange

SECTION 2: GRANT INFORMATION

Requested Grant Size : 90,000 $ARB

Funding Address :0xD6C7f0a21bCe0EeDf0Cf4f2C9F9b8866173fD51d

Funding Address Characteristics : This is a 2 of 3 multisig Safe Wallet with each key held by a core team member.

Distribution Contract Address :0xD6C7f0a21bCe0EeDf0Cf4f2C9F9b8866173fD51d

SECTION 3: GRANT OBJECTIVES AND EXECUTION

Objectives #1: Extract the relevant code from GMX V2 (For one month)

Extract the relevant code from GMX V2 , remove the code unrelated to the UI, and compile it for use with flutter_js.

Deliverables code can be monitored and reviewed in real-time from the open-source GitHub repository.

Objectives # 2 : JS SDK Development (For 2 months)

We will organize the code for Milestone #1, the compilation environment, and adapt JS for Web. Then, we will proceed with unit testing and write the user manual and documentation.

Deliverables include the open-source code for the JS SDK, which can be viewed on GitHub, as well as the user manual and documentation, which will be announced on the GMX forum.

Objectives # 3 : Flutter SDK Development (For 2 months)

We will use flutter_js to package the Flutter SDK.Then, we will proceed with unit testing and write the user manual and documentation.

Deliverables include the open-source code for the Flutter SDK, which can be viewed on GitHub, as well as the user manual and documentation, which will be announced on the GMX forum.

Objectives # 4 : iOS SDK Development (For 2 months)

We will run the JS-SDK using JavascriptCore provided by the iOS SDK. Then, we will proceed with unit testing and write the user manual and documentation.

Deliverables include the open-source code for the IOS SDK, which can be viewed on GitHub, as well as the user manual and documentation, which will be announced on the GMX forum.

Objectives # 5 : Android SDK Development (For 2 months)

We will package with QuickJS. Then, we will proceed with unit testing and write the user manual and documentation.

Deliverables include the open-source code for the Android SDK, which can be viewed on GitHub, as well as the user manual and documentation, which will be announced on the GMX forum.

KPIs

We will open-source the code and unit tests for the JS SDK, Flutter SDK, iOS SDK, and Android SDK according to the scheduled milestones. Everyone is welcome to visit GitHub to view them. The user manual and documentation will be published on the GMX forum.

How will receiving a grant enable you to foster growth or innovation within the GMX ecosystem?

The grant will facilitate the development of the GMX V2 JS SDK, which is designed to abstract the complexities of smart contract interactions, providing a user-friendly JavaScript interface. This SDK will empower developers, regardless of their blockchain expertise, to build on the GMX V2 platform easily, fostering a surge in innovative projects and services. The availability of standardized, secure, and well-documented code will reduce development time and costs, attract a broader developer audience, and accelerate the creation of diverse applications. This will not only expand the GMX ecosystem but also enhance its robustness and utility, driving increased traffic, user engagement, and reinforcing GMX’s position as a leader in decentralized perpetual trading solutions.

Justification for the size of the grant:

The requested grant size is primarily to cover the costs of two developers for approximately nine months, which includes their salaries, associated overheads, and provisions for post-development maintenance and support. This budget ensures that we can attract and retain high-caliber talent to build a robust and secure SDK. The investment in these developers is critical for creating a seamless integration tool that will facilitate a lower barrier to entry for projects and developers looking to join the GMX ecosystem, thereby directly contributing to its growth and sustainability.

Execution Strategy

  • Development

Two skilled developers will be hired to create the JS SDK, Flutter SDK, iOS SDK, and Android SDK.Their work will focus on delivering a user-friendly and efficient toolkit for interfacing with GMX V2 over a period of nine months.

  • Use of Funds

Developer Salaries : The primary allocation of the grant will be towards fair compensation for the developers for the projected timeframe.

Maintenance : A dedicated fund will be established for ongoing support and iterative updates to the SDK post-launch.

The U ser M anual and Documentation : Resources will be allocated to create a detailed user manual and documentation to facilitate developers’ use.

Grant Timeline

  • Extract the relevant code from GMX V2 (for one month)

  • JS SDK Development (for two months)

  • Flutter SDK Development (for two months)

  • iOS SDK Development (for two months)

  • Android SDK Development (for two months)

Fund Streaming:

We agree to the linear streaming of the grant for the duration of the proposal and understand that the multisig holds the authority to halt the grant at any time, should it be deemed necessary. This ensures flexibility and responsiveness to the evolving needs of the Transparent Exchange.

SECTION 4: PROTOCOL DETAILS

Protocol Performance:

  • Development Progress : Currently in the early stages of development, the project has laid out a comprehensive roadmap and initiated the foundational coding work.

  • Milestones : Although no performance metrics are available yet as the SDK is under development, key milestones have been identified for the upcoming months, which include completing the first iteration of the SDK, initiating community testing, and finalizing documentation.

  • Anticipated Impact : While direct metrics are not yet applicable, the anticipated impact of the SDK on the GMX ecosystem includes increased accessibility for developers, reduced integration time, and a broader reach within the developer community.

Protocol Roadmap:

  • Extract the relevant code from GMX V2 (for 1 month)

  • JS SDK Development (for two months)

  • Flutter SDK Development (for two months)

  • iOS SDK Development (for two months)

  • Android SDK Development (for two months)

Audit History (if any):

Not yet,we are still in beta and development stage and have not yet been audited.

SECTION 5: Data and Reporting

Is your team prepared to create Dune Spells and/or Dashboards for your incentive program?

Yes, we will create and maintain dashboards to track the usage of our SDK.

Does your team agree to provide bi-weekly program updates on the GMX Forum thread?

Certainly! We are committed to providing bi-weekly program updates on the GMX Forum thread.

Does your team acknowledge that failure to comply with any of the above requests can result in the halting of the program’s funding stream?

Yes, we understand that non-compliance can result in halted funding.

Hey @Tsp.exchange, thank you for submitting your application for GMX grants program we will be soon reviewing your applications.

Hi @Tsp.exchange, thank you for your proposal, have a few questions,

  1. What is the relevant code you’ll be extracting for GMX’s interface?

  2. Why do you see a need for a Flutter SDK, IOS SDK, or Android SDK?

  3. Flutter and React Native offers a cross-platform frameworks for developments across IOS and Android, why do you see a need to separate these streams into three categories?

  4. Have you in the past built a SDK solution for any project other than of your own?

  5. Given there’s no stated KPIs, how will you measure the utilisation of the SDKs?

i personally tried making some scripts interacting with GMX a while ago, and think an SDK would have been extremely helpful - this will probably make GMX integrations an orders of magntitude easier.

a few notes/q’s:

  • Are you guys going to provide full typescript support? the gmx-interface repo only has partial TS support.

  • Flutter/React Native are just javascript afaik, why is there a need for a package for all of them seperately? the SDK as i assume should only contain read/write logic, i dont see why thats needed?

  • What does it mean to “adapt JS for the web”? all of the functionality should already be web-compatible coming from GMX’s frontend repository.

Overall the addition of an SDK for building on top of GMX could be extremely helpful for development, however at first glance it seems like there’s an attempt to stretch the grant out over multiple milestones that should really just be the same code. Though i am looking forward to be mistaken

Hello @shogun , thank you for reviewing the proposal. Below are the answers to your questions:

  1. The specific interfaces are as follows:
  • Interfaces for liquidity pool, trading pair status, global information, etc.
  • Trading interfaces (open positions, close positions, take profit, stop loss, etc.)
  • Interfaces for managing positions (add, reduce margin, etc.)
  • Functions for managing liquidity
  • Interfaces to obtain transaction records (data from the official subgraph), current positions, trading status, etc.
  1. Considering that developers may use different programming languages and tools, providing multiple SDKs helps to meet various needs. Of course, it’s normal for the official side to offer only one or two SDKs due to cost or other considerations. In this project, officials could consider funding only a few of the milestones they deem most meaningful.

  2. Same as the second point, this is to cater to different development needs and preferences.

  3. We have not developed an open-source SDK for external projects in the past, but we have experience creating SDKs for internal use. We believe that as long as one has programming experience, the specific experience of developing SDK projects is not as crucial; one can still complete the development of an SDK.

  4. SDK development is a technically oriented project whose KPIs cannot be quantified. The team and GMX community technicians can audit the open-source SDK code and complete unit testing. The actual usage rate will be influenced by various factors, not solely the quality of the SDK.

Hello @eqdegen, thank you for acknowledging the value of the project. Below are the answers to your questions:

  1. If the grant application is approved, we plan to support TypeScript fully.

  2. Having a JavaScript library does not directly translate to usability in Flutter; it requires encapsulation through a Flutter_js library. Our task is to encapsulate this JS library into a Flutter SDK, which will save a significant amount of time for Flutter developers and lower the barrier to entry, thereby fostering project development. As for the React Native SDK you mentioned, we did not seek funding because it does not require additional development work.

  3. “Adapting JS for the web” refers to the fact that in our milestone #1, the code we develop is primarily for our project, tsp.exchange . Compilation options and specific interfaces may be tailored to our project and not be universally applicable (we will complete this milestone regardless of grant funding, as our project requires it, although it may not be open-sourced). In the milestone #2, we will refactor this code, add necessary interfaces and modify compilation options to create a JS SDK suitable for websites, along with adding unit tests and documentation.

Finally, we do not stretch milestones just for the grant; each language’s SDK output requires extensive debugging, documentation, and unit testing. Of course, the official GMX can choose to support some of these milestones. Apart from the JS SDK, other SDKs are also encapsulated in JavaScript before providing the corresponding interfaces to enhance development efficiency.

glad to know you will be supporting TS.

Though i think that by what you said, the first milestone without the others is not some JS SDK for other developers to use but really just an integration for your own project…

Hi TSP.exchange, thanks for addressing some of these of these points.

Of course the suite of access of multiple SDKs can be intriguing solution for catering to developer needs and preferences, although in the practice not having measurable KPIs for the effifacy of onboarding developers or integrations does not seem great in achieving the nature of the accessibility for developers.

Although in saying that, would love to thank you for working on this project for the community.