gTrade v6.3.1 — NFT bot optimizations & more

Gains Network
Gains Network
Published in
4 min readApr 3, 2023

Welcome gTraders!

It’s been a big month, with the launch of $ARB and the $gDAI Vault reaching over $50 million in TVL. While all this has been happening, we’ve been working hard to improve the platform and are excited to launch gTrade v6.3.1!

These improvements primarily focus on NFT bot incentives and aim to level the playing field for all users. It will make both running an NFT bot easier and fairer for everyone and improve (limit/stop/tp/sl) trading execution for smaller orders.

Let’s take a look at what’s new.

No more NFT bot gas wars

Gas wars occur when users offer higher fees and compete to have their transactions processed earlier, often in the same block.

We made several changes to the incentives to prevent NFT bot gas wars on gTrade. Previously, rewards were distributed in the following ways:

  • 40% to the first person who successfully triggered the order
  • 50% as shared block rewards to each of the following 10 people who executed that order within the same winning block
  • 10% to a pool based on the number of orders you were first to execute

However, this system had two main issues:

  1. The first to trigger earned way more than the other triggers in the same block, incentivizing gas wars
  2. NFT bots were more incentivized to trigger bigger orders, potentially leading to inferior execution of small limit/stop/sl/tp orders

With this update, being the first NFT bot to trigger a transaction (in the same block) is no longer an advantage!

This means that all participants will pay the same amount of $LINK required to execute the transaction. The first to trigger technically pays the full cost, but the other triggers in the same block refund them a portion of the $LINK so that in the end everyone pays the same. If there are not enough same block triggers to refund the first to trigger, the $LINK refund will come from the $GNS reward itself to always guarantee a fixed $LINK cost.

This change offers NFT bots a fairer opportunity to receive incentives, regardless of their willingness to pay higher fees to trigger earlier in the same block.

The change does not come at the cost of UX since the incentive is still designed to reward the earliest triggers, however, gas wars inside the same block were only counterproductive and did not contribute to the execution speed.

Reward distribution

To take fairness a step further and ensure all traders get the best execution prices — big or small — we’ve implemented a new reward distribution system for our NFT bots.

Under the new system, all rewards — except $LINK transaction participation costs, which are refunded in $GNS — will go into the next round’s reward pool.

Since NFT bot runners don’t know the size of the orders to trigger in the next round, they are incentivized to trigger all orders equally to maximize their share of rewards of the next pool. On the contrary, the $GNS rewards corresponding to the $LINK refunds are distributed immediately.

In regards to running an NFT bot, everything else will remain consistent with their current functionality. They will continue to monitor asset prices and execute various order types.

The reward structure will also remain unchanged. For liquidation orders, the reward will be 5% of the collateral, paid in $GNS. For all other order types, the reward will still be 0.02% of the position size (factoring in leverage) for crypto assets and 0.002% for forex assets for example.

Previously, participants were incentivized to target large order sizes because they earned larger rewards for doing so. However, our new approach aims to further democratize the platform and ensures that all orders, regardless of size, are equally incentivized.

One trigger per bot / NFT per order in the same block

To protect against spamming same block triggers using the same bot address / NFT, we now prevent users from triggering the same order multiple times within the same block and taking up extra same-block space.

This measure helps deter users from attempting to gain additional rewards from the same bot while not contributing to the decentralization of the bot network.

Other improvements

Several other improvements have been made to the triggering of orders.

  1. Order updating: Prevents updating a limit order or SL/TP while it is being triggered by an NFT bot
  2. Order triggering: Prevents the triggering of an order in the same block it was placed or updated. This addresses a way to game the incentive where bad actors could gain more entries into the reward pool (which is the reason currently the pool rewards percentage is so low at 10%).
  3. Various other small optimizations

Summary

The release of v6.3.1 marks a meaningful milestone for gTrade! The focal point of this update is the optimization of NFT bot incentives — which contributes directly to the trading experience and mission of the platform more broadly.

Specifically, we’ve successfully implemented several features to help prevent gas wars, equally distribute rewards, and make the incentives structure robust to bad actors.

The new contracts have been deployed on polygon & arbitrum mainnet, we are just waiting for the timelocks to finish to transition to the new contracts (in about a week).

Thanks for tuning in gTraders — stay tuned for additional soon-to-come development updates!

--

--