> For the complete documentation index, see [llms.txt](https://docs.pinto.money/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pinto.money/pinto-mechanics/silo-the-perfect-complement-to-credit/auto-convert-forced-conversions-when-incentives-fail.md). Agents can also search and read this documentation through its [MCP server](https://docs.pinto.money/~gitbook/mcp).

# Auto Convert: Forced Conversions When Incentives Fail

[Converts Up](https://docs.pinto.money/pinto-mechanics/silo-the-perfect-complement-to-credit/converts-changing-price-from-within#lp-pinto-convert-i.e.-convert-up) turn Deposited LP tokens into Deposited Pinto by removing Pinto from the underlying Well. This raises the price of Pinto in that Well.

In both Pinto and Beanstalk’s history, there have been periods of time where the protocols were unable to incentivize sufficient Converts Up in order to return the price to its value target. Auto Convert allows the protocol to Convert Up on behalf of Depositors in such instances.

## Why Auto Convert?

Historically, with the exception of [the Flood](https://docs.pinto.money/pinto-mechanics/silo-the-perfect-complement-to-credit/the-flood-biblical-returns-to-prevent-pump-and-dumps), Beanstalk and Pinto were designed to never perform open market operations. Instead, the protocols both created incentives to encourage the desired behavior from Farmers that the protocol desired given it’s current state.

Over time, the protocol has added layers of incentives for Converts, including the Seed Gauge System, the dynamic Crop Ratio, and the Dynamic Convert Bonus and Penalty System. At this point, there is limited room for improvement using Stalk and Seeds alone.

However, despite the Convert System being pushed to its limits within the “incentive only” design paradigm, there have been many instances where the protocol was unable to incentivize the Convert Ups that it needed (and was maximally incentivizing) to return the Pinto price to its value target.

Therefore, in the absence of other purely incentive based mechanisms to facilitate Convert Ups, Auto Convert performs Convert Ups on behalf of Depositors.

## What is Auto Convert?

During an Auto Convert Cycle, the protocol attempts to Convert eligible LP Deposits into Pinto Deposits at each Sunrise until ordinary Sunrise supply minting resumes. The resulting Pinto stays Deposited with the same owner and retains the Grown Stalk from the converted LP. Eligible LP Deposits participate automatically. There is no opt-out.

## When to Auto Convert?

The protocol does not want to start an Auto Convert Cycle until there has been a general cessation of outflows from the protocol.

The protocol measures recent inflows and outflows through the Chill Factor, which serves as a counter of Seasons above or below a certain amount of value known as the Chill Factor Counter Limit. Any Season in which the average net outflows from the protocol over a rolling window that covers at least the past 24 hours exceed the Chill Factor Counter Limit, the Chill Factor decreases by one. Any Season in which the net outflows from the protocol do not, the Chill Factor increases by one.

Auto Convert only begins after the Chill Factor exceeds a certain threshold known as the Chill Factor Thershold. The Chill Factor Threshold is a function of the current state of the protocol (*i.e.*, the Price, Debt Level, Liquidity Level and Demand for Soil).

Different Chill Factor Thresholds allow the protocol to adapt activation to its current state. Lower liquidity relative to supply calls for a longer wait and a slower recovery, conserving scarce liquidity. Higher debt relative to supply calls for earlier support to limit further debt growth.

## How Much to Auto Convert?

In order to determine how much to Auto Convert in a given Season, the protocol chooses over how many Seasons it would return to its value target assuming no inflows, outflows or Converts, and then works backwards to determine how much it would need to Convert each Season as a percentage of the current price in order to do so.

Similar to the Chill Factor Thresholds, the Time to Peg is a function of the current state of the protocol. The Time to Peg is determined at the beginning of an Auto Convert Cycle, and stays fixed throughout the Cycle unless it is reset (see below).

The lower the Liquidity Level of the protocol, the higher the Time to Peg in order to preserve liquidity by Converting more slowly.

## Pauses and Resets

In order to minimize instances where the protocol is Auto Converting into large outflows, the protocol performs two separate checks to detect large outflows and pause and/or reset the auto convert cycle accordingly.

The protocol stores a reference price when the Auto Convert Cycle begins. If the measured price falls at least 5% below that reference under the proposed settings, the protocol immediately records a new reference price and recalculates the amount to Convert each Season. Conversion pauses until the 24th subsequent Sunrise. Another qualifying drop restarts the pause.

Independently, Auto Convert pauses if average hourly net trading outflow over the same rolling 24 hour window exceeds three times the Chill Factor Counter Limit. This pause clears when a valid reading is back at or below that threshold.

## Auto Convert Manipulation Resistance

Because the protocol is open source and deterministic in nature, its performance of open market operations via Auto Convert are highly prone to manipulation in two distinct forms: extracting value from conversions and deliberately preventing them.

### **Making Extraction Difficult and Risky**

The following rules are in place to make extraction difficult and risky.

* **Each price move is bounded by the minimum Well fee.** The maximum permitted step (in terms of % price movement per Auto Convert) cannot exceed the minimum required Well fee. Both initially equal 0.25%. This eliminates the potential to profit from sandwiching the Auto Convert. Note, in order to facilitate sandwich manipulation resistance without compromising the utility of the currency for normal users, Deposits with more than \~24 Seasons worth of Seeds are exempt from the fee.
* **Temporary liquidity cannot expand the conversion allowance.** The amount Converted during a Sunrise uses the Multi Flow Pump EMA, so briefly adding liquidity does not immediately create a much larger conversion. In order to facilitate a larger Convert, there must be real value left at risk over multiple blocks.

The following rules are in place to make deliberately preventing Auto Converts harder.

* **Small or ineligible Deposits are skipped.** In order to prevent a Depositor from splitting their Deposit into many small Deposits and thereby exhausting the gas available to a Sunrise before in can Convert a sufficient number of Pinto to achieve its desired price movement, the protocol skips small Deposits.
* **Efficient scanning for eligible Deposits.** The system uses an extremely gas efficient indexing structure to keep track of which Deposits are eligible for Auto Convert. Each Well’s threshold stays fixed for a complete pass through all Deposits, allowing the scan to check every Deposit.
* **Anyone can help advance the scan.** Separate index maintenance functions allow anyone to prepare eligible Deposits.
* **A Sunrise caller cannot deliberately starve Auto Convert of its required gas while still completing Sunrise.** Supplying too little gas for the required work reverts Sunrise. If ordinary Sunrise work leaves too little room for a Convert, or a fully funded Convert fails, Sunrise can still complete.

## The Game Theory of Auto Convert

In the context of Auto Convert, the goal of the protocol is to get everyone who wants to exit the protocol below the value target to do so at the cheapest price they are willing to do so. It facilitates this though continuously raising the price until someone leaves the protocol. At whatever price that is, other participants will be forced to decide whether to wait for that seller to entirely deplete their supply, or to sell at a lower price. This system closely models a reverse Vickrey auction, in which everyone leaves at just lower than the next lowest bidder’s price. Thus, the protocol is able to return the Pinto price to its value target for the least amount of liquidity.

## In Summary

Auto Convert allows the protocol to take open market operations to Convert Up on behalf of Depositors when there has been less than a certain limit of outflows over an extended period of time.

*For precise eligibility, parameter defaults, and execution rules, see the* [*Auto Convert implementation specification*](https://github.com/pinto-org/protocol-audit/blob/edc298cb69b9f3302060e09d93a7f21b7d55d6db/docs/AUTO_CONVERT_IMPLEMENTED_SPEC.md)*.*
