The struct UsdTokenSwapConfig.Data contains pdCurveYMin, pdCurveYMax, pdCurveXMin, pdCurveXMax, and pdCurveZ. These values are never initialized or updated anywhere in the contracts. When getPremiumDiscountFactor is called, it performs a division operation using pdCurveXMax - pdCurveXMin, which is zero by default, leading to a division by zero error and a transaction revert.
Uninitialized pdCurve Variables Default to Zero**
Since these values are not set anywhere, they default to zero.
If pdCurveXMin == pdCurveXMax == 0 (default values), this results in division by zero, causing a revert in getPremiumDiscountFactor
Every call to getPremiumDiscountFactor will always revert
No swap can happen in StabilityBranch, which means users cannot swap their usd token to vault asset, making the usd token unusable
Create a setter function to set these values in MarketMakingEngineConfigurationBranch
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.