Skip to content

Ton-Dynasty/ticton-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TICTON Playground

This repository is primarily for the TICTON quote testing event tutorial. Everyone can refer to this document or this tutorial video to complete the quote and claim rewards. Those who successfully follow the tutorial can obtain a TICTON-exclusive NFT. In the future, holders of these NFTs will have priority in participating in airdrops and other events.

If you have any questions, feel free to join our community and discuss with us.

The following steps will be conducted on TON's testnet!

Table of Contents

1. How to Install

First, ensure your Python environment meets the version requirements: Python version >= 3.10 and < 3.12. The first step is to git clone this repo, then to install the ticton package, please execute the following command in your terminal:

Windows

git clone https://github.com/Ton-Dynasty/ticton-playground.git
cd ticton-playground
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env

MacOS/Linux

git clone https://github.com/Ton-Dynasty/ticton-playground.git
cd ticton-playground
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
cp .env.example .env

Important

Please ensure that you have filled out the .env file before proceeding with the following steps.

TONCENTER_API_KEY can apply at @tonapibot.

📖 Tutorial: Generate a new wallet (Optional)📖

  1. First, run the following command to create a new wallet:

    python3 main.py
  2. Then, type 0 to create a new wallet.

    mmm

  3. After creation, you will get wallet mnemonic and address. Please save them in a safe place.

  4. Import your wallet to your wallet software, such as TonKeeper Browser Extension, TonKeeper. Click the "Import Wallet" button and paste your mnemonic.

  5. Go to settings page in your wallet software, click the TON icon 5 times to switch to testnet.

  6. Copy your address and go to Test Giver to get some TON for your new wallet.

2. Mining Testnet USDT

Next, we will simulate the quotation process for the TON/USDT token pair on the testnet. Ensure you have sufficient funds for the operation.

  • If your TON balance is low, you can obtain additional TON from the @testgiver_ton_bot on Telegram.

  • You can visit tonviewer-USDT , scan the QR code, and use "Mint:1" as a comment to receive 1000 our mock USDT tokens for your testnet operations.(Simply pay 0.1 ton as a transaction fee when submitting "Mint:1" as a comment.)

    image

3. Checking the Current TON/USDT Price

To find the current market price of TON/USDT, you can visit the official website (https://ton.tg) or consult other exchanges. This will provide you with the latest pricing information necessary for informed trading or minting decisions on the testnet.

4. Tick

If you believe the current market price of TON/USDT to be 2.2, you can execute the following command to tick:

Windows

python main.py

MacOS/Linux

python3 main.py

The image below depicts the process of quoting a price of 1 TON for 2.2 USDT. alarm

(You can open the tx link to view this transaction. Additionally, please remember your alarm ID, as it will be used in the next steps on Ring.)

5. Ring

After calling Tick, you can observe the price of TON. When you believe your quote has deviated from the current price of TON, you can call Ring to close this position to avoid being arbitraged by Timekeeper.

When calling Ring, if the quote has existed for at least one minute and hasn't been arbitraged by Timekeeper, a reward can be claimed; otherwise, no reward is available.

To complete the Ring process, you can execute the following command to ring:

python main.py

The image below depicts the process of ringing your alarm index you got in the step5.

image

(You can open the tx link to view this transaction.)

Subsequently, you can check the jetton wallet of the TIC token to confirm whether you have received TIC tokens as a reward.

The address of your TIC wallet is the point F in the diagram below. You can go to this address, click on Methods, and enter get_wallet_data to view the TIC Balance. tic bal

6. Wind (Advanced)

This quote test event can be completed without Wind to receive an NFT.

If you find that the quote of an Alarm (which can be seen through the get method: getAlarmMetadata() and its baseAssetPrice) is no longer accurate, then you can arbitrage this Alarm. For detailed arbitrage mechanisms, refer to this video or the TICTON documentation.

In simple terms, if you discover Alarm 0 quoting TON at 1 ton = 20u, but you believe 1 ton = 25u, then you can directly spend 20u to buy 1 ton from Alarm 0. For you, this means earning a difference of 5u. Besides arbitraging, you also need to provide a correct quote and offer twice the base asset compared to Alarm 0. Therefore, you need to pay 2 tons and 50u (1 ton = 25u).

For the wind operation, you can refer to wind.py

To complete the Wind process, you can execute the following command to wind:

python main.py

The image below depicts the process of arbitraging a alarm where you believe the quoted price is incorrect.

image

Alarm 68 quoted 4U for one ton, but I believe this price overvalues the ton. Therefore, I initiated a Wind with Alarm 68, selling one ton to quoter for 4U and providing a new quote of 1 ton = 2.3U.

(You can open the tx link to view this transaction.)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages