From dd28e025c5df2ea40c6f13aad93a843d71be6ced Mon Sep 17 00:00:00 2001 From: Taylor Brent Date: Mon, 22 Jan 2024 12:08:40 -0500 Subject: [PATCH] add back low <= high asserts --- contracts/plugins/assets/curve/CurveStableCollateral.sol | 1 + contracts/plugins/assets/curve/CurveStableMetapoolCollateral.sol | 1 + 2 files changed, 2 insertions(+) diff --git a/contracts/plugins/assets/curve/CurveStableCollateral.sol b/contracts/plugins/assets/curve/CurveStableCollateral.sol index a9d9a6b9b..c59994fd5 100644 --- a/contracts/plugins/assets/curve/CurveStableCollateral.sol +++ b/contracts/plugins/assets/curve/CurveStableCollateral.sol @@ -66,6 +66,7 @@ contract CurveStableCollateral is AppreciatingFiatCollateral, PoolTokens { // {UoA/tok} = {UoA} / {tok} low = aumLow.div(supply, FLOOR); high = aumHigh.div(supply, CEIL); + assert(low <= high); // not obviously true just by inspection return (low, high, 0); } diff --git a/contracts/plugins/assets/curve/CurveStableMetapoolCollateral.sol b/contracts/plugins/assets/curve/CurveStableMetapoolCollateral.sol index 3e4c0009a..ad3cd6ac8 100644 --- a/contracts/plugins/assets/curve/CurveStableMetapoolCollateral.sol +++ b/contracts/plugins/assets/curve/CurveStableMetapoolCollateral.sol @@ -97,6 +97,7 @@ contract CurveStableMetapoolCollateral is CurveStableCollateral { // {UoA/tok} = {UoA} / {tok} low = aumLow.div(supply, FLOOR); high = aumHigh.div(supply, CEIL); + assert(low <= high); // not obviously true just by inspection return (low, high, 0); }