[Certora] settlement fee spread assumption#989
Conversation
|
|
||
| // take calls touchMarket see rule takeCallsTouchMarket. | ||
| // Thus calling settlementFee (in particular checking if the market is touched) doesn't prune meaningful take paths. | ||
| uint256 fee = settlementFee(id, timeToMaturity); |
There was a problem hiding this comment.
I tried this
| uint256 fee = settlementFee(id, timeToMaturity); | |
| touchMarket(e, offer.market); | |
| uint256 fee = settlementFee@withrevert(id, timeToMaturity); | |
| assert !lastReverted; |
but it was causing a long running time in this run. Also it wasn't proving exactly that it's not pruning meaningful paths, because storeInCode is summarized to not revert in this file
There was a problem hiding this comment.
as is, it feels like TouchMarketIsCalled.spec is a bit redundant with the marketIsCreatedAfter* rules, but it's actually not proving exactly the same thing
There was a problem hiding this comment.
would it work to call settlementFee after take or does the take change the settlementFee?
After take it should not revert, right?
There was a problem hiding this comment.
I tried calling settlementFee after and the HAVOC_ALL summary of the callbacks set tickSpacing to 0 😦
With HAVOC_ECF it works, though.
There was a problem hiding this comment.
Yes basically we can either:
- have it before which uses havoc all by default, but there is this question of whether it prunes a path
- have it after which requires to have havoc ecf for all callbacks
I like the first solution better, since it has no unrelated assumptions about callbacks (you need to prove something about the settlement fee, which makes sense since this rule is about settlement fee)
jhoenicke
left a comment
There was a problem hiding this comment.
The TouchMarketIsCalled looks fine, the rest is just a comment update.
Fixes:
Also:
onRatify(now renamedisRatified)