@wireio/stake 0.3.1 → 0.4.1

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.
Files changed (36) hide show
  1. package/lib/stake.browser.js +12887 -10017
  2. package/lib/stake.browser.js.map +1 -1
  3. package/lib/stake.d.ts +3305 -1364
  4. package/lib/stake.js +16298 -13436
  5. package/lib/stake.js.map +1 -1
  6. package/lib/stake.m.js +12887 -10017
  7. package/lib/stake.m.js.map +1 -1
  8. package/package.json +3 -1
  9. package/src/assets/solana/idl/liqsol_core.json +2327 -887
  10. package/src/assets/solana/idl/liqsol_token.json +1 -1
  11. package/src/assets/solana/idl/transfer_hook.json +192 -0
  12. package/src/assets/solana/idl/validator_leaderboard.json +147 -4
  13. package/src/assets/solana/types/liqsol_core.ts +2327 -887
  14. package/src/assets/solana/types/liqsol_token.ts +1 -1
  15. package/src/assets/solana/types/transfer_hook.ts +198 -0
  16. package/src/assets/solana/types/validator_leaderboard.ts +147 -4
  17. package/src/networks/ethereum/clients/{deposit.client.ts → convert.client.ts} +36 -4
  18. package/src/networks/ethereum/clients/opp.client.ts +390 -0
  19. package/src/networks/ethereum/clients/pretoken.client.ts +88 -49
  20. package/src/networks/ethereum/clients/receipt.client.ts +129 -0
  21. package/src/networks/ethereum/clients/stake.client.ts +1 -148
  22. package/src/networks/ethereum/contract.ts +7 -4
  23. package/src/networks/ethereum/ethereum.ts +44 -70
  24. package/src/networks/ethereum/types.ts +1 -0
  25. package/src/networks/ethereum/utils.ts +1 -1
  26. package/src/networks/solana/clients/deposit.client.ts +154 -8
  27. package/src/networks/solana/clients/distribution.client.ts +72 -291
  28. package/src/networks/solana/clients/leaderboard.client.ts +59 -14
  29. package/src/networks/solana/clients/outpost.client.ts +188 -359
  30. package/src/networks/solana/clients/token.client.ts +85 -100
  31. package/src/networks/solana/constants.ts +155 -64
  32. package/src/networks/solana/solana.ts +273 -154
  33. package/src/networks/solana/types.ts +532 -71
  34. package/src/networks/solana/utils.ts +68 -51
  35. package/src/types.ts +161 -17
  36. package/src/networks/ethereum/clients/liq.client.ts +0 -47
@@ -1,5 +1,5 @@
1
1
  {
2
- "address": "BBkVcNWNQz1vZ6esv5US4QnNFWPRqxWbdpJHur9GVXSu",
2
+ "address": "2qSsCXBYUSwF7zrzTT9jFpRpCmWoDpEyHr9exfCMq56P",
3
3
  "metadata": {
4
4
  "name": "liqsol_core",
5
5
  "version": "0.1.0",
@@ -12,7 +12,8 @@
12
12
  "docs": [
13
13
  "Accumulate unstake requests to be processed in next allocation cycle",
14
14
  "Multiple requests can be accumulated before calculating allocations",
15
- "Returns the target epoch when this unstake request will be processed"
15
+ "Returns the target epoch when this unstake request will be processed",
16
+ "We should not be able to"
16
17
  ],
17
18
  "discriminator": [
18
19
  24,
@@ -61,10 +62,56 @@
61
62
  ],
62
63
  "returns": "u64"
63
64
  },
65
+ {
66
+ "name": "add_top_performers_batch",
67
+ "docs": [
68
+ "Process batch of ranks for addition (top performers from leaderboard)"
69
+ ],
70
+ "discriminator": [
71
+ 152,
72
+ 7,
73
+ 241,
74
+ 69,
75
+ 197,
76
+ 73,
77
+ 32,
78
+ 12
79
+ ],
80
+ "accounts": [
81
+ {
82
+ "name": "allocation_state",
83
+ "writable": true
84
+ },
85
+ {
86
+ "name": "active_list",
87
+ "writable": true
88
+ },
89
+ {
90
+ "name": "graveyard_list",
91
+ "writable": true
92
+ },
93
+ {
94
+ "name": "leaderboard_state"
95
+ },
96
+ {
97
+ "name": "maintenance_ledger",
98
+ "writable": true
99
+ },
100
+ {
101
+ "name": "processing_state",
102
+ "writable": true
103
+ },
104
+ {
105
+ "name": "authority",
106
+ "signer": true
107
+ }
108
+ ],
109
+ "args": []
110
+ },
64
111
  {
65
112
  "name": "add_validator_v2",
66
113
  "docs": [
67
- "Add a new validator"
114
+ "Add a new validator bbypassing the looking at leaderboard and getting validators form there"
68
115
  ],
69
116
  "discriminator": [
70
117
  217,
@@ -145,6 +192,13 @@
145
192
  240
146
193
  ],
147
194
  "accounts": [
195
+ {
196
+ "name": "authority",
197
+ "docs": [
198
+ "Authority that can update serviceable epoch"
199
+ ],
200
+ "signer": true
201
+ },
148
202
  {
149
203
  "name": "global",
150
204
  "writable": true
@@ -188,10 +242,6 @@
188
242
  "name": "epoch_state",
189
243
  "writable": true
190
244
  },
191
- {
192
- "name": "payout_state",
193
- "writable": true
194
- },
195
245
  {
196
246
  "name": "processing_state",
197
247
  "writable": true
@@ -239,6 +289,43 @@
239
289
  }
240
290
  ]
241
291
  },
292
+ {
293
+ "name": "bond_role",
294
+ "discriminator": [
295
+ 143,
296
+ 136,
297
+ 20,
298
+ 230,
299
+ 136,
300
+ 103,
301
+ 107,
302
+ 167
303
+ ],
304
+ "accounts": [
305
+ {
306
+ "name": "user",
307
+ "writable": true,
308
+ "signer": true
309
+ },
310
+ {
311
+ "name": "global_state"
312
+ },
313
+ {
314
+ "name": "outpost_account",
315
+ "writable": true
316
+ }
317
+ ],
318
+ "args": [
319
+ {
320
+ "name": "role",
321
+ "type": {
322
+ "defined": {
323
+ "name": "Role"
324
+ }
325
+ }
326
+ }
327
+ ]
328
+ },
242
329
  {
243
330
  "name": "calculate_unstake_allocations",
244
331
  "docs": [
@@ -344,18 +431,77 @@
344
431
  },
345
432
  {
346
433
  "name": "clock"
434
+ },
435
+ {
436
+ "name": "global",
437
+ "docs": [
438
+ "Global withdraw operator state - to read total_encumbered_funds"
439
+ ]
347
440
  }
348
441
  ],
349
- "args": [
442
+ "args": []
443
+ },
444
+ {
445
+ "name": "claim_rewards",
446
+ "discriminator": [
447
+ 4,
448
+ 144,
449
+ 132,
450
+ 71,
451
+ 116,
452
+ 23,
453
+ 151,
454
+ 80
455
+ ],
456
+ "accounts": [
350
457
  {
351
- "name": "encumbered_funds",
352
- "type": "u64"
458
+ "name": "user",
459
+ "writable": true,
460
+ "signer": true
353
461
  },
354
462
  {
355
- "name": "validators_count",
356
- "type": "u8"
463
+ "name": "user_ata",
464
+ "writable": true
465
+ },
466
+ {
467
+ "name": "user_record",
468
+ "writable": true
469
+ },
470
+ {
471
+ "name": "bucket_user_record",
472
+ "writable": true
473
+ },
474
+ {
475
+ "name": "distribution_state",
476
+ "writable": true
477
+ },
478
+ {
479
+ "name": "extra_account_meta_list"
480
+ },
481
+ {
482
+ "name": "liqsol_core_program"
483
+ },
484
+ {
485
+ "name": "transfer_hook_program"
486
+ },
487
+ {
488
+ "name": "liqsol_mint"
489
+ },
490
+ {
491
+ "name": "bucket_authority"
492
+ },
493
+ {
494
+ "name": "bucket_token_account",
495
+ "docs": [
496
+ "The bucket's associated token account holding liqSOL"
497
+ ],
498
+ "writable": true
499
+ },
500
+ {
501
+ "name": "token_program"
357
502
  }
358
- ]
503
+ ],
504
+ "args": []
359
505
  },
360
506
  {
361
507
  "name": "claim_withdraw",
@@ -400,9 +546,25 @@
400
546
  "name": "owner_ata",
401
547
  "writable": true
402
548
  },
549
+ {
550
+ "name": "reserve_pool",
551
+ "writable": true
552
+ },
553
+ {
554
+ "name": "vault"
555
+ },
556
+ {
557
+ "name": "clock"
558
+ },
559
+ {
560
+ "name": "stake_history"
561
+ },
403
562
  {
404
563
  "name": "token_program"
405
564
  },
565
+ {
566
+ "name": "stake_program"
567
+ },
406
568
  {
407
569
  "name": "system_program"
408
570
  },
@@ -413,96 +575,340 @@
413
575
  "args": []
414
576
  },
415
577
  {
416
- "name": "cleanup_from_graveyard",
578
+ "name": "cleanup_graveyard_batch",
417
579
  "docs": [
418
- "Cleanup a validator from graveyard after cooldown expires, get him outta here//"
580
+ "Cleanup graveyard validators batch: remove validators that have been NotDelegated for > 10 epochs",
581
+ "This function should be called after aggregate_stake_metrics.",
582
+ "Validators meeting the cleanup criteria will have their PDAs closed and rent returned to admin."
419
583
  ],
420
584
  "discriminator": [
421
- 154,
422
- 168,
423
- 171,
424
- 22,
425
- 38,
426
- 14,
427
- 26,
428
- 229
585
+ 241,
586
+ 120,
587
+ 180,
588
+ 4,
589
+ 160,
590
+ 109,
591
+ 206,
592
+ 71
429
593
  ],
430
594
  "accounts": [
431
595
  {
432
- "name": "authority",
433
- "writable": true,
434
- "signer": true
596
+ "name": "graveyard_list",
597
+ "writable": true
435
598
  },
436
599
  {
437
- "name": "graveyard_list",
438
- "docs": [
439
- "Graveyard list - will remove from here"
440
- ],
600
+ "name": "maintenance_ledger",
441
601
  "writable": true
442
602
  },
443
603
  {
444
- "name": "validator_info",
445
- "docs": [
446
- "Validator info - check cooldown, optionally close"
447
- ],
604
+ "name": "processing_state",
448
605
  "writable": true
449
606
  },
450
607
  {
451
- "name": "validator_transient",
608
+ "name": "controller_state",
452
609
  "docs": [
453
- "Validator transient - close and refund rent"
454
- ],
455
- "writable": true
610
+ "Stake controller state - used to verify authority"
611
+ ]
456
612
  },
457
613
  {
458
- "name": "stake_allocation_state",
614
+ "name": "clock"
615
+ },
616
+ {
617
+ "name": "authority",
459
618
  "docs": [
460
- "Stake allocation state - DO NOT update (validator not going back to active list during cleanup)",
461
- "This is here for consistency but won't be used in cleanup_from_graveyard"
619
+ "Authority must match the stored authority in controller_state"
462
620
  ],
463
- "writable": true
621
+ "writable": true,
622
+ "signer": true
623
+ }
624
+ ],
625
+ "args": []
626
+ },
627
+ {
628
+ "name": "complete_unbond_role",
629
+ "discriminator": [
630
+ 204,
631
+ 50,
632
+ 36,
633
+ 17,
634
+ 192,
635
+ 156,
636
+ 246,
637
+ 64
638
+ ],
639
+ "accounts": [
640
+ {
641
+ "name": "admin",
642
+ "signer": true
464
643
  },
465
644
  {
466
- "name": "system_program"
645
+ "name": "global_state"
646
+ },
647
+ {
648
+ "name": "user",
649
+ "docs": [
650
+ "The user whose unbond is being completed"
651
+ ]
652
+ },
653
+ {
654
+ "name": "outpost_account",
655
+ "writable": true
467
656
  }
468
657
  ],
469
658
  "args": [
470
659
  {
471
- "name": "vote_account",
472
- "type": "pubkey"
660
+ "name": "role",
661
+ "type": {
662
+ "defined": {
663
+ "name": "Role"
664
+ }
665
+ }
473
666
  }
474
667
  ]
475
668
  },
