@exponent-labs/kamino-vault-idl 0.1.5

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,2052 @@
1
+ {
2
+ "address": "KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd",
3
+ "metadata": {
4
+ "name": "kamino_vault",
5
+ "version": "1.0.0",
6
+ "spec": "0.1.0"
7
+ },
8
+ "instructions": [
9
+ {
10
+ "name": "init_vault",
11
+ "discriminator": [77, 79, 85, 150, 33, 217, 52, 106],
12
+ "accounts": [
13
+ {
14
+ "name": "admin_authority",
15
+ "writable": true,
16
+ "signer": true
17
+ },
18
+ {
19
+ "name": "vault_state",
20
+ "writable": true
21
+ },
22
+ {
23
+ "name": "base_vault_authority"
24
+ },
25
+ {
26
+ "name": "token_vault",
27
+ "writable": true
28
+ },
29
+ {
30
+ "name": "base_token_mint"
31
+ },
32
+ {
33
+ "name": "shares_mint",
34
+ "writable": true
35
+ },
36
+ {
37
+ "name": "admin_token_account",
38
+ "writable": true
39
+ },
40
+ {
41
+ "name": "system_program"
42
+ },
43
+ {
44
+ "name": "rent"
45
+ },
46
+ {
47
+ "name": "token_program"
48
+ },
49
+ {
50
+ "name": "shares_token_program"
51
+ }
52
+ ],
53
+ "args": []
54
+ },
55
+ {
56
+ "name": "update_reserve_allocation",
57
+ "discriminator": [5, 54, 213, 112, 75, 232, 117, 37],
58
+ "accounts": [
59
+ {
60
+ "name": "signer",
61
+ "writable": true,
62
+ "signer": true
63
+ },
64
+ {
65
+ "name": "vault_state",
66
+ "writable": true
67
+ },
68
+ {
69
+ "name": "base_vault_authority"
70
+ },
71
+ {
72
+ "name": "reserve_collateral_mint",
73
+ "writable": true
74
+ },
75
+ {
76
+ "name": "reserve"
77
+ },
78
+ {
79
+ "name": "ctoken_vault",
80
+ "writable": true
81
+ },
82
+ {
83
+ "name": "reserve_collateral_token_program"
84
+ },
85
+ {
86
+ "name": "system_program"
87
+ },
88
+ {
89
+ "name": "rent"
90
+ }
91
+ ],
92
+ "args": [
93
+ {
94
+ "name": "weight",
95
+ "type": "u64"
96
+ },
97
+ {
98
+ "name": "cap",
99
+ "type": "u64"
100
+ }
101
+ ]
102
+ },
103
+ {
104
+ "name": "deposit",
105
+ "discriminator": [242, 35, 198, 137, 82, 225, 242, 182],
106
+ "accounts": [
107
+ {
108
+ "name": "user",
109
+ "writable": true,
110
+ "signer": true
111
+ },
112
+ {
113
+ "name": "vault_state",
114
+ "writable": true
115
+ },
116
+ {
117
+ "name": "token_vault",
118
+ "writable": true
119
+ },
120
+ {
121
+ "name": "token_mint"
122
+ },
123
+ {
124
+ "name": "base_vault_authority"
125
+ },
126
+ {
127
+ "name": "shares_mint",
128
+ "writable": true
129
+ },
130
+ {
131
+ "name": "user_token_ata",
132
+ "writable": true
133
+ },
134
+ {
135
+ "name": "user_shares_ata",
136
+ "writable": true
137
+ },
138
+ {
139
+ "name": "klend_program"
140
+ },
141
+ {
142
+ "name": "token_program"
143
+ },
144
+ {
145
+ "name": "shares_token_program"
146
+ },
147
+ {
148
+ "name": "event_authority"
149
+ },
150
+ {
151
+ "name": "program"
152
+ }
153
+ ],
154
+ "args": [
155
+ {
156
+ "name": "max_amount",
157
+ "type": "u64"
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ "name": "withdraw",
163
+ "discriminator": [183, 18, 70, 156, 148, 109, 161, 34],
164
+ "accounts": [
165
+ {
166
+ "name": "withdraw_from_available",
167
+ "accounts": [
168
+ {
169
+ "name": "user",
170
+ "writable": true,
171
+ "signer": true
172
+ },
173
+ {
174
+ "name": "vault_state",
175
+ "writable": true
176
+ },
177
+ {
178
+ "name": "token_vault",
179
+ "writable": true
180
+ },
181
+ {
182
+ "name": "base_vault_authority"
183
+ },
184
+ {
185
+ "name": "user_token_ata",
186
+ "writable": true
187
+ },
188
+ {
189
+ "name": "token_mint",
190
+ "writable": true
191
+ },
192
+ {
193
+ "name": "user_shares_ata",
194
+ "writable": true
195
+ },
196
+ {
197
+ "name": "shares_mint",
198
+ "writable": true
199
+ },
200
+ {
201
+ "name": "token_program"
202
+ },
203
+ {
204
+ "name": "shares_token_program"
205
+ },
206
+ {
207
+ "name": "klend_program"
208
+ },
209
+ {
210
+ "name": "event_authority"
211
+ },
212
+ {
213
+ "name": "program"
214
+ }
215
+ ]
216
+ },
217
+ {
218
+ "name": "withdraw_from_reserve_accounts",
219
+ "accounts": [
220
+ {
221
+ "name": "vault_state",
222
+ "writable": true
223
+ },
224
+ {
225
+ "name": "reserve",
226
+ "writable": true
227
+ },
228
+ {
229
+ "name": "ctoken_vault",
230
+ "writable": true
231
+ },
232
+ {
233
+ "name": "lending_market"
234
+ },
235
+ {
236
+ "name": "lending_market_authority"
237
+ },
238
+ {
239
+ "name": "reserve_liquidity_supply",
240
+ "writable": true
241
+ },
242
+ {
243
+ "name": "reserve_collateral_mint",
244
+ "writable": true
245
+ },
246
+ {
247
+ "name": "reserve_collateral_token_program"
248
+ },
249
+ {
250
+ "name": "instruction_sysvar_account"
251
+ }
252
+ ]
253
+ },
254
+ {
255
+ "name": "event_authority"
256
+ },
257
+ {
258
+ "name": "program"
259
+ }
260
+ ],
261
+ "args": [
262
+ {
263
+ "name": "shares_amount",
264
+ "type": "u64"
265
+ }
266
+ ]
267
+ },
268
+ {
269
+ "name": "invest",
270
+ "discriminator": [13, 245, 180, 103, 254, 182, 121, 4],
271
+ "accounts": [
272
+ {
273
+ "name": "payer",
274
+ "writable": true,
275
+ "signer": true
276
+ },
277
+ {
278
+ "name": "payer_token_account",
279
+ "writable": true
280
+ },
281
+ {
282
+ "name": "vault_state",
283
+ "writable": true
284
+ },
285
+ {
286
+ "name": "token_vault",
287
+ "writable": true
288
+ },
289
+ {
290
+ "name": "token_mint",
291
+ "writable": true
292
+ },
293
+ {
294
+ "name": "base_vault_authority",
295
+ "writable": true
296
+ },
297
+ {
298
+ "name": "ctoken_vault",
299
+ "writable": true
300
+ },
301
+ {
302
+ "name": "reserve",
303
+ "docs": ["CPI accounts"],
304
+ "writable": true
305
+ },
306
+ {
307
+ "name": "lending_market"
308
+ },
309
+ {
310
+ "name": "lending_market_authority"
311
+ },
312
+ {
313
+ "name": "reserve_liquidity_supply",
314
+ "writable": true
315
+ },
316
+ {
317
+ "name": "reserve_collateral_mint",
318
+ "writable": true
319
+ },
320
+ {
321
+ "name": "klend_program"
322
+ },
323
+ {
324
+ "name": "reserve_collateral_token_program"
325
+ },
326
+ {
327
+ "name": "token_program"
328
+ },
329
+ {
330
+ "name": "instruction_sysvar_account"
331
+ }
332
+ ],
333
+ "args": []
334
+ },
335
+ {
336
+ "name": "update_vault_config",
337
+ "discriminator": [122, 3, 21, 222, 158, 255, 238, 157],
338
+ "accounts": [
339
+ {
340
+ "name": "vault_admin_authority",
341
+ "signer": true
342
+ },
343
+ {
344
+ "name": "vault_state",
345
+ "writable": true
346
+ },
347
+ {
348
+ "name": "klend_program"
349
+ }
350
+ ],
351
+ "args": [
352
+ {
353
+ "name": "entry",
354
+ "type": {
355
+ "defined": {
356
+ "name": "VaultConfigField"
357
+ }
358
+ }
359
+ },
360
+ {
361
+ "name": "data",
362
+ "type": "bytes"
363
+ }
364
+ ]
365
+ },
366
+ {
367
+ "name": "withdraw_pending_fees",
368
+ "discriminator": [131, 194, 200, 140, 175, 244, 217, 183],
369
+ "accounts": [
370
+ {
371
+ "name": "vault_admin_authority",
372
+ "writable": true,
373
+ "signer": true
374
+ },
375
+ {
376
+ "name": "vault_state",
377
+ "writable": true
378
+ },
379
+ {
380
+ "name": "reserve",
381
+ "writable": true
382
+ },
383
+ {
384
+ "name": "token_vault",
385
+ "writable": true
386
+ },
387
+ {
388
+ "name": "ctoken_vault",
389
+ "writable": true
390
+ },
391
+ {
392
+ "name": "base_vault_authority",
393
+ "writable": true
394
+ },
395
+ {
396
+ "name": "token_ata",
397
+ "writable": true
398
+ },
399
+ {
400
+ "name": "token_mint",
401
+ "writable": true
402
+ },
403
+ {
404
+ "name": "lending_market",
405
+ "docs": ["CPI accounts"]
406
+ },
407
+ {
408
+ "name": "lending_market_authority"
409
+ },
410
+ {
411
+ "name": "reserve_liquidity_supply",
412
+ "writable": true
413
+ },
414
+ {
415
+ "name": "reserve_collateral_mint",
416
+ "writable": true
417
+ },
418
+ {
419
+ "name": "klend_program"
420
+ },
421
+ {
422
+ "name": "token_program"
423
+ },
424
+ {
425
+ "name": "reserve_collateral_token_program"
426
+ },
427
+ {
428
+ "name": "instruction_sysvar_account"
429
+ }
430
+ ],
431
+ "args": []
432
+ },
433
+ {
434
+ "name": "update_admin",
435
+ "discriminator": [161, 176, 40, 213, 60, 184, 179, 228],
436
+ "accounts": [
437
+ {
438
+ "name": "pending_admin",
439
+ "writable": true,
440
+ "signer": true
441
+ },
442
+ {
443
+ "name": "vault_state",
444
+ "writable": true
445
+ }
446
+ ],
447
+ "args": []
448
+ },
449
+ {
450
+ "name": "give_up_pending_fees",
451
+ "discriminator": [177, 200, 120, 134, 110, 217, 147, 81],
452
+ "accounts": [
453
+ {
454
+ "name": "vault_admin_authority",
455
+ "writable": true,
456
+ "signer": true
457
+ },
458
+ {
459
+ "name": "vault_state",
460
+ "writable": true
461
+ },
462
+ {
463
+ "name": "klend_program"
464
+ }
465
+ ],
466
+ "args": [
467
+ {
468
+ "name": "max_amount_to_give_up",
469
+ "type": "u64"
470
+ }
471
+ ]
472
+ },
473
+ {
474
+ "name": "initialize_shares_metadata",
475
+ "discriminator": [3, 15, 172, 114, 200, 0, 131, 32],
476
+ "accounts": [
477
+ {
478
+ "name": "vault_admin_authority",
479
+ "writable": true,
480
+ "signer": true
481
+ },
482
+ {
483
+ "name": "vault_state"
484
+ },
485
+ {
486
+ "name": "shares_mint"
487
+ },
488
+ {
489
+ "name": "base_vault_authority"
490
+ },
491
+ {
492
+ "name": "shares_metadata",
493
+ "writable": true
494
+ },
495
+ {
496
+ "name": "system_program"
497
+ },
498
+ {
499
+ "name": "rent"
500
+ },
501
+ {
502
+ "name": "metadata_program"
503
+ }
504
+ ],
505
+ "args": [
506
+ {
507
+ "name": "name",
508
+ "type": "string"
509
+ },
510
+ {
511
+ "name": "symbol",
512
+ "type": "string"
513
+ },
514
+ {
515
+ "name": "uri",
516
+ "type": "string"
517
+ }
518
+ ]
519
+ },
520
+ {
521
+ "name": "update_shares_metadata",
522
+ "discriminator": [155, 34, 122, 165, 245, 137, 147, 107],
523
+ "accounts": [
524
+ {
525
+ "name": "vault_admin_authority",
526
+ "writable": true,
527
+ "signer": true
528
+ },
529
+ {
530
+ "name": "vault_state"
531
+ },
532
+ {
533
+ "name": "base_vault_authority"
534
+ },
535
+ {
536
+ "name": "shares_metadata",
537
+ "writable": true
538
+ },
539
+ {
540
+ "name": "metadata_program"
541
+ }
542
+ ],
543
+ "args": [
544
+ {
545
+ "name": "name",
546
+ "type": "string"
547
+ },
548
+ {
549
+ "name": "symbol",
550
+ "type": "string"
551
+ },
552
+ {
553
+ "name": "uri",
554
+ "type": "string"
555
+ }
556
+ ]
557
+ },
558
+ {
559
+ "name": "withdraw_from_available",
560
+ "discriminator": [19, 131, 112, 155, 170, 220, 34, 57],
561
+ "accounts": [
562
+ {
563
+ "name": "user",
564
+ "writable": true,
565
+ "signer": true
566
+ },
567
+ {
568
+ "name": "vault_state",
569
+ "writable": true
570
+ },
571
+ {
572
+ "name": "token_vault",
573
+ "writable": true
574
+ },
575
+ {
576
+ "name": "base_vault_authority"
577
+ },
578
+ {
579
+ "name": "user_token_ata",
580
+ "writable": true
581
+ },
582
+ {
583
+ "name": "token_mint",
584
+ "writable": true
585
+ },
586
+ {
587
+ "name": "user_shares_ata",
588
+ "writable": true
589
+ },
590
+ {
591
+ "name": "shares_mint",
592
+ "writable": true
593
+ },
594
+ {
595
+ "name": "token_program"
596
+ },
597
+ {
598
+ "name": "shares_token_program"
599
+ },
600
+ {
601
+ "name": "klend_program"
602
+ },
603
+ {
604
+ "name": "event_authority"
605
+ },
606
+ {
607
+ "name": "program"
608
+ }
609
+ ],
610
+ "args": [
611
+ {
612
+ "name": "shares_amount",
613
+ "type": "u64"
614
+ }
615
+ ]
616
+ },
617
+ {
618
+ "name": "remove_allocation",
619
+ "discriminator": [32, 220, 211, 141, 209, 231, 73, 76],
620
+ "accounts": [
621
+ {
622
+ "name": "vault_admin_authority",
623
+ "writable": true,
624
+ "signer": true
625
+ },
626
+ {
627
+ "name": "vault_state",
628
+ "writable": true
629
+ },
630
+ {
631
+ "name": "reserve"
632
+ }
633
+ ],
634
+ "args": []
635
+ }
636
+ ],
637
+ "accounts": [
638
+ {
639
+ "name": "Reserve",
640
+ "discriminator": [43, 242, 204, 202, 26, 247, 59, 127]
641
+ },
642
+ {
643
+ "name": "VaultState",
644
+ "discriminator": [228, 196, 82, 165, 98, 210, 235, 152]
645
+ }
646
+ ],
647
+ "events": [
648
+ {
649
+ "name": "DepositResultEvent",
650
+ "discriminator": [123, 64, 220, 4, 88, 103, 127, 204]
651
+ },
652
+ {
653
+ "name": "DepositUserAtaBalanceEvent",
654
+ "discriminator": [202, 199, 172, 212, 36, 174, 122, 14]
655
+ },
656
+ {
657
+ "name": "SharesToWithdrawEvent",
658
+ "discriminator": [124, 220, 160, 245, 166, 68, 63, 198]
659
+ },
660
+ {
661
+ "name": "WithdrawResultEvent",
662
+ "discriminator": [20, 191, 15, 231, 196, 49, 101, 38]
663
+ }
664
+ ],
665
+ "errors": [
666
+ {
667
+ "code": 7000,
668
+ "name": "DepositAmountsZero",
669
+ "msg": "DepositAmountsZero"
670
+ },
671
+ {
672
+ "code": 7001,
673
+ "name": "SharesIssuedAmountDoesNotMatch",
674
+ "msg": "SharesIssuedAmountDoesNotMatch"
675
+ },
676
+ {
677
+ "code": 7002,
678
+ "name": "MathOverflow",
679
+ "msg": "MathOverflow"
680
+ },
681
+ {
682
+ "code": 7003,
683
+ "name": "IntegerOverflow",
684
+ "msg": "IntegerOverflow"
685
+ },
686
+ {
687
+ "code": 7004,
688
+ "name": "WithdrawAmountBelowMinimum",
689
+ "msg": "Withdrawn amount is below minimum"
690
+ },
691
+ {
692
+ "code": 7005,
693
+ "name": "TooMuchLiquidityToWithdraw",
694
+ "msg": "TooMuchLiquidityToWithdraw"
695
+ },
696
+ {
697
+ "code": 7006,
698
+ "name": "ReserveAlreadyExists",
699
+ "msg": "ReserveAlreadyExists"
700
+ },
701
+ {
702
+ "code": 7007,
703
+ "name": "ReserveNotPartOfAllocations",
704
+ "msg": "ReserveNotPartOfAllocations"
705
+ },
706
+ {
707
+ "code": 7008,
708
+ "name": "CouldNotDeserializeAccountAsReserve",
709
+ "msg": "CouldNotDeserializeAccountAsReserve"
710
+ },
711
+ {
712
+ "code": 7009,
713
+ "name": "ReserveNotProvidedInTheAccounts",
714
+ "msg": "ReserveNotProvidedInTheAccounts"
715
+ },
716
+ {
717
+ "code": 7010,
718
+ "name": "ReserveAccountAndKeyMismatch",
719
+ "msg": "ReserveAccountAndKeyMismatch"
720
+ },
721
+ {
722
+ "code": 7011,
723
+ "name": "OutOfRangeOfReserveIndex",
724
+ "msg": "OutOfRangeOfReserveIndex"
725
+ },
726
+ {
727
+ "code": 7012,
728
+ "name": "CannotFindReserveInAllocations",
729
+ "msg": "OutOfRangeOfReserveIndex"
730
+ },
731
+ {
732
+ "code": 7013,
733
+ "name": "InvestAmountBelowMinimum",
734
+ "msg": "Invested amount is below minimum"
735
+ },
736
+ {
737
+ "code": 7014,
738
+ "name": "AdminAuthorityIncorrect",
739
+ "msg": "AdminAuthorityIncorrect"
740
+ },
741
+ {
742
+ "code": 7015,
743
+ "name": "BaseVaultAuthorityIncorrect",
744
+ "msg": "BaseVaultAuthorityIncorrect"
745
+ },
746
+ {
747
+ "code": 7016,
748
+ "name": "BaseVaultAuthorityBumpIncorrect",
749
+ "msg": "BaseVaultAuthorityBumpIncorrect"
750
+ },
751
+ {
752
+ "code": 7017,
753
+ "name": "TokenMintIncorrect",
754
+ "msg": "TokenMintIncorrect"
755
+ },
756
+ {
757
+ "code": 7018,
758
+ "name": "TokenMintDecimalsIncorrect",
759
+ "msg": "TokenMintDecimalsIncorrect"
760
+ },
761
+ {
762
+ "code": 7019,
763
+ "name": "TokenVaultIncorrect",
764
+ "msg": "TokenVaultIncorrect"
765
+ },
766
+ {
767
+ "code": 7020,
768
+ "name": "SharesMintDecimalsIncorrect",
769
+ "msg": "SharesMintDecimalsIncorrect"
770
+ },
771
+ {
772
+ "code": 7021,
773
+ "name": "SharesMintIncorrect",
774
+ "msg": "SharesMintIncorrect"
775
+ },
776
+ {
777
+ "code": 7022,
778
+ "name": "InitialAccountingIncorrect",
779
+ "msg": "InitialAccountingIncorrect"
780
+ },
781
+ {
782
+ "code": 7023,
783
+ "name": "ReserveIsStale",
784
+ "msg": "Reserve is stale and must be refreshed before any operation"
785
+ },
786
+ {
787
+ "code": 7024,
788
+ "name": "NotEnoughLiquidityDisinvestedToSendToUser",
789
+ "msg": "Not enough liquidity disinvested to send to user"
790
+ },
791
+ {
792
+ "code": 7025,
793
+ "name": "BPSValueTooBig",
794
+ "msg": "BPS value is greater than 10000"
795
+ },
796
+ {
797
+ "code": 7026,
798
+ "name": "DepositAmountBelowMinimum",
799
+ "msg": "Deposited amount is below minimum"
800
+ },
801
+ {
802
+ "code": 7027,
803
+ "name": "ReserveSpaceExhausted",
804
+ "msg": "Vault have no space for new reserves"
805
+ },
806
+ {
807
+ "code": 7028,
808
+ "name": "CannotWithdrawFromEmptyVault",
809
+ "msg": "Cannot withdraw from empty vault"
810
+ },
811
+ {
812
+ "code": 7029,
813
+ "name": "TokensDepositedAmountDoesNotMatch",
814
+ "msg": "TokensDepositedAmountDoesNotMatch"
815
+ },
816
+ {
817
+ "code": 7030,
818
+ "name": "AmountToWithdrawDoesNotMatch",
819
+ "msg": "Amount to withdraw does not match"
820
+ },
821
+ {
822
+ "code": 7031,
823
+ "name": "LiquidityToWithdrawDoesNotMatch",
824
+ "msg": "Liquidity to withdraw does not match"
825
+ },
826
+ {
827
+ "code": 7032,
828
+ "name": "UserReceivedAmountDoesNotMatch",
829
+ "msg": "User received amount does not match"
830
+ },
831
+ {
832
+ "code": 7033,
833
+ "name": "SharesBurnedAmountDoesNotMatch",
834
+ "msg": "Shares burned amount does not match"
835
+ },
836
+ {
837
+ "code": 7034,
838
+ "name": "DisinvestedLiquidityAmountDoesNotMatch",
839
+ "msg": "Disinvested liquidity amount does not match"
840
+ },
841
+ {
842
+ "code": 7035,
843
+ "name": "SharesMintedAmountDoesNotMatch",
844
+ "msg": "SharesMintedAmountDoesNotMatch"
845
+ },
846
+ {
847
+ "code": 7036,
848
+ "name": "AUMDecreasedAfterInvest",
849
+ "msg": "AUM decreased after invest"
850
+ },
851
+ {
852
+ "code": 7037,
853
+ "name": "AUMBelowPendingFees",
854
+ "msg": "AUM is below pending fees"
855
+ },
856
+ {
857
+ "code": 7038,
858
+ "name": "DepositAmountsZeroShares",
859
+ "msg": "Deposit amount results in 0 shares"
860
+ },
861
+ {
862
+ "code": 7039,
863
+ "name": "WithdrawResultsInZeroShares",
864
+ "msg": "Withdraw amount results in 0 shares"
865
+ },
866
+ {
867
+ "code": 7040,
868
+ "name": "CannotWithdrawZeroShares",
869
+ "msg": "Cannot withdraw zero shares"
870
+ },
871
+ {
872
+ "code": 7041,
873
+ "name": "ManagementFeeGreaterThanMaxAllowed",
874
+ "msg": "Management fee is greater than maximum allowed"
875
+ },
876
+ {
877
+ "code": 7042,
878
+ "name": "VaultAUMZero",
879
+ "msg": "Vault assets under management are empty"
880
+ },
881
+ {
882
+ "code": 7043,
883
+ "name": "MissingReserveForBatchRefresh",
884
+ "msg": "Missing reserve for batch refresh"
885
+ },
886
+ {
887
+ "code": 7044,
888
+ "name": "MinWithdrawAmountTooBig",
889
+ "msg": "Min withdraw amount is too big"
890
+ },
891
+ {
892
+ "code": 7045,
893
+ "name": "InvestTooSoon",
894
+ "msg": "Invest is called too soon after last invest"
895
+ },
896
+ {
897
+ "code": 7046,
898
+ "name": "WrongAdminOrAllocationAdmin",
899
+ "msg": "Wrong admin or allocation admin"
900
+ },
901
+ {
902
+ "code": 7047,
903
+ "name": "ReserveHasNonZeroAllocationOrCTokens",
904
+ "msg": "Reserve has non-zero allocation or ctokens so cannot be removed"
905
+ },
906
+ {
907
+ "code": 7048,
908
+ "name": "DepositAmountGreaterThanRequestedAmount",
909
+ "msg": "Deposit amount is greater than requested amount"
910
+ }
911
+ ],
912
+ "types": [
913
+ {
914
+ "name": "LastUpdate",
915
+ "docs": ["Last update state"],
916
+ "type": {
917
+ "kind": "struct",
918
+ "fields": [
919
+ {
920
+ "name": "slot",
921
+ "docs": ["Last slot when updated"],
922
+ "type": "u64"
923
+ },
924
+ {
925
+ "name": "stale",
926
+ "docs": ["True when marked stale, false when slot updated"],
927
+ "type": "u8"
928
+ },
929
+ {
930
+ "name": "price_status",
931
+ "docs": ["Status of the prices used to calculate the last update"],
932
+ "type": "u8"
933
+ },
934
+ {
935
+ "name": "placeholder",
936
+ "type": {
937
+ "array": ["u8", 6]
938
+ }
939
+ }
940
+ ]
941
+ }
942
+ },
943
+ {
944
+ "name": "BigFractionBytes",
945
+ "type": {
946
+ "kind": "struct",
947
+ "fields": [
948
+ {
949
+ "name": "value",
950
+ "type": {
951
+ "array": ["u64", 4]
952
+ }
953
+ },
954
+ {
955
+ "name": "padding",
956
+ "type": {
957
+ "array": ["u64", 2]
958
+ }
959
+ }
960
+ ]
961
+ }
962
+ },
963
+ {
964
+ "name": "ReserveCollateral",
965
+ "docs": ["Reserve collateral"],
966
+ "type": {
967
+ "kind": "struct",
968
+ "fields": [
969
+ {
970
+ "name": "mint_pubkey",
971
+ "docs": ["Reserve collateral mint address"],
972
+ "type": "pubkey"
973
+ },
974
+ {
975
+ "name": "mint_total_supply",
976
+ "docs": ["Reserve collateral mint supply, used for exchange rate"],
977
+ "type": "u64"
978
+ },
979
+ {
980
+ "name": "supply_vault",
981
+ "docs": ["Reserve collateral supply address"],
982
+ "type": "pubkey"
983
+ },
984
+ {
985
+ "name": "padding1",
986
+ "type": {
987
+ "array": ["u128", 32]
988
+ }
989
+ },
990
+ {
991
+ "name": "padding2",
992
+ "type": {
993
+ "array": ["u128", 32]
994
+ }
995
+ }
996
+ ]
997
+ }
998
+ },
999
+ {
1000
+ "name": "ReserveConfig",
1001
+ "docs": ["Reserve configuration values"],
1002
+ "type": {
1003
+ "kind": "struct",
1004
+ "fields": [
1005
+ {
1006
+ "name": "status",
1007
+ "docs": ["Status of the reserve Active/Obsolete/Hidden"],
1008
+ "type": "u8"
1009
+ },
1010
+ {
1011
+ "name": "asset_tier",
1012
+ "docs": ["Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt"],
1013
+ "type": "u8"
1014
+ },
1015
+ {
1016
+ "name": "host_fixed_interest_rate_bps",
1017
+ "docs": ["Flat rate that goes to the host"],
1018
+ "type": "u16"
1019
+ },
1020
+ {
1021
+ "name": "reserved1",
1022
+ "docs": [
1023
+ "[DEPRECATED] Space that used to hold 2 fields:",
1024
+ "- Boost for side (debt or collateral)",
1025
+ "- Reward points multiplier per obligation type",
1026
+ "Can be re-used after making sure all underlying production account data is zeroed."
1027
+ ],
1028
+ "type": {
1029
+ "array": ["u8", 9]
1030
+ }
1031
+ },
1032
+ {
1033
+ "name": "protocol_order_execution_fee_pct",
1034
+ "docs": ["Cut of the order execution bonus that the protocol receives, as a percentage"],
1035
+ "type": "u8"
1036
+ },
1037
+ {
1038
+ "name": "protocol_take_rate_pct",
1039
+ "docs": ["Protocol take rate is the amount borrowed interest protocol receives, as a percentage"],
1040
+ "type": "u8"
1041
+ },
1042
+ {
1043
+ "name": "protocol_liquidation_fee_pct",
1044
+ "docs": ["Cut of the liquidation bonus that the protocol receives, as a percentage"],
1045
+ "type": "u8"
1046
+ },
1047
+ {
1048
+ "name": "loan_to_value_pct",
1049
+ "docs": [
1050
+ "Target ratio of the value of borrows to deposits, as a percentage",
1051
+ "0 if use as collateral is disabled"
1052
+ ],
1053
+ "type": "u8"
1054
+ },
1055
+ {
1056
+ "name": "liquidation_threshold_pct",
1057
+ "docs": ["Loan to value ratio at which an obligation can be liquidated, as percentage"],
1058
+ "type": "u8"
1059
+ },
1060
+ {
1061
+ "name": "min_liquidation_bonus_bps",
1062
+ "docs": ["Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],
1063
+ "type": "u16"
1064
+ },
1065
+ {
1066
+ "name": "max_liquidation_bonus_bps",
1067
+ "docs": ["Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],
1068
+ "type": "u16"
1069
+ },
1070
+ {
1071
+ "name": "bad_debt_liquidation_bonus_bps",
1072
+ "docs": ["Bad debt liquidation bonus for an undercollateralized obligation, as bps"],
1073
+ "type": "u16"
1074
+ },
1075
+ {
1076
+ "name": "deleveraging_margin_call_period_secs",
1077
+ "docs": [
1078
+ "Time in seconds that must pass before redemptions are enabled after the deposit limit is",
1079
+ "crossed.",
1080
+ "Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."
1081
+ ],
1082
+ "type": "u64"
1083
+ },
1084
+ {
1085
+ "name": "deleveraging_threshold_decrease_bps_per_day",
1086
+ "docs": [
1087
+ "The rate at which the deleveraging threshold decreases, in bps per day.",
1088
+ "Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."
1089
+ ],
1090
+ "type": "u64"
1091
+ },
1092
+ {
1093
+ "name": "fees",
1094
+ "docs": ["Program owner fees assessed, separate from gains due to interest accrual"],
1095
+ "type": {
1096
+ "defined": {
1097
+ "name": "ReserveFees"
1098
+ }
1099
+ }
1100
+ },
1101
+ {
1102
+ "name": "borrow_rate_curve",
1103
+ "docs": ["Borrow rate curve based on utilization"],
1104
+ "type": {
1105
+ "defined": {
1106
+ "name": "BorrowRateCurve"
1107
+ }
1108
+ }
1109
+ },
1110
+ {
1111
+ "name": "borrow_factor_pct",
1112
+ "docs": ["Borrow factor in percentage - used for risk adjustment"],
1113
+ "type": "u64"
1114
+ },
1115
+ {
1116
+ "name": "deposit_limit",
1117
+ "docs": ["Maximum deposit limit of liquidity in native units, u64::MAX for inf"],
1118
+ "type": "u64"
1119
+ },
1120
+ {
1121
+ "name": "borrow_limit",
1122
+ "docs": ["Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits)"],
1123
+ "type": "u64"
1124
+ },
1125
+ {
1126
+ "name": "token_info",
1127
+ "docs": ["Token id from TokenInfos struct"],
1128
+ "type": {
1129
+ "defined": {
1130
+ "name": "TokenInfo"
1131
+ }
1132
+ }
1133
+ },
1134
+ {
1135
+ "name": "deposit_withdrawal_cap",
1136
+ "docs": ["Deposit withdrawal caps - deposit & redeem"],
1137
+ "type": {
1138
+ "defined": {
1139
+ "name": "WithdrawalCaps"
1140
+ }
1141
+ }
1142
+ },
1143
+ {
1144
+ "name": "debt_withdrawal_cap",
1145
+ "docs": ["Debt withdrawal caps - borrow & repay"],
1146
+ "type": {
1147
+ "defined": {
1148
+ "name": "WithdrawalCaps"
1149
+ }
1150
+ }
1151
+ },
1152
+ {
1153
+ "name": "elevation_groups",
1154
+ "type": {
1155
+ "array": ["u8", 20]
1156
+ }
1157
+ },
1158
+ {
1159
+ "name": "disable_usage_as_coll_outside_emode",
1160
+ "type": "u8"
1161
+ },
1162
+ {
1163
+ "name": "utilization_limit_block_borrowing_above_pct",
1164
+ "docs": ["Utilization (in percentage) above which borrowing is blocked. 0 to disable."],
1165
+ "type": "u8"
1166
+ },
1167
+ {
1168
+ "name": "autodeleverage_enabled",
1169
+ "docs": [
1170
+ "Whether this reserve should be subject to auto-deleveraging after deposit or borrow limit is",
1171
+ "crossed.",
1172
+ "Besides this flag, the lending market's flag also needs to be enabled (logical `AND`).",
1173
+ "**NOTE:** the manual \"target LTV\" deleveraging (enabled by the risk council for individual",
1174
+ "obligations) is NOT affected by this flag."
1175
+ ],
1176
+ "type": "u8"
1177
+ },
1178
+ {
1179
+ "name": "proposer_authority_locked",
1180
+ "docs": [
1181
+ "Boolean flag indicating whether the reserve is locked for the proposer authority.",
1182
+ "",
1183
+ "Once the proposer have finished preparing the reserve, it must be locked to prevent",
1184
+ "further changes to the reserve configuration allowing review and voting on the proposal",
1185
+ "without alteration during the voting period."
1186
+ ],
1187
+ "type": "u8"
1188
+ },
1189
+ {
1190
+ "name": "borrow_limit_outside_elevation_group",
1191
+ "docs": [
1192
+ "Maximum amount liquidity of this reserve borrowed outside all elevation groups",
1193
+ "- u64::MAX for inf",
1194
+ "- 0 to disable borrows outside elevation groups"
1195
+ ],
1196
+ "type": "u64"
1197
+ },
1198
+ {
1199
+ "name": "borrow_limit_against_this_collateral_in_elevation_group",
1200
+ "docs": [
1201
+ "Defines the maximum amount (in lamports of elevation group debt asset)",
1202
+ "that can be borrowed when this reserve is used as collateral.",
1203
+ "- u64::MAX for inf",
1204
+ "- 0 to disable borrows in this elevation group (expected value for the debt asset)"
1205
+ ],
1206
+ "type": {
1207
+ "array": ["u64", 32]
1208
+ }
1209
+ },
1210
+ {
1211
+ "name": "deleveraging_bonus_increase_bps_per_day",
1212
+ "docs": [
1213
+ "The rate at which the deleveraging-related liquidation bonus increases, in bps per day.",
1214
+ "Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."
1215
+ ],
1216
+ "type": "u64"
1217
+ },
1218
+ {
1219
+ "name": "debt_maturity_timestamp",
1220
+ "docs": [
1221
+ "The timestamp at which all [Obligation::borrows] using this reserve become liquidatable",
1222
+ "(on the same terms as reserve-wide deleveraging).",
1223
+ "Inactive when zeroed (i.e. debt never matures)."
1224
+ ],
1225
+ "type": "u64"
1226
+ }
1227
+ ]
1228
+ }
1229
+ },
1230
+ {
1231
+ "name": "ReserveFees",
1232
+ "docs": [
1233
+ "Additional fee information on a reserve",
1234
+ "",
1235
+ "These exist separately from interest accrual fees, and are specifically for the program owner",
1236
+ "and referral fee. The fees are paid out as a percentage of liquidity token amounts during",
1237
+ "repayments and liquidations."
1238
+ ],
1239
+ "type": {
1240
+ "kind": "struct",
1241
+ "fields": [
1242
+ {
1243
+ "name": "borrow_fee_sf",
1244
+ "docs": [
1245
+ "Fee assessed on `BorrowObligationLiquidity`, as scaled fraction (60 bits fractional part)",
1246
+ "Must be between `0` and `2^60`, such that `2^60 = 1`. A few examples for",
1247
+ "clarity:",
1248
+ "1% = (1 << 60) / 100 = 11529215046068470",
1249
+ "0.01% (1 basis point) = 115292150460685",
1250
+ "0.00001% (Aave borrow fee) = 115292150461"
1251
+ ],
1252
+ "type": "u64"
1253
+ },
1254
+ {
1255
+ "name": "flash_loan_fee_sf",
1256
+ "docs": [
1257
+ "Fee for flash loan, expressed as scaled fraction.",
1258
+ "0.3% (Aave flash loan fee) = 0.003 * 2^60 = 3458764513820541"
1259
+ ],
1260
+ "type": "u64"
1261
+ },
1262
+ {
1263
+ "name": "padding",
1264
+ "docs": ["Used for allignment"],
1265
+ "type": {
1266
+ "array": ["u8", 8]
1267
+ }
1268
+ }
1269
+ ]
1270
+ }
1271
+ },
1272
+ {
1273
+ "name": "ReserveLiquidity",
1274
+ "docs": ["Reserve liquidity"],
1275
+ "type": {
1276
+ "kind": "struct",
1277
+ "fields": [
1278
+ {
1279
+ "name": "mint_pubkey",
1280
+ "docs": ["Reserve liquidity mint address"],
1281
+ "type": "pubkey"
1282
+ },
1283
+ {
1284
+ "name": "supply_vault",
1285
+ "docs": ["Reserve liquidity supply address"],
1286
+ "type": "pubkey"
1287
+ },
1288
+ {
1289
+ "name": "fee_vault",
1290
+ "docs": ["Reserve liquidity fee collection address"],
1291
+ "type": "pubkey"
1292
+ },
1293
+ {
1294
+ "name": "available_amount",
1295
+ "docs": ["Reserve liquidity available"],
1296
+ "type": "u64"
1297
+ },
1298
+ {
1299
+ "name": "borrowed_amount_sf",
1300
+ "docs": ["Reserve liquidity borrowed (scaled fraction)"],
1301
+ "type": "u128"
1302
+ },
1303
+ {
1304
+ "name": "market_price_sf",
1305
+ "docs": ["Reserve liquidity market price in quote currency (scaled fraction)"],
1306
+ "type": "u128"
1307
+ },
1308
+ {
1309
+ "name": "market_price_last_updated_ts",
1310
+ "docs": ["Unix timestamp of the market price (from the oracle)"],
1311
+ "type": "u64"
1312
+ },
1313
+ {
1314
+ "name": "mint_decimals",
1315
+ "docs": ["Reserve liquidity mint decimals"],
1316
+ "type": "u64"
1317
+ },
1318
+ {
1319
+ "name": "deposit_limit_crossed_timestamp",
1320
+ "docs": [
1321
+ "Timestamp when the last refresh reserve detected that the liquidity amount is above the deposit cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.",
1322
+ "If the threshold is not crossed, then the timestamp is set to 0"
1323
+ ],
1324
+ "type": "u64"
1325
+ },
1326
+ {
1327
+ "name": "borrow_limit_crossed_timestamp",
1328
+ "docs": [
1329
+ "Timestamp when the last refresh reserve detected that the borrowed amount is above the borrow cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.",
1330
+ "If the threshold is not crossed, then the timestamp is set to 0"
1331
+ ],
1332
+ "type": "u64"
1333
+ },
1334
+ {
1335
+ "name": "cumulative_borrow_rate_bsf",
1336
+ "docs": ["Reserve liquidity cumulative borrow rate (scaled fraction)"],
1337
+ "type": {
1338
+ "defined": {
1339
+ "name": "BigFractionBytes"
1340
+ }
1341
+ }
1342
+ },
1343
+ {
1344
+ "name": "accumulated_protocol_fees_sf",
1345
+ "docs": ["Reserve cumulative protocol fees (scaled fraction)"],
1346
+ "type": "u128"
1347
+ },
1348
+ {
1349
+ "name": "accumulated_referrer_fees_sf",
1350
+ "docs": ["Reserve cumulative referrer fees (scaled fraction)"],
1351
+ "type": "u128"
1352
+ },
1353
+ {
1354
+ "name": "pending_referrer_fees_sf",
1355
+ "docs": [
1356
+ "Reserve pending referrer fees, to be claimed in refresh_obligation by referrer or protocol (scaled fraction)"
1357
+ ],
1358
+ "type": "u128"
1359
+ },
1360
+ {
1361
+ "name": "absolute_referral_rate_sf",
1362
+ "docs": [
1363
+ "Reserve referrer fee absolute rate calculated at each refresh_reserve operation (scaled fraction)"
1364
+ ],
1365
+ "type": "u128"
1366
+ },
1367
+ {
1368
+ "name": "token_program",
1369
+ "docs": ["Token program of the liquidity mint"],
1370
+ "type": "pubkey"
1371
+ },
1372
+ {
1373
+ "name": "padding2",
1374
+ "type": {
1375
+ "array": ["u64", 51]
1376
+ }
1377
+ },
1378
+ {
1379
+ "name": "padding3",
1380
+ "type": {
1381
+ "array": ["u128", 32]
1382
+ }
1383
+ }
1384
+ ]
1385
+ }
1386
+ },
1387
+ {
1388
+ "name": "WithdrawalCaps",
1389
+ "docs": ["Reserve Withdrawal Caps State"],
1390
+ "type": {
1391
+ "kind": "struct",
1392
+ "fields": [
1393
+ {
1394
+ "name": "config_capacity",
1395
+ "type": "i64"
1396
+ },
1397
+ {
1398
+ "name": "current_total",
1399
+ "type": "i64"
1400
+ },
1401
+ {
1402
+ "name": "last_interval_start_timestamp",
1403
+ "type": "u64"
1404
+ },
1405
+ {
1406
+ "name": "config_interval_length_seconds",
1407
+ "type": "u64"
1408
+ }
1409
+ ]
1410
+ }
1411
+ },
1412
+ {
1413
+ "name": "PriceHeuristic",
1414
+ "type": {
1415
+ "kind": "struct",
1416
+ "fields": [
1417
+ {
1418
+ "name": "lower",
1419
+ "docs": ["Lower value of acceptable price"],
1420
+ "type": "u64"
1421
+ },
1422
+ {
1423
+ "name": "upper",
1424
+ "docs": ["Upper value of acceptable price"],
1425
+ "type": "u64"
1426
+ },
1427
+ {
1428
+ "name": "exp",
1429
+ "docs": ["Number of decimals of the previously defined values"],
1430
+ "type": "u64"
1431
+ }
1432
+ ]
1433
+ }
1434
+ },
1435
+ {
1436
+ "name": "PythConfiguration",
1437
+ "type": {
1438
+ "kind": "struct",
1439
+ "fields": [
1440
+ {
1441
+ "name": "price",
1442
+ "docs": ["Pubkey of the base price feed (disabled if `null` or `default`)"],
1443
+ "type": "pubkey"
1444
+ }
1445
+ ]
1446
+ }
1447
+ },
1448
+ {
1449
+ "name": "ScopeConfiguration",
1450
+ "type": {
1451
+ "kind": "struct",
1452
+ "fields": [
1453
+ {
1454
+ "name": "price_feed",
1455
+ "docs": ["Pubkey of the scope price feed (disabled if `null` or `default`)"],
1456
+ "type": "pubkey"
1457
+ },
1458
+ {
1459
+ "name": "price_chain",
1460
+ "docs": ["This is the scope_id price chain that results in a price for the token"],
1461
+ "type": {
1462
+ "array": ["u16", 4]
1463
+ }
1464
+ },
1465
+ {
1466
+ "name": "twap_chain",
1467
+ "docs": ["This is the scope_id price chain for the twap"],
1468
+ "type": {
1469
+ "array": ["u16", 4]
1470
+ }
1471
+ }
1472
+ ]
1473
+ }
1474
+ },
1475
+ {
1476
+ "name": "SwitchboardConfiguration",
1477
+ "type": {
1478
+ "kind": "struct",
1479
+ "fields": [
1480
+ {
1481
+ "name": "price_aggregator",
1482
+ "docs": ["Pubkey of the base price feed (disabled if `null` or `default`)"],
1483
+ "type": "pubkey"
1484
+ },
1485
+ {
1486
+ "name": "twap_aggregator",
1487
+ "type": "pubkey"
1488
+ }
1489
+ ]
1490
+ }
1491
+ },
1492
+ {
1493
+ "name": "TokenInfo",
1494
+ "type": {
1495
+ "kind": "struct",
1496
+ "fields": [
1497
+ {
1498
+ "name": "name",
1499
+ "docs": ["UTF-8 encoded name of the token (null-terminated)"],
1500
+ "type": {
1501
+ "array": ["u8", 32]
1502
+ }
1503
+ },
1504
+ {
1505
+ "name": "heuristic",
1506
+ "docs": ["Heuristics limits of acceptable price"],
1507
+ "type": {
1508
+ "defined": {
1509
+ "name": "PriceHeuristic"
1510
+ }
1511
+ }
1512
+ },
1513
+ {
1514
+ "name": "max_twap_divergence_bps",
1515
+ "docs": ["Max divergence between twap and price in bps"],
1516
+ "type": "u64"
1517
+ },
1518
+ {
1519
+ "name": "max_age_price_seconds",
1520
+ "type": "u64"
1521
+ },
1522
+ {
1523
+ "name": "max_age_twap_seconds",
1524
+ "type": "u64"
1525
+ },
1526
+ {
1527
+ "name": "scope_configuration",
1528
+ "docs": ["Scope price configuration"],
1529
+ "type": {
1530
+ "defined": {
1531
+ "name": "ScopeConfiguration"
1532
+ }
1533
+ }
1534
+ },
1535
+ {
1536
+ "name": "switchboard_configuration",
1537
+ "docs": ["Switchboard configuration"],
1538
+ "type": {
1539
+ "defined": {
1540
+ "name": "SwitchboardConfiguration"
1541
+ }
1542
+ }
1543
+ },
1544
+ {
1545
+ "name": "pyth_configuration",
1546
+ "docs": ["Pyth configuration"],
1547
+ "type": {
1548
+ "defined": {
1549
+ "name": "PythConfiguration"
1550
+ }
1551
+ }
1552
+ },
1553
+ {
1554
+ "name": "block_price_usage",
1555
+ "type": "u8"
1556
+ },
1557
+ {
1558
+ "name": "reserved",
1559
+ "type": {
1560
+ "array": ["u8", 7]
1561
+ }
1562
+ },
1563
+ {
1564
+ "name": "padding",
1565
+ "type": {
1566
+ "array": ["u64", 19]
1567
+ }
1568
+ }
1569
+ ]
1570
+ }
1571
+ },
1572
+ {
1573
+ "name": "BorrowRateCurve",
1574
+ "type": {
1575
+ "kind": "struct",
1576
+ "fields": [
1577
+ {
1578
+ "name": "points",
1579
+ "type": {
1580
+ "array": [
1581
+ {
1582
+ "defined": {
1583
+ "name": "CurvePoint"
1584
+ }
1585
+ },
1586
+ 11
1587
+ ]
1588
+ }
1589
+ }
1590
+ ]
1591
+ }
1592
+ },
1593
+ {
1594
+ "name": "CurvePoint",
1595
+ "type": {
1596
+ "kind": "struct",
1597
+ "fields": [
1598
+ {
1599
+ "name": "utilization_rate_bps",
1600
+ "type": "u32"
1601
+ },
1602
+ {
1603
+ "name": "borrow_rate_bps",
1604
+ "type": "u32"
1605
+ }
1606
+ ]
1607
+ }
1608
+ },
1609
+ {
1610
+ "name": "VaultConfigField",
1611
+ "type": {
1612
+ "kind": "enum",
1613
+ "variants": [
1614
+ {
1615
+ "name": "PerformanceFeeBps"
1616
+ },
1617
+ {
1618
+ "name": "ManagementFeeBps"
1619
+ },
1620
+ {
1621
+ "name": "MinDepositAmount"
1622
+ },
1623
+ {
1624
+ "name": "MinWithdrawAmount"
1625
+ },
1626
+ {
1627
+ "name": "MinInvestAmount"
1628
+ },
1629
+ {
1630
+ "name": "MinInvestDelaySlots"
1631
+ },
1632
+ {
1633
+ "name": "CrankFundFeePerReserve"
1634
+ },
1635
+ {
1636
+ "name": "PendingVaultAdmin"
1637
+ },
1638
+ {
1639
+ "name": "Name"
1640
+ },
1641
+ {
1642
+ "name": "LookupTable"
1643
+ },
1644
+ {
1645
+ "name": "Farm"
1646
+ },
1647
+ {
1648
+ "name": "AllocationAdmin"
1649
+ },
1650
+ {
1651
+ "name": "UnallocatedWeight"
1652
+ },
1653
+ {
1654
+ "name": "UnallocatedTokensCap"
1655
+ }
1656
+ ]
1657
+ }
1658
+ },
1659
+ {
1660
+ "name": "VaultAllocation",
1661
+ "type": {
1662
+ "kind": "struct",
1663
+ "fields": [
1664
+ {
1665
+ "name": "reserve",
1666
+ "type": "pubkey"
1667
+ },
1668
+ {
1669
+ "name": "ctoken_vault",
1670
+ "type": "pubkey"
1671
+ },
1672
+ {
1673
+ "name": "target_allocation_weight",
1674
+ "type": "u64"
1675
+ },
1676
+ {
1677
+ "name": "token_allocation_cap",
1678
+ "docs": ["Maximum token invested in this reserve"],
1679
+ "type": "u64"
1680
+ },
1681
+ {
1682
+ "name": "ctoken_vault_bump",
1683
+ "type": "u64"
1684
+ },
1685
+ {
1686
+ "name": "config_padding",
1687
+ "type": {
1688
+ "array": ["u64", 127]
1689
+ }
1690
+ },
1691
+ {
1692
+ "name": "ctoken_allocation",
1693
+ "type": "u64"
1694
+ },
1695
+ {
1696
+ "name": "last_invest_slot",
1697
+ "type": "u64"
1698
+ },
1699
+ {
1700
+ "name": "token_target_allocation_sf",
1701
+ "type": "u128"
1702
+ },
1703
+ {
1704
+ "name": "state_padding",
1705
+ "type": {
1706
+ "array": ["u64", 128]
1707
+ }
1708
+ }
1709
+ ]
1710
+ }
1711
+ },
1712
+ {
1713
+ "name": "Reserve",
1714
+ "type": {
1715
+ "kind": "struct",
1716
+ "fields": [
1717
+ {
1718
+ "name": "version",
1719
+ "docs": ["Version of the reserve"],
1720
+ "type": "u64"
1721
+ },
1722
+ {
1723
+ "name": "last_update",
1724
+ "docs": ["Last slot when supply and rates updated"],
1725
+ "type": {
1726
+ "defined": {
1727
+ "name": "LastUpdate"
1728
+ }
1729
+ }
1730
+ },
1731
+ {
1732
+ "name": "lending_market",
1733
+ "docs": ["Lending market address"],
1734
+ "type": "pubkey"
1735
+ },
1736
+ {
1737
+ "name": "farm_collateral",
1738
+ "type": "pubkey"
1739
+ },
1740
+ {
1741
+ "name": "farm_debt",
1742
+ "type": "pubkey"
1743
+ },
1744
+ {
1745
+ "name": "liquidity",
1746
+ "docs": ["Reserve liquidity"],
1747
+ "type": {
1748
+ "defined": {
1749
+ "name": "ReserveLiquidity"
1750
+ }
1751
+ }
1752
+ },
1753
+ {
1754
+ "name": "reserve_liquidity_padding",
1755
+ "type": {
1756
+ "array": ["u64", 150]
1757
+ }
1758
+ },
1759
+ {
1760
+ "name": "collateral",
1761
+ "docs": ["Reserve collateral"],
1762
+ "type": {
1763
+ "defined": {
1764
+ "name": "ReserveCollateral"
1765
+ }
1766
+ }
1767
+ },
1768
+ {
1769
+ "name": "reserve_collateral_padding",
1770
+ "type": {
1771
+ "array": ["u64", 150]
1772
+ }
1773
+ },
1774
+ {
1775
+ "name": "config",
1776
+ "docs": ["Reserve configuration values"],
1777
+ "type": {
1778
+ "defined": {
1779
+ "name": "ReserveConfig"
1780
+ }
1781
+ }
1782
+ },
1783
+ {
1784
+ "name": "config_padding",
1785
+ "type": {
1786
+ "array": ["u64", 115]
1787
+ }
1788
+ },
1789
+ {
1790
+ "name": "borrowed_amount_outside_elevation_group",
1791
+ "type": "u64"
1792
+ },
1793
+ {
1794
+ "name": "borrowed_amounts_against_this_reserve_in_elevation_groups",
1795
+ "docs": [
1796
+ "Amount of token borrowed in lamport of debt asset in the given",
1797
+ "elevation group when this reserve is part of the collaterals."
1798
+ ],
1799
+ "type": {
1800
+ "array": ["u64", 32]
1801
+ }
1802
+ },
1803
+ {
1804
+ "name": "padding",
1805
+ "type": {
1806
+ "array": ["u64", 207]
1807
+ }
1808
+ }
1809
+ ]
1810
+ }
1811
+ },
1812
+ {
1813
+ "name": "VaultState",
1814
+ "type": {
1815
+ "kind": "struct",
1816
+ "fields": [
1817
+ {
1818
+ "name": "vault_admin_authority",
1819
+ "type": "pubkey"
1820
+ },
1821
+ {
1822
+ "name": "base_vault_authority",
1823
+ "type": "pubkey"
1824
+ },
1825
+ {
1826
+ "name": "base_vault_authority_bump",
1827
+ "type": "u64"
1828
+ },
1829
+ {
1830
+ "name": "token_mint",
1831
+ "type": "pubkey"
1832
+ },
1833
+ {
1834
+ "name": "token_mint_decimals",
1835
+ "type": "u64"
1836
+ },
1837
+ {
1838
+ "name": "token_vault",
1839
+ "type": "pubkey"
1840
+ },
1841
+ {
1842
+ "name": "token_program",
1843
+ "type": "pubkey"
1844
+ },
1845
+ {
1846
+ "name": "shares_mint",
1847
+ "type": "pubkey"
1848
+ },
1849
+ {
1850
+ "name": "shares_mint_decimals",
1851
+ "type": "u64"
1852
+ },
1853
+ {
1854
+ "name": "token_available",
1855
+ "type": "u64"
1856
+ },
1857
+ {
1858
+ "name": "shares_issued",
1859
+ "type": "u64"
1860
+ },
1861
+ {
1862
+ "name": "available_crank_funds",
1863
+ "type": "u64"
1864
+ },
1865
+ {
1866
+ "name": "unallocated_weight",
1867
+ "type": "u64"
1868
+ },
1869
+ {
1870
+ "name": "performance_fee_bps",
1871
+ "type": "u64"
1872
+ },
1873
+ {
1874
+ "name": "management_fee_bps",
1875
+ "type": "u64"
1876
+ },
1877
+ {
1878
+ "name": "last_fee_charge_timestamp",
1879
+ "type": "u64"
1880
+ },
1881
+ {
1882
+ "name": "prev_aum_sf",
1883
+ "type": "u128"
1884
+ },
1885
+ {
1886
+ "name": "pending_fees_sf",
1887
+ "type": "u128"
1888
+ },
1889
+ {
1890
+ "name": "vault_allocation_strategy",
1891
+ "type": {
1892
+ "array": [
1893
+ {
1894
+ "defined": {
1895
+ "name": "VaultAllocation"
1896
+ }
1897
+ },
1898
+ 25
1899
+ ]
1900
+ }
1901
+ },
1902
+ {
1903
+ "name": "padding1",
1904
+ "type": {
1905
+ "array": ["u128", 256]
1906
+ }
1907
+ },
1908
+ {
1909
+ "name": "min_deposit_amount",
1910
+ "type": "u64"
1911
+ },
1912
+ {
1913
+ "name": "min_withdraw_amount",
1914
+ "type": "u64"
1915
+ },
1916
+ {
1917
+ "name": "min_invest_amount",
1918
+ "type": "u64"
1919
+ },
1920
+ {
1921
+ "name": "min_invest_delay_slots",
1922
+ "type": "u64"
1923
+ },
1924
+ {
1925
+ "name": "crank_fund_fee_per_reserve",
1926
+ "type": "u64"
1927
+ },
1928
+ {
1929
+ "name": "pending_admin",
1930
+ "type": "pubkey"
1931
+ },
1932
+ {
1933
+ "name": "cumulative_earned_interest_sf",
1934
+ "type": "u128"
1935
+ },
1936
+ {
1937
+ "name": "cumulative_mgmt_fees_sf",
1938
+ "type": "u128"
1939
+ },
1940
+ {
1941
+ "name": "cumulative_perf_fees_sf",
1942
+ "type": "u128"
1943
+ },
1944
+ {
1945
+ "name": "name",
1946
+ "type": {
1947
+ "array": ["u8", 40]
1948
+ }
1949
+ },
1950
+ {
1951
+ "name": "vault_lookup_table",
1952
+ "type": "pubkey"
1953
+ },
1954
+ {
1955
+ "name": "vault_farm",
1956
+ "type": "pubkey"
1957
+ },
1958
+ {
1959
+ "name": "creation_timestamp",
1960
+ "type": "u64"
1961
+ },
1962
+ {
1963
+ "name": "unallocated_tokens_cap",
1964
+ "type": "u64"
1965
+ },
1966
+ {
1967
+ "name": "allocation_admin",
1968
+ "type": "pubkey"
1969
+ },
1970
+ {
1971
+ "name": "padding3",
1972
+ "type": {
1973
+ "array": ["u128", 242]
1974
+ }
1975
+ }
1976
+ ]
1977
+ }
1978
+ },
1979
+ {
1980
+ "name": "DepositResultEvent",
1981
+ "type": {
1982
+ "kind": "struct",
1983
+ "fields": [
1984
+ {
1985
+ "name": "shares_to_mint",
1986
+ "type": "u64"
1987
+ },
1988
+ {
1989
+ "name": "token_to_deposit",
1990
+ "type": "u64"
1991
+ },
1992
+ {
1993
+ "name": "crank_funds_to_deposit",
1994
+ "type": "u64"
1995
+ }
1996
+ ]
1997
+ }
1998
+ },
1999
+ {
2000
+ "name": "DepositUserAtaBalanceEvent",
2001
+ "type": {
2002
+ "kind": "struct",
2003
+ "fields": [
2004
+ {
2005
+ "name": "user_ata_balance",
2006
+ "type": "u64"
2007
+ }
2008
+ ]
2009
+ }
2010
+ },
2011
+ {
2012
+ "name": "SharesToWithdrawEvent",
2013
+ "type": {
2014
+ "kind": "struct",
2015
+ "fields": [
2016
+ {
2017
+ "name": "shares_amount",
2018
+ "type": "u64"
2019
+ },
2020
+ {
2021
+ "name": "user_shares_before",
2022
+ "type": "u64"
2023
+ }
2024
+ ]
2025
+ }
2026
+ },
2027
+ {
2028
+ "name": "WithdrawResultEvent",
2029
+ "type": {
2030
+ "kind": "struct",
2031
+ "fields": [
2032
+ {
2033
+ "name": "shares_to_burn",
2034
+ "type": "u64"
2035
+ },
2036
+ {
2037
+ "name": "available_to_send_to_user",
2038
+ "type": "u64"
2039
+ },
2040
+ {
2041
+ "name": "invested_to_disinvest_ctokens",
2042
+ "type": "u64"
2043
+ },
2044
+ {
2045
+ "name": "invested_liquidity_to_send_to_user",
2046
+ "type": "u64"
2047
+ }
2048
+ ]
2049
+ }
2050
+ }
2051
+ ]
2052
+ }