Here, _bdv is a calculated value based on amount (the input amount of tokens) and deltaLPTokenSupply (the change in the supply of liquidity pool tokens, derived from other contract interactions).
// Initial LP Token Supply
uint lpTokenSupplyBefore = 1000;
// After some operations, let's assume it stays the same
uint lpTokenSupplyAfter = 1000;
// Therefore, delta is zero
uint deltaLPTokenSupply = lpTokenSupplyBefore - lpTokenSupplyAfter; // 0
uint amount = 500;
uint _bdv = amount.mul(BEAN_UNIT).div(deltaLPTokenSupply); // division by zero
Here, _bdv is a calculated value based on amount (the input amount of tokens) and deltaLPTokenSupply (the change in the supply of liquidity pool tokens, derived from other contract interactions).
// Initial LP Token Supply
uint lpTokenSupplyBefore = 1000;
// After some operations, let's assume it stays the same
uint lpTokenSupplyAfter = 1000;
// Therefore, delta is zero
uint deltaLPTokenSupply = lpTokenSupplyBefore - lpTokenSupplyAfter; // 0
uint amount = 500;
uint _bdv = amount.mul(BEAN_UNIT).div(deltaLPTokenSupply); // division by zero
Transaction Reversion
Manual Review
+
require(deltaLPTokenSupply > 0, "No change in LP token supply");
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.