476
669
  {
477
- "name": "deposit",
670
+ "name": "complete_withdraw",
478
671
  "discriminator": [
479
- 242,
480
- 35,
481
- 198,
482
- 137,
483
- 82,
484
- 225,
485
- 242,
486
- 182
672
+ 172,
673
+ 129,
674
+ 141,
675
+ 17,
676
+ 95,
677
+ 253,
678
+ 251,
679
+ 98
487
680
  ],
488
681
  "accounts": [
489
682
  {
490
- "name": "user",
491
- "writable": true,
683
+ "name": "admin",
492
684
  "signer": true
493
685
  },
494
686
  {
495
- "name": "deposit_authority",
687
+ "name": "global_state",
496
688
  "writable": true
497
689
  },
498
690
  {
499
- "name": "system_program"
691
+ "name": "distribution_state",
692
+ "writable": true
500
693
  },
501
694
  {
502
- "name": "token_program"
695
+ "name": "user"
503
696
  },
504
697
  {
505
- "name": "associated_token_program"
698
+ "name": "outpost_account",
699
+ "writable": true
700
+ },
701
+ {
702
+ "name": "liqsol_mint",
703
+ "writable": true
704
+ },
705
+ {
706
+ "name": "pool_authority"
707
+ },
708
+ {
709
+ "name": "bucket_authority"
710
+ },
711
+ {
712
+ "name": "bucket_token_account",
713
+ "writable": true
714
+ },
715
+ {
716
+ "name": "bucket_user_record",
717
+ "writable": true
718
+ },
719
+ {
720
+ "name": "sender_user_record",
721
+ "writable": true
722
+ },
723
+ {
724
+ "name": "receiver_user_record",
725
+ "writable": true
726
+ },
727
+ {
728
+ "name": "extra_account_meta_list"
729
+ },
730
+ {
731
+ "name": "liqsol_core_program"
732
+ },
733
+ {
734
+ "name": "transfer_hook_program"
735
+ },
736
+ {
737
+ "name": "liqsol_pool_ata",
738
+ "writable": true
739
+ },
740
+ {
741
+ "name": "user_ata",
742
+ "writable": true
743
+ },
744
+ {
745
+ "name": "token_program"
746
+ },
747
+ {
748
+ "name": "system_program"
749
+ }
750
+ ],
751
+ "args": [
752
+ {
753
+ "name": "user_key",
754
+ "type": "pubkey"
755
+ },
756
+ {
757
+ "name": "amount",
758
+ "type": "u64"
759
+ }
760
+ ]
761
+ },
762
+ {
763
+ "name": "conclude_merge_activating",
764
+ "docs": [
765
+ "Conclude merge activating - marks merge complete if all validators processed or 0 validators"
766
+ ],
767
+ "discriminator": [
768
+ 207,
769
+ 32,
770
+ 222,
771
+ 98,
772
+ 243,
773
+ 188,
774
+ 38,
775
+ 67
776
+ ],
777
+ "accounts": [
778
+ {
779
+ "name": "admin",
780
+ "signer": true
781
+ },
782
+ {
783
+ "name": "processing_state",
784
+ "writable": true
785
+ },
786
+ {
787
+ "name": "epoch_state",
788
+ "writable": true
789
+ },
790
+ {
791
+ "name": "active_list"
792
+ },
793
+ {
794
+ "name": "graveyard_list"
795
+ },
796
+ {
797
+ "name": "clock"
798
+ }
799
+ ],
800
+ "args": []
801
+ },
802
+ {
803
+ "name": "conclude_merge_deactivating",
804
+ "docs": [
805
+ "Conclude merge deactivating - marks merge complete if all validators processed or 0 validators"
806
+ ],
807
+ "discriminator": [
808
+ 66,
809
+ 206,
810
+ 43,
811
+ 71,
812
+ 122,
813
+ 97,
814
+ 33,
815
+ 24
816
+ ],
817
+ "accounts": [
818
+ {
819
+ "name": "admin",
820
+ "signer": true
821
+ },
822
+ {
823
+ "name": "processing_state",
824
+ "writable": true
825
+ },
826
+ {
827
+ "name": "epoch_state",
828
+ "writable": true
829
+ },
830
+ {
831
+ "name": "active_list"
832
+ },
833
+ {
834
+ "name": "graveyard_list"
835
+ },
836
+ {
837
+ "name": "clock"
838
+ }
839
+ ],
840
+ "args": []
841
+ },
842
+ {
843
+ "name": "conclude_sync_stakes",
844
+ "docs": [
845
+ "Conclude sync stakes - marks sync complete if all validators processed or 0 validators"
846
+ ],
847
+ "discriminator": [
848
+ 77,
849
+ 127,
850
+ 231,
851
+ 78,
852
+ 151,
853
+ 23,
854
+ 237,
855
+ 207
856
+ ],
857
+ "accounts": [
858
+ {
859
+ "name": "admin",
860
+ "signer": true
861
+ },
862
+ {
863
+ "name": "processing_state",
864
+ "writable": true
865
+ },
866
+ {
867
+ "name": "epoch_state",
868
+ "writable": true
869
+ },
870
+ {
871
+ "name": "active_list"
872
+ },
873
+ {
874
+ "name": "graveyard_list"
875
+ },
876
+ {
877
+ "name": "clock"
878
+ }
879
+ ],
880
+ "args": []
881
+ },
882
+ {
883
+ "name": "deposit",
884
+ "discriminator": [
885
+ 242,
886
+ 35,
887
+ 198,
888
+ 137,
889
+ 82,
890
+ 225,
891
+ 242,
892
+ 182
893
+ ],
894
+ "accounts": [
895
+ {
896
+ "name": "user",
897
+ "writable": true,
898
+ "signer": true
899
+ },
900
+ {
901
+ "name": "deposit_authority",
902
+ "writable": true
903
+ },
904
+ {
905
+ "name": "system_program"
906
+ },
907
+ {
908
+ "name": "token_program"
909
+ },
910
+ {
911
+ "name": "associated_token_program"
506
912
  },
507
913
  {
508
914
  "name": "liqsol_program"
@@ -571,17 +977,107 @@
571
977
  "name": "stake_history"
572
978
  },
573
979
  {
574
- "name": "rent"
980
+ "name": "rent"
981
+ }
982
+ ],
983
+ "args": [
984
+ {
985
+ "name": "amount",
986
+ "type": "u64"
987
+ },
988
+ {
989
+ "name": "seed",
990
+ "type": "u32"
991
+ }
992
+ ]
993
+ },
994
+ {
995
+ "name": "desynd",
996
+ "discriminator": [
997
+ 12,
998
+ 71,
999
+ 102,
1000
+ 46,
1001
+ 8,
1002
+ 179,
1003
+ 29,
1004
+ 190
1005
+ ],
1006
+ "accounts": [
1007
+ {
1008
+ "name": "user",
1009
+ "writable": true,
1010
+ "signer": true
1011
+ },
1012
+ {
1013
+ "name": "liqsol_mint",
1014
+ "writable": true
1015
+ },
1016
+ {
1017
+ "name": "global_state",
1018
+ "writable": true
1019
+ },
1020
+ {
1021
+ "name": "distribution_state",
1022
+ "writable": true
1023
+ },
1024
+ {
1025
+ "name": "user_ata",
1026
+ "writable": true
1027
+ },
1028
+ {
1029
+ "name": "pool_authority"
1030
+ },
1031
+ {
1032
+ "name": "bucket_authority"
1033
+ },
1034
+ {
1035
+ "name": "bucket_token_account",
1036
+ "writable": true
1037
+ },
1038
+ {
1039
+ "name": "bucket_user_record",
1040
+ "writable": true
1041
+ },
1042
+ {
1043
+ "name": "sender_user_record",
1044
+ "writable": true
1045
+ },
1046
+ {
1047
+ "name": "receiver_user_record",
1048
+ "writable": true
1049
+ },
1050
+ {
1051
+ "name": "extra_account_meta_list"
1052
+ },
1053
+ {
1054
+ "name": "liqsol_core_program"
1055
+ },
1056
+ {
1057
+ "name": "transfer_hook_program"
1058
+ },
1059
+ {
1060
+ "name": "liqsol_pool_ata",
1061
+ "writable": true
1062
+ },
1063
+ {
1064
+ "name": "outpost_account",
1065
+ "docs": [
1066
+ "User's outpost account"
1067
+ ],
1068
+ "writable": true
1069
+ },
1070
+ {
1071
+ "name": "token_program"
1072
+ },
1073
+ {
1074
+ "name": "system_program"
575
1075
  }
576
1076
  ],
577
1077
  "args": [
578
1078
  {
579
1079
  "name": "amount",
580
1080
  "type": "u64"
581
- },
582
- {
583
- "name": "seed",
584
- "type": "u32"
585
1081
  }
586
1082
  ]
587
1083
  },
@@ -678,6 +1174,10 @@
678
1174
  "name": "bucket_token_account",
679
1175
  "writable": true
680
1176
  },
1177
+ {
1178
+ "name": "bucket_user_record",
1179
+ "writable": true
1180
+ },
681
1181
  {
682
1182
  "name": "liqsol_mint"
683
1183
  },
@@ -693,6 +1193,68 @@
693
1193
  ],
694
1194
  "args": []
695
1195
  },
1196
+ {
1197
+ "name": "init_tranche_state",
1198
+ "discriminator": [
1199
+ 87,
1200
+ 134,
1201
+ 47,
1202
+ 11,
1203
+ 241,
1204
+ 14,
1205
+ 118,
1206
+ 201
1207
+ ],
1208
+ "accounts": [
1209
+ {
1210
+ "name": "authority",
1211
+ "writable": true,
1212
+ "signer": true
1213
+ },
1214
+ {
1215
+ "name": "tranche_state",
1216
+ "writable": true
1217
+ },
1218
+ {
1219
+ "name": "chainlink_feed"
1220
+ },
1221
+ {
1222
+ "name": "chainlink_program"
1223
+ },
1224
+ {
1225
+ "name": "system_program"
1226
+ }
1227
+ ],
1228
+ "args": []
1229
+ },
1230
+ {
1231
+ "name": "init_wire_config",
1232
+ "discriminator": [
1233
+ 109,
1234
+ 159,
1235
+ 158,
1236
+ 174,
1237
+ 192,
1238
+ 150,
1239
+ 14,
1240
+ 34
1241
+ ],
1242
+ "accounts": [
1243
+ {
1244
+ "name": "admin",
1245
+ "writable": true,
1246
+ "signer": true
1247
+ },
1248
+ {
1249
+ "name": "global_state",
1250
+ "writable": true
1251
+ },
1252
+ {
1253
+ "name": "system_program"
1254
+ }
1255
+ ],
1256
+ "args": []
1257
+ },
696
1258
  {
697
1259
  "name": "initialize",
698
1260
  "discriminator": [
@@ -718,6 +1280,12 @@
718
1280
  "name": "distribution_state",
719
1281
  "writable": true
720
1282
  },
1283
+ {
1284
+ "name": "bucket_authority"
1285
+ },
1286
+ {
1287
+ "name": "pool_authority"
1288
+ },
721
1289
  {
722
1290
  "name": "token_program"
723
1291
  },
@@ -1057,40 +1625,6 @@
1057
1625
  ],
1058
1626
  "args": []
1059
1627
  },
1060
- {
1061
- "name": "initialize_tranche_state",
1062
- "discriminator": [
1063
- 160,
1064
- 50,
1065
- 212,
1066
- 249,
1067
- 197,
1068
- 155,
1069
- 79,
1070
- 226
1071
- ],
1072
- "accounts": [
1073
- {
1074
- "name": "authority",
1075
- "writable": true,
1076
- "signer": true
1077
- },
1078
- {
1079
- "name": "tranche_state",
1080
- "writable": true
1081
- },
1082
- {
1083
- "name": "chainlink_feed"
1084
- },
1085
- {
1086
- "name": "chainlink_program"
1087
- },
1088
- {
1089
- "name": "system_program"
1090
- }
1091
- ],
1092
- "args": []
1093
- },
1094
1628
  {
1095
1629
  "name": "initialize_vault",
1096
1630
  "docs": [
@@ -1127,33 +1661,82 @@
1127
1661
  "args": []
1128
1662
  },
1129
1663
  {
1130
- "name": "initialize_wire_config",
1664
+ "name": "initialize_withdraw_global",
1131
1665
  "discriminator": [
1132
- 65,
1133
- 61,
1134
- 193,
1135
- 228,
1136
- 121,
1137
- 252,
1138
- 165,
1139
- 207
1666
+ 110,
1667
+ 0,
1668
+ 210,
1669
+ 101,
1670
+ 59,
1671
+ 75,
1672
+ 224,
1673
+ 158
1140
1674
  ],
1141
1675
  "accounts": [
1142
1676
  {
1143
- "name": "admin",
1677
+ "name": "authority",
1144
1678
  "writable": true,
1145
1679
  "signer": true
1146
1680
  },
1147
1681
  {
1148
- "name": "global_state",
1682
+ "name": "liqsol_mint",
1683
+ "docs": [
1684
+ "liqSOL Token-2022 mint"
1685
+ ]
1686
+ },
1687
+ {
1688
+ "name": "global",
1149
1689
  "writable": true
1150
1690
  },
1691
+ {
1692
+ "name": "token_program"
1693
+ },
1151
1694
  {
1152
1695
  "name": "system_program"
1696
+ },
1697
+ {
1698
+ "name": "rent"
1153
1699
  }
1154
1700
  ],
1155
1701
  "args": []
1156
1702
  },
1703
+ {
1704
+ "name": "initialize_withdraw_metadata",
1705
+ "discriminator": [
1706
+ 0,
1707
+ 170,
1708
+ 135,
1709
+ 3,
1710
+ 35,
1711
+ 58,
1712
+ 213,
1713
+ 75
1714
+ ],
1715
+ "accounts": [
1716
+ {
1717
+ "name": "payer",
1718
+ "writable": true,
1719
+ "signer": true
1720
+ },
1721
+ {
1722
+ "name": "metadata",
1723
+ "writable": true
1724
+ },
1725
+ {
1726
+ "name": "system_program"
1727
+ }
1728
+ ],
1729
+ "args": [
1730
+ {
1731
+ "name": "args",
1732
+ "type": {
1733
+ "defined": {
1734
+ "name": "MetadataArgs"
1735
+ }
1736
+ }
1737
+ }
1738
+ ]
1739
+ },
1157
1740
  {
1158
1741
  "name": "merge_activating_stakes",
1159
1742
  "docs": [
@@ -1233,10 +1816,6 @@
1233
1816
  {
1234
1817
  "name": "vote_account",
1235
1818
  "type": "pubkey"
1236
- },
1237
- {
1238
- "name": "start_epoch",
1239
- "type": "u64"
1240
1819
  }
1241
1820
  ],
1242
1821
  "returns": "u16"
@@ -1257,8 +1836,17 @@
1257
1836
  73
1258
1837
  ],
1259
1838
  "accounts": [
1839
+ {
1840
+ "name": "controller_state",
1841
+ "docs": [
1842
+ "Stake controller state - used to verify admin authority"
1843
+ ]
1844
+ },
1260
1845
  {
1261
1846
  "name": "admin",
1847
+ "docs": [
1848
+ "Admin must match the stored authority in controller_state"
1849
+ ],
1262
1850
  "writable": true,
1263
1851
  "signer": true
1264
1852
  },
@@ -1314,6 +1902,10 @@
1314
1902
  {
1315
1903
  "name": "processing_state",
1316
1904
  "writable": true
1905
+ },
1906
+ {
1907
+ "name": "reserve_pool",
1908
+ "writable": true
1317
1909
  }
1318
1910
  ],
1319
1911
  "args": [
@@ -1324,73 +1916,43 @@
1324
1916
  ]
1325
1917
  },
1326
1918
  {
1327
- "name": "move_to_graveyard",
1919
+ "name": "process_graveyard_validators_batch",
1328
1920
  "docs": [
1329
- "Move a validator from active list to graveyard, this is a serious function called in exceptional cases where something has gone awry with the validator",
1330
- "and our system would be too late to catch it"
1921
+ "Process graveyard validators batch: check transient resolution, queue main stake deactivation",
1922
+ "Validators in graveyard with resolved transients will have their main stake queued for deactivation"
1331
1923
  ],
1332
1924
  "discriminator": [
1333
- 171,
1334
- 61,
1335
- 145,
1336
- 127,
1337
- 189,
1338
- 218,
1339
- 221,
1340
- 199
1925
+ 141,
1926
+ 178,
1927
+ 8,
1928
+ 118,
1929
+ 133,
1930
+ 183,
1931
+ 86,
1932
+ 233
1341
1933
  ],
1342
1934
  "accounts": [
1343
- {
1344
- "name": "authority",
1345
- "writable": true,
1346
- "signer": true
1347
- },
1348
- {
1349
- "name": "active_list",
1350
- "docs": [
1351
- "Active list - will remove from here"
1352
- ],
1353
- "writable": true
1354
- },
1355
1935
  {
1356
1936
  "name": "graveyard_list",
1357
- "docs": [
1358
- "Graveyard list - will add here"
1359
- ],
1360
1937
  "writable": true
1361
1938
  },
1362
1939
  {
1363
- "name": "validator_info",
1364
- "docs": [
1365
- "Update the validator info to mark as blacklisted/underperforming"
1366
- ],
1940
+ "name": "maintenance_ledger",
1367
1941
  "writable": true
1368
1942
  },
1369
1943
  {
1370
- "name": "stake_allocation_state",
1371
- "docs": [
1372
- "Stake allocation state - to update total_active_vpp when removing validator"
1373
- ],
1944
+ "name": "processing_state",
1374
1945
  "writable": true
1375
1946
  },
1376
1947
  {
1377
- "name": "system_program"
1378
- }
1379
- ],
1380
- "args": [
1381
- {
1382
- "name": "vote_account",
1383
- "type": "pubkey"
1948
+ "name": "clock"
1384
1949
  },
1385
1950
  {
1386
- "name": "reason",
1387
- "type": {
1388
- "defined": {
1389
- "name": "ValidatorStateChangeReason"
1390
- }
1391
- }
1951
+ "name": "authority",
1952
+ "signer": true
1392
1953
  }
1393
- ]
1954
+ ],
1955
+ "args": []
1394
1956
  },
1395
1957
  {
1396
1958
  "name": "process_pay_cycle",
@@ -1412,6 +1974,10 @@
1412
1974
  "name": "admin",
1413
1975
  "signer": true
1414
1976
  },
