According to the team “the initial liquidity for the new Bean-wstEth well will be added to the well once the Eth from the old well is converted to wstEth”. The problem is that it will not be possible to initiate the migration to the new well because the init()
function will revert if the new well does not have any liquidity in it.
When calling InitMigrateUnripeBeanEthToBeanSteth:init()
to initiate the migration from the Bean-ETH well to the Bean-wstETH well, the new well is whitelisted by calling LibWhitelist:whitelistToken()
. During this function call the function LibWellBdv:bdv
is entered:
This function gets the reserves of the new Bean-wstETH well that should be whitelisted and checks if the bean reserves of the well are >= WELL_MINIMUM_BEAN_BALANCE
which is set to 1000 beans:
The issue arises from the fact that at the time the well is whitelisted it does not have any liquidity in it because according to the development team “the initial liquidity will be added to the well once the Eth is converted to wstEth”. This means the function will revert and therefore it will not be possible to initiate the migration.
Do not whitelist the well when calling InitMigrateUnripeBeanEthToBeanSteth:init()
but add a second function InitMigrateUnripeBeanEthToBeanSteth:finish()
where the LP tokens for the new well are added and the new well which now has enough liquidity is whitelisted.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.