No deadline check in mintfertilizer could result in wrong bpf
The function mint fertilizer allows a user to mint fertilizer in exchange for barnraisetokens shown here.
The nested function addfertilizer, checks the season (beanstalk's internal timekeeping) and determines the bpf (beans per fertilizer) based on it, which can be thought of as the interest rate given to the user for minting fertilizer.
The problem here is that there is no deadline check for the the function mintfertilizer. This can be a problem in certain situations. For example let's say that a user calls the function mintfertilizer, and at the same time, the seasons is about to change (every 1 hour). In that time the user that called the mintfertilizer is expecting a certain bpf, but due to the lack of a deadline, there is no assurance about when the transaction will be executed as it can stay in the mempool for a significant amount of time due to not submitting enough gas or a malicious validator holding the user's transaction. This can cause the mintfertilizer function to execute later than expected, changing the expected bpf to a lower one.
There are multiple impacts that can come from this issue. One is that transactions can be executed at unexpected times, resulting in reverts. Secondly, if this transaction is done in between seasons, then a user can end up with a different bpf than what was expected, resulting in a potential loss of yield
Manual Review
Add a deadline for users in the mintfertilizer function to protect from a loss of yield.
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.