forked from CreamFi/compound-protocol
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
97 lines (84 loc) · 3.24 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Run a single cvl e.g.:
# make -B spec/certora/CErc20/borrowAndRepayFresh.cvl
# TODO:
# - mintAndRedeemFresh.cvl in progress and is failing due to issues with tool proving how the exchange rate can change
# hoping for better division modelling - currently fails to prove (a + 1) / b >= a / b
# - CErc20Delegator/*.cvl cannot yet be run with the tool
.PHONY: certora-clean
CERTORA_BIN = $(abspath script/certora)
CERTORA_RUN = $(CERTORA_BIN)/run.py
CERTORA_CLI = $(CERTORA_BIN)/cli.jar
CERTORA_EMV = $(CERTORA_BIN)/emv.jar
export CERTORA = $(CERTORA_BIN)
export CERTORA_DISABLE_POPUP = 1
spec/certora/Math/%.cvl:
$(CERTORA_RUN) \
spec/certora/contracts/MathCertora.sol \
--verify \
MathCertora:$@
spec/certora/Comp/search.cvl:
$(CERTORA_RUN) \
spec/certora/contracts/CompCertora.sol \
--settings -b=4,-graphDrawLimit=0,-assumeUnwindCond,-depth=100 \
--solc_args "'--evm-version istanbul'" \
--verify \
CompCertora:$@
spec/certora/Comp/transfer.cvl:
$(CERTORA_RUN) \
spec/certora/contracts/CompCertora.sol \
--settings -graphDrawLimit=0,-assumeUnwindCond,-depth=100 \
--solc_args "'--evm-version istanbul'" \
--verify \
CompCertora:$@
spec/certora/Comptroller/%.cvl:
$(CERTORA_RUN) \
spec/certora/contracts/ComptrollerCertora.sol \
spec/certora/contracts/PriceOracleModel.sol \
--link \
ComptrollerCertora:oracle=PriceOracleModel \
--verify \
ComptrollerCertora:$@
spec/certora/CErc20/%.cvl:
$(CERTORA_RUN) \
spec/certora/contracts/CErc20ImmutableCertora.sol \
spec/certora/contracts/CTokenCollateral.sol \
spec/certora/contracts/ComptrollerCertora.sol \
spec/certora/contracts/InterestRateModelModel.sol \
spec/certora/contracts/UnderlyingModelNonStandard.sol \
--link \
CErc20ImmutableCertora:otherToken=CTokenCollateral \
CErc20ImmutableCertora:comptroller=ComptrollerCertora \
CErc20ImmutableCertora:underlying=UnderlyingModelNonStandard \
CErc20ImmutableCertora:interestRateModel=InterestRateModelModel \
CTokenCollateral:comptroller=ComptrollerCertora \
CTokenCollateral:underlying=UnderlyingModelNonStandard \
--verify \
CErc20ImmutableCertora:$@ \
--settings -cache=certora-run-cerc20-immutable
spec/certora/CErc20Delegator/%.cvl:
$(CERTORA_RUN) \
spec/certora/contracts/CErc20DelegatorCertora.sol \
spec/certora/contracts/CErc20DelegateCertora.sol \
spec/certora/contracts/CTokenCollateral.sol \
spec/certora/contracts/ComptrollerCertora.sol \
spec/certora/contracts/InterestRateModelModel.sol \
spec/certora/contracts/UnderlyingModelNonStandard.sol \
--link \
CErc20DelegatorCertora:implementation=CErc20DelegateCertora \
CErc20DelegatorCertora:otherToken=CTokenCollateral \
CErc20DelegatorCertora:comptroller=ComptrollerCertora \
CErc20DelegatorCertora:underlying=UnderlyingModelNonStandard \
CErc20DelegatorCertora:interestRateModel=InterestRateModelModel \
CTokenCollateral:comptroller=ComptrollerCertora \
CTokenCollateral:underlying=UnderlyingModelNonStandard \
--verify \
CErc20DelegatorCertora:$@ \
--settings -assumeUnwindCond \
--settings -cache=certora-run-cerc20-delegator
spec/certora/Timelock/%.cvl:
$(CERTORA_RUN) \
spec/certora/contracts/TimelockCertora.sol \
--verify \
TimelockCertora:$@
certora-clean:
rm -rf .certora_build.json .certora_config certora_verify.json emv-*