PI-13: Dynamic Convert Up Bonus + Optimizations

Executed on October 23, 2025 at 01:13 UTC.

Summary

  1. Dynamic Convert Up Bonus: Implement a Dynamic Convert Up Bonus with a dynamic Convert Up Bonus per PDV Converted and a dynamic Convert Up Bonus Capacity. Add signed Grown Stalk slippage controls to Converts.
  1. Seed Gauge Points: Normalize the Seed Gauge Points every Season.
  1. Morning Auction: Change the Temperature every block during the Morning Auction.
  1. Soil Demand: Update the minimum Sown Pinto threshold to measure demand for Soil to be a function of the initial Soil issued.
  1. Till Scalar: Update the Till Scalar to dynamically adjust as a function of Pod Rate.
  1. Rain and Flood: Update the condition for the system to start Raining/Flooding to include the L2SR.
  1. Tractor Signatures: Upgrade Tractor to support smart contracts.
  1. Deposit Approvals: Fix checks for ERC1155 global approvals for Silo Deposits.
  1. Convert Penalty: Update the Generalized Convert Penalty such that it properly penalizes Converts that are negative to peg maintenance.
  1. Well Valuation: Normalize Well liquidity units and guard price calculations for very small pools.
  1. Deposit PDV Return: Correct the PDV returned by Deposits.

Links

Problems

1. Dynamic Convert Up Bonus

Despite the 200% Crop Ratio, there was an insufficient incentive to Convert up, leading the protocol to spend excessive time below its value target.

2. Seed Gauge Points

The effect of the changes in Gauge Points from Season to Season fluctuated with the total number of Gauge Points. This decreased the accuracy with which Pinto can adjust the Seeds between Whitelisted Deposited LP tokens.

3. Morning Auction

The Temperature during the Morning Auction did not increase continuously throughout the Auction, leading to more Pod issuance than needed.

4. Soil Demand

A static threshold (25 Soil) to measure demand for Soil made Pinto less resilient to Soil Demand manipulation at larger supply.

5. Till Scalar

Soil issued above the value target abruptly increased/decreased when the Pod Rate was close to the Pod Rate thresholds.

6. Rain and Flood

It may be less healthy for it to Flood at lower L2SRs than at higher L2SRs.

7. Tractor Signatures

Smart contracts were unable to utilize Tractor.

8. Deposit Approvals

Silo Deposits did not properly adhere to the ERC1155 token standard.

9. Convert Penalty

The implementation of the Pipeline Convert Penalty was mistakenly over-penalizing certain Converts.

10. Well Valuation

The time-weighted Well liquidity getter returned values in the non-Pinto token’s native decimal precision. The shared Well price calculation also lacked a minimum Pinto-reserve guard, thereby allowing it to calculate prices for very small pools.

11. Deposit PDV Return

The Deposit function returned raw Stalk in the slot documented as PDV, so callers could misinterpret the value of a Deposit even though its stored accounting used the calculated PDV.

Solutions

1. Dynamic Convert Up Bonus

Implement a Dynamic Convert Up Bonus that works similarly to the Cultivation System – which has demonstrated efficacy with a similar problem in the Field (elaborated in Rationale) – to create a one-time Stalk bonus, realized immediately upon Convert. The Convert Up Bonus per PDV is dynamic, and fluctuates based on the demand for Converts over the past two Seasons. The Convert Up Bonus Capacity, measured in PDV, changes similarly to how the Soil supply changes in the Field. The bonus applies to Well LP → Pinto Converts, is capped by the Deposit’s available Grown Stalk, and uses capacity that ramps to its Season maximum over the first half of the Season. The gauge resets the bonus and maximum capacity to zero when TWAΔP is positive. The new Convert variants allow callers to require a minimum net Grown Stalk result, including a minimum bonus. For more info see Dynamic Convert Bonus and Penalty System: Fine-Tuned Convert Incentives.

2. Seed Gauge Points

Normalize the Seed Gauge Points across Whitelisted LP tokens to target a total of 10,000 every Season, subject to integer rounding.

3. Morning Auction

Upgrade the Morning Auction to change the Temperature based on elapsed time, observable every block, over 600 seconds with a floor of 1% of the Maximum Temperature, subject to fixed-point rounding.

4. Soil Demand