1977
+ {
1978
+ "name": "maintenance_ledger",
1979
+ "writable": true
1980
+ },
1415
1981
  {
1416
1982
  "name": "stake_metrics",
1417
1983
  "writable": true
@@ -1458,7 +2024,8 @@
1458
2024
  {
1459
2025
  "name": "process_stake_orders",
1460
2026
  "docs": [
1461
- "V2: Process stake orders using PDA architecture with pre-calculated allocations"
2027
+ "V2: Process stake orders using PDA architecture with pre-calculated allocations",
2028
+ "Validators must be sent contiguously from the active list starting at validators_processed_this_epoch"
1462
2029
  ],
1463
2030
  "discriminator": [
1464
2031
  92,
@@ -1505,35 +2072,73 @@
1505
2072
  "writable": true
1506
2073
  },
1507
2074
  {
1508
- "name": "stake_program"
2075
+ "name": "stake_program"
2076
+ },
2077
+ {
2078
+ "name": "system_program"
2079
+ },
2080
+ {
2081
+ "name": "clock"
2082
+ },
2083
+ {
2084
+ "name": "stake_history"
2085
+ },
2086
+ {
2087
+ "name": "stake_config"
2088
+ },
2089
+ {
2090
+ "name": "rent"
2091
+ }
2092
+ ],
2093
+ "args": []
2094
+ },
2095
+ {
2096
+ "name": "process_transfer_hook",
2097
+ "discriminator": [
2098
+ 167,
2099
+ 45,
2100
+ 151,
2101
+ 64,
2102
+ 209,
2103
+ 186,
2104
+ 192,
2105
+ 78
2106
+ ],
2107
+ "accounts": [
2108
+ {
2109
+ "name": "source_token"
1509
2110
  },
1510
2111
  {
1511
- "name": "system_program"
2112
+ "name": "destination_token"
1512
2113
  },
1513
2114
  {
1514
- "name": "clock"
2115
+ "name": "sender_user_record",
2116
+ "writable": true
1515
2117
  },
1516
2118
  {
1517
- "name": "stake_history"
2119
+ "name": "receiver_user_record",
2120
+ "writable": true
1518
2121
  },
1519
2122
  {
1520
- "name": "stake_config"
2123
+ "name": "distribution_state",
2124
+ "writable": true
1521
2125
  },
1522
2126
  {
1523
- "name": "rent"
2127
+ "name": "bucket_token_account"
1524
2128
  }
1525
2129
  ],
1526
2130
  "args": [
1527
2131
  {
1528
- "name": "validators_count",
1529
- "type": "u8"
2132
+ "name": "amount",
2133
+ "type": "u64"
1530
2134
  }
1531
2135
  ]
1532
2136
  },
1533
2137
  {
1534
2138
  "name": "process_unstake_orders",
1535
2139
  "docs": [
1536
- "V2: Process unstake orders by splitting and deactivating stakes"
2140
+ "V2: Process unstake orders by splitting and deactivating stakes",
2141
+ "Validators must be sent contiguously: first from active list, then graveyard list"
1537
2142
  ],
1538
2143
  "discriminator": [
1539
2144
  44,
@@ -1593,24 +2198,19 @@
1593
2198
  "name": "stake_program"
1594
2199
  }
1595
2200
  ],
1596
- "args": [
1597
- {
1598
- "name": "validators_count",
1599
- "type": "u8"
1600
- }
1601
- ]
2201
+ "args": []
1602
2202
  },
1603
2203
  {
1604
- "name": "purchase_warrants_from_yield",
2204
+ "name": "purchase",
1605
2205
  "discriminator": [
1606
- 42,
1607
- 126,
1608
- 140,
1609
- 136,
1610
- 176,
1611
- 155,
1612
- 106,
1613
- 139
2206
+ 21,
2207
+ 93,
2208
+ 113,
2209
+ 154,
2210
+ 193,
2211
+ 160,
2212
+ 242,
2213
+ 168
1614
2214
  ],
1615
2215
  "accounts": [
1616
2216
  {
@@ -1618,63 +2218,70 @@
1618
2218
  "writable": true,
1619
2219
  "signer": true
1620
2220
  },
2221
+ {
2222
+ "name": "liqsol_mint",
2223
+ "writable": true
2224
+ },
1621
2225
  {
1622
2226
  "name": "global_state",
1623
2227
  "writable": true
1624
2228
  },
1625
2229
  {
1626
- "name": "liqsol_mint"
2230
+ "name": "distribution_state",
2231
+ "writable": true
1627
2232
  },
1628
2233
  {
1629
- "name": "pool_authority",
1630
- "docs": [
1631
- "Pool authority PDA"
1632
- ]
2234
+ "name": "buyer_ata",
2235
+ "writable": true
1633
2236
  },
1634
2237
  {
1635
- "name": "liqsol_pool_ata",
1636
- "docs": [
1637
- "Pool's liqSOL ATA - deterministically derived from pool_authority + liqsol_mint"
1638
- ],
2238
+ "name": "pool_authority"
2239
+ },
2240
+ {
2241
+ "name": "bucket_authority"
2242
+ },
2243
+ {
2244
+ "name": "bucket_token_account",
1639
2245
  "writable": true
1640
2246
  },
1641
2247
  {
1642
- "name": "sol_bucket",
1643
- "docs": [
1644
- "SOL bucket for raw SOL warrant purchases"
1645
- ],
2248
+ "name": "bucket_user_record",
1646
2249
  "writable": true
1647
2250
  },
1648
2251
  {
1649
- "name": "liqsol_pool_user_record",
2252
+ "name": "sender_user_record",
1650
2253
  "writable": true
1651
2254
  },
1652
2255
  {
1653
- "name": "distribution_state",
2256
+ "name": "receiver_user_record",
1654
2257
  "writable": true
1655
2258
  },
1656
2259
  {
1657
- "name": "pay_rate_history"
2260
+ "name": "extra_account_meta_list"
1658
2261
  },
1659
2262
  {
1660
- "name": "bucket_authority"
2263
+ "name": "liqsol_core_program"
1661
2264
  },
1662
2265
  {
1663
- "name": "bucket_token_account",
1664
- "writable": true
2266
+ "name": "transfer_hook_program"
1665
2267
  },
1666
2268
  {
1667
- "name": "token_program"
2269
+ "name": "liqsol_pool_ata",
2270
+ "writable": true
1668
2271
  },
1669
2272
  {
1670
- "name": "system_program"
2273
+ "name": "outpost_account",
2274
+ "docs": [
2275
+ "User's pretoken deposit record"
2276
+ ],
2277
+ "writable": true
1671
2278
  },
1672
2279
  {
1673
2280
  "name": "tranche_state",
1674
2281
  "writable": true
1675
2282
  },
1676
2283
  {
1677
- "name": "user_warrant_record",
2284
+ "name": "user_pretoken_record",
1678
2285
  "writable": true
1679
2286
  },
1680
2287
  {
@@ -1682,21 +2289,35 @@
1682
2289
  },
1683
2290
  {
1684
2291
  "name": "chainlink_program"
2292
+ },
2293
+ {
2294
+ "name": "token_program"
2295
+ },
2296
+ {
2297
+ "name": "associated_token_program"
2298
+ },
2299
+ {
2300
+ "name": "system_program"
1685
2301
  }
1686
2302
  ],
1687
- "args": []
2303
+ "args": [
2304
+ {
2305
+ "name": "amount",
2306
+ "type": "u64"
2307
+ }
2308
+ ]
1688
2309
  },
1689
2310
  {
1690
- "name": "purchase_with_liqsol",
2311
+ "name": "purchase_from_yield",
1691
2312
  "discriminator": [
1692
- 90,
1693
- 74,
1694
- 45,
1695
- 119,
1696
- 201,
1697
- 62,
1698
- 148,
1699
- 74
2313
+ 232,
2314
+ 143,
2315
+ 47,
2316
+ 77,
2317
+ 246,
2318
+ 113,
2319
+ 31,
2320
+ 202
1700
2321
  ],
1701
2322
  "accounts": [
1702
2323
  {
@@ -1705,61 +2326,65 @@
1705
2326
  "signer": true
1706
2327
  },
1707
2328
  {
1708
- "name": "liqsol_mint",
2329
+ "name": "global_state",
1709
2330
  "writable": true
1710
2331
  },
1711
2332
  {
1712
- "name": "global_state",
2333
+ "name": "distribution_state",
1713
2334
  "writable": true
1714
2335
  },
1715
2336
  {
1716
- "name": "buyer_ata",
1717
- "writable": true
2337
+ "name": "liqsol_mint"
1718
2338
  },
1719
2339
  {
1720
- "name": "pool_authority"
2340
+ "name": "pool_authority",
2341
+ "docs": [
2342
+ "Pool authority PDA"
2343
+ ]
1721
2344
  },
1722
2345
  {
1723
- "name": "liqsol_pool_ata",
2346
+ "name": "bucket_authority"
2347
+ },
2348
+ {
2349
+ "name": "bucket_token_account",
1724
2350
  "writable": true
1725
2351
  },
1726
2352
  {
1727
- "name": "warrant_deposit_record",
1728
- "docs": [
1729
- "User's warrant deposit record"
1730
- ],
2353
+ "name": "bucket_user_record",
1731
2354
  "writable": true
1732
2355
  },
1733
2356
  {
1734
- "name": "liqsol_pool_user_record",
2357
+ "name": "liqsol_pool_ata",
1735
2358
  "docs": [
1736
- "Pool's UserRecord in distribution system (for yield tracking)"
2359
+ "Pool's liqSOL ATA - deterministically derived from pool_authority + liqsol_mint"
1737
2360
  ],
1738
2361
  "writable": true
1739
2362
  },
1740
2363
  {
1741
- "name": "distribution_state",
2364
+ "name": "liqsol_pool_user_record",
1742
2365
  "writable": true
1743
2366
  },
1744
2367
  {
1745
- "name": "pay_rate_history"
2368
+ "name": "extra_account_meta_list"
1746
2369
  },
1747
2370
  {
1748
- "name": "bucket_authority"
2371
+ "name": "liqsol_core_program"
1749
2372
  },
1750
2373
  {
1751
- "name": "bucket_token_account",
1752
- "writable": true
2374
+ "name": "transfer_hook_program"
1753
2375
  },
1754
2376
  {
1755
- "name": "sol_bucket"
2377
+ "name": "token_program"
2378
+ },
2379
+ {
2380
+ "name": "system_program"
1756
2381
  },
1757
2382
  {
1758
2383
  "name": "tranche_state",
1759
2384
  "writable": true
1760
2385
  },
1761
2386
  {
1762
- "name": "user_warrant_record",
2387
+ "name": "user_pretoken_record",
1763
2388
  "writable": true
1764
2389
  },
1765
2390
  {
@@ -1767,162 +2392,259 @@
1767
2392
  },
1768
2393
  {
1769
2394
  "name": "chainlink_program"
2395
+ }
2396
+ ],
2397
+ "args": []
2398
+ },
2399
+ {
2400
+ "name": "record_price",
2401
+ "discriminator": [
2402
+ 210,
2403
+ 113,
2404
+ 46,
2405
+ 101,
2406
+ 107,
2407
+ 218,
2408
+ 83,
2409
+ 51
2410
+ ],
2411
+ "accounts": [
2412
+ {
2413
+ "name": "payer",
2414
+ "writable": true,
2415
+ "signer": true
1770
2416
  },
1771
2417
  {
1772
- "name": "token_program"
2418
+ "name": "tranche_state"
1773
2419
  },
1774
2420
  {
1775
- "name": "associated_token_program"
2421
+ "name": "price_history",
2422
+ "writable": true
2423
+ },
2424
+ {
2425
+ "name": "chainlink_program"
2426
+ },
2427
+ {
2428
+ "name": "chainlink_feed"
1776
2429
  },
1777
2430
  {
1778
2431
  "name": "system_program"
1779
2432
  }
1780
2433
  ],
1781
- "args": [
2434
+ "args": []
2435
+ },
2436
+ {
2437
+ "name": "refresh_stake_metrics_post_late_epoch",
2438
+ "docs": [
2439
+ "Refresh stake metrics after all late-epoch operations (ProcessStakeOrders, ProcessUnstakeOrders)",
2440
+ "Requires Distribution + UnstakeOrder as prerequisites",
2441
+ "Tracks completion in last_post_late_epoch_stake_metrics_refresh_epoch"
2442
+ ],
2443
+ "discriminator": [
2444
+ 11,
2445
+ 226,
2446
+ 87,
2447
+ 114,
2448
+ 47,
2449
+ 159,
2450
+ 99,
2451
+ 157
2452
+ ],
2453
+ "accounts": [
1782
2454
  {
1783
- "name": "amount",
1784
- "type": "u64"
2455
+ "name": "admin",
2456
+ "writable": true,
2457
+ "signer": true
2458
+ },
2459
+ {
2460
+ "name": "stake_metrics",
2461
+ "writable": true
2462
+ },
2463
+ {
2464
+ "name": "epoch_state",
2465
+ "writable": true
2466
+ },
2467
+ {
2468
+ "name": "processing_state",
2469
+ "writable": true
2470
+ },
2471
+ {
2472
+ "name": "active_list"
1785
2473
  }
1786
- ]
2474
+ ],
2475
+ "args": []
1787
2476
  },
