@@ -81,7 +81,8 @@ rule updateCaps_validity(env e) {
8181 require capsUpdate .length <= 2 ; // The length of the array is either 1 or 2.
8282 // Accordingly loop_iter == 2
8383 uint i ; // this is the entry of the array that we shall look at
84- require i == 1 | | i == 2 ;
84+ // require i == 1 | | i == 2 ;
85+ require i < capsUpdate .length ;
8586
8687 require capsUpdate [i ].supplyCap != KEEP_CURRENT ;
8788 require capsUpdate [i ].borrowCap != KEEP_CURRENT ;
@@ -112,7 +113,8 @@ rule updateRates_validity(env e) {
112113 require ratesUpdate .length <= 2 ; // The length of the array is either 1 or 2.
113114 // Accordingly loop_iter == 2
114115 uint i ; // this is the entry of the array that we shall look at
115- require i == 1 | | i == 2 ;
116+ // require i == 1 | | i == 2 ;
117+ require i < ratesUpdate .length ;
116118
117119 require ratesUpdate [i ].params .optimalUsageRatio != KEEP_CURRENT ;
118120 require ratesUpdate [i ].params .baseVariableBorrowRate != KEEP_CURRENT ;
@@ -147,7 +149,8 @@ rule updateCollateralSide_validity(env e) {
147149 require collateralUpdate .length <= 2 ; // The length of the array is either 1 or 2.
148150 // Accordingly loop_iter == 2
149151 uint i ; // this is the entry of the array that we shall look at
150- require i == 1 | | i == 2 ;
152+ // require i == 1 | | i == 2 ;
153+ require i < collateralUpdate .length ;
151154
152155 require collateralUpdate [i ].ltv != KEEP_CURRENT ;
153156 require collateralUpdate [i ].liqThreshold != KEEP_CURRENT ;
@@ -185,7 +188,8 @@ rule updateLstPriceCaps_validity(env e) {
185188 require priceCapUpdates .length <= 2 ; // The length of the array is either 1 or 2.
186189 // Accordingly loop_iter == 2
187190 uint i ; // this is the entry of the array that we shall look at
188- require i == 1 | | i == 2 ;
191+ // require i == 1 | | i == 2 ;
192+ require i < priceCapUpdates .length ;
189193
190194 updateLstPriceCaps (e ,priceCapUpdates );
191195
@@ -214,7 +218,8 @@ rule updateStablePriceCaps_validity(env e) {
214218 require priceCapUpdates .length <= 2 ; // The length of the array is either 1 or 2.
215219 // Accordingly loop_iter == 2
216220 uint i ; // this is the entry of the array that we shall look at
217- require i == 1 | | i == 2 ;
221+ // require i == 1 | | i == 2 ;
222+ require i < priceCapUpdates .length ;
218223
219224
220225 updateStablePriceCaps (e ,priceCapUpdates );
0 commit comments