๐Ÿ’ปFor Developers

Orders execution

The order execution bot is public for anyone that wants to run it and earn rewards (binary options execution bot will soon be available).

https://github.com/Tigris-Trade/jsbotarrow-up-right

To run it, you need to create a .env file and type in the variables as shown in .env.example. You will need MATIC/ETH to pay for gas fees. For more info and help on how to run the bot check out the #bot-runners channel in our Discord serverarrow-up-right. An execution bot can also be coded by anyone to earn rewards for executing specific orders for traders.

executeLimitOrder() will reward you with 0.01% of the position size. limitClose() will reward you with 0.01% of the position size. liquidatePosition() will reward you with 0.01% of the position size.

There is a maximum gas price variable to "randomize" which bot gets an order execution and thus prevent gas wars from happening.

None of these functions require a callback, because the inputs contain PriceData and oracle signatures. To get valid price data, the bots need to connect to a Tigris oracle node.

Tigris Is Built To Be Built Upon

Tigris contracts support meta transactions, allowing off-chain apps to relay transactions on behalf of users. Tigris also makes life easier by supporting the permit function by inheriting ERC20Permit in the Tigris Stablecoin contract and supporting the function to be used in the StableVault and Trading contracts. Meta transactions should be sent to the deployed Forwarder contract. EIP712arrow-up-right. Plenty of opportunities for referrals :) Contracts that support meta transactions:

  • Trading contract

  • Open positions NFT contract

  • Governance NFT contract

  • StableVault contracts

  • Tigris stablecoin contracts

Trading contract input guide

These are the main input parameters for interacting with the Tigris trading contract:

  1. TradeInfo struct

  2. PriceData struct array

  3. Signature bytes array

  4. ERC20PermitData struct

API to query historic oracle data:

https://db.tigrisoracle.net/pair/0/1691753400 https://db.tigrisoracle.net/timestamp/1691753400

Last updated

Was this helpful?