1788
2477
  {
1789
- "name": "purchase_with_sol",
2478
+ "name": "refresh_stake_metrics_post_sync",
2479
+ "docs": [
2480
+ "V2: Refresh stake metrics after removal selection + PDA setup",
2481
+ "Requires ActiveInfosSynced + ValidatorPdaSetup as prerequisites",
2482
+ "Tracks completion in last_post_sync_stake_metrics_refresh_epoch"
2483
+ ],
1790
2484
  "discriminator": [
1791
- 27,
1792
- 238,
1793
- 240,
2485
+ 177,
2486
+ 250,
2487
+ 32,
1794
2488
  155,
1795
- 170,
1796
- 180,
1797
- 26,
1798
- 118
2489
+ 196,
2490
+ 199,
2491
+ 199,
2492
+ 249
2493
+ ],
2494
+ "accounts": [
2495
+ {
2496
+ "name": "admin",
2497
+ "signer": true
2498
+ },
2499
+ {
2500
+ "name": "stake_metrics",
2501
+ "writable": true
2502
+ },
2503
+ {
2504
+ "name": "epoch_state",
2505
+ "writable": true
2506
+ },
2507
+ {
2508
+ "name": "processing_state",
2509
+ "writable": true
2510
+ },
2511
+ {
2512
+ "name": "active_list"
2513
+ }
2514
+ ],
2515
+ "args": []
2516
+ },
2517
+ {
2518
+ "name": "register_user",
2519
+ "discriminator": [
2520
+ 2,
2521
+ 241,
2522
+ 150,
2523
+ 223,
2524
+ 99,
2525
+ 214,
2526
+ 116,
2527
+ 97
1799
2528
  ],
1800
2529
  "accounts": [
1801
2530
  {
1802
2531
  "name": "user",
1803
- "writable": true,
1804
- "signer": true
1805
- },
1806
- {
1807
- "name": "liqsol_mint",
1808
2532
  "writable": true
1809
2533
  },
1810
2534
  {
1811
- "name": "global_state",
2535
+ "name": "user_ata",
1812
2536
  "writable": true
1813
2537
  },
1814
2538
  {
1815
- "name": "pool_authority",
1816
- "docs": [
1817
- "Pool authority PDA"
1818
- ]
1819
- },
1820
- {
1821
- "name": "liqsol_pool_ata",
1822
- "docs": [
1823
- "Pool's liqSOL ATA (for baseline tracking)"
1824
- ],
2539
+ "name": "user_record",
1825
2540
  "writable": true
1826
2541
  },
1827
2542
  {
1828
- "name": "liqsol_pool_user_record",
2543
+ "name": "payer",
1829
2544
  "docs": [
1830
- "Pool's UserRecord in distribution system (for yield tracking)"
2545
+ "Payer for the user record PDA creation (always the user)"
1831
2546
  ],
1832
- "writable": true
2547
+ "writable": true,
2548
+ "signer": true
1833
2549
  },
1834
2550
  {
1835
2551
  "name": "distribution_state",
1836
2552
  "writable": true
1837
2553
  },
1838
- {
1839
- "name": "pay_rate_history"
1840
- },
1841
2554
  {
1842
2555
  "name": "bucket_authority"
1843
2556
  },
1844
2557
  {
1845
2558
  "name": "bucket_token_account",
1846
- "writable": true
1847
- },
1848
- {
1849
- "name": "sol_bucket",
1850
2559
  "docs": [
1851
- "Native SOL bucket (System Account PDA)"
2560
+ "The bucket's associated token account holding liqSOL (for index sync)"
1852
2561
  ],
1853
2562
  "writable": true
1854
2563
  },
1855
2564
  {
1856
- "name": "warrant_deposit_record",
1857
- "docs": [
1858
- "User's warrant deposit record"
1859
- ],
1860
- "writable": true
1861
- },
2565
+ "name": "system_program"
2566
+ }
2567
+ ],
2568
+ "args": []
2569
+ },
2570
+ {
2571
+ "name": "remove_low_performers_batch",
2572
+ "docs": [
2573
+ "Process batch of validators for removal (below exit threshold)"
2574
+ ],
2575
+ "discriminator": [
2576
+ 91,
2577
+ 142,
2578
+ 166,
2579
+ 98,
2580
+ 245,
2581
+ 245,
2582
+ 159,
2583
+ 44
2584
+ ],
2585
+ "accounts": [
1862
2586
  {
1863
- "name": "tranche_state",
2587
+ "name": "active_list",
1864
2588
  "writable": true
1865
2589
  },
1866
2590
  {
1867
- "name": "user_warrant_record",
2591
+ "name": "graveyard_list",
1868
2592
  "writable": true
1869
2593
  },
1870
2594
  {
1871
- "name": "chainlink_feed"
2595
+ "name": "maintenance_ledger",
2596
+ "writable": true
1872
2597
  },
1873
2598
  {
1874
- "name": "chainlink_program"
2599
+ "name": "processing_state",
2600
+ "writable": true
1875
2601
  },
1876
2602
  {
1877
- "name": "token_program"
2603
+ "name": "allocation_state"
1878
2604
  },
1879
2605
  {
1880
- "name": "system_program"
2606
+ "name": "authority",
2607
+ "signer": true
1881
2608
  }
1882
2609
  ],
1883
- "args": [
1884
- {
1885
- "name": "amount",
1886
- "type": "u64"
1887
- }
1888
- ]
2610
+ "args": []
1889
2611
  },
1890
2612
  {
1891
- "name": "record_price",
2613
+ "name": "request_unbond_role",
1892
2614
  "discriminator": [
1893
- 210,
1894
- 113,
1895
- 46,
1896
- 101,
1897
- 107,
1898
- 218,
2615
+ 223,
2616
+ 225,
2617
+ 84,
1899
2618
  83,
1900
- 51
2619
+ 115,
2620
+ 183,
2621
+ 80,
2622
+ 33
1901
2623
  ],
1902
2624
  "accounts": [
1903
2625
  {
1904
- "name": "payer",
2626
+ "name": "user",
1905
2627
  "writable": true,
1906
2628
  "signer": true
1907
2629
  },
1908
2630
  {
1909
- "name": "tranche_state"
2631
+ "name": "global_state"
1910
2632
  },
1911
2633
  {
1912
- "name": "price_history",
2634
+ "name": "outpost_account",
1913
2635
  "writable": true
1914
- },
1915
- {
1916
- "name": "chainlink_program"
1917
- },
1918
- {
1919
- "name": "chainlink_feed"
1920
- },
1921
- {
1922
- "name": "system_program"
1923
2636
  }
1924
2637
  ],
1925
- "args": []
2638
+ "args": [
2639
+ {
2640
+ "name": "role",
2641
+ "type": {
2642
+ "defined": {
2643
+ "name": "Role"
2644
+ }
2645
+ }
2646
+ }
2647
+ ]
1926
2648
  },
1927
2649
  {
1928
2650
  "name": "request_withdraw",
@@ -1960,7 +2682,8 @@
1960
2682
  "name": "liqsol_mint",
1961
2683
  "docs": [
1962
2684
  "liqSOL mint reference (must match Global.liqsol_mint so we can read decimals)"
1963
- ]
2685
+ ],
2686
+ "writable": true
1964
2687
  },
1965
2688
  {
1966
2689
  "name": "user_ata",
@@ -1970,6 +2693,48 @@
1970
2693
  "name": "user_record",
1971
2694
  "writable": true
1972
2695
  },
2696
+ {
2697
+ "name": "distribution_state",
2698
+ "docs": [
2699
+ "Distribution state for index tracking"
2700
+ ],
2701
+ "writable": true
2702
+ },
2703
+ {
2704
+ "name": "bucket_token_account",
2705
+ "docs": [
2706
+ "The bucket's token account holding liqSOL (for sync_index balance)"
2707
+ ]
2708
+ },
2709
+ {
2710
+ "name": "reserve_pool",
2711
+ "docs": [
2712
+ "Reserve pool - to check available balance for instant withdrawals"
2713
+ ],
2714
+ "writable": true
2715
+ },
2716
+ {
2717
+ "name": "stake_allocation_state",
2718
+ "docs": [
2719
+ "Stake allocation state - for accumulate_unstake_request"
2720
+ ],
2721
+ "writable": true
2722
+ },
2723
+ {
2724
+ "name": "stake_metrics",
2725
+ "docs": [
2726
+ "Stake metrics - for accumulate_unstake_request"
2727
+ ]
2728
+ },
2729
+ {
2730
+ "name": "maintenance_ledger",
2731
+ "docs": [
2732
+ "Maintenance ledger - for accumulate_unstake_request"
2733
+ ]
2734
+ },
2735
+ {
2736
+ "name": "clock"
2737
+ },
1973
2738
  {
1974
2739
  "name": "mint_authority"
1975
2740
  },
@@ -1983,6 +2748,9 @@
1983
2748
  },
1984
2749
  {
1985
2750
  "name": "nft_mint",
2751
+ "docs": [
2752
+ "Uses global.next_receipt_id for deterministic, collision-free address generation"
2753
+ ],
1986
2754
  "writable": true
1987
2755
  },
1988
2756
  {
@@ -2009,10 +2777,6 @@
2009
2777
  {
2010
2778
  "name": "amount",
2011
2779
  "type": "u64"
2012
- },
2013
- {
2014
- "name": "ts",
2015
- "type": "u64"
2016
2780
  }
2017
2781
  ]
2018
2782
  },
@@ -2060,6 +2824,22 @@
2060
2824
  {
2061
2825
  "name": "global_state",
2062
2826
  "writable": true
2827
+ },
2828
+ {
2829
+ "name": "pool_authority"
2830
+ },
2831
+ {
2832
+ "name": "liqsol_mint"
2833
+ },
2834
+ {
2835
+ "name": "liqsol_pool_ata",
2836
+ "writable": true
2837
+ },
2838
+ {
2839
+ "name": "token_program"
2840
+ },
2841
+ {
2842
+ "name": "associated_token_program"
2063
2843
  }
2064
2844
  ],
2065
2845
  "args": []
@@ -2129,76 +2909,54 @@
2129
2909
  "args": []
2130
2910
  },
2131
2911
  {
2132
- "name": "restore_from_graveyard",
2912
+ "name": "set_last_state_change_epoch",
2133
2913
  "docs": [
2134
- "Move a validator from the graveyard to the active list, this is a serious function called in exceptional cases where something has gone awry with our programmatic",
2135
- "decision to put the validator in the graveyard"
2914
+ "Admin function to directly set last_state_change_epoch (useful for testing cooldowns)"
2136
2915
  ],
2137
2916
  "discriminator": [
2138
- 13,
2139
- 118,
2140
- 10,
2141
- 220,
2142
- 199,
2143
- 124,
2144
- 142,
2145
- 248
2917
+ 94,
2918
+ 57,
2919
+ 139,
2920
+ 195,
2921
+ 123,
2922
+ 224,
2923
+ 227,
2924
+ 106
2146
2925
  ],
2147
2926
  "accounts": [
2148
- {
2149
- "name": "authority",
2150
- "writable": true,
2151
- "signer": true
2152
- },
2153
- {
2154
- "name": "active_list",
2155
- "docs": [
2156
- "Active list - will remove from here"
2157
- ],
2158
- "writable": true
2159
- },
2160
- {
2161
- "name": "graveyard_list",
2162
- "docs": [
2163
- "Graveyard list - will add here"
2164
- ],
2165
- "writable": true
2166
- },
2167
2927
  {
2168
2928
  "name": "validator_info",
2169
- "docs": [
2170
- "Update the validator info to mark as blacklisted/underperforming"
2171
- ],
2172
2929
  "writable": true
2173
2930
  },
2174
2931
  {
2175
2932
  "name": "stake_allocation_state",
2176
2933
  "docs": [
2177
- "Stake allocation state - to update total_active_vpp when removing validator"
2934
+ "Stake allocation state - to update total_active_vpp when VPP changes"
2178
2935
  ],
2179
2936
  "writable": true
2180
- },
2181
- {
2182
- "name": "system_program"
2183
2937
  }
2184
2938
  ],
2185
2939
  "args": [
2186
2940
  {
2187
2941
  "name": "vote_account",
2188
2942
  "type": "pubkey"
2943
+ },
2944
+ {
2945
+ "name": "epoch",
2946
+ "type": "u16"
2189
2947
  }
2190
2948
  ]
2191
2949
  },
2192
2950
  {
2193
- "name": "set_d_day",
2951
+ "name": "set_paused",
2194
2952
  "discriminator": [
2195
- 161,
2196
- 160,
2197
- 249,
2198
- 85,
2199
- 122,
2200
- 254,
2201
- 165,
2953
+ 91,
2954
+ 60,
2955
+ 125,
2956
+ 192,
2957
+ 176,
2958
+ 225,
2959
+ 166,
2202
2960
  218
2203
2961
  ],
2204
2962
  "accounts": [
@@ -2213,61 +2971,59 @@
2213
2971
  ],
2214
2972
  "args": [
2215
2973
  {
2216
- "name": "d_day",
2974
+ "name": "paused",
2217
2975
  "type": "bool"
2218
2976
  }
2219
2977
  ]
2220
2978
  },
2221
2979
  {
2222
- "name": "set_last_state_change_epoch",
2223
- "docs": [
2224
- "Admin function to directly set last_state_change_epoch (useful for testing cooldowns)"
2225
- ],
2980
+ "name": "set_role_principal",
2226
2981
  "discriminator": [
2227
- 94,
2228
- 57,
2229
- 139,
2230
- 195,
2231
- 123,
2232
- 224,
2233
- 227,
2234
- 106
2982
+ 33,
2983
+ 199,
2984
+ 203,
2985
+ 50,
2986
+ 60,
2987
+ 167,
2988
+ 90,
2989
+ 92
2235
2990
  ],
2236
2991
  "accounts": [
2237
2992
  {
2238
- "name": "validator_info",
2239
- "writable": true
2993
+ "name": "admin",
2994
+ "signer": true
2240
2995
  },
2241
2996
  {
2242
- "name": "stake_allocation_state",
2243
- "docs": [
2244
- "Stake allocation state - to update total_active_vpp when VPP changes"
2245
- ],
2997
+ "name": "global_state",
2246
2998
  "writable": true
2247
2999
  }
2248
3000
  ],
2249
3001
  "args": [
2250
3002
  {
2251
- "name": "vote_account",
2252
- "type": "pubkey"
3003
+ "name": "role",
3004
+ "type": {
3005
+ "defined": {
3006
+ "name": "Role"
3007
+ }
3008
+ }
2253
3009
  },
2254
3010
  {
2255
- "name": "epoch",
2256
- "type": "u16"
3011
+ "name": "principal",
3012
+ "type": "u64"
2257
3013
  }
2258
3014
  ]
2259
3015
  },
