You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
updateWeightedAverage should satisfy the invariant that _average >= min(oldAverage, delta) && _average <= max(oldAverage, delta) in Hyperdrive deployments.
Deliverables
Unit tests for updateWeightedAverage that identify the dangerous regimes. A matrix based test is the stretch goal.
Evaluate how updateWeightedAverage is being used. Which dangerous regimes are we worried about? Include documentation inline that describes which regimes we are avoiding and how we are avoiding them.
Configuration testing. For DAI, ETH, and USDC, we should have tests that verify that updateWeightedAverage will never violate its invariant in normal operation.
Maybe: If the current implementation can't pass configuration testing (e.g. there are possible inputs that can break updateWeightedAverage), then we'll need a fix. This probably looks something like a minimum bond amount.
Goal
updateWeightedAverageshould satisfy the invariant that_average >= min(oldAverage, delta) && _average <= max(oldAverage, delta)in Hyperdrive deployments.Deliverables
updateWeightedAveragethat identify the dangerous regimes. A matrix based test is the stretch goal.updateWeightedAverageis being used. Which dangerous regimes are we worried about? Include documentation inline that describes which regimes we are avoiding and how we are avoiding them.updateWeightedAveragewill never violate its invariant in normal operation.updateWeightedAverage), then we'll need a fix. This probably looks something like a minimum bond amount.