Skip to content

v1.0.0

Latest
Compare
Choose a tag to compare
@jeffywu jeffywu released this 07 Dec 14:15
· 6 commits to master since this release
7d639e2

This major version release changes the ABI for the liquidate function on the Escrow contract. A new parameter has been added called maxLiquidateAmount which sets the maximum amount of local currency that will be liquidated.

This PR resolves a few issues found while developing as well as raised by Gauntlet Networks.

  1. Adds a max liquidate amount to the liquidate function call on Escrow.sol. For extremely large debts this allows for a partial liquidation.
  2. Removes trading on the AMM during fCash settlement and liquidation due to a potential vulnerability to flash loans during those scenarios.
  3. Adds the settledMaturedAssets call to the settleReserve function to ensure that CashPayer assets are converted to negative cash balances before settlement.

Also fixes a couple UX issues:

  1. Allows for rolling of debts to future maturities by changing the _withdraw function slightly on the Escrow.sol contract. Withdraw will withdraw down to a zero cash balance instead of failing due to an underflow. This means that borrowing while an account has a negative cash balance will repay a current cash balance first.
  2. Adds a new function freeCollateralViewAggregateOnly which returns less data and therefore is slightly more gas efficient.