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