EBIP-13: Re-Add Convert

Committed: November 9, 2023


Submitter

Beanstalk Community Multisig

Summary

Re-add the convert function with a new implementation that fixes the bug from EBIP-12.

Per the process outlined in the BCM Emergency Response Procedures, the BCM can take swift action to protect Beanstalk in the event of a bug or security vulnerability.

In the case of EBIP-13, functionality that was removed in EBIP-12 is reintroduced this EBIP.

Problem

The convert function was removed in EBIP-12.

Solution

Add require statements in LibWellConvert that verify that the Well being Converted in is whitelisted.

Add a require statement in ConvertFacet that verifies that the token amount being Converted from is greater than 0.

Re-add the convert function to Beanstalk.

All changes were reviewed by Cyfrin.

Contract Changes

Convert Facet

The following ConvertFacet is added to Beanstalk:

ConvertFacet Function Changes

Name Selector Action Type New Functionality
convert 0xb362a6e8 Add Call

Event Changes

None.

Beans Minted

None.

Effective

Effective immediately upon commitment by the BCM, which has already happened.