File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change 4
4
* currently it's an arithmetic underflow
5
5
! Don't make quotes that would cause a swap to fail due to supply or borrow caps
6
6
! Use `myDebt() == 0` condition for disabling controller: more accurate
7
- ! In _computeQuote() use vault.cash() method instead of token.balanceOf() otherwise donations could cause quoted swaps to fail
8
7
! In _computeQuote(), exactOut swaps should verify the *amount* (not quote) is withdrawable
9
8
* ConstantSum: incorporate price multipliers in quote methods
10
9
* natspec
Original file line number Diff line number Diff line change @@ -200,10 +200,7 @@ abstract contract MaglevBase is IMaglevBase, EVCUtil {
200
200
uint256 quote = computeQuote (amount, exactIn, asset0IsInput);
201
201
202
202
require (quote <= (asset0IsInput ? reserve1 : reserve0), InsufficientReserves ());
203
- require (
204
- quote <= IERC20 (asset0IsInput ? asset1 : asset0).balanceOf (asset0IsInput ? vault1 : vault0),
205
- InsufficientCash ()
206
- );
203
+ require (quote <= IEVault (asset0IsInput ? vault1 : vault0).cash (), InsufficientCash ());
207
204
208
205
// exactOut: increase required amountIn, rounding up
209
206
if (! exactIn) quote = (quote * 1e18 + (feeMultiplier - 1 )) / feeMultiplier;
You can’t perform that action at this time.
0 commit comments