@drift-labs/vaults-sdk 0.1.422 → 0.1.424

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.
@@ -145,34 +145,6 @@ exports.IDL = {
145
145
  },
146
146
  ],
147
147
  },
148
- {
149
- name: 'updateVaultProtocol',
150
- accounts: [
151
- {
152
- name: 'vault',
153
- isMut: true,
154
- isSigner: false,
155
- },
156
- {
157
- name: 'protocol',
158
- isMut: false,
159
- isSigner: true,
160
- },
161
- {
162
- name: 'vaultProtocol',
163
- isMut: true,
164
- isSigner: false,
165
- },
166
- ],
167
- args: [
168
- {
169
- name: 'params',
170
- type: {
171
- defined: 'UpdateVaultProtocolParams',
172
- },
173
- },
174
- ],
175
- },
176
148
  {
177
149
  name: 'updateVault',
178
150
  accounts: [
@@ -933,155 +905,6 @@ exports.IDL = {
933
905
  ],
934
906
  args: [],
935
907
  },
936
- {
937
- name: 'protocolRequestWithdraw',
938
- accounts: [
939
- {
940
- name: 'vault',
941
- isMut: true,
942
- isSigner: false,
943
- },
944
- {
945
- name: 'vaultProtocol',
946
- isMut: true,
947
- isSigner: false,
948
- },
949
- {
950
- name: 'protocol',
951
- isMut: false,
952
- isSigner: true,
953
- },
954
- {
955
- name: 'driftUserStats',
956
- isMut: false,
957
- isSigner: false,
958
- },
959
- {
960
- name: 'driftUser',
961
- isMut: false,
962
- isSigner: false,
963
- },
964
- {
965
- name: 'driftState',
966
- isMut: false,
967
- isSigner: false,
968
- },
969
- ],
970
- args: [
971
- {
972
- name: 'withdrawAmount',
973
- type: 'u64',
974
- },
975
- {
976
- name: 'withdrawUnit',
977
- type: {
978
- defined: 'WithdrawUnit',
979
- },
980
- },
981
- ],
982
- },
983
- {
984
- name: 'protocolCancelWithdrawRequest',
985
- accounts: [
986
- {
987
- name: 'vault',
988
- isMut: true,
989
- isSigner: false,
990
- },
991
- {
992
- name: 'vaultProtocol',
993
- isMut: true,
994
- isSigner: false,
995
- },
996
- {
997
- name: 'protocol',
998
- isMut: false,
999
- isSigner: true,
1000
- },
1001
- {
1002
- name: 'driftUserStats',
1003
- isMut: false,
1004
- isSigner: false,
1005
- },
1006
- {
1007
- name: 'driftUser',
1008
- isMut: false,
1009
- isSigner: false,
1010
- },
1011
- {
1012
- name: 'driftState',
1013
- isMut: false,
1014
- isSigner: false,
1015
- },
1016
- ],
1017
- args: [],
1018
- },
1019
- {
1020
- name: 'protocolWithdraw',
1021
- accounts: [
1022
- {
1023
- name: 'vault',
1024
- isMut: true,
1025
- isSigner: false,
1026
- },
1027
- {
1028
- name: 'vaultProtocol',
1029
- isMut: true,
1030
- isSigner: false,
1031
- },
1032
- {
1033
- name: 'protocol',
1034
- isMut: false,
1035
- isSigner: true,
1036
- },
1037
- {
1038
- name: 'vaultTokenAccount',
1039
- isMut: true,
1040
- isSigner: false,
1041
- },
1042
- {
1043
- name: 'driftUserStats',
1044
- isMut: true,
1045
- isSigner: false,
1046
- },
1047
- {
1048
- name: 'driftUser',
1049
- isMut: true,
1050
- isSigner: false,
1051
- },
1052
- {
1053
- name: 'driftState',
1054
- isMut: false,
1055
- isSigner: false,
1056
- },
1057
- {
1058
- name: 'driftSpotMarketVault',
1059
- isMut: true,
1060
- isSigner: false,
1061
- },
1062
- {
1063
- name: 'driftSigner',
1064
- isMut: false,
1065
- isSigner: false,
1066
- },
1067
- {
1068
- name: 'userTokenAccount',
1069
- isMut: true,
1070
- isSigner: false,
1071
- },
1072
- {
1073
- name: 'driftProgram',
1074
- isMut: false,
1075
- isSigner: false,
1076
- },
1077
- {
1078
- name: 'tokenProgram',
1079
- isMut: false,
1080
- isSigner: false,
1081
- },
1082
- ],
1083
- args: [],
1084
- },
1085
908
  ],
