Skip to content

Commit

Permalink
fix: wait for results in the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
QGarchery committed Nov 25, 2024
1 parent f04942e commit 60991b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/certora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ jobs:
sudo mv solc-static-linux /usr/local/bin/solc-0.8.19
- name: Verify ${{ matrix.conf }}
run: certoraRun certora/confs/${{ matrix.conf }}.conf
run: certoraRun certora/confs/${{ matrix.conf }}.conf --wait_for_results
env:
CERTORAKEY: ${{ secrets.CERTORAKEY }}
5 changes: 3 additions & 2 deletions certora/specs/LiquidateBuffer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ rule liquidateImprovePosition(MorphoLiquidateHarness.MarketParams marketParams,
uint256 newTotalAssets = require_uint256(virtualTotalBorrowAssets(id) - repaidAssets);

uint256 newBorrowerAssets = summaryMulDivUp(newBorrowerShares, newTotalAssets, newTotalShares);
uint256 newBorrowerAssetsDown = summaryMulDivDown(newBorrowerShares, newTotalAssets, newTotalShares);
uint256 newBorrowerCollateral = require_uint256(borrowerCollateral - seizedAssets);

assert repaidShares * borrowerCollateral >= seizedAssets * borrowerShares;
assert borrowerShares * newBorrowerCollateral >= newBorrowerShares * borrowerCollateral;
assert newTotalShares * virtualTotalBorrowAssets(id) >= newTotalAssets * virtualTotalBorrowShares(id);
assert borrowerShares * virtualTotalBorrowAssets(id) * newTotalShares * newBorrowerCollateral >= newBorrowerShares * virtualTotalBorrowShares(id) * newTotalAssets * borrowerCollateral;
assert borrowerAssets * newBorrowerCollateral >= newBorrowerAssets * borrowerCollateral;
require borrowerShares * virtualTotalBorrowAssets(id) * newTotalShares * newBorrowerCollateral >= newBorrowerShares * virtualTotalBorrowShares(id) * newTotalAssets * borrowerCollateral;
assert borrowerAssets * newBorrowerCollateral >= newBorrowerAssetsDown * borrowerCollateral;
}

0 comments on commit 60991b4

Please sign in to comment.