Update the threshold to measure demand for Soil to be min(initial Soil, max(50 Pinto, 5% of initial Soil)).

5. Till Scalar

Set the Till Scalar to decrease linearly from 1.2 at a 3% Pod Rate to 0.25 at 25%, clamped at those endpoints, for above-target and mixed-sign Soil issuance.

6. Rain and Flood

Update the criteria for Pinto to Rain/Flood to be TWAΔP > 0, Pod Rate < 3%, and L2SR >= 40%.

7. Tractor Signatures

Update the Tractor system to be ERC-1271 compatible.

8. Deposit Approvals

Update Silo Deposits to properly support the ERC1155 global approval standard.

9. Convert Penalty

Update the Pipeline Convert Penalty to take the maximum of the penalty for Converting beyond the value target and the penalty for Converting more than the instantaneous DeltaP, capped at the PDV Converted.

10. Well Valuation

Normalize the time-weighted Well liquidity getter to 18 decimal places. Return a zero price when the reserves used by the shared Well price calculation contain fewer than 10 Pinto.

11. Deposit PDV Return

Return the calculated PDV in the Deposit function’s PDV output while retaining its existing token-count and stem outputs.

Rationale

1. Dynamic Convert Up Bonus

The Cultivation System in the Field has demonstrated efficacy at creating an efficient market for Soil and Temperature. For the Dynamic Convert Up Bonus, the need to offer a Convert Up Bonus Capacity that generally meets demand, and offer a reasonable Stalk Bonus per PDV, is a very similar problem (i.e., amount, rate). Thus, a very similar mechanism has been created for the Silo.

Changing the Convert Up Bonus per PDV dynamically based on demand over the past two Seasons – decreasing the Bonus when demand increases or at least 95% of capacity is used, increasing it when demand decreases and Pinto’s Seed rate is higher than the highest LP Seed rate, and otherwise keeping it constant – will allow the protocol to discover the Bonus per PDV at which there is demand to Convert.

By changing the Convert Up Bonus Capacity to meet demand for Converts up, the protocol will minimize the instances where there is a significant amount of unused Capacity. This should minimize the disincentive to Convert by avoiding instances where there is significant unused Convert Up Bonus Capacity.

2. Seed Gauge Points

Normalizing the Seed Gauge Points every Season, subject to integer rounding, will result in a similar magnitude of changes in Seeds from Season to Season across long periods of time. This will keep the protocol’s response to changes in state more consistent.

3. Morning Auction

By jumping the Temperature during the Morning Auction after a number of blocks, the protocol was paying a higher interest rate than it needed to to participants in the Morning Auction. By changing the Temperature every block, the protocol reduces the gaps between offered Temperatures when attracting lenders.

4. Soil Demand

Scaling the minimum Sown threshold with initial Soil makes the cost of registering demand grow with the available supply. Capping the threshold at initial Soil keeps it reachable in Seasons with fewer than 50 Soil initially available.

5. Till Scalar

Interpolating between the existing endpoint scalars removes abrupt changes in Soil issuance at Pod Rate boundaries. Higher Pod Rates still reduce Soil issuance. The same interpolation applies to above-target issuance and Soil issuance when TWAΔP is nonpositive but instantaneous ΔP is positive, preserving the response to debt while smoothing its transitions.

6. Rain and Flood

When Pinto Floods at lower L2SRs, Pinto risks short term yield farmers exiting the protocol, decreasing the L2SR further. It may be healthier for the system to continue growing without a Flood to stunt momentum until the L2SR is high enough to sustain large exits without compromising long term sustainability.

7. Tractor Signatures

Smart wallets can use ERC-1271 contract signatures to authorize Tractor requisitions. By allowing smart contracts to utilize Tractor, smart wallets are able to interact with the Pinto protocol more easily.

8. Deposit Approvals

By supporting ERC1155 global approvals, Silo Deposits adhere to the ERC1155 Standard.

9. Convert Penalty

