# Welcome to Titan

Titan is TON's most powerful DeFi stack 💎

**Titan is on a mission to bring a world class DeFi experience to TON, Telegram, and your users.** We make it as simple as possible for you to trade and earn onchain.

DeFi is short for Decentralized Finance. It is the future of finance, built on blockchains to create an uncensorable, verifiable, and seamless trading experience globally.<br>

Titan’s stack is easy to get started with:

* **Swaps:** trade any token on TON with the best selection, best prices, and zero fees.
  * Get started on desktop at [Titan.TG](https://titan.tg) or in Telegram [@TitanTradeBot](https://t.me/TitanTradeBot).
* **Swap API:** the fastest, cheapest, and most reliable way to add swaps to any application
  * Input your desired pairs, amount, and slippage and receive your transaction from the API to execute your swap. Titan handles the rest!
* Concentrated Liquidity: LPs can choose custom strategies and earn up to 1000x APR by using concentrated [liquidity pools](https://titan.tg/pools) on Titan.&#x20;

Follow us [@TitanAggregator](https://x.com/titanaggregator). If you need help, we’re here for you – just drop a message at [@TitanTrading](https://t.me/TitanTrading).


# 💡 Why use Titan swaps?

Titan is the best place to trade on TON 📈

&#x20;We offer:

* **Best token selection:** trade any token on any TON decentralized exchange, all in one interface.
* **Best token prices:** get the best prices by routing your order through multiple hops to find you the best exchange rate.
* **Zero fees:** never pay fees for swaps. Titan does not charge any fees on top of the DEX and pools it routes through.
* **Simple experience:** enjoy the power of in a fast and easy to use interface, whether you’re on mobile or desktop.

Start swapping at [Titan.TG](https://titan.tg) or in Telegram [@TitanTradeBot](https://t.me/TitanTradeBot).


# 🛠️ Products

Building the future of TON DeFi.

Titan has three flagship products that enable a magical DeFi experience on TON:

* **Optimus** – An aggregator offering the best price execution and swap experience for users
* **Cronos** – Titan’s easy-to-use API allows trading support to be added to any application within 30 minutes.
* **Colossus** – Titan’s concentrated liquidity DEX. It is the first native TON CLMM and enables LPs to earn significantly higher yields than current competitors with 1000x improvements to capital efficiency.

<br>


# 🚢 Factory

Titan's Factory is a beta site for our newest features. Give it a try and give us feedback!

Welcome to [**Titan Factory**](https://factory.titan.tg) — the experimental launchpad for Titan’s bleeding-edge products. This is where new ideas take form, where features are forged, and where real-world usage meets early access.

Titan Factory is designed for developers, power users, and DeFi explorers who want to get hands-on with beta-stage tools and help shape the future of onchain finance on TON.

#### 🛠️ What You’ll Find Here

* **Beta Products in Active Development:** All deployments on Titan Factory are live on mainnet but still in active testing. Expect rough edges. Expect changes. Expect frequent updates.
* **Transparent Roadtesting:** We launch early to learn fast. Every tool in Titan Factory is real, usable, and being monitored for feedback and performance in the wild.
* **No Promises, Just Progress:** Factory products may evolve rapidly or get sunset altogether. Use them at your own discretion — and tell us what breaks.

#### ⚙️ Currently Live: Colossus

The first product under live testing in Titan Factory is **Colossus**, our high-performance Concentrated Liquidity Market Maker (CLMM) built natively for TON. Colossus brings capital efficiency and customizable liquidity provisioning to TON’s AMM landscape, setting the stage for scalable on-chain markets.

We’re actively collecting data, surfacing UX issues, and tuning smart contract parameters. Whether you’re a casual LP or an advanced trader, your feedback here helps make Colossus stronger.

#### 👷 Who Is This For?

* Developers experimenting with integrations
* LPs and arbitrageurs looking to try new strategies
* Users curious to see what’s next from Titan before it hits prime time

Enter Titan Factory — and help shape what comes next.


# How Do I Use Titan?

Titan is useful for nearly all users of the TON ecosystem, with different parties benefiting from different Titan products.

**For Traders**

If you’re a trader on TON, Titan is the cheapest, simplest and fastest place to swap tokens. With Titan’s DEX aggregator—**Optimus**—every token on TON is accessible at 0% fees. Advanced routing algorithms operate in the background, detecting and avoiding scam or honeypot tokens, ensuring a more secure trading environment.

Titan’s Telegram MiniApp is tailored specifically for traders, simplifying the discovery of new tokens and enabling swaps at the best prices directly from a mobile device. This convenience, combined with top-tier execution, exemplifies why only Titans trade here.

In short, Optimus delivers the cheapest, fastest, and safest swaps on TON for Traders.\
\
**For Developers:**

Developers can seamlessly integrate [Titan’s Swap API](/titan-swap-api) in under 30 minutes, enabling token swaps directly within their Telegram MiniApps, mobile apps or web platforms. Titan manages security and RPC complexities, allowing developers to focus on building exceptional user experiences rather than dealing with DeFi infrastructure.

**For Liquidity Providers:**&#x20;

Liquidity providers and advanced DeFi users can significantly boost their earnings through Titan’s concentrated liquidity pools—achieving up to 1000x greater capital efficiency than traditional DEX models. By setting custom liquidity ranges, LPs gain access to advanced yield strategies that allow more precise positioning, improved risk management, and enhanced returns on their deployed capital.\
\
**For Token Launching Projects:**

Teams launching tokens on TON can use Titan’s Concentrated Liquidity DEX to establish robust on-chain liquidity for their tokens. By leveraging concentrated liquidity, capital efficiency is dramatically improved—allowing higher trading volumes with less upfront capital. Additionally, Titan’s fully on-chain farming contracts make it simple to issue rewards that incentivize more liquidity into teams pools. This means the same level of trading activity can be maintained with fewer incentives, empowering projects to optimize their liquidity strategies and focus on their core product, all while fostering a healthy environment for trading their token.


# Titan Walkthrough

Find all step by step walkthroughs on how to use the Titan CLMM DEX below. Still have some questions? Check our [FAQs](/faqs) or reach out on Telegram at [t.me/TitanTradingChat](https://t.me/TitanTradingChat)

{% content-ref url="/pages/zGqHNTDajWZK7Fv18771" %}
[Swapping](/titan-walkthrough/swapping)
{% endcontent-ref %}

{% content-ref url="/pages/ozQpKj3HKkAx7kjgXWZC" %}
[Depositing Liquidity](/titan-walkthrough/depositing-liquidity)
{% endcontent-ref %}

{% content-ref url="/pages/9p1CUVVOzNYzskObu2Tb" %}
[Withdrawing Liquidity](/titan-walkthrough/withdrawing-liquidity)
{% endcontent-ref %}

{% content-ref url="/pages/v66FheKRV7V6EnWoI7yb" %}
[Staking & Unstaking to Earn Rewards](/titan-walkthrough/staking-and-unstaking-to-earn-rewards)
{% endcontent-ref %}


# Swapping

Swapping with Titan is straightforward and highly efficient. Swaps incur 0% additional fees and aggregate over DeDust, StonFi, and Titan pools to provide users with the best possible rates.

1. To swap visit the [Titan Homepage](/how-to-list-a-pool-on-titan) and connect your wallet. Select your desired pairs using the token selector pills on the right side of the modal and entire how much of the first token you wish to sell.

   <figure><img src="/files/OhhV7WlXKYebk5sTGkMa" alt=""><figcaption></figcaption></figure>
2. Once you enter how much of the first token to sell, the best available rate across exchanges will be shown. You can use the carrot below the rate to view more information about the swap such as price impact, your selected slippage tolerance, how much tokens at minimum you will receive, the network fee, and the route (which DEX or DEXes) the swap will use.&#x20;
3. To change your slippage tolerance, how much percentage of price you're willing to move away from the quoted prices, click the settings button on the top of the swap modal and select from the presets or define your own using the custom input.&#x20;

<figure><img src="/files/RfR0rZ5diJ4zZ0ZVbqjE" alt=""><figcaption></figcaption></figure>

4. Once your desired tokens, token amounts and slippage settings are confirmed press **Submit Swap** and sign the transaction to enjoy the best priced swaps on TON! &#x20;


# Depositing Liquidity

1. Visit the [Titan Pools](https://factory.titan.tg/pools) page to see all available pools and connect your wallet.&#x20;

<figure><img src="/files/euN0Yq5AepqQIWQfIoXX" alt=""><figcaption></figcaption></figure>

2. Choose a pool to deposit into by clicking the corresponding row.
3. In the side panel that opens select either **Full Range** (depositing liquidity evenly across the entire price curve) or **Custom Range** (concentrated liquidity).
4. To deposit in full range pools, similar to Uniswap V2, enter the amount of TON or USDT you wish to deposit. The corresponding half of the pair will automatically fill with an equivalent amount. Click "Deposit" and sign the transaction to begin earning.

&#x20;       ![](/files/YZAfLR2iTduhRkhdzyjz)

5. Custom Range deposits let you choose a specific range for your liquidity. For example, you can deposit liquidity within +/- 10% of the current pool price. Use preset buttons, adjust the range via graph controls, or enter Min and Max prices for precision. The example shows liquidity deposited in the 2.75 TON/USDT to 3.33 TON/USDT range to capitalize on relatively stable prices.

&#x20;      ![](/files/LsqFJkjAx9kbtmWBBHkX)

6. Select your desired range to provide liquidity. Enter the amount for one asset in the pair; the other asset amount auto-populates. Unlike Full Range deposits, these values might be uneven or single-sided based on your range selection, enabling strategies like DCA. After setting your deposit, click "Deposit" and sign the transaction to start earning.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv0fIoSZ125hD1DCRr9fq%2Fuploads%2F5XGnhcgKTeMMwirNnFnE%2FIMG_5424.mp4?alt=media&token=29e23aa2-686a-4c33-8ac0-334b35b3ba04>" %}


# Withdrawing Liquidity

1. Visit the [Titan Portfolio](https://factory.titan.tg/portfolio) page and connect your wallet to view all the deposits you have on Titan.

<figure><img src="/files/UzO1pUMevYiZ0QujJLmx" alt=""><figcaption></figcaption></figure>

2. Click on the position you want to withdraw from to open the liquidity details side sheet. You'll see your current liquidity range, estimated yield, balance, and any claimable fees. Press **Claim Fees** and complete the transaction to transfer any fees from the pool to your wallet.

&#x20;       ![](/files/uqgIB4tJZI9O4Zt7TAKT)![](/files/czLu25Ni2ejJkey0wQe7)

2. Enter the **Withdraw** Tab and use the slider to select what percentage of your liquidity you want to withdraw. Once you have selected your desired withdraw amount, press **Remove Liquidity** and sign the transaction to complete the process. **Note -** withdrawing liquidity will auto-claim all your fees as well. Also keep in mind that if your position is staked, you will have to unstake liquidity before withdrawing.&#x20;

&#x20;     ![](/files/oQa5VIvJbMnclSDuWc7z)


# Staking & Unstaking to Earn Rewards

**Staking:**

1. Some pools may have rewards available to them to boost rewards. To maximize transparency and security, all of Titan's farming is done on-chain. To find which pools have rewards on them visit the [Titan Portfolio](https://factory.titan.tg/pools) page and check the Rewards column. In this column the rewards per pool over the last 24 hours will be shown. A further breakdown of how much this reward rate boosts APR can be found by hovering your cursor over the colored circle in the estimated yield column.&#x20;

<figure><img src="/files/9VrF0JeJLPXe1papax4x" alt=""><figcaption></figcaption></figure>

2. Once you have deposited in a pool that is providing rewards - visit the [Titan Portfolio Page](https://factory.titan.tg/portfolio),  select your position, press the **Stake Tab** on the top of the Deposit Side Sheet and sign the transaction to initiate your stake. On the **Stake Tab** you can view the duration of the stake period, what is the progress of the rewards distribution, estimated APR for your position, and how many daily rewards are emitted to the entire pool.  Note - you will see a colored circle in the Estimated Yield column where there are rewards available on your positions.&#x20;

<figure><img src="/files/ZSgVZksvqW7OatGSrHtr" alt=""><figcaption></figcaption></figure>

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv0fIoSZ125hD1DCRr9fq%2Fuploads%2FQLXp1LDd6Y7Z2zHuzcQF%2FIMG_1391.mp4?alt=media&token=6e2b10c2-69ed-4d81-8c54-ad634cec693b>" %}

**Claiming Rewards:**

1. Once your position is staked you will immediately start earning rewards. To claim, Visit the [Titan Portfolio Page](https://factory.titan.tg/portfolio),  select your position, press the **Stake Tab** and press the **Claim Rewards** and sign the transaction. You can claim as many or as few times as you want. Your rewards will stay on-chain until claimed.&#x20;

&#x20;     ![](/files/iekawKq74sypt78XPR6G)

**Withdrawing Stake**&#x20;

1. Withdrawing your stake is just as simple as staking it. Visit the [Titan Portfolio Page](https://factory.titan.tg/portfolio),  select your position, press the **Stake Tab,** press the **Unstake button** and sign the transaction to remove your stake. Keep in mind you can not partially unstake, and you will need to remove your stake before withdrawing your liquidity position.&#x20;


# 🏛️ Colossus: Concentrated Liquidity AMM

Colossus is Titan’s flagship CLMM (Concentrated Liquidity Market Maker), purpose-built for the TON blockchain.

Colossus is designed for precision, capital efficiency, and low-latency execution. Colossus gives LPs and traders fine-grained control over how and where their liquidity works — all while leveraging the speed and scalability of the TON VM.

Whether you’re a passive yield farmer or a power LP running advanced strategies, Colossus is engineered to meet the demands of modern DeFi on a high-performance L1.

#### 💡 Why Concentrated Liquidity?

Traditional AMMs spread liquidity evenly across the entire price curve, which is simple — but inefficient. In a concentrated model, LPs can deploy capital within custom price ranges, allowing for:

* **Greater capital efficiency** (more fees with less liquidity)
* **Tighter spreads for traders**
* **Fine-tuned LP strategies** based on market conditions

Colossus brings this power to TON, with a focus on simplicity, speed, and safety.

***

#### ⚙️ Core Features

* **Customizable Ranges:** LPs can choose exactly which price intervals their liquidity is active in, using sliders or exact bounds.
* **Position NFTs:** Every position is tokenized as an NFT — transferable, tradable, and fully owned by the LP.
* **Real-Time Fee Accrual:** Fees accumulate continuously and can be harvested at any time.
* **Full-Range Mode:** Prefer passive LPing? You can opt to deploy liquidity across the full curve, similar to a constant product AMM.
* **TON Native:** Built entirely for the TON VM, optimized for asynchronous execution and low fees.
* **Rewards Staking:** Stake your LP NFTs to farm additional rewards — boosting your yield on top of trading fees.

***

#### 🌱 Yield Farming with Colossus

Colossus goes beyond fee income. LPs can **stake their position NFTs** into active farming campaigns to earn bonus rewards.

* Stake any eligible LP position
* Track APRs and pool-specific incentives
* Claim rewards at any time

This turns every position into a yield-maximizing asset — whether you're farming stable pairs or volatile assets.

Rewards campaigns are dynamic and may rotate over time. Check [factory.titan.tg](https://factory.titan.tg) for current pools and incentives.

***

🧪 Current Status

Colossus is **live on mainnet** via [Titan Factory](https://factory.titan.tg), and currently in public beta. That means:

* Contracts are deployed and usable
* Positions can be created and fees accrued
* Feedback and usage data are actively shaping improvements

We’re still polishing UX, tightening edge-case behavior, and working toward a full production release.

***

#### 👤 Who Should Use Colossus?

* **LPs** who want higher fee returns with precise control
* **Traders** looking for deeper liquidity and lower slippage
* **Builders** integrating custom pools, analytics, or routing logic into TON-native apps

***

Colossus represents the next evolution in TON’s liquidity layer.\
If you’re here now, you’re early — and we’re building it with you.


# 🗿 Colossus Overview

The Colossus CLMM allows liquidity providers to provide liquidity in a specific range of prices. This means that when the current price of the pool is within the specified price range, the user will gain pool fees (as well as liquidity mining rewards) from trading volume. One of the benefits of this is that, as long as the price stays within the range, it allows the user to earn more in rewards than compared to a traditional AMM where the user must provide liquidity at all prices.

Another benefit is that traders who wish to swap their tokens have lower slippage on their trades due to the liquidity being more concentrated. In the long term, this will attract more traders to concentrated liquidity pools, thus resulting in higher earnings for liquidity providers.

![](https://titan-8.gitbook.io/~gitbook/image?url=https%3A%2F%2F1198464223-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FQLrbvBTmg0o7drE7AePs%252Fuploads%252FPyJK3eLEH1szogzrqvuC%252Fimage.png%3Falt%3Dmedia%26token%3D0e32ede7-71d2-4374-ad73-0dc469ba5968\&width=768\&dpr=4\&quality=100\&sign=925baaef\&sv=2)

#### Price Range <a href="#price-range" id="price-range"></a>

Colossus allows the users to specify a custom price range, or select from a list of preset ranges.

#### Deposit Amounts <a href="#deposit-amounts" id="deposit-amounts"></a>

![](https://titan-8.gitbook.io/~gitbook/image?url=https%3A%2F%2F1198464223-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FQLrbvBTmg0o7drE7AePs%252Fuploads%252FZb90oT5pN35NFOSvs2qt%252Fimage.png%3Falt%3Dmedia%26token%3D5a07af6a-0b05-416f-9c67-c8f3bcd64ebd\&width=768\&dpr=4\&quality=100\&sign=eff6d47d\&sv=2)

Once the price range is selected, the user can select how much liquidity they would like to provide. The ratio of the two token amounts is determined by where the current price is in relation to the price range. If the price is outside of the price range, the user will have to deposit one of the tokens, while if the current price is inside the price range, the user will have to deposit both tokens.


# 🔍 Colossus Audits

Security is foundational to everything we build at Titan. Colossus, our concentrated liquidity AMM, has undergone two independent audits to ensure the integrity and safety of the smart contracts.

#### ✅ Audit Coverage

* Core pool logic and math
* Position NFT minting and redemption
* Fee accounting and distribution
* Staking + rewards contracts
* Edge cases around tick crossing, slippage, and gas limits on TON VM

#### 🔐 Completed Audits

1. **Beosin Audit**\
   A top-tier blockchain security firm with extensive experience in DeFi protocol audits. Beosin performed a deep dive into the Colossus contract suite, including economic and execution-layer attack surfaces.<br>
2. **TON Developer Review**\
   A member of Tact Compiler team independently reviewed the contracts, with special focus on compatibility with the TON VM, gas efficiency, and message routing integrity.

{% file src="/files/l9lk1HmVJ4eTAYsfhgP8" %}

{% file src="/files/g1Gs80oHpjqBx5s7eh6C" %}

***

#### 🛡️ Ongoing Commitment to Security

Colossus is live on mainnet via [Titan Factory](https://factory.titan.tg), where it continues to undergo real-world testing. As we transition from beta to full production, we are:

* Monitoring on-chain behavior for anomalies
* Planning a community-driven bug bounty program
* Integrating best practices from ongoing TVM developments

We strongly believe in open infrastructure and transparent development. If you're a whitehat, dev, or security researcher — we welcome your eyes on the code.


# 🧠 Smart Contracts

There are 7 core smart contracts that govern the CLMM protocol:

* Router
* Vault
* Pool
* PoolManager
* LpAccount
* LpWallet
* Farm


# Deployed Contract Addresses

| Contract    | TON Address                                        |
| ----------- | -------------------------------------------------- |
| **Router**  | `EQAGm0ytMGoIyQHv17toThdn1jKHV7gZTDCidxNLpIuahgX7` |
| USDT Vault  | `EQCZxv-Z-_b0q_kYw3K2BBOaDdm4Uur2klCXZGEGMn3bPkEu` |
| TON Vault   | `EQDX9DT5MOoEZNObIDNVzUlPV32ayAwNtMlJO_M0jqXZRLdW` |
| tsTON Vault | `EQAbFxWx8zKZWNjmB3OwCS5yWcHYETNYZzigbNVzrgMyZWhs` |
| NOT Vault   | `EQAZiYOKhhqyILVDSamrI2enqbp2h2v-D5o3LVmD7TtKDa3w` |
| DOGS Vault  | `EQBbMZVtyrn-vNubylZVANXkJ01cLqodChEag8QI6cJt_YB2` |
| PX Vault    | `EQC2IckLTS8XpJPTnuyyDuDoQ9YYvRnaMs9xbzROZ9Z_eF93` |
| stTON Vault | `EQC_UgqcAN_b1-IXh83ph0sbAk6IBzEqXTPJDB8ZfJzV0eEh` |
| BUILD Vault | `EQCsEYRTDsg-sPFYSeTOHNUYQP6iutpeXMFTZ8JbA2MlGwMV` |
| REDO Vault  | `EQAhuguZ_4QjqfUb-4zXeG_1AvW_kU0Hrj6Dnp0uA8mX3xAI` |


# Router

The router is used to deploy new vaults, pools, and farms, as well as to retrieve addresses for all three.\
**Note:** Swaps and liquidity actions do **not** interact with the router. Instead, these operations are handled directly via vaults to reduce transaction bottlenecks and increase throughput.

***

## Interface

### `get_vault_address`

Returns the vault address for a given token mint.

**Arguments**

| Data Type | Description        |
| --------- | ------------------ |
| `slice`   | Token mint address |

**Returns**

| Data Type | Description         |
| --------- | ------------------- |
| `slice`   | Token vault address |

***

### `get_pool_manager_address`

Returns the pool manager address for a given token pair, tick size, and fee parameters.

**Arguments**

| Data Type | Description          |
| --------- | -------------------- |
| `slice`   | Token0 vault address |
| `slice`   | Token1 vault address |
| `int`     | Tick size            |
| `int`     | LP fee               |
| `int`     | Protocol fee         |
| `int`     | Referral fee         |

**Returns**

| Data Type | Description          |
| --------- | -------------------- |
| `slice`   | Pool manager address |

***

### `get_pool_address`

Returns the pool address for a given pair of vaults, tick size, fee parameters, and pool index.

**Arguments**

| Data Type | Description          |
| --------- | -------------------- |
| `slice`   | Token0 vault address |
| `slice`   | Token1 vault address |
| `int`     | Pool index           |
| `int`     | Tick size            |
| `int`     | LP fee               |
| `int`     | Protocol fee         |
| `int`     | Referral fee         |

**Returns**

| Data Type | Description  |
| --------- | ------------ |
| `slice`   | Pool address |

***

### `get_num_farms`

Returns the number of deployed farms.

**Arguments**

*None*

**Returns**

| Data Type | Description              |
| --------- | ------------------------ |
| `int`     | Number of deployed farms |

***

### `get_farm_address`

Returns the farm address for a given farm index.

**Arguments**

| Data Type | Description |
| --------- | ----------- |
| `int`     | Farm index  |

**Returns**

| Data Type | Description  |
| --------- | ------------ |
| `slice`   | Farm address |

***

### `get_router_data`

Returns router metadata.

**Arguments**

*None*

**Returns**

| Data Type | Description      |
| --------- | ---------------- |
| `int`     | Is router locked |
| `slice`   | Admin address    |

***

## Messages

### Deploy Vault

```plaintext
Opcode: 0x89ed7fbb
```

**Body Format**

| Data Type | Description         |
| --------- | ------------------- |
| `Uint32`  | Opcode              |
| `Uint64`  | Query ID            |
| `slice`   | Jetton mint address |

***

### Deploy Pool

```plaintext
Opcode: 0xc2fd3731
```

**Body Format**

| Data Type | Description           |
| --------- | --------------------- |
| `Uint32`  | Opcode                |
| `Uint64`  | Query ID              |
| `Address` | Vault0 address        |
| `Address` | Vault1 address        |
| `Int32`   | Pool min tick (index) |
| `Int32`   | Initial tick          |
| `Uint32`  | Tick size             |
| `Uint8`   | LP fee                |
| `Uint8`   | Protocol fee          |
| `Uint8`   | Referral fee          |
| `Address` | Protocol fee address  |

***

### Deploy Farm

```plaintext
Opcode: 0x5961da05
```

**Body Format**

| Data Type | Description                    |
| --------- | ------------------------------ |
| `Uint32`  | Opcode                         |
| `Uint64`  | Query ID                       |
| `Address` | Pool manager address           |
| `Address` | Farm reward token mint address |
| `Uint64`  | Reward period start timestamp  |
| `Uint64`  | Reward period end timestamp    |
| `Cell`    | Admin address cell             |
| `Address` | Farm admin address             |


# Vault

The vault is used for sending tokens for a swap, depositing tokens for providing liquidity, and transferring tokens to users during liquidity withdrawals.\
There is one vault for each Jetton mint.

***

## Interface

### `get_vault_data`

Returns vault data.

**Arguments**

*None*

**Returns**

| Data Type | Description                   |
| --------- | ----------------------------- |
| `int`     | Is initialized                |
| `slice`   | Jetton mint address           |
| `slice`   | Admin address                 |
| `slice`   | Vault's Jetton wallet address |

***

## Messages

### Jetton Transfer Notification

```plaintext
Opcode: 0x7362d09c
```

**Body Format**

| Data Type | Description     |
| --------- | --------------- |
| `Uint32`  | Opcode          |
| `Uint64`  | Query ID        |
| `Coins`   | Transfer amount |
| `Address` | User address    |
| `Cell`    | Forward payload |

***

### Pay To

```plaintext
Opcode: 0x9bbf5a17
```

**Body Format**

| Data Type     | Description                       |
| ------------- | --------------------------------- |
| `Uint32`      | Opcode                            |
| `Uint64`      | Query ID                          |
| `Address`     | Recipient address                 |
| `Uint32`      | Exit code                         |
| `Coins`       | Amount                            |
| `Address`     | Other vault address               |
| `Uint1`       | Is from pool                      |
| `Uint32`      | Tick size                         |
| `Uint8`       | LP fee                            |
| `Uint8`       | Protocol fee                      |
| `Uint8`       | Referral fee                      |
| `Maybe Int32` | Pool min tick (if sent from pool) |
| `Maybe Coins` | Forward amount                    |
| `Maybe ^Cell` | Forward payload                   |


# Pool Manager

The pool manager serves as a proxy between pools and vaults.\
Users do not interact directly with it.

***

## Interface

### `get_pool_manager_data`

Returns pool manager data.

**Arguments**

*None*

**Returns**

| Data Type | Description              |
| --------- | ------------------------ |
| `int`     | Is initialized           |
| `int`     | Lowest pool shard index  |
| `int`     | Highest pool shard index |
| `int`     | Tick size                |
| `int`     | Token0 vault address     |
| `int`     | Token1 vault address     |
| `slice`   | Protocol fee address     |
| `int`     | LP fee                   |
| `int`     | Protocol fee             |
| `int`     | Referral fee             |

***

### `get_account_address`

Returns LP account address for user.

**Arguments**

| Data Type | Description |
| --------- | ----------- |
| `slice`   | User wallet |

**Returns**

| Data Type | Description             |
| --------- | ----------------------- |
| `slice`   | User LP account address |

***

### `get_pool_address`

Returns pool address for given index.

**Arguments**

| Data Type | Description           |
| --------- | --------------------- |
| `int`     | Min tick (pool index) |

**Returns**

| Data Type | Description  |
| --------- | ------------ |
| `slice`   | Pool address |

***

## Messages

### Add Liquidity

```plaintext
Opcode: 0xb9251ce7
```

**Body Format**

| Data Type      | Description  |
| -------------- | ------------ |
| `Uint32`       | Opcode       |
| `Uint64`       | Query ID     |
| `Int32`        | Low tick     |
| `Int32`        | High tick    |
| `Coins`        | Amount0      |
| `Coins`        | Amount1      |
| `Address`      | User address |
| `Uint128`      | Liquidity    |
| `^Cell`        | Farm cell    |
| `Uint1`        | Should stake |
| `Maybe Uint32` | Farm index   |
| `Int32`        | Pool index   |

***

### Refund User

```plaintext
Opcode: 0xdc37aa85
```

**Body Format**

| Data Type | Description |
| --------- | ----------- |
| `Uint32`  | Opcode      |
| `Uint64`  | Query ID    |
| `Coins`   | Amount0     |
| `Coins`   | Amount1     |
| `Address` | Address     |

***

### Stage LP

```plaintext
Opcode: 0x4535f1ab
```

**Body Format**

| Data Type      | Description     |
| -------------- | --------------- |
| `Uint32`       | Opcode          |
| `Uint64`       | Query ID        |
| `Address`      | User address    |
| `Coins`        | Amount0         |
| `Coins`        | Amount1         |
| `Coins`        | Provide amount0 |
| `Coins`        | Provide amount1 |
| `Int32`        | Low tick        |
| `Int32`        | High tick       |
| `Int32`        | Pool index      |
| `^Cell`        | Liquidity data  |
| `Uint128`      | Liquidity       |
| `^Cell`        | Farm data       |
| `Uint1`        | Should stake    |
| `Maybe Uint32` | Farm index      |

***

### Stake LP

```plaintext
Opcode: 0xe55cf6af
```

**Body Format**

| Data Type | Description    |
| --------- | -------------- |
| `Uint32`  | Opcode         |
| `Uint64`  | Query ID       |
| `Int32`   | Pool index     |
| `Int32`   | Low tick       |
| `Int32`   | High tick      |
| `Uint128` | Liquidity      |
| `Uint256` | Tx count       |
| `^Cell`   | Farm data cell |
| `Address` | User address   |
| `Uint64`  | Position index |
| `Uint32`  | Farm index     |

***

### Stake Liquidity

```plaintext
Opcode: 0x71a6fd4b
```

**Body Format**

| Data Type | Description     |
| --------- | --------------- |
| `Uint32`  | Opcode          |
| `Uint64`  | Query ID        |
| `Int32`   | Pool index      |
| `Int32`   | Low tick        |
| `Int32`   | High tick       |
| `Uint128` | Liquidity       |
| `Uint256` | Tx count        |
| `Uint32`  | Farm index      |
| `Cell`    | Farm data cell  |
| `Uint64`  | Start timestamp |
| `Uint64`  | End timestamp   |
| `Address` | User address    |
| `Uint64`  | Position index  |

***

### Unstake LP

```plaintext
Opcode: 0x71af2880
```

**Body Format**

| Data Type | Description         |
| --------- | ------------------- |
| `Uint32`  | Opcode              |
| `Uint64`  | Query ID            |
| `Int32`   | Pool index          |
| `Uint256` | Seconds inside X128 |
| `Uint64`  | Seconds             |
| `Address` | User address        |
| `Uint32`  | Farm index          |
| `Uint1`   | Should restake      |

***

### Stake Notification Manager

```plaintext
Opcode: 0x26b4cbbf
```

**Body Format**

| Data Type | Description      |
| --------- | ---------------- |
| `Uint32`  | Opcode           |
| `Uint64`  | Query ID         |
| `Int32`   | Pool index       |
| `Uint32`  | Farm index       |
| `Address` | Response address |


# LP Account

The LP account holds staged funds for users.\
There is one LP account per pool per user.\
This is useful when users want to provide liquidity that requires a non-zero amount in both pool tokens.

***

## Interface

### `get_titan_lp_account_data`

Returns user's LP account data.

**Arguments**

*None*

**Returns**

| Data Type | Description          |
| --------- | -------------------- |
| `slice`   | User address         |
| `slice`   | Pool manager address |
| `int`     | Amount0 staged       |
| `int`     | Amount1 staged       |

***

## Messages

### Stage Liquidity

```plaintext
Opcode: 0xb4eb90ef
```

**Body Format**

| Data Type      | Description          |
| -------------- | -------------------- |
| `Uint32`       | Opcode               |
| `Uint64`       | Query ID             |
| `Coins`        | Amount0              |
| `Coins`        | Amount1              |
| `Coins`        | Provide amount0      |
| `Coins`        | Provide amount1      |
| `Int32`        | Low tick             |
| `Int32`        | High tick            |
| `Uint128`      | Liquidity to provide |
| `Int32`        | Pool index           |
| `^Cell`        | Farm data cell       |
| `Uint1`        | Should stake         |
| `Maybe Uint32` | Farm index           |

***

### Refund User

```plaintext
Opcode: 0x0bf3f447
```

**Body Format**

| Data Type | Description |
| --------- | ----------- |
| `Uint32`  | Opcode      |
| `Uint64`  | Query ID    |

***

### Directly Add Liquidity

```plaintext
Opcode: 0x8dc3c672
```

**Body Format**

| Data Type      | Description      |
| -------------- | ---------------- |
| `Uint32`       | Opcode           |
| `Uint64`       | Query ID         |
| `Int32`        | Low tick         |
| `Int32`        | High tick        |
| `Coins`        | Amount0          |
| `Coins`        | Amount1          |
| `Uint128`      | Liquidity to add |
| `Int32`        | Pool index       |
| `^Cell`        | Farm data        |
| `Uint1`        | Should stake     |
| `Maybe Uint32` | Farm index       |


# Pool

The pool contract is the main contract responsible for maintaining the pool's current price, current liquidity, and all deposited liquidity.\
It also determines output amounts for swaps and handles liquidity burning.

***

## Interface

### `get_pool_data`

Returns pool data.

**Arguments**

*None*

**Returns**

| Data Type | Description                           |
| --------- | ------------------------------------- |
| `slice`   | Token0 vault address                  |
| `slice`   | Token1 vault address                  |
| `int`     | LP fee                                |
| `int`     | Protocol fee                          |
| `int`     | Referral fee                          |
| `slice`   | Protocol fee address                  |
| `int`     | Token0 protocol fee earned            |
| `int`     | Token1 protocol fee earned            |
| `int`     | Sqrt price X128                       |
| `int`     | Current lower tick                    |
| `int`     | Current upper tick                    |
| `int`     | Current tick                          |
| `int`     | Current liquidity                     |
| `int`     | Is initialized                        |
| `int`     | Is active                             |
| `int`     | Tx count                              |
| `int`     | Global fee growth in token0 X128      |
| `int`     | Global fee growth in token1 X128      |
| `int`     | Min tick (pool index)                 |
| `int`     | Seconds                               |
| `int`     | Seconds per liquidity cumulative X128 |

***

### `get_tick_data`

Returns entire pool tick data.

**Arguments**

*None*

**Returns**

| Data Type | Description   |
| --------- | ------------- |
| `dict`    | All tick data |

**Tick Format**

| Key     | Value     |
| ------- | --------- |
| `Int32` | Tick      |
| `Cell`  | Tick data |

**Tick Data Contents**

| Data Type | Description                                |
| --------- | ------------------------------------------ |
| `Int128`  | Liquidity delta at tick                    |
| `Uint128` | Gross liquidity at tick                    |
| `Uint256` | Fee growth in token0 above tick X128       |
| `Uint256` | Fee growth in token1 above tick X128       |
| `^Cell`   | Tick seconds data                          |
|           | → `Uint256`: Seconds                       |
|           | → `Uint256`: Cumulative sec/liquidity X128 |

***

### `get_nft_address_by_index`

Returns NFT position address for a given index.

**Arguments**

| Data Type | Description    |
| --------- | -------------- |
| `int`     | Position index |

**Returns**

| Data Type | Description            |
| --------- | ---------------------- |
| `slice`   | User LP wallet address |

***

### `get_simulate_swap`

Simulates a swap and returns result.

**Arguments**

| Data Type | Description  |
| --------- | ------------ |
| `int`     | Is token0 in |
| `int`     | Amount in    |

**Returns**

| Data Type | Description             |
| --------- | ----------------------- |
| `int`     | Exit code               |
| `int`     | State was altered       |
| `int`     | Refund amount           |
| `int`     | Other token output      |
| `int`     | Is fwd (ignore)         |
| `int`     | Fwd amount (ignore)     |
| `int`     | Number of ticks crossed |

***

### `get_amounts_for_liquidity`

Get required token amounts to provide liquidity.

**Arguments**

| Data Type | Description |
| --------- | ----------- |
| `int`     | Liquidity   |
| `int`     | Lower tick  |
| `int`     | Upper tick  |

**Returns**

| Data Type | Description      |
| --------- | ---------------- |
| `int`     | Amount0 required |
| `int`     | Amount1 required |

***

## Messages

### Add Liquidity

```plaintext
Opcode: 0x33f9243b
```

| Data Type      | Description  |
| -------------- | ------------ |
| `Uint32`       | Opcode       |
| `Uint64`       | Query ID     |
| `Int32`        | Low tick     |
| `Int32`        | High tick    |
| `Coins`        | Amount0      |
| `Coins`        | Amount1      |
| `Address`      | User address |
| `Uint128`      | Liquidity    |
| `^Cell`        | Farm data    |
| `Uint1`        | Should stake |
| `Maybe Uint32` | Farm index   |

***

### Swap

```plaintext
Opcode: 0x6559ce1d
```

| Data Type       | Description              |
| --------------- | ------------------------ |
| `Uint32`        | Opcode                   |
| `Uint64`        | Query ID                 |
| `Address`       | Destination user address |
| `Address`       | User address             |
| `Coins`         | Amount in                |
| `Coins`         | Desired amount out       |
| `Uint1`         | Is exact in              |
| `Uint1`         | Has referral address     |
| `Maybe ^Cell`   | Referral address cell    |
| → `Address`     | Referral address         |
| `^Cell`         | Custom DEX data          |
| → `Coins`       | Custom forward amount    |
| → `Uint1`       | Has custom payload       |
| → `Maybe ^Cell` | Custom payload           |
| `Coins`         | Refund forward payload   |
| `Uint1`         | Has refund payload       |
| `Maybe ^Cell`   | Refund payload           |

***

### Burn Liquidity

```plaintext
Opcode: 0xf8f6fc24
```

| Data Type | Description    |
| --------- | -------------- |
| `Uint32`  | Opcode         |
| `Int32`   | Low tick       |
| `Int32`   | High tick      |
| `Uint128` | Liquidity      |
| `Uint64`  | Position index |

***

### Burn Notification

```plaintext
Opcode: 0x7bdd97de
```

| Data Type | Description    |
| --------- | -------------- |
| `Uint32`  | Opcode         |
| `Uint64`  | Query ID       |
| `Int32`   | Low tick       |
| `Int32`   | High tick      |
| `Uint128` | Liquidity      |
| `Address` | User address   |
| `Uint64`  | Position index |

***

### Stake Liquidity

```plaintext
Opcode: 0x5576549b
```

| Data Type   | Description                |
| ----------- | -------------------------- |
| `Uint32`    | Opcode                     |
| `Uint64`    | Query ID                   |
| `Int32`     | Low tick                   |
| `Int32`     | High tick                  |
| `Uint128`   | Liquidity                  |
| `Uint256`   | Tx count                   |
| `^Cell`     | Farm data cell             |
| → `Uint64`  | Farming rewards start time |
| → `Uint64`  | Farming rewards end time   |
| → `Address` | User address               |
| → `Uint64`  | Position index             |
| → `Uint32`  | Farm index                 |

***

### Unstake LP

```plaintext
Opcode: 0x82acbf5f
```

| Data Type   | Description                               |
| ----------- | ----------------------------------------- |
| `Uint32`    | Opcode                                    |
| `Uint64`    | Query ID                                  |
| `Int32`     | Low tick                                  |
| `Int32`     | High tick                                 |
| `Uint128`   | Liquidity                                 |
| `Uint256`   | Tx count                                  |
| `Uint32`    | Farm index                                |
| `Uint1`     | Should restake                            |
| `^Cell`     | Farm data cell                            |
| → `Uint256` | Position sec/liquidity growth inside X128 |
| → `Uint64`  | Start timestamp                           |
| → `Uint64`  | End timestamp                             |

***

### Stake LP

```plaintext
Opcode: 0x80c51caa
```

| Data Type | Description    |
| --------- | -------------- |
| `Uint32`  | Opcode         |
| `Uint64`  | Query ID       |
| `Address` | User address   |
| `Uint64`  | Position index |
| `Int32`   | Low tick       |
| `Int32`   | High tick      |
| `Uint128` | Liquidity      |
| `Uint256` | Tx count       |
| `Uint32`  | Farm index     |

***

### Stake Notification

```plaintext
Opcode: 0xbaaf2375
```

| Data Type | Description      |
| --------- | ---------------- |
| `Uint32`  | Opcode           |
| `Uint64`  | Query ID         |
| `Uint32`  | Farm index       |
| `Uint64`  | Position index   |
| `Address` | Response address |

***

### Collect Protocol Fees

```plaintext
Opcode: 0x4ab8bdfa
```

| Data Type | Description |
| --------- | ----------- |
| `Uint32`  | Opcode      |
| `Uint64`  | Query ID    |


# Position

A position NFT represents a single range of liquidity provided in a pool.\
It follows the [TON NFT standard](https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md).

***

## Interface

### `get_position_data`

Returns position data.

**Arguments**

*None*

**Returns**

| Data Type | Description                                  |
| --------- | -------------------------------------------- |
| `slice`   | User address                                 |
| `slice`   | Pool address                                 |
| `int`     | Position index                               |
| `int`     | Lower tick of the position's liquidity range |
| `int`     | Upper tick of the position's liquidity range |
| `int`     | Liquidity amount of the position             |
| `int`     | Pool's transaction count at last interaction |
| `int`     | Fee growth for token0 inside range X128      |
| `int`     | Fee growth for token1 inside range X128      |
| `int`     | Whether position is staked in a farm         |

***

### `get_nft_data`

Returns position NFT metadata.

**Arguments**

*None*

**Returns**

| Data Type | Description    |
| --------- | -------------- |
| `int`     | Is initialized |
| `int`     | Position index |
| `slice`   | Pool address   |
| `slice`   | User address   |
| `cell`    | NFT content    |

***

### `get_position_farm_data`

Returns all staking data for the position.

**Arguments**

*None*

**Returns**

| Data Type | Description       |
| --------- | ----------------- |
| `dict`    | All position data |

**Staking Data Format**

| Key      | Value      |
| -------- | ---------- |
| `Uint32` | Farm index |
| `Cell`   | Tick data  |

**Tick Data Contents**

| Data Type | Description                              |
| --------- | ---------------------------------------- |
| `Uint256` | Seconds per liquidity growth inside X128 |

***

## Messages

### Mint Position

```plaintext
Opcode: 0x80b587dc
```

| Data Type         | Description             |
| ----------------- | ----------------------- |
| `Uint32`          | Opcode                  |
| `Uint64`          | Query ID                |
| `Address`         | Owner address           |
| `^Cell`           | NFT content             |
| `^Cell`           | Position data           |
| → `Int32`         | Low tick                |
| → `Int32`         | High tick               |
| → `^Cell`         | Position fee data       |
| →→ `Uint256`      | Fee0 growth inside last |
| →→ `Uint256`      | Fee1 growth inside last |
| → `Uint128`       | Liquidity               |
| → `Uint256`       | Tx count                |
| → `^Cell`         | Farm data               |
| →→ `Uint1`        | Should stake            |
| →→ `Maybe Uint32` | Farm index              |

***

### Burn Liquidity

```plaintext
Opcode: 0x55521d04
```

| Data Type   | Description        |
| ----------- | ------------------ |
| `Uint32`    | Opcode             |
| `Uint64`    | Query ID           |
| `Int32`     | Low tick           |
| `Int32`     | Upper tick         |
| `Uint128`   | Liquidity          |
| `Uint256`   | Tx count           |
| `^Cell`     | Fee data           |
| → `Uint256` | Fee0 growth inside |
| → `Uint256` | Fee1 growth inside |
| `Address`   | User address       |

***

### Stake Liquidity

```plaintext
Opcode: 0x1514f51d
```

| Data Type   | Description                       |
| ----------- | --------------------------------- |
| `Uint32`    | Opcode                            |
| `Uint64`    | Query ID                          |
| `Int32`     | Low tick                          |
| `Int32`     | High tick                         |
| `Uint128`   | Liquidity                         |
| `Uint256`   | Tx count                          |
| `Uint256`   | Seconds per liquidity growth X128 |
| `Uint32`    | Farm index                        |
| `^Cell`     | Farm data                         |
| → `Uint64`  | Farm rewards start timestamp      |
| → `Uint64`  | Farm rewards end timestamp        |
| → `Address` | User address                      |

***

### Unstake Liquidity

```plaintext
Opcode: 0x260476e7
```

| Data Type | Description    |
| --------- | -------------- |
| `Uint32`  | Opcode         |
| `Uint64`  | Query ID       |
| `Uint32`  | Farm index     |
| `Uint1`   | Should restake |

***

### Transfer NFT

```plaintext
Opcode: 0x5fcc3d14
```

| Data Type           | Description       |
| ------------------- | ----------------- |
| `Uint32`            | Opcode            |
| `Uint64`            | Query ID          |
| `Address`           | New owner address |
| `Address`           | Response address  |
| `Maybe ^Cell`       | Custom payload    |
| `Coins`             | Forward amount    |
| `Either Cell ^Cell` | Forward payload   |


# Farm

The farm contract is used to deploy liquidity mining programs, accept funding of liquidity mining rewards, and pay users their rewards.

***

## Interface

### `get_farm_data`

Returns farm data.

**Arguments**

*None*

**Returns**

| Data Type | Description           |
| --------- | --------------------- |
| `int`     | Farm index            |
| `int`     | Start time            |
| `int`     | End time              |
| `slice`   | Router address        |
| `slice`   | Pool manager address  |
| `slice`   | Jetton mint address   |
| `slice`   | Jetton wallet address |
| `int`     | Rewards               |
| `int`     | Is initialized        |
| `slice`   | Admin address         |
| `int`     | Number of stakes      |
| `int`     | Seconds claimed X128  |

***

## Messages

### Stake Liquidity

```plaintext
Opcode: 0xb1e1dd6e
```

| Data Type | Description    |
| --------- | -------------- |
| `Uint32`  | Opcode         |
| `Uint64`  | Query ID       |
| `Int32`   | Pool index     |
| `Int32`   | Low tick       |
| `Int32`   | High tick      |
| `Uint128` | Liquidity      |
| `Uint256` | Tx count       |
| `Uint64`  | Position index |

***

### Unstake Liquidity

```plaintext
Opcode: 0x23b6f845
```

| Data Type | Description         |
| --------- | ------------------- |
| `Uint32`  | Opcode              |
| `Uint64`  | Query ID            |
| `Uint256` | Seconds inside X128 |
| `Uint256` | Seconds             |
| `Address` | User address        |
| `Uint1`   | Should restake      |

***

### Stake LP

```plaintext
Opcode: 0x898c03ae
```

| Data Type   | Description    |
| ----------- | -------------- |
| `Uint32`    | Opcode         |
| `Uint64`    | Query ID       |
| `Int32`     | Pool index     |
| `Int32`     | Lower tick     |
| `Int32`     | High tick      |
| `Uint128`   | Liquidity      |
| `Uint256`   | Tx count       |
| `^Cell`     | User data      |
| → `Address` | User address   |
| → `Uint64`  | Position index |

***

### Stake Notification (Farm)

```plaintext
Opcode: 0x4a88935e
```

| Data Type | Description  |
| --------- | ------------ |
| `Uint32`  | Opcode       |
| `Uint64`  | Query ID     |
| `Address` | User address |

***

### Refund Rewards

```plaintext
Opcode: 0xb7959473
```

| Data Type | Description                 |
| --------- | --------------------------- |
| `Uint32`  | Opcode                      |
| `Uint64`  | Query ID                    |
| `Coins`   | Amount of rewards to refund |

***

### Transfer Notification (Funding Rewards)

```plaintext
Opcode: 0x7362d09c
```

| Data Type | Description   |
| --------- | ------------- |
| `Uint32`  | Opcode        |
| `Uint64`  | Query ID      |
| `Coins`   | Reward amount |
| `Address` | Sender        |


# 👨🏻‍💻 Common Uses

{% content-ref url="/pages/voj3OOLdPgpSIekyCXbW" %}
[Swap](/colossus-concentrated-liquidity-amm/common-uses/swap)
{% endcontent-ref %}

{% content-ref url="/pages/5xweJg1kSBcONabcNRMC" %}
[Provide Liquidity](/colossus-concentrated-liquidity-amm/common-uses/provide-liquidity)
{% endcontent-ref %}

{% content-ref url="/pages/o42YTdXnGSRGc0TOO2Ta" %}
[Burn Liquidity](/colossus-concentrated-liquidity-amm/common-uses/burn-liquidity)
{% endcontent-ref %}

{% content-ref url="/pages/NCHHDiHKFzY9KUqoww73" %}
[Harvest Pool Fees](/colossus-concentrated-liquidity-amm/common-uses/harvest-pool-fees)
{% endcontent-ref %}

{% content-ref url="/pages/untdybfsx7VxAKhLwT33" %}
[Stake position](/colossus-concentrated-liquidity-amm/common-uses/stake-position)
{% endcontent-ref %}

{% content-ref url="/pages/vUXMkIn0IBhAZVpvd6Qp" %}
[Unstake position](/colossus-concentrated-liquidity-amm/common-uses/unstake-position)
{% endcontent-ref %}

{% content-ref url="/pages/lDDSUaEAY0IudMh7C0JR" %}
[Harvest Staking Rewards](/colossus-concentrated-liquidity-amm/common-uses/harvest-staking-rewards)
{% endcontent-ref %}


# Swap

<figure><img src="/files/R2K0YHTGefUQ37Du3Du7" alt=""><figcaption></figcaption></figure>


# Provide Liquidity

Staging liquidity (or 1st transaction in providing double-sided liquidity):

<figure><img src="/files/aFxvoF6tjUk2W0MXyHFM" alt=""><figcaption></figcaption></figure>

Providing single-sided liquidity(or 2nd transaction in providing double-sided liquidity):

<figure><img src="/files/YmvgtARbuw2xTUHJ8lH0" alt=""><figcaption></figcaption></figure>

Provide Liquidity and immediately stake in a farm:

<figure><img src="/files/tPGahRsXuJEOXeKFJkC8" alt=""><figcaption></figcaption></figure>


# Burn Liquidity

<figure><img src="/files/OFXaBW6rr3eXToLnrGSb" alt=""><figcaption></figcaption></figure>


# Harvest Pool Fees

Harvesting pool fees consists of sending a burn of 0 liquidity

<figure><img src="/files/bgSl1GAaTVCuPzZqPIEC" alt=""><figcaption></figcaption></figure>


# Stake position

<figure><img src="/files/aK0UVi4u6pJywvw8STzN" alt=""><figcaption></figcaption></figure>


# Unstake position

<figure><img src="/files/tpdL4n2Ce2meKa4CFEcJ" alt=""><figcaption></figcaption></figure>


# Harvest Staking Rewards

<figure><img src="/files/qphXJekq6ZXFvrGm4RiA" alt=""><figcaption></figcaption></figure>


# 🧭 Examples

{% content-ref url="/pages/QyuDROhM8P4P9NIRk8Ka" %}
[Swap SDK](/colossus-concentrated-liquidity-amm/examples/swap-sdk)
{% endcontent-ref %}


# Swap SDK

Sample code that performs a swap on the Colossus TON/USDT pool.

This example demonstrates how to execute a token swap using the Colossus SDK on the TON blockchain.\
The example swaps from **TON to USDT** using the Colossus concentrated liquidity pool.

> ✅ Make sure your `.env` file includes `MY_MNEMONIC` and `API_KEY`.

***

## TypeScript Code Example

```ts
import { TonClient, WalletContractV4, internal } from "@ton/ton";
import { mnemonicToPrivateKey } from "@ton/crypto";
import { DEX, pTON } from "@titan-tg/colossus-sdk";

import dotenv from "dotenv";
dotenv.config();

const deployConfigEnv = ".env";
let myMnemonic: string;
let apiKey: string;

if (!process.env.MY_MNEMONIC) {
  console.log(" - ERROR: No MY_MNEMONIC env variable found, please add it to env");
  process.exit(1);
} else {
  myMnemonic = process.env.MY_MNEMONIC;
}

if (!process.env.API_KEY) {
  console.log(" - ERROR: No API_KEY env variable found, please add it to env");
  process.exit(1);
} else {
  apiKey = process.env.API_KEY;
}

const KNOWN_MAINNET_TOKEN_INFOS = {
  USDT: {
    address: "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
    decimals: "6",
    symbol: "USDT",
  },
  tsTON: {
    address: "EQC98_qAmNEptUtPc7W6xdHh_ZHrBUFpw5Ft_IzNU20QAJav",
    decimals: "9",
    symbol: "tsTON",
  },
  TON: {
    address: pTON.v1.address.toString(),
    decimals: "9",
    symbol: "TON",
  },
  NOT: {
    address: "EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT",
    decimals: "9",
    symbol: "NOT",
  },
};

async function swapTonForUsdt() {
  const client = new TonClient({
    endpoint: "https://toncenter.com/api/v2/jsonRPC",
    apiKey: apiKey,
  });

  const keyPair = await mnemonicToPrivateKey(myMnemonic.split(" "));
  const wallet = WalletContractV4.create({ workchain: 0, publicKey: keyPair.publicKey });
  const contract = client.open(wallet);

  const token0 = "USDT";
  const token1 = "TON";

  const token0Address = KNOWN_MAINNET_TOKEN_INFOS[token0].address;
  const token1Address = KNOWN_MAINNET_TOKEN_INFOS[token1].address;

  const router = client.open(new DEX.v1.Router(DEX.v1.Router.mainnetAddress));
  const vault0 = client.open(await router.getVault({ token: token0Address }));
  const vault1 = client.open(await router.getVault({ token: token1Address }));

  const allPools = await fetch("https://api.titan.tg/beta/clmm/pools").then(res => res.json());
  const poolInfo = allPools.find(
    (pool: any) =>
      pool.token0.address === token0Address &&
      (token1 === "TON"
        ? pool.token1.address === "EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c"
        : pool.token1.address === token1Address),
  );
  if (!poolInfo) throw new Error("Pool not found");

  const feeParams = {
    lpFee: poolInfo.lpFeeBps,
    protocolFee: poolInfo.protocolFeeBps,
    refFee: poolInfo.refFeeBps,
  };
  const tickSize = poolInfo.tickSize;

  const poolManager = client.open(
    await router.getPoolManager({
      token0: vault0.address,
      token1: vault1.address,
      tickSize,
      feeParams,
    }),
  );
  const poolManagerData = await poolManager.getPoolManagerData();

  const pool = client.open(
    await router.getPool({
      vault0: vault0.address,
      vault1: vault1.address,
      minTick: poolManagerData.shardIndex,
      tickSize,
      feeParams,
    }),
  );

  const amountIn = 1_000n; // 0.001 USDT
  const simResult = await pool.getSwapSimulation({
    isToken0: true,
    amount: amountIn,
    isExactOut: false,
  });
  const simOut = simResult.out;
  console.log(`Simulated swap out: ${simOut}`);
  if (simResult.exitCode !== DEX.v1.Pool.exitCodes.swapOk) {
    throw new Error(
      `Could not simulate swap. Exit code: ${DEX.v1.Pool.parseExitCode(simResult.exitCode)}`,
    );
  }

  let swapTxParams;
  if (token0Address === KNOWN_MAINNET_TOKEN_INFOS.TON.address) {
    swapTxParams = await vault0.getSwapTonToJettonTxParams({
      userWalletAddress: contract.address,
      otherVaultAddress: vault1.address,
      minTick: poolManagerData.shardIndex,
      tickSize,
      feeParams,
      exactOut: false,
      queryId: 12345,
      offerAmount: amountIn,
      outAmount: simOut,
      proxyTon: new pTON.v1(),
    });
  } else {
    swapTxParams = await vault0.getSwapJettonToJettonTxParams({
      userWalletAddress: contract.address,
      otherVaultAddress: vault1.address,
      minTick: poolManagerData.shardIndex,
      tickSize,
      feeParams,
      exactOut: false,
      queryId: 12345,
      offerAmount: amountIn,
      outAmount: simOut,
      offerJettonAddress: token0Address,
    });
  }

  await contract.sendTransfer({
    seqno: await contract.getSeqno(),
    secretKey: keyPair.secretKey,
    messages: [internal(swapTxParams)],
  });
}

swapTonForUsdt()
  .then(() => console.log("Swap completed"))
  .catch(console.error);
```


# ⚙️ How to list a pool on Titan

Creating a pool on Titan is currently permissioned. Please fill out [**this form**](https://forms.gle/ijZ9xDpsAFy658P98) and the Titan team will be in touch.


# ⚡ Titan Swap API

Simple and ultra efficient swaps on TON. Get started in 30 minutes or less.

Take a look at our [Swagger documentation](https://api.titan.tg/docs/#/) to get started: <https://api.titan.tg/docs/#/>


# Bug Bounty

**Titan DEX – Bug Bounty Program (v1.0)**\
*Last updated: 19 May 2025*

***

#### 1. Program Overview

Titan DEX—built on the **TON** network—invites security researchers to help protect our smart contracts, web app, and supporting infrastructure. Severity is determined solely by the Titan Security Team, but **rewards will never be less than the amounts below**.

| Severity     | Minimum Reward (USD-equivalent) |
| ------------ | ------------------------------- |
| **Critical** | **$1 500**                      |
| **High**     | **$1 000**                      |
| **Medium**   | **$ 250**                       |

***

#### 2. What We Consider In-Scope

Below are **illustrative examples**. The Security Team reserves final classification.

| Category     | Examples of Issues Likely to Qualify\*                                                                                                                                                                                                                                                                                                                      |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Critical** | <p>• Irreversible loss of liquidity or user funds (e.g., drain-or-lock without feasible recovery)<br>• Bypass of signature / authorization checks<br>• Remote execution of arbitrary smart-contract code</p>                                                                                                                                                |
| **High**     | <p>• Bugs that <em>temporarily</em> lock or mis-route customer funds but allow full recovery by the team <br>• Incorrect fee/accounting logic that could be exploited to misallocate funds, provided recovery is possible<br>• Severe oracle or price-calculation errors that <em>could</em> lead to fund mispricing without direct, irreversible theft</p> |
| **Medium**   | <p>• Smart-contract logic errors with limited financial impact<br>• Exposure of non-critical user data (e-mail, IP)</p>                                                                                                                                                                                                                                     |

\* The lists are not exhaustive; any vulnerability with material security impact qualifies.

***

#### 3. Out-of-Scope / No-Reward Examples

* Informational or best-practice issues&#x20;
* Denial-of-Service solely via gas-limit exhaustion or transaction spam
* Issues already public or previously reported
* Social-engineering, phishing, or physical attacks on Titan staff or users

***

#### 4. Responsible Disclosure

1. **Send reports exclusively to <Legal@titan.tg>**.
2. Include a clear step-by-step proof-of-concept.
3. Do **not** publish the vulnerability until Titan confirms remediation.
4. Avoid privacy violations, data destruction, and service degradation during testing.

***

#### 5. Reward Determination & Payment

* Rewards are paid in USDT or another mutually agreed asset on TON.
* Exceptional findings may receive higher payouts.
* First valid report of a given issue receives the reward (duplicates ineligible).
* Reporters must comply with all applicable laws and sanctions.

***

#### 6. Legal Notes

* Participation does not create any employment or agency relationship.
* Titan’s decisions on severity, eligibility, and reward size are final.
* By submitting, you grant Titan the right to use your report to improve security.

***

**Thank you for helping secure Titan DEX.**\
Questions? Reach us at **<Legal@titan.tg>**.


# 🔍 FAQs

Drop us a message to learn more.

**I'm a Dev that wants to integrate Titan, but I'm not building a game can I still use Titan?**

* Yes! Titan is a general purpose swap router that can be used by any app that wants to integrate token swaps on TON. You can use [Titan's Swagger Docs](https://api.titan.tg/docs/#/) to get started today.

**I received a different token than what I expected. What should I do?**

* TON utilizes asynchronous execution. This makes it scalable, fast, and efficient — but it also means on occasion you will receive a token from a pool that the trade is being routed through. Do another swap with the token you received to the desired output token. Also, let us know so we can improve our routing and experience for all users at  [@TitanTrading](https://t.me/TitanTrading).


# Добро пожаловать в Titan

Titan — это самый мощный DeFi-стек на TON 💎

Titan стремится предоставить первоклассный опыт работы с DeFi для проектов TON, Telegram и обычных юзеров. Мы делаем всё, чтобы процесс ончейн торговли и заработка был максимально простым и удобным.

DeFi - децентрализованные финансы. Это новый мир финансов, построенный на  блокчейне, чтобы обеспечить наиболее выгодную и безопасную глобальную торговлю различными активами, без ограничений.&#x20;

Продукты Titan:

* **Swaps**: Моментально обменивайте любые токены на TON по лучшими ценами и без комиссий.

Начните в деск топ версии через [titan.tg](https://titan.tg) или в Telegram через @TitanTradeBot.

* **Swap API**: Самый быстрый, выгодный и надёжный способ интеграции функции свапов в любую платформу.
  * Найдите желаемую пару, укажите сумму и уровень проскальзывания, и API предоставит вам готовый ордер для обмена. Обо всём остальном позаботится Titan!!
* **Концентрированная ликвидность (в стадии тестирования):** Уже скоро 😉

Следите за обновлениями в @TitanAggregator. Если у вас есть вопрос или вам нужна помощь, просто напишите нам на @TitanTrading.

<br>


# 💡Зачем использовать Titan swaps?

Titan — лучшая платформа для торговли в сети TON 📈

Мы предлагаем:

* **Лучший выбор токенов**: Торгуйте любыми токенами на всех децентрализованных биржах TON через один интерфейс.
* **Лучшие цены**: Получайте самые выгодные курсы благодаря маршрутизации через несколько шагов для нахождения оптимального обменного курса.
* **Никаких комиссий**: Никогда не платите комиссию за свапы. Titan не добавляет никаких сборов поверх DEX и пулов, через которые совершает сделки.
* **Простота и удобство**: Используйте мощь Titan через простой интерфейс, доступный как на мобильных устройствах, так и в десктоп версии.

Начните торговлю на titan.tg  или в Telegram через @TitanTradeBot.

<br>


# Как я могу использовать Титан?

**Для трейдеров:**

Если вы трейдер в экосистеме TON, Titan — это самое доступное, простое и быстрое место для обмена токенов. Благодаря DEX-агрегатору Titan — Optimus — каждый токен в сети TON доступен с комиссией 0%. Продвинутые алгоритмы маршрутизации работают в фоновом режиме, предотвращая взаимодействие с мошенническими токенами или “скамом”, обеспечивая безопасную торговую среду.

Telegram MiniApp Titan специально создан для трейдеров, упрощая поиск новых токенов и позволяя выполнять свапы по лучшим ценам прямо в Телеграм. Эта простота в сочетании с высочайшим качеством делает Titan выбором настоящих профессионалов.

В двух словах, Optimus обеспечивает самые дешевые, быстрые и безопасные свапы на TON для трейдеров.

**Для разработчиков:**

Разработчики могут интегрировать [Swap API Titan](/titan-ru/titan-swap-api) всего за 30 минут, позволяя пользователям выполнять свапы токенов прямо в их Telegram MiniApps или других платформах. Titan берёт на себя вопросы безопасности и сложности RPC, освобождая разработчиков для создания нового UX вместо работы с инфраструктурой DeFi.

\
\
**Для поставщиков ликвидности:**

Поставщики ликвидности и опытные пользователи DeFi могут значительно увеличить свои доходы благодаря концентрированным пулам ликвидности Titan, достигая до 1000x большей эффективности капитала по сравнению с традиционными моделями DEX. Настраивая диапазоны ликвидности, LP получают доступ к продвинутым стратегиям доходности, что позволяет точнее управлять рисками и улучшать отдачу от размещенного капитала.

<br>

**Для проектов, запускающих токены:**

Команды, выпускающие токены на TON, могут использовать Concentrated Liquidity DEX Titan для создания мощной ончейн-ликвидности для своих токенов. Концентрированная ликвидность значительно повышает эффективность капитала, позволяя достичь больших объёмов торговли при меньших затратах.

Кроме того, полностью ончейн-контракты для фарминга от Titan упрощают выпуск вознаграждений, стимулирующих добавление ликвидности в пулы проекта. Это позволяет поддерживать тот же уровень торговой активности при меньших затратах на стимулы, давая проектам возможность оптимизировать свои стратегии ликвидности и сосредоточиться на своём основном продукте, создавая при этом благоприятную среду для торговли их токеном.


# 🛠️ Продукты

Строительство будущего TON DeFi

Titan предлагает три ключевых продукта, которые обеспечивают совершенно новый DeFi-опыт в экосистеме TON:

* Optimus — агрегатор, предоставляющий пользователям лучшие цены и быстрое исполнение ордеров при торговле токенами.
* Cronos — простой в использовании API от Titan, который позволяет добавить функцию торговли токенами на любую платформу всего за 30 минут.

Colossus — концентрированная ликвидность (CLMM) от Titan. Это первый нативный CLMM для TON, который позволяет провайдерам ликвидности (LP) зарабатывать значительно больше, чем у текущих конкурентов, благодаря “1000-кратному увеличению эффективности использования капитала”.


# Руководство по Titan

Ниже вы найдете пошаговые инструкции по использованию DEX Titan CLMM. Остались вопросы? Загляните в [FAQ](/titan-ru/faqs) или напишите нам в Telegram: [t.me/TitanTradingChat](https://t.me/TitanTradingChat).

<br>

{% content-ref url="/pages/4BYeEmDkI33VpgBqb797" %}
[Obmen](/titan-ru/rukovodstvo-po-titan/obmen)
{% endcontent-ref %}

{% content-ref url="/pages/4morg527NIA5NeAiLim1" %}
[Внесение ликвидности](/titan-ru/rukovodstvo-po-titan/vnesenie-likvidnosti)
{% endcontent-ref %}

{% content-ref url="/pages/KmU5mm9bz2TSvwxNHMOC" %}
[Вывод ликвидности](/titan-ru/rukovodstvo-po-titan/vyvod-likvidnosti)
{% endcontent-ref %}

{% content-ref url="/pages/NKQryon3ooHhmned2w94" %}
[Стейкинг и анстейкинг для получения наград](/titan-ru/rukovodstvo-po-titan/steiking-i-ansteiking-dlya-polucheniya-nagrad)
{% endcontent-ref %}


# Obmen

Обмен с Titan — это просто и эффективно. Обмены не имеют дополнительных комиссий (0%) и объединяются через пулы DeDust, StonFi и Titan, чтобы предоставить пользователям наилучший возможный курс.

* Чтобы произвести обмен, зайдите на главную страницу Titan и подключите свой кошелёк. Выберите нужную пару токенов, используя кнопки выбора токенов справа в окне, и введите, сколько первого токена вы хотите продать.

<figure><img src="/files/aWMHUl88Kr8Z3KlxS8s6" alt=""><figcaption></figcaption></figure>

* После ввода суммы первого токена будет показан лучший доступный курс обмена на всех биржах. Вы можете нажать на стрелочку под курсом, чтобы увидеть дополнительную информацию об обмене, такую как влияние на цену, выбранный вами допуск к проскальзыванию, минимальное количество токенов, которое вы получите, комиссия сети и маршрут (DEX или несколько DEX-ов), через которые будет проходить обмен.
* Чтобы изменить проскальзывание (насколько сильно вы готовы отклониться от текущей цены), нажмите на кнопку настроек в верхней части окна обмена и выберите один из предустановленных вариантов или введите свой собственный процент.

<figure><img src="/files/zEDI36pSeEzHFmBf8utL" alt=""><figcaption></figcaption></figure>

* После того как вы подтвердите выбранные токены, их количество и настройки проскальзывания, нажмите Submit Swap и подпишите транзакцию, чтобы воспользоваться самыми выгодными курсами обмена в сети TON!


# Внесение ликвидности

Перейдите на страницу [Titan Pools](https://www.factory.titan.tg/pools), чтобы увидеть все доступные пулы, и подключите свой кошелёк.

<figure><img src="/files/4lV7Wi7z7USds6Uekihh" alt=""><figcaption></figcaption></figure>

Выберите пул, в который хотите внести ликвидность, кликнув по соответствующей строке.

В боковой панели, которая откроется, выберите один из режимов:

* Full Range (полный диапазон) — размещение ликвидности равномерно по всей ценовой кривой<br>
* Custom Range (пользовательский диапазон) — концентрированная ликвидность в выбранном диапазоне цен<br>

#### Вариант с Full Range

Аналогично Uniswap V2: введите сумму TON или USDT, которую хотите внести. Вторая часть пары заполнится автоматически в эквивалентном объёме. Нажмите «Deposit» и подпишите транзакцию, чтобы начать зарабатывать.

<figure><img src="/files/6W8qYbT1570ff6CLq2W4" alt=""><figcaption></figcaption></figure>

***

#### Вариант с Custom Range

Позволяет выбрать конкретный ценовой диапазон для размещения ликвидности.\
Например, можно внести ликвидность в пределах ±10% от текущей цены пула.\
Используйте готовые шаблоны, настройку графика или вручную укажите минимальную и максимальную цену.\
В примере показано внесение ликвидности в диапазоне от 2.75 TON/USDT до 3.33 TON/USDT, чтобы получить выгоду от относительно стабильного курса.

<figure><img src="/files/gHbuuDPkCeGUJ8HCfyJh" alt=""><figcaption></figcaption></figure>

Выберите желаемый диапазон, укажите сумму одного из активов пары — второй актив подставится автоматически. В отличие от полного диапазона, здесь значения могут быть неравномерными или односторонними, что открывает возможности для стратегий вроде DCA.

После настройки нажмите «Deposit» и подпишите транзакцию — и вы начнёте зарабатывать на своей ликвидности.


# Вывод ликвидности

1\. Перейдите на страницу [Titan Portfolio](https://www.factory.titan.tg/portfolio) и подключите кошелёк, чтобы просмотреть все свои депозиты на платформе Titan.

<figure><img src="/files/s4Ho2Aby7g9IZMUFx6Ud" alt=""><figcaption></figcaption></figure>

2\. Выберите позицию, из которой хотите вывести средства, — откроется боковая панель с деталями ликвидности.\
Там будет отображён ваш текущий диапазон ликвидности, предполагаемая доходность, баланс и доступные к получению комиссии.\
Нажмите «Claim Fees» и подтвердите транзакцию, чтобы перевести накопленные комиссии с пула на ваш кошелёк.

<img src="/files/6qgFNVqm0tnA8v8YJG3D" alt="" data-size="original"><img src="/files/cuYXJHHHDwfCGjC6dKmF" alt="" data-size="original">

3\. Перейдите во вкладку Withdraw и с помощью ползунка выберите процент ликвидности, который хотите вывести.&#x20;

После этого нажмите «Remove Liquidity» и подпишите транзакцию для завершения операции.

Обратите внимание: при выводе ликвидности все накопленные комиссии будут автоматически переведены на ваш кошелёк.\
Также, если ваша позиция находится в стейкинге, перед выводом необходимо сначала её разстейкать.

<figure><img src="/files/cGEuHWM6TeJ3Khx44eIt" alt=""><figcaption></figcaption></figure>


# Стейкинг и анстейкинг для получения наград

**Стейкинг:**

1. Некоторые пулы могут предоставлять дополнительные награды для увеличения доходности. В целях максимальной прозрачности и безопасности весь фарминг на Titan осуществляется ончейн. Чтобы узнать, какие пулы предлагают награды, перейдите на страницу [Titan Portfolio](https://www.factory.titan.tg/portfolio) и посмотрите столбец Rewards. В этом столбце отображаются награды за каждый пул за последние 24 часа. Дополнительную информацию о том, насколько этот уровень наград увеличивает годовую доходность (APR), можно получить, наведя курсор на цветной кружок в столбце Estimated Yield.

   <figure><img src="/files/eSNHruSvCQPtPVL9BS0g" alt=""><figcaption></figcaption></figure>
2. После того как вы внесли средства в пул с активными наградами, перейдите на страницу Titan Portfolio, выберите свою позицию, нажмите вкладку Stake в верхней части боковой панели депозита и подпишите транзакцию для начала стейкинга. Во вкладке Stake вы можете увидеть длительность периода стейкинга, прогресс распределения наград, предполагаемую годовую доходность (APR) вашей позиции, а также объём ежедневных наград, распределяемых на весь пул.\
   Примечание — если по вашей позиции доступны награды, вы увидите цветной кружок в столбце Estimated Yield.

   <figure><img src="/files/tB3fNYQtBJiKbfNJvhMP" alt=""><figcaption></figcaption></figure>

***

**Получение наград:**

1. Как только ваша позиция будет застейкана, вы сразу начнёте получать награды. Чтобы их получить, перейдите на страницу Titan Portfolio, выберите свою позицию, нажмите вкладку Stake, затем кнопку Claim Rewards и подпишите транзакцию. Вы можете получать награды так часто или так редко, как хотите. Ваши награды будут оставаться в сети до момента их получения.

![](/files/oDigDd3KsuV3jDpDQWrk)

***

**Вывод из стейкинга**

Вывод позиции из стейкинга так же прост, как и сам стейкинг. Перейдите на страницу Titan Portfolio, выберите свою позицию, нажмите вкладку Stake, затем кнопку Unstake и подпишите транзакцию для удаления позиции из стейкинга.\
Имейте в виду, что частичный анстейкинг невозможен, и перед выводом ликвидности необходимо сначала вывести позицию из стейкинга.


# ⚡ Titan Swap API

Простые и сверхэффективные свапы в сети TON. Начните всего за 30 минут.

{% openapi src="/files/yo74DRpNYXeaa4iRwCAx" path="/v1/swap-messages" method="post" %}
[openapi.json](https://content.gitbook.com/content/XLXAVSrxft2boihndlMT/blobs/R1baLJKJ6FcsHLgzPSzo/openapi.json)
{% endopenapi %}

{% openapi src="/files/yo74DRpNYXeaa4iRwCAx" path="/v1/quote" method="get" %}
[openapi.json](https://content.gitbook.com/content/XLXAVSrxft2boihndlMT/blobs/R1baLJKJ6FcsHLgzPSzo/openapi.json)
{% endopenapi %}

{% openapi src="/files/yo74DRpNYXeaa4iRwCAx" path="/v1/tokens" method="get" %}
[openapi.json](https://content.gitbook.com/content/XLXAVSrxft2boihndlMT/blobs/R1baLJKJ6FcsHLgzPSzo/openapi.json)
{% endopenapi %}

{% openapi src="/files/yo74DRpNYXeaa4iRwCAx" path="/v1/dexs" method="get" %}
[openapi.json](https://content.gitbook.com/content/XLXAVSrxft2boihndlMT/blobs/R1baLJKJ6FcsHLgzPSzo/openapi.json)
{% endopenapi %}

{% openapi src="/files/yo74DRpNYXeaa4iRwCAx" path="/v1/price" method="get" %}
[openapi.json](https://content.gitbook.com/content/XLXAVSrxft2boihndlMT/blobs/R1baLJKJ6FcsHLgzPSzo/openapi.json)
{% endopenapi %}

{% openapi src="/files/yo74DRpNYXeaa4iRwCAx" path="/v1/user/{address}/swaps" method="get" %}
[openapi.json](https://content.gitbook.com/content/XLXAVSrxft2boihndlMT/blobs/R1baLJKJ6FcsHLgzPSzo/openapi.json)
{% endopenapi %}

{% openapi src="/files/yo74DRpNYXeaa4iRwCAx" path="/v1/transaction/{txHash}/quote" method="get" %}
[openapi.json](https://content.gitbook.com/content/XLXAVSrxft2boihndlMT/blobs/R1baLJKJ6FcsHLgzPSzo/openapi.json)
{% endopenapi %}


# Bug Bounty

Titan DEX – Программа поощрения за обнаружение уязвимостей (v1.0)&#x20;

***

#### 1. Общая информация о программе

Titan DEX, построенный на сети TON, приглашает исследователей в области безопасности принять участие в обеспечении защиты наших смарт-контрактов, веб-приложения и инфраструктуры. Степень критичности определяется исключительно командой безопасности Titan, однако вознаграждение никогда не будет ниже указанных минимальных сумм.

| Уровень критичности | Минимальное вознаграждение (в эквиваленте USD) |
| ------------------- | ---------------------------------------------- |
| Критическая         | $1 500                                         |
| Высокая             | $1 000                                         |
| Средняя             | $250                                           |

***

2\. Что считается в рамках программы (In-Scope)

Примеры приведены для иллюстрации. Окончательную классификацию определяет команда безопасности.

| Критическая                          |                                                                    <p>• Безвозвратная потеря ликвидности или пользовательских средств (например, вывод/блокировка без возможности восстановления)<br>• Обход проверки подписи или авторизации<br>• Удаленное выполнение произвольного кода смарт-контрактов</p>                                                                    |      |
| ------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | ---- |
| <p>               Высокая</p><p></p> | <p>• Ошибки, временно блокирующие или перенаправляющие средства пользователей, но с возможностью полного восстановления<br>• Ошибки в логике комиссий/учета, позволяющие перераспределение средств, при условии, что восстановление возможно<br>• Серьёзные ошибки в оракулах или расчёте цены, приводящие к неправильной оценке активов без прямого и безвозвратного хищения </p> |      |
| Средняя                              |                                                                                                               <p>• Ошибки логики смарт-контрактов с ограниченным финансовым воздействием<br>• Утечка некритичных пользовательских данных (например, email, IP-адрес)                                                                                                               | </p> |

⚠️ Списки не являются исчерпывающими. Любая уязвимость, оказывающая существенное влияние на безопасность, может быть принята.

***

3\. Что вне рамок программы (Out-of-Scope)

Следующие типы отчетов не подлежат вознаграждению:

* Информационные сообщения или рекомендации по лучшим практикам
* Атаки отказа в обслуживании (DoS), основанные исключительно на исчерпании gas или спаме транзакциями
* Проблемы, уже опубликованные или ранее сообщенные
* Социальная инженерия, фишинг или физические атаки на сотрудников или пользователей Titan

***

4\. Ответственное раскрытие

* Отправляйте отчёты исключительно на адрес: <Legal@titan.tg>
* Включайте понятное пошаговое доказательство концепции (PoC)
* Не публикуйте уязвимость, пока Titan не подтвердит устранение
* При тестировании не нарушайте конфиденциальность, не уничтожайте данные и не ухудшайте работу сервисов

***

5\. Оценка и выплата награды

* Вознаграждение выплачивается в USDT или другом согласованном активе на сети TON
* Исключительные находки могут получить повышенное вознаграждение
* Только первый валидный отчёт по конкретной уязвимости получает награду (дубликаты не рассматриваются)
* Репортер должен соблюдать все применимые законы и санкции

***

6\. Юридическая информация

* Участие в программе не создаёт трудовых или агентских отношений
* Все решения Titan о критичности, допустимости и размере награды являются окончательными
* Отправляя отчёт, вы предоставляете Titan право использовать его для улучшения безопасности

***

Благодарим вас за помощь в обеспечении безопасности Titan DEX.\
Вопросы? Свяжитесь с нами по адресу: <Legal@titan.tg>


# 🔍 FAQs

Если у вас есть дополнительные вопросы, напишите нам, мы с удовольствием вам ответим.

**Я разработчик, хочу интегрировать Titan, но я не создаю игру. Могу ли я всё равно использовать Titan?**\
\
Да! Titan — это универсальный роутер для свапов, который может быть использован любым приложением, желающим интегрировать обмен токенов в экосистеме TON. Используйте Swagger Docs от Titan, чтобы начать уже сегодня.

***

**Я получил другой токен, а не тот, который ожидал. Что мне делать?**\
\
TON использует асинхронное выполнение транзакций. Это делает сеть масштабируемой, быстрой и эффективной, но иногда вы можете получить токен из пула, через который проходит обмен. Просто сделайте ещё один свап с полученным токеном, чтобы обменять его на нужный актив. Также сообщите нам об этом через @TitanTrading, чтобы мы могли улучшить маршрутизацию и общий пользовательский опыт.

<br>


