PI-2: Remove Anti Lambda to Lambda Convert

Executed on November 27, 2024 at 21:11 UTC.

Summary

Remove the Anti Lambda to Lambda (AL2L) Convert functionality from the Silo to prevent users from removing each other's Rain Stalk.

Links

Background

Before this upgrade, AL2L Converts allowed any Farmer to Convert another Farmer's Deposit in order to decrease its Pinto-Denominated Value (PDV) if the current PDV of the Deposit (i.e., the PDV per token * the number of tokens) is less than the recorded PDV (i.e., the PDV stored onchain, which is used by the protocol to determine how many Stalk and Seeds to award the Deposit).

The ability to decrease a Deposit's PDV is necessary because as the value in liquidity pools changes due to changes in the price of the non-Pinto asset in the liquidity pool and/or the ratio of the assets in the liquidity pool changes, it is possible for the PDV of the Deposit to decrease substantially. By enabling anyone to decrease the PDV associated with a Deposit that is recorded by the protocol, the instances where the protocol is awarding excess Stalk and Seeds to a Deposit beyond the current value the Deposit is contributing to the protocol can be drastically reduced without requiring the protocol to regularly check the PDV of each Deposit, which would be expensive. Of course, there is no incentive for a Farmer to decrease their own PDV. Thus, the AL2L Convert is callable by any user on eligible Deposits that had completed Germination.

Problem

AL2L Converts had a bug in their implementation that would result in a loss of the Rain Stalk associated with the Deposit while it's Raining and/or Flooding. Rain Stalk is the snapshot of Stalk holdings taken each time it begins to Rain, which determines pro rata ownership of the proceeds from the Flood sale. While an AL2L Convert should decrease the Rain Stalk associated with a Deposit in the instance where its PDV is decreased, the AL2L Convert erroneously removed Rain Stalk during withdrawal without restoring the Farmer's Rain Stalk snapshot when the Deposit was recreated.

Solution

Remove AL2L Converts until a fix can be implemented to allow Farmers to retain the appropriate number of Rain Stalk during Converts.

Rationale

Temporarily removing AL2L Converts prevents another Farmer from triggering the erroneous Rain Stalk removal while a fix is developed. The tradeoff is that AL2L Converts cannot reduce overstated Deposit PDV during this period.

Contract Changes

Initialization

No initializer was called. The Diamond Cut used the zero address for its initializer and empty initialization calldata.

Facet Changes

FacetActionPrevious ImplementationNew Implementation
ConvertFacetReplace0x379D2d7FF9907F127f1226a9024BCF07896197340xF07C34E81D56fF02c01869bf1F833C07BB52BF2b
ConvertGettersFacetReplace0xfE55E1e7f3FdAef6b1E6E3d6D53f84a3741518170x518F109e57c872F8aceC3b3e9a6Ce5f5e8E80097

Other Contract / Parameter Changes

No protocol parameters changed. The replacement ConvertFacet links to the following libraries (previous → new addresses):

LibraryPrevious ImplementationNew ImplementationUsed By
LibConvert0x3dedd64cfbf6db642cf6a22ce747fdfb9f17b5700x67e19ab71b645b8b42062b2a5c8e49ef900fee9eConvertFacet
LibPipelineConvert0x4917dcbafc47b57b9ec004424a44ccdc5834d0540x2fc411d1ed590416ec2bc398f624bf462b60ff49ConvertFacet
LibSilo0x351ca256f86c10b01f2640f22ca379cf1e74d8e20x453c79a1c29d81b67b3be4e2b8810674f63606d8ConvertFacet
LibTokenSilo0xbbe1d3e7bb0b50d1999f631674efd5446881612a0x1915dcd16475dd25e2f5588888421cf80fc8d116ConvertFacet

Function Changes