Skip to content

Commit

Permalink
add postconditon to AMM
Browse files Browse the repository at this point in the history
  • Loading branch information
zoep committed May 26, 2024
1 parent 712b424 commit 24ebf2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/hevm/pass/amm/amm.act
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ returns 1
ensures

pre(token0.balanceOf[THIS]) * pre(token1.balanceOf[THIS]) <= post(token0.balanceOf[THIS]) * post(token1.balanceOf[THIS])
post(token0.balanceOf[THIS]) * post(token1.balanceOf[THIS]) <= pre(token0.balanceOf[THIS]) * pre(token1.balanceOf[THIS]) + pre(token0.balanceOf[THIS]) + amt



behaviour swap1 of Amm
Expand Down Expand Up @@ -118,4 +120,5 @@ returns 1

ensures

pre(token0.balanceOf[THIS]) * pre(token1.balanceOf[THIS]) <= post(token0.balanceOf[THIS]) * post(token1.balanceOf[THIS])
pre(token0.balanceOf[THIS]) * pre(token1.balanceOf[THIS]) <= post(token0.balanceOf[THIS]) * post(token1.balanceOf[THIS])
post(token0.balanceOf[THIS]) * post(token1.balanceOf[THIS]) <= pre(token0.balanceOf[THIS]) * pre(token1.balanceOf[THIS]) + pre(token1.balanceOf[THIS]) + amt

0 comments on commit 24ebf2e

Please sign in to comment.