This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Kovan-DssSpell.t.sol
1991 lines (1850 loc) · 76.7 KB
/
Kovan-DssSpell.t.sol
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
pragma solidity 0.6.12;
import "ds-math/math.sol";
import "ds-test/test.sol";
import "lib/dss-interfaces/src/Interfaces.sol";
import "./test/rates.sol";
import "./test/addresses_kovan.sol";
import {DssSpell} from "./Kovan-DssSpell.sol";
interface Hevm {
function warp(uint) external;
function store(address,bytes32,bytes32) external;
function load(address,bytes32) external view returns (bytes32);
}
interface SpellLike {
function done() external view returns (bool);
function cast() external;
function eta() external view returns (uint256);
function nextCastTime() external returns (uint256);
}
interface AuthLike {
function wards(address) external view returns (uint256);
}
interface FlashLike {
function vat() external view returns (address);
function daiJoin() external view returns (address);
function dai() external view returns (address);
function vow() external view returns (address);
function max() external view returns (uint256);
function toll() external view returns (uint256);
function locked() external view returns (uint256);
function maxFlashLoan(address) external view returns (uint256);
function flashFee(address, uint256) external view returns (uint256);
function flashLoan(address, address, uint256, bytes calldata) external returns (bool);
function vatDaiFlashLoan(address, uint256, bytes calldata) external returns (bool);
function convert() external;
function accrue() external;
}
interface RwaLiquidationLike {
function ilks(bytes32) external returns (string memory,address,uint48,uint48);
}
interface RwaUrnLike {
function hope(address) external;
function draw(uint256) external;
function lock(uint256 wad) external;
function outputConduit() external view returns (address);
}
interface TinlakeManagerLike {
function lock(uint256 wad) external;
function file(bytes32 what, address data) external;
}
contract DssSpellTest is DSTest, DSMath {
struct SpellValues {
address deployed_spell;
uint256 deployed_spell_created;
address previous_spell;
bool office_hours_enabled;
uint256 expiration_threshold;
}
struct CollateralValues {
bool aL_enabled;
uint256 aL_line;
uint256 aL_gap;
uint256 aL_ttl;
uint256 line;
uint256 dust;
uint256 pct;
uint256 mat;
bytes32 liqType;
bool liqOn;
uint256 chop;
uint256 cat_dunk;
uint256 flip_beg;
uint48 flip_ttl;
uint48 flip_tau;
uint256 flipper_mom;
uint256 dog_hole;
uint256 clip_buf;
uint256 clip_tail;
uint256 clip_cusp;
uint256 clip_chip;
uint256 clip_tip;
uint256 clipper_mom;
uint256 cm_tolerance;
uint256 calc_tau;
uint256 calc_step;
uint256 calc_cut;
}
struct SystemValues {
uint256 line_offset;
uint256 pot_dsr;
uint256 pause_delay;
uint256 vow_wait;
uint256 vow_dump;
uint256 vow_sump;
uint256 vow_bump;
uint256 vow_hump_min;
uint256 vow_hump_max;
uint256 flap_beg;
uint256 flap_ttl;
uint256 flap_tau;
uint256 cat_box;
uint256 dog_Hole;
address pause_authority;
address osm_mom_authority;
address flipper_mom_authority;
address clipper_mom_authority;
uint256 ilk_count;
mapping (bytes32 => CollateralValues) collaterals;
}
SystemValues afterSpell;
SpellValues spellValues;
Hevm hevm;
Rates rates = new Rates();
Addresses addr = new Addresses();
// KOVAN ADDRESSES
DSPauseAbstract pause = DSPauseAbstract( addr.addr("MCD_PAUSE"));
address pauseProxy = addr.addr("MCD_PAUSE_PROXY");
DSChiefAbstract chief = DSChiefAbstract( addr.addr("MCD_ADM"));
VatAbstract vat = VatAbstract( addr.addr("MCD_VAT"));
VowAbstract vow = VowAbstract( addr.addr("MCD_VOW"));
CatAbstract cat = CatAbstract( addr.addr("MCD_CAT"));
DogAbstract dog = DogAbstract( addr.addr("MCD_DOG"));
PotAbstract pot = PotAbstract( addr.addr("MCD_POT"));
JugAbstract jug = JugAbstract( addr.addr("MCD_JUG"));
SpotAbstract spotter = SpotAbstract( addr.addr("MCD_SPOT"));
DaiAbstract dai = DaiAbstract( addr.addr("MCD_DAI"));
DaiJoinAbstract daiJoin = DaiJoinAbstract( addr.addr("MCD_JOIN_DAI"));
DSTokenAbstract gov = DSTokenAbstract( addr.addr("MCD_GOV"));
EndAbstract end = EndAbstract( addr.addr("MCD_END"));
ESMAbstract esm = ESMAbstract( addr.addr("MCD_ESM"));
IlkRegistryAbstract reg = IlkRegistryAbstract(addr.addr("ILK_REGISTRY"));
FlapAbstract flap = FlapAbstract( addr.addr("MCD_FLAP"));
OsmMomAbstract osmMom = OsmMomAbstract( addr.addr("OSM_MOM"));
FlipperMomAbstract flipMom = FlipperMomAbstract( addr.addr("FLIPPER_MOM"));
ClipperMomAbstract clipMom = ClipperMomAbstract( addr.addr("CLIPPER_MOM"));
DssAutoLineAbstract autoLine = DssAutoLineAbstract(addr.addr("MCD_IAM_AUTO_LINE"));
DssSpell spell;
// CHEAT_CODE = 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D
bytes20 constant CHEAT_CODE =
bytes20(uint160(uint256(keccak256('hevm cheat code'))));
uint256 constant HUNDRED = 10 ** 2;
uint256 constant THOUSAND = 10 ** 3;
uint256 constant MILLION = 10 ** 6;
uint256 constant BILLION = 10 ** 9;
uint256 constant RAD = 10 ** 45;
uint256 constant monthly_expiration = 4 days;
uint256 constant weekly_expiration = 30 days;
event Debug(uint256 index, uint256 val);
event Debug(uint256 index, address addr);
event Debug(uint256 index, bytes32 what);
event Log(string message, address deployer, string contractName);
// Many of the settings that change weekly rely on the rate accumulator
// described at https://docs.makerdao.com/smart-contract-modules/rates-module
// To check this yourself, use the following rate calculation (example 8%):
//
// $ bc -l <<< 'scale=27; e( l(1.01)/(60 * 60 * 24 * 365) )'
//
// Rates table is in ./test/rates.sol
// not provided in DSMath
function rpow(uint256 x, uint256 n, uint256 b) internal pure returns (uint256 z) {
assembly {
switch x case 0 {switch n case 0 {z := b} default {z := 0}}
default {
switch mod(n, 2) case 0 { z := b } default { z := x }
let half := div(b, 2) // for rounding.
for { n := div(n, 2) } n { n := div(n,2) } {
let xx := mul(x, x)
if iszero(eq(div(xx, x), x)) { revert(0,0) }
let xxRound := add(xx, half)
if lt(xxRound, xx) { revert(0,0) }
x := div(xxRound, b)
if mod(n,2) {
let zx := mul(z, x)
if and(iszero(iszero(x)), iszero(eq(div(zx, x), z))) { revert(0,0) }
let zxRound := add(zx, half)
if lt(zxRound, zx) { revert(0,0) }
z := div(zxRound, b)
}
}
}
}
}
function divup(uint256 x, uint256 y) internal pure returns (uint256 z) {
z = add(x, sub(y, 1)) / y;
}
// 10^-5 (tenth of a basis point) as a RAY
uint256 TOLERANCE = 10 ** 22;
function yearlyYield(uint256 duty) public pure returns (uint256) {
return rpow(duty, (365 * 24 * 60 *60), RAY);
}
function expectedRate(uint256 percentValue) public pure returns (uint256) {
return (10000 + percentValue) * (10 ** 23);
}
function diffCalc(uint256 expectedRate_, uint256 yearlyYield_) public pure returns (uint256) {
return (expectedRate_ > yearlyYield_) ? expectedRate_ - yearlyYield_ : yearlyYield_ - expectedRate_;
}
function castPreviousSpell() internal {
SpellLike prevSpell = SpellLike(spellValues.previous_spell);
// warp and cast previous spell so values are up-to-date to test against
if (prevSpell != SpellLike(0) && !prevSpell.done()) {
if (prevSpell.eta() == 0) {
vote(address(prevSpell));
scheduleWaitAndCast(address(prevSpell));
}
else {
// jump to nextCastTime to be a little more forgiving on the spell execution time
hevm.warp(prevSpell.nextCastTime());
prevSpell.cast();
}
}
}
function setUp() public {
hevm = Hevm(address(CHEAT_CODE));
//
// Test for spell-specific parameters
//
spellValues = SpellValues({
deployed_spell: address(0x8f3E97160F6677DF2245B83B9827C97042465F9E), // populate with deployed spell if deployed
deployed_spell_created: 1629218872, // use get-created-timestamp.sh if deployed
previous_spell: address(0), // supply if there is a need to test prior to its cast() function being called on-chain.
office_hours_enabled: false, // true if officehours is expected to be enabled in the spell
expiration_threshold: weekly_expiration // (weekly_expiration,monthly_expiration) if weekly or monthly spell
});
spell = spellValues.deployed_spell != address(0) ?
DssSpell(spellValues.deployed_spell) : new DssSpell();
//
// Test for all system configuration changes
//
afterSpell = SystemValues({
line_offset: 0, // Offset between the global line against the sum of local lines
pot_dsr: 0, // In basis points
pause_delay: 60, // In seconds
vow_wait: 3600, // In seconds
vow_dump: 2, // In whole Dai units
vow_sump: 50, // In whole Dai units
vow_bump: 10, // In whole Dai units
vow_hump_min: 500, // In whole Dai units
vow_hump_max: 1000, // In whole Dai units
flap_beg: 200, // In Basis Points
flap_ttl: 1 hours, // In seconds
flap_tau: 1 hours, // In seconds
cat_box: 10 * THOUSAND, // In whole Dai units
dog_Hole: 10 * THOUSAND, // In whole Dai units
pause_authority: address(chief), // Pause authority
osm_mom_authority: address(chief), // OsmMom authority
flipper_mom_authority: address(chief), // FlipperMom authority
clipper_mom_authority: address(chief), // ClipperMom authority
ilk_count: 32 // Num expected in system
});
afterSpell.collaterals["ETH-A"] = CollateralValues({
aL_enabled: false, // DssAutoLine is enabled?
aL_line: 0 * MILLION, // In whole Dai units
aL_gap: 0 * MILLION, // In whole Dai units
aL_ttl: 0, // In seconds
line: 540 * MILLION, // In whole Dai units
dust: 100, // In whole Dai units
pct: 400, // In basis points
mat: 15000, // In basis points
liqType: "clip", // "" or "flip" or "clip"
liqOn: true, // If liquidations are enabled
chop: 1300, // In basis points
cat_dunk: 0, // In whole Dai units
flip_beg: 0, // In basis points
flip_ttl: 0, // In seconds
flip_tau: 0, // In seconds
flipper_mom: 0, // 1 if circuit breaker enabled
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["ETH-B"] = CollateralValues({
aL_enabled: true,
aL_line: 50 * MILLION,
aL_gap: 5 * MILLION,
aL_ttl: 12 hours,
line: 0 * MILLION, // Not being checked as there is auto line
dust: 100,
pct: 600,
mat: 13000,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["ETH-C"] = CollateralValues({
aL_enabled: true,
aL_line: 2000 * MILLION,
aL_gap: 100 * MILLION,
aL_ttl: 12 hours,
line: 0 * MILLION,
dust: 100,
pct: 350,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["BAT-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 5 * MILLION,
dust: 100,
pct: 400,
mat: 15000,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["USDC-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 400 * MILLION,
dust: 100,
pct: 400,
mat: 10100,
liqType: "clip",
liqOn: false,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 0,
clip_buf: 10500,
clip_tail: 220 minutes,
clip_cusp: 9000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 0,
cm_tolerance: 9500,
calc_tau: 0,
calc_step: 120,
calc_cut: 9990
});
afterSpell.collaterals["USDC-B"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 30 * MILLION,
dust: 100,
pct: 5000,
mat: 12000,
liqType: "clip",
liqOn: false,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 0,
clip_buf: 10500,
clip_tail: 220 minutes,
clip_cusp: 9000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 0,
cm_tolerance: 9500,
calc_tau: 0,
calc_step: 120,
calc_cut: 9990
});
afterSpell.collaterals["WBTC-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 120 * MILLION,
dust: 100,
pct: 400,
mat: 15000,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["TUSD-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 50 * MILLION,
dust: 100,
pct: 400,
mat: 10100,
liqType: "clip",
liqOn: false,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 0,
clip_buf: 10500,
clip_tail: 220 minutes,
clip_cusp: 9000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 0,
cm_tolerance: 9500,
calc_tau: 0,
calc_step: 120,
calc_cut: 9990
});
afterSpell.collaterals["KNC-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 5 * MILLION,
dust: 100,
pct: 400,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["ZRX-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 5 * MILLION,
dust: 100,
pct: 400,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["MANA-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 1 * MILLION,
dust: 100,
pct: 1200,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["USDT-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 10 * MILLION,
dust: 100,
pct: 800,
mat: 15000,
liqType: "clip",
liqOn: false,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 0,
clip_buf: 10500,
clip_tail: 220 minutes,
clip_cusp: 9000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 0,
cm_tolerance: 9500,
calc_tau: 0,
calc_step: 120,
calc_cut: 9990
});
afterSpell.collaterals["PAXUSD-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 30 * MILLION,
dust: 100,
pct: 400,
mat: 10100,
liqType: "clip",
liqOn: false,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 0,
clip_buf: 10500,
clip_tail: 220 minutes,
clip_cusp: 9000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 0,
cm_tolerance: 9500,
calc_tau: 0,
calc_step: 120,
calc_cut: 9990
});
afterSpell.collaterals["COMP-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 7 * MILLION,
dust: 100,
pct: 100,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["LRC-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 3 * MILLION,
dust: 100,
pct: 300,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["LINK-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 5 * MILLION,
dust: 100,
pct: 200,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["BAL-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 4 * MILLION,
dust: 100,
pct: 500,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["YFI-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 7 * MILLION,
dust: 100,
pct: 400,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["GUSD-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 5 * MILLION,
dust: 100,
pct: 400,
mat: 10100,
liqType: "clip",
liqOn: false,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 0,
clip_buf: 10500,
clip_tail: 220 minutes,
clip_cusp: 9000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 0,
cm_tolerance: 9500,
calc_tau: 0,
calc_step: 120,
calc_cut: 9990
});
afterSpell.collaterals["UNI-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 15 * MILLION,
dust: 100,
pct: 300,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["RENBTC-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 2 * MILLION,
dust: 100,
pct: 600,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["AAVE-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 10 * MILLION,
dust: 100,
pct: 600,
mat: 17500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 13000,
clip_tail: 140 minutes,
clip_cusp: 4000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 5000,
calc_tau: 0,
calc_step: 90,
calc_cut: 9900
});
afterSpell.collaterals["UNIV2DAIETH-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 3 * MILLION,
dust: 100,
pct: 100,
mat: 12500,
liqType: "clip",
liqOn: true,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 5 * THOUSAND,
clip_buf: 11500,
clip_tail: 215 minutes,
clip_cusp: 6000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 1,
cm_tolerance: 7000,
calc_tau: 0,
calc_step: 125,
calc_cut: 9950
});
afterSpell.collaterals["PSM-USDC-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 500 * MILLION,
dust: 0,
pct: 0,
mat: 10000,
liqType: "clip",
liqOn: false,
chop: 1300,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 0,
clip_buf: 10500,
clip_tail: 220 minutes,
clip_cusp: 9000,
clip_chip: 10,
clip_tip: 1,
clipper_mom: 0,
cm_tolerance: 9500,
calc_tau: 0,
calc_step: 120,
calc_cut: 9990
});
afterSpell.collaterals["RWA001-A"] = CollateralValues({
aL_enabled: false,
aL_line: 0 * MILLION,
aL_gap: 0 * MILLION,
aL_ttl: 0,
line: 1 * THOUSAND,
dust: 0,
pct: 300,
mat: 10000,
liqType: "",
liqOn: false,
chop: 0,
cat_dunk: 0,
flip_beg: 0,
flip_ttl: 0,
flip_tau: 0,
flipper_mom: 0,
dog_hole: 0,
clip_buf: 0,
clip_tail: 0,
clip_cusp: 0,
clip_chip: 0,