2260
3016
  {
2261
- "name": "set_paused",
3017
+ "name": "set_role_warmup_duration",
2262
3018
  "discriminator": [
2263
- 91,
2264
- 60,
2265
- 125,
2266
- 192,
2267
- 176,
2268
- 225,
2269
- 166,
2270
- 218
3019
+ 229,
3020
+ 188,
3021
+ 179,
3022
+ 162,
3023
+ 56,
3024
+ 173,
3025
+ 228,
3026
+ 68
2271
3027
  ],
2272
3028
  "accounts": [
2273
3029
  {
@@ -2281,22 +3037,22 @@
2281
3037
  ],
2282
3038
  "args": [
2283
3039
  {
2284
- "name": "paused",
2285
- "type": "bool"
3040
+ "name": "duration_seconds",
3041
+ "type": "i64"
2286
3042
  }
2287
3043
  ]
2288
3044
  },
2289
3045
  {
2290
- "name": "set_refund_active",
3046
+ "name": "set_wire_state",
2291
3047
  "discriminator": [
2292
- 104,
2293
- 25,
2294
- 45,
2295
- 139,
2296
- 207,
3048
+ 62,
3049
+ 194,
2297
3050
  254,
2298
- 129,
2299
- 237
3051
+ 126,
3052
+ 251,
3053
+ 69,
3054
+ 35,
3055
+ 228
2300
3056
  ],
2301
3057
  "accounts": [
2302
3058
  {
@@ -2310,95 +3066,157 @@
2310
3066
  ],
2311
3067
  "args": [
2312
3068
  {
2313
- "name": "refund_active",
2314
- "type": "bool"
3069
+ "name": "wire_state",
3070
+ "type": {
3071
+ "defined": {
3072
+ "name": "WireState"
3073
+ }
3074
+ }
2315
3075
  }
2316
3076
  ]
2317
3077
  },
2318
3078
  {
2319
- "name": "stake_liqsol",
3079
+ "name": "setup_validator_pdas_batch",
2320
3080
  "discriminator": [
2321
- 135,
2322
- 102,
2323
- 130,
2324
- 67,
2325
- 57,
2326
- 29,
2327
- 101,
2328
- 95
3081
+ 115,
3082
+ 37,
3083
+ 9,
3084
+ 246,
3085
+ 144,
3086
+ 224,
3087
+ 178,
3088
+ 79
2329
3089
  ],
2330
3090
  "accounts": [
2331
3091
  {
2332
- "name": "user",
3092
+ "name": "authority",
2333
3093
  "writable": true,
2334
3094
  "signer": true
2335
3095
  },
2336
3096
  {
2337
- "name": "liqsol_mint",
3097
+ "name": "active_list",
2338
3098
  "writable": true
2339
3099
  },
2340
3100
  {
2341
- "name": "global_state",
3101
+ "name": "processing_state",
2342
3102
  "writable": true
2343
3103
  },
2344
3104
  {
2345
- "name": "user_ata",
3105
+ "name": "maintenance_ledger",
2346
3106
  "writable": true
2347
3107
  },
2348
3108
  {
2349
- "name": "pool_authority"
2350
- },
2351
- {
2352
- "name": "liqsol_pool_ata",
3109
+ "name": "allocation_state",
2353
3110
  "writable": true
2354
3111
  },
2355
3112
  {
2356
- "name": "warrant_deposit_record",
3113
+ "name": "system_program",
2357
3114
  "docs": [
2358
- "User's warrant deposit record"
2359
- ],
2360
- "writable": true
3115
+ "Needed for manual PDA creation"
3116
+ ]
3117
+ }
3118
+ ],
3119
+ "args": []
3120
+ },
3121
+ {
3122
+ "name": "slash_bond",
3123
+ "discriminator": [
3124
+ 143,
3125
+ 246,
3126
+ 51,
3127
+ 243,
3128
+ 88,
3129
+ 198,
3130
+ 217,
3131
+ 48
3132
+ ],
3133
+ "accounts": [
3134
+ {
3135
+ "name": "admin",
3136
+ "signer": true
2361
3137
  },
2362
3138
  {
2363
- "name": "liqsol_pool_user_record",
3139
+ "name": "global_state"
3140
+ },
3141
+ {
3142
+ "name": "user",
2364
3143
  "docs": [
2365
- "Pool's UserRecord in distribution system (for yield tracking)"
2366
- ],
2367
- "writable": true
3144
+ "The user being slashed"
3145
+ ]
2368
3146
  },
2369
3147
  {
2370
- "name": "distribution_state",
3148
+ "name": "outpost_account",
2371
3149
  "writable": true
2372
- },
3150
+ }
3151
+ ],
3152
+ "args": []
3153
+ },
3154
+ {
3155
+ "name": "sync_active_scores",
3156
+ "discriminator": [
3157
+ 38,
3158
+ 188,
3159
+ 30,
3160
+ 93,
3161
+ 139,
3162
+ 1,
3163
+ 140,
3164
+ 168
3165
+ ],
3166
+ "accounts": [
2373
3167
  {
2374
- "name": "pay_rate_history"
3168
+ "name": "active_list",
3169
+ "writable": true
2375
3170
  },
2376
3171
  {
2377
- "name": "bucket_authority"
3172
+ "name": "leaderboard_state"
2378
3173
  },
2379
3174
  {
2380
- "name": "bucket_token_account",
3175
+ "name": "maintenance_ledger",
2381
3176
  "writable": true
2382
3177
  },
2383
3178
  {
2384
- "name": "sol_bucket"
3179
+ "name": "authority",
3180
+ "signer": true
3181
+ }
3182
+ ],
3183
+ "args": []
3184
+ },
3185
+ {
3186
+ "name": "sync_distribution_index",
3187
+ "discriminator": [
3188
+ 82,
3189
+ 159,
3190
+ 232,
3191
+ 125,
3192
+ 12,
3193
+ 29,
3194
+ 9,
3195
+ 226
3196
+ ],
3197
+ "accounts": [
3198
+ {
3199
+ "name": "authority",
3200
+ "docs": [
3201
+ "Admin or crank that triggers the index sync"
3202
+ ],
3203
+ "signer": true
2385
3204
  },
2386
3205
  {
2387
- "name": "token_program"
3206
+ "name": "distribution_state",
3207
+ "writable": true
2388
3208
  },
2389
3209
  {
2390
- "name": "associated_token_program"
3210
+ "name": "bucket_authority",
3211
+ "docs": [
3212
+ "The bucket's associated token account holding liqSOL"
3213
+ ]
2391
3214
  },
2392
3215
  {
2393
- "name": "system_program"
3216
+ "name": "bucket_token_account"
2394
3217
  }
2395
3218
  ],
2396
- "args": [
2397
- {
2398
- "name": "amount",
2399
- "type": "u64"
2400
- }
2401
- ]
3219
+ "args": []
2402
3220
  },
2403
3221
  {
2404
3222
  "name": "sync_main_stake_accounts",
@@ -2439,13 +3257,13 @@
2439
3257
  {
2440
3258
  "name": "active_list",
2441
3259
  "docs": [
2442
- "Active validator list - to check validator counts"
3260
+ "Active validator list - to check validator counts and membership"
2443
3261
  ]
2444
3262
  },
2445
3263
  {
2446
3264
  "name": "graveyard_list",
2447
3265
  "docs": [
2448
- "Graveyard validator list - to check validator counts"
3266
+ "Graveyard validator list - graveyard validators also need syncing for merge operations"
2449
3267
  ]
2450
3268
  },
2451
3269
  {
@@ -2455,353 +3273,243 @@
2455
3273
  "args": []
2456
3274
  },
2457
3275
  {
2458
- "name": "update_growth_parameters",
2459
- "discriminator": [
2460
- 172,
2461
- 187,
2462
- 237,
2463
- 233,
2464
- 250,
2465
- 160,
2466
- 115,
2467
- 239
2468
- ],
2469
- "accounts": [
2470
- {
2471
- "name": "admin",
2472
- "writable": true,
2473
- "signer": true
2474
- },
2475
- {
2476
- "name": "tranche_state",
2477
- "writable": true
2478
- },
2479
- {
2480
- "name": "price_history",
2481
- "writable": true
2482
- },
2483
- {
2484
- "name": "system_program"
2485
- }
2486
- ],
2487
- "args": [
2488
- {
2489
- "name": "supply_growth_bps",
2490
- "type": "u16"
2491
- },
2492
- {
2493
- "name": "price_growth_bps",
2494
- "type": "u16"
2495
- }
2496
- ]
2497
- },
2498
- {
2499
- "name": "update_price_bounds",
2500
- "discriminator": [
2501
- 241,
2502
- 116,
2503
- 141,
2504
- 65,
2505
- 61,
2506
- 95,
2507
- 232,
2508
- 28
2509
- ],
2510
- "accounts": [
2511
- {
2512
- "name": "admin",
2513
- "writable": true,
2514
- "signer": true
2515
- },
2516
- {
2517
- "name": "tranche_state",
2518
- "writable": true
2519
- },
2520
- {
2521
- "name": "price_history",
2522
- "writable": true
2523
- },
2524
- {
2525
- "name": "system_program"
2526
- }
3276
+ "name": "sync_validator_selection_thresholds",
3277
+ "docs": [
3278
+ "Calculate and store entry/exit thresholds from validator leaderboard"
2527
3279
  ],
2528
- "args": [
2529
- {
2530
- "name": "min_price_usd",
2531
- "type": "i128"
2532
- },
2533
- {
2534
- "name": "max_price_usd",
2535
- "type": "i128"
2536
- },
2537
- {
2538
- "name": "max_staleness_seconds",
2539
- "type": "i64"
2540
- }
2541
- ]
2542
- },
2543
- {
2544
- "name": "update_user",
2545
3280
  "discriminator": [
2546
- 9,
2547
- 2,
2548
- 160,
2549
- 169,
2550
- 118,
2551
- 12,
2552
- 207,
2553
- 84
3281
+ 102,
3282
+ 171,
3283
+ 32,
3284
+ 136,
3285
+ 205,
3286
+ 105,
3287
+ 208,
3288
+ 225
2554
3289
  ],
2555
3290
  "accounts": [
2556
3291
  {
2557
- "name": "user",
2558
- "writable": true
3292
+ "name": "leaderboard_state"
2559
3293
  },
2560
3294
  {
2561
- "name": "user_ata",
3295
+ "name": "allocation_state",
2562
3296
  "writable": true
2563
3297
  },
2564
3298
  {
2565
- "name": "user_record",
3299
+ "name": "maintenance_ledger",
2566
3300
  "writable": true
2567
3301
  },
2568
3302
  {
2569
3303
  "name": "authority",
2570
- "docs": [
2571
- "Authority that can update this user record",
2572
- "- For manual registration: user's keypair",
2573
- "- For deposit flow: deposit program's program_authority PDA"
2574
- ],
2575
3304
  "signer": true
2576
- },
3305
+ }
3306
+ ],
3307
+ "args": []
3308
+ },
3309
+ {
3310
+ "name": "synd",
3311
+ "discriminator": [
3312
+ 153,
3313
+ 175,
3314
+ 231,
3315
+ 40,
3316
+ 44,
3317
+ 65,
3318
+ 175,
3319
+ 172
3320
+ ],
3321
+ "accounts": [
2577
3322
  {
2578
- "name": "payer",
2579
- "docs": [
2580
- "Payer for the user record PDA creation (always the user)"
2581
- ],
3323
+ "name": "user",
2582
3324
  "writable": true,
2583
3325
  "signer": true
2584
3326
  },
2585
3327
  {
2586
- "name": "distribution_state",
3328
+ "name": "liqsol_mint",
2587
3329
  "writable": true
2588
3330
  },
2589
3331
  {
2590
- "name": "liqsol_mint"
3332
+ "name": "global_state",
3333
+ "writable": true
2591
3334
  },
2592
3335
  {
2593
- "name": "instructions_sysvar"
3336
+ "name": "distribution_state",
3337
+ "writable": true
2594
3338
  },
2595
3339
  {
2596
- "name": "token_program"
3340
+ "name": "user_ata",
3341
+ "writable": true
2597
3342
  },
2598
3343
  {
2599
- "name": "pay_rate_history"
3344
+ "name": "pool_authority"
2600
3345
  },
2601
3346
  {
2602
3347
  "name": "bucket_authority"
2603
3348
  },
2604
3349
  {
2605
3350
  "name": "bucket_token_account",
2606
- "docs": [
2607
- "The bucket's associated token account holding liq"
2608
- ],
2609
3351
  "writable": true
2610
3352
  },
2611
3353
  {
2612
- "name": "system_program"
2613
- }
2614
- ],
2615
- "args": []
2616
- },
2617
- {
2618
- "name": "update_validator_info_v2",
2619
- "docs": [
2620
- "Update validator info fields (V2), function to force update a validator's info, should not be used unless in development for testing"
2621
- ],
2622
- "discriminator": [
2623
- 123,
2624
- 47,
2625
- 0,
2626
- 192,
2627
- 74,
2628
- 132,
2629
- 84,
2630
- 46
2631
- ],
2632
- "accounts": [
3354
+ "name": "bucket_user_record",
3355
+ "writable": true
3356
+ },
2633
3357
  {
2634
- "name": "validator_info",
3358
+ "name": "sender_user_record",
2635
3359
  "writable": true
2636
3360
  },
2637
3361
  {
2638
- "name": "stake_allocation_state",
2639
- "docs": [
2640
- "Stake allocation state - to update total_active_vpp when VPP changes"
2641
- ],
3362
+ "name": "receiver_user_record",
2642
3363
  "writable": true
2643
- }
2644
- ],
2645
- "args": [
3364
+ },
2646
3365
  {
2647
- "name": "vote_account",
2648
- "type": "pubkey"
3366
+ "name": "extra_account_meta_list"
2649
3367
  },
2650
3368
  {
2651
- "name": "current_active_stake_amount",
2652
- "type": {
2653
- "option": "u64"
2654
- }
3369
+ "name": "liqsol_core_program"
2655
3370
  },
2656
3371
  {
2657
- "name": "epoch_reward_amount",
2658
- "type": {
2659
- "option": "u64"
2660
- }
3372
+ "name": "transfer_hook_program"
2661
3373
  },
2662
3374
  {
2663
- "name": "transient_active_stake_amount",
2664
- "type": {
2665
- "option": "u64"
2666
- }
3375
+ "name": "liqsol_pool_ata",
3376
+ "writable": true
2667
3377
  },
2668
3378
  {
2669
- "name": "epoch",
2670
- "type": {
2671
- "option": "u64"
2672
- }
3379
+ "name": "outpost_account",
3380
+ "docs": [
3381
+ "User's pretoken deposit record"
3382
+ ],
3383
+ "writable": true
2673
3384
  },
2674
3385
  {
2675
- "name": "performance_score",
2676
- "type": {
2677
- "option": "u8"
2678
- }
3386
+ "name": "token_program"
3387
+ },
3388
+ {
3389
+ "name": "associated_token_program"
3390
+ },
3391
+ {
3392
+ "name": "system_program"
3393
+ }
3394
+ ],
3395
+ "args": [
3396
+ {
3397
+ "name": "amount",
3398
+ "type": "u64"
2679
3399
  }
2680
3400
  ]
2681
3401
  },
2682
3402
  {
2683
- "name": "update_validator_transient",
2684
- "docs": [
2685
- "Update validator transient tracking (V2), another function not to be really used in production except for testing//",
2686
- "TODO: discuss wether to let this function be ?"
2687
- ],
3403
+ "name": "test_clear_active_list",
2688
3404
  "discriminator": [
2689
- 124,
2690
- 36,
2691
- 28,
2692
- 172,
2693
- 25,
2694
- 233,
2695
- 39,
2696
- 219
3405
+ 17,
3406
+ 195,
3407
+ 59,
3408
+ 174,
3409
+ 184,
3410
+ 137,
3411
+ 149,
3412
+ 144
2697
3413
  ],
2698
3414
  "accounts": [
2699
3415
  {
2700
- "name": "validator_transient",
3416
+ "name": "active_list",
2701
3417
  "writable": true
2702
- }
2703
- ],
2704
- "args": [
2705
- {
2706
- "name": "vote_account",
2707
- "type": "pubkey"
2708
3418
  },
2709
3419
  {
2710
- "name": "max_resolved_epoch_deactivations",
2711
- "type": {
2712
- "option": "u16"
2713
- }
3420
+ "name": "processing_state",
3421
+ "writable": true
2714
3422
  },
2715
3423
  {
2716
- "name": "max_resolved_activating_stake",
2717
- "type": {
2718
- "option": "u16"
2719
- }
3424
+ "name": "authority",
3425
+ "signer": true
2720
3426
  }
2721
- ]
3427
+ ],
3428
+ "args": []
2722
3429
  },
2723
3430
  {
2724
- "name": "withdraw_stake",
3431
+ "name": "update_growth_parameters",
2725
3432
  "discriminator": [
2726
- 153,
2727
- 8,
2728
- 22,
2729
- 138,
2730
- 105,
2731
- 176,
2732
- 87,
2733
- 66
3433
+ 172,
3434
+ 187,
3435
+ 237,
3436
+ 233,
3437
+ 250,
3438
+ 160,
3439
+ 115,
3440
+ 239
2734
3441
  ],
2735
3442
  "accounts": [
2736
3443
  {
2737
- "name": "user",
3444
+ "name": "admin",
2738
3445
  "writable": true,
2739
3446
  "signer": true
2740
3447
  },
2741
3448
  {
2742
- "name": "liqsol_mint",
2743
- "writable": true
2744
- },
2745
- {
2746
- "name": "global_state",
3449
+ "name": "tranche_state",
2747
3450
  "writable": true
2748
3451
  },
2749
3452
  {
2750
- "name": "user_ata",
3453
+ "name": "price_history",
2751
3454
  "writable": true
2752
3455
  },
2753
3456
  {
2754
- "name": "pool_authority"
2755
- },
3457
+ "name": "system_program"
3458
+ }
3459
+ ],
3460
+ "args": [
2756
3461
  {
2757
- "name": "liqsol_pool_ata",
2758
- "writable": true
3462
+ "name": "supply_growth_bps",
3463
+ "type": "u16"
2759
3464
  },
2760
3465
  {
2761
- "name": "warrant_deposit_record",
2762
- "docs": [
2763
- "User's warrant deposit record"
2764
- ],
2765
- "writable": true
2766
- },
3466
+ "name": "price_growth_bps",
3467
+ "type": "u16"
3468
+ }
3469
+ ]
3470
+ },
3471
+ {
3472
+ "name": "update_price_bounds",
3473
+ "discriminator": [
3474
+ 241,
3475
+ 116,
3476
+ 141,
3477
+ 65,
3478
+ 61,
3479
+ 95,
3480
+ 232,
3481
+ 28
3482
+ ],
3483
+ "accounts": [
2767
3484
  {
2768
- "name": "liqsol_pool_user_record",
2769
- "docs": [
2770
- "Pool's UserRecord in distribution system (for yield tracking)"
2771
- ],
2772
- "writable": true
3485
+ "name": "admin",
3486
+ "writable": true,
3487
+ "signer": true
2773
3488
  },
2774
3489
  {
2775
- "name": "distribution_state",
3490
+ "name": "tranche_state",
2776
3491
  "writable": true
2777
3492
  },
2778
3493
  {
2779
- "name": "pay_rate_history"
2780
- },
2781
- {
2782
- "name": "bucket_authority"
2783
- },
2784
- {
2785
- "name": "bucket_token_account",
2786
- "docs": [
2787
- "The bucket's associated token account holding liqSOL"
2788
- ],
3494
+ "name": "price_history",
2789
3495
  "writable": true
2790
3496
  },
2791
- {
2792
- "name": "sol_bucket"
2793
- },
2794
- {
2795
- "name": "token_program"
2796
- },
2797
3497
  {
2798
3498
  "name": "system_program"
2799
3499
  }
2800
3500
  ],
2801
3501
  "args": [
2802
3502
  {
2803
- "name": "amount",
2804
- "type": "u64"
3503
+ "name": "min_price_usd",
3504
+ "type": "i128"
3505
+ },
3506
+ {
3507
+ "name": "max_price_usd",
3508
+ "type": "i128"
3509
+ },
3510
+ {
3511
+ "name": "max_staleness_seconds",
3512
+ "type": "i64"
2805
3513
  }
2806
3514
  ]
2807
3515
  }