1086
909
  accounts: [
1087
910
  {
@@ -1171,85 +994,6 @@ exports.IDL = {
1171
994
  ],
1172
995
  },
1173
996
  },
1174
- {
1175
- name: 'vaultProtocol',
1176
- type: {
1177
- kind: 'struct',
1178
- fields: [
1179
- {
1180
- name: 'protocol',
1181
- docs: [
1182
- 'The protocol, company, or entity that services the product using this vault.',
1183
- 'The protocol is not allowed to deposit into the vault but can profit share and collect annual fees just like the manager.',
1184
- ],
1185
- type: 'publicKey',
1186
- },
1187
- {
1188
- name: 'protocolProfitAndFeeShares',
1189
- docs: [
1190
- 'The shares from profit share and annual fee unclaimed by the protocol.',
1191
- ],
1192
- type: 'u128',
1193
- },
1194
- {
1195
- name: 'protocolFee',
1196
- docs: [
1197
- 'The annual fee charged on deposits by the protocol (traditional hedge funds typically charge 2% per year on assets under management).',
1198
- "Unlike the management fee this can't be negative.",
1199
- ],
1200
- type: 'u64',
1201
- },
1202
- {
1203
- name: 'protocolTotalWithdraws',
1204
- docs: ['Total withdraws for the protocol'],
1205
- type: 'u64',
1206
- },
1207
- {
1208
- name: 'protocolTotalFee',
1209
- docs: [
1210
- 'Total fee charged by the protocol (annual management fee + profit share).',
1211
- "Unlike the management fee this can't be negative.",
1212
- ],
1213
- type: 'u64',
1214
- },
1215
- {
1216
- name: 'protocolTotalProfitShare',
1217
- docs: ['Total profit share charged by the protocol'],
1218
- type: 'u64',
1219
- },
1220
- {
1221
- name: 'lastProtocolWithdrawRequest',
1222
- type: {
1223
- defined: 'WithdrawRequest',
1224
- },
1225
- },
1226
- {
1227
- name: 'protocolProfitShare',
1228
- docs: [
1229
- 'Percentage the protocol charges on all profits realized by depositors: PERCENTAGE_PRECISION',
1230
- ],
1231
- type: 'u32',
1232
- },
1233
- {
1234
- name: 'bump',
1235
- type: 'u8',
1236
- },
1237
- {
1238
- name: 'version',
1239
- type: 'u8',
1240
- },
1241
- {
1242
- name: 'padding',
1243
- docs: [
1244
- '[`VaultProtocol`] is 117 bytes with padding to 120 bytes to make it a multiple of 8.',
1245
- ],
1246
- type: {
1247
- array: ['u8', 2],
1248
- },
1249
- },
1250
- ],
1251
- },
1252
- },
1253
997
  {
1254
998
  name: 'vault',
1255
999
  type: {
@@ -1299,7 +1043,7 @@ exports.IDL = {
1299
1043
  name: 'delegate',
1300
1044
  docs: [
1301
1045
  'The vaults designated delegate for drift user account',
1302
- 'can differ from actual user delegate if vault is in liquidation',
1046
+ 'Can differ from actual user delegate if vault is in liquidation',
1303
1047
  ],
1304
1048
  type: 'publicKey',
1305
1049
  },
@@ -1311,104 +1055,97 @@ exports.IDL = {
1311
1055
  {
1312
1056
  name: 'userShares',
1313
1057
  docs: [
1314
- 'The sum of all shares held by the users (vault depositors)',
1058
+ 'the sum of all shares held by the users (vault depositors)',
1315
1059
  ],
1316
1060
  type: 'u128',
1317
1061
  },
1318
1062
  {
1319
1063
  name: 'totalShares',
1320
- docs: [
1321
- 'The sum of all shares: deposits from users, manager deposits, manager profit/fee, and protocol profit/fee.',
1322
- 'The manager deposits are total_shares - user_shares - protocol_profit_and_fee_shares.',
1323
- ],
1064
+ docs: ['the sum of all shares (including vault manager)'],
1324
1065
  type: 'u128',
1325
1066
  },
1326
1067
  {
1327
1068
  name: 'lastFeeUpdateTs',
1328
- docs: ['Last fee update unix timestamp'],
1069
+ docs: ['last fee update unix timestamp'],
1329
1070
  type: 'i64',
1330
1071
  },
1331
1072
  {
1332
1073
  name: 'liquidationStartTs',
1333
- docs: ['When the liquidation starts'],
1074
+ docs: ['When the liquidation start'],
1334
1075
  type: 'i64',
1335
1076
  },
1336
1077
  {
1337
1078
  name: 'redeemPeriod',
1338
1079
  docs: [
1339
- 'The period (in seconds) that a vault depositor must wait after requesting a withdrawal to finalize withdrawal.',
1340
- 'Currently, the maximum is 90 days.',
1080
+ 'the period (in seconds) that a vault depositor must wait after requesting a withdraw to complete withdraw',
1341
1081
  ],
1342
1082
  type: 'i64',
1343
1083
  },
1344
1084
  {
1345
1085
  name: 'totalWithdrawRequested',
1346
- docs: ['The sum of all outstanding withdraw requests'],
1086
+ docs: ['the sum of all outstanding withdraw requests'],
1347
1087
  type: 'u64',
1348
1088
  },
1349
1089
  {
1350
1090
  name: 'maxTokens',
1351
1091
  docs: [
1352
- 'Max token capacity, once hit/passed vault will reject new deposits (updatable)',
1092
+ 'max token capacity, once hit/passed vault will reject new deposits (updateable)',
1353
1093
  ],
1354
1094
  type: 'u64',
1355
1095
  },
1356
1096
  {
1357
1097
  name: 'managementFee',
1358
- docs: [
1359
- 'The annual fee charged on deposits by the manager.',
1360
- 'Traditional funds typically charge 2% per year on assets under management.',
1361
- ],
1098
+ docs: ['manager fee'],
1362
1099
  type: 'i64',
1363
1100
  },
1364
1101
  {
1365
1102
  name: 'initTs',
1366
- docs: ['Timestamp vault initialized'],
1103
+ docs: ['timestamp vault initialized'],
1367
1104
  type: 'i64',
1368
1105
  },
1369
1106
  {
1370
1107
  name: 'netDeposits',
1371
- docs: ['The net deposits for the vault'],
1108
+ docs: ['the net deposits for the vault'],
1372
1109
  type: 'i64',
1373
1110
  },
1374
1111
  {
1375
1112
  name: 'managerNetDeposits',
1376
- docs: ['The net deposits for the manager'],
1113
+ docs: ['the net deposits for the vault manager'],
1377
1114
  type: 'i64',
1378
1115
  },
1379
1116
  {
1380
1117
  name: 'totalDeposits',
1381
- docs: ['Total deposits'],
1118
+ docs: ['total deposits'],
1382
1119
  type: 'u64',
1383
1120
  },
1384
1121
  {
1385
1122
  name: 'totalWithdraws',
1386
- docs: ['Total withdraws'],
1123
+ docs: ['total withdraws'],
1387
1124
  type: 'u64',
1388
1125
  },
1389
1126
  {
1390
1127
  name: 'managerTotalDeposits',
1391
- docs: ['Total deposits for the manager'],
1128
+ docs: ['total deposits for the vault manager'],
1392
1129
  type: 'u64',
1393
1130
  },
1394
1131
  {
1395
1132
  name: 'managerTotalWithdraws',
1396
- docs: ['Total withdraws for the manager'],
1133
+ docs: ['total withdraws for the vault manager'],
1397
1134
  type: 'u64',
1398
1135
  },
1399
1136
  {
1400
1137
  name: 'managerTotalFee',
1401
- docs: ['Total management fee accrued by the manager'],
1138
+ docs: ['total mgmt fee charged by vault manager'],
1402
1139
  type: 'i64',
1403
1140
  },
1404
1141
  {
1405
1142
  name: 'managerTotalProfitShare',
1406
- docs: ['Total profit share accrued by the manager'],
1143
+ docs: ['total profit share charged by vault manager'],
1407
1144
  type: 'u64',
1408
1145
  },
1409
1146
  {
1410
1147
  name: 'minDepositAmount',
1411
- docs: ['The minimum deposit amount'],
1148
+ docs: ['the minimum deposit amount'],
1412
1149
  type: 'u64',
1413
1150
  },
1414
1151
  {
@@ -1420,21 +1157,21 @@ exports.IDL = {
1420
1157
  {
1421
1158
  name: 'sharesBase',
1422
1159
  docs: [
1423
- 'The base 10 exponent of the shares (given massive share inflation can occur at near zero vault equity)',
1160
+ 'the base 10 exponent of the shares (given massive share inflation can occur at near zero vault equity)',
1424
1161
  ],
1425
1162
  type: 'u32',
1426
1163
  },
1427
1164
  {
1428
1165
  name: 'profitShare',
1429
1166
  docs: [
1430
- 'Percentage the manager charges on all profits realized by depositors: PERCENTAGE_PRECISION',
1167
+ "percentage of gains for vault admin upon depositor's realize/withdraw: PERCENTAGE_PRECISION",
1431
1168
  ],
1432
1169
  type: 'u32',
1433
1170
  },
1434
1171
  {
1435
1172
  name: 'hurdleRate',
1436
1173
  docs: [
1437
- 'Vault manager only collect incentive fees during periods when returns are higher than this amount: PERCENTAGE_PRECISION',
1174
+ 'vault admin only collect incentive fees during periods when returns are higher than this amount: PERCENTAGE_PRECISION',
1438
1175
  ],
1439
1176
  type: 'u32',
1440
1177
  },
@@ -1452,21 +1189,13 @@ exports.IDL = {
1452
1189
  },
1453
1190
  {
1454
1191
  name: 'permissioned',
1455
- docs: ['Whether anybody can be a depositor'],
1192
+ docs: ['Whether or not anybody can be a depositor'],
1456
1193
  type: 'bool',
1457
1194
  },
1458
- {
1459
- name: 'vaultProtocol',
1460
- docs: [
1461
- 'The optional [`VaultProtocol`] account.',
1462
- 'If this is the default Pubkey (system program id) then it is "none".',
1463
- ],
1464
- type: 'publicKey',
1465
- },
1466
1195
  {
1467
1196
  name: 'padding',
1468
1197
  type: {
1469
- array: ['u64', 4],
1198
+ array: ['u64', 8],
1470
1199
  },
1471
1200
  },
1472
1201
  ],
@@ -1517,54 +1246,6 @@ exports.IDL = {
1517
1246
  name: 'permissioned',
1518
1247
  type: 'bool',
1519
1248
  },
1520
- {
1521
- name: 'vaultProtocol',
1522
- type: {
1523
- option: {
1524
- defined: 'VaultProtocolParams',
1525
- },
1526
- },
1527
- },
1528
- ],
1529
- },
1530
- },
1531
- {
1532
- name: 'VaultProtocolParams',
1533
- type: {
1534
- kind: 'struct',
1535
- fields: [
1536
- {
1537
- name: 'protocol',
1538
- type: 'publicKey',
1539
- },
1540
- {
1541
- name: 'protocolFee',
1542
- type: 'u64',
1543
- },
1544
- {
1545
- name: 'protocolProfitShare',
1546
- type: 'u32',
1547
- },
1548
- ],
1549
- },
1550
- },
1551
- {
1552
- name: 'UpdateVaultProtocolParams',
1553
- type: {
1554
- kind: 'struct',
1555
- fields: [
1556
- {
1557
- name: 'protocolFee',
1558
- type: {
1559
- option: 'u64',
1560
- },
1561
- },
1562
- {
1563
- name: 'protocolProfitShare',
1564
- type: {
1565
- option: 'u32',
1566
- },
1567
- },
1568
1249
  ],
1569
1250
  },
1570
1251
  },
@@ -1792,108 +1473,6 @@ exports.IDL = {
1792
1473
  },
1793
1474
  ],
