Pear Protocol Grant - Final Report

Executive Summary:

In December 2023 Pear Protocol was awarded up to 100k $ARB tokens to migrate our entire PlatformLogic from sourcing liquidity via GMX v1 (GLP) to GMX v2 (individual GM Pools). The goal was to build the first ever ‘pair trading’ platform native to Arbitrum, wherein users could place a thematic trade such as long SOL/ETH, using USDC as collateral, in one click, with leverage in one tokenised trade. The underlying perp liquidity (the long and the short legs) would be exclusively sourced via GMX.

The grant was specifically designed to drive trading volume to GMX v2 pools. This was set with a very ambitious 3 month timeline. To minimise execution risk for GMX and the wider Arbitrum DAO the release was subject to the following milestones being met.

Milestone 1: Launch v2 contracts (40k $ARB)
Milestone 2: Cumulative Target volume $25m, 50 unique wallets (20k $ARB)
Milestone 3: Cumulative Target volume $50m+, 100 unique wallets ($40k ARB)

We are proud that we have fully completed the first milestone. We are also confident that once the platform is fully audited and live to the public (March 29th) that we can also reach Milestone 2 and 3. However, it may be the case that those milestones (and subsequently unreleased $ARB) are tied to our LTIPP application instead.

Final Update:

Users can now place a pair trade on any combination of the 13 assets available on GMX v2 (156 pairs).

A loom video of the process can be found here:

An example of a live transaction executed on Arbitrum Mainnet can be found here:

Furthermore, we are capturing realised trader fee data, and calculating the amount of $ARB available to claim as a fee rebate. The dashboard for rewards looks like so:

This infrastructure is now in place for any future distribution of $ARB incentives for Pear Protocol traders.

Reflections:

We were aware of the gargantuan task of migrating all our smart contracts from GMX v1 to v2, and thus the grant was structured with milestones accordingly. The things that went well were:

  • Good dialogue between Pear devs and GMX devs around realtimeFeedTokens, EmptySizeDeltaInTokens and simulating the Keepers executeOrder action locally for testing.

  • We completed a private audit with Shieldify on GMX v1 and many of the recommendations that were implemented on the back were applied to GMX v2 (audit report available on request). This required 4-6 weeks of back and forth between the auditors and us.

  • The rewards claim contract has been tested thoroughly, and the GMX team supported us in designing this in a sybil resistant manner.

Things that could have gone better:

  • We were overly optimistic about being able to integrate in 3 months, migrate the new UI and UX, thoroughly test the platform and fix bugs as they appeared with our beta testers, and then also run a trading competition with fee rebates. We hired 1 additional FE dev and 1 additional BE dev to speed up the process to at minimum hit milestone 1.

  • We encountered some issues that were not specific to GMX, but rather with TradingView libraries for which there was not enough bandwidth to be supported on the GMX side. Note, pear is the only place that allows people to chart ‘pairs’ instantaneously such as SOL/ETH, DOGE/BTC or UNI/LINK. This requires creating manual price data calculations and then displaying them on the FE.

  • With hindsight we would have skipped integrating with GMX v1 back in early 2023 and just waited for GMX v2 to come out of beta, however, the learnings from v1 integration definitely expedited implementaion.

Ultimately, the platform will be released for Public Beta in early Q2. During our closed beta stage, 51 unique users placed over $313,172 of total volume on our Isolated Margin product built on top of GMX v1. Despite an initial cap of $25 per user (this was later lifted) and a strict whitelist we are confident that we have product-market fit. Dune dashboard data for that period can can be found here.

Conclusion:

The process of working with GMX to apply and implement this grant has been incredibly professional. We commend the team for being in constant dialogue and for working diligently to ensure fair outcomes for the Arbitrum DAO.

We strongly believe that the process of having completed our build on top of v2, complete with a functional $ARB rewards dashboard put us in an excellent position for a continued conversation with the DAO, and as such we have applied for the LTIPP that runs over 12 weeks, which may be a more appropriate timeline to distribute incentives to new users to Arbitrum of this novel way of trading on-chain.

2 Likes