@@ -2859,6 +3567,19 @@
2859
3567
  98
2860
3568
  ]
2861
3569
  },
3570
+ {
3571
+ "name": "LeaderboardState",
3572
+ "discriminator": [
3573
+ 211,
3574
+ 181,
3575
+ 29,
3576
+ 120,
3577
+ 189,
3578
+ 4,
3579
+ 106,
3580
+ 111
3581
+ ]
3582
+ },
2862
3583
  {
2863
3584
  "name": "LiqReceiptData",
2864
3585
  "discriminator": [
@@ -2885,6 +3606,19 @@
2885
3606
  39
2886
3607
  ]
2887
3608
  },
3609
+ {
3610
+ "name": "OutpostAccount",
3611
+ "discriminator": [
3612
+ 87,
3613
+ 205,
3614
+ 242,
3615
+ 192,
3616
+ 212,
3617
+ 51,
3618
+ 26,
3619
+ 93
3620
+ ]
3621
+ },
2888
3622
  {
2889
3623
  "name": "PayRateHistory",
2890
3624
  "discriminator": [
@@ -2989,6 +3723,19 @@
2989
3723
  105
2990
3724
  ]
2991
3725
  },
3726
+ {
3727
+ "name": "UserPretokenRecord",
3728
+ "discriminator": [
3729
+ 117,
3730
+ 99,
3731
+ 159,
3732
+ 251,
3733
+ 98,
3734
+ 253,
3735
+ 6,
3736
+ 238
3737
+ ]
3738
+ },
2992
3739
  {
2993
3740
  "name": "UserRecord",
2994
3741
  "discriminator": [
@@ -3002,32 +3749,6 @@
3002
3749
  167
3003
3750
  ]
3004
3751
  },
3005
- {
3006
- "name": "UserWarrantRecord",
3007
- "discriminator": [
3008
- 241,
3009
- 1,
3010
- 155,
3011
- 227,
3012
- 164,
3013
- 252,
3014
- 70,
3015
- 195
3016
- ]
3017
- },
3018
- {
3019
- "name": "UserWithdrawRecord",
3020
- "discriminator": [
3021
- 127,
3022
- 174,
3023
- 233,
3024
- 74,
3025
- 19,
3026
- 123,
3027
- 21,
3028
- 13
3029
- ]
3030
- },
3031
3752
  {
3032
3753
  "name": "ValidatorInfoAccount",
3033
3754
  "discriminator": [
@@ -3066,19 +3787,6 @@
3066
3787
  118,
3067
3788
  161
3068
3789
  ]
3069
- },
3070
- {
3071
- "name": "WireReceipt",
3072
- "discriminator": [
3073
- 166,
3074
- 10,
3075
- 172,
3076
- 11,
3077
- 51,
3078
- 126,
3079
- 156,
3080
- 221
3081
- ]
3082
3790
  }
3083
3791
  ],
3084
3792
  "events": [
@@ -3095,6 +3803,45 @@
3095
3803
  65
3096
3804
  ]
3097
3805
  },
3806
+ {
3807
+ "name": "GraveyardDeactivationQueuedEvent",
3808
+ "discriminator": [
3809
+ 131,
3810
+ 241,
3811
+ 122,
3812
+ 229,
3813
+ 108,
3814
+ 21,
3815
+ 67,
3816
+ 37
3817
+ ]
3818
+ },
3819
+ {
3820
+ "name": "GraveyardValidatorCleanedEvent",
3821
+ "discriminator": [
3822
+ 3,
3823
+ 252,
3824
+ 58,
3825
+ 228,
3826
+ 135,
3827
+ 135,
3828
+ 104,
3829
+ 34
3830
+ ]
3831
+ },
3832
+ {
3833
+ "name": "PretokenPurchased",
3834
+ "discriminator": [
3835
+ 39,
3836
+ 1,
3837
+ 143,
3838
+ 191,
3839
+ 8,
3840
+ 14,
3841
+ 80,
3842
+ 41
3843
+ ]
3844
+ },
3098
3845
  {
3099
3846
  "name": "StakesMerged",
3100
3847
  "discriminator": [
@@ -3108,6 +3855,45 @@
3108
3855
  97
3109
3856
  ]
3110
3857
  },
3858
+ {
3859
+ "name": "ValidatorAddedEvent",
3860
+ "discriminator": [
3861
+ 71,
3862
+ 123,
3863
+ 103,
3864
+ 213,
3865
+ 174,
3866
+ 178,
3867
+ 82,
3868
+ 130
3869
+ ]
3870
+ },
3871
+ {
3872
+ "name": "ValidatorRemovedEvent",
3873
+ "discriminator": [
3874
+ 49,
3875
+ 23,
3876
+ 179,
3877
+ 208,
3878
+ 124,
3879
+ 3,
3880
+ 231,
3881
+ 59
3882
+ ]
3883
+ },
3884
+ {
3885
+ "name": "ValidatorSwappedEvent",
3886
+ "discriminator": [
3887
+ 33,
3888
+ 50,
3889
+ 10,
3890
+ 35,
3891
+ 69,
3892
+ 113,
3893
+ 96,
3894
+ 180
3895
+ ]
3896
+ },
3111
3897
  {
3112
3898
  "name": "ValidatorsSyncedEvent",
3113
3899
  "discriminator": [
@@ -3151,8 +3937,118 @@
3151
3937
  "errors": [
3152
3938
  {
3153
3939
  "code": 6000,
3154
- "name": "AccountBorrowFailed",
3155
- "msg": "Util Acc borrow Failed"
3940
+ "name": "DestinationAccountDoesNotExist",
3941
+ "msg": "Destination stake account does not exist"
3942
+ },
3943
+ {
3944
+ "code": 6001,
3945
+ "name": "SourceAccountDoesNotExist",
3946
+ "msg": "Source stake account does not exist"
3947
+ },
3948
+ {
3949
+ "code": 6002,
3950
+ "name": "InvalidDestinationOwner",
3951
+ "msg": "Destination account not owned by stake program"
3952
+ },
3953
+ {
3954
+ "code": 6003,
3955
+ "name": "InvalidSourceOwner",
3956
+ "msg": "Source account not owned by stake program"
3957
+ },
3958
+ {
3959
+ "code": 6004,
3960
+ "name": "ClockBorrowFailed",
3961
+ "msg": "Failed to borrow clock data"
3962
+ },
3963
+ {
3964
+ "code": 6005,
3965
+ "name": "ClockDeserializeFailed",
3966
+ "msg": "Failed to deserialize clock"
3967
+ },
3968
+ {
3969
+ "code": 6006,
3970
+ "name": "DestinationAnalysisFailed",
3971
+ "msg": "Failed to analyze destination stake account"
3972
+ },
3973
+ {
3974
+ "code": 6007,
3975
+ "name": "SourceAnalysisFailed",
3976
+ "msg": "Failed to analyze source stake account"
3977
+ },
3978
+ {
3979
+ "code": 6008,
3980
+ "name": "DestinationStillActivating",
3981
+ "msg": "Destination stake is still activating"
3982
+ },
3983
+ {
3984
+ "code": 6009,
3985
+ "name": "DestinationDeactivating",
3986
+ "msg": "Destination stake is deactivating"
3987
+ },
3988
+ {
3989
+ "code": 6010,
3990
+ "name": "SourceStillActivating",
3991
+ "msg": "Source stake is still activating"
3992
+ },
3993
+ {
3994
+ "code": 6011,
3995
+ "name": "SourceDeactivating",
3996
+ "msg": "Source stake is deactivating"
3997
+ },
3998
+ {
3999
+ "code": 6012,
4000
+ "name": "DestinationBorrowFailed",
4001
+ "msg": "Failed to borrow destination account data"
4002
+ },
4003
+ {
4004
+ "code": 6013,
4005
+ "name": "DestinationParseFailed",
4006
+ "msg": "Failed to parse destination stake state"
4007
+ },
4008
+ {
4009
+ "code": 6014,
4010
+ "name": "SourceBorrowFailed",
4011
+ "msg": "Failed to borrow source account data"
4012
+ },
4013
+ {
4014
+ "code": 6015,
4015
+ "name": "SourceParseFailed",
4016
+ "msg": "Failed to parse source stake state"
4017
+ },
4018
+ {
4019
+ "code": 6016,
4020
+ "name": "DifferentValidators",
4021
+ "msg": "Stakes are delegated to different validators"
4022
+ },
4023
+ {
4024
+ "code": 6017,
4025
+ "name": "DifferentStakers",
4026
+ "msg": "Stakes have different staker authorities"
4027
+ },
4028
+ {
4029
+ "code": 6018,
4030
+ "name": "DifferentWithdrawers",
4031
+ "msg": "Stakes have different withdrawer authorities"
4032
+ },
4033
+ {
4034
+ "code": 6019,
4035
+ "name": "AuthoritiesNotFound",
4036
+ "msg": "Could not extract authorities from accounts"
4037
+ },
4038
+ {
4039
+ "code": 6020,
4040
+ "name": "MergeInstructionFailed",
4041
+ "msg": "Merge instruction failed"
4042
+ },
4043
+ {
4044
+ "code": 6021,
4045
+ "name": "EpochRewardsActive",
4046
+ "msg": "Epoch rewards distribution is active - stake operations blocked"
4047
+ },
4048
+ {
4049
+ "code": 6022,
4050
+ "name": "DifferentCreditsObserved",
4051
+ "msg": "Stakes have different credits_observed - cannot merge until both earn same rewards"
3156
4052
  }
3157
4053
  ],
3158
4054
  "types": [
@@ -3165,41 +4061,25 @@
3165
4061
  "name": "validators_processed_this_epoch",
3166
4062
  "type": "u8"
3167
4063
  },
3168
- {
3169
- "name": "current_merge_processing_epoch",
3170
- "docs": [
3171
- "Intra batch state, how many validators have been processed for activating transient merges - reset to 0 at the end of each epoch OR at the beginning of the function call when there is a mismatch",
3172
- "between the current_merge_processing_epoch and the actual current epoch//"
3173
- ],
3174
- "type": "u64"
3175
- },
3176
4064
  {
3177
4065
  "name": "validators_merge_processed_this_epoch",
3178
- "type": "u8"
3179
- },
3180
- {
3181
- "name": "current_deactivating_merge_epoch",
3182
- "type": "u64"
4066
+ "type": "u16"
3183
4067
  },
3184
4068
  {
3185
4069
  "name": "validators_deactivating_merge_processed",
3186
- "type": "u8"
4070
+ "type": "u16"
3187
4071
  },
3188
4072
  {
3189
4073
  "name": "validators_sync_processed_this_epoch",
3190
- "type": "u8"
4074
+ "type": "u16"
3191
4075
  },
3192
4076
  {
3193
4077
  "name": "validators_unstake_processed_this_epoch",
3194
- "type": "u8"
3195
- },
3196
- {
3197
- "name": "distribution_in_progress",
3198
- "type": "bool"
4078
+ "type": "u16"
3199
4079
  },
3200
4080
  {
3201
4081
  "name": "validators_aggregate_processed_this_epoch",
3202
- "type": "u8"
4082
+ "type": "u16"
3203
4083
  },
3204
4084
  {
3205
4085
  "name": "temp_total_active_stake",
@@ -3220,6 +4100,64 @@
3220
4100
  {
3221
4101
  "name": "bump",
3222
4102
  "type": "u8"
4103
+ },
4104
+ {
4105
+ "name": "infra_next_index",
4106
+ "docs": [
4107
+ "Next active_list index to process for PDA setup"
4108
+ ],
4109
+ "type": "u16"
4110
+ },
4111
+ {
4112
+ "name": "infos_next_index",
4113
+ "docs": [
4114
+ "Next active_list index to process for infos sync"
4115
+ ],
4116
+ "type": "u16"
4117
+ },
4118
+ {
4119
+ "name": "removal_next_index",
4120
+ "docs": [
4121
+ "Next index in active list to check for removal"
4122
+ ],
4123
+ "type": "u16"
4124
+ },
4125
+ {
4126
+ "name": "addition_next_rank",
4127
+ "docs": [
4128
+ "Next rank in leaderboard to check for addition"
4129
+ ],
4130
+ "type": "u16"
4131
+ },
4132
+ {
4133
+ "name": "addition_target_rank",
4134
+ "docs": [
4135
+ "Target (inclusive) leaderboard rank to process up to"
4136
+ ],
4137
+ "type": "u16"
4138
+ },
4139
+ {
4140
+ "name": "graveyard_next_index",
4141
+ "docs": [
4142
+ "Next index in graveyard list to process"
4143
+ ],
4144
+ "type": "u16"
4145
+ },
4146
+ {
4147
+ "name": "graveyard_cleanup_next_index",
4148
+ "docs": [
4149
+ "Next index in graveyard list to check for cleanup"
4150
+ ],
4151
+ "type": "u16"
4152
+ },
4153
+ {
4154
+ "name": "_reserved",
4155
+ "type": {
4156
+ "array": [
4157
+ "u8",
4158
+ 32
4159
+ ]
4160
+ }
3223
4161
  }
3224
4162
  ]
3225
4163
  }
@@ -3234,16 +4172,54 @@
3234
4172
  "type": "pubkey"
3235
4173
  },
3236
4174
  {
3237
- "name": "total_tracked_balance",
4175
+ "name": "current_index",
4176
+ "type": "u64"
4177
+ },
4178
+ {
4179
+ "name": "total_shares",
4180
+ "docs": [
4181
+ "Sum of all user shares across the system"
4182
+ ],
3238
4183
  "type": "u64"
3239
4184
  },
3240
4185
  {
3241
- "name": "available_balance",
4186
+ "name": "last_bucket_balance",
4187
+ "docs": [
4188
+ "Last observed bucket balance used for incremental index updates"
4189
+ ],
3242
4190
  "type": "u64"
3243
4191
  },