1794
1475
  },
1795
- {
1796
- name: 'VaultDepositorV1Record',
1797
- fields: [
1798
- {
1799
- name: 'ts',
1800
- type: 'i64',
1801
- index: false,
1802
- },
1803
- {
1804
- name: 'vault',
1805
- type: 'publicKey',
1806
- index: false,
1807
- },
1808
- {
1809
- name: 'depositorAuthority',
1810
- type: 'publicKey',
1811
- index: false,
1812
- },
1813
- {
1814
- name: 'action',
1815
- type: {
1816
- defined: 'VaultDepositorAction',
1817
- },
1818
- index: false,
1819
- },
1820
- {
1821
- name: 'amount',
1822
- type: 'u64',
1823
- index: false,
1824
- },
1825
- {
1826
- name: 'spotMarketIndex',
1827
- type: 'u16',
1828
- index: false,
1829
- },
1830
- {
1831
- name: 'vaultSharesBefore',
1832
- type: 'u128',
1833
- index: false,
1834
- },
1835
- {
1836
- name: 'vaultSharesAfter',
1837
- type: 'u128',
1838
- index: false,
1839
- },
1840
- {
1841
- name: 'vaultEquityBefore',
1842
- type: 'u64',
1843
- index: false,
1844
- },
1845
- {
1846
- name: 'userVaultSharesBefore',
1847
- type: 'u128',
1848
- index: false,
1849
- },
1850
- {
1851
- name: 'totalVaultSharesBefore',
1852
- type: 'u128',
1853
- index: false,
1854
- },
1855
- {
1856
- name: 'userVaultSharesAfter',
1857
- type: 'u128',
1858
- index: false,
1859
- },
1860
- {
1861
- name: 'totalVaultSharesAfter',
1862
- type: 'u128',
1863
- index: false,
1864
- },
1865
- {
1866
- name: 'protocolProfitShare',
1867
- type: 'u64',
1868
- index: false,
1869
- },
1870
- {
1871
- name: 'protocolFee',
1872
- type: 'i64',
1873
- index: false,
1874
- },
1875
- {
1876
- name: 'protocolFeeShares',
1877
- type: 'i64',
1878
- index: false,
1879
- },
1880
- {
1881
- name: 'managerProfitShare',
1882
- type: 'u64',
1883
- index: false,
1884
- },
1885
- {
1886
- name: 'managementFee',
1887
- type: 'i64',
1888
- index: false,
1889
- },
1890
- {
1891
- name: 'managementFeeShares',
1892
- type: 'i64',
1893
- index: false,
1894
- },
1895
- ],
1896
- },
1897
1476
  ],
1898
1477
  errors: [
1899
1478
  {
@@ -2006,10 +1585,5 @@ exports.IDL = {
2006
1585
  name: 'OngoingLiquidation',
2007
1586
  msg: 'OngoingLiquidation',
2008
1587
  },
2009
- {
2010
- code: 6022,
2011
- name: 'VaultProtocolMissing',
2012
- msg: 'VaultProtocolMissing',
2013
- },
2014
1588
  ],
2015
1589
  };