GTK Protocols

This section describes the protocols and processes involved in trading on the GTK platform, including the use of memo strings to initiate trades, the role of oracles in providing live price data, and the matching lending protocol. It also provides examples of memo strings for different types of transactions and instructions for trading outside the platform.

Facilitating Accurate and Secure Trading: The Role of Memo Strings in GTK's Transactional Protocol

Trades on the platform are initiated through a memo string that corresponds to the transaction. In this example, the user is initiating a trade with the following trading parameters:

  • Collateral type: USDC

  • USDC amount: 100

  • Leverage: 5

  • Target: BTC

  • BTC amount: 0.016

  • Entry Price: $30,260.00

  • Side: Long

  • Limit Price: 30260

  • Stop Loss: 25216

  • Take Profit: 36312

By placing the order, the details of the trade will pop up for approval (see below)

The "Memo" field is a string that contains information about the trade and its parameters. In this specific example:

{"transaction_type":"open_trade","data":{"target_token_type":"btc","limit_price":"30260.00000000","trade_direction":"LONG","stop_loss":"25216.66666667","take_profit":"36312.00000000","leverage_quantity":"5","auto_hedged":"false"}}

The trading parameters set in the platform correlate to the memo string.

Note: The "Send" message indicates the minimum token amount that must be sent to the recipient wallet as part of the transaction, while the memo string requirement outlines the specific details of the transaction.

The following memo string based transactions are as following:

  • Opening Trade

  • Closing Trade

  • Canceling Pending Trade

  • Request Trade Closure

  • Deposit Tokens

  • Withdraw Tokens

Transaction Memo examples:

Opening Trade:

{"transaction_type":"open_trade","data":{"target_token_type":"btc","limit_price":null,"trade_direction":"LONG","stop_loss":"15102.50000000","take_profit":"60410.00000000","lever\

  • Closing Trade:

{"transaction_type":"close_trade","data":{"trade_id":"68"}}

  • Canceling Pending Trade:

{"transaction_type":"cancel_trade_request","data":{"trade_id":"61"}}

  • Request trade to be closed:

{"transaction_type":"request_close_trade","data":{"trade_id":"68"}}

  • Deposit tokens:

{"transaction_type":"deposit_match","data":{"expiration_date":"2023/07/13"}}

  • Withdraw tokens:

{"transaction_type":"withdraw_match","data":{"collateral_token_type":"cusdc","collateral_token_amount":"100"}}

Memo Descriptions:

  • Transaction_type: type of transaction requisition

  • Transaction types: open_trade; close_trade; cancel_trade_request; request_close_trade; deposit_match; withdraw_match

  • Target_token_type: the token targeted against the collateral by the trader

  • Limit_price: the limit price parameter assigned to the order

  • Trade_direction: the direction of the trade (long or short)

  • Stop_loss: the stop loss price parameter assigned to the order

  • Take_profit: the take profit price parameter assigned to the order

  • Leverage_quantity: the leverage multiplier requested by the trader

  • Auto_hedged: whether the trade is auto-hedge or not (note: enabling of this feature is coming soon)

Trading Externally outside of the platform

To trade outside of the GTK Frontend, you can create a memo string for the transaction in any Cosmos wallet that supports the Sifchain blockchain. Please refer to the examples, definitions, and formatting directions provided above.

Please make sure that you follow the format exactly as shown above, as we cannot ensure that the transaction will be successful or that you will receive a refund if the format is incorrect. If you have any uncertainties, please contact the community for assistance.

Oracle Price Feed:

In the context of GTK, an oracle refers to a reliable external data source that furnishes off-chain information to a smart contract on the GTK blockchain. Oracles play a vital role in bridging the gap between on-chain and off-chain domains by allowing smart contracts to access and operate data that lies outside the blockchain. In the case of GTK, Coin Gecko serves as an oracle that supplies live price data.