@venusprotocol/venus-protocol 10.0.0 → 10.1.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2442 @@
1
+ {
2
+ "address": "0xaB5504A3cde0d8253E8F981D663c7Ff7128B3e56",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "address",
8
+ "name": "underlying_",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "internalType": "contract ComptrollerInterface",
13
+ "name": "comptroller_",
14
+ "type": "address"
15
+ },
16
+ {
17
+ "internalType": "contract InterestRateModelV8",
18
+ "name": "interestRateModel_",
19
+ "type": "address"
20
+ },
21
+ {
22
+ "internalType": "uint256",
23
+ "name": "initialExchangeRateMantissa_",
24
+ "type": "uint256"
25
+ },
26
+ {
27
+ "internalType": "string",
28
+ "name": "name_",
29
+ "type": "string"
30
+ },
31
+ {
32
+ "internalType": "string",
33
+ "name": "symbol_",
34
+ "type": "string"
35
+ },
36
+ {
37
+ "internalType": "uint8",
38
+ "name": "decimals_",
39
+ "type": "uint8"
40
+ },
41
+ {
42
+ "internalType": "address payable",
43
+ "name": "admin_",
44
+ "type": "address"
45
+ },
46
+ {
47
+ "internalType": "address",
48
+ "name": "implementation_",
49
+ "type": "address"
50
+ },
51
+ {
52
+ "internalType": "bytes",
53
+ "name": "becomeImplementationData",
54
+ "type": "bytes"
55
+ }
56
+ ],
57
+ "stateMutability": "nonpayable",
58
+ "type": "constructor"
59
+ },
60
+ {
61
+ "anonymous": false,
62
+ "inputs": [
63
+ {
64
+ "indexed": false,
65
+ "internalType": "uint256",
66
+ "name": "cashPrior",
67
+ "type": "uint256"
68
+ },
69
+ {
70
+ "indexed": false,
71
+ "internalType": "uint256",
72
+ "name": "interestAccumulated",
73
+ "type": "uint256"
74
+ },
75
+ {
76
+ "indexed": false,
77
+ "internalType": "uint256",
78
+ "name": "borrowIndex",
79
+ "type": "uint256"
80
+ },
81
+ {
82
+ "indexed": false,
83
+ "internalType": "uint256",
84
+ "name": "totalBorrows",
85
+ "type": "uint256"
86
+ }
87
+ ],
88
+ "name": "AccrueInterest",
89
+ "type": "event"
90
+ },
91
+ {
92
+ "anonymous": false,
93
+ "inputs": [
94
+ {
95
+ "indexed": true,
96
+ "internalType": "address",
97
+ "name": "owner",
98
+ "type": "address"
99
+ },
100
+ {
101
+ "indexed": true,
102
+ "internalType": "address",
103
+ "name": "spender",
104
+ "type": "address"
105
+ },
106
+ {
107
+ "indexed": false,
108
+ "internalType": "uint256",
109
+ "name": "amount",
110
+ "type": "uint256"
111
+ }
112
+ ],
113
+ "name": "Approval",
114
+ "type": "event"
115
+ },
116
+ {
117
+ "anonymous": false,
118
+ "inputs": [
119
+ {
120
+ "indexed": false,
121
+ "internalType": "address",
122
+ "name": "borrower",
123
+ "type": "address"
124
+ },
125
+ {
126
+ "indexed": false,
127
+ "internalType": "uint256",
128
+ "name": "borrowAmount",
129
+ "type": "uint256"
130
+ },
131
+ {
132
+ "indexed": false,
133
+ "internalType": "uint256",
134
+ "name": "accountBorrows",
135
+ "type": "uint256"
136
+ },
137
+ {
138
+ "indexed": false,
139
+ "internalType": "uint256",
140
+ "name": "totalBorrows",
141
+ "type": "uint256"
142
+ }
143
+ ],
144
+ "name": "Borrow",
145
+ "type": "event"
146
+ },
147
+ {
148
+ "anonymous": false,
149
+ "inputs": [
150
+ {
151
+ "indexed": false,
152
+ "internalType": "address",
153
+ "name": "liquidator",
154
+ "type": "address"
155
+ },
156
+ {
157
+ "indexed": false,
158
+ "internalType": "address",
159
+ "name": "borrower",
160
+ "type": "address"
161
+ },
162
+ {
163
+ "indexed": false,
164
+ "internalType": "uint256",
165
+ "name": "repayAmount",
166
+ "type": "uint256"
167
+ },
168
+ {
169
+ "indexed": false,
170
+ "internalType": "address",
171
+ "name": "vTokenCollateral",
172
+ "type": "address"
173
+ },
174
+ {
175
+ "indexed": false,
176
+ "internalType": "uint256",
177
+ "name": "seizeTokens",
178
+ "type": "uint256"
179
+ }
180
+ ],
181
+ "name": "LiquidateBorrow",
182
+ "type": "event"
183
+ },
184
+ {
185
+ "anonymous": false,
186
+ "inputs": [
187
+ {
188
+ "indexed": false,
189
+ "internalType": "address",
190
+ "name": "minter",
191
+ "type": "address"
192
+ },
193
+ {
194
+ "indexed": false,
195
+ "internalType": "uint256",
196
+ "name": "mintAmount",
197
+ "type": "uint256"
198
+ },
199
+ {
200
+ "indexed": false,
201
+ "internalType": "uint256",
202
+ "name": "mintTokens",
203
+ "type": "uint256"
204
+ },
205
+ {
206
+ "indexed": false,
207
+ "internalType": "uint256",
208
+ "name": "totalSupply",
209
+ "type": "uint256"
210
+ }
211
+ ],
212
+ "name": "Mint",
213
+ "type": "event"
214
+ },
215
+ {
216
+ "anonymous": false,
217
+ "inputs": [
218
+ {
219
+ "indexed": false,
220
+ "internalType": "address",
221
+ "name": "payer",
222
+ "type": "address"
223
+ },
224
+ {
225
+ "indexed": false,
226
+ "internalType": "address",
227
+ "name": "receiver",
228
+ "type": "address"
229
+ },
230
+ {
231
+ "indexed": false,
232
+ "internalType": "uint256",
233
+ "name": "mintAmount",
234
+ "type": "uint256"
235
+ },
236
+ {
237
+ "indexed": false,
238
+ "internalType": "uint256",
239
+ "name": "mintTokens",
240
+ "type": "uint256"
241
+ },
242
+ {
243
+ "indexed": false,
244
+ "internalType": "uint256",
245
+ "name": "totalSupply",
246
+ "type": "uint256"
247
+ }
248
+ ],
249
+ "name": "MintBehalf",
250
+ "type": "event"
251
+ },
252
+ {
253
+ "anonymous": false,
254
+ "inputs": [
255
+ {
256
+ "indexed": false,
257
+ "internalType": "address",
258
+ "name": "oldAccessControlAddress",
259
+ "type": "address"
260
+ },
261
+ {
262
+ "indexed": false,
263
+ "internalType": "address",
264
+ "name": "newAccessControlAddress",
265
+ "type": "address"
266
+ }
267
+ ],
268
+ "name": "NewAccessControlManager",
269
+ "type": "event"
270
+ },
271
+ {
272
+ "anonymous": false,
273
+ "inputs": [
274
+ {
275
+ "indexed": false,
276
+ "internalType": "address",
277
+ "name": "oldAdmin",
278
+ "type": "address"
279
+ },
280
+ {
281
+ "indexed": false,
282
+ "internalType": "address",
283
+ "name": "newAdmin",
284
+ "type": "address"
285
+ }
286
+ ],
287
+ "name": "NewAdmin",
288
+ "type": "event"
289
+ },
290
+ {
291
+ "anonymous": false,
292
+ "inputs": [
293
+ {
294
+ "indexed": false,
295
+ "internalType": "contract ComptrollerInterface",
296
+ "name": "oldComptroller",
297
+ "type": "address"
298
+ },
299
+ {
300
+ "indexed": false,
301
+ "internalType": "contract ComptrollerInterface",
302
+ "name": "newComptroller",
303
+ "type": "address"
304
+ }
305
+ ],
306
+ "name": "NewComptroller",
307
+ "type": "event"
308
+ },
309
+ {
310
+ "anonymous": false,
311
+ "inputs": [
312
+ {
313
+ "indexed": false,
314
+ "internalType": "address",
315
+ "name": "oldImplementation",
316
+ "type": "address"
317
+ },
318
+ {
319
+ "indexed": false,
320
+ "internalType": "address",
321
+ "name": "newImplementation",
322
+ "type": "address"
323
+ }
324
+ ],
325
+ "name": "NewImplementation",
326
+ "type": "event"
327
+ },
328
+ {
329
+ "anonymous": false,
330
+ "inputs": [
331
+ {
332
+ "indexed": false,
333
+ "internalType": "contract InterestRateModelV8",
334
+ "name": "oldInterestRateModel",
335
+ "type": "address"
336
+ },
337
+ {
338
+ "indexed": false,
339
+ "internalType": "contract InterestRateModelV8",
340
+ "name": "newInterestRateModel",
341
+ "type": "address"
342
+ }
343
+ ],
344
+ "name": "NewMarketInterestRateModel",
345
+ "type": "event"
346
+ },
347
+ {
348
+ "anonymous": false,
349
+ "inputs": [
350
+ {
351
+ "indexed": false,
352
+ "internalType": "address",
353
+ "name": "oldPendingAdmin",
354
+ "type": "address"
355
+ },
356
+ {
357
+ "indexed": false,
358
+ "internalType": "address",
359
+ "name": "newPendingAdmin",
360
+ "type": "address"
361
+ }
362
+ ],
363
+ "name": "NewPendingAdmin",
364
+ "type": "event"
365
+ },
366
+ {
367
+ "anonymous": false,
368
+ "inputs": [
369
+ {
370
+ "indexed": true,
371
+ "internalType": "address",
372
+ "name": "oldProtocolShareReserve",
373
+ "type": "address"
374
+ },
375
+ {
376
+ "indexed": true,
377
+ "internalType": "address",
378
+ "name": "newProtocolShareReserve",
379
+ "type": "address"
380
+ }
381
+ ],
382
+ "name": "NewProtocolShareReserve",
383
+ "type": "event"
384
+ },
385
+ {
386
+ "anonymous": false,
387
+ "inputs": [
388
+ {
389
+ "indexed": false,
390
+ "internalType": "uint256",
391
+ "name": "oldReduceReservesBlockDelta",
392
+ "type": "uint256"
393
+ },
394
+ {
395
+ "indexed": false,
396
+ "internalType": "uint256",
397
+ "name": "newReduceReservesBlockDelta",
398
+ "type": "uint256"
399
+ }
400
+ ],
401
+ "name": "NewReduceReservesBlockDelta",
402
+ "type": "event"
403
+ },
404
+ {
405
+ "anonymous": false,
406
+ "inputs": [
407
+ {
408
+ "indexed": false,
409
+ "internalType": "uint256",
410
+ "name": "oldReserveFactorMantissa",
411
+ "type": "uint256"
412
+ },
413
+ {
414
+ "indexed": false,
415
+ "internalType": "uint256",
416
+ "name": "newReserveFactorMantissa",
417
+ "type": "uint256"
418
+ }
419
+ ],
420
+ "name": "NewReserveFactor",
421
+ "type": "event"
422
+ },
423
+ {
424
+ "anonymous": false,
425
+ "inputs": [
426
+ {
427
+ "indexed": false,
428
+ "internalType": "address",
429
+ "name": "redeemer",
430
+ "type": "address"
431
+ },
432
+ {
433
+ "indexed": false,
434
+ "internalType": "uint256",
435
+ "name": "redeemAmount",
436
+ "type": "uint256"
437
+ },
438
+ {
439
+ "indexed": false,
440
+ "internalType": "uint256",
441
+ "name": "redeemTokens",
442
+ "type": "uint256"
443
+ },
444
+ {
445
+ "indexed": false,
446
+ "internalType": "uint256",
447
+ "name": "totalSupply",
448
+ "type": "uint256"
449
+ }
450
+ ],
451
+ "name": "Redeem",
452
+ "type": "event"
453
+ },
454
+ {
455
+ "anonymous": false,
456
+ "inputs": [
457
+ {
458
+ "indexed": false,
459
+ "internalType": "address",
460
+ "name": "redeemer",
461
+ "type": "address"
462
+ },
463
+ {
464
+ "indexed": false,
465
+ "internalType": "uint256",
466
+ "name": "feeAmount",
467
+ "type": "uint256"
468
+ },
469
+ {
470
+ "indexed": false,
471
+ "internalType": "uint256",
472
+ "name": "redeemTokens",
473
+ "type": "uint256"
474
+ }
475
+ ],
476
+ "name": "RedeemFee",
477
+ "type": "event"
478
+ },
479
+ {
480
+ "anonymous": false,
481
+ "inputs": [
482
+ {
483
+ "indexed": false,
484
+ "internalType": "address",
485
+ "name": "payer",
486
+ "type": "address"
487
+ },
488
+ {
489
+ "indexed": false,
490
+ "internalType": "address",
491
+ "name": "borrower",
492
+ "type": "address"
493
+ },
494
+ {
495
+ "indexed": false,
496
+ "internalType": "uint256",
497
+ "name": "repayAmount",
498
+ "type": "uint256"
499
+ },
500
+ {
501
+ "indexed": false,
502
+ "internalType": "uint256",
503
+ "name": "accountBorrows",
504
+ "type": "uint256"
505
+ },
506
+ {
507
+ "indexed": false,
508
+ "internalType": "uint256",
509
+ "name": "totalBorrows",
510
+ "type": "uint256"
511
+ }
512
+ ],
513
+ "name": "RepayBorrow",
514
+ "type": "event"
515
+ },
516
+ {
517
+ "anonymous": false,
518
+ "inputs": [
519
+ {
520
+ "indexed": false,
521
+ "internalType": "address",
522
+ "name": "benefactor",
523
+ "type": "address"
524
+ },
525
+ {
526
+ "indexed": false,
527
+ "internalType": "uint256",
528
+ "name": "addAmount",
529
+ "type": "uint256"
530
+ },
531
+ {
532
+ "indexed": false,
533
+ "internalType": "uint256",
534
+ "name": "newTotalReserves",
535
+ "type": "uint256"
536
+ }
537
+ ],
538
+ "name": "ReservesAdded",
539
+ "type": "event"
540
+ },
541
+ {
542
+ "anonymous": false,
543
+ "inputs": [
544
+ {
545
+ "indexed": false,
546
+ "internalType": "address",
547
+ "name": "protocolShareReserve",
548
+ "type": "address"
549
+ },
550
+ {
551
+ "indexed": false,
552
+ "internalType": "uint256",
553
+ "name": "reduceAmount",
554
+ "type": "uint256"
555
+ },
556
+ {
557
+ "indexed": false,
558
+ "internalType": "uint256",
559
+ "name": "newTotalReserves",
560
+ "type": "uint256"
561
+ }
562
+ ],
563
+ "name": "ReservesReduced",
564
+ "type": "event"
565
+ },
566
+ {
567
+ "anonymous": false,
568
+ "inputs": [
569
+ {
570
+ "indexed": true,
571
+ "internalType": "address",
572
+ "name": "from",
573
+ "type": "address"
574
+ },
575
+ {
576
+ "indexed": true,
577
+ "internalType": "address",
578
+ "name": "to",
579
+ "type": "address"
580
+ },
581
+ {
582
+ "indexed": false,
583
+ "internalType": "uint256",
584
+ "name": "amount",
585
+ "type": "uint256"
586
+ }
587
+ ],
588
+ "name": "Transfer",
589
+ "type": "event"
590
+ },
591
+ {
592
+ "stateMutability": "nonpayable",
593
+ "type": "fallback"
594
+ },
595
+ {
596
+ "inputs": [],
597
+ "name": "_acceptAdmin",
598
+ "outputs": [
599
+ {
600
+ "internalType": "uint256",
601
+ "name": "",
602
+ "type": "uint256"
603
+ }
604
+ ],
605
+ "stateMutability": "nonpayable",
606
+ "type": "function"
607
+ },
608
+ {
609
+ "inputs": [
610
+ {
611
+ "internalType": "uint256",
612
+ "name": "addAmount",
613
+ "type": "uint256"
614
+ }
615
+ ],
616
+ "name": "_addReserves",
617
+ "outputs": [
618
+ {
619
+ "internalType": "uint256",
620
+ "name": "",
621
+ "type": "uint256"
622
+ }
623
+ ],
624
+ "stateMutability": "nonpayable",
625
+ "type": "function"
626
+ },
627
+ {
628
+ "inputs": [
629
+ {
630
+ "internalType": "uint256",
631
+ "name": "reduceAmount",
632
+ "type": "uint256"
633
+ }
634
+ ],
635
+ "name": "_reduceReserves",
636
+ "outputs": [
637
+ {
638
+ "internalType": "uint256",
639
+ "name": "",
640
+ "type": "uint256"
641
+ }
642
+ ],
643
+ "stateMutability": "nonpayable",
644
+ "type": "function"
645
+ },
646
+ {
647
+ "inputs": [
648
+ {
649
+ "internalType": "contract ComptrollerInterface",
650
+ "name": "newComptroller",
651
+ "type": "address"
652
+ }
653
+ ],
654
+ "name": "_setComptroller",
655
+ "outputs": [
656
+ {
657
+ "internalType": "uint256",
658
+ "name": "",
659
+ "type": "uint256"
660
+ }
661
+ ],
662
+ "stateMutability": "nonpayable",
663
+ "type": "function"
664
+ },
665
+ {
666
+ "inputs": [
667
+ {
668
+ "internalType": "address",
669
+ "name": "implementation_",
670
+ "type": "address"
671
+ },
672
+ {
673
+ "internalType": "bool",
674
+ "name": "allowResign",
675
+ "type": "bool"
676
+ },
677
+ {
678
+ "internalType": "bytes",
679
+ "name": "becomeImplementationData",
680
+ "type": "bytes"
681
+ }
682
+ ],
683
+ "name": "_setImplementation",
684
+ "outputs": [],
685
+ "stateMutability": "nonpayable",
686
+ "type": "function"
687
+ },
688
+ {
689
+ "inputs": [
690
+ {
691
+ "internalType": "contract InterestRateModelV8",
692
+ "name": "newInterestRateModel",
693
+ "type": "address"
694
+ }
695
+ ],
696
+ "name": "_setInterestRateModel",
697
+ "outputs": [
698
+ {
699
+ "internalType": "uint256",
700
+ "name": "",
701
+ "type": "uint256"
702
+ }
703
+ ],
704
+ "stateMutability": "nonpayable",
705
+ "type": "function"
706
+ },
707
+ {
708
+ "inputs": [
709
+ {
710
+ "internalType": "address payable",
711
+ "name": "newPendingAdmin",
712
+ "type": "address"
713
+ }
714
+ ],
715
+ "name": "_setPendingAdmin",
716
+ "outputs": [
717
+ {
718
+ "internalType": "uint256",
719
+ "name": "",
720
+ "type": "uint256"
721
+ }
722
+ ],
723
+ "stateMutability": "nonpayable",
724
+ "type": "function"
725
+ },
726
+ {
727
+ "inputs": [
728
+ {
729
+ "internalType": "uint256",
730
+ "name": "newReserveFactorMantissa",
731
+ "type": "uint256"
732
+ }
733
+ ],
734
+ "name": "_setReserveFactor",
735
+ "outputs": [
736
+ {
737
+ "internalType": "uint256",
738
+ "name": "",
739
+ "type": "uint256"
740
+ }
741
+ ],
742
+ "stateMutability": "nonpayable",
743
+ "type": "function"
744
+ },
745
+ {
746
+ "inputs": [],
747
+ "name": "accessControlManager",
748
+ "outputs": [
749
+ {
750
+ "internalType": "address",
751
+ "name": "",
752
+ "type": "address"
753
+ }
754
+ ],
755
+ "stateMutability": "view",
756
+ "type": "function"
757
+ },
758
+ {
759
+ "inputs": [],
760
+ "name": "accrualBlockNumber",
761
+ "outputs": [
762
+ {
763
+ "internalType": "uint256",
764
+ "name": "",
765
+ "type": "uint256"
766
+ }
767
+ ],
768
+ "stateMutability": "view",
769
+ "type": "function"
770
+ },
771
+ {
772
+ "inputs": [],
773
+ "name": "accrueInterest",
774
+ "outputs": [
775
+ {
776
+ "internalType": "uint256",
777
+ "name": "",
778
+ "type": "uint256"
779
+ }
780
+ ],
781
+ "stateMutability": "nonpayable",
782
+ "type": "function"
783
+ },
784
+ {
785
+ "inputs": [],
786
+ "name": "admin",
787
+ "outputs": [
788
+ {
789
+ "internalType": "address payable",
790
+ "name": "",
791
+ "type": "address"
792
+ }
793
+ ],
794
+ "stateMutability": "view",
795
+ "type": "function"
796
+ },
797
+ {
798
+ "inputs": [
799
+ {
800
+ "internalType": "address",
801
+ "name": "owner",
802
+ "type": "address"
803
+ },
804
+ {
805
+ "internalType": "address",
806
+ "name": "spender",
807
+ "type": "address"
808
+ }
809
+ ],
810
+ "name": "allowance",
811
+ "outputs": [
812
+ {
813
+ "internalType": "uint256",
814
+ "name": "",
815
+ "type": "uint256"
816
+ }
817
+ ],
818
+ "stateMutability": "view",
819
+ "type": "function"
820
+ },
821
+ {
822
+ "inputs": [
823
+ {
824
+ "internalType": "address",
825
+ "name": "spender",
826
+ "type": "address"
827
+ },
828
+ {
829
+ "internalType": "uint256",
830
+ "name": "amount",
831
+ "type": "uint256"
832
+ }
833
+ ],
834
+ "name": "approve",
835
+ "outputs": [
836
+ {
837
+ "internalType": "bool",
838
+ "name": "",
839
+ "type": "bool"
840
+ }
841
+ ],
842
+ "stateMutability": "nonpayable",
843
+ "type": "function"
844
+ },
845
+ {
846
+ "inputs": [
847
+ {
848
+ "internalType": "address",
849
+ "name": "owner",
850
+ "type": "address"
851
+ }
852
+ ],
853
+ "name": "balanceOf",
854
+ "outputs": [
855
+ {
856
+ "internalType": "uint256",
857
+ "name": "",
858
+ "type": "uint256"
859
+ }
860
+ ],
861
+ "stateMutability": "view",
862
+ "type": "function"
863
+ },
864
+ {
865
+ "inputs": [
866
+ {
867
+ "internalType": "address",
868
+ "name": "owner",
869
+ "type": "address"
870
+ }
871
+ ],
872
+ "name": "balanceOfUnderlying",
873
+ "outputs": [
874
+ {
875
+ "internalType": "uint256",
876
+ "name": "",
877
+ "type": "uint256"
878
+ }
879
+ ],
880
+ "stateMutability": "nonpayable",
881
+ "type": "function"
882
+ },
883
+ {
884
+ "inputs": [
885
+ {
886
+ "internalType": "uint256",
887
+ "name": "borrowAmount",
888
+ "type": "uint256"
889
+ }
890
+ ],
891
+ "name": "borrow",
892
+ "outputs": [
893
+ {
894
+ "internalType": "uint256",
895
+ "name": "",
896
+ "type": "uint256"
897
+ }
898
+ ],
899
+ "stateMutability": "nonpayable",
900
+ "type": "function"
901
+ },
902
+ {
903
+ "inputs": [
904
+ {
905
+ "internalType": "address",
906
+ "name": "account",
907
+ "type": "address"
908
+ }
909
+ ],
910
+ "name": "borrowBalanceCurrent",
911
+ "outputs": [
912
+ {
913
+ "internalType": "uint256",
914
+ "name": "",
915
+ "type": "uint256"
916
+ }
917
+ ],
918
+ "stateMutability": "nonpayable",
919
+ "type": "function"
920
+ },
921
+ {
922
+ "inputs": [
923
+ {
924
+ "internalType": "address",
925
+ "name": "account",
926
+ "type": "address"
927
+ }
928
+ ],
929
+ "name": "borrowBalanceStored",
930
+ "outputs": [
931
+ {
932
+ "internalType": "uint256",
933
+ "name": "",
934
+ "type": "uint256"
935
+ }
936
+ ],
937
+ "stateMutability": "view",
938
+ "type": "function"
939
+ },
940
+ {
941
+ "inputs": [],
942
+ "name": "borrowIndex",
943
+ "outputs": [
944
+ {
945
+ "internalType": "uint256",
946
+ "name": "",
947
+ "type": "uint256"
948
+ }
949
+ ],
950
+ "stateMutability": "view",
951
+ "type": "function"
952
+ },
953
+ {
954
+ "inputs": [],
955
+ "name": "borrowRatePerBlock",
956
+ "outputs": [
957
+ {
958
+ "internalType": "uint256",
959
+ "name": "",
960
+ "type": "uint256"
961
+ }
962
+ ],
963
+ "stateMutability": "view",
964
+ "type": "function"
965
+ },
966
+ {
967
+ "inputs": [],
968
+ "name": "comptroller",
969
+ "outputs": [
970
+ {
971
+ "internalType": "contract ComptrollerInterface",
972
+ "name": "",
973
+ "type": "address"
974
+ }
975
+ ],
976
+ "stateMutability": "view",
977
+ "type": "function"
978
+ },
979
+ {
980
+ "inputs": [],
981
+ "name": "decimals",
982
+ "outputs": [
983
+ {
984
+ "internalType": "uint8",
985
+ "name": "",
986
+ "type": "uint8"
987
+ }
988
+ ],
989
+ "stateMutability": "view",
990
+ "type": "function"
991
+ },
992
+ {
993
+ "inputs": [
994
+ {
995
+ "internalType": "bytes",
996
+ "name": "data",
997
+ "type": "bytes"
998
+ }
999
+ ],
1000
+ "name": "delegateToImplementation",
1001
+ "outputs": [
1002
+ {
1003
+ "internalType": "bytes",
1004
+ "name": "",
1005
+ "type": "bytes"
1006
+ }
1007
+ ],
1008
+ "stateMutability": "nonpayable",
1009
+ "type": "function"
1010
+ },
1011
+ {
1012
+ "inputs": [
1013
+ {
1014
+ "internalType": "bytes",
1015
+ "name": "data",
1016
+ "type": "bytes"
1017
+ }
1018
+ ],
1019
+ "name": "delegateToViewImplementation",
1020
+ "outputs": [
1021
+ {
1022
+ "internalType": "bytes",
1023
+ "name": "",
1024
+ "type": "bytes"
1025
+ }
1026
+ ],
1027
+ "stateMutability": "view",
1028
+ "type": "function"
1029
+ },
1030
+ {
1031
+ "inputs": [],
1032
+ "name": "exchangeRateCurrent",
1033
+ "outputs": [
1034
+ {
1035
+ "internalType": "uint256",
1036
+ "name": "",
1037
+ "type": "uint256"
1038
+ }
1039
+ ],
1040
+ "stateMutability": "nonpayable",
1041
+ "type": "function"
1042
+ },
1043
+ {
1044
+ "inputs": [],
1045
+ "name": "exchangeRateStored",
1046
+ "outputs": [
1047
+ {
1048
+ "internalType": "uint256",
1049
+ "name": "",
1050
+ "type": "uint256"
1051
+ }
1052
+ ],
1053
+ "stateMutability": "view",
1054
+ "type": "function"
1055
+ },
1056
+ {
1057
+ "inputs": [
1058
+ {
1059
+ "internalType": "address",
1060
+ "name": "account",
1061
+ "type": "address"
1062
+ }
1063
+ ],
1064
+ "name": "getAccountSnapshot",
1065
+ "outputs": [
1066
+ {
1067
+ "internalType": "uint256",
1068
+ "name": "",
1069
+ "type": "uint256"
1070
+ },
1071
+ {
1072
+ "internalType": "uint256",
1073
+ "name": "",
1074
+ "type": "uint256"
1075
+ },
1076
+ {
1077
+ "internalType": "uint256",
1078
+ "name": "",
1079
+ "type": "uint256"
1080
+ },
1081
+ {
1082
+ "internalType": "uint256",
1083
+ "name": "",
1084
+ "type": "uint256"
1085
+ }
1086
+ ],
1087
+ "stateMutability": "view",
1088
+ "type": "function"
1089
+ },
1090
+ {
1091
+ "inputs": [],
1092
+ "name": "getCash",
1093
+ "outputs": [
1094
+ {
1095
+ "internalType": "uint256",
1096
+ "name": "",
1097
+ "type": "uint256"
1098
+ }
1099
+ ],
1100
+ "stateMutability": "view",
1101
+ "type": "function"
1102
+ },
1103
+ {
1104
+ "inputs": [],
1105
+ "name": "implementation",
1106
+ "outputs": [
1107
+ {
1108
+ "internalType": "address",
1109
+ "name": "",
1110
+ "type": "address"
1111
+ }
1112
+ ],
1113
+ "stateMutability": "view",
1114
+ "type": "function"
1115
+ },
1116
+ {
1117
+ "inputs": [],
1118
+ "name": "interestRateModel",
1119
+ "outputs": [
1120
+ {
1121
+ "internalType": "contract InterestRateModelV8",
1122
+ "name": "",
1123
+ "type": "address"
1124
+ }
1125
+ ],
1126
+ "stateMutability": "view",
1127
+ "type": "function"
1128
+ },
1129
+ {
1130
+ "inputs": [],
1131
+ "name": "isVToken",
1132
+ "outputs": [
1133
+ {
1134
+ "internalType": "bool",
1135
+ "name": "",
1136
+ "type": "bool"
1137
+ }
1138
+ ],
1139
+ "stateMutability": "view",
1140
+ "type": "function"
1141
+ },
1142
+ {
1143
+ "inputs": [
1144
+ {
1145
+ "internalType": "address",
1146
+ "name": "borrower",
1147
+ "type": "address"
1148
+ },
1149
+ {
1150
+ "internalType": "uint256",
1151
+ "name": "repayAmount",
1152
+ "type": "uint256"
1153
+ },
1154
+ {
1155
+ "internalType": "contract VTokenInterface",
1156
+ "name": "vTokenCollateral",
1157
+ "type": "address"
1158
+ }
1159
+ ],
1160
+ "name": "liquidateBorrow",
1161
+ "outputs": [
1162
+ {
1163
+ "internalType": "uint256",
1164
+ "name": "",
1165
+ "type": "uint256"
1166
+ }
1167
+ ],
1168
+ "stateMutability": "nonpayable",
1169
+ "type": "function"
1170
+ },
1171
+ {
1172
+ "inputs": [
1173
+ {
1174
+ "internalType": "uint256",
1175
+ "name": "mintAmount",
1176
+ "type": "uint256"
1177
+ }
1178
+ ],
1179
+ "name": "mint",
1180
+ "outputs": [
1181
+ {
1182
+ "internalType": "uint256",
1183
+ "name": "",
1184
+ "type": "uint256"
1185
+ }
1186
+ ],
1187
+ "stateMutability": "nonpayable",
1188
+ "type": "function"
1189
+ },
1190
+ {
1191
+ "inputs": [
1192
+ {
1193
+ "internalType": "address",
1194
+ "name": "receiver",
1195
+ "type": "address"
1196
+ },
1197
+ {
1198
+ "internalType": "uint256",
1199
+ "name": "mintAmount",
1200
+ "type": "uint256"
1201
+ }
1202
+ ],
1203
+ "name": "mintBehalf",
1204
+ "outputs": [
1205
+ {
1206
+ "internalType": "uint256",
1207
+ "name": "",
1208
+ "type": "uint256"
1209
+ }
1210
+ ],
1211
+ "stateMutability": "nonpayable",
1212
+ "type": "function"
1213
+ },
1214
+ {
1215
+ "inputs": [],
1216
+ "name": "name",
1217
+ "outputs": [
1218
+ {
1219
+ "internalType": "string",
1220
+ "name": "",
1221
+ "type": "string"
1222
+ }
1223
+ ],
1224
+ "stateMutability": "view",
1225
+ "type": "function"
1226
+ },
1227
+ {
1228
+ "inputs": [],
1229
+ "name": "pendingAdmin",
1230
+ "outputs": [
1231
+ {
1232
+ "internalType": "address payable",
1233
+ "name": "",
1234
+ "type": "address"
1235
+ }
1236
+ ],
1237
+ "stateMutability": "view",
1238
+ "type": "function"
1239
+ },
1240
+ {
1241
+ "inputs": [],
1242
+ "name": "protocolShareReserve",
1243
+ "outputs": [
1244
+ {
1245
+ "internalType": "address payable",
1246
+ "name": "",
1247
+ "type": "address"
1248
+ }
1249
+ ],
1250
+ "stateMutability": "view",
1251
+ "type": "function"
1252
+ },
1253
+ {
1254
+ "inputs": [
1255
+ {
1256
+ "internalType": "uint256",
1257
+ "name": "redeemTokens",
1258
+ "type": "uint256"
1259
+ }
1260
+ ],
1261
+ "name": "redeem",
1262
+ "outputs": [
1263
+ {
1264
+ "internalType": "uint256",
1265
+ "name": "",
1266
+ "type": "uint256"
1267
+ }
1268
+ ],
1269
+ "stateMutability": "nonpayable",
1270
+ "type": "function"
1271
+ },
1272
+ {
1273
+ "inputs": [
1274
+ {
1275
+ "internalType": "uint256",
1276
+ "name": "redeemAmount",
1277
+ "type": "uint256"
1278
+ }
1279
+ ],
1280
+ "name": "redeemUnderlying",
1281
+ "outputs": [
1282
+ {
1283
+ "internalType": "uint256",
1284
+ "name": "",
1285
+ "type": "uint256"
1286
+ }
1287
+ ],
1288
+ "stateMutability": "nonpayable",
1289
+ "type": "function"
1290
+ },
1291
+ {
1292
+ "inputs": [],
1293
+ "name": "reduceReservesBlockDelta",
1294
+ "outputs": [
1295
+ {
1296
+ "internalType": "uint256",
1297
+ "name": "",
1298
+ "type": "uint256"
1299
+ }
1300
+ ],
1301
+ "stateMutability": "view",
1302
+ "type": "function"
1303
+ },
1304
+ {
1305
+ "inputs": [],
1306
+ "name": "reduceReservesBlockNumber",
1307
+ "outputs": [
1308
+ {
1309
+ "internalType": "uint256",
1310
+ "name": "",
1311
+ "type": "uint256"
1312
+ }
1313
+ ],
1314
+ "stateMutability": "view",
1315
+ "type": "function"
1316
+ },
1317
+ {
1318
+ "inputs": [
1319
+ {
1320
+ "internalType": "uint256",
1321
+ "name": "repayAmount",
1322
+ "type": "uint256"
1323
+ }
1324
+ ],
1325
+ "name": "repayBorrow",
1326
+ "outputs": [
1327
+ {
1328
+ "internalType": "uint256",
1329
+ "name": "",
1330
+ "type": "uint256"
1331
+ }
1332
+ ],
1333
+ "stateMutability": "nonpayable",
1334
+ "type": "function"
1335
+ },
1336
+ {
1337
+ "inputs": [
1338
+ {
1339
+ "internalType": "address",
1340
+ "name": "borrower",
1341
+ "type": "address"
1342
+ },
1343
+ {
1344
+ "internalType": "uint256",
1345
+ "name": "repayAmount",
1346
+ "type": "uint256"
1347
+ }
1348
+ ],
1349
+ "name": "repayBorrowBehalf",
1350
+ "outputs": [
1351
+ {
1352
+ "internalType": "uint256",
1353
+ "name": "",
1354
+ "type": "uint256"
1355
+ }
1356
+ ],
1357
+ "stateMutability": "nonpayable",
1358
+ "type": "function"
1359
+ },
1360
+ {
1361
+ "inputs": [],
1362
+ "name": "reserveFactorMantissa",
1363
+ "outputs": [
1364
+ {
1365
+ "internalType": "uint256",
1366
+ "name": "",
1367
+ "type": "uint256"
1368
+ }
1369
+ ],
1370
+ "stateMutability": "view",
1371
+ "type": "function"
1372
+ },
1373
+ {
1374
+ "inputs": [
1375
+ {
1376
+ "internalType": "address",
1377
+ "name": "liquidator",
1378
+ "type": "address"
1379
+ },
1380
+ {
1381
+ "internalType": "address",
1382
+ "name": "borrower",
1383
+ "type": "address"
1384
+ },
1385
+ {
1386
+ "internalType": "uint256",
1387
+ "name": "seizeTokens",
1388
+ "type": "uint256"
1389
+ }
1390
+ ],
1391
+ "name": "seize",
1392
+ "outputs": [
1393
+ {
1394
+ "internalType": "uint256",
1395
+ "name": "",
1396
+ "type": "uint256"
1397
+ }
1398
+ ],
1399
+ "stateMutability": "nonpayable",
1400
+ "type": "function"
1401
+ },
1402
+ {
1403
+ "inputs": [],
1404
+ "name": "supplyRatePerBlock",
1405
+ "outputs": [
1406
+ {
1407
+ "internalType": "uint256",
1408
+ "name": "",
1409
+ "type": "uint256"
1410
+ }
1411
+ ],
1412
+ "stateMutability": "view",
1413
+ "type": "function"
1414
+ },
1415
+ {
1416
+ "inputs": [],
1417
+ "name": "symbol",
1418
+ "outputs": [
1419
+ {
1420
+ "internalType": "string",
1421
+ "name": "",
1422
+ "type": "string"
1423
+ }
1424
+ ],
1425
+ "stateMutability": "view",
1426
+ "type": "function"
1427
+ },
1428
+ {
1429
+ "inputs": [],
1430
+ "name": "totalBorrows",
1431
+ "outputs": [
1432
+ {
1433
+ "internalType": "uint256",
1434
+ "name": "",
1435
+ "type": "uint256"
1436
+ }
1437
+ ],
1438
+ "stateMutability": "view",
1439
+ "type": "function"
1440
+ },
1441
+ {
1442
+ "inputs": [],
1443
+ "name": "totalBorrowsCurrent",
1444
+ "outputs": [
1445
+ {
1446
+ "internalType": "uint256",
1447
+ "name": "",
1448
+ "type": "uint256"
1449
+ }
1450
+ ],
1451
+ "stateMutability": "nonpayable",
1452
+ "type": "function"
1453
+ },
1454
+ {
1455
+ "inputs": [],
1456
+ "name": "totalReserves",
1457
+ "outputs": [
1458
+ {
1459
+ "internalType": "uint256",
1460
+ "name": "",
1461
+ "type": "uint256"
1462
+ }
1463
+ ],
1464
+ "stateMutability": "view",
1465
+ "type": "function"
1466
+ },
1467
+ {
1468
+ "inputs": [],
1469
+ "name": "totalSupply",
1470
+ "outputs": [
1471
+ {
1472
+ "internalType": "uint256",
1473
+ "name": "",
1474
+ "type": "uint256"
1475
+ }
1476
+ ],
1477
+ "stateMutability": "view",
1478
+ "type": "function"
1479
+ },
1480
+ {
1481
+ "inputs": [
1482
+ {
1483
+ "internalType": "address",
1484
+ "name": "dst",
1485
+ "type": "address"
1486
+ },
1487
+ {
1488
+ "internalType": "uint256",
1489
+ "name": "amount",
1490
+ "type": "uint256"
1491
+ }
1492
+ ],
1493
+ "name": "transfer",
1494
+ "outputs": [
1495
+ {
1496
+ "internalType": "bool",
1497
+ "name": "",
1498
+ "type": "bool"
1499
+ }
1500
+ ],
1501
+ "stateMutability": "nonpayable",
1502
+ "type": "function"
1503
+ },
1504
+ {
1505
+ "inputs": [
1506
+ {
1507
+ "internalType": "address",
1508
+ "name": "src",
1509
+ "type": "address"
1510
+ },
1511
+ {
1512
+ "internalType": "address",
1513
+ "name": "dst",
1514
+ "type": "address"
1515
+ },
1516
+ {
1517
+ "internalType": "uint256",
1518
+ "name": "amount",
1519
+ "type": "uint256"
1520
+ }
1521
+ ],
1522
+ "name": "transferFrom",
1523
+ "outputs": [
1524
+ {
1525
+ "internalType": "bool",
1526
+ "name": "",
1527
+ "type": "bool"
1528
+ }
1529
+ ],
1530
+ "stateMutability": "nonpayable",
1531
+ "type": "function"
1532
+ },
1533
+ {
1534
+ "inputs": [],
1535
+ "name": "underlying",
1536
+ "outputs": [
1537
+ {
1538
+ "internalType": "address",
1539
+ "name": "",
1540
+ "type": "address"
1541
+ }
1542
+ ],
1543
+ "stateMutability": "view",
1544
+ "type": "function"
1545
+ }
1546
+ ],
1547
+ "transactionHash": "0xb456c24d89e1b8e444ed2b64f96411973d25fa730547806a3b79f8b12327cb52",
1548
+ "receipt": {
1549
+ "to": null,
1550
+ "from": "0xe2a089cA69a90f1E27E723EFD339Cff4c4701AcC",
1551
+ "contractAddress": "0xaB5504A3cde0d8253E8F981D663c7Ff7128B3e56",
1552
+ "transactionIndex": 1,
1553
+ "gasUsed": "1737961",
1554
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000800000000000000000000080000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004100000000000000000000000000080000100004000000000000002000000000000000000000000000000000004000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
1555
+ "blockHash": "0x88ec2dc01506c063cf8eaf1da937c131c55edce2b9a0856213426cbff474de4c",
1556
+ "transactionHash": "0xb456c24d89e1b8e444ed2b64f96411973d25fa730547806a3b79f8b12327cb52",
1557
+ "logs": [
1558
+ {
1559
+ "transactionIndex": 1,
1560
+ "blockNumber": 67997066,
1561
+ "transactionHash": "0xb456c24d89e1b8e444ed2b64f96411973d25fa730547806a3b79f8b12327cb52",
1562
+ "address": "0xaB5504A3cde0d8253E8F981D663c7Ff7128B3e56",
1563
+ "topics": ["0x7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d"],
1564
+ "data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000094d1820b2d1c7c7452a163983dc888cec546b77d",
1565
+ "logIndex": 0,
1566
+ "blockHash": "0x88ec2dc01506c063cf8eaf1da937c131c55edce2b9a0856213426cbff474de4c"
1567
+ },
1568
+ {
1569
+ "transactionIndex": 1,
1570
+ "blockNumber": 67997066,
1571
+ "transactionHash": "0xb456c24d89e1b8e444ed2b64f96411973d25fa730547806a3b79f8b12327cb52",
1572
+ "address": "0xaB5504A3cde0d8253E8F981D663c7Ff7128B3e56",
1573
+ "topics": ["0xedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926"],
1574
+ "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000002afdf0f2377158cd45c12f4a5c70269baf15fcc5",
1575
+ "logIndex": 1,
1576
+ "blockHash": "0x88ec2dc01506c063cf8eaf1da937c131c55edce2b9a0856213426cbff474de4c"
1577
+ },
1578
+ {
1579
+ "transactionIndex": 1,
1580
+ "blockNumber": 67997066,
1581
+ "transactionHash": "0xb456c24d89e1b8e444ed2b64f96411973d25fa730547806a3b79f8b12327cb52",
1582
+ "address": "0xaB5504A3cde0d8253E8F981D663c7Ff7128B3e56",
1583
+ "topics": ["0xd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a"],
1584
+ "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000009c824eda64af04d160f9cb835c6ac95606077db0",
1585
+ "logIndex": 2,
1586
+ "blockHash": "0x88ec2dc01506c063cf8eaf1da937c131c55edce2b9a0856213426cbff474de4c"
1587
+ }
1588
+ ],
1589
+ "blockNumber": 67997066,
1590
+ "cumulativeGasUsed": "1758961",
1591
+ "status": 1,
1592
+ "byzantium": true
1593
+ },
1594
+ "args": [
1595
+ "0xd2aF6A916Bc77764dc63742BC30f71AF4cF423F4",
1596
+ "0x94d1820b2D1c7c7452A163983Dc888CEC546b77D",
1597
+ "0x2aFDF0f2377158cD45C12f4a5c70269baF15fcc5",
1598
+ "10000000000000000000000000000",
1599
+ "Venus slisBNB",
1600
+ "vslisBNB",
1601
+ 8,
1602
+ "0xce10739590001705F7FF231611ba4A48B2820327",
1603
+ "0x9c824EDa64aF04D160F9cB835C6AC95606077db0",
1604
+ "0x"
1605
+ ],
1606
+ "numDeployments": 1,
1607
+ "solcInputHash": "9efc82db634d8086473f073ee7fc0a38",
1608
+ "metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"underlying_\",\"type\":\"address\"},{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"comptroller_\",\"type\":\"address\"},{\"internalType\":\"contract InterestRateModelV8\",\"name\":\"interestRateModel_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialExchangeRateMantissa_\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"},{\"internalType\":\"uint8\",\"name\":\"decimals_\",\"type\":\"uint8\"},{\"internalType\":\"address payable\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"becomeImplementationData\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"cashPrior\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"interestAccumulated\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"AccrueInterest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"Borrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"vTokenCollateral\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"LiquidateBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"mintTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"MintBehalf\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAccessControlAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAccessControlAddress\",\"type\":\"address\"}],\"name\":\"NewAccessControlManager\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"NewAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"oldComptroller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"NewComptroller\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldImplementation\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"NewImplementation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract InterestRateModelV8\",\"name\":\"oldInterestRateModel\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contract InterestRateModelV8\",\"name\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"NewMarketInterestRateModel\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldPendingAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"NewPendingAdmin\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldProtocolShareReserve\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newProtocolShareReserve\",\"type\":\"address\"}],\"name\":\"NewProtocolShareReserve\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReduceReservesBlockDelta\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReduceReservesBlockDelta\",\"type\":\"uint256\"}],\"name\":\"NewReduceReservesBlockDelta\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldReserveFactorMantissa\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"NewReserveFactor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"RedeemFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"accountBorrows\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalBorrows\",\"type\":\"uint256\"}],\"name\":\"RepayBorrow\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"benefactor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"protocolShareReserve\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalReserves\",\"type\":\"uint256\"}],\"name\":\"ReservesReduced\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"_acceptAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"addAmount\",\"type\":\"uint256\"}],\"name\":\"_addReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"reduceAmount\",\"type\":\"uint256\"}],\"name\":\"_reduceReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"newComptroller\",\"type\":\"address\"}],\"name\":\"_setComptroller\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowResign\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"becomeImplementationData\",\"type\":\"bytes\"}],\"name\":\"_setImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract InterestRateModelV8\",\"name\":\"newInterestRateModel\",\"type\":\"address\"}],\"name\":\"_setInterestRateModel\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"newPendingAdmin\",\"type\":\"address\"}],\"name\":\"_setPendingAdmin\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newReserveFactorMantissa\",\"type\":\"uint256\"}],\"name\":\"_setReserveFactor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accessControlManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accrualBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accrueInterest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"borrowAmount\",\"type\":\"uint256\"}],\"name\":\"borrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"borrowBalanceStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"borrowIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"borrowRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"comptroller\",\"outputs\":[{\"internalType\":\"contract ComptrollerInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"delegateToImplementation\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"delegateToViewImplementation\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exchangeRateCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exchangeRateStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountSnapshot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"interestRateModel\",\"outputs\":[{\"internalType\":\"contract InterestRateModelV8\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isVToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"},{\"internalType\":\"contract VTokenInterface\",\"name\":\"vTokenCollateral\",\"type\":\"address\"}],\"name\":\"liquidateBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mintBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pendingAdmin\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolShareReserve\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reduceReservesBlockDelta\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reduceReservesBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayBorrowBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"reserveFactorMantissa\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"borrower\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"seizeTokens\",\"type\":\"uint256\"}],\"name\":\"seize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supplyRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBorrows\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalBorrowsCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalReserves\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"underlying\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"_acceptAdmin()\":{\"details\":\"Admin function for pending admin to accept role and update admin\",\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"_addReserves(uint256)\":{\"params\":{\"addAmount\":\"Amount of reserves to add\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"_reduceReserves(uint256)\":{\"params\":{\"reduceAmount\":\"Amount of reduction to reserves\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"_setComptroller(address)\":{\"details\":\"Admin function to set a new comptroller\",\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"_setImplementation(address,bool,bytes)\":{\"params\":{\"allowResign\":\"Flag to indicate whether to call _resignImplementation on the old implementation\",\"becomeImplementationData\":\"The encoded bytes data to be passed to _becomeImplementation\",\"implementation_\":\"The address of the new implementation for delegation\"}},\"_setInterestRateModel(address)\":{\"details\":\"Admin function to accrue interest and update the interest rate model\",\"params\":{\"newInterestRateModel\":\"The new interest rate model to use\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"_setPendingAdmin(address)\":{\"details\":\"Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\",\"params\":{\"newPendingAdmin\":\"New pending admin.\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"_setReserveFactor(uint256)\":{\"details\":\"Admin function to accrue interest and set a new reserve factor\",\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"accrueInterest()\":{\"details\":\"This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage.\"},\"allowance(address,address)\":{\"params\":{\"owner\":\"The address of the account which owns the tokens to be spent\",\"spender\":\"The address of the account which may transfer tokens\"},\"returns\":{\"_0\":\"The number of tokens allowed to be spent (type(uint256).max means infinite)\"}},\"approve(address,uint256)\":{\"details\":\"This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\",\"params\":{\"amount\":\"The number of tokens that are approved (type(uint256).max means infinite)\",\"spender\":\"The address of the account which may transfer tokens\"},\"returns\":{\"_0\":\"Whether or not the approval succeeded\"}},\"balanceOf(address)\":{\"params\":{\"owner\":\"The address of the account to query\"},\"returns\":{\"_0\":\"The number of tokens owned by `owner`\"}},\"balanceOfUnderlying(address)\":{\"details\":\"This also accrues interest in a transaction\",\"params\":{\"owner\":\"The address of the account to query\"},\"returns\":{\"_0\":\"The amount of underlying owned by `owner`\"}},\"borrow(uint256)\":{\"params\":{\"borrowAmount\":\"The amount of the underlying asset to borrow\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"borrowBalanceCurrent(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated after updating borrowIndex\"},\"returns\":{\"_0\":\"The calculated balance\"}},\"borrowBalanceStored(address)\":{\"params\":{\"account\":\"The address whose balance should be calculated\"},\"returns\":{\"_0\":\"The calculated balance\"}},\"borrowRatePerBlock()\":{\"returns\":{\"_0\":\"The borrow interest rate per block, scaled by 1e18\"}},\"constructor\":{\"params\":{\"admin_\":\"Address of the administrator of this token\",\"becomeImplementationData\":\"The encoded args for becomeImplementation\",\"comptroller_\":\"The address of the comptroller\",\"decimals_\":\"BEP-20 decimal precision of this token\",\"implementation_\":\"The address of the implementation the contract delegates to\",\"initialExchangeRateMantissa_\":\"The initial exchange rate, scaled by 1e18\",\"interestRateModel_\":\"The address of the interest rate model\",\"name_\":\"BEP-20 name of this token\",\"symbol_\":\"BEP-20 symbol of this token\",\"underlying_\":\"The address of the underlying asset\"}},\"delegateToImplementation(bytes)\":{\"details\":\"It returns to the external caller whatever the implementation returns or forwards reverts\",\"params\":{\"data\":\"The raw data to delegatecall\"},\"returns\":{\"_0\":\"The returned bytes from the delegatecall\"}},\"delegateToViewImplementation(bytes)\":{\"details\":\"It returns to the external caller whatever the implementation returns or forwards reverts There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\",\"params\":{\"data\":\"The raw data to delegatecall\"},\"returns\":{\"_0\":\"The returned bytes from the delegatecall\"}},\"exchangeRateCurrent()\":{\"returns\":{\"_0\":\"Calculated exchange rate scaled by 1e18\"}},\"exchangeRateStored()\":{\"details\":\"This function does not accrue interest before calculating the exchange rate\",\"returns\":{\"_0\":\"Calculated exchange rate scaled by 1e18\"}},\"getAccountSnapshot(address)\":{\"details\":\"This is used by comptroller to more efficiently perform liquidity checks.\",\"params\":{\"account\":\"Address of the account to snapshot\"},\"returns\":{\"_0\":\"(possible error, token balance, borrow balance, exchange rate mantissa)\"}},\"getCash()\":{\"returns\":{\"_0\":\"The quantity of underlying asset owned by this contract\"}},\"liquidateBorrow(address,uint256,address)\":{\"params\":{\"borrower\":\"The borrower of this vToken to be liquidated\",\"repayAmount\":\"The amount of the underlying borrowed asset to repay\",\"vTokenCollateral\":\"The market in which to seize collateral from the borrower\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"mint(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"mintBehalf(address,uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"redeem(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemTokens\":\"The number of vTokens to redeem into underlying asset\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"redeemUnderlying(uint256)\":{\"details\":\"Accrues interest whether or not the operation succeeds, unless reverted\",\"params\":{\"redeemAmount\":\"The amount of underlying to redeem\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"repayBorrow(uint256)\":{\"params\":{\"repayAmount\":\"The amount to repay\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"repayBorrowBehalf(address,uint256)\":{\"params\":{\"borrower\":\"The account with the debt being payed off\",\"repayAmount\":\"The amount to repay\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"seize(address,address,uint256)\":{\"details\":\"Will fail unless called by another vToken during the process of liquidation. It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\",\"params\":{\"borrower\":\"The account having collateral seized\",\"liquidator\":\"The account receiving seized collateral\",\"seizeTokens\":\"The number of vTokens to seize\"},\"returns\":{\"_0\":\"uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\"}},\"supplyRatePerBlock()\":{\"returns\":{\"_0\":\"The supply interest rate per block, scaled by 1e18\"}},\"totalBorrowsCurrent()\":{\"returns\":{\"_0\":\"The total borrows with interest\"}},\"transfer(address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\"},\"returns\":{\"_0\":\"Whether or not the transfer succeeded\"}},\"transferFrom(address,address,uint256)\":{\"params\":{\"amount\":\"The number of tokens to transfer\",\"dst\":\"The address of the destination account\",\"src\":\"The address of the source account\"},\"returns\":{\"_0\":\"Whether or not the transfer succeeded\"}}},\"title\":\"Venus's VBep20Delegator Contract\",\"version\":1},\"userdoc\":{\"events\":{\"AccrueInterest(uint256,uint256,uint256,uint256)\":{\"notice\":\"Event emitted when interest is accrued\"},\"Approval(address,address,uint256)\":{\"notice\":\"EIP20 Approval event\"},\"Borrow(address,uint256,uint256,uint256)\":{\"notice\":\"Event emitted when underlying is borrowed\"},\"LiquidateBorrow(address,address,uint256,address,uint256)\":{\"notice\":\"Event emitted when a borrow is liquidated\"},\"Mint(address,uint256,uint256,uint256)\":{\"notice\":\"Event emitted when tokens are minted\"},\"MintBehalf(address,address,uint256,uint256,uint256)\":{\"notice\":\"Event emitted when tokens are minted behalf by payer to receiver\"},\"NewAccessControlManager(address,address)\":{\"notice\":\"Emitted when access control address is changed by admin\"},\"NewAdmin(address,address)\":{\"notice\":\"Event emitted when pendingAdmin is accepted, which means admin has been updated\"},\"NewComptroller(address,address)\":{\"notice\":\"Event emitted when comptroller is changed\"},\"NewImplementation(address,address)\":{\"notice\":\"Emitted when implementation is changed\"},\"NewMarketInterestRateModel(address,address)\":{\"notice\":\"Event emitted when interestRateModel is changed\"},\"NewPendingAdmin(address,address)\":{\"notice\":\"Event emitted when pendingAdmin is changed\"},\"NewProtocolShareReserve(address,address)\":{\"notice\":\"Event emitted when address of ProtocolShareReserve contract get updated\"},\"NewReduceReservesBlockDelta(uint256,uint256)\":{\"notice\":\"Event emitted when block delta for reduce reserves get updated\"},\"NewReserveFactor(uint256,uint256)\":{\"notice\":\"Event emitted when the reserve factor is changed\"},\"Redeem(address,uint256,uint256,uint256)\":{\"notice\":\"Event emitted when tokens are redeemed\"},\"RedeemFee(address,uint256,uint256)\":{\"notice\":\"Event emitted when tokens are redeemed and fee is transferred\"},\"RepayBorrow(address,address,uint256,uint256,uint256)\":{\"notice\":\"Event emitted when a borrow is repaid\"},\"ReservesAdded(address,uint256,uint256)\":{\"notice\":\"Event emitted when the reserves are added\"},\"ReservesReduced(address,uint256,uint256)\":{\"notice\":\"Event emitted when the reserves are reduced\"},\"Transfer(address,address,uint256)\":{\"notice\":\"EIP20 Transfer event\"}},\"kind\":\"user\",\"methods\":{\"_acceptAdmin()\":{\"notice\":\"Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\"},\"_addReserves(uint256)\":{\"notice\":\"Accrues interest and adds reserves by transferring from admin\"},\"_reduceReserves(uint256)\":{\"notice\":\"Accrues interest and reduces reserves by transferring to admin\"},\"_setComptroller(address)\":{\"notice\":\"Sets a new comptroller for the market\"},\"_setImplementation(address,bool,bytes)\":{\"notice\":\"Called by the admin to update the implementation of the delegator\"},\"_setInterestRateModel(address)\":{\"notice\":\"Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\"},\"_setPendingAdmin(address)\":{\"notice\":\"Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\"},\"_setReserveFactor(uint256)\":{\"notice\":\"Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\"},\"accessControlManager()\":{\"notice\":\"address of accessControlManager\"},\"accrualBlockNumber()\":{\"notice\":\"Block number that interest was last accrued at\"},\"accrueInterest()\":{\"notice\":\"Applies accrued interest to total borrows and reserves.\"},\"admin()\":{\"notice\":\"Administrator for this contract\"},\"allowance(address,address)\":{\"notice\":\"Get the current allowance from `owner` for `spender`\"},\"approve(address,uint256)\":{\"notice\":\"Approve `spender` to transfer up to `amount` from `src`\"},\"balanceOf(address)\":{\"notice\":\"Get the token balance of the `owner`\"},\"balanceOfUnderlying(address)\":{\"notice\":\"Get the underlying balance of the `owner`\"},\"borrow(uint256)\":{\"notice\":\"Sender borrows assets from the protocol to their own address\"},\"borrowBalanceCurrent(address)\":{\"notice\":\"Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\"},\"borrowBalanceStored(address)\":{\"notice\":\"Return the borrow balance of account based on stored data\"},\"borrowIndex()\":{\"notice\":\"Accumulator of the total earned interest rate since the opening of the market\"},\"borrowRatePerBlock()\":{\"notice\":\"Returns the current per-block borrow interest rate for this vToken\"},\"comptroller()\":{\"notice\":\"Contract which oversees inter-vToken operations\"},\"constructor\":{\"notice\":\"Construct a new money market\"},\"decimals()\":{\"notice\":\"EIP-20 token decimals for this token\"},\"delegateToImplementation(bytes)\":{\"notice\":\"Delegates execution to the implementation contract\"},\"delegateToViewImplementation(bytes)\":{\"notice\":\"Delegates execution to an implementation contract\"},\"exchangeRateCurrent()\":{\"notice\":\"Accrue interest then return the up-to-date exchange rate\"},\"exchangeRateStored()\":{\"notice\":\"Calculates the exchange rate from the underlying to the VToken\"},\"getAccountSnapshot(address)\":{\"notice\":\"Get a snapshot of the account's balances and the cached exchange rate\"},\"getCash()\":{\"notice\":\"Get cash balance of this vToken in the underlying asset\"},\"implementation()\":{\"notice\":\"Implementation address for this contract\"},\"interestRateModel()\":{\"notice\":\"Model which tells what the current interest rate should be\"},\"isVToken()\":{\"notice\":\"Indicator that this is a vToken contract (for inspection)\"},\"liquidateBorrow(address,uint256,address)\":{\"notice\":\"The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator.\"},\"mint(uint256)\":{\"notice\":\"Sender supplies assets into the market and receives vTokens in exchange\"},\"mintBehalf(address,uint256)\":{\"notice\":\"Sender supplies assets into the market and receiver receives vTokens in exchange\"},\"name()\":{\"notice\":\"EIP-20 token name for this token\"},\"pendingAdmin()\":{\"notice\":\"Pending administrator for this contract\"},\"protocolShareReserve()\":{\"notice\":\"address of protocol share reserve contract\"},\"redeem(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for the underlying asset\"},\"redeemUnderlying(uint256)\":{\"notice\":\"Sender redeems vTokens in exchange for a specified amount of underlying asset\"},\"reduceReservesBlockDelta()\":{\"notice\":\"delta block after which reserves will be reduced\"},\"reduceReservesBlockNumber()\":{\"notice\":\"last block number at which reserves were reduced\"},\"repayBorrow(uint256)\":{\"notice\":\"Sender repays their own borrow\"},\"repayBorrowBehalf(address,uint256)\":{\"notice\":\"Sender repays a borrow belonging to another borrower\"},\"reserveFactorMantissa()\":{\"notice\":\"Fraction of interest currently set aside for reserves\"},\"seize(address,address,uint256)\":{\"notice\":\"Transfers collateral tokens (this market) to the liquidator.\"},\"supplyRatePerBlock()\":{\"notice\":\"Returns the current per-block supply interest rate for this vToken\"},\"symbol()\":{\"notice\":\"EIP-20 token symbol for this token\"},\"totalBorrows()\":{\"notice\":\"Total amount of outstanding borrows of the underlying in this market\"},\"totalBorrowsCurrent()\":{\"notice\":\"Returns the current total borrows plus accrued interest\"},\"totalReserves()\":{\"notice\":\"Total amount of reserves of the underlying held in this market\"},\"totalSupply()\":{\"notice\":\"Total number of tokens in circulation\"},\"transfer(address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `msg.sender` to `dst`\"},\"transferFrom(address,address,uint256)\":{\"notice\":\"Transfer `amount` tokens from `src` to `dst`\"},\"underlying()\":{\"notice\":\"Underlying asset for this VToken\"}},\"notice\":\"vTokens which wrap an EIP-20 underlying and delegate to an implementation\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/Tokens/VTokens/VBep20Delegator.sol\":\"VBep20Delegator\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\nimport \\\"@openzeppelin/contracts/access/IAccessControl.sol\\\";\\n\\n/**\\n * @title IAccessControlManagerV8\\n * @author Venus\\n * @notice Interface implemented by the `AccessControlManagerV8` contract.\\n */\\ninterface IAccessControlManagerV8 is IAccessControl {\\n function giveCallPermission(address contractAddress, string calldata functionSig, address accountToPermit) external;\\n\\n function revokeCallPermission(\\n address contractAddress,\\n string calldata functionSig,\\n address accountToRevoke\\n ) external;\\n\\n function isAllowedToCall(address account, string calldata functionSig) external view returns (bool);\\n\\n function hasPermission(\\n address account,\\n address contractAddress,\\n string calldata functionSig\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xaa29b098440d0b3a131c5ecdf25ce548790c1b5ac7bf9b5c0264b6af6f7a1e0b\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x2432799b0d824fc701beb4c30146e912b9aeecf77b5c1635dde6c5fbe6bfc3a7\",\"license\":\"BSD-3-Clause\"},\"contracts/Comptroller/ComptrollerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.25;\\n\\nimport { ResilientOracleInterface } from \\\"@venusprotocol/oracle/contracts/interfaces/OracleInterface.sol\\\";\\n\\nimport { VToken } from \\\"../Tokens/VTokens/VToken.sol\\\";\\nimport { VAIControllerInterface } from \\\"../Tokens/VAI/VAIControllerInterface.sol\\\";\\nimport { WeightFunction } from \\\"./Diamond/interfaces/IFacetBase.sol\\\";\\n\\nenum Action {\\n MINT,\\n REDEEM,\\n BORROW,\\n REPAY,\\n SEIZE,\\n LIQUIDATE,\\n TRANSFER,\\n ENTER_MARKET,\\n EXIT_MARKET\\n}\\n\\ninterface ComptrollerInterface {\\n /// @notice Indicator that this is a Comptroller contract (for inspection)\\n function isComptroller() external pure returns (bool);\\n\\n /*** Assets You Are In ***/\\n\\n function enterMarkets(address[] calldata vTokens) external returns (uint[] memory);\\n\\n function exitMarket(address vToken) external returns (uint);\\n\\n /*** Policy Hooks ***/\\n\\n function mintAllowed(address vToken, address minter, uint mintAmount) external returns (uint);\\n\\n function mintVerify(address vToken, address minter, uint mintAmount, uint mintTokens) external;\\n\\n function redeemAllowed(address vToken, address redeemer, uint redeemTokens) external returns (uint);\\n\\n function redeemVerify(address vToken, address redeemer, uint redeemAmount, uint redeemTokens) external;\\n\\n function borrowAllowed(address vToken, address borrower, uint borrowAmount) external returns (uint);\\n\\n function borrowVerify(address vToken, address borrower, uint borrowAmount) external;\\n\\n function repayBorrowAllowed(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function repayBorrowVerify(\\n address vToken,\\n address payer,\\n address borrower,\\n uint repayAmount,\\n uint borrowerIndex\\n ) external;\\n\\n function liquidateBorrowAllowed(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount\\n ) external returns (uint);\\n\\n function liquidateBorrowVerify(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n uint seizeTokens\\n ) external;\\n\\n function seizeAllowed(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external returns (uint);\\n\\n function seizeVerify(\\n address vTokenCollateral,\\n address vTokenBorrowed,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external;\\n\\n function transferAllowed(address vToken, address src, address dst, uint transferTokens) external returns (uint);\\n\\n function transferVerify(address vToken, address src, address dst, uint transferTokens) external;\\n\\n /*** Liquidity/Liquidation Calculations ***/\\n\\n function liquidateCalculateSeizeTokens(\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function liquidateCalculateSeizeTokens(\\n address borrower,\\n address vTokenBorrowed,\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function setMintedVAIOf(address owner, uint amount) external returns (uint);\\n\\n function liquidateVAICalculateSeizeTokens(\\n address vTokenCollateral,\\n uint repayAmount\\n ) external view returns (uint, uint);\\n\\n function getXVSAddress() external view returns (address);\\n\\n function markets(address) external view returns (bool, uint, bool, uint, uint, uint96, bool);\\n\\n function oracle() external view returns (ResilientOracleInterface);\\n\\n function getAccountLiquidity(address) external view returns (uint, uint, uint);\\n\\n function getAssetsIn(address) external view returns (VToken[] memory);\\n\\n function claimVenus(address) external;\\n\\n function venusAccrued(address) external view returns (uint);\\n\\n function venusSupplySpeeds(address) external view returns (uint);\\n\\n function venusBorrowSpeeds(address) external view returns (uint);\\n\\n function getAllMarkets() external view returns (VToken[] memory);\\n\\n function venusSupplierIndex(address, address) external view returns (uint);\\n\\n function venusInitialIndex() external view returns (uint224);\\n\\n function venusBorrowerIndex(address, address) external view returns (uint);\\n\\n function venusBorrowState(address) external view returns (uint224, uint32);\\n\\n function venusSupplyState(address) external view returns (uint224, uint32);\\n\\n function approvedDelegates(address borrower, address delegate) external view returns (bool);\\n\\n function vaiController() external view returns (VAIControllerInterface);\\n\\n function protocolPaused() external view returns (bool);\\n\\n function actionPaused(address market, Action action) external view returns (bool);\\n\\n function mintedVAIs(address user) external view returns (uint);\\n\\n function vaiMintRate() external view returns (uint);\\n\\n function userPoolId(address account) external view returns (uint96);\\n\\n function getLiquidationIncentive(address vToken) external view returns (uint256);\\n\\n function getEffectiveLiquidationIncentive(address account, address vToken) external view returns (uint256);\\n\\n function getEffectiveLtvFactor(\\n address account,\\n address vToken,\\n WeightFunction weightingStrategy\\n ) external view returns (uint256);\\n\\n function lastPoolId() external view returns (uint96);\\n\\n function corePoolId() external pure returns (uint96);\\n\\n function pools(\\n uint96 poolId\\n ) external view returns (string memory label, bool isActive, bool allowCorePoolFallback);\\n\\n function getPoolVTokens(uint96 poolId) external view returns (address[] memory);\\n\\n function poolMarkets(\\n uint96 poolId,\\n address vToken\\n )\\n external\\n view\\n returns (\\n bool isListed,\\n uint256 collateralFactorMantissa,\\n bool isVenus,\\n uint256 liquidationThresholdMantissa,\\n uint256 liquidationIncentiveMantissa,\\n uint96 marketPoolId,\\n bool isBorrowAllowed\\n );\\n}\\n\\ninterface IVAIVault {\\n function updatePendingRewards() external;\\n}\\n\\ninterface IComptroller {\\n /*** Treasury Data ***/\\n function treasuryAddress() external view returns (address);\\n\\n function treasuryPercent() external view returns (uint);\\n}\\n\",\"keccak256\":\"0xb8de7a0684411bc301a5a4a3411656c712a7f94668b3ec617ec27b37cf6cd0ea\",\"license\":\"BSD-3-Clause\"},\"contracts/Comptroller/Diamond/interfaces/IFacetBase.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.25;\\n\\nimport { Action } from \\\"../../../Comptroller/ComptrollerInterface.sol\\\";\\nimport { PoolMarketId } from \\\"../../../Comptroller/Types/PoolMarketId.sol\\\";\\n\\nenum WeightFunction {\\n /// @notice Use the collateral factor of the asset for weighting\\n USE_COLLATERAL_FACTOR,\\n /// @notice Use the liquidation threshold of the asset for weighting\\n USE_LIQUIDATION_THRESHOLD\\n}\\n\\ninterface IFacetBase {\\n /**\\n * @notice The initial XVS rewards index for a market\\n */\\n function venusInitialIndex() external pure returns (uint224);\\n\\n /**\\n * @notice Checks if a certain action is paused on a market\\n * @param action Action id\\n * @param market vToken address\\n */\\n function actionPaused(address market, Action action) external view returns (bool);\\n\\n /**\\n * @notice Returns the XVS address\\n * @return The address of XVS token\\n */\\n function getXVSAddress() external view returns (address);\\n\\n function getPoolMarketIndex(uint96 poolId, address vToken) external pure returns (PoolMarketId);\\n\\n function corePoolId() external pure returns (uint96);\\n}\\n\",\"keccak256\":\"0x454a2e213a5f54fbe7991193b78ae23406234f465c9806f75ee7bf2fe6d1531c\",\"license\":\"BSD-3-Clause\"},\"contracts/Comptroller/Types/PoolMarketId.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.25;\\n\\n/// @notice Strongly-typed identifier for pool markets mapping keys\\n/// @dev Underlying storage is bytes32: first 12 bytes (96 bits) = poolId, last 20 bytes = vToken address\\ntype PoolMarketId is bytes32;\\n\\n \",\"keccak256\":\"0xf68bde30ddd6f8bf08194b493991c2a2ebd3814972f93a804beb9b366004cbe3\",\"license\":\"BSD-3-Clause\"},\"contracts/InterestRateModels/InterestRateModelV8.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/**\\n * @title Venus's InterestRateModelV8 Interface\\n * @author Venus\\n */\\nabstract contract InterestRateModelV8 {\\n /// @notice Indicator that this is an InterestRateModel contract (for inspection)\\n bool public constant isInterestRateModel = true;\\n\\n /**\\n * @notice Calculates the current borrow interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @return The borrow rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getBorrowRate(uint256 cash, uint256 borrows, uint256 reserves) external view virtual returns (uint256);\\n\\n /**\\n * @notice Calculates the current supply interest rate per block\\n * @param cash The total amount of cash the market has\\n * @param borrows The total amount of borrows the market has outstanding\\n * @param reserves The total amnount of reserves the market has\\n * @param reserveFactorMantissa The current reserve factor the market has\\n * @return The supply rate per block (as a percentage, and scaled by 1e18)\\n */\\n function getSupplyRate(\\n uint256 cash,\\n uint256 borrows,\\n uint256 reserves,\\n uint256 reserveFactorMantissa\\n ) external view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x4d5595e761d50a1431c34b39e72dde6c09b0ebccdbe8c5c4e12c8a2ac7b796e1\",\"license\":\"BSD-3-Clause\"},\"contracts/Tokens/VAI/VAIControllerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.25;\\n\\nimport { VTokenInterface } from \\\"../VTokens/VTokenInterfaces.sol\\\";\\n\\ninterface VAIControllerInterface {\\n function mintVAI(uint256 mintVAIAmount) external returns (uint256);\\n\\n function repayVAI(uint256 amount) external returns (uint256, uint256);\\n\\n function repayVAIBehalf(address borrower, uint256 amount) external returns (uint256, uint256);\\n\\n function liquidateVAI(\\n address borrower,\\n uint256 repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint256, uint256);\\n\\n function getMintableVAI(address minter) external view returns (uint256, uint256);\\n\\n function getVAIAddress() external view returns (address);\\n\\n function getVAIRepayAmount(address account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x69d2f9e13b7fbf0a29885048503642372d9ba3d37f2427d4b9cffb87eddd925b\",\"license\":\"BSD-3-Clause\"},\"contracts/Tokens/VTokens/VBep20Delegator.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.25;\\n\\nimport { ComptrollerInterface } from \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport { InterestRateModelV8 } from \\\"../../InterestRateModels/InterestRateModelV8.sol\\\";\\nimport { VTokenInterface, VBep20Interface, VDelegatorInterface } from \\\"./VTokenInterfaces.sol\\\";\\n\\n/**\\n * @title Venus's VBep20Delegator Contract\\n * @notice vTokens which wrap an EIP-20 underlying and delegate to an implementation\\n * @author Venus\\n */\\ncontract VBep20Delegator is VTokenInterface, VBep20Interface, VDelegatorInterface {\\n /**\\n * @notice Construct a new money market\\n * @param underlying_ The address of the underlying asset\\n * @param comptroller_ The address of the comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ BEP-20 name of this token\\n * @param symbol_ BEP-20 symbol of this token\\n * @param decimals_ BEP-20 decimal precision of this token\\n * @param admin_ Address of the administrator of this token\\n * @param implementation_ The address of the implementation the contract delegates to\\n * @param becomeImplementationData The encoded args for becomeImplementation\\n */\\n constructor(\\n address underlying_,\\n ComptrollerInterface comptroller_,\\n InterestRateModelV8 interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_,\\n address payable admin_,\\n address implementation_,\\n bytes memory becomeImplementationData\\n ) {\\n // Creator of the contract is admin during initialization\\n admin = payable(msg.sender);\\n\\n // First delegate gets to initialize the delegator (i.e. storage contract)\\n delegateTo(\\n implementation_,\\n abi.encodeWithSignature(\\n \\\"initialize(address,address,address,uint256,string,string,uint8)\\\",\\n underlying_,\\n comptroller_,\\n interestRateModel_,\\n initialExchangeRateMantissa_,\\n name_,\\n symbol_,\\n decimals_\\n )\\n );\\n\\n // New implementations always get set via the settor (post-initialize)\\n _setImplementation(implementation_, false, becomeImplementationData);\\n\\n // Set the proper admin now that initialization is done\\n admin = admin_;\\n }\\n\\n /**\\n * @notice Delegates execution to an implementation contract\\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\\n */\\n fallback() external {\\n // delegate all other functions to current implementation\\n (bool success, ) = implementation.delegatecall(msg.data);\\n\\n assembly {\\n let free_mem_ptr := mload(0x40)\\n returndatacopy(free_mem_ptr, 0, returndatasize())\\n\\n switch success\\n case 0 {\\n revert(free_mem_ptr, returndatasize())\\n }\\n default {\\n return(free_mem_ptr, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function mint(uint mintAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"mint(uint256)\\\", mintAmount));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"mintBehalf(address,uint256)\\\", receiver, mintAmount)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for the underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemTokens The number of vTokens to redeem into underlying asset\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeem(uint redeemTokens) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"redeem(uint256)\\\", redeemTokens));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender redeems vTokens in exchange for a specified amount of underlying asset\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemAmount The amount of underlying to redeem\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemUnderlying(uint redeemAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"redeemUnderlying(uint256)\\\", redeemAmount)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender borrows assets from the protocol to their own address\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function borrow(uint borrowAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"borrow(uint256)\\\", borrowAmount));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function repayBorrow(uint repayAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"repayBorrow(uint256)\\\", repayAmount));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrower\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"repayBorrowBehalf(address,uint256)\\\", borrower, repayAmount)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"liquidateBorrow(address,uint256,address)\\\", borrower, repayAmount, vTokenCollateral)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n function transfer(address dst, uint amount) external override returns (bool) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"transfer(address,uint256)\\\", dst, amount));\\n return abi.decode(data, (bool));\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n function transferFrom(address src, address dst, uint256 amount) external override returns (bool) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"transferFrom(address,address,uint256)\\\", src, dst, amount)\\n );\\n return abi.decode(data, (bool));\\n }\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (type(uint256).max means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n function approve(address spender, uint256 amount) external override returns (bool) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"approve(address,uint256)\\\", spender, amount)\\n );\\n return abi.decode(data, (bool));\\n }\\n\\n /**\\n * @notice Get the underlying balance of the `owner`\\n * @dev This also accrues interest in a transaction\\n * @param owner The address of the account to query\\n * @return The amount of underlying owned by `owner`\\n */\\n function balanceOfUnderlying(address owner) external override returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"balanceOfUnderlying(address)\\\", owner));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Returns the current total borrows plus accrued interest\\n * @return The total borrows with interest\\n */\\n function totalBorrowsCurrent() external override returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"totalBorrowsCurrent()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\\n * @param account The address whose balance should be calculated after updating borrowIndex\\n * @return The calculated balance\\n */\\n function borrowBalanceCurrent(address account) external override returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"borrowBalanceCurrent(address)\\\", account));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Will fail unless called by another vToken during the process of liquidation.\\n * It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function seize(address liquidator, address borrower, uint seizeTokens) external override returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"seize(address,address,uint256)\\\", liquidator, borrower, seizeTokens)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /*** Admin Functions ***/\\n\\n /**\\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @param newPendingAdmin New pending admin.\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setPendingAdmin(address payable newPendingAdmin) external override returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"_setPendingAdmin(address)\\\", newPendingAdmin)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh\\n * @dev Admin function to accrue interest and set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setReserveFactor(uint newReserveFactorMantissa) external override returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"_setReserveFactor(uint256)\\\", newReserveFactorMantissa)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accepts transfer of admin rights. `msg.sender` must be pendingAdmin\\n * @dev Admin function for pending admin to accept role and update admin\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _acceptAdmin() external override returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"_acceptAdmin()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accrues interest and adds reserves by transferring from admin\\n * @param addAmount Amount of reserves to add\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _addReserves(uint addAmount) external returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"_addReserves(uint256)\\\", addAmount));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accrues interest and reduces reserves by transferring to admin\\n * @param reduceAmount Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _reduceReserves(uint reduceAmount) external override returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"_reduceReserves(uint256)\\\", reduceAmount));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Get cash balance of this vToken in the underlying asset\\n * @return The quantity of underlying asset owned by this contract\\n */\\n function getCash() external view override returns (uint) {\\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\\\"getCash()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return The number of tokens allowed to be spent (type(uint256).max means infinite)\\n */\\n function allowance(address owner, address spender) external view override returns (uint) {\\n bytes memory data = delegateToViewImplementation(\\n abi.encodeWithSignature(\\\"allowance(address,address)\\\", owner, spender)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Get the token balance of the `owner`\\n * @param owner The address of the account to query\\n * @return The number of tokens owned by `owner`\\n */\\n function balanceOf(address owner) external view override returns (uint) {\\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\\\"balanceOf(address)\\\", owner));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Get a snapshot of the account's balances and the cached exchange rate\\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\\n * @param account Address of the account to snapshot\\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\\n */\\n function getAccountSnapshot(address account) external view override returns (uint, uint, uint, uint) {\\n bytes memory data = delegateToViewImplementation(\\n abi.encodeWithSignature(\\\"getAccountSnapshot(address)\\\", account)\\n );\\n return abi.decode(data, (uint, uint, uint, uint));\\n }\\n\\n /**\\n * @notice Returns the current per-block borrow interest rate for this vToken\\n * @return The borrow interest rate per block, scaled by 1e18\\n */\\n function borrowRatePerBlock() external view override returns (uint) {\\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\\\"borrowRatePerBlock()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Returns the current per-block supply interest rate for this vToken\\n * @return The supply interest rate per block, scaled by 1e18\\n */\\n function supplyRatePerBlock() external view override returns (uint) {\\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\\\"supplyRatePerBlock()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Called by the admin to update the implementation of the delegator\\n * @param implementation_ The address of the new implementation for delegation\\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\\n */\\n // @custom:access Only callable by admin\\n function _setImplementation(\\n address implementation_,\\n bool allowResign,\\n bytes memory becomeImplementationData\\n ) public {\\n require(msg.sender == admin, \\\"VBep20Delegator::_setImplementation: Caller must be admin\\\");\\n\\n if (allowResign) {\\n delegateToImplementation(abi.encodeWithSignature(\\\"_resignImplementation()\\\"));\\n }\\n\\n address oldImplementation = implementation;\\n implementation = implementation_;\\n\\n delegateToImplementation(abi.encodeWithSignature(\\\"_becomeImplementation(bytes)\\\", becomeImplementationData));\\n\\n emit NewImplementation(oldImplementation, implementation);\\n }\\n\\n /**\\n * @notice Accrue interest then return the up-to-date exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateCurrent() public override returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"exchangeRateCurrent()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Applies accrued interest to total borrows and reserves.\\n * @dev This calculates interest accrued from the last checkpointed block\\n * up to the current block and writes new checkpoint to storage.\\n */\\n function accrueInterest() public override returns (uint) {\\n bytes memory data = delegateToImplementation(abi.encodeWithSignature(\\\"accrueInterest()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Sets a new comptroller for the market\\n * @dev Admin function to set a new comptroller\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setComptroller(ComptrollerInterface newComptroller) public override returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"_setComptroller(address)\\\", newComptroller)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`\\n * @dev Admin function to accrue interest and update the interest rate model\\n * @param newInterestRateModel The new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModel(InterestRateModelV8 newInterestRateModel) public override returns (uint) {\\n bytes memory data = delegateToImplementation(\\n abi.encodeWithSignature(\\\"_setInterestRateModel(address)\\\", newInterestRateModel)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Delegates execution to the implementation contract\\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\\n * @param data The raw data to delegatecall\\n * @return The returned bytes from the delegatecall\\n */\\n function delegateToImplementation(bytes memory data) public returns (bytes memory) {\\n return delegateTo(implementation, data);\\n }\\n\\n /**\\n * @notice Delegates execution to an implementation contract\\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\\n * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.\\n * @param data The raw data to delegatecall\\n * @return The returned bytes from the delegatecall\\n */\\n function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) {\\n (bool success, bytes memory returnData) = address(this).staticcall(\\n abi.encodeWithSignature(\\\"delegateToImplementation(bytes)\\\", data)\\n );\\n assembly {\\n if eq(success, 0) {\\n revert(add(returnData, 0x20), returndatasize())\\n }\\n }\\n return abi.decode(returnData, (bytes));\\n }\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return The calculated balance\\n */\\n function borrowBalanceStored(address account) public view override returns (uint) {\\n bytes memory data = delegateToViewImplementation(\\n abi.encodeWithSignature(\\\"borrowBalanceStored(address)\\\", account)\\n );\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the VToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStored() public view override returns (uint) {\\n bytes memory data = delegateToViewImplementation(abi.encodeWithSignature(\\\"exchangeRateStored()\\\"));\\n return abi.decode(data, (uint));\\n }\\n\\n /**\\n * @notice Internal method to delegate execution to another contract\\n * @dev It returns to the external caller whatever the implementation returns or forwards reverts\\n * @param callee The contract to delegatecall\\n * @param data The raw data to delegatecall\\n * @return The returned bytes from the delegatecall\\n */\\n function delegateTo(address callee, bytes memory data) internal returns (bytes memory) {\\n (bool success, bytes memory returnData) = callee.delegatecall(data);\\n assembly {\\n if eq(success, 0) {\\n revert(add(returnData, 0x20), returndatasize())\\n }\\n }\\n return returnData;\\n }\\n}\\n\",\"keccak256\":\"0x71ac84d4ff8bb6ad1bb0a4bf2ad861fe8c80c1ff98d2e5d1701732ff3cf7c599\",\"license\":\"BSD-3-Clause\"},\"contracts/Tokens/VTokens/VToken.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.25;\\n\\nimport { IAccessControlManagerV8 } from \\\"@venusprotocol/governance-contracts/contracts/Governance/IAccessControlManagerV8.sol\\\";\\nimport { IProtocolShareReserve } from \\\"../../external/IProtocolShareReserve.sol\\\";\\nimport { ComptrollerInterface, IComptroller } from \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport { TokenErrorReporter } from \\\"../../Utils/ErrorReporter.sol\\\";\\nimport { Exponential } from \\\"../../Utils/Exponential.sol\\\";\\nimport { InterestRateModelV8 } from \\\"../../InterestRateModels/InterestRateModelV8.sol\\\";\\nimport { VTokenInterface } from \\\"./VTokenInterfaces.sol\\\";\\n\\n/**\\n * @title Venus's vToken Contract\\n * @notice Abstract base for vTokens\\n * @author Venus\\n */\\nabstract contract VToken is VTokenInterface, Exponential, TokenErrorReporter {\\n struct MintLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint mintTokens;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n uint actualMintAmount;\\n }\\n\\n struct RedeemLocalVars {\\n MathError mathErr;\\n uint exchangeRateMantissa;\\n uint redeemTokens;\\n uint redeemAmount;\\n uint totalSupplyNew;\\n uint accountTokensNew;\\n }\\n\\n struct BorrowLocalVars {\\n MathError mathErr;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n }\\n\\n struct RepayBorrowLocalVars {\\n Error err;\\n MathError mathErr;\\n uint repayAmount;\\n uint borrowerIndex;\\n uint accountBorrows;\\n uint accountBorrowsNew;\\n uint totalBorrowsNew;\\n uint actualRepayAmount;\\n }\\n\\n /*** Reentrancy Guard ***/\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n */\\n modifier nonReentrant() {\\n require(_notEntered, \\\"re-entered\\\");\\n _notEntered = false;\\n _;\\n _notEntered = true; // get a gas-refund post-Istanbul\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `msg.sender` to `dst`\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transfer(address dst, uint256 amount) external override nonReentrant returns (bool) {\\n return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Transfer `amount` tokens from `src` to `dst`\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param amount The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n // @custom:event Emits Transfer event\\n function transferFrom(address src, address dst, uint256 amount) external override nonReentrant returns (bool) {\\n return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Approve `spender` to transfer up to `amount` from `src`\\n * @dev This will overwrite the approval amount for `spender`\\n * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\\n * @param spender The address of the account which may transfer tokens\\n * @param amount The number of tokens that are approved (type(uint256).max means infinite)\\n * @return Whether or not the approval succeeded\\n */\\n // @custom:event Emits Approval event on successful approve\\n function approve(address spender, uint256 amount) external override returns (bool) {\\n transferAllowances[msg.sender][spender] = amount;\\n emit Approval(msg.sender, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @notice Get the underlying balance of the `owner`\\n * @dev This also accrues interest in a transaction\\n * @param owner The address of the account to query\\n * @return The amount of underlying owned by `owner`\\n */\\n function balanceOfUnderlying(address owner) external override returns (uint) {\\n Exp memory exchangeRate = Exp({ mantissa: exchangeRateCurrent() });\\n (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]);\\n ensureNoMathError(mErr);\\n return balance;\\n }\\n\\n /**\\n * @notice Returns the current total borrows plus accrued interest\\n * @return The total borrows with interest\\n */\\n function totalBorrowsCurrent() external override nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return totalBorrows;\\n }\\n\\n /**\\n * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex\\n * @param account The address whose balance should be calculated after updating borrowIndex\\n * @return The calculated balance\\n */\\n function borrowBalanceCurrent(address account) external override nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return borrowBalanceStored(account);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Will fail unless called by another vToken during the process of liquidation.\\n * Its absolutely critical to use msg.sender as the borrowed vToken and not a parameter.\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits Transfer event\\n function seize(\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) external override nonReentrant returns (uint) {\\n return seizeInternal(msg.sender, liquidator, borrower, seizeTokens);\\n }\\n\\n /**\\n * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.\\n * @param newPendingAdmin New pending admin.\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewPendingAdmin event with old and new admin addresses\\n function _setPendingAdmin(address payable newPendingAdmin) external override returns (uint) {\\n // Check caller = admin\\n ensureAdmin(msg.sender);\\n\\n // Save current value, if any, for inclusion in log\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store pendingAdmin with value newPendingAdmin\\n pendingAdmin = newPendingAdmin;\\n\\n // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin)\\n emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin\\n * @dev Admin function for pending admin to accept role and update admin\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewAdmin event on successful acceptance\\n // @custom:event Emits NewPendingAdmin event with null new pending admin\\n function _acceptAdmin() external override returns (uint) {\\n // Check caller is pendingAdmin\\n if (msg.sender != pendingAdmin) {\\n return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK);\\n }\\n\\n // Save current values for inclusion in log\\n address oldAdmin = admin;\\n address oldPendingAdmin = pendingAdmin;\\n\\n // Store admin with value pendingAdmin\\n admin = pendingAdmin;\\n\\n // Clear the pending value\\n pendingAdmin = payable(address(0));\\n\\n emit NewAdmin(oldAdmin, admin);\\n emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice accrues interest and sets a new reserve factor for the protocol using `_setReserveFactorFresh`\\n * @dev Governor function to accrue interest and set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewReserveFactor event\\n function _setReserveFactor(uint newReserveFactorMantissa_) external override nonReentrant returns (uint) {\\n ensureAllowed(\\\"_setReserveFactor(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed.\\n return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED);\\n }\\n // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to.\\n return _setReserveFactorFresh(newReserveFactorMantissa_);\\n }\\n\\n /**\\n * @notice Sets the address of the access control manager of this contract\\n * @dev Admin function to set the access control address\\n * @param newAccessControlManagerAddress New address for the access control\\n * @return uint 0=success, otherwise will revert\\n */\\n function setAccessControlManager(address newAccessControlManagerAddress) external returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ensureNonZeroAddress(newAccessControlManagerAddress);\\n\\n emit NewAccessControlManager(accessControlManager, newAccessControlManagerAddress);\\n accessControlManager = newAccessControlManagerAddress;\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and reduces reserves by transferring to protocol share reserve\\n * @param reduceAmount_ Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits ReservesReduced event\\n function _reduceReserves(uint reduceAmount_) external virtual override nonReentrant returns (uint) {\\n ensureAllowed(\\\"_reduceReserves(uint256)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // If reserves were reduced in accrueInterest\\n if (reduceReservesBlockNumber == block.number) return (uint(Error.NO_ERROR));\\n // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to.\\n return _reduceReservesFresh(reduceAmount_);\\n }\\n\\n /**\\n * @notice Get the current allowance from `owner` for `spender`\\n * @param owner The address of the account which owns the tokens to be spent\\n * @param spender The address of the account which may transfer tokens\\n * @return The number of tokens allowed to be spent (type(uint256).max means infinite)\\n */\\n function allowance(address owner, address spender) external view override returns (uint256) {\\n return transferAllowances[owner][spender];\\n }\\n\\n /**\\n * @notice Get the token balance of the `owner`\\n * @param owner The address of the account to query\\n * @return The number of tokens owned by `owner`\\n */\\n function balanceOf(address owner) external view override returns (uint256) {\\n return accountTokens[owner];\\n }\\n\\n /**\\n * @notice Get a snapshot of the account's balances, and the cached exchange rate\\n * @dev This is used by comptroller to more efficiently perform liquidity checks.\\n * @param account Address of the account to snapshot\\n * @return (possible error, token balance, borrow balance, exchange rate mantissa)\\n */\\n function getAccountSnapshot(address account) external view override returns (uint, uint, uint, uint) {\\n uint vTokenBalance = accountTokens[account];\\n uint borrowBalance;\\n uint exchangeRateMantissa;\\n\\n MathError mErr;\\n\\n (mErr, borrowBalance) = borrowBalanceStoredInternal(account);\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n (mErr, exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (mErr != MathError.NO_ERROR) {\\n return (uint(Error.MATH_ERROR), 0, 0, 0);\\n }\\n\\n return (uint(Error.NO_ERROR), vTokenBalance, borrowBalance, exchangeRateMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block supply interest rate for this vToken\\n * @return The supply interest rate per block, scaled by 1e18\\n */\\n function supplyRatePerBlock() external view override returns (uint) {\\n return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa);\\n }\\n\\n /**\\n * @notice Returns the current per-block borrow interest rate for this vToken\\n * @return The borrow interest rate per block, scaled by 1e18\\n */\\n function borrowRatePerBlock() external view override returns (uint) {\\n return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);\\n }\\n\\n /**\\n * @notice Get cash balance of this vToken in the underlying asset\\n * @return The quantity of underlying asset owned by this contract\\n */\\n function getCash() external view override returns (uint) {\\n return getCashPrior();\\n }\\n\\n /**\\n * @notice Governance function to set new threshold of block difference after which funds will be sent to the protocol share reserve\\n * @param newReduceReservesBlockDelta_ block difference value\\n */\\n function setReduceReservesBlockDelta(uint256 newReduceReservesBlockDelta_) external {\\n require(newReduceReservesBlockDelta_ > 0, \\\"Invalid Input\\\");\\n ensureAllowed(\\\"setReduceReservesBlockDelta(uint256)\\\");\\n emit NewReduceReservesBlockDelta(reduceReservesBlockDelta, newReduceReservesBlockDelta_);\\n reduceReservesBlockDelta = newReduceReservesBlockDelta_;\\n }\\n\\n /**\\n * @notice Sets protocol share reserve contract address\\n * @param protcolShareReserve_ The address of protocol share reserve contract\\n */\\n function setProtocolShareReserve(address payable protcolShareReserve_) external {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n ensureNonZeroAddress(protcolShareReserve_);\\n emit NewProtocolShareReserve(protocolShareReserve, protcolShareReserve_);\\n protocolShareReserve = protcolShareReserve_;\\n }\\n\\n /**\\n * @notice Initialize the money market\\n * @param comptroller_ The address of the Comptroller\\n * @param interestRateModel_ The address of the interest rate model\\n * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18\\n * @param name_ EIP-20 name of this token\\n * @param symbol_ EIP-20 symbol of this token\\n * @param decimals_ EIP-20 decimal precision of this token\\n */\\n function initialize(\\n ComptrollerInterface comptroller_,\\n InterestRateModelV8 interestRateModel_,\\n uint initialExchangeRateMantissa_,\\n string memory name_,\\n string memory symbol_,\\n uint8 decimals_\\n ) public {\\n ensureAdmin(msg.sender);\\n require(accrualBlockNumber == 0 && borrowIndex == 0, \\\"market may only be initialized once\\\");\\n\\n // Set initial exchange rate\\n initialExchangeRateMantissa = initialExchangeRateMantissa_;\\n require(initialExchangeRateMantissa > 0, \\\"initial exchange rate must be greater than zero.\\\");\\n\\n // Set the comptroller\\n uint err = _setComptroller(comptroller_);\\n require(err == uint(Error.NO_ERROR), \\\"setting comptroller failed\\\");\\n\\n // Initialize block number and borrow index (block number mocks depend on comptroller being set)\\n accrualBlockNumber = block.number;\\n borrowIndex = mantissaOne;\\n\\n // Set the interest rate model (depends on block number / borrow index)\\n err = _setInterestRateModelFresh(interestRateModel_);\\n require(err == uint(Error.NO_ERROR), \\\"setting interest rate model failed\\\");\\n\\n name = name_;\\n symbol = symbol_;\\n decimals = decimals_;\\n\\n // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund)\\n _notEntered = true;\\n }\\n\\n /**\\n * @notice Accrue interest then return the up-to-date exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateCurrent() public override nonReentrant returns (uint) {\\n require(accrueInterest() == uint(Error.NO_ERROR), \\\"accrue interest failed\\\");\\n return exchangeRateStored();\\n }\\n\\n /**\\n * @notice Applies accrued interest to total borrows and reserves\\n * @dev This calculates interest accrued from the last checkpointed block\\n * up to the current block and writes new checkpoint to storage and\\n * reduce spread reserves to protocol share reserve\\n * if currentBlock - reduceReservesBlockNumber >= blockDelta\\n */\\n // @custom:event Emits AccrueInterest event\\n function accrueInterest() public virtual override returns (uint) {\\n /* Remember the initial block number */\\n uint currentBlockNumber = block.number;\\n uint accrualBlockNumberPrior = accrualBlockNumber;\\n\\n /* Short-circuit accumulating 0 interest */\\n if (accrualBlockNumberPrior == currentBlockNumber) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n /* Read the previous values out of storage */\\n uint cashPrior = getCashPrior();\\n uint borrowsPrior = totalBorrows;\\n uint reservesPrior = totalReserves;\\n uint borrowIndexPrior = borrowIndex;\\n\\n /* Calculate the current borrow interest rate */\\n uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);\\n require(borrowRateMantissa <= borrowRateMaxMantissa, \\\"borrow rate is absurdly high\\\");\\n\\n /* Calculate the number of blocks elapsed since the last accrual */\\n (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior);\\n ensureNoMathError(mathErr);\\n\\n /*\\n * Calculate the interest accumulated into borrows and reserves and the new index:\\n * simpleInterestFactor = borrowRate * blockDelta\\n * interestAccumulated = simpleInterestFactor * totalBorrows\\n * totalBorrowsNew = interestAccumulated + totalBorrows\\n * totalReservesNew = interestAccumulated * reserveFactor + totalReserves\\n * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex\\n */\\n\\n Exp memory simpleInterestFactor;\\n uint interestAccumulated;\\n uint totalBorrowsNew;\\n uint totalReservesNew;\\n uint borrowIndexNew;\\n\\n (mathErr, simpleInterestFactor) = mulScalar(Exp({ mantissa: borrowRateMantissa }), blockDelta);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(\\n Exp({ mantissa: reserveFactorMantissa }),\\n interestAccumulated,\\n reservesPrior\\n );\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);\\n if (mathErr != MathError.NO_ERROR) {\\n return\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n uint(mathErr)\\n );\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accrualBlockNumber = currentBlockNumber;\\n borrowIndex = borrowIndexNew;\\n totalBorrows = totalBorrowsNew;\\n totalReserves = totalReservesNew;\\n\\n (mathErr, blockDelta) = subUInt(currentBlockNumber, reduceReservesBlockNumber);\\n ensureNoMathError(mathErr);\\n if (blockDelta >= reduceReservesBlockDelta) {\\n reduceReservesBlockNumber = currentBlockNumber;\\n if (cashPrior < totalReservesNew) {\\n _reduceReservesFresh(cashPrior);\\n } else {\\n _reduceReservesFresh(totalReservesNew);\\n }\\n }\\n\\n /* We emit an AccrueInterest event */\\n emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new comptroller for the market\\n * @dev Admin function to set a new comptroller\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // @custom:event Emits NewComptroller event\\n function _setComptroller(ComptrollerInterface newComptroller) public override returns (uint) {\\n // Check caller is admin\\n ensureAdmin(msg.sender);\\n\\n ComptrollerInterface oldComptroller = comptroller;\\n // Ensure invoke comptroller.isComptroller() returns true\\n require(newComptroller.isComptroller(), \\\"marker method returned false\\\");\\n\\n // Set market's comptroller to newComptroller\\n comptroller = newComptroller;\\n\\n // Emit NewComptroller(oldComptroller, newComptroller)\\n emit NewComptroller(oldComptroller, newComptroller);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh\\n * @dev Governance function to accrue interest and update the interest rate model\\n * @param newInterestRateModel_ The new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModel(InterestRateModelV8 newInterestRateModel_) public override returns (uint) {\\n ensureAllowed(\\\"_setInterestRateModel(address)\\\");\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed\\n return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED);\\n }\\n // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to.\\n return _setInterestRateModelFresh(newInterestRateModel_);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the VToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStored() public view override returns (uint) {\\n (MathError err, uint result) = exchangeRateStoredInternal();\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return The calculated balance\\n */\\n function borrowBalanceStored(address account) public view override returns (uint) {\\n (MathError err, uint result) = borrowBalanceStoredInternal(account);\\n ensureNoMathError(err);\\n return result;\\n }\\n\\n /**\\n * @notice Transfers `tokens` tokens from `src` to `dst` by `spender`\\n * @dev Called by both `transfer` and `transferFrom` internally\\n * @param spender The address of the account performing the transfer\\n * @param src The address of the source account\\n * @param dst The address of the destination account\\n * @param tokens The number of tokens to transfer\\n * @return Whether or not the transfer succeeded\\n */\\n function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {\\n /* Fail if transfer not allowed */\\n uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Do not allow self-transfers */\\n if (src == dst) {\\n return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n /* Get the allowance, infinite for the account owner */\\n uint startingAllowance = 0;\\n if (spender == src) {\\n startingAllowance = type(uint256).max;\\n } else {\\n startingAllowance = transferAllowances[src][spender];\\n }\\n\\n /* Do the calculations, checking for {under,over}flow */\\n MathError mathErr;\\n uint allowanceNew;\\n uint srvTokensNew;\\n uint dstTokensNew;\\n\\n (mathErr, allowanceNew) = subUInt(startingAllowance, tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED);\\n }\\n\\n (mathErr, srvTokensNew) = subUInt(accountTokens[src], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH);\\n }\\n\\n (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n accountTokens[src] = srvTokensNew;\\n accountTokens[dst] = dstTokensNew;\\n\\n /* Eat some of the allowance (if necessary) */\\n if (startingAllowance != type(uint256).max) {\\n transferAllowances[src][spender] = allowanceNew;\\n }\\n\\n /* We emit a Transfer event */\\n emit Transfer(src, dst, tokens);\\n\\n comptroller.transferVerify(address(this), src, dst, tokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mint failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintFresh(msg.sender, mintAmount);\\n }\\n\\n /**\\n * @notice User supplies assets into the market and receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param minter The address of the account which is supplying the assets\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintFresh(address minter, uint mintAmount) internal returns (uint, uint) {\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the minter and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(minter, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and minter token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[minter] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[minter] = vars.accountTokensNew;\\n\\n /* We emit a Mint event, and a Transfer event */\\n emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), minter, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Sender supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param receiver The address of the account which is receiving the vTokens\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfInternal(address receiver, uint mintAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted mintBehalf failed\\n return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // mintBelahfFresh emits the actual Mint event if successful and logs on errors, so we don't need to\\n return mintBehalfFresh(msg.sender, receiver, mintAmount);\\n }\\n\\n /**\\n * @notice Payer supplies assets into the market and receiver receives vTokens in exchange\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param payer The address of the account which is paying the underlying token\\n * @param receiver The address of the account which is receiving vToken\\n * @param mintAmount The amount of the underlying asset to supply\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount.\\n */\\n function mintBehalfFresh(address payer, address receiver, uint mintAmount) internal returns (uint, uint) {\\n ensureNonZeroAddress(receiver);\\n /* Fail if mint not allowed */\\n uint allowed = comptroller.mintAllowed(address(this), receiver, mintAmount);\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0);\\n }\\n\\n MintLocalVars memory vars;\\n\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call `doTransferIn` for the payer and the mintAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * `doTransferIn` reverts if anything goes wrong, since we can't be sure if\\n * side-effects occurred. The function returns the amount actually transferred,\\n * in case of a fee. On success, the vToken holds an additional `actualMintAmount`\\n * of cash.\\n */\\n vars.actualMintAmount = doTransferIn(payer, mintAmount);\\n\\n /*\\n * We get the current exchange rate and calculate the number of vTokens to be minted:\\n * mintTokens = actualMintAmount / exchangeRate\\n */\\n\\n (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(\\n vars.actualMintAmount,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n /*\\n * We calculate the new total supply of vTokens and receiver token balance, checking for overflow:\\n * totalSupplyNew = totalSupply + mintTokens\\n * accountTokensNew = accountTokens[receiver] + mintTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[receiver], vars.mintTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[receiver] = vars.accountTokensNew;\\n\\n /* We emit a MintBehalf event, and a Transfer event */\\n emit MintBehalf(payer, receiver, vars.actualMintAmount, vars.mintTokens, vars.accountTokensNew);\\n emit Transfer(address(this), receiver, vars.mintTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.mintVerify(address(this), receiver, vars.actualMintAmount, vars.mintTokens);\\n\\n return (uint(Error.NO_ERROR), vars.actualMintAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokens The number of vTokens to redeem into underlying\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokens\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, redeemTokens, 0);\\n }\\n\\n /**\\n * @notice Sender redeems underlying assets on behalf of some other address. This function is only available\\n * for senders, explicitly marked as delegates of the supplier using `comptroller.updateDelegate`\\n * @dev Accrues interest whether or not the operation succeeds, unless reverted\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens, if called by a delegate\\n * @param redeemAmount The amount of underlying to receive from redeeming vTokens\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function redeemUnderlyingInternal(\\n address redeemer,\\n address payable receiver,\\n uint redeemAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed\\n return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED);\\n }\\n // redeemFresh emits redeem-specific logs on errors, so we don't need to\\n return redeemFresh(redeemer, receiver, 0, redeemAmount);\\n }\\n\\n /**\\n * @notice Redeemer redeems vTokens in exchange for the underlying assets, transferred to the receiver. Redeemer and receiver can be the same\\n * address, or different addresses if the receiver was previously approved by the redeemer as a valid delegate (see MarketFacet.updateDelegate)\\n * @dev Assumes interest has already been accrued up to the current block\\n * @param redeemer The address of the account which is redeeming the tokens\\n * @param receiver The receiver of the tokens\\n * @param redeemTokensIn The number of vTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @param redeemAmountIn The number of underlying tokens to receive from redeeming vTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n // solhint-disable-next-line code-complexity\\n function redeemFresh(\\n address redeemer,\\n address payable receiver,\\n uint redeemTokensIn,\\n uint redeemAmountIn\\n ) internal returns (uint) {\\n require(redeemTokensIn == 0 || redeemAmountIn == 0, \\\"one of redeemTokensIn or redeemAmountIn must be zero\\\");\\n\\n RedeemLocalVars memory vars;\\n\\n /* exchangeRate = invoke Exchange Rate Stored() */\\n (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal();\\n ensureNoMathError(vars.mathErr);\\n\\n /* If redeemTokensIn > 0: */\\n if (redeemTokensIn > 0) {\\n /*\\n * We calculate the exchange rate and the amount of underlying to be redeemed:\\n * redeemTokens = redeemTokensIn\\n * redeemAmount = redeemTokensIn x exchangeRateCurrent\\n */\\n vars.redeemTokens = redeemTokensIn;\\n\\n (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(\\n Exp({ mantissa: vars.exchangeRateMantissa }),\\n redeemTokensIn\\n );\\n ensureNoMathError(vars.mathErr);\\n } else {\\n /*\\n * We get the current exchange rate and calculate the amount to be redeemed:\\n * redeemTokens = redeemAmountIn / exchangeRate\\n * redeemAmount = redeemAmountIn\\n */\\n\\n (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(\\n redeemAmountIn,\\n Exp({ mantissa: vars.exchangeRateMantissa })\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n vars.redeemAmount = redeemAmountIn;\\n }\\n\\n /* Fail if redeem not allowed */\\n uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /*\\n * We calculate the new total supply and redeemer balance, checking for underflow:\\n * totalSupplyNew = totalSupply - redeemTokens\\n * accountTokensNew = accountTokens[redeemer] - redeemTokens\\n */\\n (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens);\\n ensureNoMathError(vars.mathErr);\\n\\n /* Fail gracefully if protocol has insufficient cash */\\n if (getCashPrior() < vars.redeemAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write previously calculated values into storage */\\n totalSupply = vars.totalSupplyNew;\\n accountTokens[redeemer] = vars.accountTokensNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the redeemAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken has redeemAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n\\n uint feeAmount;\\n uint remainedAmount;\\n if (IComptroller(address(comptroller)).treasuryPercent() != 0) {\\n (vars.mathErr, feeAmount) = mulUInt(\\n vars.redeemAmount,\\n IComptroller(address(comptroller)).treasuryPercent()\\n );\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, feeAmount) = divUInt(feeAmount, 1e18);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, remainedAmount) = subUInt(vars.redeemAmount, feeAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n address payable treasuryAddress = payable(IComptroller(address(comptroller)).treasuryAddress());\\n doTransferOut(treasuryAddress, feeAmount);\\n\\n emit RedeemFee(redeemer, feeAmount, vars.redeemTokens);\\n } else {\\n remainedAmount = vars.redeemAmount;\\n }\\n\\n doTransferOut(receiver, remainedAmount);\\n\\n /* We emit a Transfer event, and a Redeem event */\\n emit Transfer(redeemer, address(this), vars.redeemTokens);\\n emit Redeem(redeemer, remainedAmount, vars.redeemTokens, vars.accountTokensNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function borrowInternal(\\n address borrower,\\n address payable receiver,\\n uint borrowAmount\\n ) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED);\\n }\\n // borrowFresh emits borrow-specific logs on errors, so we don't need to\\n return borrowFresh(borrower, receiver, borrowAmount);\\n }\\n\\n /**\\n * @notice Receiver gets the borrow on behalf of the borrower address\\n * @dev Before calling this function, ensure that the interest has been accrued\\n * @param borrower The borrower, on behalf of whom to borrow\\n * @param receiver The account that would receive the funds (can be the same as the borrower)\\n * @param borrowAmount The amount of the underlying asset to borrow\\n * @return uint Returns 0 on success, otherwise revert (see ErrorReporter.sol for details).\\n */\\n function borrowFresh(address borrower, address payable receiver, uint borrowAmount) internal returns (uint) {\\n /* Revert if borrow not allowed */\\n uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);\\n if (allowed != 0) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n revert(\\\"math error\\\");\\n }\\n\\n /* Revert if protocol has insufficient underlying cash */\\n if (getCashPrior() < borrowAmount) {\\n revert(\\\"math error\\\");\\n }\\n\\n BorrowLocalVars memory vars;\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on overflow:\\n * accountBorrowsNew = accountBorrows + borrowAmount\\n * totalBorrowsNew = totalBorrows + borrowAmount\\n */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /*\\n * We invoke doTransferOut for the receiver and the borrowAmount.\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken borrowAmount less of cash.\\n * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n */\\n doTransferOut(receiver, borrowAmount);\\n\\n /* We emit a Borrow event */\\n emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.borrowVerify(address(this), borrower, borrowAmount);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sender repays their own borrow\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, msg.sender, repayAmount);\\n }\\n\\n /**\\n * @notice Sender repays a borrow belonging to another borrowing account\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed\\n return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0);\\n }\\n // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to\\n return repayBorrowFresh(msg.sender, borrower, repayAmount);\\n }\\n\\n /**\\n * @notice Borrows are repaid by another user (possibly the borrower).\\n * @param payer The account paying off the borrow\\n * @param borrower The account with the debt being payed off\\n * @param repayAmount The amount of undelrying tokens being returned\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) {\\n /* Fail if repayBorrow not allowed */\\n uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);\\n if (allowed != 0) {\\n return (\\n failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed),\\n 0\\n );\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0);\\n }\\n\\n RepayBorrowLocalVars memory vars;\\n\\n /* We remember the original borrowerIndex for verification purposes */\\n vars.borrowerIndex = accountBorrows[borrower].interestIndex;\\n\\n /* We fetch the amount the borrower owes, with accumulated interest */\\n (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower);\\n if (vars.mathErr != MathError.NO_ERROR) {\\n return (\\n failOpaque(\\n Error.MATH_ERROR,\\n FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n uint(vars.mathErr)\\n ),\\n 0\\n );\\n }\\n\\n /* If repayAmount == type(uint256).max, repayAmount = accountBorrows */\\n if (repayAmount == type(uint256).max) {\\n vars.repayAmount = vars.accountBorrows;\\n } else {\\n vars.repayAmount = repayAmount;\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the payer and the repayAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional repayAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount);\\n\\n /*\\n * We calculate the new borrower and total borrow balances, failing on underflow:\\n * accountBorrowsNew = accountBorrows - actualRepayAmount\\n * totalBorrowsNew = totalBorrows - actualRepayAmount\\n */\\n (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount);\\n ensureNoMathError(vars.mathErr);\\n\\n /* We write the previously calculated values into storage */\\n accountBorrows[borrower].principal = vars.accountBorrowsNew;\\n accountBorrows[borrower].interestIndex = borrowIndex;\\n totalBorrows = vars.totalBorrowsNew;\\n\\n /* We emit a RepayBorrow event */\\n emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex);\\n\\n return (uint(Error.NO_ERROR), vars.actualRepayAmount);\\n }\\n\\n /**\\n * @notice The sender liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n function liquidateBorrowInternal(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal nonReentrant returns (uint, uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0);\\n }\\n\\n error = vTokenCollateral.accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed\\n return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0);\\n }\\n\\n // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to\\n return liquidateBorrowFresh(msg.sender, borrower, repayAmount, vTokenCollateral);\\n }\\n\\n /**\\n * @notice The liquidator liquidates the borrowers collateral.\\n * The collateral seized is transferred to the liquidator.\\n * @param borrower The borrower of this vToken to be liquidated\\n * @param liquidator The address repaying the borrow and seizing collateral\\n * @param vTokenCollateral The market in which to seize collateral from the borrower\\n * @param repayAmount The amount of the underlying borrowed asset to repay\\n * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount.\\n */\\n // solhint-disable-next-line code-complexity\\n function liquidateBorrowFresh(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) internal returns (uint, uint) {\\n /* Fail if liquidate not allowed */\\n uint allowed = comptroller.liquidateBorrowAllowed(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n repayAmount\\n );\\n if (allowed != 0) {\\n return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0);\\n }\\n\\n /* Verify market's block number equals current block number */\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Verify vTokenCollateral market's block number equals current block number */\\n if (vTokenCollateral.accrualBlockNumber() != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0);\\n }\\n\\n /* Fail if repayAmount = 0 */\\n if (repayAmount == 0) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0);\\n }\\n\\n /* Fail if repayAmount = type(uint256).max */\\n if (repayAmount == type(uint256).max) {\\n return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0);\\n }\\n\\n /* Fail if repayBorrow fails */\\n (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount);\\n if (repayBorrowError != uint(Error.NO_ERROR)) {\\n return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We calculate the number of collateral tokens that will be seized */\\n (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(\\n borrower,\\n address(this),\\n address(vTokenCollateral),\\n actualRepayAmount\\n );\\n require(amountSeizeError == uint(Error.NO_ERROR), \\\"LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED\\\");\\n\\n /* Revert if borrower collateral token balance < seizeTokens */\\n require(vTokenCollateral.balanceOf(borrower) >= seizeTokens, \\\"LIQUIDATE_SEIZE_TOO_MUCH\\\");\\n\\n // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call\\n uint seizeError;\\n if (address(vTokenCollateral) == address(this)) {\\n seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens);\\n } else {\\n seizeError = vTokenCollateral.seize(liquidator, borrower, seizeTokens);\\n }\\n\\n /* Revert if seize tokens fails (since we cannot be sure of side effects) */\\n require(seizeError == uint(Error.NO_ERROR), \\\"token seizure failed\\\");\\n\\n /* We emit a LiquidateBorrow event */\\n emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(vTokenCollateral), seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.liquidateBorrowVerify(\\n address(this),\\n address(vTokenCollateral),\\n liquidator,\\n borrower,\\n actualRepayAmount,\\n seizeTokens\\n );\\n\\n return (uint(Error.NO_ERROR), actualRepayAmount);\\n }\\n\\n /**\\n * @notice Transfers collateral tokens (this market) to the liquidator.\\n * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another vToken.\\n * Its absolutely critical to use msg.sender as the seizer vToken and not a parameter.\\n * @param seizerToken The contract seizing the collateral (i.e. borrowed vToken)\\n * @param liquidator The account receiving seized collateral\\n * @param borrower The account having collateral seized\\n * @param seizeTokens The number of vTokens to seize\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function seizeInternal(\\n address seizerToken,\\n address liquidator,\\n address borrower,\\n uint seizeTokens\\n ) internal returns (uint) {\\n /* Fail if seize not allowed */\\n uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n if (allowed != 0) {\\n return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed);\\n }\\n\\n /* Fail if borrower = liquidator */\\n if (borrower == liquidator) {\\n return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER);\\n }\\n\\n MathError mathErr;\\n uint borrowerTokensNew;\\n uint liquidatorTokensNew;\\n\\n /*\\n * We calculate the new borrower and liquidator token balances, failing on underflow/overflow:\\n * borrowerTokensNew = accountTokens[borrower] - seizeTokens\\n * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens\\n */\\n (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr));\\n }\\n\\n (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens);\\n if (mathErr != MathError.NO_ERROR) {\\n return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr));\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /* We write the previously calculated values into storage */\\n accountTokens[borrower] = borrowerTokensNew;\\n accountTokens[liquidator] = liquidatorTokensNew;\\n\\n /* Emit a Transfer event */\\n emit Transfer(borrower, liquidator, seizeTokens);\\n\\n /* We call the defense and prime accrue interest hook */\\n comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Sets a new reserve factor for the protocol (requires fresh interest accrual)\\n * @dev Governance function to set a new reserve factor\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setReserveFactorFresh(uint newReserveFactorMantissa) internal returns (uint) {\\n // Verify market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK);\\n }\\n\\n // Check newReserveFactor \\u2264 maxReserveFactor\\n if (newReserveFactorMantissa > reserveFactorMaxMantissa) {\\n return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK);\\n }\\n\\n uint oldReserveFactorMantissa = reserveFactorMantissa;\\n reserveFactorMantissa = newReserveFactorMantissa;\\n\\n emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice Accrues interest and adds reserves by transferring from `msg.sender`\\n * @param addAmount Amount of addition to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) {\\n uint error = accrueInterest();\\n if (error != uint(Error.NO_ERROR)) {\\n // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed.\\n return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED);\\n }\\n\\n // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.\\n (error, ) = _addReservesFresh(addAmount);\\n return error;\\n }\\n\\n /**\\n * @notice Add reserves by transferring from caller\\n * @dev Requires fresh interest accrual\\n * @param addAmount Amount of addition to reserves\\n * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees\\n */\\n function _addReservesFresh(uint addAmount) internal returns (uint, uint) {\\n // totalReserves + actualAddAmount\\n uint totalReservesNew;\\n uint actualAddAmount;\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n /*\\n * We call doTransferIn for the caller and the addAmount\\n * Note: The vToken must handle variations between BEP-20 and BNB underlying.\\n * On success, the vToken holds an additional addAmount of cash.\\n * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n * it returns the amount actually transferred, in case of a fee.\\n */\\n\\n actualAddAmount = doTransferIn(msg.sender, addAmount);\\n\\n totalReservesNew = totalReserves + actualAddAmount;\\n\\n /* Revert on overflow */\\n require(totalReservesNew >= totalReserves, \\\"add reserves unexpected overflow\\\");\\n\\n // Store reserves[n+1] = reserves[n] + actualAddAmount\\n totalReserves = totalReservesNew;\\n\\n /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */\\n emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew);\\n\\n /* Return (NO_ERROR, actualAddAmount) */\\n return (uint(Error.NO_ERROR), actualAddAmount);\\n }\\n\\n /**\\n * @notice Reduces reserves by transferring to protocol share reserve contract\\n * @dev Requires fresh interest accrual\\n * @param reduceAmount Amount of reduction to reserves\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _reduceReservesFresh(uint reduceAmount) internal virtual returns (uint) {\\n if (reduceAmount == 0) {\\n return uint(Error.NO_ERROR);\\n }\\n\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK);\\n }\\n\\n // Fail gracefully if protocol has insufficient underlying cash\\n if (getCashPrior() < reduceAmount) {\\n return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE);\\n }\\n\\n // Check reduceAmount \\u2264 reserves[n] (totalReserves)\\n if (reduceAmount > totalReserves) {\\n return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION);\\n }\\n\\n /////////////////////////\\n // EFFECTS & INTERACTIONS\\n // (No safe failures beyond this point)\\n\\n // totalReserves - reduceAmount\\n uint totalReservesNew = totalReserves - reduceAmount;\\n\\n // Store reserves[n+1] = reserves[n] - reduceAmount\\n totalReserves = totalReservesNew;\\n\\n // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.\\n doTransferOut(protocolShareReserve, reduceAmount);\\n\\n IProtocolShareReserve(protocolShareReserve).updateAssetsState(\\n address(comptroller),\\n underlying,\\n IProtocolShareReserve.IncomeType.SPREAD\\n );\\n\\n emit ReservesReduced(protocolShareReserve, reduceAmount, totalReservesNew);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /**\\n * @notice updates the interest rate model (requires fresh interest accrual)\\n * @dev Governance function to update the interest rate model\\n * @param newInterestRateModel the new interest rate model to use\\n * @return uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details).\\n */\\n function _setInterestRateModelFresh(InterestRateModelV8 newInterestRateModel) internal returns (uint) {\\n // Used to store old model for use in the event that is emitted on success\\n InterestRateModelV8 oldInterestRateModel;\\n // We fail gracefully unless market's block number equals current block number\\n if (accrualBlockNumber != block.number) {\\n return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK);\\n }\\n\\n // Track the market's current interest rate model\\n oldInterestRateModel = interestRateModel;\\n\\n // Ensure invoke newInterestRateModel.isInterestRateModel() returns true\\n require(newInterestRateModel.isInterestRateModel(), \\\"marker method returned false\\\");\\n\\n // Set the interest rate model to newInterestRateModel\\n interestRateModel = newInterestRateModel;\\n\\n // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel)\\n emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel);\\n\\n return uint(Error.NO_ERROR);\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.\\n * This may revert due to insufficient balance or insufficient allowance.\\n */\\n function doTransferIn(address from, uint amount) internal virtual returns (uint);\\n\\n /**\\n * @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather than reverting.\\n * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.\\n * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.\\n */\\n function doTransferOut(address payable to, uint amount) internal virtual;\\n\\n /**\\n * @notice Return the borrow balance of account based on stored data\\n * @param account The address whose balance should be calculated\\n * @return Tuple of error code and the calculated balance or 0 if error code is non-zero\\n */\\n function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) {\\n /* Note: we do not assert that the market is up to date */\\n MathError mathErr;\\n uint principalTimesIndex;\\n uint result;\\n\\n /* Get borrowBalance and borrowIndex */\\n BorrowSnapshot storage borrowSnapshot = accountBorrows[account];\\n\\n /* If borrowBalance = 0 then borrowIndex is likely also 0.\\n * Rather than failing the calculation with a division by 0, we immediately return 0 in this case.\\n */\\n if (borrowSnapshot.principal == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n /* Calculate new borrow balance using the interest index:\\n * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex\\n */\\n (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, result);\\n }\\n\\n /**\\n * @notice Calculates the exchange rate from the underlying to the vToken\\n * @dev This function does not accrue interest before calculating the exchange rate\\n * @return Tuple of error code and calculated exchange rate scaled by 1e18\\n */\\n function exchangeRateStoredInternal() internal view virtual returns (MathError, uint) {\\n uint _totalSupply = totalSupply;\\n if (_totalSupply == 0) {\\n /*\\n * If there are no tokens minted:\\n * exchangeRate = initialExchangeRate\\n */\\n return (MathError.NO_ERROR, initialExchangeRateMantissa);\\n } else {\\n /*\\n * Otherwise:\\n * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply\\n */\\n uint totalCash = getCashPrior();\\n uint cashPlusBorrowsMinusReserves;\\n Exp memory exchangeRate;\\n MathError mathErr;\\n\\n (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply);\\n if (mathErr != MathError.NO_ERROR) {\\n return (mathErr, 0);\\n }\\n\\n return (MathError.NO_ERROR, exchangeRate.mantissa);\\n }\\n }\\n\\n function ensureAllowed(string memory functionSig) private view {\\n require(\\n IAccessControlManagerV8(accessControlManager).isAllowedToCall(msg.sender, functionSig),\\n \\\"access denied\\\"\\n );\\n }\\n\\n function ensureAdmin(address caller_) private view {\\n require(caller_ == admin, \\\"Unauthorized\\\");\\n }\\n\\n function ensureNoMathError(MathError mErr) private pure {\\n require(mErr == MathError.NO_ERROR, \\\"math error\\\");\\n }\\n\\n function ensureNonZeroAddress(address address_) private pure {\\n require(address_ != address(0), \\\"zero address\\\");\\n }\\n\\n /*** Safe Token ***/\\n\\n /**\\n * @notice Gets balance of this contract in terms of the underlying\\n * @dev This excludes the value of the current message, if any\\n * @return The quantity of underlying owned by this contract\\n */\\n function getCashPrior() internal view virtual returns (uint);\\n}\\n\",\"keccak256\":\"0x24ceb1a473f6e51ec1a7085b0a5b734c0104001bfddd3165b672e3ad2d5467d4\",\"license\":\"BSD-3-Clause\"},\"contracts/Tokens/VTokens/VTokenInterfaces.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.25;\\n\\nimport { ComptrollerInterface } from \\\"../../Comptroller/ComptrollerInterface.sol\\\";\\nimport { InterestRateModelV8 } from \\\"../../InterestRateModels/InterestRateModelV8.sol\\\";\\n\\ncontract VTokenStorageBase {\\n /**\\n * @notice Container for borrow balance information\\n * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action\\n * @member interestIndex Global borrowIndex as of the most recent balance-changing action\\n */\\n struct BorrowSnapshot {\\n uint principal;\\n uint interestIndex;\\n }\\n\\n /**\\n * @dev Guard variable for re-entrancy checks\\n */\\n bool internal _notEntered;\\n\\n /**\\n * @notice EIP-20 token name for this token\\n */\\n string public name;\\n\\n /**\\n * @notice EIP-20 token symbol for this token\\n */\\n string public symbol;\\n\\n /**\\n * @notice EIP-20 token decimals for this token\\n */\\n uint8 public decimals;\\n\\n /**\\n * @notice Maximum borrow rate that can ever be applied (.0005% / block)\\n */\\n\\n uint internal constant borrowRateMaxMantissa = 0.0005e16;\\n\\n /**\\n * @notice Maximum fraction of interest that can be set aside for reserves\\n */\\n uint internal constant reserveFactorMaxMantissa = 1e18;\\n\\n /**\\n * @notice Administrator for this contract\\n */\\n address payable public admin;\\n\\n /**\\n * @notice Pending administrator for this contract\\n */\\n address payable public pendingAdmin;\\n\\n /**\\n * @notice Contract which oversees inter-vToken operations\\n */\\n ComptrollerInterface public comptroller;\\n\\n /**\\n * @notice Model which tells what the current interest rate should be\\n */\\n InterestRateModelV8 public interestRateModel;\\n\\n /**\\n * @notice Initial exchange rate used when minting the first VTokens (used when totalSupply = 0)\\n */\\n uint internal initialExchangeRateMantissa;\\n\\n /**\\n * @notice Fraction of interest currently set aside for reserves\\n */\\n uint public reserveFactorMantissa;\\n\\n /**\\n * @notice Block number that interest was last accrued at\\n */\\n uint public accrualBlockNumber;\\n\\n /**\\n * @notice Accumulator of the total earned interest rate since the opening of the market\\n */\\n uint public borrowIndex;\\n\\n /**\\n * @notice Total amount of outstanding borrows of the underlying in this market\\n */\\n uint public totalBorrows;\\n\\n /**\\n * @notice Total amount of reserves of the underlying held in this market\\n */\\n uint public totalReserves;\\n\\n /**\\n * @notice Total number of tokens in circulation\\n */\\n uint public totalSupply;\\n\\n /**\\n * @notice Official record of token balances for each account\\n */\\n mapping(address => uint) internal accountTokens;\\n\\n /**\\n * @notice Approved token transfer amounts on behalf of others\\n */\\n mapping(address => mapping(address => uint)) internal transferAllowances;\\n\\n /**\\n * @notice Mapping of account addresses to outstanding borrow balances\\n */\\n mapping(address => BorrowSnapshot) internal accountBorrows;\\n\\n /**\\n * @notice Underlying asset for this VToken\\n */\\n address public underlying;\\n\\n /**\\n * @notice Implementation address for this contract\\n */\\n address public implementation;\\n\\n /**\\n * @notice delta block after which reserves will be reduced\\n */\\n uint public reduceReservesBlockDelta;\\n\\n /**\\n * @notice last block number at which reserves were reduced\\n */\\n uint public reduceReservesBlockNumber;\\n\\n /**\\n * @notice address of protocol share reserve contract\\n */\\n address payable public protocolShareReserve;\\n\\n /**\\n * @notice address of accessControlManager\\n */\\n\\n address public accessControlManager;\\n}\\n\\ncontract VTokenStorage is VTokenStorageBase {\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\\nabstract contract VTokenInterface is VTokenStorage {\\n /**\\n * @notice Indicator that this is a vToken contract (for inspection)\\n */\\n bool public constant isVToken = true;\\n\\n /*** Market Events ***/\\n\\n /**\\n * @notice Event emitted when interest is accrued\\n */\\n event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when tokens are minted\\n */\\n event Mint(address minter, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are minted behalf by payer to receiver\\n */\\n event MintBehalf(address payer, address receiver, uint mintAmount, uint mintTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed\\n */\\n event Redeem(address redeemer, uint redeemAmount, uint redeemTokens, uint256 totalSupply);\\n\\n /**\\n * @notice Event emitted when tokens are redeemed and fee is transferred\\n */\\n event RedeemFee(address redeemer, uint feeAmount, uint redeemTokens);\\n\\n /**\\n * @notice Event emitted when underlying is borrowed\\n */\\n event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is repaid\\n */\\n event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows);\\n\\n /**\\n * @notice Event emitted when a borrow is liquidated\\n */\\n event LiquidateBorrow(\\n address liquidator,\\n address borrower,\\n uint repayAmount,\\n address vTokenCollateral,\\n uint seizeTokens\\n );\\n\\n /*** Admin Events ***/\\n\\n /**\\n * @notice Event emitted when pendingAdmin is changed\\n */\\n event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin);\\n\\n /**\\n * @notice Event emitted when pendingAdmin is accepted, which means admin has been updated\\n */\\n event NewAdmin(address oldAdmin, address newAdmin);\\n\\n /**\\n * @notice Event emitted when comptroller is changed\\n */\\n event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);\\n\\n /**\\n * @notice Event emitted when interestRateModel is changed\\n */\\n event NewMarketInterestRateModel(\\n InterestRateModelV8 oldInterestRateModel,\\n InterestRateModelV8 newInterestRateModel\\n );\\n\\n /**\\n * @notice Event emitted when the reserve factor is changed\\n */\\n event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa);\\n\\n /**\\n * @notice Event emitted when the reserves are added\\n */\\n event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves);\\n\\n /**\\n * @notice Event emitted when the reserves are reduced\\n */\\n event ReservesReduced(address protocolShareReserve, uint reduceAmount, uint newTotalReserves);\\n\\n /**\\n * @notice EIP20 Transfer event\\n */\\n event Transfer(address indexed from, address indexed to, uint amount);\\n\\n /**\\n * @notice EIP20 Approval event\\n */\\n event Approval(address indexed owner, address indexed spender, uint amount);\\n\\n /**\\n * @notice Event emitted when block delta for reduce reserves get updated\\n */\\n event NewReduceReservesBlockDelta(uint256 oldReduceReservesBlockDelta, uint256 newReduceReservesBlockDelta);\\n\\n /**\\n * @notice Event emitted when address of ProtocolShareReserve contract get updated\\n */\\n event NewProtocolShareReserve(address indexed oldProtocolShareReserve, address indexed newProtocolShareReserve);\\n\\n /// @notice Emitted when access control address is changed by admin\\n event NewAccessControlManager(address oldAccessControlAddress, address newAccessControlAddress);\\n\\n /*** User Interface ***/\\n\\n function transfer(address dst, uint amount) external virtual returns (bool);\\n\\n function transferFrom(address src, address dst, uint amount) external virtual returns (bool);\\n\\n function approve(address spender, uint amount) external virtual returns (bool);\\n\\n function balanceOfUnderlying(address owner) external virtual returns (uint);\\n\\n function totalBorrowsCurrent() external virtual returns (uint);\\n\\n function borrowBalanceCurrent(address account) external virtual returns (uint);\\n\\n function seize(address liquidator, address borrower, uint seizeTokens) external virtual returns (uint);\\n\\n /*** Admin Function ***/\\n function _setPendingAdmin(address payable newPendingAdmin) external virtual returns (uint);\\n\\n /*** Admin Function ***/\\n function _acceptAdmin() external virtual returns (uint);\\n\\n /*** Admin Function ***/\\n function _setReserveFactor(uint newReserveFactorMantissa) external virtual returns (uint);\\n\\n /*** Admin Function ***/\\n function _reduceReserves(uint reduceAmount) external virtual returns (uint);\\n\\n function balanceOf(address owner) external view virtual returns (uint);\\n\\n function allowance(address owner, address spender) external view virtual returns (uint);\\n\\n function getAccountSnapshot(address account) external view virtual returns (uint, uint, uint, uint);\\n\\n function borrowRatePerBlock() external view virtual returns (uint);\\n\\n function supplyRatePerBlock() external view virtual returns (uint);\\n\\n function getCash() external view virtual returns (uint);\\n\\n function exchangeRateCurrent() public virtual returns (uint);\\n\\n function accrueInterest() public virtual returns (uint);\\n\\n /*** Admin Function ***/\\n function _setComptroller(ComptrollerInterface newComptroller) public virtual returns (uint);\\n\\n /*** Admin Function ***/\\n function _setInterestRateModel(InterestRateModelV8 newInterestRateModel) public virtual returns (uint);\\n\\n function borrowBalanceStored(address account) public view virtual returns (uint);\\n\\n function exchangeRateStored() public view virtual returns (uint);\\n}\\n\\ninterface VBep20Interface {\\n /*** User Interface ***/\\n\\n function mint(uint mintAmount) external returns (uint);\\n\\n function mintBehalf(address receiver, uint mintAmount) external returns (uint);\\n\\n function redeem(uint redeemTokens) external returns (uint);\\n\\n function redeemUnderlying(uint redeemAmount) external returns (uint);\\n\\n function borrow(uint borrowAmount) external returns (uint);\\n\\n function repayBorrow(uint repayAmount) external returns (uint);\\n\\n function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint);\\n\\n function liquidateBorrow(\\n address borrower,\\n uint repayAmount,\\n VTokenInterface vTokenCollateral\\n ) external returns (uint);\\n\\n /*** Admin Functions ***/\\n\\n function _addReserves(uint addAmount) external returns (uint);\\n}\\n\\ninterface VDelegatorInterface {\\n /**\\n * @notice Emitted when implementation is changed\\n */\\n event NewImplementation(address oldImplementation, address newImplementation);\\n\\n /**\\n * @notice Called by the admin to update the implementation of the delegator\\n * @param implementation_ The address of the new implementation for delegation\\n * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation\\n * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation\\n */\\n function _setImplementation(\\n address implementation_,\\n bool allowResign,\\n bytes memory becomeImplementationData\\n ) external;\\n}\\n\\ninterface VDelegateInterface {\\n /**\\n * @notice Called by the delegator on a delegate to initialize it for duty\\n * @dev Should revert if any issues arise which make it unfit for delegation\\n * @param data The encoded bytes data for any initialization\\n */\\n function _becomeImplementation(bytes memory data) external;\\n\\n /**\\n * @notice Called by the delegator on a delegate to forfeit its responsibility\\n */\\n function _resignImplementation() external;\\n}\\n\",\"keccak256\":\"0x1409d08c6eb3181b2a62913e1c9457a57ce747c062dbf89d6aa568e316add079\",\"license\":\"BSD-3-Clause\"},\"contracts/Utils/CarefulMath.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/**\\n * @title Careful Math\\n * @author Venus\\n * @notice Derived from OpenZeppelin's SafeMath library\\n * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol\\n */\\ncontract CarefulMath {\\n /**\\n * @dev Possible error codes that we can return\\n */\\n enum MathError {\\n NO_ERROR,\\n DIVISION_BY_ZERO,\\n INTEGER_OVERFLOW,\\n INTEGER_UNDERFLOW\\n }\\n\\n /**\\n * @dev Multiplies two numbers, returns an error on overflow.\\n */\\n function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (a == 0) {\\n return (MathError.NO_ERROR, 0);\\n }\\n\\n uint c;\\n unchecked {\\n c = a * b;\\n }\\n\\n if (c / a != b) {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n } else {\\n return (MathError.NO_ERROR, c);\\n }\\n }\\n\\n /**\\n * @dev Integer division of two numbers, truncating the quotient.\\n */\\n function divUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b == 0) {\\n return (MathError.DIVISION_BY_ZERO, 0);\\n }\\n\\n return (MathError.NO_ERROR, a / b);\\n }\\n\\n /**\\n * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).\\n */\\n function subUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n if (b <= a) {\\n unchecked {\\n return (MathError.NO_ERROR, a - b);\\n }\\n } else {\\n return (MathError.INTEGER_UNDERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev Adds two numbers, returns an error on overflow.\\n */\\n function addUInt(uint a, uint b) internal pure returns (MathError, uint) {\\n uint c;\\n unchecked {\\n c = a + b;\\n }\\n\\n if (c >= a) {\\n return (MathError.NO_ERROR, c);\\n } else {\\n return (MathError.INTEGER_OVERFLOW, 0);\\n }\\n }\\n\\n /**\\n * @dev add a and b and then subtract c\\n */\\n function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {\\n (MathError err0, uint sum) = addUInt(a, b);\\n\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, 0);\\n }\\n\\n return subUInt(sum, c);\\n }\\n}\\n\",\"keccak256\":\"0xb7ca049dc6f4a31c8994ad5fd2093b9f7f60c21495ff8386c7802ef13d9858a7\",\"license\":\"BSD-3-Clause\"},\"contracts/Utils/ErrorReporter.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { WeightFunction } from \\\"../Comptroller/Diamond/interfaces/IFacetBase.sol\\\";\\n\\ncontract ComptrollerErrorReporter {\\n /// @notice Thrown when You are already in the selected pool.\\n error AlreadyInSelectedPool();\\n\\n /// @notice Thrown when One or more of your assets are not compatible with the selected pool.\\n error IncompatibleBorrowedAssets();\\n\\n /// @notice Thrown when Switching to this pool would fail the liquidity check or lead to liquidation.\\n error LiquidityCheckFailed(uint256 errorCode, uint256 shortfall);\\n\\n /// @notice Thrown when trying to call pool-specific methods on the Core Pool\\n error InvalidOperationForCorePool();\\n\\n /// @notice Thrown when input array lengths do not match\\n error ArrayLengthMismatch();\\n\\n /// @notice Thrown when market trying to add in a pool is not listed in the core pool\\n error MarketNotListedInCorePool();\\n\\n /// @notice Thrown when market is not set in the _poolMarkets mapping\\n error MarketConfigNotFound();\\n\\n /// @notice Thrown when borrowing is not allowed in the selected pool for a given market.\\n error BorrowNotAllowedInPool();\\n\\n /// @notice Thrown when trying to remove a market that is not listed in the given pool.\\n error PoolMarketNotFound(uint96 poolId, address vToken);\\n\\n /// @notice Thrown when a given pool ID does not exist\\n error PoolDoesNotExist(uint96 poolId);\\n\\n /// @notice Thrown when the pool label is empty\\n error EmptyPoolLabel();\\n\\n /// @notice Thrown when a vToken is already listed in the specified pool\\n error MarketAlreadyListed(uint96 poolId, address vToken);\\n\\n /// @notice Thrown when an invalid weighting strategy is provided\\n error InvalidWeightingStrategy(WeightFunction strategy);\\n\\n /// @notice Thrown when attempting to interact with an inactive pool\\n error InactivePool(uint96 poolId);\\n\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n COMPTROLLER_MISMATCH,\\n INSUFFICIENT_SHORTFALL,\\n INSUFFICIENT_LIQUIDITY,\\n INVALID_CLOSE_FACTOR,\\n INVALID_COLLATERAL_FACTOR,\\n INVALID_LIQUIDATION_INCENTIVE,\\n MARKET_NOT_ENTERED, // no longer possible\\n MARKET_NOT_LISTED,\\n MARKET_ALREADY_LISTED,\\n MATH_ERROR,\\n NONZERO_BORROW_BALANCE,\\n PRICE_ERROR,\\n REJECTION,\\n SNAPSHOT_ERROR,\\n TOO_MANY_ASSETS,\\n TOO_MUCH_REPAY,\\n INSUFFICIENT_BALANCE_FOR_VAI,\\n MARKET_NOT_COLLATERAL,\\n INVALID_LIQUIDATION_THRESHOLD\\n }\\n\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n EXIT_MARKET_BALANCE_OWED,\\n EXIT_MARKET_REJECTION,\\n SET_CLOSE_FACTOR_OWNER_CHECK,\\n SET_CLOSE_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_NO_EXISTS,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COLLATERAL_FACTOR_WITHOUT_PRICE,\\n SET_IMPLEMENTATION_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,\\n SET_LIQUIDATION_INCENTIVE_VALIDATION,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_PRICE_ORACLE_OWNER_CHECK,\\n SUPPORT_MARKET_EXISTS,\\n SUPPORT_MARKET_OWNER_CHECK,\\n SET_PAUSE_GUARDIAN_OWNER_CHECK,\\n SET_VAI_MINT_RATE_CHECK,\\n SET_VAICONTROLLER_OWNER_CHECK,\\n SET_MINTED_VAI_REJECTION,\\n SET_TREASURY_OWNER_CHECK,\\n UNLIST_MARKET_NOT_LISTED,\\n SET_LIQUIDATION_THRESHOLD_VALIDATION,\\n COLLATERAL_FACTOR_GREATER_THAN_LIQUIDATION_THRESHOLD\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract TokenErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED,\\n BAD_INPUT,\\n COMPTROLLER_REJECTION,\\n COMPTROLLER_CALCULATION_ERROR,\\n INTEREST_RATE_MODEL_ERROR,\\n INVALID_ACCOUNT_PAIR,\\n INVALID_CLOSE_AMOUNT_REQUESTED,\\n INVALID_COLLATERAL_FACTOR,\\n MATH_ERROR,\\n MARKET_NOT_FRESH,\\n MARKET_NOT_LISTED,\\n TOKEN_INSUFFICIENT_ALLOWANCE,\\n TOKEN_INSUFFICIENT_BALANCE,\\n TOKEN_INSUFFICIENT_CASH,\\n TOKEN_TRANSFER_IN_FAILED,\\n TOKEN_TRANSFER_OUT_FAILED,\\n TOKEN_PRICE_ERROR\\n }\\n\\n /*\\n * Note: FailureInfo (but not Error) is kept in alphabetical order\\n * This is because FailureInfo grows significantly faster, and\\n * the order of Error has some meaning, while the order of FailureInfo\\n * is entirely arbitrary.\\n */\\n enum FailureInfo {\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,\\n ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,\\n ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,\\n ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,\\n BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n BORROW_ACCRUE_INTEREST_FAILED,\\n BORROW_CASH_NOT_AVAILABLE,\\n BORROW_FRESHNESS_CHECK,\\n BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n BORROW_MARKET_NOT_LISTED,\\n BORROW_COMPTROLLER_REJECTION,\\n LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n LIQUIDATE_COMPTROLLER_REJECTION,\\n LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n LIQUIDATE_FRESHNESS_CHECK,\\n LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_ACCRUE_INTEREST_FAILED,\\n MINT_COMPTROLLER_REJECTION,\\n MINT_EXCHANGE_CALCULATION_FAILED,\\n MINT_EXCHANGE_RATE_READ_FAILED,\\n MINT_FRESHNESS_CHECK,\\n MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n MINT_TRANSFER_IN_FAILED,\\n MINT_TRANSFER_IN_NOT_POSSIBLE,\\n REDEEM_ACCRUE_INTEREST_FAILED,\\n REDEEM_COMPTROLLER_REJECTION,\\n REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,\\n REDEEM_EXCHANGE_RATE_READ_FAILED,\\n REDEEM_FRESHNESS_CHECK,\\n REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,\\n REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,\\n REDEEM_TRANSFER_OUT_NOT_POSSIBLE,\\n REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,\\n REDUCE_RESERVES_ADMIN_CHECK,\\n REDUCE_RESERVES_CASH_NOT_AVAILABLE,\\n REDUCE_RESERVES_FRESH_CHECK,\\n REDUCE_RESERVES_VALIDATION,\\n REPAY_BEHALF_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCRUE_INTEREST_FAILED,\\n REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_COMPTROLLER_REJECTION,\\n REPAY_BORROW_FRESHNESS_CHECK,\\n REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,\\n REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,\\n SET_COLLATERAL_FACTOR_OWNER_CHECK,\\n SET_COLLATERAL_FACTOR_VALIDATION,\\n SET_COMPTROLLER_OWNER_CHECK,\\n SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,\\n SET_INTEREST_RATE_MODEL_FRESH_CHECK,\\n SET_INTEREST_RATE_MODEL_OWNER_CHECK,\\n SET_MAX_ASSETS_OWNER_CHECK,\\n SET_ORACLE_MARKET_NOT_LISTED,\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,\\n SET_RESERVE_FACTOR_ADMIN_CHECK,\\n SET_RESERVE_FACTOR_FRESH_CHECK,\\n SET_RESERVE_FACTOR_BOUNDS_CHECK,\\n TRANSFER_COMPTROLLER_REJECTION,\\n TRANSFER_NOT_ALLOWED,\\n TRANSFER_NOT_ENOUGH,\\n TRANSFER_TOO_MUCH,\\n ADD_RESERVES_ACCRUE_INTEREST_FAILED,\\n ADD_RESERVES_FRESH_CHECK,\\n ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,\\n TOKEN_GET_UNDERLYING_PRICE_ERROR,\\n REPAY_VAI_COMPTROLLER_REJECTION,\\n REPAY_VAI_FRESHNESS_CHECK,\\n VAI_MINT_EXCHANGE_CALCULATION_FAILED,\\n SFT_MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\\ncontract VAIControllerErrorReporter {\\n enum Error {\\n NO_ERROR,\\n UNAUTHORIZED, // The sender is not authorized to perform this action.\\n REJECTION, // The action would violate the comptroller, vaicontroller policy.\\n SNAPSHOT_ERROR, // The comptroller could not get the account borrows and exchange rate from the market.\\n PRICE_ERROR, // The comptroller could not obtain a required price of an asset.\\n MATH_ERROR, // A math calculation error occurred.\\n INSUFFICIENT_BALANCE_FOR_VAI // Caller does not have sufficient balance to mint VAI.\\n }\\n\\n enum FailureInfo {\\n SET_PENDING_ADMIN_OWNER_CHECK,\\n SET_PENDING_IMPLEMENTATION_OWNER_CHECK,\\n SET_COMPTROLLER_OWNER_CHECK,\\n ACCEPT_ADMIN_PENDING_ADMIN_CHECK,\\n ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,\\n VAI_MINT_REJECTION,\\n VAI_BURN_REJECTION,\\n VAI_LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,\\n VAI_LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,\\n VAI_LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,\\n VAI_LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,\\n VAI_LIQUIDATE_FRESHNESS_CHECK,\\n VAI_LIQUIDATE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_REPAY_BORROW_FRESH_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,\\n VAI_LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,\\n VAI_LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,\\n VAI_LIQUIDATE_SEIZE_TOO_MUCH,\\n MINT_FEE_CALCULATION_FAILED,\\n SET_TREASURY_OWNER_CHECK\\n }\\n\\n /**\\n * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary\\n * contract-specific code that enables us to report opaque error codes from upgradeable contracts.\\n **/\\n event Failure(uint error, uint info, uint detail);\\n\\n /**\\n * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator\\n */\\n function fail(Error err, FailureInfo info) internal returns (uint) {\\n emit Failure(uint(err), uint(info), 0);\\n\\n return uint(err);\\n }\\n\\n /**\\n * @dev use this when reporting an opaque error from an upgradeable collaborator contract\\n */\\n function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {\\n emit Failure(uint(err), uint(info), opaqueError);\\n\\n return uint(err);\\n }\\n}\\n\",\"keccak256\":\"0xad8d795a0011f59304cae938f062a72a998710c01db94f9a813b4f2f00c9534b\",\"license\":\"BSD-3-Clause\"},\"contracts/Utils/Exponential.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { CarefulMath } from \\\"./CarefulMath.sol\\\";\\nimport { ExponentialNoError } from \\\"./ExponentialNoError.sol\\\";\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Venus\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract Exponential is CarefulMath, ExponentialNoError {\\n /**\\n * @dev Creates an exponential from numerator and denominator values.\\n * Note: Returns an error if (`num` * 10e18) > MAX_INT,\\n * or if `denom` is zero.\\n */\\n function getExp(uint num, uint denom) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledNumerator) = mulUInt(num, expScale);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err1, uint rational) = divUInt(scaledNumerator, denom);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: rational }));\\n }\\n\\n /**\\n * @dev Adds two exponentials, returning a new exponential.\\n */\\n function addExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = addUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Subtracts two exponentials, returning a new exponential.\\n */\\n function subExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError error, uint result) = subUInt(a.mantissa, b.mantissa);\\n\\n return (error, Exp({ mantissa: result }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, returning a new Exp.\\n */\\n function mulScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: scaledMantissa }));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mulScalarTruncate(Exp memory a, uint scalar) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(product));\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory product) = mulScalar(a, scalar);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return addUInt(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Divide an Exp by a scalar, returning a new Exp.\\n */\\n function divScalar(Exp memory a, uint scalar) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: descaledMantissa }));\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, returning a new Exp.\\n */\\n function divScalarByExp(uint scalar, Exp memory divisor) internal pure returns (MathError, Exp memory) {\\n /*\\n We are doing this as:\\n getExp(mulUInt(expScale, scalar), divisor.mantissa)\\n\\n How it works:\\n Exp = a / b;\\n Scalar = s;\\n `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`\\n */\\n (MathError err0, uint numerator) = mulUInt(expScale, scalar);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n return getExp(numerator, divisor.mantissa);\\n }\\n\\n /**\\n * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer.\\n */\\n function divScalarByExpTruncate(uint scalar, Exp memory divisor) internal pure returns (MathError, uint) {\\n (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor);\\n if (err != MathError.NO_ERROR) {\\n return (err, 0);\\n }\\n\\n return (MathError.NO_ERROR, truncate(fraction));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials, returning a new exponential.\\n */\\n function mulExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa);\\n if (err0 != MathError.NO_ERROR) {\\n return (err0, Exp({ mantissa: 0 }));\\n }\\n\\n // We add half the scale before dividing so that we get rounding instead of truncation.\\n // See \\\"Listing 6\\\" and text above it at https://accu.org/index.php/journals/1717\\n // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18.\\n (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct);\\n if (err1 != MathError.NO_ERROR) {\\n return (err1, Exp({ mantissa: 0 }));\\n }\\n\\n (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale);\\n // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero.\\n assert(err2 == MathError.NO_ERROR);\\n\\n return (MathError.NO_ERROR, Exp({ mantissa: product }));\\n }\\n\\n /**\\n * @dev Multiplies two exponentials given their mantissas, returning a new exponential.\\n */\\n function mulExp(uint a, uint b) internal pure returns (MathError, Exp memory) {\\n return mulExp(Exp({ mantissa: a }), Exp({ mantissa: b }));\\n }\\n\\n /**\\n * @dev Multiplies three exponentials, returning a new exponential.\\n */\\n function mulExp3(Exp memory a, Exp memory b, Exp memory c) internal pure returns (MathError, Exp memory) {\\n (MathError err, Exp memory ab) = mulExp(a, b);\\n if (err != MathError.NO_ERROR) {\\n return (err, ab);\\n }\\n return mulExp(ab, c);\\n }\\n\\n /**\\n * @dev Divides two exponentials, returning a new exponential.\\n * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b,\\n * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa)\\n */\\n function divExp(Exp memory a, Exp memory b) internal pure returns (MathError, Exp memory) {\\n return getExp(a.mantissa, b.mantissa);\\n }\\n}\\n\",\"keccak256\":\"0x6b9b293a09a3ec69ac16f58dce449a553b44121eb9aad666a777d8f6f4ae83f0\",\"license\":\"BSD-3-Clause\"},\"contracts/Utils/ExponentialNoError.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/**\\n * @title Exponential module for storing fixed-precision decimals\\n * @author Compound\\n * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places.\\n * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is:\\n * `Exp({mantissa: 5100000000000000000})`.\\n */\\ncontract ExponentialNoError {\\n uint internal constant expScale = 1e18;\\n uint internal constant doubleScale = 1e36;\\n uint internal constant halfExpScale = expScale / 2;\\n uint internal constant mantissaOne = expScale;\\n\\n struct Exp {\\n uint mantissa;\\n }\\n\\n struct Double {\\n uint mantissa;\\n }\\n\\n /**\\n * @dev Truncates the given exp to a whole number value.\\n * For example, truncate(Exp{mantissa: 15 * expScale}) = 15\\n */\\n function truncate(Exp memory exp) internal pure returns (uint) {\\n // Note: We are not using careful math here as we're performing a division that cannot fail\\n return exp.mantissa / expScale;\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer.\\n */\\n function mul_ScalarTruncate(Exp memory a, uint scalar) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return truncate(product);\\n }\\n\\n /**\\n * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer.\\n */\\n function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) internal pure returns (uint) {\\n Exp memory product = mul_(a, scalar);\\n return add_(truncate(product), addend);\\n }\\n\\n /**\\n * @dev Checks if first Exp is less than second Exp.\\n */\\n function lessThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa < right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp <= right Exp.\\n */\\n function lessThanOrEqualExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa <= right.mantissa;\\n }\\n\\n /**\\n * @dev Checks if left Exp > right Exp.\\n */\\n function greaterThanExp(Exp memory left, Exp memory right) internal pure returns (bool) {\\n return left.mantissa > right.mantissa;\\n }\\n\\n /**\\n * @dev returns true if Exp is exactly zero\\n */\\n function isZeroExp(Exp memory value) internal pure returns (bool) {\\n return value.mantissa == 0;\\n }\\n\\n function safe224(uint n, string memory errorMessage) internal pure returns (uint224) {\\n require(n < 2 ** 224, errorMessage);\\n return uint224(n);\\n }\\n\\n function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {\\n require(n < 2 ** 32, errorMessage);\\n return uint32(n);\\n }\\n\\n function add_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: add_(a.mantissa, b.mantissa) });\\n }\\n\\n function add_(uint a, uint b) internal pure returns (uint) {\\n return add_(a, b, \\\"addition overflow\\\");\\n }\\n\\n function add_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n uint c = a + b;\\n require(c >= a, errorMessage);\\n return c;\\n }\\n\\n function sub_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: sub_(a.mantissa, b.mantissa) });\\n }\\n\\n function sub_(uint a, uint b) internal pure returns (uint) {\\n return sub_(a, b, \\\"subtraction underflow\\\");\\n }\\n\\n function sub_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n\\n function mul_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b.mantissa) / expScale });\\n }\\n\\n function mul_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Exp memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / expScale;\\n }\\n\\n function mul_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b.mantissa) / doubleScale });\\n }\\n\\n function mul_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: mul_(a.mantissa, b) });\\n }\\n\\n function mul_(uint a, Double memory b) internal pure returns (uint) {\\n return mul_(a, b.mantissa) / doubleScale;\\n }\\n\\n function mul_(uint a, uint b) internal pure returns (uint) {\\n return mul_(a, b, \\\"multiplication overflow\\\");\\n }\\n\\n function mul_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n if (a == 0 || b == 0) {\\n return 0;\\n }\\n uint c = a * b;\\n require(c / a == b, errorMessage);\\n return c;\\n }\\n\\n function div_(Exp memory a, Exp memory b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(mul_(a.mantissa, expScale), b.mantissa) });\\n }\\n\\n function div_(Exp memory a, uint b) internal pure returns (Exp memory) {\\n return Exp({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Exp memory b) internal pure returns (uint) {\\n return div_(mul_(a, expScale), b.mantissa);\\n }\\n\\n function div_(Double memory a, Double memory b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa) });\\n }\\n\\n function div_(Double memory a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(a.mantissa, b) });\\n }\\n\\n function div_(uint a, Double memory b) internal pure returns (uint) {\\n return div_(mul_(a, doubleScale), b.mantissa);\\n }\\n\\n function div_(uint a, uint b) internal pure returns (uint) {\\n return div_(a, b, \\\"divide by zero\\\");\\n }\\n\\n function div_(uint a, uint b, string memory errorMessage) internal pure returns (uint) {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n\\n function fraction(uint a, uint b) internal pure returns (Double memory) {\\n return Double({ mantissa: div_(mul_(a, doubleScale), b) });\\n }\\n}\\n\",\"keccak256\":\"0xce75802a56763fb96b2046b374127f080a425cfe3634670767ec040ccb6ea7e0\",\"license\":\"BSD-3-Clause\"},\"contracts/external/IProtocolShareReserve.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\n\\npragma solidity 0.8.25;\\n\\ninterface IProtocolShareReserve {\\n enum IncomeType {\\n SPREAD,\\n LIQUIDATION\\n }\\n\\n function updateAssetsState(address comptroller, address asset, IncomeType incomeType) external;\\n}\\n\",\"keccak256\":\"0xf03faf89ad2689a29f0d456c1add258bc09bcf484840170154a32e129500818e\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
1609
+ "bytecode": "0x608060405234801561000f575f80fd5b50604051611e58380380611e5883398101604081905261002e916103b4565b60038054610100600160a81b031916336101000217905560405161009b908390610068908d908d908d908d908d908d908d906024016104d1565b60408051601f198184030181529190526020810180516001600160e01b03908116631a31d46560e01b179091526100dc16565b506100a7825f8361014f565b5050600380546001600160a01b0390921661010002610100600160a81b03199092169190911790555061056495505050505050565b60605f80846001600160a01b0316846040516100f89190610535565b5f60405180830381855af49150503d805f8114610130576040519150601f19603f3d011682016040523d82523d5f602084013e610135565b606091505b50909250905081610147573d60208201fd5b949350505050565b60035461010090046001600160a01b031633146101d85760405162461bcd60e51b815260206004820152603960248201527f56426570323044656c656761746f723a3a5f736574496d706c656d656e74617460448201527f696f6e3a2043616c6c6572206d7573742062652061646d696e00000000000000606482015260840160405180910390fd5b8115610217576040805160048152602481019091526020810180516001600160e01b0390811663153ab50560e01b1790915261021591906102ce16565b505b601280546001600160a01b038581166001600160a01b03198316179092556040519116906102809061024d90849060240161054b565b60408051601f198184030181529190526020810180516001600160e01b03908116630adccee560e31b179091526102ce16565b50601254604080516001600160a01b03808516825290921660208301527fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a910160405180910390a150505050565b6012546060906102e7906001600160a01b0316836100dc565b92915050565b80516001600160a01b0381168114610303575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f83011261032b575f80fd5b81516001600160401b038082111561034557610345610308565b604051601f8301601f19908116603f0116810190828211818310171561036d5761036d610308565b81604052838152866020858801011115610385575f80fd5b8360208701602083015e5f602085830101528094505050505092915050565b805160ff81168114610303575f80fd5b5f805f805f805f805f806101408b8d0312156103ce575f80fd5b6103d78b6102ed565b99506103e560208c016102ed565b98506103f360408c016102ed565b60608c015160808d015191995097506001600160401b0380821115610416575f80fd5b6104228e838f0161031c565b975060a08d0151915080821115610437575f80fd5b6104438e838f0161031c565b965061045160c08e016103a4565b955061045f60e08e016102ed565b945061046e6101008e016102ed565b93506101208d0151915080821115610484575f80fd5b506104918d828e0161031c565b9150509295989b9194979a5092959850565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b6001600160a01b0388811682528781166020830152861660408201526060810185905260e0608082018190525f9061050b908301866104a3565b82810360a084015261051d81866104a3565b91505060ff831660c083015298975050505050505050565b5f82518060208501845e5f920191825250919050565b602081525f61055d60208301846104a3565b9392505050565b6118e7806105715f395ff3fe608060405234801561000f575f80fd5b506004361061035b575f3560e01c806373acee98116101d1578063bd6d894d11610102578063e9c714f2116100a0578063f5e3c4621161007a578063f5e3c46214610756578063f851a44014610769578063f8f9da2814610781578063fca7820b146107895761035b565b8063e9c714f214610728578063f2b3abbd14610730578063f3fdb15a146107435761035b565b8063d1109c2f116100dc578063d1109c2f146106e6578063db006a75146106ef578063dd62ed3e14610702578063e9a44fd9146107155761035b565b8063bd6d894d14610698578063c37f68e2146106a0578063c5ebeaec146106d35761035b565b8063a9059cbb1161016f578063ae9d70b011610149578063ae9d70b014610657578063b2a02ff11461065f578063b4a0bdf314610672578063b71d1a0c146106855761035b565b8063a9059cbb14610632578063aa5af0fd14610645578063ae96f1411461064e5761035b565b806395d89b41116101ab57806395d89b41146105fc57806395dd919314610604578063a0712d6814610617578063a6afed951461062a5761035b565b806373acee98146105d8578063852a12e3146105e05780638f840ddd146105f35761035b565b80633af9e669116102ab578063555bcc4011610249578063601a0bf111610223578063601a0bf1146105965780636c540baf146105a95780636f307dc3146105b257806370a08231146105c55761035b565b8063555bcc401461055d5780635c60da1b146105705780635fe3b567146105835761035b565b80633e941010116102855780633e9410101461051b5780634487152f1461052e5780634576b5db1461054157806347bd3718146105545761035b565b80633af9e669146104f85780633b1d21a21461050b5780633d9ea3a1146105135761035b565b806318160ddd1161031857806323b872dd116102f257806323b872dd146104885780632608f8181461049b57806326782247146104ae578063313ce567146104d95761035b565b806318160ddd14610464578063182df0f51461046d57806323323e03146104755761035b565b806306fdde03146103d35780630933c1ed146103f1578063095ea7b3146104045780630e75270214610427578063173b99041461044857806317bfdfbc14610451575b6012546040515f916001600160a01b03169061037a90839036906114b8565b5f60405180830381855af49150503d805f81146103b2576040519150601f19603f3d011682016040523d82523d5f602084013e6103b7565b606091505b505090506040513d5f823e8180156103cd573d82f35b3d82fd5b005b6103db61079c565b6040516103e891906114f5565b60405180910390f35b6103db6103ff3660046115c5565b610828565b61041761041236600461160e565b610847565b60405190151581526020016103e8565b61043a610435366004611638565b6108b8565b6040519081526020016103e8565b61043a60085481565b61043a61045f36600461164f565b61091c565b61043a600d5481565b61043a610968565b61043a61048336600461160e565b6109ba565b61041761049636600461166a565b610a23565b61043a6104a936600461160e565b610a9d565b6004546104c1906001600160a01b031681565b6040516001600160a01b0390911681526020016103e8565b6003546104e69060ff1681565b60405160ff90911681526020016103e8565b61043a61050636600461164f565b610af0565b61043a610b3c565b610417600181565b61043a610529366004611638565b610b72565b6103db61053c3660046115c5565b610bb9565b61043a61054f36600461164f565b610c70565b61043a600b5481565b6103d161056b3660046116b5565b610cbc565b6012546104c1906001600160a01b031681565b6005546104c1906001600160a01b031681565b61043a6105a4366004611638565b610e32565b61043a60095481565b6011546104c1906001600160a01b031681565b61043a6105d336600461164f565b610e79565b61043a610ec5565b61043a6105ee366004611638565b610efb565b61043a600c5481565b6103db610f42565b61043a61061236600461164f565b610f4f565b61043a610625366004611638565b610f9b565b61043a610fe2565b61041761064036600461160e565b611018565b61043a600a5481565b61043a60145481565b61043a61106b565b61043a61066d36600461166a565b6110a1565b6016546104c1906001600160a01b031681565b61043a61069336600461164f565b611112565b61043a61115e565b6106b36106ae36600461164f565b611194565b6040805194855260208501939093529183015260608201526080016103e8565b61043a6106e1366004611638565b611211565b61043a60135481565b61043a6106fd366004611638565b611258565b61043a610710366004611713565b61129f565b6015546104c1906001600160a01b031681565b61043a6112f3565b61043a61073e36600461164f565b611329565b6006546104c1906001600160a01b031681565b61043a61076436600461174a565b611375565b6003546104c19061010090046001600160a01b031681565b61043a6113d0565b61043a610797366004611638565b611406565b600180546107a990611789565b80601f01602080910402602001604051908101604052809291908181526020018280546107d590611789565b80156108205780601f106107f757610100808354040283529160200191610820565b820191905f5260205f20905b81548152906001019060200180831161080357829003601f168201915b505050505081565b601254606090610841906001600160a01b03168361144d565b92915050565b6040516001600160a01b0383166024820152604481018290525f90819061089a9060640160408051601f198184030181529190526020810180516001600160e01b031663095ea7b360e01b179052610828565b9050808060200190518101906108b091906117c1565b949350505050565b5f806108ff836040516024016108d091815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663073a938160e11b179052610828565b90508080602001905181019061091591906117dc565b9392505050565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b03166305eff7ef60e21b179052610828565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b1790525f90819061099e90610bb9565b9050808060200190518101906109b491906117dc565b91505090565b6040516001600160a01b0383166024820152604481018290525f908190610a0d9060640160408051601f198184030181529190526020810180516001600160e01b03166323323e0360e01b179052610828565b9050808060200190518101906108b091906117dc565b6040516001600160a01b03808516602483015283166044820152606481018290525f908190610a7e9060840160408051601f198184030181529190526020810180516001600160e01b03166323b872dd60e01b179052610828565b905080806020019051810190610a9491906117c1565b95945050505050565b6040516001600160a01b0383166024820152604481018290525f908190610a0d9060640160408051601f198184030181529190526020810180516001600160e01b03166304c11f0360e31b179052610828565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b0316633af9e66960e01b179052610828565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b1790525f90819061099e90610bb9565b5f806108ff83604051602401610b8a91815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166303e9410160e41b179052610828565b60605f80306001600160a01b031684604051602401610bd891906114f5565b60408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b17905251610c0d91906117f3565b5f60405180830381855afa9150503d805f8114610c45576040519150601f19603f3d011682016040523d82523d5f602084013e610c4a565b606091505b50909250905081610c5c573d60208201fd5b808060200190518101906108b09190611809565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b0316634576b5db60e01b179052610828565b60035461010090046001600160a01b03163314610d455760405162461bcd60e51b815260206004820152603960248201527f56426570323044656c656761746f723a3a5f736574496d706c656d656e74617460448201527f696f6e3a2043616c6c6572206d7573742062652061646d696e00000000000000606482015260840160405180910390fd5b8115610d7f576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b179052610d7d90610828565b505b601280546001600160a01b038581166001600160a01b0319831617909255604051911690610de490610db59084906024016114f5565b60408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b179052610828565b50601254604080516001600160a01b03808516825290921660208301527fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a910160405180910390a150505050565b5f806108ff83604051602401610e4a91815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663601a0bf160e01b179052610828565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b03166370a0823160e01b179052610bb9565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b1790525f90819061099e90610828565b5f806108ff83604051602401610f1391815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663852a12e360e01b179052610828565b600280546107a990611789565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b03166395dd919360e01b179052610bb9565b5f806108ff83604051602401610fb391815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663140e25ad60e31b179052610828565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b1790525f90819061099e90610828565b6040516001600160a01b0383166024820152604481018290525f90819061089a9060640160408051601f198184030181529190526020810180516001600160e01b031663a9059cbb60e01b179052610828565b6040805160048152602481019091526020810180516001600160e01b0316630ae9d70b60e41b1790525f90819061099e90610bb9565b6040516001600160a01b03808516602483015283166044820152606481018290525f9081906110fc9060840160408051601f198184030181529190526020810180516001600160e01b031663b2a02ff160e01b179052610828565b905080806020019051810190610a9491906117dc565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b0316632dc7468360e21b179052610828565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b1790525f90819061099e90610828565b5f805f805f6111eb866040516024016111bc91906001600160a01b0391909116815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166361bfb47160e11b179052610bb9565b905080806020019051810190611201919061187e565b9450945094509450509193509193565b5f806108ff8360405160240161122991815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663317afabb60e21b179052610828565b5f806108ff8360405160240161127091815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663db006a7560e01b179052610828565b6040516001600160a01b038084166024830152821660448201525f908190610a0d9060640160408051601f198184030181529190526020810180516001600160e01b0316636eb1769f60e11b179052610bb9565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b1790525f90819061099e90610828565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b031663f2b3abbd60e01b179052610828565b6040516001600160a01b03808516602483015260448201849052821660648201525f9081906110fc9060840160408051601f198184030181529190526020810180516001600160e01b0316637af1e23160e11b179052610828565b6040805160048152602481019091526020810180516001600160e01b0316631f1f3b4560e31b1790525f90819061099e90610bb9565b5f806108ff8360405160240161141e91815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663fca7820b60e01b179052610828565b60605f80846001600160a01b03168460405161146991906117f3565b5f60405180830381855af49150503d805f81146114a1576040519150601f19603f3d011682016040523d82523d5f602084013e6114a6565b606091505b509092509050816108b0573d60208201fd5b818382375f9101908152919050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61091560208301846114c7565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561154457611544611507565b604052919050565b5f67ffffffffffffffff82111561156557611565611507565b50601f01601f191660200190565b5f82601f830112611582575f80fd5b81356115956115908261154c565b61151b565b8181528460208386010111156115a9575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156115d5575f80fd5b813567ffffffffffffffff8111156115eb575f80fd5b6108b084828501611573565b6001600160a01b038116811461160b575f80fd5b50565b5f806040838503121561161f575f80fd5b823561162a816115f7565b946020939093013593505050565b5f60208284031215611648575f80fd5b5035919050565b5f6020828403121561165f575f80fd5b8135610915816115f7565b5f805f6060848603121561167c575f80fd5b8335611687816115f7565b92506020840135611697816115f7565b929592945050506040919091013590565b801515811461160b575f80fd5b5f805f606084860312156116c7575f80fd5b83356116d2816115f7565b925060208401356116e2816116a8565b9150604084013567ffffffffffffffff8111156116fd575f80fd5b61170986828701611573565b9150509250925092565b5f8060408385031215611724575f80fd5b823561172f816115f7565b9150602083013561173f816115f7565b809150509250929050565b5f805f6060848603121561175c575f80fd5b8335611767816115f7565b925060208401359150604084013561177e816115f7565b809150509250925092565b600181811c9082168061179d57607f821691505b6020821081036117bb57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f602082840312156117d1575f80fd5b8151610915816116a8565b5f602082840312156117ec575f80fd5b5051919050565b5f82518060208501845e5f920191825250919050565b5f60208284031215611819575f80fd5b815167ffffffffffffffff81111561182f575f80fd5b8201601f8101841361183f575f80fd5b805161184d6115908261154c565b818152856020838501011115611861575f80fd5b8160208401602083015e5f91810160200191909152949350505050565b5f805f8060808587031215611891575f80fd5b50508251602084015160408501516060909501519196909550909250905056fea2646970667358221220d33c51087e00dc3180e65c57a38002ca4353af11b7fe8d05cbb3b4ea4430818764736f6c63430008190033",
1610
+ "deployedBytecode": "0x608060405234801561000f575f80fd5b506004361061035b575f3560e01c806373acee98116101d1578063bd6d894d11610102578063e9c714f2116100a0578063f5e3c4621161007a578063f5e3c46214610756578063f851a44014610769578063f8f9da2814610781578063fca7820b146107895761035b565b8063e9c714f214610728578063f2b3abbd14610730578063f3fdb15a146107435761035b565b8063d1109c2f116100dc578063d1109c2f146106e6578063db006a75146106ef578063dd62ed3e14610702578063e9a44fd9146107155761035b565b8063bd6d894d14610698578063c37f68e2146106a0578063c5ebeaec146106d35761035b565b8063a9059cbb1161016f578063ae9d70b011610149578063ae9d70b014610657578063b2a02ff11461065f578063b4a0bdf314610672578063b71d1a0c146106855761035b565b8063a9059cbb14610632578063aa5af0fd14610645578063ae96f1411461064e5761035b565b806395d89b41116101ab57806395d89b41146105fc57806395dd919314610604578063a0712d6814610617578063a6afed951461062a5761035b565b806373acee98146105d8578063852a12e3146105e05780638f840ddd146105f35761035b565b80633af9e669116102ab578063555bcc4011610249578063601a0bf111610223578063601a0bf1146105965780636c540baf146105a95780636f307dc3146105b257806370a08231146105c55761035b565b8063555bcc401461055d5780635c60da1b146105705780635fe3b567146105835761035b565b80633e941010116102855780633e9410101461051b5780634487152f1461052e5780634576b5db1461054157806347bd3718146105545761035b565b80633af9e669146104f85780633b1d21a21461050b5780633d9ea3a1146105135761035b565b806318160ddd1161031857806323b872dd116102f257806323b872dd146104885780632608f8181461049b57806326782247146104ae578063313ce567146104d95761035b565b806318160ddd14610464578063182df0f51461046d57806323323e03146104755761035b565b806306fdde03146103d35780630933c1ed146103f1578063095ea7b3146104045780630e75270214610427578063173b99041461044857806317bfdfbc14610451575b6012546040515f916001600160a01b03169061037a90839036906114b8565b5f60405180830381855af49150503d805f81146103b2576040519150601f19603f3d011682016040523d82523d5f602084013e6103b7565b606091505b505090506040513d5f823e8180156103cd573d82f35b3d82fd5b005b6103db61079c565b6040516103e891906114f5565b60405180910390f35b6103db6103ff3660046115c5565b610828565b61041761041236600461160e565b610847565b60405190151581526020016103e8565b61043a610435366004611638565b6108b8565b6040519081526020016103e8565b61043a60085481565b61043a61045f36600461164f565b61091c565b61043a600d5481565b61043a610968565b61043a61048336600461160e565b6109ba565b61041761049636600461166a565b610a23565b61043a6104a936600461160e565b610a9d565b6004546104c1906001600160a01b031681565b6040516001600160a01b0390911681526020016103e8565b6003546104e69060ff1681565b60405160ff90911681526020016103e8565b61043a61050636600461164f565b610af0565b61043a610b3c565b610417600181565b61043a610529366004611638565b610b72565b6103db61053c3660046115c5565b610bb9565b61043a61054f36600461164f565b610c70565b61043a600b5481565b6103d161056b3660046116b5565b610cbc565b6012546104c1906001600160a01b031681565b6005546104c1906001600160a01b031681565b61043a6105a4366004611638565b610e32565b61043a60095481565b6011546104c1906001600160a01b031681565b61043a6105d336600461164f565b610e79565b61043a610ec5565b61043a6105ee366004611638565b610efb565b61043a600c5481565b6103db610f42565b61043a61061236600461164f565b610f4f565b61043a610625366004611638565b610f9b565b61043a610fe2565b61041761064036600461160e565b611018565b61043a600a5481565b61043a60145481565b61043a61106b565b61043a61066d36600461166a565b6110a1565b6016546104c1906001600160a01b031681565b61043a61069336600461164f565b611112565b61043a61115e565b6106b36106ae36600461164f565b611194565b6040805194855260208501939093529183015260608201526080016103e8565b61043a6106e1366004611638565b611211565b61043a60135481565b61043a6106fd366004611638565b611258565b61043a610710366004611713565b61129f565b6015546104c1906001600160a01b031681565b61043a6112f3565b61043a61073e36600461164f565b611329565b6006546104c1906001600160a01b031681565b61043a61076436600461174a565b611375565b6003546104c19061010090046001600160a01b031681565b61043a6113d0565b61043a610797366004611638565b611406565b600180546107a990611789565b80601f01602080910402602001604051908101604052809291908181526020018280546107d590611789565b80156108205780601f106107f757610100808354040283529160200191610820565b820191905f5260205f20905b81548152906001019060200180831161080357829003601f168201915b505050505081565b601254606090610841906001600160a01b03168361144d565b92915050565b6040516001600160a01b0383166024820152604481018290525f90819061089a9060640160408051601f198184030181529190526020810180516001600160e01b031663095ea7b360e01b179052610828565b9050808060200190518101906108b091906117c1565b949350505050565b5f806108ff836040516024016108d091815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663073a938160e11b179052610828565b90508080602001905181019061091591906117dc565b9392505050565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b03166305eff7ef60e21b179052610828565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b1790525f90819061099e90610bb9565b9050808060200190518101906109b491906117dc565b91505090565b6040516001600160a01b0383166024820152604481018290525f908190610a0d9060640160408051601f198184030181529190526020810180516001600160e01b03166323323e0360e01b179052610828565b9050808060200190518101906108b091906117dc565b6040516001600160a01b03808516602483015283166044820152606481018290525f908190610a7e9060840160408051601f198184030181529190526020810180516001600160e01b03166323b872dd60e01b179052610828565b905080806020019051810190610a9491906117c1565b95945050505050565b6040516001600160a01b0383166024820152604481018290525f908190610a0d9060640160408051601f198184030181529190526020810180516001600160e01b03166304c11f0360e31b179052610828565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b0316633af9e66960e01b179052610828565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b1790525f90819061099e90610bb9565b5f806108ff83604051602401610b8a91815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166303e9410160e41b179052610828565b60605f80306001600160a01b031684604051602401610bd891906114f5565b60408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b17905251610c0d91906117f3565b5f60405180830381855afa9150503d805f8114610c45576040519150601f19603f3d011682016040523d82523d5f602084013e610c4a565b606091505b50909250905081610c5c573d60208201fd5b808060200190518101906108b09190611809565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b0316634576b5db60e01b179052610828565b60035461010090046001600160a01b03163314610d455760405162461bcd60e51b815260206004820152603960248201527f56426570323044656c656761746f723a3a5f736574496d706c656d656e74617460448201527f696f6e3a2043616c6c6572206d7573742062652061646d696e00000000000000606482015260840160405180910390fd5b8115610d7f576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b179052610d7d90610828565b505b601280546001600160a01b038581166001600160a01b0319831617909255604051911690610de490610db59084906024016114f5565b60408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b179052610828565b50601254604080516001600160a01b03808516825290921660208301527fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a910160405180910390a150505050565b5f806108ff83604051602401610e4a91815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663601a0bf160e01b179052610828565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b03166370a0823160e01b179052610bb9565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b1790525f90819061099e90610828565b5f806108ff83604051602401610f1391815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663852a12e360e01b179052610828565b600280546107a990611789565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b03166395dd919360e01b179052610bb9565b5f806108ff83604051602401610fb391815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663140e25ad60e31b179052610828565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b1790525f90819061099e90610828565b6040516001600160a01b0383166024820152604481018290525f90819061089a9060640160408051601f198184030181529190526020810180516001600160e01b031663a9059cbb60e01b179052610828565b6040805160048152602481019091526020810180516001600160e01b0316630ae9d70b60e41b1790525f90819061099e90610bb9565b6040516001600160a01b03808516602483015283166044820152606481018290525f9081906110fc9060840160408051601f198184030181529190526020810180516001600160e01b031663b2a02ff160e01b179052610828565b905080806020019051810190610a9491906117dc565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b0316632dc7468360e21b179052610828565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b1790525f90819061099e90610828565b5f805f805f6111eb866040516024016111bc91906001600160a01b0391909116815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166361bfb47160e11b179052610bb9565b905080806020019051810190611201919061187e565b9450945094509450509193509193565b5f806108ff8360405160240161122991815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663317afabb60e21b179052610828565b5f806108ff8360405160240161127091815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663db006a7560e01b179052610828565b6040516001600160a01b038084166024830152821660448201525f908190610a0d9060640160408051601f198184030181529190526020810180516001600160e01b0316636eb1769f60e11b179052610bb9565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b1790525f90819061099e90610828565b6040516001600160a01b03821660248201525f9081906108ff9060440160408051601f198184030181529190526020810180516001600160e01b031663f2b3abbd60e01b179052610828565b6040516001600160a01b03808516602483015260448201849052821660648201525f9081906110fc9060840160408051601f198184030181529190526020810180516001600160e01b0316637af1e23160e11b179052610828565b6040805160048152602481019091526020810180516001600160e01b0316631f1f3b4560e31b1790525f90819061099e90610bb9565b5f806108ff8360405160240161141e91815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663fca7820b60e01b179052610828565b60605f80846001600160a01b03168460405161146991906117f3565b5f60405180830381855af49150503d805f81146114a1576040519150601f19603f3d011682016040523d82523d5f602084013e6114a6565b606091505b509092509050816108b0573d60208201fd5b818382375f9101908152919050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61091560208301846114c7565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561154457611544611507565b604052919050565b5f67ffffffffffffffff82111561156557611565611507565b50601f01601f191660200190565b5f82601f830112611582575f80fd5b81356115956115908261154c565b61151b565b8181528460208386010111156115a9575f80fd5b816020850160208301375f918101602001919091529392505050565b5f602082840312156115d5575f80fd5b813567ffffffffffffffff8111156115eb575f80fd5b6108b084828501611573565b6001600160a01b038116811461160b575f80fd5b50565b5f806040838503121561161f575f80fd5b823561162a816115f7565b946020939093013593505050565b5f60208284031215611648575f80fd5b5035919050565b5f6020828403121561165f575f80fd5b8135610915816115f7565b5f805f6060848603121561167c575f80fd5b8335611687816115f7565b92506020840135611697816115f7565b929592945050506040919091013590565b801515811461160b575f80fd5b5f805f606084860312156116c7575f80fd5b83356116d2816115f7565b925060208401356116e2816116a8565b9150604084013567ffffffffffffffff8111156116fd575f80fd5b61170986828701611573565b9150509250925092565b5f8060408385031215611724575f80fd5b823561172f816115f7565b9150602083013561173f816115f7565b809150509250929050565b5f805f6060848603121561175c575f80fd5b8335611767816115f7565b925060208401359150604084013561177e816115f7565b809150509250925092565b600181811c9082168061179d57607f821691505b6020821081036117bb57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f602082840312156117d1575f80fd5b8151610915816116a8565b5f602082840312156117ec575f80fd5b5051919050565b5f82518060208501845e5f920191825250919050565b5f60208284031215611819575f80fd5b815167ffffffffffffffff81111561182f575f80fd5b8201601f8101841361183f575f80fd5b805161184d6115908261154c565b818152856020838501011115611861575f80fd5b8160208401602083015e5f91810160200191909152949350505050565b5f805f8060808587031215611891575f80fd5b50508251602084015160408501516060909501519196909550909250905056fea2646970667358221220d33c51087e00dc3180e65c57a38002ca4353af11b7fe8d05cbb3b4ea4430818764736f6c63430008190033",
1611
+ "devdoc": {
1612
+ "author": "Venus",
1613
+ "kind": "dev",
1614
+ "methods": {
1615
+ "_acceptAdmin()": {
1616
+ "details": "Admin function for pending admin to accept role and update admin",
1617
+ "returns": {
1618
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1619
+ }
1620
+ },
1621
+ "_addReserves(uint256)": {
1622
+ "params": {
1623
+ "addAmount": "Amount of reserves to add"
1624
+ },
1625
+ "returns": {
1626
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1627
+ }
1628
+ },
1629
+ "_reduceReserves(uint256)": {
1630
+ "params": {
1631
+ "reduceAmount": "Amount of reduction to reserves"
1632
+ },
1633
+ "returns": {
1634
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1635
+ }
1636
+ },
1637
+ "_setComptroller(address)": {
1638
+ "details": "Admin function to set a new comptroller",
1639
+ "returns": {
1640
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1641
+ }
1642
+ },
1643
+ "_setImplementation(address,bool,bytes)": {
1644
+ "params": {
1645
+ "allowResign": "Flag to indicate whether to call _resignImplementation on the old implementation",
1646
+ "becomeImplementationData": "The encoded bytes data to be passed to _becomeImplementation",
1647
+ "implementation_": "The address of the new implementation for delegation"
1648
+ }
1649
+ },
1650
+ "_setInterestRateModel(address)": {
1651
+ "details": "Admin function to accrue interest and update the interest rate model",
1652
+ "params": {
1653
+ "newInterestRateModel": "The new interest rate model to use"
1654
+ },
1655
+ "returns": {
1656
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1657
+ }
1658
+ },
1659
+ "_setPendingAdmin(address)": {
1660
+ "details": "Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer.",
1661
+ "params": {
1662
+ "newPendingAdmin": "New pending admin."
1663
+ },
1664
+ "returns": {
1665
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1666
+ }
1667
+ },
1668
+ "_setReserveFactor(uint256)": {
1669
+ "details": "Admin function to accrue interest and set a new reserve factor",
1670
+ "returns": {
1671
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1672
+ }
1673
+ },
1674
+ "accrueInterest()": {
1675
+ "details": "This calculates interest accrued from the last checkpointed block up to the current block and writes new checkpoint to storage."
1676
+ },
1677
+ "allowance(address,address)": {
1678
+ "params": {
1679
+ "owner": "The address of the account which owns the tokens to be spent",
1680
+ "spender": "The address of the account which may transfer tokens"
1681
+ },
1682
+ "returns": {
1683
+ "_0": "The number of tokens allowed to be spent (type(uint256).max means infinite)"
1684
+ }
1685
+ },
1686
+ "approve(address,uint256)": {
1687
+ "details": "This will overwrite the approval amount for `spender` and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)",
1688
+ "params": {
1689
+ "amount": "The number of tokens that are approved (type(uint256).max means infinite)",
1690
+ "spender": "The address of the account which may transfer tokens"
1691
+ },
1692
+ "returns": {
1693
+ "_0": "Whether or not the approval succeeded"
1694
+ }
1695
+ },
1696
+ "balanceOf(address)": {
1697
+ "params": {
1698
+ "owner": "The address of the account to query"
1699
+ },
1700
+ "returns": {
1701
+ "_0": "The number of tokens owned by `owner`"
1702
+ }
1703
+ },
1704
+ "balanceOfUnderlying(address)": {
1705
+ "details": "This also accrues interest in a transaction",
1706
+ "params": {
1707
+ "owner": "The address of the account to query"
1708
+ },
1709
+ "returns": {
1710
+ "_0": "The amount of underlying owned by `owner`"
1711
+ }
1712
+ },
1713
+ "borrow(uint256)": {
1714
+ "params": {
1715
+ "borrowAmount": "The amount of the underlying asset to borrow"
1716
+ },
1717
+ "returns": {
1718
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1719
+ }
1720
+ },
1721
+ "borrowBalanceCurrent(address)": {
1722
+ "params": {
1723
+ "account": "The address whose balance should be calculated after updating borrowIndex"
1724
+ },
1725
+ "returns": {
1726
+ "_0": "The calculated balance"
1727
+ }
1728
+ },
1729
+ "borrowBalanceStored(address)": {
1730
+ "params": {
1731
+ "account": "The address whose balance should be calculated"
1732
+ },
1733
+ "returns": {
1734
+ "_0": "The calculated balance"
1735
+ }
1736
+ },
1737
+ "borrowRatePerBlock()": {
1738
+ "returns": {
1739
+ "_0": "The borrow interest rate per block, scaled by 1e18"
1740
+ }
1741
+ },
1742
+ "constructor": {
1743
+ "params": {
1744
+ "admin_": "Address of the administrator of this token",
1745
+ "becomeImplementationData": "The encoded args for becomeImplementation",
1746
+ "comptroller_": "The address of the comptroller",
1747
+ "decimals_": "BEP-20 decimal precision of this token",
1748
+ "implementation_": "The address of the implementation the contract delegates to",
1749
+ "initialExchangeRateMantissa_": "The initial exchange rate, scaled by 1e18",
1750
+ "interestRateModel_": "The address of the interest rate model",
1751
+ "name_": "BEP-20 name of this token",
1752
+ "symbol_": "BEP-20 symbol of this token",
1753
+ "underlying_": "The address of the underlying asset"
1754
+ }
1755
+ },
1756
+ "delegateToImplementation(bytes)": {
1757
+ "details": "It returns to the external caller whatever the implementation returns or forwards reverts",
1758
+ "params": {
1759
+ "data": "The raw data to delegatecall"
1760
+ },
1761
+ "returns": {
1762
+ "_0": "The returned bytes from the delegatecall"
1763
+ }
1764
+ },
1765
+ "delegateToViewImplementation(bytes)": {
1766
+ "details": "It returns to the external caller whatever the implementation returns or forwards reverts There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop.",
1767
+ "params": {
1768
+ "data": "The raw data to delegatecall"
1769
+ },
1770
+ "returns": {
1771
+ "_0": "The returned bytes from the delegatecall"
1772
+ }
1773
+ },
1774
+ "exchangeRateCurrent()": {
1775
+ "returns": {
1776
+ "_0": "Calculated exchange rate scaled by 1e18"
1777
+ }
1778
+ },
1779
+ "exchangeRateStored()": {
1780
+ "details": "This function does not accrue interest before calculating the exchange rate",
1781
+ "returns": {
1782
+ "_0": "Calculated exchange rate scaled by 1e18"
1783
+ }
1784
+ },
1785
+ "getAccountSnapshot(address)": {
1786
+ "details": "This is used by comptroller to more efficiently perform liquidity checks.",
1787
+ "params": {
1788
+ "account": "Address of the account to snapshot"
1789
+ },
1790
+ "returns": {
1791
+ "_0": "(possible error, token balance, borrow balance, exchange rate mantissa)"
1792
+ }
1793
+ },
1794
+ "getCash()": {
1795
+ "returns": {
1796
+ "_0": "The quantity of underlying asset owned by this contract"
1797
+ }
1798
+ },
1799
+ "liquidateBorrow(address,uint256,address)": {
1800
+ "params": {
1801
+ "borrower": "The borrower of this vToken to be liquidated",
1802
+ "repayAmount": "The amount of the underlying borrowed asset to repay",
1803
+ "vTokenCollateral": "The market in which to seize collateral from the borrower"
1804
+ },
1805
+ "returns": {
1806
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1807
+ }
1808
+ },
1809
+ "mint(uint256)": {
1810
+ "details": "Accrues interest whether or not the operation succeeds, unless reverted",
1811
+ "params": {
1812
+ "mintAmount": "The amount of the underlying asset to supply"
1813
+ },
1814
+ "returns": {
1815
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1816
+ }
1817
+ },
1818
+ "mintBehalf(address,uint256)": {
1819
+ "details": "Accrues interest whether or not the operation succeeds, unless reverted",
1820
+ "params": {
1821
+ "mintAmount": "The amount of the underlying asset to supply"
1822
+ },
1823
+ "returns": {
1824
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1825
+ }
1826
+ },
1827
+ "redeem(uint256)": {
1828
+ "details": "Accrues interest whether or not the operation succeeds, unless reverted",
1829
+ "params": {
1830
+ "redeemTokens": "The number of vTokens to redeem into underlying asset"
1831
+ },
1832
+ "returns": {
1833
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1834
+ }
1835
+ },
1836
+ "redeemUnderlying(uint256)": {
1837
+ "details": "Accrues interest whether or not the operation succeeds, unless reverted",
1838
+ "params": {
1839
+ "redeemAmount": "The amount of underlying to redeem"
1840
+ },
1841
+ "returns": {
1842
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1843
+ }
1844
+ },
1845
+ "repayBorrow(uint256)": {
1846
+ "params": {
1847
+ "repayAmount": "The amount to repay"
1848
+ },
1849
+ "returns": {
1850
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1851
+ }
1852
+ },
1853
+ "repayBorrowBehalf(address,uint256)": {
1854
+ "params": {
1855
+ "borrower": "The account with the debt being payed off",
1856
+ "repayAmount": "The amount to repay"
1857
+ },
1858
+ "returns": {
1859
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1860
+ }
1861
+ },
1862
+ "seize(address,address,uint256)": {
1863
+ "details": "Will fail unless called by another vToken during the process of liquidation. It's absolutely critical to use msg.sender as the borrowed vToken and not a parameter.",
1864
+ "params": {
1865
+ "borrower": "The account having collateral seized",
1866
+ "liquidator": "The account receiving seized collateral",
1867
+ "seizeTokens": "The number of vTokens to seize"
1868
+ },
1869
+ "returns": {
1870
+ "_0": "uint Returns 0 on success, otherwise returns a failure code (see ErrorReporter.sol for details)."
1871
+ }
1872
+ },
1873
+ "supplyRatePerBlock()": {
1874
+ "returns": {
1875
+ "_0": "The supply interest rate per block, scaled by 1e18"
1876
+ }
1877
+ },
1878
+ "totalBorrowsCurrent()": {
1879
+ "returns": {
1880
+ "_0": "The total borrows with interest"
1881
+ }
1882
+ },
1883
+ "transfer(address,uint256)": {
1884
+ "params": {
1885
+ "amount": "The number of tokens to transfer",
1886
+ "dst": "The address of the destination account"
1887
+ },
1888
+ "returns": {
1889
+ "_0": "Whether or not the transfer succeeded"
1890
+ }
1891
+ },
1892
+ "transferFrom(address,address,uint256)": {
1893
+ "params": {
1894
+ "amount": "The number of tokens to transfer",
1895
+ "dst": "The address of the destination account",
1896
+ "src": "The address of the source account"
1897
+ },
1898
+ "returns": {
1899
+ "_0": "Whether or not the transfer succeeded"
1900
+ }
1901
+ }
1902
+ },
1903
+ "title": "Venus's VBep20Delegator Contract",
1904
+ "version": 1
1905
+ },
1906
+ "userdoc": {
1907
+ "events": {
1908
+ "AccrueInterest(uint256,uint256,uint256,uint256)": {
1909
+ "notice": "Event emitted when interest is accrued"
1910
+ },
1911
+ "Approval(address,address,uint256)": {
1912
+ "notice": "EIP20 Approval event"
1913
+ },
1914
+ "Borrow(address,uint256,uint256,uint256)": {
1915
+ "notice": "Event emitted when underlying is borrowed"
1916
+ },
1917
+ "LiquidateBorrow(address,address,uint256,address,uint256)": {
1918
+ "notice": "Event emitted when a borrow is liquidated"
1919
+ },
1920
+ "Mint(address,uint256,uint256,uint256)": {
1921
+ "notice": "Event emitted when tokens are minted"
1922
+ },
1923
+ "MintBehalf(address,address,uint256,uint256,uint256)": {
1924
+ "notice": "Event emitted when tokens are minted behalf by payer to receiver"
1925
+ },
1926
+ "NewAccessControlManager(address,address)": {
1927
+ "notice": "Emitted when access control address is changed by admin"
1928
+ },
1929
+ "NewAdmin(address,address)": {
1930
+ "notice": "Event emitted when pendingAdmin is accepted, which means admin has been updated"
1931
+ },
1932
+ "NewComptroller(address,address)": {
1933
+ "notice": "Event emitted when comptroller is changed"
1934
+ },
1935
+ "NewImplementation(address,address)": {
1936
+ "notice": "Emitted when implementation is changed"
1937
+ },
1938
+ "NewMarketInterestRateModel(address,address)": {
1939
+ "notice": "Event emitted when interestRateModel is changed"
1940
+ },
1941
+ "NewPendingAdmin(address,address)": {
1942
+ "notice": "Event emitted when pendingAdmin is changed"
1943
+ },
1944
+ "NewProtocolShareReserve(address,address)": {
1945
+ "notice": "Event emitted when address of ProtocolShareReserve contract get updated"
1946
+ },
1947
+ "NewReduceReservesBlockDelta(uint256,uint256)": {
1948
+ "notice": "Event emitted when block delta for reduce reserves get updated"
1949
+ },
1950
+ "NewReserveFactor(uint256,uint256)": {
1951
+ "notice": "Event emitted when the reserve factor is changed"
1952
+ },
1953
+ "Redeem(address,uint256,uint256,uint256)": {
1954
+ "notice": "Event emitted when tokens are redeemed"
1955
+ },
1956
+ "RedeemFee(address,uint256,uint256)": {
1957
+ "notice": "Event emitted when tokens are redeemed and fee is transferred"
1958
+ },
1959
+ "RepayBorrow(address,address,uint256,uint256,uint256)": {
1960
+ "notice": "Event emitted when a borrow is repaid"
1961
+ },
1962
+ "ReservesAdded(address,uint256,uint256)": {
1963
+ "notice": "Event emitted when the reserves are added"
1964
+ },
1965
+ "ReservesReduced(address,uint256,uint256)": {
1966
+ "notice": "Event emitted when the reserves are reduced"
1967
+ },
1968
+ "Transfer(address,address,uint256)": {
1969
+ "notice": "EIP20 Transfer event"
1970
+ }
1971
+ },
1972
+ "kind": "user",
1973
+ "methods": {
1974
+ "_acceptAdmin()": {
1975
+ "notice": "Accepts transfer of admin rights. `msg.sender` must be pendingAdmin"
1976
+ },
1977
+ "_addReserves(uint256)": {
1978
+ "notice": "Accrues interest and adds reserves by transferring from admin"
1979
+ },
1980
+ "_reduceReserves(uint256)": {
1981
+ "notice": "Accrues interest and reduces reserves by transferring to admin"
1982
+ },
1983
+ "_setComptroller(address)": {
1984
+ "notice": "Sets a new comptroller for the market"
1985
+ },
1986
+ "_setImplementation(address,bool,bytes)": {
1987
+ "notice": "Called by the admin to update the implementation of the delegator"
1988
+ },
1989
+ "_setInterestRateModel(address)": {
1990
+ "notice": "Accrues interest and updates the interest rate model using `_setInterestRateModelFresh`"
1991
+ },
1992
+ "_setPendingAdmin(address)": {
1993
+ "notice": "Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer."
1994
+ },
1995
+ "_setReserveFactor(uint256)": {
1996
+ "notice": "Accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh"
1997
+ },
1998
+ "accessControlManager()": {
1999
+ "notice": "address of accessControlManager"
2000
+ },
2001
+ "accrualBlockNumber()": {
2002
+ "notice": "Block number that interest was last accrued at"
2003
+ },
2004
+ "accrueInterest()": {
2005
+ "notice": "Applies accrued interest to total borrows and reserves."
2006
+ },
2007
+ "admin()": {
2008
+ "notice": "Administrator for this contract"
2009
+ },
2010
+ "allowance(address,address)": {
2011
+ "notice": "Get the current allowance from `owner` for `spender`"
2012
+ },
2013
+ "approve(address,uint256)": {
2014
+ "notice": "Approve `spender` to transfer up to `amount` from `src`"
2015
+ },
2016
+ "balanceOf(address)": {
2017
+ "notice": "Get the token balance of the `owner`"
2018
+ },
2019
+ "balanceOfUnderlying(address)": {
2020
+ "notice": "Get the underlying balance of the `owner`"
2021
+ },
2022
+ "borrow(uint256)": {
2023
+ "notice": "Sender borrows assets from the protocol to their own address"
2024
+ },
2025
+ "borrowBalanceCurrent(address)": {
2026
+ "notice": "Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex"
2027
+ },
2028
+ "borrowBalanceStored(address)": {
2029
+ "notice": "Return the borrow balance of account based on stored data"
2030
+ },
2031
+ "borrowIndex()": {
2032
+ "notice": "Accumulator of the total earned interest rate since the opening of the market"
2033
+ },
2034
+ "borrowRatePerBlock()": {
2035
+ "notice": "Returns the current per-block borrow interest rate for this vToken"
2036
+ },
2037
+ "comptroller()": {
2038
+ "notice": "Contract which oversees inter-vToken operations"
2039
+ },
2040
+ "constructor": {
2041
+ "notice": "Construct a new money market"
2042
+ },
2043
+ "decimals()": {
2044
+ "notice": "EIP-20 token decimals for this token"
2045
+ },
2046
+ "delegateToImplementation(bytes)": {
2047
+ "notice": "Delegates execution to the implementation contract"
2048
+ },
2049
+ "delegateToViewImplementation(bytes)": {
2050
+ "notice": "Delegates execution to an implementation contract"
2051
+ },
2052
+ "exchangeRateCurrent()": {
2053
+ "notice": "Accrue interest then return the up-to-date exchange rate"
2054
+ },
2055
+ "exchangeRateStored()": {
2056
+ "notice": "Calculates the exchange rate from the underlying to the VToken"
2057
+ },
2058
+ "getAccountSnapshot(address)": {
2059
+ "notice": "Get a snapshot of the account's balances and the cached exchange rate"
2060
+ },
2061
+ "getCash()": {
2062
+ "notice": "Get cash balance of this vToken in the underlying asset"
2063
+ },
2064
+ "implementation()": {
2065
+ "notice": "Implementation address for this contract"
2066
+ },
2067
+ "interestRateModel()": {
2068
+ "notice": "Model which tells what the current interest rate should be"
2069
+ },
2070
+ "isVToken()": {
2071
+ "notice": "Indicator that this is a vToken contract (for inspection)"
2072
+ },
2073
+ "liquidateBorrow(address,uint256,address)": {
2074
+ "notice": "The sender liquidates the borrowers collateral. The collateral seized is transferred to the liquidator."
2075
+ },
2076
+ "mint(uint256)": {
2077
+ "notice": "Sender supplies assets into the market and receives vTokens in exchange"
2078
+ },
2079
+ "mintBehalf(address,uint256)": {
2080
+ "notice": "Sender supplies assets into the market and receiver receives vTokens in exchange"
2081
+ },
2082
+ "name()": {
2083
+ "notice": "EIP-20 token name for this token"
2084
+ },
2085
+ "pendingAdmin()": {
2086
+ "notice": "Pending administrator for this contract"
2087
+ },
2088
+ "protocolShareReserve()": {
2089
+ "notice": "address of protocol share reserve contract"
2090
+ },
2091
+ "redeem(uint256)": {
2092
+ "notice": "Sender redeems vTokens in exchange for the underlying asset"
2093
+ },
2094
+ "redeemUnderlying(uint256)": {
2095
+ "notice": "Sender redeems vTokens in exchange for a specified amount of underlying asset"
2096
+ },
2097
+ "reduceReservesBlockDelta()": {
2098
+ "notice": "delta block after which reserves will be reduced"
2099
+ },
2100
+ "reduceReservesBlockNumber()": {
2101
+ "notice": "last block number at which reserves were reduced"
2102
+ },
2103
+ "repayBorrow(uint256)": {
2104
+ "notice": "Sender repays their own borrow"
2105
+ },
2106
+ "repayBorrowBehalf(address,uint256)": {
2107
+ "notice": "Sender repays a borrow belonging to another borrower"
2108
+ },
2109
+ "reserveFactorMantissa()": {
2110
+ "notice": "Fraction of interest currently set aside for reserves"
2111
+ },
2112
+ "seize(address,address,uint256)": {
2113
+ "notice": "Transfers collateral tokens (this market) to the liquidator."
2114
+ },
2115
+ "supplyRatePerBlock()": {
2116
+ "notice": "Returns the current per-block supply interest rate for this vToken"
2117
+ },
2118
+ "symbol()": {
2119
+ "notice": "EIP-20 token symbol for this token"
2120
+ },
2121
+ "totalBorrows()": {
2122
+ "notice": "Total amount of outstanding borrows of the underlying in this market"
2123
+ },
2124
+ "totalBorrowsCurrent()": {
2125
+ "notice": "Returns the current total borrows plus accrued interest"
2126
+ },
2127
+ "totalReserves()": {
2128
+ "notice": "Total amount of reserves of the underlying held in this market"
2129
+ },
2130
+ "totalSupply()": {
2131
+ "notice": "Total number of tokens in circulation"
2132
+ },
2133
+ "transfer(address,uint256)": {
2134
+ "notice": "Transfer `amount` tokens from `msg.sender` to `dst`"
2135
+ },
2136
+ "transferFrom(address,address,uint256)": {
2137
+ "notice": "Transfer `amount` tokens from `src` to `dst`"
2138
+ },
2139
+ "underlying()": {
2140
+ "notice": "Underlying asset for this VToken"
2141
+ }
2142
+ },
2143
+ "notice": "vTokens which wrap an EIP-20 underlying and delegate to an implementation",
2144
+ "version": 1
2145
+ },
2146
+ "storageLayout": {
2147
+ "storage": [
2148
+ {
2149
+ "astId": 36420,
2150
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2151
+ "label": "_notEntered",
2152
+ "offset": 0,
2153
+ "slot": "0",
2154
+ "type": "t_bool"
2155
+ },
2156
+ {
2157
+ "astId": 36423,
2158
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2159
+ "label": "name",
2160
+ "offset": 0,
2161
+ "slot": "1",
2162
+ "type": "t_string_storage"
2163
+ },
2164
+ {
2165
+ "astId": 36426,
2166
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2167
+ "label": "symbol",
2168
+ "offset": 0,
2169
+ "slot": "2",
2170
+ "type": "t_string_storage"
2171
+ },
2172
+ {
2173
+ "astId": 36429,
2174
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2175
+ "label": "decimals",
2176
+ "offset": 0,
2177
+ "slot": "3",
2178
+ "type": "t_uint8"
2179
+ },
2180
+ {
2181
+ "astId": 36440,
2182
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2183
+ "label": "admin",
2184
+ "offset": 1,
2185
+ "slot": "3",
2186
+ "type": "t_address_payable"
2187
+ },
2188
+ {
2189
+ "astId": 36443,
2190
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2191
+ "label": "pendingAdmin",
2192
+ "offset": 0,
2193
+ "slot": "4",
2194
+ "type": "t_address_payable"
2195
+ },
2196
+ {
2197
+ "astId": 36447,
2198
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2199
+ "label": "comptroller",
2200
+ "offset": 0,
2201
+ "slot": "5",
2202
+ "type": "t_contract(ComptrollerInterface)4578"
2203
+ },
2204
+ {
2205
+ "astId": 36451,
2206
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2207
+ "label": "interestRateModel",
2208
+ "offset": 0,
2209
+ "slot": "6",
2210
+ "type": "t_contract(InterestRateModelV8)21839"
2211
+ },
2212
+ {
2213
+ "astId": 36454,
2214
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2215
+ "label": "initialExchangeRateMantissa",
2216
+ "offset": 0,
2217
+ "slot": "7",
2218
+ "type": "t_uint256"
2219
+ },
2220
+ {
2221
+ "astId": 36457,
2222
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2223
+ "label": "reserveFactorMantissa",
2224
+ "offset": 0,
2225
+ "slot": "8",
2226
+ "type": "t_uint256"
2227
+ },
2228
+ {
2229
+ "astId": 36460,
2230
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2231
+ "label": "accrualBlockNumber",
2232
+ "offset": 0,
2233
+ "slot": "9",
2234
+ "type": "t_uint256"
2235
+ },
2236
+ {
2237
+ "astId": 36463,
2238
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2239
+ "label": "borrowIndex",
2240
+ "offset": 0,
2241
+ "slot": "10",
2242
+ "type": "t_uint256"
2243
+ },
2244
+ {
2245
+ "astId": 36466,
2246
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2247
+ "label": "totalBorrows",
2248
+ "offset": 0,
2249
+ "slot": "11",
2250
+ "type": "t_uint256"
2251
+ },
2252
+ {
2253
+ "astId": 36469,
2254
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2255
+ "label": "totalReserves",
2256
+ "offset": 0,
2257
+ "slot": "12",
2258
+ "type": "t_uint256"
2259
+ },
2260
+ {
2261
+ "astId": 36472,
2262
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2263
+ "label": "totalSupply",
2264
+ "offset": 0,
2265
+ "slot": "13",
2266
+ "type": "t_uint256"
2267
+ },
2268
+ {
2269
+ "astId": 36477,
2270
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2271
+ "label": "accountTokens",
2272
+ "offset": 0,
2273
+ "slot": "14",
2274
+ "type": "t_mapping(t_address,t_uint256)"
2275
+ },
2276
+ {
2277
+ "astId": 36484,
2278
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2279
+ "label": "transferAllowances",
2280
+ "offset": 0,
2281
+ "slot": "15",
2282
+ "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
2283
+ },
2284
+ {
2285
+ "astId": 36490,
2286
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2287
+ "label": "accountBorrows",
2288
+ "offset": 0,
2289
+ "slot": "16",
2290
+ "type": "t_mapping(t_address,t_struct(BorrowSnapshot)36417_storage)"
2291
+ },
2292
+ {
2293
+ "astId": 36493,
2294
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2295
+ "label": "underlying",
2296
+ "offset": 0,
2297
+ "slot": "17",
2298
+ "type": "t_address"
2299
+ },
2300
+ {
2301
+ "astId": 36496,
2302
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2303
+ "label": "implementation",
2304
+ "offset": 0,
2305
+ "slot": "18",
2306
+ "type": "t_address"
2307
+ },
2308
+ {
2309
+ "astId": 36499,
2310
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2311
+ "label": "reduceReservesBlockDelta",
2312
+ "offset": 0,
2313
+ "slot": "19",
2314
+ "type": "t_uint256"
2315
+ },
2316
+ {
2317
+ "astId": 36502,
2318
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2319
+ "label": "reduceReservesBlockNumber",
2320
+ "offset": 0,
2321
+ "slot": "20",
2322
+ "type": "t_uint256"
2323
+ },
2324
+ {
2325
+ "astId": 36505,
2326
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2327
+ "label": "protocolShareReserve",
2328
+ "offset": 0,
2329
+ "slot": "21",
2330
+ "type": "t_address_payable"
2331
+ },
2332
+ {
2333
+ "astId": 36508,
2334
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2335
+ "label": "accessControlManager",
2336
+ "offset": 0,
2337
+ "slot": "22",
2338
+ "type": "t_address"
2339
+ },
2340
+ {
2341
+ "astId": 36516,
2342
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2343
+ "label": "__gap",
2344
+ "offset": 0,
2345
+ "slot": "23",
2346
+ "type": "t_array(t_uint256)50_storage"
2347
+ }
2348
+ ],
2349
+ "types": {
2350
+ "t_address": {
2351
+ "encoding": "inplace",
2352
+ "label": "address",
2353
+ "numberOfBytes": "20"
2354
+ },
2355
+ "t_address_payable": {
2356
+ "encoding": "inplace",
2357
+ "label": "address payable",
2358
+ "numberOfBytes": "20"
2359
+ },
2360
+ "t_array(t_uint256)50_storage": {
2361
+ "base": "t_uint256",
2362
+ "encoding": "inplace",
2363
+ "label": "uint256[50]",
2364
+ "numberOfBytes": "1600"
2365
+ },
2366
+ "t_bool": {
2367
+ "encoding": "inplace",
2368
+ "label": "bool",
2369
+ "numberOfBytes": "1"
2370
+ },
2371
+ "t_contract(ComptrollerInterface)4578": {
2372
+ "encoding": "inplace",
2373
+ "label": "contract ComptrollerInterface",
2374
+ "numberOfBytes": "20"
2375
+ },
2376
+ "t_contract(InterestRateModelV8)21839": {
2377
+ "encoding": "inplace",
2378
+ "label": "contract InterestRateModelV8",
2379
+ "numberOfBytes": "20"
2380
+ },
2381
+ "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
2382
+ "encoding": "mapping",
2383
+ "key": "t_address",
2384
+ "label": "mapping(address => mapping(address => uint256))",
2385
+ "numberOfBytes": "32",
2386
+ "value": "t_mapping(t_address,t_uint256)"
2387
+ },
2388
+ "t_mapping(t_address,t_struct(BorrowSnapshot)36417_storage)": {
2389
+ "encoding": "mapping",
2390
+ "key": "t_address",
2391
+ "label": "mapping(address => struct VTokenStorageBase.BorrowSnapshot)",
2392
+ "numberOfBytes": "32",
2393
+ "value": "t_struct(BorrowSnapshot)36417_storage"
2394
+ },
2395
+ "t_mapping(t_address,t_uint256)": {
2396
+ "encoding": "mapping",
2397
+ "key": "t_address",
2398
+ "label": "mapping(address => uint256)",
2399
+ "numberOfBytes": "32",
2400
+ "value": "t_uint256"
2401
+ },
2402
+ "t_string_storage": {
2403
+ "encoding": "bytes",
2404
+ "label": "string",
2405
+ "numberOfBytes": "32"
2406
+ },
2407
+ "t_struct(BorrowSnapshot)36417_storage": {
2408
+ "encoding": "inplace",
2409
+ "label": "struct VTokenStorageBase.BorrowSnapshot",
2410
+ "members": [
2411
+ {
2412
+ "astId": 36414,
2413
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2414
+ "label": "principal",
2415
+ "offset": 0,
2416
+ "slot": "0",
2417
+ "type": "t_uint256"
2418
+ },
2419
+ {
2420
+ "astId": 36416,
2421
+ "contract": "contracts/Tokens/VTokens/VBep20Delegator.sol:VBep20Delegator",
2422
+ "label": "interestIndex",
2423
+ "offset": 0,
2424
+ "slot": "1",
2425
+ "type": "t_uint256"
2426
+ }
2427
+ ],
2428
+ "numberOfBytes": "64"
2429
+ },
2430
+ "t_uint256": {
2431
+ "encoding": "inplace",
2432
+ "label": "uint256",
2433
+ "numberOfBytes": "32"
2434
+ },
2435
+ "t_uint8": {
2436
+ "encoding": "inplace",
2437
+ "label": "uint8",
2438
+ "numberOfBytes": "1"
2439
+ }
2440
+ }
2441
+ }
2442
+ }