> For the complete documentation index, see [llms.txt](https://docs-thedexer.gitbook.io/dexer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-thedexer.gitbook.io/dexer/m3-bottom-liner-module.md).

# M3 - Bottom Liner Module

For Token Managers to actively manage the price of any tokens in the DeFi protocols.

**Module Overview** \
\
The Bottom Liner module is a contract designed to enable users to set moving limit trades with the goal of increasing the "bottom line" of a project's token chart. utilizing a programmatic approach, this contract calculates the number of tokens to buy at each price level, effectively managing price swings in a given Pair/Pool.

**Use Cases**

* By buying any token at specific price levels, token owners can stabilize the price and reduce volatility, thereby improving technical analysis metrics.
* If tokenomics dictate the need for buybacks (and/or token burning), executing them within a preset price range enhances the chart metrics and aligns with predefined strategies.
* Ensuring that the price does not drop below a certain level. This helps establish a price floor and adds confidence for investors.
* Reduce the perceived risk associated with the asset, making it more appealing to potential investors.

**Parameters and Inputs**

1. Target Increase: determines the desired percentage increase in price during each TradingInterval.&#x20;
2. Price Reference: The module considers the variation of the token's price against a specific reference, such as USDT/ETH.&#x20;
3. TradingInterval: specifies the frequency at which trading actions are performed.
4. QueryInterval: Sets the frequency at which price queries are triggered.
5. MinPriceImpact: Defines the minimum acceptable price Impact the strategy can make per iteration (swap). Any amount below this threshold will not trigger a price adjustment.
6. MaxPriceImpact: Specifies the maximum acceptable price impact per iteration (swap).
7. Gas Limit: Sets the maximum gas limit allocated for executing the strategy.

**Performance of metrics**&#x20;

1. Price Stability: calculating the standard deviation of its price over a specific period.&#x20;
2. Trend Building: measures the duration of positive trends created by the module in the token's price chart. It calculates the percentage of time during which the token's price shows an upward trend.&#x20;
3. Price Floor Establishment: calculates the percentage of time during which the token's price remains above the predefined price floor.&#x20;
4. Technical Analysis Metrics Improvement: measures the accuracy of technical analysis indicators or patterns when applied to the token's price chart before and after implementing the Bottom Liner module.&#x20;
5. Calculates the percentage of successful buybacks or token burnings that align with the predefined criteria. A higher success rate indicates better performance in executing these strategies.
6. Gas Efficiency:  compares the actual gas consumed to the allocated gas limit. A higher gas utilization efficiency indicates better optimization of gas usage.
7. Comparative Analysis:  assigns a performance score relative to the average or best-performing competitor. A higher performance score indicates better performance compared to competitors.
