# Titan Farms

A decentralized yield farm for TitanX ecosystem tokens.

The Titan Farms protocol is a DeFi farming system built on top of Uniswap V3.&#x20;

Titan Farms allows users to provide full-range liquidity to Uniswap V3 pools and earn rewards in the form of TINC (TitanX Incentive Token) and collected fees. The protocol implements a unique buy-and-burn mechanism to support the token economics of the TINC token.

Key Features:

* **Uniswap V3 Compatibility**: Manages liquidity positions in Uniswap V3 pools.
* **Flexible Reward System**: Distributes TINC tokens as rewards based on users' liquidity provision.
* **Fee Collection**: Collects and distributes fees from Uniswap V3 positions to LP providers.
* **Buy-and-Burn Mechanism**: Automatically sends collected fees to a buy-and-burn contract to support TINC token economics.
* **Protocol Fee**: Allows for collection of protocol fees on each farm.
* **Time-Weighted Average Price (TWAP)**: Uses TWAP for price calculations to prevent manipulation.
* **Slippage Protection**: Implements slippage protection for all liquidity operations

<br>


# How It Works

An overview of the Titan Farms functionality.

Users can deposit a selection of TitanX ecosystem tokens into the Titan Farms LP management contracts based on enabled LP pools.&#x20;

Titan Farms utilizes a single LP position for gas efficiency. Users submit their tokens to this single LP position and the contract manages that position.  Users receive rewards based on the users share of the shared position.

TINC tokens are minted and distributed as rewards based on users' liquidity share and time. &#x20;

Input token Fees collected from Uniswap V3 positions are sent to the buy-and-burn contract. Fees for non input tokens are distributed to users.\
\
See the "Titan Farms Input Tokens" for more on how input tokens work.&#x20;

Users can withdraw their liquidity and claim rewards at any time.


# TitanX Incentive Token (TINC)

TINC tokens are minted and distributed as rewards based on users' liquidity share and time.

For providing liquidity to the platform, users are compensated with the TitanX Incentive Token (TINC)\
\
TINC is issued to LPs at a fixed rate of 1 TINC per second. This TINC is distributed to liquidity providers. The longer you keep providing liquidity and the bigger your share, the more TINC you can make. \
\
The TINC balance that is attributable to the user changes dynamically based on the liquidity the user has in that pool. \
\
The TINC issuance rate cannot be changed, there are no admin keys to alter the TINC emissions.\
\
Different liquidity provider pools can be gauged by genesis, allowing for different APY for each pool. This does not change TINC issuance, it merely directs it. <br>


# Titan Farms Input Tokens

Input tokens are tokens whose fees are harvested to buy and burn TINC, and to provide fees for genesis.

\
Genesis can enable new input tokens, any token can be an input token.  \
\
Trading fees generated by input tokens are not distributed to users but sent to the buy and burn contract to burn TINC. \
\
The following tokens are input tokens on launch:\
ETH\
TITANX\
DRAGONX\
HYDRA \
HYPER\
\
Protocol Fees. \
\
Protocol fees are deducted from input tokens before they are sent to the buy and burn contract.&#x20;

Protocol fees are adjustable up to 25% percent and will be used to support future TitanX Development depending on trading volume in a pair, the protocol fee might be adjusted.&#x20;


# TINC Buy and Burn

Buy and Burn The Universal Buy And Burn allows to:

* Burn all input tokens
* Burn a percentage of input tokens and use the remainder to buy and burn TINC (e.g. 20% direct burn, 80% buy and burn)
* Use all the input tokens to buy and burn TINC

Cap per swap, time interval. Settings will be adjusted to market conditions and tokenomics.\
\
It is important to note, Genesis can direct the input tokens to buy through a specific pair.&#x20;


# Trading Fees

Users still get trading fees.

Trading fees for non-input tokens will be distributed to farmers according to the amount of liquidity they provide.\
\
This further strengthens the value proposition of the platform.&#x20;


# Farms Smart Contracts

An overview of the major smart contracts for Titan Farms

#### Smart Contracts:

1. **FarmKeeper.sol**: The main contract managing farms and user interactions.
2. **TINC.sol**: The TitanX Incentive Token contract.
3. **UniversalBuyAndBurn.sol**: Implements the buy-and-burn mechanism.
4. **Farms.sol**: Library for managing farm data structures.
5. **InputTokens.sol**: Library for managing input token data structure