Pinto penalizes Converts when the Convert moves Pinto away from its value target, and when the number of tokens Converted exceeds the DeltaP of the Well(s). When a Deposit is penalized, the maximum penalty is equal to the number of Grown Stalk the Deposit has (per PDV). When a farmer Converted past the value target, they were effectively penalized twice (once for moving Pinto away from the target, and another for Converting beyond deltaP), which could double-count the overlapping penalized PDV. Given that the maximum number that Pinto could ever penalize per PDV is the number of Grown Stalk associated with that PDV (as any penalty beyond that would mean that a farmer would lose less Grown Stalk by manually Withdrawing and Depositing LP tokens rather than Converting), the penalty should be capped at 100% of the Grown Stalk of the Converted assets.

10. Well Valuation

Normalizing liquidity to a common precision makes getter results comparable across non-Pinto tokens with different decimals. Returning zero for a Well with fewer than 10 Pinto reserves avoids presenting a price calculation from a pool too small for the protocol’s minimum-reserve criterion.

11. Deposit PDV Return

Returning the calculated PDV ensures that a contract calling the Deposit function receives the Deposit’s value in Pinto, rather than the number of Stalk minted. This corrects the external result without changing the Deposit’s Stalk minting calculation.

Contract Changes

Initialization

Executed InitPI13.init(address,uint256) at 0x59816de18d73690d30c6b9de2375c34b2ef7e7e7, reading key 0 from 0xbe95c6806ab4eefc10ac9e96938c3a222964dd91. Set maxTotalGaugePoints to 10000e18 and normalized existing LP Gauge Points. Added the Convert Up Bonus gauge with initial maximum capacity 0, capacity factor 1%, tracked deficit 16,702.835 Pinto, and stored bonus-per-PDV value 2027670666 (0.2027670666 Stalk per PDV). Set the Morning duration to 600 seconds and morningControl to floor(1e18 / 240).

Facet Changes

FacetActionPrevious ImplementationNew Implementation
FieldFacetReplace0x36e4dd6f2be854962174c3e398cd0e11d49e404c0x32124b4da9b23659c1ad4b8be4fc2d274701c3d1
ConvertFacetReplace0x9e090554525af3e39b7191bcefaed4a594bfdf240x508900b00970af419c915c921ecc81d7e0a7ebcb
ConvertGettersFacetReplace0xc2eddd1cfb0ac4aab93a6aaedc097b8ccc1147100x32a036190967a11280ecd944d90b85d86f43e24f
PipelineConvertFacetReplace0x68206dab632667e293589078800a9a7ccca39b630x51b9fca1c4900584861efc794458dfa47775dd4b
SiloFacetReplace0xf6af001b8879a2e30db294b4c8deccbd0d168b340xf4e60ecdc7ddd4037f1b9aa7d27a30d367871ca5
SiloGettersFacetReplace0x954fba56a8356e7439f41a39579c7be59791d92f0xa9f983f26828a99146f7f119a358ad930edbf420
GaugeFacetReplace0xb054a1348d2a9fd5ba1eaa51ef1aee2d6ad402ed0xa98400591c72ce2a2bde3b170f5a6a1b070ee4ea
GaugeGettersFacetReplace0x889d0183c752b89e8d6cd62870b4f8eb70d108930x7d5b807202b8ae3dfb4b6d988d85622590b22862
SeasonFacetReplace0x0c5aa699e1979493e172d114193ee75c6a5afb390xb9d1c6e65a8934ec86d70f358028943e63ee0793
SeasonGettersFacetReplace0x47246b05945031432f30becbf602d2d7dc6fece00x87e626e6187bc0df123cf6441ccc9f31a46f178e
ApprovalFacetReplace0x463edf62ff627351518dcf0ac015c1e98562412f0xa456002541ffdd0cf4c8cdd273210581f2bf0314
ClaimFacetReplace0x8bbcc20eaf03191f1970ed5d93567ab76034f44d0x5e71bf027203bcbc9b1bd22504720d8e8be30cf7
BDVFacetReplace0xc20d8ab2b5d9039cc4c1fc66c0d740aa1983298a0xc09d2bca905ea40ba8999da6521f811331c13062
OracleFacetReplace0x5d8e457dd58f443237e105c2f27dc2c75133976c0x83c442257dffa7887418f1bd249a400eccfac60d
TractorFacetReplace0x007a0b3bf5a9efc922e83bf0ebe7bf27fc2103bf0xc2fc7963f76205dc57842e1a90c3e487bd16a556

