Skip to content

Commit a6a4c38

Browse files
committed
add overflow example from audit
1 parent fc284ca commit a6a4c38

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed

pyth/tests/twap/audit_overflow.csv

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
price,conf,expo,nslots
2+
5400000000,10,0,5000
3+
5400000000,10,0,1
4+
5400000000,10,0,1
5+
5400000000,10,0,1
6+
5400000000,10,0,1
7+
5400000000,10,0,1
8+
5400000000,10,0,1
9+
5400000000,10,0,1
10+
5400000000,10,0,1
11+
5400000000,10,0,1
12+
5400000000,10,0,1
13+
5400000000,10,0,1
14+
5400000000,10,0,1
15+
5400000000,10,0,1
16+
5400000000,10,0,1
17+
5400000000,10,0,1
18+
5400000000,10,0,1
19+
5400000000,10,0,1
20+
5400000000,10,0,1
21+
5400000000,10,0,1
22+
5400000000,10,0,1
23+
5400000000,10,0,1
24+
5400000000,10,0,1
25+
5400000000,10,0,1
26+
5400000000,10,0,1
27+
5400000000,10,0,1
28+
5400000000,10,0,1
29+
5400000000,10,0,1
30+
5400000000,10,0,1
31+
5400000000,10,0,1
32+
5400000000,10,0,1
33+
5400000000,10,0,1
34+
5400000000,10,0,1
35+
5400000000,10,0,1
36+
5400000000,10,0,1
37+
5400000000,10,0,1
38+
5400000000,10,0,1
39+
5400000000,10,0,1
40+
5400000000,10,0,1
41+
5400000000,10,0,1
42+
5400000000,10,0,1
43+
5400000000,10,0,1
44+
5400000000,10,0,1
45+
5400000000,10,0,1
46+
5400000000,10,0,1
47+
5400000000,10,0,1
48+
5400000000,10,0,1
49+
5400000000,10,0,1
50+
5400000000,10,0,1
51+
5400000000,10,0,1
52+
5400000000,10,0,1
53+
5400000000,10,0,1
54+
5400000000,10,0,1
55+
5400000000,10,0,1
56+
5400000000,10,0,1
57+
5400000000,10,0,1
58+
5400000000,10,0,1

pyth/tests/twap/audit_overflow.result

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
price,conf,expo,nslots,twap,twac
2+
5400000000,10,0,5000,5400000000,10
3+
5400000000,10,0,1,5399999900,10
4+
5400000000,10,0,1,5399999900,10
5+
5400000000,10,0,1,5400000000,10
6+
5400000000,10,0,1,5399999800,10
7+
5400000000,10,0,1,5399999800,10
8+
5400000000,10,0,1,5399999800,10
9+
5400000000,10,0,1,5399999900,10
10+
5400000000,10,0,1,5399999800,10
11+
5400000000,10,0,1,5399999900,10
12+
5400000000,10,0,1,5399999800,10
13+
5400000000,10,0,1,5399999900,10
14+
5400000000,10,0,1,5399999900,10
15+
5400000000,10,0,1,5399999800,10
16+
5400000000,10,0,1,5399999900,10
17+
5400000000,10,0,1,5399999900,10
18+
5400000000,10,0,1,5399999900,10
19+
5400000000,10,0,1,5399999900,10
20+
5400000000,10,0,1,-4317908700,10
21+
5400000000,10,0,1,-3831472600,10
22+
5400000000,10,0,1,-3391363800,10
23+
5400000000,10,0,1,-2991264900,10
24+
5400000000,10,0,1,-2625957220,10
25+
5400000000,10,0,1,-2291091870,10
26+
5400000000,10,0,1,-1983015760,10
27+
5400000000,10,0,1,-1698637830,10
28+
5400000000,10,0,1,-1435324970,10
29+
5400000000,10,0,1,-1190820180,10
30+
5400000000,10,0,1,-963177770,10
31+
5400000000,10,0,1,-750711560,10
32+
5400000000,10,0,1,-551952870,10
33+
5400000000,10,0,1,-365616590,10
34+
5400000000,10,0,1,-190573435,10
35+
5400000000,10,0,1,-25826945,10
36+
5400000000,10,0,1,129505450,10
37+
5400000000,10,0,1,276208260,10
38+
5400000000,10,0,1,414981170,10
39+
5400000000,10,0,1,546450240,10
40+
5400000000,10,0,1,671177310,10
41+
5400000000,10,0,1,789668000,10
42+
5400000000,10,0,1,902378650,10
43+
5400000000,10,0,1,1009722100,10
44+
5400000000,10,0,1,1112072850,10
45+
5400000000,10,0,1,1209771270,10
46+
5400000000,10,0,1,1303127550,10
47+
5400000000,10,0,1,1392424830,10
48+
5400000000,10,0,1,1477922240,10
49+
5400000000,10,0,1,1559857230,10
50+
5400000000,10,0,1,1638447910,10
51+
5400000000,10,0,1,1713894980,10
52+
5400000000,10,0,1,1786383320,10
53+
5400000000,10,0,1,1856083660,10
54+
5400000000,10,0,1,-1567561520,10
55+
5400000000,10,0,1,-1438131840,10
56+
5400000000,10,0,1,-1313408720,10
57+
5400000000,10,0,1,-1193139990,10
58+
5400000000,10,0,1,-1077091250,10

0 commit comments

Comments
 (0)