3244
4192
  {
3245
4193
  "name": "bump",
3246
4194
  "type": "u8"
4195
+ },
4196
+ {
4197
+ "name": "bucket_bump",
4198
+ "docs": [
4199
+ "Cached bucket authority bump to avoid repeated find_program_address calls"
4200
+ ],
4201
+ "type": "u8"
4202
+ },
4203
+ {
4204
+ "name": "pool_bump",
4205
+ "docs": [
4206
+ "Cached pool authority bump to avoid repeated find_program_address calls"
4207
+ ],
4208
+ "type": "u8"
4209
+ },
4210
+ {
4211
+ "name": "bucket_authority",
4212
+ "docs": [
4213
+ "Cached bucket authority pubkey for transfer-hook optimization"
4214
+ ],
4215
+ "type": "pubkey"
4216
+ },
4217
+ {
4218
+ "name": "pool_authority",
4219
+ "docs": [
4220
+ "Cached pool authority pubkey for transfer-hook optimization"
4221
+ ],
4222
+ "type": "pubkey"
3247
4223
  }
3248
4224
  ]
3249
4225
  }
@@ -3285,6 +4261,13 @@
3285
4261
  "name": "bump",
3286
4262
  "type": "u8"
3287
4263
  },
4264
+ {
4265
+ "name": "authority",
4266
+ "docs": [
4267
+ "Authority that can update serviceable_epoch"
4268
+ ],
4269
+ "type": "pubkey"
4270
+ },
3288
4271
  {
3289
4272
  "name": "liqsol_mint",
3290
4273
  "docs": [
@@ -3295,7 +4278,22 @@
3295
4278
  {
3296
4279
  "name": "serviceable_epoch",
3297
4280
  "docs": [
3298
- "Highest epoch that is currently claimable."
4281
+ "Highest epoch that is currently claimable."
4282
+ ],
4283
+ "type": "u64"
4284
+ },
4285
+ {
4286
+ "name": "total_encumbered_funds",
4287
+ "docs": [
4288
+ "Total SOL encumbered for pending withdrawal requests.",
4289
+ "This amount is reserved from the reserve pool and will be paid out when receipts are claimed."
4290
+ ],
4291
+ "type": "u64"
4292
+ },
4293
+ {
4294
+ "name": "next_receipt_id",
4295
+ "docs": [
4296
+ "Monotonic counter for generating unique receipt IDs"
3299
4297
  ],
3300
4298
  "type": "u64"
3301
4299
  }
@@ -3311,25 +4309,8 @@
3311
4309
  "name": "admin",
3312
4310
  "type": "pubkey"
3313
4311
  },
3314
- {
3315
- "name": "d_day",
3316
- "docs": [
3317
- "D-Day flag - when true, staking withdrawals are disabled"
3318
- ],
3319
- "type": "bool"
3320
- },
3321
- {
3322
- "name": "refund_active",
3323
- "docs": [
3324
- "Refund flag - when true, users may burn their positions for principal"
3325
- ],
3326
- "type": "bool"
3327
- },
3328
4312
  {
3329
4313
  "name": "deployed_at",
3330
- "docs": [
3331
- "Delay before refunds automatically activate (seconds)"
3332
- ],
3333
4314
  "type": "i64"
3334
4315
  },
3335
4316
  {
@@ -3346,28 +4327,28 @@
3346
4327
  {
3347
4328
  "name": "total_staked_liqsol",
3348
4329
  "docs": [
3349
- "Aggregate liqSOL staked through warrants (maps to distribution tracked balance)"
4330
+ "Aggregate liqSOL staked through pretokens (maps to distribution tracked balance)"
3350
4331
  ],
3351
4332
  "type": "u64"
3352
4333
  },
3353
4334
  {
3354
4335
  "name": "total_purchased_liqsol",
3355
4336
  "docs": [
3356
- "Aggregate liqSOL warrant purchases (part of distribution tracked balance)"
4337
+ "Aggregate liqSOL pretoken purchases (part of distribution tracked balance)"
3357
4338
  ],
3358
4339
  "type": "u64"
3359
4340
  },
3360
4341
  {
3361
- "name": "total_purchased_sol",
4342
+ "name": "total_shares",
3362
4343
  "docs": [
3363
- "Aggregate raw SOL warrant purchases (custodied in SOL bucket)"
4344
+ "Total shares issued to all users (for share/index yield isolation)"
3364
4345
  ],
3365
4346
  "type": "u64"
3366
4347
  },
3367
4348
  {
3368
- "name": "total_shares",
4349
+ "name": "protocol_shares",
3369
4350
  "docs": [
3370
- "Total shares issued to all users (for share/index yield isolation)"
4351
+ "Total shares issued to protocol (for share/index yield isolation)"
3371
4352
  ],
3372
4353
  "type": "u64"
3373
4354
  },
@@ -3382,27 +4363,172 @@
3382
4363
  {
3383
4364
  "name": "last_pool_liqsol_balance",
3384
4365
  "docs": [
3385
- "Last observed liqSOL pool balance (for proportional yield calculation)"
4366
+ "Last observed liqSOL pool balance (for yield calculation)"
3386
4367
  ],
3387
4368
  "type": "u64"
3388
4369
  },
3389
4370
  {
3390
- "name": "last_pool_sol_balance",
4371
+ "name": "yield_accumulated_liqsol",
3391
4372
  "docs": [
3392
- "Last observed raw SOL pool balance (for proportional yield calculation)"
4373
+ "Accumulated liqSOL yield available for protocol pretoken purchases"
3393
4374
  ],
3394
4375
  "type": "u64"
3395
4376
  },
3396
4377
  {
3397
- "name": "yield_accumulated_sol_eq",
4378
+ "name": "role_principals",
4379
+ "docs": [
4380
+ "Required principal (liqSOL) per role [YieldOp, BatchOp, Underwriter, PoolOp]"
4381
+ ],
4382
+ "type": {
4383
+ "array": [
4384
+ "u64",
4385
+ 4
4386
+ ]
4387
+ }
4388
+ },
4389
+ {
4390
+ "name": "role_warmup_duration",
3398
4391
  "docs": [
3399
- "Accumulated yield (in equivalent units) available for protocol warrant purchases"
4392
+ "Warmup duration in seconds (applies when ANY new role is bonded)"
3400
4393
  ],
4394
+ "type": "i64"
4395
+ },
4396
+ {
4397
+ "name": "wire_state",
4398
+ "type": {
4399
+ "defined": {
4400
+ "name": "WireState"
4401
+ }
4402
+ }
4403
+ },
4404
+ {
4405
+ "name": "bump",
4406
+ "type": "u8"
4407
+ }
4408
+ ]
4409
+ }
4410
+ },
4411
+ {
4412
+ "name": "GraveyardDeactivationQueuedEvent",
4413
+ "docs": [
4414
+ "Event emitted when a graveyard validator's main stake deactivation is queued"
4415
+ ],
4416
+ "type": {
4417
+ "kind": "struct",
4418
+ "fields": [
4419
+ {
4420
+ "name": "vote_account",
4421
+ "type": "pubkey"
4422
+ },
4423
+ {
4424
+ "name": "amount_to_unstake",
3401
4425
  "type": "u64"
4426
+ }
4427
+ ]
4428
+ }
4429
+ },
4430
+ {
4431
+ "name": "GraveyardValidatorCleanedEvent",
4432
+ "docs": [
4433
+ "Event emitted when a graveyard validator is cleaned up"
4434
+ ],
4435
+ "type": {
4436
+ "kind": "struct",
4437
+ "fields": [
4438
+ {
4439
+ "name": "vote_account",
4440
+ "type": "pubkey"
4441
+ },
4442
+ {
4443
+ "name": "epochs_since_state_change",
4444
+ "type": "u16"
4445
+ }
4446
+ ]
4447
+ }
4448
+ },
4449
+ {
4450
+ "name": "LeaderboardState",
4451
+ "docs": [
4452
+ "Central leaderboard state using parallel arrays for efficient ranking and CPI access",
4453
+ "Stores VPP scores and sorted rankings for up to 1024 validators",
4454
+ "Uses zero-copy for efficient access from other programs via CPI"
4455
+ ],
4456
+ "serialization": "bytemuck",
4457
+ "repr": {
4458
+ "kind": "c"
4459
+ },
4460
+ "type": {
4461
+ "kind": "struct",
4462
+ "fields": [
4463
+ {
4464
+ "name": "scores",
4465
+ "docs": [
4466
+ "VPP scores indexed by registry_index (0-100 range)",
4467
+ "registry_index is assigned on first validator registration and never changes"
4468
+ ],
4469
+ "type": {
4470
+ "array": [
4471
+ "u8",
4472
+ 1024
4473
+ ]
4474
+ }
4475
+ },
4476
+ {
4477
+ "name": "sorted_indices",
4478
+ "docs": [
4479
+ "Validator indices sorted by VPP score descending",
4480
+ "sorted_indices[0] = registry_index of highest VPP validator",
4481
+ "sorted_indices[1] = registry_index of 2nd highest VPP validator, etc."
4482
+ ],
4483
+ "type": {
4484
+ "array": [
4485
+ "u16",
4486
+ 1024
4487
+ ]
4488
+ }
4489
+ },
4490
+ {
4491
+ "name": "vote_accounts",
4492
+ "docs": [
4493
+ "Vote account pubkeys indexed by registry_index",
4494
+ "Allows CPI callers to get vote accounts for top N validators"
4495
+ ],
4496
+ "type": {
4497
+ "array": [
4498
+ {
4499
+ "defined": {
4500
+ "name": "PubkeyBytes"
4501
+ }
4502
+ },
4503
+ 1024
4504
+ ]
4505
+ }
4506
+ },
4507
+ {
4508
+ "name": "num_validators",
4509
+ "docs": [
4510
+ "Number of active validators currently in the leaderboard"
4511
+ ],
4512
+ "type": "u16"
3402
4513
  },
3403
4514
  {
3404
4515
  "name": "bump",
4516
+ "docs": [
4517
+ "PDA bump seed"
4518
+ ],
3405
4519
  "type": "u8"
4520
+ },
4521
+ {
4522
+ "name": "_padding",
4523
+ "docs": [
4524
+ "Reserved space for future upgrades"
4525
+ ],
4526
+ "type": {
4527
+ "array": [
4528
+ "u8",
4529
+ 5
4530
+ ]
4531
+ }
3406
4532
  }
3407
4533
  ]
3408
4534
  }
@@ -3436,6 +4562,14 @@
3436
4562
  "name": "last_sync_epoch",
3437
4563
  "type": "u16"
3438
4564
  },
4565
+ {
4566
+ "name": "last_validator_score_sync_epoch",
4567
+ "type": "u16"
4568
+ },
4569
+ {
4570
+ "name": "last_active_infos_synced_epoch",
4571
+ "type": "u16"
4572
+ },
3439
4573
  {
3440
4574
  "name": "last_updated_stake_metrics_epoch",
3441
4575
  "type": "u64"
@@ -3478,6 +4612,137 @@
3478
4612
  "name": "min_max_resolved_epoch_deactivations",
3479
4613
  "type": "u16"
3480
4614
  },
4615
+ {
4616
+ "name": "last_threshold_sync_epoch",
4617
+ "type": "u16"
4618
+ },
4619
+ {
4620
+ "name": "last_validator_removal_selection_epoch",
4621
+ "type": "u16"
4622
+ },
4623
+ {
4624
+ "name": "last_validator_addition_selection_epoch",
4625
+ "type": "u16"
4626
+ },
4627
+ {
4628
+ "name": "last_validator_pda_setup_epoch",
4629
+ "type": "u16"
4630
+ },
4631
+ {
4632
+ "name": "last_graveyard_processing_epoch",
4633
+ "type": "u16"
4634
+ },
4635
+ {
4636
+ "name": "last_post_sync_stake_metrics_refresh_epoch",
4637
+ "type": "u16"
4638
+ },
4639
+ {
4640
+ "name": "last_graveyard_cleanup_epoch",
4641
+ "type": "u16"
4642
+ },
4643
+ {
4644
+ "name": "last_post_late_epoch_stake_metrics_refresh_epoch",
4645
+ "type": "u16"
4646
+ },
4647
+ {
4648
+ "name": "bump",
4649
+ "type": "u8"
4650
+ }
4651
+ ]
4652
+ }
4653
+ },
4654
+ {
4655
+ "name": "MetadataArgs",
4656
+ "type": {
4657
+ "kind": "struct",
4658
+ "fields": [
4659
+ {
4660
+ "name": "name",
4661
+ "type": "string"
4662
+ },
4663
+ {
4664
+ "name": "symbol",
4665
+ "type": "string"
4666
+ },
4667
+ {
4668
+ "name": "uri",
4669
+ "type": "string"
4670
+ }
4671
+ ]
4672
+ }
4673
+ },
4674
+ {
4675
+ "name": "OutpostAccount",
4676
+ "type": {
4677
+ "kind": "struct",
4678
+ "fields": [
4679
+ {
4680
+ "name": "user",
4681
+ "type": "pubkey"
4682
+ },
4683
+ {
4684
+ "name": "staked_liqsol",
4685
+ "docs": [
4686
+ "STAKE deposits (withdrawable pre-D-Day)",
4687
+ "Principal amount staked (for display/tracking)"
4688
+ ],
4689
+ "type": "u64"
4690
+ },
4691
+ {
4692
+ "name": "staked_shares",
4693
+ "docs": [
4694
+ "Shares from staking (actual accounting for yield isolation)"
4695
+ ],
4696
+ "type": "u64"
4697
+ },
4698
+ {
4699
+ "name": "purchased_liqsol",
4700
+ "docs": [
4701
+ "WARRANT_PURCHASE deposits with liqSOL (permanent)",
4702
+ "Principal amount spent on pretokens (for display/tracking)"
4703
+ ],
4704
+ "type": "u64"
4705
+ },
4706
+ {
4707
+ "name": "purchased_shares",
4708
+ "docs": [
4709
+ "Shares from liqSOL pretoken purchases (actual accounting for yield isolation)"
4710
+ ],
4711
+ "type": "u64"
4712
+ },
4713
+ {
4714
+ "name": "bonded_principals",
4715
+ "docs": [
4716
+ "LiqSOL locked by bonds per role"
4717
+ ],
4718
+ "type": {
4719
+ "array": [
4720
+ "u64",
4721
+ 4
4722
+ ]
4723
+ }
4724
+ },
4725
+ {
4726
+ "name": "bonded_roles",
4727
+ "docs": [
4728
+ "Bitmap of bonded roles (bits 0-3 for YieldOp, BatchOp, Underwriter, PoolOp)"
4729
+ ],
4730
+ "type": "u8"
4731
+ },
4732
+ {
4733
+ "name": "unbond_requested",
4734
+ "docs": [
4735
+ "Bitmap of roles with pending unbond requests (bits 0-3)"
4736
+ ],
4737
+ "type": "u8"
4738
+ },
4739
+ {
4740
+ "name": "warmup_ends_at",
4741
+ "docs": [
4742
+ "Warmup end timestamp - has_role returns false until this time"
4743
+ ],
4744
+ "type": "i64"
4745
+ },
3481
4746
  {
3482
4747
  "name": "bump",
3483
4748
  "type": "u8"
@@ -3561,16 +4826,36 @@
3561
4826
  "type": "u64"
3562
4827
  },
3563
4828
  {
3564
- "name": "timestamp",
3565
- "type": "i64"
4829
+ "name": "timestamp",
4830
+ "type": "i64"
4831
+ },
4832
+ {
4833
+ "name": "epoch",
4834
+ "type": "u16"
4835
+ },
4836
+ {
4837
+ "name": "bump",
4838
+ "type": "u8"
4839
+ }
4840
+ ]
4841
+ }
4842
+ },
4843
+ {
4844
+ "name": "PretokenPurchased",
4845
+ "type": {
4846
+ "kind": "struct",
4847
+ "fields": [
4848
+ {
4849
+ "name": "user",
4850
+ "type": "pubkey"
3566
4851
  },
3567
4852
  {
3568
- "name": "epoch",
3569
- "type": "u16"
4853
+ "name": "tranche_number",
4854
+ "type": "u64"
3570
4855
  },
3571
4856
  {
3572
- "name": "bump",
3573
- "type": "u8"
4857
+ "name": "pretokens_purchased",
4858
+ "type": "i128"
3574
4859
  }
3575
4860
  ]
3576
4861
  }
@@ -3621,6 +4906,54 @@
3621
4906
  ]
