Gains Network
Published in

Gains Network

gTrade v6 Update

The growth of the protocol has been explosive for the last weeks, due to the amazing community & team marketing efforts. However, that doesn’t mean we have slowed down our work on the new update!

V6 contracts are now ready (unit tested) and will be sent to CertiK in the following days so they can start the audit.

We also have a new frontend developer in the team, which allows us to make progress on both the contracts and the website improvements at the same time.


1. Gas and logic optimizations

  1. Minimized external calls
  2. Removed redundant checks
  3. Significant gas optimizations for every trading order

2. Lift limits that are now irrelevant

  1. Per-trade maximum collateral is absolute instead of being a % of vault current balance (can be increased to 75,000 DAI with current TVL).
  2. Removed maximum trades per block

3. Better protocol-wide risk management

Currently, we limit the max open interest on each pair to prevent price manipulation of the spot price and also to manage the risk of the protocol.

To further improve the risk management of the protocol, we introduce a collateral limit per asset-class proportional to the current vault balance.

Eg. if the vault has currently 4 million DAI and the limit for crypto is set at 50%, it means there can be at most 2 million DAI of open collaterals from trades (separated for longs and shorts) between all cryptos.

This is what allows us to raise the per-trade max collateral limit, leading to both better UX and less risk for the protocol.

4. Improved NFT bots incentives

  1. Only the first bot to trigger an order pays the LINK cost to trigger the request to the aggregator
  2. If successful, the first bot to trigger gets 40% of the reward.
  3. 20% of the reward goes to bots that triggered the order after the first one in the same block, to incentivize more bots running.
  4. The last 40% of the reward goes to a pool where bot runners can claim their share based on the number of orders they executed. It helps smoothing the rewards between big and small orders, making smaller orders more profitable to execute.

5. Guaranteed stop losses

  1. As our trading platform is fully synthetic, we are able to define in the trading contracts that stop losses are executed at the exact price set, without any slippage.
  2. If your trade has a stop loss, it can never be liquidated, even if it is below -90% profit.
  3. The maximum stop loss distance has been updated to -75% profit (-80% before) to keep it balanced for the protocol and liquidity provider fees from liquidations.

6. Simpler long/short limit orders execution

  1. Removed the slippage parameter on long/short limit orders, leading to a simpler UX.
  2. Long/short limit orders (buy a dip, or short a pump) execute at the exact price set.
  3. Introduced a new order type, stop orders (buy a breakout, or short a breakdown), which are executed at market price.

If you set a long limit order on BTC at $30,000 for example, it will be triggered once the current price (+ spread) is ≤ $30,000, and it will be opened at exactly $30,000.

Also, if you set a long stop order on BTC at $50,000 for example, it will be triggered when the current price (+ spread) is ≥ $50,000, and it will be opened at the market price.

7. Lower minimum per-trade collateral

  1. Removed minimum per-trade collateral
  2. Replaced it with minimum per-trade position size (collateral x leverage)
  3. Allows to set a minimum absolute fee to keep the chainlink nodes and nft bots profitable even under extreme gas conditions (as rewards are calculated proportionally to the leverage, not only on the collateral).
  4. It will be set at 2,500 DAI based on the current gas conditions
    → the effective minimum collateral will be lowered to 17 DAI @ 150x while also guaranteeing the best reliability on the execution of orders as profitability will be better for our oracles and nft bots.

8. Better pairs management

  1. Pairs storage has been moved to a separate contract (cleaner and easier to test).
  2. Allows updating the logic in the aggregator contract without impacting the pairs and having to store them again.
  3. Pairs can now be grouped when they share attributes, making pairs management (updating/listing) easier and less error-prone.
    → eg. if we want to update fees on cryptos, we can update them in a single place instead of having to update them at 43 different places.

ETA: ≈ 2 weeks

Thank you for reading.

Feel free to join our awesome telegram community!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store