The cut replaced 233 existing selectors and added 11 selectors. It removed no selectors. ApprovalFacet and BDVFacet had import-only changes. ClaimFacet and OracleFacet retained their own source files but were redeployed with updated dependencies. Replacing a facet did not change every function in it.

Other Contract / Parameter Changes

Externally linked libraries are listed below. Every listed library address changed. LibGerminate, LibShipping and LibWellMinting retained their own source files, although their compiled dependencies may differ. The LibIncentive branch relocation preserved its reward outputs. The old LibSilo and LibTokenSilo deployments varied by consuming facet.

LibraryPrevious ImplementationNew ImplementationUsed By
LibConvert0x98b7efa3ceb5076a59aa54256657114dba4401a1 (ConvertFacet)0xb3626b534ff81442579913de1f31c51a045b5261ConvertFacet, PipelineConvertFacetNew direct dependency: PipelineConvertFacet
LibPipelineConvert0xdd7f09a5c4ea7d742a6a2916509e968faffd22a5 (ConvertFacet, PipelineConvertFacet)0xfc537aa415b89def06d97e23c04baf4039e8bbcbConvertFacet, PipelineConvertFacet
LibSilo0xb8d171d90bbcd178b594b69b7c3f510775eeaf46 (ConvertFacet, PipelineConvertFacet, ClaimFacet)0xefa4e6492966228a7af3d5d9045bd9c9e5dc72bf (SiloFacet)0x9f327f1f6810aaf5a4ab0704b62b4ed6bb0ea334ClaimFacet, ConvertFacet, PipelineConvertFacet, SiloFacet
LibTokenSilo0x8013c1b3d6d63741c6fefb05b4106f330cf18118 (ConvertFacet, PipelineConvertFacet, ClaimFacet)0xf2a0e7fb0e9b1189b14274418e4ac78ae449b4ed (SiloFacet)0xe97ee5afcb656126c6a89b72d8617061213f9f4dClaimFacet, SiloFacetRemoved direct dependency: ConvertFacet, PipelineConvertFacet
LibEvaluate0xe3de9e4f8cfd5f52522e2a6ace70787c880dbf89 (SeasonFacet)0xbff46c34d49b976d9c133fafb0529cff6704138bSeasonFacet
LibGauge0x72a5e9f867dda828473b19f1f9e5c2f0d72b99b2 (SeasonFacet)0x35a71bc019539dda1e04e549609c6f620644e2c7SeasonFacet
LibIncentive0x20ad7475af48004993a9b0da582155b0c15c6fba (SeasonFacet)0x31046cd4b22c6af8a677f641f4d706ccce1ca570SeasonFacet
LibShipping0x3d71794eb70bea52681b8bce8e9c7af33fbdbad1 (SeasonFacet)0x71a9f8e8a9082381ba7352d5b82e5e0849c6ddf2SeasonFacet
LibWellMinting0x795381dfec56fda5a423080f6d7b446c3172974c (SeasonFacet, SeasonGettersFacet)0x7cbd0b120a1ee1cdac1ed245ee23a80b37c7a6f9SeasonFacet, SeasonGettersFacet
LibFlood0xaba142b51d6684e5471537379cead55afe2f1202 (SeasonFacet)0x3bd60d6c0df87fdd90c510d1de5c1a089f4e6b25SeasonFacet
LibGerminate0x46a29a054861fa5eba24ed262c4215cc3e2365f1 (SeasonFacet)0xbcf22afbbda11ac84ea001451d8ae60b424b0b97SeasonFacet
LibWeather0x9f0e6b3e54a91d677e30ce180dbe193cc65c388d (SeasonFacet)0xed46c5936939d4ffd25284b4825e14f02e4bb90dSeasonFacet

The new bonus gauge used target-Season bounds of 250–1,000, a minimum maximum capacity of 50 PDV, and capacity-factor adjustment bounds of 0.5–1.5 percentage points before inversion for decreases. The factor was bounded between 1% and 100% when adjusted. Its tracked use, prior-Season use and last-used bonus began at 0. Existing Pod Rate bounds (3% and 25%), L2SR bounds (5%, 40% and 80%) and Till Scalar endpoints (1.2 and 0.25) were retained. The Soil-demand calculation replaced the fixed 25-Pinto threshold with min(initialSoil, max(50e6, floor(initialSoil * 0.05e6 / 1e6))).

Function Changes

Event Changes