3622
4907
  }
3623
4908
  },
4909
+ {
4910
+ "name": "PubkeyBytes",
4911
+ "docs": [
4912
+ "Fixed-size representation of a `Pubkey` that satisfies Anchor's zero-copy rules.",
4913
+ "Stores the raw 32-byte array and offers helpers to convert to/from `Pubkey`."
4914
+ ],
4915
+ "serialization": "bytemuck",
4916
+ "repr": {
4917
+ "kind": "transparent"
4918
+ },
4919
+ "type": {
4920
+ "kind": "struct",
4921
+ "fields": [
4922
+ {
4923
+ "name": "bytes",
4924
+ "type": {
4925
+ "array": [
4926
+ "u8",
4927
+ 32
4928
+ ]
4929
+ }
4930
+ }
4931
+ ]
4932
+ }
4933
+ },
4934
+ {
4935
+ "name": "Role",
4936
+ "repr": {
4937
+ "kind": "rust"
4938
+ },
4939
+ "type": {
4940
+ "kind": "enum",
4941
+ "variants": [
4942
+ {
4943
+ "name": "YieldOperator"
4944
+ },
4945
+ {
4946
+ "name": "BatchOperator"
4947
+ },
4948
+ {
4949
+ "name": "Underwriter"
4950
+ },
4951
+ {
4952
+ "name": "PoolOperator"
4953
+ }
4954
+ ]
4955
+ }
4956
+ },
3624
4957
  {
3625
4958
  "name": "StakeAllocationState",
3626
4959
  "docs": [
@@ -3633,9 +4966,10 @@
3633
4966
  {
3634
4967
  "name": "total_active_vpp",
3635
4968
  "docs": [
3636
- "Sum of all VPP scores for Trusted validators in the active list"
4969
+ "Sum of all VPP scores (0-100 each) for Trusted validators in the active list",
4970
+ "Max with 200 validators at 100 each = 20,000, fits in u32"
3637
4971
  ],
3638
- "type": "u64"
4972
+ "type": "u32"
3639
4973
  },
3640
4974
  {
3641
4975
  "name": "bump",
@@ -3681,6 +5015,13 @@
3681
5015
  ],
3682
5016
  "type": "u64"
3683
5017
  },
5018
+ {
5019
+ "name": "amount_distributed_this_unstake_allocation",
5020
+ "docs": [
5021
+ "Tracks cumulative amount distributed across all batches in current unstake allocation cycle"
5022
+ ],
5023
+ "type": "u64"
5024
+ },
3684
5025
  {
3685
5026
  "name": "rebalance_in_progress",
3686
5027
  "docs": [
@@ -3702,6 +5043,91 @@
3702
5043
  "Saved at the start to ensure consistency across all batches"
3703
5044
  ],
3704
5045
  "type": "u64"
5046
+ },
5047
+ {
5048
+ "name": "cumulative_stake_requested_this_rebalance",
5049
+ "docs": [
5050
+ "Tracks cumulative stake requested (sum of positive deltas) across all batches in current rebalance cycle"
5051
+ ],
5052
+ "type": "u64"
5053
+ },
5054
+ {
5055
+ "name": "rebalance_stake_scale_factor",
5056
+ "docs": [
5057
+ "Scale factor to apply during process_stake_orders (uses PAY_RATE_SCALE_FACTOR precision)",
5058
+ "Set to PAY_RATE_SCALE_FACTOR (1.0) if no scaling needed, or lower if cumulative > available"
5059
+ ],
5060
+ "type": "u64"
5061
+ },
5062
+ {
5063
+ "name": "selection_entry_threshold_vpp",
5064
+ "docs": [
5065
+ "Entry threshold VPP from leaderboard (validators must meet this to be added, 0-100)"
5066
+ ],
5067
+ "type": "u8"
5068
+ },
5069
+ {
5070
+ "name": "selection_exit_threshold_vpp",
5071
+ "docs": [
5072
+ "Exit threshold VPP from leaderboard (validators below this are removed, 0-100)"
5073
+ ],
5074
+ "type": "u8"
5075
+ },
5076
+ {
5077
+ "name": "addition_in_progress",
5078
+ "docs": [
5079
+ "Whether validator addition selection is currently in progress (batched processing)"
5080
+ ],
5081
+ "type": "bool"
5082
+ },
5083
+ {
5084
+ "name": "addition_next_rank",
5085
+ "docs": [
5086
+ "Next rank to process in leaderboard sorted_indices"
5087
+ ],
5088
+ "type": "u16"
5089
+ },
5090
+ {
5091
+ "name": "addition_target_rank",
5092
+ "docs": [
5093
+ "Target rank to process up to (inclusive)"
5094
+ ],
5095
+ "type": "u16"
5096
+ },
5097
+ {
5098
+ "name": "validators_added_this_selection",
5099
+ "docs": [
5100
+ "Number of validators added in the current selection cycle"
5101
+ ],
5102
+ "type": "u16"
5103
+ },
5104
+ {
5105
+ "name": "removal_in_progress",
5106
+ "docs": [
5107
+ "Whether validator removal selection is currently in progress (batched processing)"
5108
+ ],
5109
+ "type": "bool"
5110
+ },
5111
+ {
5112
+ "name": "removal_next_index",
5113
+ "docs": [
5114
+ "Next index in active list to check for removal"
5115
+ ],
5116
+ "type": "u16"
5117
+ },
5118
+ {
5119
+ "name": "removal_active_list_snapshot",
5120
+ "docs": [
5121
+ "Snapshot of active list count at start of removal (frozen)"
5122
+ ],
5123
+ "type": "u16"
5124
+ },
5125
+ {
5126
+ "name": "validators_removed_this_selection",
5127
+ "docs": [
5128
+ "Number of validators removed in the current selection cycle"
5129
+ ],
5130
+ "type": "u16"
3705
5131
  }
3706
5132
  ]
3707
5133
  }
@@ -3836,7 +5262,7 @@
3836
5262
  "type": "i128"
3837
5263
  },
3838
5264
  {
3839
- "name": "total_warrants_sold",
5265
+ "name": "total_pretokens_sold",
3840
5266
  "type": "i128"
3841
5267
  },
3842
5268
  {
@@ -3900,25 +5326,29 @@
3900
5326
  }
3901
5327
  },
3902
5328
  {
3903
- "name": "UserRecord",
5329
+ "name": "UserPretokenRecord",
3904
5330
  "type": {
3905
5331
  "kind": "struct",
3906
5332
  "fields": [
3907
5333
  {
3908
- "name": "user_ata",
5334
+ "name": "user",
3909
5335
  "type": "pubkey"
3910
5336
  },
3911
5337
  {
3912
- "name": "tracked_balance",
5338
+ "name": "total_sol_deposited",
3913
5339
  "type": "u64"
3914
5340
  },
3915
5341
  {
3916
- "name": "claim_balance",
5342
+ "name": "total_pretokens_purchased",
5343
+ "type": "i128"
5344
+ },
5345
+ {
5346
+ "name": "last_tranche_number",
3917
5347
  "type": "u64"
3918
5348
  },
3919
5349
  {
3920
- "name": "last_claim_timestamp",
3921
- "type": "i64"
5350
+ "name": "last_tranche_price_usd",
5351
+ "type": "i128"
3922
5352
  },
3923
5353
  {
3924
5354
  "name": "bump",
@@ -3928,30 +5358,18 @@
3928
5358
  }
3929
5359
  },
3930
5360
  {
3931
- "name": "UserWarrantRecord",
5361
+ "name": "UserRecord",
3932
5362
  "type": {
3933
5363
  "kind": "struct",
3934
5364
  "fields": [
3935
5365
  {
3936
- "name": "user",
3937
- "type": "pubkey"
3938
- },
3939
- {
3940
- "name": "total_sol_deposited",
3941
- "type": "u64"
3942
- },
3943
- {
3944
- "name": "total_warrants_purchased",
3945
- "type": "i128"
3946
- },
3947
- {
3948
- "name": "last_tranche_number",
5366
+ "name": "shares",
5367
+ "docs": [
5368
+ "User's share of the distribution pool",
5369
+ "entitled_balance = shares * current_index / INDEX_SCALE"
5370
+ ],
3949
5371
  "type": "u64"
3950
5372
  },
3951
- {
3952
- "name": "last_tranche_price_usd",
3953
- "type": "i128"
3954
- },
3955
5373
  {
3956
5374
  "name": "bump",
3957
5375
  "type": "u8"
@@ -3960,17 +5378,17 @@
3960
5378
  }
3961
5379
  },
3962
5380
  {
3963
- "name": "UserWithdrawRecord",
5381
+ "name": "ValidatorAddedEvent",
3964
5382
  "type": {
3965
5383
  "kind": "struct",
3966
5384
  "fields": [
3967
5385
  {
3968
- "name": "bump",
3969
- "type": "u8"
5386
+ "name": "vote_account",
5387
+ "type": "pubkey"
3970
5388
  },
3971
5389
  {
3972
- "name": "tracked_balance",
3973
- "type": "u64"
5390
+ "name": "vpp",
5391
+ "type": "u8"
3974
5392
  }
3975
5393
  ]
3976
5394
  }
@@ -4156,7 +5574,7 @@
4156
5574
  "name": "ValidatorListEntry"
4157
5575
  }
4158
5576
  },
4159
- 256
5577
+ 200
4160
5578
  ]
4161
5579
  }
4162
5580
  }
@@ -4178,6 +5596,55 @@
4178
5596
  "Vote account pubkey (all zeros = empty slot)"
4179
5597
  ],
4180
5598
  "type": "pubkey"
5599
+ },
5600
+ {
5601
+ "name": "registry_index",
5602
+ "docs": [
5603
+ "Immutable index into the validator leaderboard arrays (u16::MAX = unknown)"
5604
+ ],
5605
+ "type": "u16"
5606
+ },
5607
+ {
5608
+ "name": "pdas_initialized",
5609
+ "docs": [
5610
+ "Whether per-validator PDAs (info/transient) are initialized"
5611
+ ],
5612
+ "type": "bool"
5613
+ },
5614
+ {
5615
+ "name": "vpp",
5616
+ "docs": [
5617
+ "Cached VPP score (0-100) refreshed at the start of a maintenance run"
5618
+ ],
5619
+ "type": "u8"
5620
+ },
5621
+ {
5622
+ "name": "_pad",
5623
+ "docs": [
5624
+ "Padding to keep 8-byte alignment (32 + 2 + 1 + 1 + 4 = 40 bytes)"
5625
+ ],
5626
+ "type": {
5627
+ "array": [
5628
+ "u8",
5629
+ 4
5630
+ ]
5631
+ }
5632
+ }
5633
+ ]
5634
+ }
5635
+ },
5636
+ {
5637
+ "name": "ValidatorRemovedEvent",
5638
+ "type": {
5639
+ "kind": "struct",
5640
+ "fields": [
5641
+ {
5642
+ "name": "vote_account",
5643
+ "type": "pubkey"
5644
+ },
5645
+ {
5646
+ "name": "vpp",
5647
+ "type": "u8"
4181
5648
  }
4182
5649
  ]
4183
5650
  }
@@ -4215,20 +5682,33 @@
4215
5682
  },
4216
5683
  {
4217
5684
  "name": "Warm"
5685
+ },
5686
+ {
5687
+ "name": "ReadyToCool"
4218
5688
  }
4219
5689
  ]
4220
5690
  }
4221
5691
  },
4222
5692
  {
4223
- "name": "ValidatorStateChangeReason",
5693
+ "name": "ValidatorSwappedEvent",
4224
5694
  "type": {
4225
- "kind": "enum",
4226
- "variants": [
5695
+ "kind": "struct",
5696
+ "fields": [
4227
5697
  {
4228
- "name": "Blacklisted"
5698
+ "name": "removed_vote",
5699
+ "type": "pubkey"
4229
5700
  },
4230
5701
  {
4231
- "name": "UnderPerforming"
5702
+ "name": "removed_vpp",
5703
+ "type": "u8"
5704
+ },
5705
+ {
5706
+ "name": "added_vote",
5707
+ "type": "pubkey"
5708
+ },
5709
+ {
5710
+ "name": "added_vpp",
5711
+ "type": "u8"
4232
5712
  }
4233
5713
  ]
4234
5714
  }
@@ -4325,62 +5805,18 @@
4325
5805
  }
4326
5806
  },
4327
5807
  {
4328
- "name": "WireReceipt",
5808
+ "name": "WireState",
4329
5809
  "type": {
4330
- "kind": "struct",
4331
- "fields": [
4332
- {
4333
- "name": "user",
4334
- "type": "pubkey"
4335
- },
4336
- {
4337
- "name": "staked_liqsol",
4338
- "docs": [
4339
- "STAKE deposits (withdrawable pre-D-Day)",
4340
- "Principal amount staked (for display/tracking)"
4341
- ],
4342
- "type": "u64"
4343
- },
4344
- {
4345
- "name": "staked_shares",
4346
- "docs": [
4347
- "Shares from staking (actual accounting for yield isolation)"
4348
- ],
4349
- "type": "u64"
4350
- },
4351
- {
4352
- "name": "purchased_liqsol",
4353
- "docs": [
4354
- "WARRANT_PURCHASE deposits with liqSOL (permanent)",
4355
- "Principal amount spent on warrants (for display/tracking)"
4356
- ],
4357
- "type": "u64"
4358
- },
4359
- {
4360
- "name": "purchased_shares",
4361
- "docs": [
4362
- "Shares from liqSOL warrant purchases (actual accounting for yield isolation)"
4363
- ],
4364
- "type": "u64"
4365
- },
5810
+ "kind": "enum",
5811
+ "variants": [
4366
5812
  {
4367
- "name": "purchased_with_sol",
4368
- "docs": [
4369
- "WARRANT_PURCHASE deposits with raw SOL (permanent, separate settlement)",
4370
- "Principal amount in lamports spent on warrants"
4371
- ],
4372
- "type": "u64"
5813
+ "name": "PreLaunch"
4373
5814
  },
4374
5815
  {
4375
- "name": "purchased_sol_shares",
4376
- "docs": [
4377
- "Shares from SOL warrant purchases (actual accounting for yield isolation)"
4378
- ],
4379
- "type": "u64"
5816
+ "name": "PostLaunch"
4380
5817
  },
4381
5818
  {
4382
- "name": "bump",
4383
- "type": "u8"
5819
+ "name": "Refund"
4384
5820
  }
4385
5821
  ]
4386
5822
  }
@@ -4421,6 +5857,10 @@
4421
5857
  {
4422
5858
  "name": "user",
4423
5859
  "type": "pubkey"
5860
+ },
5861
+ {
5862
+ "name": "receipt_id",
5863
+ "type": "u64"
4424
5864
  }
4425
5865
  ]
4426
5866
  }