@exponent-labs/exponent-orderbook-idl 0.1.8

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,3396 @@
1
+ {
2
+ "address": "ExpRUPxMSwYYGjt1eoa2NonhKKrsFB1AQ4vZ6ujCHviP",
3
+ "metadata": {
4
+ "name": "exponent_orderbook",
5
+ "version": "0.1.0",
6
+ "spec": "0.1.0",
7
+ "description": "Created with Anchor"
8
+ },
9
+ "instructions": [
10
+ {
11
+ "name": "collect_admin_emission",
12
+ "docs": [
13
+ "High-trust function to set config options"
14
+ ],
15
+ "discriminator": [
16
+ 15
17
+ ],
18
+ "accounts": [
19
+ {
20
+ "name": "admin",
21
+ "signer": true
22
+ },
23
+ {
24
+ "name": "orderbook",
25
+ "writable": true
26
+ },
27
+ {
28
+ "name": "exponent_core"
29
+ },
30
+ {
31
+ "name": "event_authority"
32
+ },
33
+ {
34
+ "name": "program"
35
+ }
36
+ ],
37
+ "args": [
38
+ {
39
+ "name": "amount",
40
+ "type": {
41
+ "defined": {
42
+ "name": "Amount"
43
+ }
44
+ }
45
+ },
46
+ {
47
+ "name": "index",
48
+ "type": "u16"
49
+ }
50
+ ],
51
+ "returns": {
52
+ "defined": {
53
+ "name": "CollectAdminEmissionEvent"
54
+ }
55
+ }
56
+ },
57
+ {
58
+ "name": "collect_admin_fee",
59
+ "docs": [
60
+ "High-trust function to collect admin fees"
61
+ ],
62
+ "discriminator": [
63
+ 13
64
+ ],
65
+ "accounts": [
66
+ {
67
+ "name": "admin",
68
+ "signer": true
69
+ },
70
+ {
71
+ "name": "orderbook",
72
+ "writable": true
73
+ },
74
+ {
75
+ "name": "token_escrow_yt",
76
+ "docs": [
77
+ "This account for YT is only a temporary pass-through account",
78
+ "It is used to transfer YT tokens from the signer to the orderbook",
79
+ "And then from the orderbook to the core program"
80
+ ],
81
+ "writable": true
82
+ },
83
+ {
84
+ "name": "token_escrow_sy",
85
+ "docs": [
86
+ "Orderbook token account for SY"
87
+ ],
88
+ "writable": true
89
+ },
90
+ {
91
+ "name": "token_escrow_pt",
92
+ "docs": [
93
+ "Orderbook token account for PT"
94
+ ],
95
+ "writable": true
96
+ },
97
+ {
98
+ "name": "token_sy_admin",
99
+ "writable": true
100
+ },
101
+ {
102
+ "name": "token_yt_admin",
103
+ "writable": true
104
+ },
105
+ {
106
+ "name": "token_pt_admin",
107
+ "writable": true
108
+ },
109
+ {
110
+ "name": "system_program"
111
+ },
112
+ {
113
+ "name": "token_program",
114
+ "docs": [
115
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
116
+ ]
117
+ },
118
+ {
119
+ "name": "sy_program"
120
+ },
121
+ {
122
+ "name": "exponent_core"
123
+ },
124
+ {
125
+ "name": "address_lookup_table"
126
+ },
127
+ {
128
+ "name": "cpi_account_orderbook",
129
+ "docs": [
130
+ "Cpi accounts Orderbook"
131
+ ]
132
+ },
133
+ {
134
+ "name": "event_authority"
135
+ },
136
+ {
137
+ "name": "program"
138
+ }
139
+ ],
140
+ "args": [],
141
+ "returns": {
142
+ "defined": {
143
+ "name": "CollectAdminFeeEvent"
144
+ }
145
+ }
146
+ },
147
+ {
148
+ "name": "collect_interest",
149
+ "discriminator": [
150
+ 5
151
+ ],
152
+ "accounts": [
153
+ {
154
+ "name": "trader",
155
+ "signer": true
156
+ },
157
+ {
158
+ "name": "orderbook",
159
+ "writable": true
160
+ },
161
+ {
162
+ "name": "token_escrow_sy",
163
+ "writable": true
164
+ },
165
+ {
166
+ "name": "token_sy_trader",
167
+ "writable": true
168
+ },
169
+ {
170
+ "name": "system_program"
171
+ },
172
+ {
173
+ "name": "token_program",
174
+ "docs": [
175
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
176
+ ]
177
+ },
178
+ {
179
+ "name": "sy_program"
180
+ },
181
+ {
182
+ "name": "exponent_core"
183
+ },
184
+ {
185
+ "name": "address_lookup_table"
186
+ },
187
+ {
188
+ "name": "cpi_account_orderbook"
189
+ },
190
+ {
191
+ "name": "event_authority"
192
+ },
193
+ {
194
+ "name": "program"
195
+ }
196
+ ],
197
+ "args": [
198
+ {
199
+ "name": "sy_amount_optional",
200
+ "type": {
201
+ "defined": {
202
+ "name": "Amount"
203
+ }
204
+ }
205
+ }
206
+ ],
207
+ "returns": {
208
+ "defined": {
209
+ "name": "CollectUserInterestEvent"
210
+ }
211
+ }
212
+ },
213
+ {
214
+ "name": "initialize_orderbook",
215
+ "docs": [
216
+ "High-trust function to init orderbook"
217
+ ],
218
+ "discriminator": [
219
+ 0
220
+ ],
221
+ "accounts": [
222
+ {
223
+ "name": "payer",
224
+ "writable": true,
225
+ "signer": true
226
+ },
227
+ {
228
+ "name": "admin_signer",
229
+ "signer": true
230
+ },
231
+ {
232
+ "name": "orderbook",
233
+ "writable": true
234
+ },
235
+ {
236
+ "name": "cpi_accounts_orderbook",
237
+ "docs": [
238
+ "Cpi accounts Orderbook"
239
+ ],
240
+ "writable": true
241
+ },
242
+ {
243
+ "name": "vault",
244
+ "docs": [
245
+ "Links the mint_yt & sy_program together"
246
+ ]
247
+ },
248
+ {
249
+ "name": "mint_yt"
250
+ },
251
+ {
252
+ "name": "mint_sy"
253
+ },
254
+ {
255
+ "name": "mint_pt"
256
+ },
257
+ {
258
+ "name": "token_escrow_sy",
259
+ "docs": [
260
+ "Orderbook token account for SY"
261
+ ],
262
+ "writable": true
263
+ },
264
+ {
265
+ "name": "token_escrow_yt",
266
+ "docs": [
267
+ "This account for YT is only a temporary pass-through account",
268
+ "It is used to transfer YT tokens from the signer to the orderbook",
269
+ "And then from the orderbook to the core program"
270
+ ],
271
+ "writable": true
272
+ },
273
+ {
274
+ "name": "token_escrow_pt",
275
+ "docs": [
276
+ "Orderbook token account for PT"
277
+ ],
278
+ "writable": true
279
+ },
280
+ {
281
+ "name": "yield_position",
282
+ "writable": true
283
+ },
284
+ {
285
+ "name": "system_program"
286
+ },
287
+ {
288
+ "name": "sy_program"
289
+ },
290
+ {
291
+ "name": "token_program",
292
+ "docs": [
293
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
294
+ ]
295
+ },
296
+ {
297
+ "name": "exponent_core"
298
+ },
299
+ {
300
+ "name": "address_lookup_table"
301
+ },
302
+ {
303
+ "name": "rent"
304
+ },
305
+ {
306
+ "name": "core_event_authority"
307
+ },
308
+ {
309
+ "name": "event_authority"
310
+ },
311
+ {
312
+ "name": "program"
313
+ }
314
+ ],
315
+ "args": [
316
+ {
317
+ "name": "cpi_accounts",
318
+ "type": {
319
+ "defined": {
320
+ "name": "CpiAccounts"
321
+ }
322
+ }
323
+ },
324
+ {
325
+ "name": "exponent_core_cpi_accounts",
326
+ "type": {
327
+ "defined": {
328
+ "name": "ExponentCoreCpiAccounts"
329
+ }
330
+ }
331
+ },
332
+ {
333
+ "name": "seed_id",
334
+ "type": "u32"
335
+ },
336
+ {
337
+ "name": "price_decimals_bp",
338
+ "type": "u8"
339
+ },
340
+ {
341
+ "name": "threshold_amount",
342
+ "type": "u64"
343
+ },
344
+ {
345
+ "name": "ln_maker_fee_rate",
346
+ "type": "f64"
347
+ },
348
+ {
349
+ "name": "ln_taker_fee_ratep",
350
+ "type": "f64"
351
+ }
352
+ ],
353
+ "returns": {
354
+ "defined": {
355
+ "name": "OrderbookInitEvent"
356
+ }
357
+ }
358
+ },
359
+ {
360
+ "name": "market_offer",
361
+ "discriminator": [
362
+ 3
363
+ ],
364
+ "accounts": [
365
+ {
366
+ "name": "trader",
367
+ "signer": true
368
+ },
369
+ {
370
+ "name": "orderbook",
371
+ "writable": true
372
+ },
373
+ {
374
+ "name": "vault",
375
+ "docs": [
376
+ "Links the mint_yt & sy_program together"
377
+ ],
378
+ "writable": true
379
+ },
380
+ {
381
+ "name": "cpi_account_orderbook",
382
+ "docs": [
383
+ "Cpi accounts Orderbook"
384
+ ]
385
+ },
386
+ {
387
+ "name": "yield_position",
388
+ "writable": true
389
+ },
390
+ {
391
+ "name": "token_escrow_yt",
392
+ "docs": [
393
+ "This account for YT is only a temporary pass-through account",
394
+ "It is used to transfer YT tokens from the signer to the orderbook",
395
+ "And then from the orderbook to the core program"
396
+ ],
397
+ "writable": true
398
+ },
399
+ {
400
+ "name": "token_escrow_sy",
401
+ "docs": [
402
+ "Orderbook token account for SY"
403
+ ],
404
+ "writable": true
405
+ },
406
+ {
407
+ "name": "token_escrow_pt",
408
+ "docs": [
409
+ "Orderbook token account for PT"
410
+ ],
411
+ "writable": true
412
+ },
413
+ {
414
+ "name": "token_sy_trader",
415
+ "writable": true
416
+ },
417
+ {
418
+ "name": "token_yt_trader",
419
+ "writable": true
420
+ },
421
+ {
422
+ "name": "token_pt_trader",
423
+ "writable": true
424
+ },
425
+ {
426
+ "name": "system_program"
427
+ },
428
+ {
429
+ "name": "sy_program"
430
+ },
431
+ {
432
+ "name": "token_program",
433
+ "docs": [
434
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
435
+ ]
436
+ },
437
+ {
438
+ "name": "exponent_core"
439
+ },
440
+ {
441
+ "name": "address_lookup_table"
442
+ },
443
+ {
444
+ "name": "event_authority"
445
+ },
446
+ {
447
+ "name": "program"
448
+ }
449
+ ],
450
+ "args": [
451
+ {
452
+ "name": "max_price_apy",
453
+ "type": "f64"
454
+ },
455
+ {
456
+ "name": "amount",
457
+ "type": "u64"
458
+ },
459
+ {
460
+ "name": "min_amount_out",
461
+ "type": "u64"
462
+ },
463
+ {
464
+ "name": "offer_type",
465
+ "type": {
466
+ "defined": {
467
+ "name": "OfferType"
468
+ }
469
+ }
470
+ },
471
+ {
472
+ "name": "virtual_offer",
473
+ "type": "bool"
474
+ }
475
+ ],
476
+ "returns": {
477
+ "defined": {
478
+ "name": "MarketOfferEvent"
479
+ }
480
+ }
481
+ },
482
+ {
483
+ "name": "post_offer",
484
+ "discriminator": [
485
+ 1
486
+ ],
487
+ "accounts": [
488
+ {
489
+ "name": "trader",
490
+ "signer": true
491
+ },
492
+ {
493
+ "name": "orderbook",
494
+ "writable": true
495
+ },
496
+ {
497
+ "name": "vault",
498
+ "docs": [
499
+ "Links the mint_yt & sy_program together"
500
+ ],
501
+ "writable": true
502
+ },
503
+ {
504
+ "name": "cpi_account_orderbook",
505
+ "docs": [
506
+ "Cpi accounts Orderbook"
507
+ ]
508
+ },
509
+ {
510
+ "name": "yield_position",
511
+ "writable": true
512
+ },
513
+ {
514
+ "name": "token_escrow_yt",
515
+ "docs": [
516
+ "This account for YT is only a temporary pass-through account",
517
+ "It is used to transfer YT tokens from the signer to the orderbook",
518
+ "And then from the orderbook to the core program"
519
+ ],
520
+ "writable": true
521
+ },
522
+ {
523
+ "name": "token_escrow_sy",
524
+ "docs": [
525
+ "Orderbook token account for SY"
526
+ ],
527
+ "writable": true
528
+ },
529
+ {
530
+ "name": "token_escrow_pt",
531
+ "docs": [
532
+ "Orderbook token account for PT"
533
+ ],
534
+ "writable": true
535
+ },
536
+ {
537
+ "name": "token_sy_trader",
538
+ "writable": true
539
+ },
540
+ {
541
+ "name": "token_yt_trader",
542
+ "writable": true
543
+ },
544
+ {
545
+ "name": "token_pt_trader",
546
+ "writable": true
547
+ },
548
+ {
549
+ "name": "system_program"
550
+ },
551
+ {
552
+ "name": "sy_program"
553
+ },
554
+ {
555
+ "name": "token_program",
556
+ "docs": [
557
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
558
+ ]
559
+ },
560
+ {
561
+ "name": "exponent_core"
562
+ },
563
+ {
564
+ "name": "address_lookup_table"
565
+ },
566
+ {
567
+ "name": "event_authority"
568
+ },
569
+ {
570
+ "name": "program"
571
+ }
572
+ ],
573
+ "args": [
574
+ {
575
+ "name": "price_apy",
576
+ "type": "f64"
577
+ },
578
+ {
579
+ "name": "amount",
580
+ "type": "u64"
581
+ },
582
+ {
583
+ "name": "offer_type_flag",
584
+ "type": {
585
+ "defined": {
586
+ "name": "OfferType"
587
+ }
588
+ }
589
+ },
590
+ {
591
+ "name": "virtual_offer",
592
+ "type": "bool"
593
+ },
594
+ {
595
+ "name": "expiry_seconds",
596
+ "type": "u32"
597
+ },
598
+ {
599
+ "name": "options",
600
+ "type": {
601
+ "defined": {
602
+ "name": "OfferOptions"
603
+ }
604
+ }
605
+ }
606
+ ],
607
+ "returns": {
608
+ "defined": {
609
+ "name": "PostOfferEvent"
610
+ }
611
+ }
612
+ },
613
+ {
614
+ "name": "realloc_orderbook_account",
615
+ "docs": [
616
+ "High-trust function to realloc orderbook data orderbook"
617
+ ],
618
+ "discriminator": [
619
+ 2
620
+ ],
621
+ "accounts": [
622
+ {
623
+ "name": "payer",
624
+ "writable": true,
625
+ "signer": true
626
+ },
627
+ {
628
+ "name": "orderbook",
629
+ "writable": true
630
+ },
631
+ {
632
+ "name": "vault"
633
+ },
634
+ {
635
+ "name": "system_program"
636
+ },
637
+ {
638
+ "name": "rent"
639
+ }
640
+ ],
641
+ "args": [
642
+ {
643
+ "name": "seed_id",
644
+ "type": "u32"
645
+ }
646
+ ]
647
+ },
648
+ {
649
+ "name": "remove_expired_offers",
650
+ "docs": [
651
+ "High-trust function to set config options"
652
+ ],
653
+ "discriminator": [
654
+ 16
655
+ ],
656
+ "accounts": [
657
+ {
658
+ "name": "admin",
659
+ "writable": true,
660
+ "signer": true
661
+ },
662
+ {
663
+ "name": "orderbook",
664
+ "writable": true
665
+ },
666
+ {
667
+ "name": "sy_program"
668
+ },
669
+ {
670
+ "name": "address_lookup_table",
671
+ "writable": true
672
+ },
673
+ {
674
+ "name": "cpi_account_orderbook",
675
+ "docs": [
676
+ "Cpi accounts Orderbook"
677
+ ],
678
+ "writable": true
679
+ },
680
+ {
681
+ "name": "event_authority"
682
+ },
683
+ {
684
+ "name": "program"
685
+ }
686
+ ],
687
+ "args": []
688
+ },
689
+ {
690
+ "name": "remove_offer",
691
+ "discriminator": [
692
+ 4
693
+ ],
694
+ "accounts": [
695
+ {
696
+ "name": "trader",
697
+ "signer": true
698
+ },
699
+ {
700
+ "name": "orderbook",
701
+ "writable": true
702
+ },
703
+ {
704
+ "name": "token_escrow_yt",
705
+ "docs": [
706
+ "This account for YT is only a temporary pass-through account",
707
+ "It is used to transfer YT tokens from the signer to the orderbook",
708
+ "And then from the orderbook to the core program"
709
+ ],
710
+ "writable": true
711
+ },
712
+ {
713
+ "name": "token_escrow_sy",
714
+ "docs": [
715
+ "Orderbook token account for SY"
716
+ ],
717
+ "writable": true
718
+ },
719
+ {
720
+ "name": "token_escrow_pt",
721
+ "docs": [
722
+ "Orderbook token account for PT"
723
+ ],
724
+ "writable": true
725
+ },
726
+ {
727
+ "name": "token_sy_trader",
728
+ "writable": true
729
+ },
730
+ {
731
+ "name": "token_yt_trader",
732
+ "writable": true
733
+ },
734
+ {
735
+ "name": "token_pt_trader",
736
+ "writable": true
737
+ },
738
+ {
739
+ "name": "system_program"
740
+ },
741
+ {
742
+ "name": "token_program",
743
+ "docs": [
744
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
745
+ ]
746
+ },
747
+ {
748
+ "name": "sy_program"
749
+ },
750
+ {
751
+ "name": "exponent_core"
752
+ },
753
+ {
754
+ "name": "address_lookup_table"
755
+ },
756
+ {
757
+ "name": "cpi_account_orderbook",
758
+ "docs": [
759
+ "Cpi accounts Orderbook"
760
+ ]
761
+ },
762
+ {
763
+ "name": "event_authority"
764
+ },
765
+ {
766
+ "name": "program"
767
+ }
768
+ ],
769
+ "args": [
770
+ {
771
+ "name": "offer_idx",
772
+ "type": "u32"
773
+ }
774
+ ],
775
+ "returns": {
776
+ "defined": {
777
+ "name": "RemoveOfferEvent"
778
+ }
779
+ }
780
+ },
781
+ {
782
+ "name": "set_configuration_options",
783
+ "docs": [
784
+ "High-trust function to set config options"
785
+ ],
786
+ "discriminator": [
787
+ 12
788
+ ],
789
+ "accounts": [
790
+ {
791
+ "name": "admin_signer",
792
+ "signer": true
793
+ },
794
+ {
795
+ "name": "orderbook",
796
+ "writable": true
797
+ }
798
+ ],
799
+ "args": [
800
+ {
801
+ "name": "set_configuration_options_enum",
802
+ "type": {
803
+ "defined": {
804
+ "name": "SetConfigurationOptionsEnum"
805
+ }
806
+ }
807
+ }
808
+ ]
809
+ },
810
+ {
811
+ "name": "withdraw_funds",
812
+ "discriminator": [
813
+ 6
814
+ ],
815
+ "accounts": [
816
+ {
817
+ "name": "trader",
818
+ "signer": true
819
+ },
820
+ {
821
+ "name": "orderbook",
822
+ "writable": true
823
+ },
824
+ {
825
+ "name": "token_escrow_yt",
826
+ "docs": [
827
+ "This account for YT is only a temporary pass-through account",
828
+ "It is used to transfer YT tokens from the signer to the orderbook",
829
+ "And then from the orderbook to the core program"
830
+ ],
831
+ "writable": true
832
+ },
833
+ {
834
+ "name": "token_escrow_sy",
835
+ "docs": [
836
+ "Orderbook token account for SY"
837
+ ],
838
+ "writable": true
839
+ },
840
+ {
841
+ "name": "token_escrow_pt",
842
+ "docs": [
843
+ "Orderbook token account for PT"
844
+ ],
845
+ "writable": true
846
+ },
847
+ {
848
+ "name": "token_sy_trader",
849
+ "writable": true
850
+ },
851
+ {
852
+ "name": "token_yt_trader",
853
+ "writable": true
854
+ },
855
+ {
856
+ "name": "token_pt_trader",
857
+ "writable": true
858
+ },
859
+ {
860
+ "name": "system_program"
861
+ },
862
+ {
863
+ "name": "token_program",
864
+ "docs": [
865
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
866
+ ]
867
+ },
868
+ {
869
+ "name": "sy_program"
870
+ },
871
+ {
872
+ "name": "exponent_core"
873
+ },
874
+ {
875
+ "name": "address_lookup_table"
876
+ },
877
+ {
878
+ "name": "cpi_account_orderbook",
879
+ "docs": [
880
+ "Cpi accounts Orderbook"
881
+ ]
882
+ },
883
+ {
884
+ "name": "event_authority"
885
+ },
886
+ {
887
+ "name": "program"
888
+ }
889
+ ],
890
+ "args": [
891
+ {
892
+ "name": "pt_amount_optional",
893
+ "type": {
894
+ "defined": {
895
+ "name": "Amount"
896
+ }
897
+ }
898
+ },
899
+ {
900
+ "name": "yt_amount_optional",
901
+ "type": {
902
+ "defined": {
903
+ "name": "Amount"
904
+ }
905
+ }
906
+ },
907
+ {
908
+ "name": "sy_amount_optional",
909
+ "type": {
910
+ "defined": {
911
+ "name": "Amount"
912
+ }
913
+ }
914
+ }
915
+ ],
916
+ "returns": {
917
+ "defined": {
918
+ "name": "WithdrawFundsEvent"
919
+ }
920
+ }
921
+ },
922
+ {
923
+ "name": "wrapper_collect_admin_fee",
924
+ "docs": [
925
+ "High-trust wrapped function to collect admin fees"
926
+ ],
927
+ "discriminator": [
928
+ 14
929
+ ],
930
+ "accounts": [
931
+ {
932
+ "name": "admin",
933
+ "writable": true,
934
+ "signer": true
935
+ },
936
+ {
937
+ "name": "orderbook",
938
+ "writable": true
939
+ },
940
+ {
941
+ "name": "vault",
942
+ "docs": [
943
+ "Links the mint_yt & sy_program together"
944
+ ],
945
+ "writable": true
946
+ },
947
+ {
948
+ "name": "cpi_account_orderbook",
949
+ "docs": [
950
+ "Cpi accounts Orderbook"
951
+ ]
952
+ },
953
+ {
954
+ "name": "token_escrow_yt",
955
+ "docs": [
956
+ "It is used to transfer SY tokens from the signer to the orderbook"
957
+ ],
958
+ "writable": true
959
+ },
960
+ {
961
+ "name": "token_escrow_sy",
962
+ "docs": [
963
+ "It is used to transfer SY tokens from the signer to the orderbook"
964
+ ],
965
+ "writable": true
966
+ },
967
+ {
968
+ "name": "token_escrow_pt",
969
+ "docs": [
970
+ "It is used to transfer SY tokens from the signer to the orderbook"
971
+ ],
972
+ "writable": true
973
+ },
974
+ {
975
+ "name": "token_sy_admin",
976
+ "writable": true
977
+ },
978
+ {
979
+ "name": "token_yt_admin",
980
+ "writable": true
981
+ },
982
+ {
983
+ "name": "token_pt_admin",
984
+ "writable": true
985
+ },
986
+ {
987
+ "name": "system_program"
988
+ },
989
+ {
990
+ "name": "sy_program"
991
+ },
992
+ {
993
+ "name": "token_program",
994
+ "docs": [
995
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
996
+ ]
997
+ },
998
+ {
999
+ "name": "exponent_core"
1000
+ },
1001
+ {
1002
+ "name": "address_lookup_table"
1003
+ },
1004
+ {
1005
+ "name": "event_authority"
1006
+ },
1007
+ {
1008
+ "name": "program"
1009
+ }
1010
+ ],
1011
+ "args": [
1012
+ {
1013
+ "name": "redeem_sy_accounts_until",
1014
+ "type": "u8"
1015
+ }
1016
+ ],
1017
+ "returns": {
1018
+ "defined": {
1019
+ "name": "WrapperCollectAdminFeeEvent"
1020
+ }
1021
+ }
1022
+ },
1023
+ {
1024
+ "name": "wrapper_collect_interest",
1025
+ "discriminator": [
1026
+ 10
1027
+ ],
1028
+ "accounts": [
1029
+ {
1030
+ "name": "trader",
1031
+ "signer": true
1032
+ },
1033
+ {
1034
+ "name": "orderbook",
1035
+ "writable": true
1036
+ },
1037
+ {
1038
+ "name": "vault",
1039
+ "docs": [
1040
+ "Links the mint_yt & sy_program together"
1041
+ ],
1042
+ "writable": true
1043
+ },
1044
+ {
1045
+ "name": "cpi_account_orderbook",
1046
+ "docs": [
1047
+ "Cpi accounts Orderbook"
1048
+ ]
1049
+ },
1050
+ {
1051
+ "name": "token_escrow_sy",
1052
+ "docs": [
1053
+ "Orderbook token account for SY"
1054
+ ],
1055
+ "writable": true
1056
+ },
1057
+ {
1058
+ "name": "token_sy_trader",
1059
+ "writable": true
1060
+ },
1061
+ {
1062
+ "name": "system_program"
1063
+ },
1064
+ {
1065
+ "name": "sy_program"
1066
+ },
1067
+ {
1068
+ "name": "token_program",
1069
+ "docs": [
1070
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
1071
+ ]
1072
+ },
1073
+ {
1074
+ "name": "exponent_core"
1075
+ },
1076
+ {
1077
+ "name": "address_lookup_table"
1078
+ },
1079
+ {
1080
+ "name": "event_authority"
1081
+ },
1082
+ {
1083
+ "name": "program"
1084
+ }
1085
+ ],
1086
+ "args": [
1087
+ {
1088
+ "name": "redeem_sy_accounts_until",
1089
+ "type": "u8"
1090
+ }
1091
+ ],
1092
+ "returns": {
1093
+ "defined": {
1094
+ "name": "WrapperCollectInterestEvent"
1095
+ }
1096
+ }
1097
+ },
1098
+ {
1099
+ "name": "wrapper_market_offer",
1100
+ "discriminator": [
1101
+ 8
1102
+ ],
1103
+ "accounts": [
1104
+ {
1105
+ "name": "trader",
1106
+ "signer": true
1107
+ },
1108
+ {
1109
+ "name": "orderbook",
1110
+ "writable": true
1111
+ },
1112
+ {
1113
+ "name": "vault",
1114
+ "docs": [
1115
+ "Links the mint_yt & sy_program together"
1116
+ ],
1117
+ "writable": true
1118
+ },
1119
+ {
1120
+ "name": "cpi_account_orderbook",
1121
+ "docs": [
1122
+ "Cpi accounts Orderbook"
1123
+ ]
1124
+ },
1125
+ {
1126
+ "name": "yield_position",
1127
+ "writable": true
1128
+ },
1129
+ {
1130
+ "name": "token_escrow_yt",
1131
+ "docs": [
1132
+ "This account for YT is only a temporary pass-through account",
1133
+ "It is used to transfer YT tokens from the signer to the orderbook",
1134
+ "And then from the orderbook to the core program"
1135
+ ],
1136
+ "writable": true
1137
+ },
1138
+ {
1139
+ "name": "token_escrow_sy",
1140
+ "docs": [
1141
+ "Orderbook token account for SY"
1142
+ ],
1143
+ "writable": true
1144
+ },
1145
+ {
1146
+ "name": "token_escrow_pt",
1147
+ "docs": [
1148
+ "Orderbook token account for PT"
1149
+ ],
1150
+ "writable": true
1151
+ },
1152
+ {
1153
+ "name": "token_sy_trader",
1154
+ "writable": true
1155
+ },
1156
+ {
1157
+ "name": "token_yt_trader",
1158
+ "writable": true
1159
+ },
1160
+ {
1161
+ "name": "token_pt_trader",
1162
+ "writable": true
1163
+ },
1164
+ {
1165
+ "name": "system_program"
1166
+ },
1167
+ {
1168
+ "name": "sy_program"
1169
+ },
1170
+ {
1171
+ "name": "token_program",
1172
+ "docs": [
1173
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
1174
+ ]
1175
+ },
1176
+ {
1177
+ "name": "exponent_core"
1178
+ },
1179
+ {
1180
+ "name": "address_lookup_table"
1181
+ },
1182
+ {
1183
+ "name": "event_authority"
1184
+ },
1185
+ {
1186
+ "name": "program"
1187
+ }
1188
+ ],
1189
+ "args": [
1190
+ {
1191
+ "name": "max_price_apy",
1192
+ "type": "f64"
1193
+ },
1194
+ {
1195
+ "name": "amount_base",
1196
+ "type": "u64"
1197
+ },
1198
+ {
1199
+ "name": "min_amount_out",
1200
+ "type": "u64"
1201
+ },
1202
+ {
1203
+ "name": "offer_type",
1204
+ "type": {
1205
+ "defined": {
1206
+ "name": "OfferType"
1207
+ }
1208
+ }
1209
+ },
1210
+ {
1211
+ "name": "virtual_offer",
1212
+ "type": "bool"
1213
+ },
1214
+ {
1215
+ "name": "mint_sy_or_withdraw_yt_accounts_until",
1216
+ "type": "u8"
1217
+ },
1218
+ {
1219
+ "name": "redeem_sy_or_depsoit_yt_accounts_until",
1220
+ "type": "u8"
1221
+ }
1222
+ ],
1223
+ "returns": {
1224
+ "defined": {
1225
+ "name": "WrapperMarketOfferEvent"
1226
+ }
1227
+ }
1228
+ },
1229
+ {
1230
+ "name": "wrapper_post_offer",
1231
+ "discriminator": [
1232
+ 7
1233
+ ],
1234
+ "accounts": [
1235
+ {
1236
+ "name": "trader",
1237
+ "signer": true
1238
+ },
1239
+ {
1240
+ "name": "orderbook",
1241
+ "writable": true
1242
+ },
1243
+ {
1244
+ "name": "vault",
1245
+ "docs": [
1246
+ "Links the mint_yt & sy_program together"
1247
+ ],
1248
+ "writable": true
1249
+ },
1250
+ {
1251
+ "name": "cpi_account_orderbook",
1252
+ "docs": [
1253
+ "Cpi accounts Orderbook"
1254
+ ]
1255
+ },
1256
+ {
1257
+ "name": "yield_position",
1258
+ "writable": true
1259
+ },
1260
+ {
1261
+ "name": "token_escrow_yt",
1262
+ "docs": [
1263
+ "This account for YT is only a temporary pass-through account",
1264
+ "It is used to transfer YT tokens from the signer to the orderbook",
1265
+ "And then from the orderbook to the core program"
1266
+ ],
1267
+ "writable": true
1268
+ },
1269
+ {
1270
+ "name": "token_escrow_sy",
1271
+ "docs": [
1272
+ "Orderbook token account for SY"
1273
+ ],
1274
+ "writable": true
1275
+ },
1276
+ {
1277
+ "name": "token_escrow_pt",
1278
+ "docs": [
1279
+ "Orderbook token account for PT"
1280
+ ],
1281
+ "writable": true
1282
+ },
1283
+ {
1284
+ "name": "token_sy_trader",
1285
+ "writable": true
1286
+ },
1287
+ {
1288
+ "name": "token_yt_trader",
1289
+ "writable": true
1290
+ },
1291
+ {
1292
+ "name": "token_pt_trader",
1293
+ "writable": true
1294
+ },
1295
+ {
1296
+ "name": "system_program"
1297
+ },
1298
+ {
1299
+ "name": "sy_program"
1300
+ },
1301
+ {
1302
+ "name": "token_program",
1303
+ "docs": [
1304
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
1305
+ ]
1306
+ },
1307
+ {
1308
+ "name": "exponent_core"
1309
+ },
1310
+ {
1311
+ "name": "address_lookup_table"
1312
+ },
1313
+ {
1314
+ "name": "event_authority"
1315
+ },
1316
+ {
1317
+ "name": "program"
1318
+ }
1319
+ ],
1320
+ "args": [
1321
+ {
1322
+ "name": "price_apy",
1323
+ "type": "f64"
1324
+ },
1325
+ {
1326
+ "name": "amount_base",
1327
+ "type": "u64"
1328
+ },
1329
+ {
1330
+ "name": "offer_type",
1331
+ "type": {
1332
+ "defined": {
1333
+ "name": "OfferType"
1334
+ }
1335
+ }
1336
+ },
1337
+ {
1338
+ "name": "virtual_offer",
1339
+ "type": "bool"
1340
+ },
1341
+ {
1342
+ "name": "expiry_seconds",
1343
+ "type": "u32"
1344
+ },
1345
+ {
1346
+ "name": "options",
1347
+ "type": {
1348
+ "defined": {
1349
+ "name": "OfferOptions"
1350
+ }
1351
+ }
1352
+ },
1353
+ {
1354
+ "name": "mint_sy_or_withdraw_yt_accounts_until",
1355
+ "type": "u8"
1356
+ }
1357
+ ],
1358
+ "returns": {
1359
+ "defined": {
1360
+ "name": "WrapperPostOfferEvent"
1361
+ }
1362
+ }
1363
+ },
1364
+ {
1365
+ "name": "wrapper_remove_offer",
1366
+ "discriminator": [
1367
+ 9
1368
+ ],
1369
+ "accounts": [
1370
+ {
1371
+ "name": "trader",
1372
+ "signer": true
1373
+ },
1374
+ {
1375
+ "name": "orderbook",
1376
+ "writable": true
1377
+ },
1378
+ {
1379
+ "name": "vault",
1380
+ "docs": [
1381
+ "Links the mint_yt & sy_program together"
1382
+ ],
1383
+ "writable": true
1384
+ },
1385
+ {
1386
+ "name": "cpi_account_orderbook",
1387
+ "docs": [
1388
+ "Cpi accounts Orderbook"
1389
+ ]
1390
+ },
1391
+ {
1392
+ "name": "token_escrow_yt",
1393
+ "docs": [
1394
+ "This account for YT is only a temporary pass-through account",
1395
+ "It is used to transfer YT tokens from the signer to the orderbook",
1396
+ "And then from the orderbook to the core program"
1397
+ ],
1398
+ "writable": true
1399
+ },
1400
+ {
1401
+ "name": "token_escrow_sy",
1402
+ "docs": [
1403
+ "Orderbook token account for SY"
1404
+ ],
1405
+ "writable": true
1406
+ },
1407
+ {
1408
+ "name": "token_escrow_pt",
1409
+ "docs": [
1410
+ "Orderbook token account for PT"
1411
+ ],
1412
+ "writable": true
1413
+ },
1414
+ {
1415
+ "name": "token_sy_trader",
1416
+ "writable": true
1417
+ },
1418
+ {
1419
+ "name": "token_yt_trader",
1420
+ "writable": true
1421
+ },
1422
+ {
1423
+ "name": "token_pt_trader",
1424
+ "writable": true
1425
+ },
1426
+ {
1427
+ "name": "system_program"
1428
+ },
1429
+ {
1430
+ "name": "sy_program"
1431
+ },
1432
+ {
1433
+ "name": "token_program",
1434
+ "docs": [
1435
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
1436
+ ]
1437
+ },
1438
+ {
1439
+ "name": "exponent_core"
1440
+ },
1441
+ {
1442
+ "name": "address_lookup_table"
1443
+ },
1444
+ {
1445
+ "name": "event_authority"
1446
+ },
1447
+ {
1448
+ "name": "program"
1449
+ }
1450
+ ],
1451
+ "args": [
1452
+ {
1453
+ "name": "offer_idx",
1454
+ "type": "u32"
1455
+ },
1456
+ {
1457
+ "name": "redeem_sy_accounts_until",
1458
+ "type": "u8"
1459
+ }
1460
+ ],
1461
+ "returns": {
1462
+ "defined": {
1463
+ "name": "WrapperRemoveOfferEvent"
1464
+ }
1465
+ }
1466
+ },
1467
+ {
1468
+ "name": "wrapper_withdraw_funds",
1469
+ "discriminator": [
1470
+ 11
1471
+ ],
1472
+ "accounts": [
1473
+ {
1474
+ "name": "trader",
1475
+ "signer": true
1476
+ },
1477
+ {
1478
+ "name": "orderbook",
1479
+ "writable": true
1480
+ },
1481
+ {
1482
+ "name": "vault",
1483
+ "docs": [
1484
+ "Links the mint_yt & sy_program together"
1485
+ ],
1486
+ "writable": true
1487
+ },
1488
+ {
1489
+ "name": "cpi_account_orderbook",
1490
+ "docs": [
1491
+ "Cpi accounts Orderbook"
1492
+ ]
1493
+ },
1494
+ {
1495
+ "name": "token_escrow_yt",
1496
+ "docs": [
1497
+ "This account for YT is only a temporary pass-through account",
1498
+ "It is used to transfer YT tokens from the signer to the orderbook",
1499
+ "And then from the orderbook to the core program"
1500
+ ],
1501
+ "writable": true
1502
+ },
1503
+ {
1504
+ "name": "token_escrow_sy",
1505
+ "docs": [
1506
+ "Orderbook token account for SY"
1507
+ ],
1508
+ "writable": true
1509
+ },
1510
+ {
1511
+ "name": "token_escrow_pt",
1512
+ "docs": [
1513
+ "Orderbook token account for PT"
1514
+ ],
1515
+ "writable": true
1516
+ },
1517
+ {
1518
+ "name": "token_sy_trader",
1519
+ "writable": true
1520
+ },
1521
+ {
1522
+ "name": "token_yt_trader",
1523
+ "writable": true
1524
+ },
1525
+ {
1526
+ "name": "token_pt_trader",
1527
+ "writable": true
1528
+ },
1529
+ {
1530
+ "name": "system_program"
1531
+ },
1532
+ {
1533
+ "name": "sy_program"
1534
+ },
1535
+ {
1536
+ "name": "token_program",
1537
+ "docs": [
1538
+ "Use Token2022 as the implementation for PT & SY & LP tokens"
1539
+ ]
1540
+ },
1541
+ {
1542
+ "name": "exponent_core"
1543
+ },
1544
+ {
1545
+ "name": "address_lookup_table"
1546
+ },
1547
+ {
1548
+ "name": "event_authority"
1549
+ },
1550
+ {
1551
+ "name": "program"
1552
+ }
1553
+ ],
1554
+ "args": [
1555
+ {
1556
+ "name": "pt_amount_optional",
1557
+ "type": {
1558
+ "defined": {
1559
+ "name": "Amount"
1560
+ }
1561
+ }
1562
+ },
1563
+ {
1564
+ "name": "yt_amount_optional",
1565
+ "type": {
1566
+ "defined": {
1567
+ "name": "Amount"
1568
+ }
1569
+ }
1570
+ },
1571
+ {
1572
+ "name": "sy_amount_optional",
1573
+ "type": {
1574
+ "defined": {
1575
+ "name": "Amount"
1576
+ }
1577
+ }
1578
+ },
1579
+ {
1580
+ "name": "redeem_sy_accounts_until",
1581
+ "type": "u8"
1582
+ }
1583
+ ],
1584
+ "returns": {
1585
+ "defined": {
1586
+ "name": "WrapperWithdrawFundsEvent"
1587
+ }
1588
+ }
1589
+ }
1590
+ ],
1591
+ "accounts": [
1592
+ {
1593
+ "name": "CpiAccountsOrderbook",
1594
+ "discriminator": [
1595
+ 14,
1596
+ 139,
1597
+ 214,
1598
+ 193,
1599
+ 94,
1600
+ 141,
1601
+ 153,
1602
+ 239
1603
+ ]
1604
+ },
1605
+ {
1606
+ "name": "Vault",
1607
+ "discriminator": [
1608
+ 211,
1609
+ 8,
1610
+ 232,
1611
+ 43,
1612
+ 2,
1613
+ 152,
1614
+ 117,
1615
+ 119
1616
+ ]
1617
+ }
1618
+ ],
1619
+ "events": [
1620
+ {
1621
+ "name": "CollectAdminEmissionEvent",
1622
+ "discriminator": [
1623
+ 206,
1624
+ 151,
1625
+ 36,
1626
+ 198,
1627
+ 125,
1628
+ 100,
1629
+ 83,
1630
+ 229
1631
+ ]
1632
+ },
1633
+ {
1634
+ "name": "CollectAdminFeeEvent",
1635
+ "discriminator": [
1636
+ 144,
1637
+ 182,
1638
+ 201,
1639
+ 215,
1640
+ 94,
1641
+ 2,
1642
+ 90,
1643
+ 166
1644
+ ]
1645
+ },
1646
+ {
1647
+ "name": "CollectEmissionEventV2",
1648
+ "discriminator": [
1649
+ 235,
1650
+ 35,
1651
+ 233,
1652
+ 149,
1653
+ 215,
1654
+ 221,
1655
+ 100,
1656
+ 66
1657
+ ]
1658
+ },
1659
+ {
1660
+ "name": "CollectInterestEventV2",
1661
+ "discriminator": [
1662
+ 208,
1663
+ 173,
1664
+ 139,
1665
+ 10,
1666
+ 96,
1667
+ 51,
1668
+ 184,
1669
+ 154
1670
+ ]
1671
+ },
1672
+ {
1673
+ "name": "CollectUserInterestEvent",
1674
+ "discriminator": [
1675
+ 75,
1676
+ 233,
1677
+ 146,
1678
+ 202,
1679
+ 157,
1680
+ 202,
1681
+ 234,
1682
+ 3
1683
+ ]
1684
+ },
1685
+ {
1686
+ "name": "MarketOfferEvent",
1687
+ "discriminator": [
1688
+ 155,
1689
+ 251,
1690
+ 115,
1691
+ 85,
1692
+ 128,
1693
+ 13,
1694
+ 56,
1695
+ 58
1696
+ ]
1697
+ },
1698
+ {
1699
+ "name": "MergeEvent",
1700
+ "discriminator": [
1701
+ 25,
1702
+ 30,
1703
+ 29,
1704
+ 41,
1705
+ 108,
1706
+ 139,
1707
+ 103,
1708
+ 4
1709
+ ]
1710
+ },
1711
+ {
1712
+ "name": "OrderbookInitEvent",
1713
+ "discriminator": [
1714
+ 40,
1715
+ 255,
1716
+ 2,
1717
+ 75,
1718
+ 52,
1719
+ 140,
1720
+ 18,
1721
+ 207
1722
+ ]
1723
+ },
1724
+ {
1725
+ "name": "PostOfferEvent",
1726
+ "discriminator": [
1727
+ 25,
1728
+ 143,
1729
+ 102,
1730
+ 206,
1731
+ 121,
1732
+ 170,
1733
+ 189,
1734
+ 248
1735
+ ]
1736
+ },
1737
+ {
1738
+ "name": "RemoveOfferEvent",
1739
+ "discriminator": [
1740
+ 160,
1741
+ 74,
1742
+ 149,
1743
+ 143,
1744
+ 110,
1745
+ 26,
1746
+ 116,
1747
+ 176
1748
+ ]
1749
+ },
1750
+ {
1751
+ "name": "StripEvent",
1752
+ "discriminator": [
1753
+ 114,
1754
+ 189,
1755
+ 26,
1756
+ 143,
1757
+ 143,
1758
+ 50,
1759
+ 197,
1760
+ 89
1761
+ ]
1762
+ },
1763
+ {
1764
+ "name": "WithdrawFundsEvent",
1765
+ "discriminator": [
1766
+ 58,
1767
+ 194,
1768
+ 121,
1769
+ 69,
1770
+ 49,
1771
+ 139,
1772
+ 53,
1773
+ 200
1774
+ ]
1775
+ },
1776
+ {
1777
+ "name": "WrapperCollectAdminFeeEvent",
1778
+ "discriminator": [
1779
+ 162,
1780
+ 110,
1781
+ 60,
1782
+ 167,
1783
+ 232,
1784
+ 62,
1785
+ 75,
1786
+ 162
1787
+ ]
1788
+ },
1789
+ {
1790
+ "name": "WrapperCollectInterestEvent",
1791
+ "discriminator": [
1792
+ 177,
1793
+ 39,
1794
+ 249,
1795
+ 210,
1796
+ 72,
1797
+ 117,
1798
+ 16,
1799
+ 192
1800
+ ]
1801
+ },
1802
+ {
1803
+ "name": "WrapperMarketOfferEvent",
1804
+ "discriminator": [
1805
+ 179,
1806
+ 106,
1807
+ 57,
1808
+ 37,
1809
+ 76,
1810
+ 177,
1811
+ 150,
1812
+ 247
1813
+ ]
1814
+ },
1815
+ {
1816
+ "name": "WrapperPostOfferEvent",
1817
+ "discriminator": [
1818
+ 241,
1819
+ 83,
1820
+ 95,
1821
+ 152,
1822
+ 200,
1823
+ 157,
1824
+ 144,
1825
+ 192
1826
+ ]
1827
+ },
1828
+ {
1829
+ "name": "WrapperRemoveOfferEvent",
1830
+ "discriminator": [
1831
+ 226,
1832
+ 176,
1833
+ 139,
1834
+ 253,
1835
+ 95,
1836
+ 47,
1837
+ 111,
1838
+ 219
1839
+ ]
1840
+ },
1841
+ {
1842
+ "name": "WrapperWithdrawFundsEvent",
1843
+ "discriminator": [
1844
+ 247,
1845
+ 54,
1846
+ 205,
1847
+ 193,
1848
+ 198,
1849
+ 137,
1850
+ 144,
1851
+ 188
1852
+ ]
1853
+ }
1854
+ ],
1855
+ "errors": [
1856
+ {
1857
+ "code": 6000,
1858
+ "name": "InvalidOrderbookOwner",
1859
+ "msg": "Orderbook account owner mismatch"
1860
+ },
1861
+ {
1862
+ "code": 6001,
1863
+ "name": "VaultMismatch",
1864
+ "msg": "Vault does not match orderbook.vault"
1865
+ },
1866
+ {
1867
+ "code": 6002,
1868
+ "name": "YieldPositionMismatch",
1869
+ "msg": "Yield position does not match orderbook.yield_position"
1870
+ },
1871
+ {
1872
+ "code": 6003,
1873
+ "name": "AltMismatch",
1874
+ "msg": "Address lookup table does not match orderbook.address_lookup_table"
1875
+ },
1876
+ {
1877
+ "code": 6004,
1878
+ "name": "SyEscrowMismatch",
1879
+ "msg": "SY escrow does not match orderbook.token_escrow_sy"
1880
+ },
1881
+ {
1882
+ "code": 6005,
1883
+ "name": "YtEscrowMismatch",
1884
+ "msg": "YT escrow does not match orderbook.token_escrow_yt"
1885
+ },
1886
+ {
1887
+ "code": 6006,
1888
+ "name": "PtEscrowMismatch",
1889
+ "msg": "PT escrow does not match orderbook.token_escrow_pt"
1890
+ },
1891
+ {
1892
+ "code": 6007,
1893
+ "name": "CpiAccountsMismatch",
1894
+ "msg": "CPI accounts orderbook does not match orderbook.cpi_account_orderbook"
1895
+ },
1896
+ {
1897
+ "code": 6008,
1898
+ "name": "WrongAdmin",
1899
+ "msg": "Wrong admin for orderbook"
1900
+ },
1901
+ {
1902
+ "code": 6009,
1903
+ "name": "SyExchangeRateExpectedToBeGreater",
1904
+ "msg": "Current sy exchange rate is smaller than the previous one"
1905
+ },
1906
+ {
1907
+ "code": 6010,
1908
+ "name": "SyProgramMismatch",
1909
+ "msg": "SY program does not match orderbook.sy_program"
1910
+ },
1911
+ {
1912
+ "code": 6011,
1913
+ "name": "ExponentCoreProgramMismatch",
1914
+ "msg": "Exponent Core program does not match orderbook.exponent_core"
1915
+ },
1916
+ {
1917
+ "code": 6012,
1918
+ "name": "EmissionOrderbookMismatch",
1919
+ "msg": "Emission orderbook does not match out token account"
1920
+ },
1921
+ {
1922
+ "code": 6013,
1923
+ "name": "TokenAccountAlreadyInUse",
1924
+ "msg": "Token account already in use"
1925
+ }
1926
+ ],
1927
+ "types": [
1928
+ {
1929
+ "name": "Amount",
1930
+ "type": {
1931
+ "kind": "enum",
1932
+ "variants": [
1933
+ {
1934
+ "name": "All"
1935
+ },
1936
+ {
1937
+ "name": "Some",
1938
+ "fields": [
1939
+ "u64"
1940
+ ]
1941
+ }
1942
+ ]
1943
+ }
1944
+ },
1945
+ {
1946
+ "name": "ClaimLimits",
1947
+ "type": {
1948
+ "kind": "struct",
1949
+ "fields": [
1950
+ {
1951
+ "name": "claim_window_start_timestamp",
1952
+ "type": "u32"
1953
+ },
1954
+ {
1955
+ "name": "total_claim_amount_in_window",
1956
+ "type": "u64"
1957
+ },
1958
+ {
1959
+ "name": "max_claim_amount_per_window",
1960
+ "type": "u64"
1961
+ },
1962
+ {
1963
+ "name": "claim_window_duration_seconds",
1964
+ "type": "u32"
1965
+ }
1966
+ ]
1967
+ }
1968
+ },
1969
+ {
1970
+ "name": "CollectAdminEmissionEvent",
1971
+ "type": {
1972
+ "kind": "struct",
1973
+ "fields": [
1974
+ {
1975
+ "name": "user_address",
1976
+ "type": "pubkey"
1977
+ },
1978
+ {
1979
+ "name": "orderbook_address",
1980
+ "type": "pubkey"
1981
+ },
1982
+ {
1983
+ "name": "amount_emission_admin",
1984
+ "type": "u64"
1985
+ },
1986
+ {
1987
+ "name": "amount_emission_treasury",
1988
+ "type": "u64"
1989
+ },
1990
+ {
1991
+ "name": "emission_index",
1992
+ "type": "u16"
1993
+ }
1994
+ ]
1995
+ }
1996
+ },
1997
+ {
1998
+ "name": "CollectAdminFeeEvent",
1999
+ "type": {
2000
+ "kind": "struct",
2001
+ "fields": [
2002
+ {
2003
+ "name": "sy_amount",
2004
+ "type": "u64"
2005
+ },
2006
+ {
2007
+ "name": "pt_amount",
2008
+ "type": "u64"
2009
+ },
2010
+ {
2011
+ "name": "yt_amount",
2012
+ "type": "u64"
2013
+ },
2014
+ {
2015
+ "name": "sy_interest_user",
2016
+ "type": "u64"
2017
+ },
2018
+ {
2019
+ "name": "sy_interest_tresury",
2020
+ "type": "u64"
2021
+ }
2022
+ ]
2023
+ }
2024
+ },
2025
+ {
2026
+ "name": "CollectEmissionEventV2",
2027
+ "type": {
2028
+ "kind": "struct",
2029
+ "fields": [
2030
+ {
2031
+ "name": "user",
2032
+ "type": "pubkey"
2033
+ },
2034
+ {
2035
+ "name": "vault",
2036
+ "type": "pubkey"
2037
+ },
2038
+ {
2039
+ "name": "position",
2040
+ "type": "pubkey"
2041
+ },
2042
+ {
2043
+ "name": "emission_index",
2044
+ "type": "u16"
2045
+ },
2046
+ {
2047
+ "name": "amount_to_user",
2048
+ "type": "u64"
2049
+ },
2050
+ {
2051
+ "name": "amount_to_treasury",
2052
+ "type": "u64"
2053
+ },
2054
+ {
2055
+ "name": "unix_timestamp",
2056
+ "type": "i64"
2057
+ },
2058
+ {
2059
+ "name": "user_interest",
2060
+ "type": {
2061
+ "defined": {
2062
+ "name": "YieldTokenTracker"
2063
+ }
2064
+ }
2065
+ },
2066
+ {
2067
+ "name": "user_emissions",
2068
+ "type": {
2069
+ "vec": {
2070
+ "defined": {
2071
+ "name": "YieldTokenTracker"
2072
+ }
2073
+ }
2074
+ }
2075
+ }
2076
+ ]
2077
+ }
2078
+ },
2079
+ {
2080
+ "name": "CollectInterestEventV2",
2081
+ "type": {
2082
+ "kind": "struct",
2083
+ "fields": [
2084
+ {
2085
+ "name": "user",
2086
+ "type": "pubkey"
2087
+ },
2088
+ {
2089
+ "name": "vault",
2090
+ "type": "pubkey"
2091
+ },
2092
+ {
2093
+ "name": "user_yield_position",
2094
+ "type": "pubkey"
2095
+ },
2096
+ {
2097
+ "name": "amount_to_user",
2098
+ "type": "u64"
2099
+ },
2100
+ {
2101
+ "name": "amount_to_treasury",
2102
+ "type": "u64"
2103
+ },
2104
+ {
2105
+ "name": "unix_timestamp",
2106
+ "type": "i64"
2107
+ },
2108
+ {
2109
+ "name": "user_interest",
2110
+ "type": {
2111
+ "defined": {
2112
+ "name": "YieldTokenTracker"
2113
+ }
2114
+ }
2115
+ },
2116
+ {
2117
+ "name": "user_emissions",
2118
+ "type": {
2119
+ "vec": {
2120
+ "defined": {
2121
+ "name": "YieldTokenTracker"
2122
+ }
2123
+ }
2124
+ }
2125
+ }
2126
+ ]
2127
+ }
2128
+ },
2129
+ {
2130
+ "name": "CollectUserInterestEvent",
2131
+ "type": {
2132
+ "kind": "struct",
2133
+ "fields": [
2134
+ {
2135
+ "name": "user_address",
2136
+ "type": "pubkey"
2137
+ },
2138
+ {
2139
+ "name": "orderbook_address",
2140
+ "type": "pubkey"
2141
+ },
2142
+ {
2143
+ "name": "amount_user",
2144
+ "type": "u64"
2145
+ },
2146
+ {
2147
+ "name": "amount_treasury",
2148
+ "type": "u64"
2149
+ }
2150
+ ]
2151
+ }
2152
+ },
2153
+ {
2154
+ "name": "CpiAccounts",
2155
+ "docs": [
2156
+ "Account lists for validating CPI calls to the SY program"
2157
+ ],
2158
+ "type": {
2159
+ "kind": "struct",
2160
+ "fields": [
2161
+ {
2162
+ "name": "get_sy_state",
2163
+ "docs": [
2164
+ "Fetch SY state"
2165
+ ],
2166
+ "type": {
2167
+ "vec": {
2168
+ "defined": {
2169
+ "name": "CpiInterfaceContext"
2170
+ }
2171
+ }
2172
+ }
2173
+ },
2174
+ {
2175
+ "name": "deposit_sy",
2176
+ "docs": [
2177
+ "Deposit SY into personal account owned by vault"
2178
+ ],
2179
+ "type": {
2180
+ "vec": {
2181
+ "defined": {
2182
+ "name": "CpiInterfaceContext"
2183
+ }
2184
+ }
2185
+ }
2186
+ },
2187
+ {
2188
+ "name": "withdraw_sy",
2189
+ "docs": [
2190
+ "Withdraw SY from personal account owned by vault"
2191
+ ],
2192
+ "type": {
2193
+ "vec": {
2194
+ "defined": {
2195
+ "name": "CpiInterfaceContext"
2196
+ }
2197
+ }
2198
+ }
2199
+ },
2200
+ {
2201
+ "name": "claim_emission",
2202
+ "docs": [
2203
+ "Settle rewards for vault to accounts owned by the vault"
2204
+ ],
2205
+ "type": {
2206
+ "vec": {
2207
+ "vec": {
2208
+ "defined": {
2209
+ "name": "CpiInterfaceContext"
2210
+ }
2211
+ }
2212
+ }
2213
+ }
2214
+ },
2215
+ {
2216
+ "name": "get_position_state",
2217
+ "docs": [
2218
+ "Get personal yield position"
2219
+ ],
2220
+ "type": {
2221
+ "vec": {
2222
+ "defined": {
2223
+ "name": "CpiInterfaceContext"
2224
+ }
2225
+ }
2226
+ }
2227
+ }
2228
+ ]
2229
+ }
2230
+ },
2231
+ {
2232
+ "name": "CpiAccountsOrderbook",
2233
+ "type": {
2234
+ "kind": "struct",
2235
+ "fields": [
2236
+ {
2237
+ "name": "sy_cpi_accounts",
2238
+ "type": {
2239
+ "defined": {
2240
+ "name": "CpiAccounts"
2241
+ }
2242
+ }
2243
+ },
2244
+ {
2245
+ "name": "exponent_core_cpi_accounts",
2246
+ "type": {
2247
+ "defined": {
2248
+ "name": "ExponentCoreCpiAccounts"
2249
+ }
2250
+ }
2251
+ }
2252
+ ]
2253
+ }
2254
+ },
2255
+ {
2256
+ "name": "CpiInterfaceContext",
2257
+ "type": {
2258
+ "kind": "struct",
2259
+ "fields": [
2260
+ {
2261
+ "name": "alt_index",
2262
+ "docs": [
2263
+ "Address-lookup-table index"
2264
+ ],
2265
+ "type": "u8"
2266
+ },
2267
+ {
2268
+ "name": "is_signer",
2269
+ "type": "bool"
2270
+ },
2271
+ {
2272
+ "name": "is_writable",
2273
+ "type": "bool"
2274
+ }
2275
+ ]
2276
+ }
2277
+ },
2278
+ {
2279
+ "name": "EmissionInfo",
2280
+ "type": {
2281
+ "kind": "struct",
2282
+ "fields": [
2283
+ {
2284
+ "name": "token_account",
2285
+ "docs": [
2286
+ "The token account for the emission where the vault authority is the authority"
2287
+ ],
2288
+ "type": "pubkey"
2289
+ },
2290
+ {
2291
+ "name": "initial_index",
2292
+ "type": {
2293
+ "defined": {
2294
+ "name": "Number"
2295
+ }
2296
+ }
2297
+ },
2298
+ {
2299
+ "name": "last_seen_index",
2300
+ "type": {
2301
+ "defined": {
2302
+ "name": "Number"
2303
+ }
2304
+ }
2305
+ },
2306
+ {
2307
+ "name": "final_index",
2308
+ "docs": [
2309
+ "The final index is used to track the last claimable index after the vault expires"
2310
+ ],
2311
+ "type": {
2312
+ "defined": {
2313
+ "name": "Number"
2314
+ }
2315
+ }
2316
+ },
2317
+ {
2318
+ "name": "treasury_token_account",
2319
+ "docs": [
2320
+ "The treasury token account for this reward"
2321
+ ],
2322
+ "type": "pubkey"
2323
+ },
2324
+ {
2325
+ "name": "fee_bps",
2326
+ "docs": [
2327
+ "The fee taken from emission collecting"
2328
+ ],
2329
+ "type": "u16"
2330
+ },
2331
+ {
2332
+ "name": "treasury_emission",
2333
+ "docs": [
2334
+ "The lambo fund"
2335
+ ],
2336
+ "type": "u64"
2337
+ }
2338
+ ]
2339
+ }
2340
+ },
2341
+ {
2342
+ "name": "ExponentCoreCpiAccounts",
2343
+ "docs": [
2344
+ "Account lists for validating CPI calls to the SY program"
2345
+ ],
2346
+ "type": {
2347
+ "kind": "struct",
2348
+ "fields": [
2349
+ {
2350
+ "name": "deposit_yt",
2351
+ "docs": [
2352
+ "Deposit YT into personal account owned by vault"
2353
+ ],
2354
+ "type": {
2355
+ "vec": {
2356
+ "defined": {
2357
+ "name": "CpiInterfaceContext"
2358
+ }
2359
+ }
2360
+ }
2361
+ },
2362
+ {
2363
+ "name": "withdraw_yt",
2364
+ "docs": [
2365
+ "Withdraw YT into personal account owned by vault"
2366
+ ],
2367
+ "type": {
2368
+ "vec": {
2369
+ "defined": {
2370
+ "name": "CpiInterfaceContext"
2371
+ }
2372
+ }
2373
+ }
2374
+ },
2375
+ {
2376
+ "name": "strip_sy",
2377
+ "docs": [
2378
+ "Strip sy"
2379
+ ],
2380
+ "type": {
2381
+ "vec": {
2382
+ "defined": {
2383
+ "name": "CpiInterfaceContext"
2384
+ }
2385
+ }
2386
+ }
2387
+ },
2388
+ {
2389
+ "name": "merge_sy",
2390
+ "docs": [
2391
+ "Merge sy"
2392
+ ],
2393
+ "type": {
2394
+ "vec": {
2395
+ "defined": {
2396
+ "name": "CpiInterfaceContext"
2397
+ }
2398
+ }
2399
+ }
2400
+ },
2401
+ {
2402
+ "name": "collect_interest",
2403
+ "docs": [
2404
+ "Collect interst sy"
2405
+ ],
2406
+ "type": {
2407
+ "vec": {
2408
+ "defined": {
2409
+ "name": "CpiInterfaceContext"
2410
+ }
2411
+ }
2412
+ }
2413
+ }
2414
+ ]
2415
+ }
2416
+ },
2417
+ {
2418
+ "name": "FilledOffersEvent",
2419
+ "type": {
2420
+ "kind": "struct",
2421
+ "fields": [
2422
+ {
2423
+ "name": "filled_amount",
2424
+ "type": "u64"
2425
+ },
2426
+ {
2427
+ "name": "offer_idx",
2428
+ "type": "u32"
2429
+ },
2430
+ {
2431
+ "name": "taken_amount",
2432
+ "type": "u64"
2433
+ },
2434
+ {
2435
+ "name": "amount_base",
2436
+ "type": "u64"
2437
+ },
2438
+ {
2439
+ "name": "taker_fee_amount",
2440
+ "type": "u64"
2441
+ },
2442
+ {
2443
+ "name": "maker_fee_amount",
2444
+ "type": "u64"
2445
+ }
2446
+ ]
2447
+ }
2448
+ },
2449
+ {
2450
+ "name": "MarketOfferEvent",
2451
+ "type": {
2452
+ "kind": "struct",
2453
+ "fields": [
2454
+ {
2455
+ "name": "user_address",
2456
+ "type": "pubkey"
2457
+ },
2458
+ {
2459
+ "name": "orderbook_address",
2460
+ "type": "pubkey"
2461
+ },
2462
+ {
2463
+ "name": "vault_address",
2464
+ "type": "pubkey"
2465
+ },
2466
+ {
2467
+ "name": "max_price_implied_apy",
2468
+ "type": "u32"
2469
+ },
2470
+ {
2471
+ "name": "amount",
2472
+ "type": "u64"
2473
+ },
2474
+ {
2475
+ "name": "amount_out",
2476
+ "type": "u64"
2477
+ },
2478
+ {
2479
+ "name": "filled_offers",
2480
+ "type": {
2481
+ "vec": {
2482
+ "defined": {
2483
+ "name": "FilledOffersEvent"
2484
+ }
2485
+ }
2486
+ }
2487
+ },
2488
+ {
2489
+ "name": "min_amount_out",
2490
+ "type": "u64"
2491
+ },
2492
+ {
2493
+ "name": "order_type_flag",
2494
+ "type": "u8"
2495
+ },
2496
+ {
2497
+ "name": "virtual_offer",
2498
+ "type": "bool"
2499
+ },
2500
+ {
2501
+ "name": "strip_amount",
2502
+ "type": "u64"
2503
+ },
2504
+ {
2505
+ "name": "merge_amount",
2506
+ "type": "u64"
2507
+ },
2508
+ {
2509
+ "name": "last_offer_price",
2510
+ "type": "u32"
2511
+ },
2512
+ {
2513
+ "name": "sy_exchange_rate",
2514
+ "type": {
2515
+ "defined": {
2516
+ "name": "Number"
2517
+ }
2518
+ }
2519
+ }
2520
+ ]
2521
+ }
2522
+ },
2523
+ {
2524
+ "name": "MergeEvent",
2525
+ "type": {
2526
+ "kind": "struct",
2527
+ "fields": [
2528
+ {
2529
+ "name": "owner",
2530
+ "type": "pubkey"
2531
+ },
2532
+ {
2533
+ "name": "vault",
2534
+ "type": "pubkey"
2535
+ },
2536
+ {
2537
+ "name": "sy_dst",
2538
+ "type": "pubkey"
2539
+ },
2540
+ {
2541
+ "name": "escrow_sy",
2542
+ "type": "pubkey"
2543
+ },
2544
+ {
2545
+ "name": "yt_src",
2546
+ "type": "pubkey"
2547
+ },
2548
+ {
2549
+ "name": "pt_src",
2550
+ "type": "pubkey"
2551
+ },
2552
+ {
2553
+ "name": "mint_yt",
2554
+ "type": "pubkey"
2555
+ },
2556
+ {
2557
+ "name": "mint_pt",
2558
+ "type": "pubkey"
2559
+ },
2560
+ {
2561
+ "name": "yield_position",
2562
+ "type": "pubkey"
2563
+ },
2564
+ {
2565
+ "name": "amount_py_in",
2566
+ "type": "u64"
2567
+ },
2568
+ {
2569
+ "name": "amount_sy_out",
2570
+ "type": "u64"
2571
+ },
2572
+ {
2573
+ "name": "sy_exchange_rate",
2574
+ "type": {
2575
+ "defined": {
2576
+ "name": "Number"
2577
+ }
2578
+ }
2579
+ },
2580
+ {
2581
+ "name": "pt_redemption_rate",
2582
+ "type": {
2583
+ "defined": {
2584
+ "name": "Number"
2585
+ }
2586
+ }
2587
+ },
2588
+ {
2589
+ "name": "total_sy_in_escrow",
2590
+ "type": "u64"
2591
+ },
2592
+ {
2593
+ "name": "pt_supply",
2594
+ "type": "u64"
2595
+ },
2596
+ {
2597
+ "name": "yt_balance",
2598
+ "type": "u64"
2599
+ },
2600
+ {
2601
+ "name": "sy_for_pt",
2602
+ "type": "u64"
2603
+ },
2604
+ {
2605
+ "name": "is_vault_active",
2606
+ "type": "bool"
2607
+ },
2608
+ {
2609
+ "name": "unix_timestamp",
2610
+ "type": "i64"
2611
+ }
2612
+ ]
2613
+ }
2614
+ },
2615
+ {
2616
+ "name": "Number",
2617
+ "docs": [
2618
+ "High precision number, stored as 4 u64 words in little endian"
2619
+ ],
2620
+ "repr": {
2621
+ "kind": "c"
2622
+ },
2623
+ "type": {
2624
+ "kind": "struct",
2625
+ "fields": [
2626
+ {
2627
+ "array": [
2628
+ "u64",
2629
+ 4
2630
+ ]
2631
+ }
2632
+ ]
2633
+ }
2634
+ },
2635
+ {
2636
+ "name": "OfferOptions",
2637
+ "type": {
2638
+ "kind": "enum",
2639
+ "variants": [
2640
+ {
2641
+ "name": "FillOrKill",
2642
+ "fields": [
2643
+ "bool"
2644
+ ]
2645
+ }
2646
+ ]
2647
+ }
2648
+ },
2649
+ {
2650
+ "name": "OfferType",
2651
+ "repr": {
2652
+ "kind": "rust"
2653
+ },
2654
+ "type": {
2655
+ "kind": "enum",
2656
+ "variants": [
2657
+ {
2658
+ "name": "SellYt"
2659
+ },
2660
+ {
2661
+ "name": "BuyYt"
2662
+ }
2663
+ ]
2664
+ }
2665
+ },
2666
+ {
2667
+ "name": "OrderbookInitEvent",
2668
+ "type": {
2669
+ "kind": "struct",
2670
+ "fields": [
2671
+ {
2672
+ "name": "orderbook_address",
2673
+ "type": "pubkey"
2674
+ },
2675
+ {
2676
+ "name": "vault_address",
2677
+ "type": "pubkey"
2678
+ },
2679
+ {
2680
+ "name": "admin_address",
2681
+ "type": "pubkey"
2682
+ },
2683
+ {
2684
+ "name": "seed_id",
2685
+ "type": "u32"
2686
+ },
2687
+ {
2688
+ "name": "price_decimals",
2689
+ "type": "u8"
2690
+ },
2691
+ {
2692
+ "name": "threshold_amount",
2693
+ "type": "u64"
2694
+ },
2695
+ {
2696
+ "name": "ln_maker_fee_rate",
2697
+ "type": "f64"
2698
+ },
2699
+ {
2700
+ "name": "ln_taker_fee_rate",
2701
+ "type": "f64"
2702
+ }
2703
+ ]
2704
+ }
2705
+ },
2706
+ {
2707
+ "name": "PostOfferEvent",
2708
+ "type": {
2709
+ "kind": "struct",
2710
+ "fields": [
2711
+ {
2712
+ "name": "user_address",
2713
+ "type": "pubkey"
2714
+ },
2715
+ {
2716
+ "name": "orderbook_address",
2717
+ "type": "pubkey"
2718
+ },
2719
+ {
2720
+ "name": "vault_address",
2721
+ "type": "pubkey"
2722
+ },
2723
+ {
2724
+ "name": "price_implied_apy",
2725
+ "type": "u32"
2726
+ },
2727
+ {
2728
+ "name": "amount_in",
2729
+ "type": "u64"
2730
+ },
2731
+ {
2732
+ "name": "order_type_flag",
2733
+ "type": "u8"
2734
+ },
2735
+ {
2736
+ "name": "virtual_offer",
2737
+ "type": "bool"
2738
+ },
2739
+ {
2740
+ "name": "expiry_seconds",
2741
+ "type": "u32"
2742
+ },
2743
+ {
2744
+ "name": "options",
2745
+ "type": {
2746
+ "defined": {
2747
+ "name": "OfferOptions"
2748
+ }
2749
+ }
2750
+ },
2751
+ {
2752
+ "name": "amount_stripped",
2753
+ "type": "u64"
2754
+ },
2755
+ {
2756
+ "name": "amount_merged",
2757
+ "type": "u64"
2758
+ },
2759
+ {
2760
+ "name": "amount_out",
2761
+ "type": "u64"
2762
+ },
2763
+ {
2764
+ "name": "offer_idx",
2765
+ "type": {
2766
+ "option": "u32"
2767
+ }
2768
+ },
2769
+ {
2770
+ "name": "filled_offers",
2771
+ "type": {
2772
+ "vec": {
2773
+ "defined": {
2774
+ "name": "FilledOffersEvent"
2775
+ }
2776
+ }
2777
+ }
2778
+ },
2779
+ {
2780
+ "name": "last_offer_price",
2781
+ "type": "u32"
2782
+ },
2783
+ {
2784
+ "name": "sy_exchange_rate",
2785
+ "type": {
2786
+ "defined": {
2787
+ "name": "Number"
2788
+ }
2789
+ }
2790
+ }
2791
+ ]
2792
+ }
2793
+ },
2794
+ {
2795
+ "name": "RemoveOfferEvent",
2796
+ "type": {
2797
+ "kind": "struct",
2798
+ "fields": [
2799
+ {
2800
+ "name": "user_address",
2801
+ "type": "pubkey"
2802
+ },
2803
+ {
2804
+ "name": "orderbook_address",
2805
+ "type": "pubkey"
2806
+ },
2807
+ {
2808
+ "name": "sy_dst",
2809
+ "type": "pubkey"
2810
+ },
2811
+ {
2812
+ "name": "yt_dst",
2813
+ "type": "pubkey"
2814
+ },
2815
+ {
2816
+ "name": "pt_dst",
2817
+ "type": "pubkey"
2818
+ },
2819
+ {
2820
+ "name": "order_type_flag",
2821
+ "type": "u8"
2822
+ },
2823
+ {
2824
+ "name": "amount_out",
2825
+ "type": "u64"
2826
+ },
2827
+ {
2828
+ "name": "offer_idx",
2829
+ "type": "u32"
2830
+ }
2831
+ ]
2832
+ }
2833
+ },
2834
+ {
2835
+ "name": "SetConfigurationOptionsEnum",
2836
+ "type": {
2837
+ "kind": "enum",
2838
+ "variants": [
2839
+ {
2840
+ "name": "ThresholdAmount",
2841
+ "fields": [
2842
+ "u64"
2843
+ ]
2844
+ },
2845
+ {
2846
+ "name": "PriceDecimals",
2847
+ "fields": [
2848
+ "u8"
2849
+ ]
2850
+ },
2851
+ {
2852
+ "name": "TakerFeeRateBp",
2853
+ "fields": [
2854
+ "f64"
2855
+ ]
2856
+ },
2857
+ {
2858
+ "name": "MakerFeeRateBp",
2859
+ "fields": [
2860
+ "f64"
2861
+ ]
2862
+ }
2863
+ ]
2864
+ }
2865
+ },
2866
+ {
2867
+ "name": "StripEvent",
2868
+ "type": {
2869
+ "kind": "struct",
2870
+ "fields": [
2871
+ {
2872
+ "name": "depositor",
2873
+ "type": "pubkey"
2874
+ },
2875
+ {
2876
+ "name": "vault",
2877
+ "type": "pubkey"
2878
+ },
2879
+ {
2880
+ "name": "authority",
2881
+ "type": "pubkey"
2882
+ },
2883
+ {
2884
+ "name": "sy_src",
2885
+ "type": "pubkey"
2886
+ },
2887
+ {
2888
+ "name": "escrow_sy",
2889
+ "type": "pubkey"
2890
+ },
2891
+ {
2892
+ "name": "yt_dst",
2893
+ "type": "pubkey"
2894
+ },
2895
+ {
2896
+ "name": "pt_dst",
2897
+ "type": "pubkey"
2898
+ },
2899
+ {
2900
+ "name": "mint_yt",
2901
+ "type": "pubkey"
2902
+ },
2903
+ {
2904
+ "name": "mint_pt",
2905
+ "type": "pubkey"
2906
+ },
2907
+ {
2908
+ "name": "yield_position",
2909
+ "type": "pubkey"
2910
+ },
2911
+ {
2912
+ "name": "amount_sy_in",
2913
+ "type": "u64"
2914
+ },
2915
+ {
2916
+ "name": "amount_py_out",
2917
+ "type": "u64"
2918
+ },
2919
+ {
2920
+ "name": "sy_exchange_rate",
2921
+ "type": {
2922
+ "defined": {
2923
+ "name": "Number"
2924
+ }
2925
+ }
2926
+ },
2927
+ {
2928
+ "name": "total_sy_in_escrow",
2929
+ "type": "u64"
2930
+ },
2931
+ {
2932
+ "name": "pt_supply",
2933
+ "type": "u64"
2934
+ },
2935
+ {
2936
+ "name": "yt_balance",
2937
+ "type": "u64"
2938
+ },
2939
+ {
2940
+ "name": "all_time_high_sy_exchange_rate",
2941
+ "type": {
2942
+ "defined": {
2943
+ "name": "Number"
2944
+ }
2945
+ }
2946
+ },
2947
+ {
2948
+ "name": "sy_for_pt",
2949
+ "type": "u64"
2950
+ },
2951
+ {
2952
+ "name": "unix_timestamp",
2953
+ "type": "i64"
2954
+ }
2955
+ ]
2956
+ }
2957
+ },
2958
+ {
2959
+ "name": "Vault",
2960
+ "type": {
2961
+ "kind": "struct",
2962
+ "fields": [
2963
+ {
2964
+ "name": "sy_program",
2965
+ "docs": [
2966
+ "Link to SY program"
2967
+ ],
2968
+ "type": "pubkey"
2969
+ },
2970
+ {
2971
+ "name": "mint_sy",
2972
+ "docs": [
2973
+ "Mint for SY token"
2974
+ ],
2975
+ "type": "pubkey"
2976
+ },
2977
+ {
2978
+ "name": "mint_yt",
2979
+ "docs": [
2980
+ "Mint for the vault-specific YT token"
2981
+ ],
2982
+ "type": "pubkey"
2983
+ },
2984
+ {
2985
+ "name": "mint_pt",
2986
+ "docs": [
2987
+ "Mint for the vault-specific PT token"
2988
+ ],
2989
+ "type": "pubkey"
2990
+ },
2991
+ {
2992
+ "name": "escrow_yt",
2993
+ "docs": [
2994
+ "Escrow account for holding deposited YT"
2995
+ ],
2996
+ "type": "pubkey"
2997
+ },
2998
+ {
2999
+ "name": "escrow_sy",
3000
+ "docs": [
3001
+ "Escrow account that holds temporary SY tokens",
3002
+ "As an interchange between users and the SY program"
3003
+ ],
3004
+ "type": "pubkey"
3005
+ },
3006
+ {
3007
+ "name": "yield_position",
3008
+ "docs": [
3009
+ "Link to a vault-owned YT position",
3010
+ "This account collects yield from all \"unstaked\" YT"
3011
+ ],
3012
+ "type": "pubkey"
3013
+ },
3014
+ {
3015
+ "name": "address_lookup_table",
3016
+ "docs": [
3017
+ "Address lookup table key for vault"
3018
+ ],
3019
+ "type": "pubkey"
3020
+ },
3021
+ {
3022
+ "name": "start_ts",
3023
+ "docs": [
3024
+ "start timestamp"
3025
+ ],
3026
+ "type": "u32"
3027
+ },
3028
+ {
3029
+ "name": "duration",
3030
+ "docs": [
3031
+ "seconds duration"
3032
+ ],
3033
+ "type": "u32"
3034
+ },
3035
+ {
3036
+ "name": "signer_seed",
3037
+ "docs": [
3038
+ "Seed for CPI signing"
3039
+ ],
3040
+ "type": "pubkey"
3041
+ },
3042
+ {
3043
+ "name": "authority",
3044
+ "docs": [
3045
+ "Authority for CPI signing"
3046
+ ],
3047
+ "type": "pubkey"
3048
+ },
3049
+ {
3050
+ "name": "signer_bump",
3051
+ "docs": [
3052
+ "bump for signer authority PDA"
3053
+ ],
3054
+ "type": {
3055
+ "array": [
3056
+ "u8",
3057
+ 1
3058
+ ]
3059
+ }
3060
+ },
3061
+ {
3062
+ "name": "last_seen_sy_exchange_rate",
3063
+ "docs": [
3064
+ "Last seen SY exchange rate",
3065
+ "This continues to be updated even after vault maturity to track SY appreciation for treasury collection"
3066
+ ],
3067
+ "type": {
3068
+ "defined": {
3069
+ "name": "Number"
3070
+ }
3071
+ }
3072
+ },
3073
+ {
3074
+ "name": "all_time_high_sy_exchange_rate",
3075
+ "docs": [
3076
+ "This is the all time high exchange rate for SY"
3077
+ ],
3078
+ "type": {
3079
+ "defined": {
3080
+ "name": "Number"
3081
+ }
3082
+ }
3083
+ },
3084
+ {
3085
+ "name": "final_sy_exchange_rate",
3086
+ "docs": [
3087
+ "This is the exchange rate for SY when the vault expires"
3088
+ ],
3089
+ "type": {
3090
+ "defined": {
3091
+ "name": "Number"
3092
+ }
3093
+ }
3094
+ },
3095
+ {
3096
+ "name": "total_sy_in_escrow",
3097
+ "docs": [
3098
+ "How much SY is held in escrow"
3099
+ ],
3100
+ "type": "u64"
3101
+ },
3102
+ {
3103
+ "name": "sy_for_pt",
3104
+ "docs": [
3105
+ "The total SY set aside to back the PT holders",
3106
+ "This value is updated on every operation that touches the PT supply or the last seen exchange rate"
3107
+ ],
3108
+ "type": "u64"
3109
+ },
3110
+ {
3111
+ "name": "pt_supply",
3112
+ "docs": [
3113
+ "Total supply of PT"
3114
+ ],
3115
+ "type": "u64"
3116
+ },
3117
+ {
3118
+ "name": "treasury_sy",
3119
+ "docs": [
3120
+ "Amount of SY staged for the treasury"
3121
+ ],
3122
+ "type": "u64"
3123
+ },
3124
+ {
3125
+ "name": "uncollected_sy",
3126
+ "docs": [
3127
+ "SY that has been earned by YT, but not yet collected"
3128
+ ],
3129
+ "type": "u64"
3130
+ },
3131
+ {
3132
+ "name": "treasury_sy_token_account",
3133
+ "type": "pubkey"
3134
+ },
3135
+ {
3136
+ "name": "interest_bps_fee",
3137
+ "type": "u16"
3138
+ },
3139
+ {
3140
+ "name": "min_op_size_strip",
3141
+ "type": "u64"
3142
+ },
3143
+ {
3144
+ "name": "min_op_size_merge",
3145
+ "type": "u64"
3146
+ },
3147
+ {
3148
+ "name": "status",
3149
+ "type": "u8"
3150
+ },
3151
+ {
3152
+ "name": "emissions",
3153
+ "type": {
3154
+ "vec": {
3155
+ "defined": {
3156
+ "name": "EmissionInfo"
3157
+ }
3158
+ }
3159
+ }
3160
+ },
3161
+ {
3162
+ "name": "cpi_accounts",
3163
+ "type": {
3164
+ "defined": {
3165
+ "name": "CpiAccounts"
3166
+ }
3167
+ }
3168
+ },
3169
+ {
3170
+ "name": "claim_limits",
3171
+ "type": {
3172
+ "defined": {
3173
+ "name": "ClaimLimits"
3174
+ }
3175
+ }
3176
+ },
3177
+ {
3178
+ "name": "max_py_supply",
3179
+ "type": "u64"
3180
+ }
3181
+ ]
3182
+ }
3183
+ },
3184
+ {
3185
+ "name": "WithdrawFundsEvent",
3186
+ "type": {
3187
+ "kind": "struct",
3188
+ "fields": [
3189
+ {
3190
+ "name": "user_address",
3191
+ "type": "pubkey"
3192
+ },
3193
+ {
3194
+ "name": "orderbook_address",
3195
+ "type": "pubkey"
3196
+ },
3197
+ {
3198
+ "name": "sy_dst",
3199
+ "type": "pubkey"
3200
+ },
3201
+ {
3202
+ "name": "pt_dst",
3203
+ "type": "pubkey"
3204
+ },
3205
+ {
3206
+ "name": "yt_dst",
3207
+ "type": "pubkey"
3208
+ },
3209
+ {
3210
+ "name": "amount_sy_out",
3211
+ "type": "u64"
3212
+ },
3213
+ {
3214
+ "name": "amount_pt_out",
3215
+ "type": "u64"
3216
+ },
3217
+ {
3218
+ "name": "amount_yt_out",
3219
+ "type": "u64"
3220
+ }
3221
+ ]
3222
+ }
3223
+ },
3224
+ {
3225
+ "name": "WrapperCollectAdminFeeEvent",
3226
+ "type": {
3227
+ "kind": "struct",
3228
+ "fields": [
3229
+ {
3230
+ "name": "sy_amount",
3231
+ "type": "u64"
3232
+ },
3233
+ {
3234
+ "name": "pt_amount",
3235
+ "type": "u64"
3236
+ },
3237
+ {
3238
+ "name": "yt_amount",
3239
+ "type": "u64"
3240
+ }
3241
+ ]
3242
+ }
3243
+ },
3244
+ {
3245
+ "name": "WrapperCollectInterestEvent",
3246
+ "type": {
3247
+ "kind": "struct",
3248
+ "fields": [
3249
+ {
3250
+ "name": "user_address",
3251
+ "type": "pubkey"
3252
+ },
3253
+ {
3254
+ "name": "collected_interest",
3255
+ "type": "u64"
3256
+ }
3257
+ ]
3258
+ }
3259
+ },
3260
+ {
3261
+ "name": "WrapperMarketOfferEvent",
3262
+ "type": {
3263
+ "kind": "struct",
3264
+ "fields": [
3265
+ {
3266
+ "name": "trader",
3267
+ "type": "pubkey"
3268
+ },
3269
+ {
3270
+ "name": "deposit_amount",
3271
+ "type": "u64"
3272
+ },
3273
+ {
3274
+ "name": "base_in_amount",
3275
+ "type": "u64"
3276
+ }
3277
+ ]
3278
+ }
3279
+ },
3280
+ {
3281
+ "name": "WrapperPostOfferEvent",
3282
+ "type": {
3283
+ "kind": "struct",
3284
+ "fields": [
3285
+ {
3286
+ "name": "user_address",
3287
+ "type": "pubkey"
3288
+ },
3289
+ {
3290
+ "name": "orderbook_address",
3291
+ "type": "pubkey"
3292
+ },
3293
+ {
3294
+ "name": "vault_address",
3295
+ "type": "pubkey"
3296
+ },
3297
+ {
3298
+ "name": "sy_src",
3299
+ "type": "pubkey"
3300
+ },
3301
+ {
3302
+ "name": "yt_src",
3303
+ "type": "pubkey"
3304
+ },
3305
+ {
3306
+ "name": "pt_src",
3307
+ "type": "pubkey"
3308
+ },
3309
+ {
3310
+ "name": "amount_deposit",
3311
+ "type": "u64"
3312
+ },
3313
+ {
3314
+ "name": "amount_base_in",
3315
+ "type": "u64"
3316
+ }
3317
+ ]
3318
+ }
3319
+ },
3320
+ {
3321
+ "name": "WrapperRemoveOfferEvent",
3322
+ "type": {
3323
+ "kind": "struct",
3324
+ "fields": [
3325
+ {
3326
+ "name": "trader",
3327
+ "type": "pubkey"
3328
+ },
3329
+ {
3330
+ "name": "withdraw_amount",
3331
+ "type": "u64"
3332
+ }
3333
+ ]
3334
+ }
3335
+ },
3336
+ {
3337
+ "name": "WrapperWithdrawFundsEvent",
3338
+ "type": {
3339
+ "kind": "struct",
3340
+ "fields": [
3341
+ {
3342
+ "name": "trader",
3343
+ "type": "pubkey"
3344
+ },
3345
+ {
3346
+ "name": "orderbook",
3347
+ "type": "pubkey"
3348
+ },
3349
+ {
3350
+ "name": "amount_pt_out",
3351
+ "type": "u64"
3352
+ },
3353
+ {
3354
+ "name": "amount_yt_out",
3355
+ "type": "u64"
3356
+ },
3357
+ {
3358
+ "name": "amount_sy_out",
3359
+ "type": "u64"
3360
+ }
3361
+ ]
3362
+ }
3363
+ },
3364
+ {
3365
+ "name": "YieldTokenTracker",
3366
+ "docs": [
3367
+ "Copy core program type",
3368
+ "Generic tracker for interest and emissions earned by YT deposits"
3369
+ ],
3370
+ "type": {
3371
+ "kind": "struct",
3372
+ "fields": [
3373
+ {
3374
+ "name": "last_seen_index",
3375
+ "docs": [
3376
+ "The index is the per-share value of the SY token",
3377
+ "Note that the YT balance must be converted to the equivalent SY balance"
3378
+ ],
3379
+ "type": {
3380
+ "defined": {
3381
+ "name": "Number"
3382
+ }
3383
+ }
3384
+ },
3385
+ {
3386
+ "name": "staged",
3387
+ "docs": [
3388
+ "Staged tokens that may be withdrawn"
3389
+ ],
3390
+ "type": "u64"
3391
+ }
3392
+ ]
3393
+ }
3394
+ }
3395
+ ]
3396
+ }