@strkfarm/sdk 1.1.34 → 1.1.35
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.
- package/dist/index.browser.global.js +2733 -45
- package/dist/index.browser.mjs +2733 -45
- package/dist/index.d.ts +57 -4
- package/dist/index.js +2734 -45
- package/dist/index.mjs +2733 -45
- package/package.json +1 -1
- package/src/data/vesu-extension.abi.json +2443 -0
- package/src/modules/avnu.ts +1 -0
- package/src/strategies/universal-adapters/vesu-adapter.ts +201 -0
- package/src/strategies/universal-lst-muliplier-strategy.tsx +162 -40
- package/src/strategies/universal-strategy.tsx +33 -18
package/dist/index.browser.mjs
CHANGED
|
@@ -2120,6 +2120,7 @@ var AvnuWrapper = class _AvnuWrapper {
|
|
|
2120
2120
|
}
|
|
2121
2121
|
throw new Error("no quotes found");
|
|
2122
2122
|
}
|
|
2123
|
+
logger.verbose(`${_AvnuWrapper.name}: getQuotes => filteredQuotes: ${JSON.stringify(filteredQuotes)}`);
|
|
2123
2124
|
return filteredQuotes[0];
|
|
2124
2125
|
}
|
|
2125
2126
|
async getSwapInfo(quote, taker, integratorFeeBps, integratorFeeRecipient, minAmount, options) {
|
|
@@ -23923,6 +23924,2451 @@ var vesu_pool_v2_abi_default = [
|
|
|
23923
23924
|
}
|
|
23924
23925
|
];
|
|
23925
23926
|
|
|
23927
|
+
// src/data/vesu-extension.abi.json
|
|
23928
|
+
var vesu_extension_abi_default = [
|
|
23929
|
+
{
|
|
23930
|
+
type: "impl",
|
|
23931
|
+
name: "DefaultExtensionPOV2Impl",
|
|
23932
|
+
interface_name: "vesu::v2::default_extension_po_v2::IDefaultExtensionPOV2"
|
|
23933
|
+
},
|
|
23934
|
+
{
|
|
23935
|
+
type: "enum",
|
|
23936
|
+
name: "vesu::vendor::pragma::AggregationMode",
|
|
23937
|
+
variants: [
|
|
23938
|
+
{
|
|
23939
|
+
name: "Median",
|
|
23940
|
+
type: "()"
|
|
23941
|
+
},
|
|
23942
|
+
{
|
|
23943
|
+
name: "Mean",
|
|
23944
|
+
type: "()"
|
|
23945
|
+
},
|
|
23946
|
+
{
|
|
23947
|
+
name: "Error",
|
|
23948
|
+
type: "()"
|
|
23949
|
+
}
|
|
23950
|
+
]
|
|
23951
|
+
},
|
|
23952
|
+
{
|
|
23953
|
+
type: "struct",
|
|
23954
|
+
name: "vesu::extension::components::pragma_oracle::OracleConfig",
|
|
23955
|
+
members: [
|
|
23956
|
+
{
|
|
23957
|
+
name: "pragma_key",
|
|
23958
|
+
type: "core::felt252"
|
|
23959
|
+
},
|
|
23960
|
+
{
|
|
23961
|
+
name: "timeout",
|
|
23962
|
+
type: "core::integer::u64"
|
|
23963
|
+
},
|
|
23964
|
+
{
|
|
23965
|
+
name: "number_of_sources",
|
|
23966
|
+
type: "core::integer::u32"
|
|
23967
|
+
},
|
|
23968
|
+
{
|
|
23969
|
+
name: "start_time_offset",
|
|
23970
|
+
type: "core::integer::u64"
|
|
23971
|
+
},
|
|
23972
|
+
{
|
|
23973
|
+
name: "time_window",
|
|
23974
|
+
type: "core::integer::u64"
|
|
23975
|
+
},
|
|
23976
|
+
{
|
|
23977
|
+
name: "aggregation_mode",
|
|
23978
|
+
type: "vesu::vendor::pragma::AggregationMode"
|
|
23979
|
+
}
|
|
23980
|
+
]
|
|
23981
|
+
},
|
|
23982
|
+
{
|
|
23983
|
+
type: "struct",
|
|
23984
|
+
name: "vesu::extension::components::fee_model::FeeConfig",
|
|
23985
|
+
members: [
|
|
23986
|
+
{
|
|
23987
|
+
name: "fee_recipient",
|
|
23988
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
23989
|
+
}
|
|
23990
|
+
]
|
|
23991
|
+
},
|
|
23992
|
+
{
|
|
23993
|
+
type: "struct",
|
|
23994
|
+
name: "core::integer::u256",
|
|
23995
|
+
members: [
|
|
23996
|
+
{
|
|
23997
|
+
name: "low",
|
|
23998
|
+
type: "core::integer::u128"
|
|
23999
|
+
},
|
|
24000
|
+
{
|
|
24001
|
+
name: "high",
|
|
24002
|
+
type: "core::integer::u128"
|
|
24003
|
+
}
|
|
24004
|
+
]
|
|
24005
|
+
},
|
|
24006
|
+
{
|
|
24007
|
+
type: "struct",
|
|
24008
|
+
name: "vesu::extension::components::interest_rate_model::InterestRateConfig",
|
|
24009
|
+
members: [
|
|
24010
|
+
{
|
|
24011
|
+
name: "min_target_utilization",
|
|
24012
|
+
type: "core::integer::u256"
|
|
24013
|
+
},
|
|
24014
|
+
{
|
|
24015
|
+
name: "max_target_utilization",
|
|
24016
|
+
type: "core::integer::u256"
|
|
24017
|
+
},
|
|
24018
|
+
{
|
|
24019
|
+
name: "target_utilization",
|
|
24020
|
+
type: "core::integer::u256"
|
|
24021
|
+
},
|
|
24022
|
+
{
|
|
24023
|
+
name: "min_full_utilization_rate",
|
|
24024
|
+
type: "core::integer::u256"
|
|
24025
|
+
},
|
|
24026
|
+
{
|
|
24027
|
+
name: "max_full_utilization_rate",
|
|
24028
|
+
type: "core::integer::u256"
|
|
24029
|
+
},
|
|
24030
|
+
{
|
|
24031
|
+
name: "zero_utilization_rate",
|
|
24032
|
+
type: "core::integer::u256"
|
|
24033
|
+
},
|
|
24034
|
+
{
|
|
24035
|
+
name: "rate_half_life",
|
|
24036
|
+
type: "core::integer::u256"
|
|
24037
|
+
},
|
|
24038
|
+
{
|
|
24039
|
+
name: "target_rate_percent",
|
|
24040
|
+
type: "core::integer::u256"
|
|
24041
|
+
}
|
|
24042
|
+
]
|
|
24043
|
+
},
|
|
24044
|
+
{
|
|
24045
|
+
type: "struct",
|
|
24046
|
+
name: "vesu::extension::components::position_hooks::LiquidationConfig",
|
|
24047
|
+
members: [
|
|
24048
|
+
{
|
|
24049
|
+
name: "liquidation_factor",
|
|
24050
|
+
type: "core::integer::u64"
|
|
24051
|
+
}
|
|
24052
|
+
]
|
|
24053
|
+
},
|
|
24054
|
+
{
|
|
24055
|
+
type: "struct",
|
|
24056
|
+
name: "vesu::extension::components::position_hooks::ShutdownConfig",
|
|
24057
|
+
members: [
|
|
24058
|
+
{
|
|
24059
|
+
name: "recovery_period",
|
|
24060
|
+
type: "core::integer::u64"
|
|
24061
|
+
},
|
|
24062
|
+
{
|
|
24063
|
+
name: "subscription_period",
|
|
24064
|
+
type: "core::integer::u64"
|
|
24065
|
+
}
|
|
24066
|
+
]
|
|
24067
|
+
},
|
|
24068
|
+
{
|
|
24069
|
+
type: "struct",
|
|
24070
|
+
name: "vesu::data_model::LTVConfig",
|
|
24071
|
+
members: [
|
|
24072
|
+
{
|
|
24073
|
+
name: "max_ltv",
|
|
24074
|
+
type: "core::integer::u64"
|
|
24075
|
+
}
|
|
24076
|
+
]
|
|
24077
|
+
},
|
|
24078
|
+
{
|
|
24079
|
+
type: "enum",
|
|
24080
|
+
name: "vesu::extension::components::position_hooks::ShutdownMode",
|
|
24081
|
+
variants: [
|
|
24082
|
+
{
|
|
24083
|
+
name: "None",
|
|
24084
|
+
type: "()"
|
|
24085
|
+
},
|
|
24086
|
+
{
|
|
24087
|
+
name: "Recovery",
|
|
24088
|
+
type: "()"
|
|
24089
|
+
},
|
|
24090
|
+
{
|
|
24091
|
+
name: "Subscription",
|
|
24092
|
+
type: "()"
|
|
24093
|
+
},
|
|
24094
|
+
{
|
|
24095
|
+
name: "Redemption",
|
|
24096
|
+
type: "()"
|
|
24097
|
+
}
|
|
24098
|
+
]
|
|
24099
|
+
},
|
|
24100
|
+
{
|
|
24101
|
+
type: "enum",
|
|
24102
|
+
name: "core::bool",
|
|
24103
|
+
variants: [
|
|
24104
|
+
{
|
|
24105
|
+
name: "False",
|
|
24106
|
+
type: "()"
|
|
24107
|
+
},
|
|
24108
|
+
{
|
|
24109
|
+
name: "True",
|
|
24110
|
+
type: "()"
|
|
24111
|
+
}
|
|
24112
|
+
]
|
|
24113
|
+
},
|
|
24114
|
+
{
|
|
24115
|
+
type: "struct",
|
|
24116
|
+
name: "vesu::extension::components::position_hooks::ShutdownStatus",
|
|
24117
|
+
members: [
|
|
24118
|
+
{
|
|
24119
|
+
name: "shutdown_mode",
|
|
24120
|
+
type: "vesu::extension::components::position_hooks::ShutdownMode"
|
|
24121
|
+
},
|
|
24122
|
+
{
|
|
24123
|
+
name: "violating",
|
|
24124
|
+
type: "core::bool"
|
|
24125
|
+
},
|
|
24126
|
+
{
|
|
24127
|
+
name: "previous_violation_timestamp",
|
|
24128
|
+
type: "core::integer::u64"
|
|
24129
|
+
},
|
|
24130
|
+
{
|
|
24131
|
+
name: "count_at_violation_timestamp",
|
|
24132
|
+
type: "core::integer::u128"
|
|
24133
|
+
}
|
|
24134
|
+
]
|
|
24135
|
+
},
|
|
24136
|
+
{
|
|
24137
|
+
type: "struct",
|
|
24138
|
+
name: "vesu::extension::components::position_hooks::Pair",
|
|
24139
|
+
members: [
|
|
24140
|
+
{
|
|
24141
|
+
name: "total_collateral_shares",
|
|
24142
|
+
type: "core::integer::u256"
|
|
24143
|
+
},
|
|
24144
|
+
{
|
|
24145
|
+
name: "total_nominal_debt",
|
|
24146
|
+
type: "core::integer::u256"
|
|
24147
|
+
}
|
|
24148
|
+
]
|
|
24149
|
+
},
|
|
24150
|
+
{
|
|
24151
|
+
type: "struct",
|
|
24152
|
+
name: "vesu::data_model::AssetParams",
|
|
24153
|
+
members: [
|
|
24154
|
+
{
|
|
24155
|
+
name: "asset",
|
|
24156
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24157
|
+
},
|
|
24158
|
+
{
|
|
24159
|
+
name: "floor",
|
|
24160
|
+
type: "core::integer::u256"
|
|
24161
|
+
},
|
|
24162
|
+
{
|
|
24163
|
+
name: "initial_rate_accumulator",
|
|
24164
|
+
type: "core::integer::u256"
|
|
24165
|
+
},
|
|
24166
|
+
{
|
|
24167
|
+
name: "initial_full_utilization_rate",
|
|
24168
|
+
type: "core::integer::u256"
|
|
24169
|
+
},
|
|
24170
|
+
{
|
|
24171
|
+
name: "max_utilization",
|
|
24172
|
+
type: "core::integer::u256"
|
|
24173
|
+
},
|
|
24174
|
+
{
|
|
24175
|
+
name: "is_legacy",
|
|
24176
|
+
type: "core::bool"
|
|
24177
|
+
},
|
|
24178
|
+
{
|
|
24179
|
+
name: "fee_rate",
|
|
24180
|
+
type: "core::integer::u256"
|
|
24181
|
+
}
|
|
24182
|
+
]
|
|
24183
|
+
},
|
|
24184
|
+
{
|
|
24185
|
+
type: "struct",
|
|
24186
|
+
name: "core::array::Span::<vesu::data_model::AssetParams>",
|
|
24187
|
+
members: [
|
|
24188
|
+
{
|
|
24189
|
+
name: "snapshot",
|
|
24190
|
+
type: "@core::array::Array::<vesu::data_model::AssetParams>"
|
|
24191
|
+
}
|
|
24192
|
+
]
|
|
24193
|
+
},
|
|
24194
|
+
{
|
|
24195
|
+
type: "struct",
|
|
24196
|
+
name: "vesu::extension::default_extension_po::VTokenParams",
|
|
24197
|
+
members: [
|
|
24198
|
+
{
|
|
24199
|
+
name: "v_token_name",
|
|
24200
|
+
type: "core::felt252"
|
|
24201
|
+
},
|
|
24202
|
+
{
|
|
24203
|
+
name: "v_token_symbol",
|
|
24204
|
+
type: "core::felt252"
|
|
24205
|
+
}
|
|
24206
|
+
]
|
|
24207
|
+
},
|
|
24208
|
+
{
|
|
24209
|
+
type: "struct",
|
|
24210
|
+
name: "core::array::Span::<vesu::extension::default_extension_po::VTokenParams>",
|
|
24211
|
+
members: [
|
|
24212
|
+
{
|
|
24213
|
+
name: "snapshot",
|
|
24214
|
+
type: "@core::array::Array::<vesu::extension::default_extension_po::VTokenParams>"
|
|
24215
|
+
}
|
|
24216
|
+
]
|
|
24217
|
+
},
|
|
24218
|
+
{
|
|
24219
|
+
type: "struct",
|
|
24220
|
+
name: "vesu::data_model::LTVParams",
|
|
24221
|
+
members: [
|
|
24222
|
+
{
|
|
24223
|
+
name: "collateral_asset_index",
|
|
24224
|
+
type: "core::integer::u32"
|
|
24225
|
+
},
|
|
24226
|
+
{
|
|
24227
|
+
name: "debt_asset_index",
|
|
24228
|
+
type: "core::integer::u32"
|
|
24229
|
+
},
|
|
24230
|
+
{
|
|
24231
|
+
name: "max_ltv",
|
|
24232
|
+
type: "core::integer::u64"
|
|
24233
|
+
}
|
|
24234
|
+
]
|
|
24235
|
+
},
|
|
24236
|
+
{
|
|
24237
|
+
type: "struct",
|
|
24238
|
+
name: "core::array::Span::<vesu::data_model::LTVParams>",
|
|
24239
|
+
members: [
|
|
24240
|
+
{
|
|
24241
|
+
name: "snapshot",
|
|
24242
|
+
type: "@core::array::Array::<vesu::data_model::LTVParams>"
|
|
24243
|
+
}
|
|
24244
|
+
]
|
|
24245
|
+
},
|
|
24246
|
+
{
|
|
24247
|
+
type: "struct",
|
|
24248
|
+
name: "core::array::Span::<vesu::extension::components::interest_rate_model::InterestRateConfig>",
|
|
24249
|
+
members: [
|
|
24250
|
+
{
|
|
24251
|
+
name: "snapshot",
|
|
24252
|
+
type: "@core::array::Array::<vesu::extension::components::interest_rate_model::InterestRateConfig>"
|
|
24253
|
+
}
|
|
24254
|
+
]
|
|
24255
|
+
},
|
|
24256
|
+
{
|
|
24257
|
+
type: "struct",
|
|
24258
|
+
name: "vesu::extension::default_extension_po::PragmaOracleParams",
|
|
24259
|
+
members: [
|
|
24260
|
+
{
|
|
24261
|
+
name: "pragma_key",
|
|
24262
|
+
type: "core::felt252"
|
|
24263
|
+
},
|
|
24264
|
+
{
|
|
24265
|
+
name: "timeout",
|
|
24266
|
+
type: "core::integer::u64"
|
|
24267
|
+
},
|
|
24268
|
+
{
|
|
24269
|
+
name: "number_of_sources",
|
|
24270
|
+
type: "core::integer::u32"
|
|
24271
|
+
},
|
|
24272
|
+
{
|
|
24273
|
+
name: "start_time_offset",
|
|
24274
|
+
type: "core::integer::u64"
|
|
24275
|
+
},
|
|
24276
|
+
{
|
|
24277
|
+
name: "time_window",
|
|
24278
|
+
type: "core::integer::u64"
|
|
24279
|
+
},
|
|
24280
|
+
{
|
|
24281
|
+
name: "aggregation_mode",
|
|
24282
|
+
type: "vesu::vendor::pragma::AggregationMode"
|
|
24283
|
+
}
|
|
24284
|
+
]
|
|
24285
|
+
},
|
|
24286
|
+
{
|
|
24287
|
+
type: "struct",
|
|
24288
|
+
name: "core::array::Span::<vesu::extension::default_extension_po::PragmaOracleParams>",
|
|
24289
|
+
members: [
|
|
24290
|
+
{
|
|
24291
|
+
name: "snapshot",
|
|
24292
|
+
type: "@core::array::Array::<vesu::extension::default_extension_po::PragmaOracleParams>"
|
|
24293
|
+
}
|
|
24294
|
+
]
|
|
24295
|
+
},
|
|
24296
|
+
{
|
|
24297
|
+
type: "struct",
|
|
24298
|
+
name: "vesu::extension::default_extension_po::LiquidationParams",
|
|
24299
|
+
members: [
|
|
24300
|
+
{
|
|
24301
|
+
name: "collateral_asset_index",
|
|
24302
|
+
type: "core::integer::u32"
|
|
24303
|
+
},
|
|
24304
|
+
{
|
|
24305
|
+
name: "debt_asset_index",
|
|
24306
|
+
type: "core::integer::u32"
|
|
24307
|
+
},
|
|
24308
|
+
{
|
|
24309
|
+
name: "liquidation_factor",
|
|
24310
|
+
type: "core::integer::u64"
|
|
24311
|
+
}
|
|
24312
|
+
]
|
|
24313
|
+
},
|
|
24314
|
+
{
|
|
24315
|
+
type: "struct",
|
|
24316
|
+
name: "core::array::Span::<vesu::extension::default_extension_po::LiquidationParams>",
|
|
24317
|
+
members: [
|
|
24318
|
+
{
|
|
24319
|
+
name: "snapshot",
|
|
24320
|
+
type: "@core::array::Array::<vesu::extension::default_extension_po::LiquidationParams>"
|
|
24321
|
+
}
|
|
24322
|
+
]
|
|
24323
|
+
},
|
|
24324
|
+
{
|
|
24325
|
+
type: "struct",
|
|
24326
|
+
name: "vesu::data_model::DebtCapParams",
|
|
24327
|
+
members: [
|
|
24328
|
+
{
|
|
24329
|
+
name: "collateral_asset_index",
|
|
24330
|
+
type: "core::integer::u32"
|
|
24331
|
+
},
|
|
24332
|
+
{
|
|
24333
|
+
name: "debt_asset_index",
|
|
24334
|
+
type: "core::integer::u32"
|
|
24335
|
+
},
|
|
24336
|
+
{
|
|
24337
|
+
name: "debt_cap",
|
|
24338
|
+
type: "core::integer::u256"
|
|
24339
|
+
}
|
|
24340
|
+
]
|
|
24341
|
+
},
|
|
24342
|
+
{
|
|
24343
|
+
type: "struct",
|
|
24344
|
+
name: "core::array::Span::<vesu::data_model::DebtCapParams>",
|
|
24345
|
+
members: [
|
|
24346
|
+
{
|
|
24347
|
+
name: "snapshot",
|
|
24348
|
+
type: "@core::array::Array::<vesu::data_model::DebtCapParams>"
|
|
24349
|
+
}
|
|
24350
|
+
]
|
|
24351
|
+
},
|
|
24352
|
+
{
|
|
24353
|
+
type: "struct",
|
|
24354
|
+
name: "vesu::extension::default_extension_po::ShutdownParams",
|
|
24355
|
+
members: [
|
|
24356
|
+
{
|
|
24357
|
+
name: "recovery_period",
|
|
24358
|
+
type: "core::integer::u64"
|
|
24359
|
+
},
|
|
24360
|
+
{
|
|
24361
|
+
name: "subscription_period",
|
|
24362
|
+
type: "core::integer::u64"
|
|
24363
|
+
},
|
|
24364
|
+
{
|
|
24365
|
+
name: "ltv_params",
|
|
24366
|
+
type: "core::array::Span::<vesu::data_model::LTVParams>"
|
|
24367
|
+
}
|
|
24368
|
+
]
|
|
24369
|
+
},
|
|
24370
|
+
{
|
|
24371
|
+
type: "struct",
|
|
24372
|
+
name: "vesu::extension::default_extension_po::FeeParams",
|
|
24373
|
+
members: [
|
|
24374
|
+
{
|
|
24375
|
+
name: "fee_recipient",
|
|
24376
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24377
|
+
}
|
|
24378
|
+
]
|
|
24379
|
+
},
|
|
24380
|
+
{
|
|
24381
|
+
type: "struct",
|
|
24382
|
+
name: "core::array::Span::<(core::felt252, core::felt252, core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress)>",
|
|
24383
|
+
members: [
|
|
24384
|
+
{
|
|
24385
|
+
name: "snapshot",
|
|
24386
|
+
type: "@core::array::Array::<(core::felt252, core::felt252, core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress)>"
|
|
24387
|
+
}
|
|
24388
|
+
]
|
|
24389
|
+
},
|
|
24390
|
+
{
|
|
24391
|
+
type: "struct",
|
|
24392
|
+
name: "core::array::Span::<(core::starknet::contract_address::ContractAddress, vesu::extension::components::interest_rate_model::InterestRateConfig)>",
|
|
24393
|
+
members: [
|
|
24394
|
+
{
|
|
24395
|
+
name: "snapshot",
|
|
24396
|
+
type: "@core::array::Array::<(core::starknet::contract_address::ContractAddress, vesu::extension::components::interest_rate_model::InterestRateConfig)>"
|
|
24397
|
+
}
|
|
24398
|
+
]
|
|
24399
|
+
},
|
|
24400
|
+
{
|
|
24401
|
+
type: "struct",
|
|
24402
|
+
name: "core::array::Span::<(core::starknet::contract_address::ContractAddress, vesu::extension::components::pragma_oracle::OracleConfig)>",
|
|
24403
|
+
members: [
|
|
24404
|
+
{
|
|
24405
|
+
name: "snapshot",
|
|
24406
|
+
type: "@core::array::Array::<(core::starknet::contract_address::ContractAddress, vesu::extension::components::pragma_oracle::OracleConfig)>"
|
|
24407
|
+
}
|
|
24408
|
+
]
|
|
24409
|
+
},
|
|
24410
|
+
{
|
|
24411
|
+
type: "struct",
|
|
24412
|
+
name: "core::array::Span::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, vesu::extension::components::position_hooks::LiquidationConfig)>",
|
|
24413
|
+
members: [
|
|
24414
|
+
{
|
|
24415
|
+
name: "snapshot",
|
|
24416
|
+
type: "@core::array::Array::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, vesu::extension::components::position_hooks::LiquidationConfig)>"
|
|
24417
|
+
}
|
|
24418
|
+
]
|
|
24419
|
+
},
|
|
24420
|
+
{
|
|
24421
|
+
type: "struct",
|
|
24422
|
+
name: "core::array::Span::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, vesu::extension::components::position_hooks::Pair)>",
|
|
24423
|
+
members: [
|
|
24424
|
+
{
|
|
24425
|
+
name: "snapshot",
|
|
24426
|
+
type: "@core::array::Array::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, vesu::extension::components::position_hooks::Pair)>"
|
|
24427
|
+
}
|
|
24428
|
+
]
|
|
24429
|
+
},
|
|
24430
|
+
{
|
|
24431
|
+
type: "struct",
|
|
24432
|
+
name: "core::array::Span::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, core::integer::u256)>",
|
|
24433
|
+
members: [
|
|
24434
|
+
{
|
|
24435
|
+
name: "snapshot",
|
|
24436
|
+
type: "@core::array::Array::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, core::integer::u256)>"
|
|
24437
|
+
}
|
|
24438
|
+
]
|
|
24439
|
+
},
|
|
24440
|
+
{
|
|
24441
|
+
type: "struct",
|
|
24442
|
+
name: "core::array::Span::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, vesu::data_model::LTVConfig)>",
|
|
24443
|
+
members: [
|
|
24444
|
+
{
|
|
24445
|
+
name: "snapshot",
|
|
24446
|
+
type: "@core::array::Array::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, vesu::data_model::LTVConfig)>"
|
|
24447
|
+
}
|
|
24448
|
+
]
|
|
24449
|
+
},
|
|
24450
|
+
{
|
|
24451
|
+
type: "interface",
|
|
24452
|
+
name: "vesu::v2::default_extension_po_v2::IDefaultExtensionPOV2",
|
|
24453
|
+
items: [
|
|
24454
|
+
{
|
|
24455
|
+
type: "function",
|
|
24456
|
+
name: "pool_name",
|
|
24457
|
+
inputs: [
|
|
24458
|
+
{
|
|
24459
|
+
name: "pool_id",
|
|
24460
|
+
type: "core::felt252"
|
|
24461
|
+
}
|
|
24462
|
+
],
|
|
24463
|
+
outputs: [
|
|
24464
|
+
{
|
|
24465
|
+
type: "core::felt252"
|
|
24466
|
+
}
|
|
24467
|
+
],
|
|
24468
|
+
state_mutability: "view"
|
|
24469
|
+
},
|
|
24470
|
+
{
|
|
24471
|
+
type: "function",
|
|
24472
|
+
name: "pool_owner",
|
|
24473
|
+
inputs: [
|
|
24474
|
+
{
|
|
24475
|
+
name: "pool_id",
|
|
24476
|
+
type: "core::felt252"
|
|
24477
|
+
}
|
|
24478
|
+
],
|
|
24479
|
+
outputs: [
|
|
24480
|
+
{
|
|
24481
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24482
|
+
}
|
|
24483
|
+
],
|
|
24484
|
+
state_mutability: "view"
|
|
24485
|
+
},
|
|
24486
|
+
{
|
|
24487
|
+
type: "function",
|
|
24488
|
+
name: "shutdown_mode_agent",
|
|
24489
|
+
inputs: [
|
|
24490
|
+
{
|
|
24491
|
+
name: "pool_id",
|
|
24492
|
+
type: "core::felt252"
|
|
24493
|
+
}
|
|
24494
|
+
],
|
|
24495
|
+
outputs: [
|
|
24496
|
+
{
|
|
24497
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24498
|
+
}
|
|
24499
|
+
],
|
|
24500
|
+
state_mutability: "view"
|
|
24501
|
+
},
|
|
24502
|
+
{
|
|
24503
|
+
type: "function",
|
|
24504
|
+
name: "pragma_oracle",
|
|
24505
|
+
inputs: [],
|
|
24506
|
+
outputs: [
|
|
24507
|
+
{
|
|
24508
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24509
|
+
}
|
|
24510
|
+
],
|
|
24511
|
+
state_mutability: "view"
|
|
24512
|
+
},
|
|
24513
|
+
{
|
|
24514
|
+
type: "function",
|
|
24515
|
+
name: "pragma_summary",
|
|
24516
|
+
inputs: [],
|
|
24517
|
+
outputs: [
|
|
24518
|
+
{
|
|
24519
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24520
|
+
}
|
|
24521
|
+
],
|
|
24522
|
+
state_mutability: "view"
|
|
24523
|
+
},
|
|
24524
|
+
{
|
|
24525
|
+
type: "function",
|
|
24526
|
+
name: "oracle_config",
|
|
24527
|
+
inputs: [
|
|
24528
|
+
{
|
|
24529
|
+
name: "pool_id",
|
|
24530
|
+
type: "core::felt252"
|
|
24531
|
+
},
|
|
24532
|
+
{
|
|
24533
|
+
name: "asset",
|
|
24534
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24535
|
+
}
|
|
24536
|
+
],
|
|
24537
|
+
outputs: [
|
|
24538
|
+
{
|
|
24539
|
+
type: "vesu::extension::components::pragma_oracle::OracleConfig"
|
|
24540
|
+
}
|
|
24541
|
+
],
|
|
24542
|
+
state_mutability: "view"
|
|
24543
|
+
},
|
|
24544
|
+
{
|
|
24545
|
+
type: "function",
|
|
24546
|
+
name: "fee_config",
|
|
24547
|
+
inputs: [
|
|
24548
|
+
{
|
|
24549
|
+
name: "pool_id",
|
|
24550
|
+
type: "core::felt252"
|
|
24551
|
+
}
|
|
24552
|
+
],
|
|
24553
|
+
outputs: [
|
|
24554
|
+
{
|
|
24555
|
+
type: "vesu::extension::components::fee_model::FeeConfig"
|
|
24556
|
+
}
|
|
24557
|
+
],
|
|
24558
|
+
state_mutability: "view"
|
|
24559
|
+
},
|
|
24560
|
+
{
|
|
24561
|
+
type: "function",
|
|
24562
|
+
name: "debt_caps",
|
|
24563
|
+
inputs: [
|
|
24564
|
+
{
|
|
24565
|
+
name: "pool_id",
|
|
24566
|
+
type: "core::felt252"
|
|
24567
|
+
},
|
|
24568
|
+
{
|
|
24569
|
+
name: "collateral_asset",
|
|
24570
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24571
|
+
},
|
|
24572
|
+
{
|
|
24573
|
+
name: "debt_asset",
|
|
24574
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24575
|
+
}
|
|
24576
|
+
],
|
|
24577
|
+
outputs: [
|
|
24578
|
+
{
|
|
24579
|
+
type: "core::integer::u256"
|
|
24580
|
+
}
|
|
24581
|
+
],
|
|
24582
|
+
state_mutability: "view"
|
|
24583
|
+
},
|
|
24584
|
+
{
|
|
24585
|
+
type: "function",
|
|
24586
|
+
name: "interest_rate_config",
|
|
24587
|
+
inputs: [
|
|
24588
|
+
{
|
|
24589
|
+
name: "pool_id",
|
|
24590
|
+
type: "core::felt252"
|
|
24591
|
+
},
|
|
24592
|
+
{
|
|
24593
|
+
name: "asset",
|
|
24594
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24595
|
+
}
|
|
24596
|
+
],
|
|
24597
|
+
outputs: [
|
|
24598
|
+
{
|
|
24599
|
+
type: "vesu::extension::components::interest_rate_model::InterestRateConfig"
|
|
24600
|
+
}
|
|
24601
|
+
],
|
|
24602
|
+
state_mutability: "view"
|
|
24603
|
+
},
|
|
24604
|
+
{
|
|
24605
|
+
type: "function",
|
|
24606
|
+
name: "liquidation_config",
|
|
24607
|
+
inputs: [
|
|
24608
|
+
{
|
|
24609
|
+
name: "pool_id",
|
|
24610
|
+
type: "core::felt252"
|
|
24611
|
+
},
|
|
24612
|
+
{
|
|
24613
|
+
name: "collateral_asset",
|
|
24614
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24615
|
+
},
|
|
24616
|
+
{
|
|
24617
|
+
name: "debt_asset",
|
|
24618
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24619
|
+
}
|
|
24620
|
+
],
|
|
24621
|
+
outputs: [
|
|
24622
|
+
{
|
|
24623
|
+
type: "vesu::extension::components::position_hooks::LiquidationConfig"
|
|
24624
|
+
}
|
|
24625
|
+
],
|
|
24626
|
+
state_mutability: "view"
|
|
24627
|
+
},
|
|
24628
|
+
{
|
|
24629
|
+
type: "function",
|
|
24630
|
+
name: "shutdown_config",
|
|
24631
|
+
inputs: [
|
|
24632
|
+
{
|
|
24633
|
+
name: "pool_id",
|
|
24634
|
+
type: "core::felt252"
|
|
24635
|
+
}
|
|
24636
|
+
],
|
|
24637
|
+
outputs: [
|
|
24638
|
+
{
|
|
24639
|
+
type: "vesu::extension::components::position_hooks::ShutdownConfig"
|
|
24640
|
+
}
|
|
24641
|
+
],
|
|
24642
|
+
state_mutability: "view"
|
|
24643
|
+
},
|
|
24644
|
+
{
|
|
24645
|
+
type: "function",
|
|
24646
|
+
name: "shutdown_ltv_config",
|
|
24647
|
+
inputs: [
|
|
24648
|
+
{
|
|
24649
|
+
name: "pool_id",
|
|
24650
|
+
type: "core::felt252"
|
|
24651
|
+
},
|
|
24652
|
+
{
|
|
24653
|
+
name: "collateral_asset",
|
|
24654
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24655
|
+
},
|
|
24656
|
+
{
|
|
24657
|
+
name: "debt_asset",
|
|
24658
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24659
|
+
}
|
|
24660
|
+
],
|
|
24661
|
+
outputs: [
|
|
24662
|
+
{
|
|
24663
|
+
type: "vesu::data_model::LTVConfig"
|
|
24664
|
+
}
|
|
24665
|
+
],
|
|
24666
|
+
state_mutability: "view"
|
|
24667
|
+
},
|
|
24668
|
+
{
|
|
24669
|
+
type: "function",
|
|
24670
|
+
name: "shutdown_status",
|
|
24671
|
+
inputs: [
|
|
24672
|
+
{
|
|
24673
|
+
name: "pool_id",
|
|
24674
|
+
type: "core::felt252"
|
|
24675
|
+
},
|
|
24676
|
+
{
|
|
24677
|
+
name: "collateral_asset",
|
|
24678
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24679
|
+
},
|
|
24680
|
+
{
|
|
24681
|
+
name: "debt_asset",
|
|
24682
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24683
|
+
}
|
|
24684
|
+
],
|
|
24685
|
+
outputs: [
|
|
24686
|
+
{
|
|
24687
|
+
type: "vesu::extension::components::position_hooks::ShutdownStatus"
|
|
24688
|
+
}
|
|
24689
|
+
],
|
|
24690
|
+
state_mutability: "view"
|
|
24691
|
+
},
|
|
24692
|
+
{
|
|
24693
|
+
type: "function",
|
|
24694
|
+
name: "pairs",
|
|
24695
|
+
inputs: [
|
|
24696
|
+
{
|
|
24697
|
+
name: "pool_id",
|
|
24698
|
+
type: "core::felt252"
|
|
24699
|
+
},
|
|
24700
|
+
{
|
|
24701
|
+
name: "collateral_asset",
|
|
24702
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24703
|
+
},
|
|
24704
|
+
{
|
|
24705
|
+
name: "debt_asset",
|
|
24706
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24707
|
+
}
|
|
24708
|
+
],
|
|
24709
|
+
outputs: [
|
|
24710
|
+
{
|
|
24711
|
+
type: "vesu::extension::components::position_hooks::Pair"
|
|
24712
|
+
}
|
|
24713
|
+
],
|
|
24714
|
+
state_mutability: "view"
|
|
24715
|
+
},
|
|
24716
|
+
{
|
|
24717
|
+
type: "function",
|
|
24718
|
+
name: "violation_timestamp_for_pair",
|
|
24719
|
+
inputs: [
|
|
24720
|
+
{
|
|
24721
|
+
name: "pool_id",
|
|
24722
|
+
type: "core::felt252"
|
|
24723
|
+
},
|
|
24724
|
+
{
|
|
24725
|
+
name: "collateral_asset",
|
|
24726
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24727
|
+
},
|
|
24728
|
+
{
|
|
24729
|
+
name: "debt_asset",
|
|
24730
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24731
|
+
}
|
|
24732
|
+
],
|
|
24733
|
+
outputs: [
|
|
24734
|
+
{
|
|
24735
|
+
type: "core::integer::u64"
|
|
24736
|
+
}
|
|
24737
|
+
],
|
|
24738
|
+
state_mutability: "view"
|
|
24739
|
+
},
|
|
24740
|
+
{
|
|
24741
|
+
type: "function",
|
|
24742
|
+
name: "violation_timestamp_count",
|
|
24743
|
+
inputs: [
|
|
24744
|
+
{
|
|
24745
|
+
name: "pool_id",
|
|
24746
|
+
type: "core::felt252"
|
|
24747
|
+
},
|
|
24748
|
+
{
|
|
24749
|
+
name: "violation_timestamp",
|
|
24750
|
+
type: "core::integer::u64"
|
|
24751
|
+
}
|
|
24752
|
+
],
|
|
24753
|
+
outputs: [
|
|
24754
|
+
{
|
|
24755
|
+
type: "core::integer::u128"
|
|
24756
|
+
}
|
|
24757
|
+
],
|
|
24758
|
+
state_mutability: "view"
|
|
24759
|
+
},
|
|
24760
|
+
{
|
|
24761
|
+
type: "function",
|
|
24762
|
+
name: "oldest_violation_timestamp",
|
|
24763
|
+
inputs: [
|
|
24764
|
+
{
|
|
24765
|
+
name: "pool_id",
|
|
24766
|
+
type: "core::felt252"
|
|
24767
|
+
}
|
|
24768
|
+
],
|
|
24769
|
+
outputs: [
|
|
24770
|
+
{
|
|
24771
|
+
type: "core::integer::u64"
|
|
24772
|
+
}
|
|
24773
|
+
],
|
|
24774
|
+
state_mutability: "view"
|
|
24775
|
+
},
|
|
24776
|
+
{
|
|
24777
|
+
type: "function",
|
|
24778
|
+
name: "next_violation_timestamp",
|
|
24779
|
+
inputs: [
|
|
24780
|
+
{
|
|
24781
|
+
name: "pool_id",
|
|
24782
|
+
type: "core::felt252"
|
|
24783
|
+
},
|
|
24784
|
+
{
|
|
24785
|
+
name: "violation_timestamp",
|
|
24786
|
+
type: "core::integer::u64"
|
|
24787
|
+
}
|
|
24788
|
+
],
|
|
24789
|
+
outputs: [
|
|
24790
|
+
{
|
|
24791
|
+
type: "core::integer::u64"
|
|
24792
|
+
}
|
|
24793
|
+
],
|
|
24794
|
+
state_mutability: "view"
|
|
24795
|
+
},
|
|
24796
|
+
{
|
|
24797
|
+
type: "function",
|
|
24798
|
+
name: "v_token_for_collateral_asset",
|
|
24799
|
+
inputs: [
|
|
24800
|
+
{
|
|
24801
|
+
name: "pool_id",
|
|
24802
|
+
type: "core::felt252"
|
|
24803
|
+
},
|
|
24804
|
+
{
|
|
24805
|
+
name: "collateral_asset",
|
|
24806
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24807
|
+
}
|
|
24808
|
+
],
|
|
24809
|
+
outputs: [
|
|
24810
|
+
{
|
|
24811
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24812
|
+
}
|
|
24813
|
+
],
|
|
24814
|
+
state_mutability: "view"
|
|
24815
|
+
},
|
|
24816
|
+
{
|
|
24817
|
+
type: "function",
|
|
24818
|
+
name: "collateral_asset_for_v_token",
|
|
24819
|
+
inputs: [
|
|
24820
|
+
{
|
|
24821
|
+
name: "pool_id",
|
|
24822
|
+
type: "core::felt252"
|
|
24823
|
+
},
|
|
24824
|
+
{
|
|
24825
|
+
name: "v_token",
|
|
24826
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24827
|
+
}
|
|
24828
|
+
],
|
|
24829
|
+
outputs: [
|
|
24830
|
+
{
|
|
24831
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24832
|
+
}
|
|
24833
|
+
],
|
|
24834
|
+
state_mutability: "view"
|
|
24835
|
+
},
|
|
24836
|
+
{
|
|
24837
|
+
type: "function",
|
|
24838
|
+
name: "create_pool",
|
|
24839
|
+
inputs: [
|
|
24840
|
+
{
|
|
24841
|
+
name: "name",
|
|
24842
|
+
type: "core::felt252"
|
|
24843
|
+
},
|
|
24844
|
+
{
|
|
24845
|
+
name: "asset_params",
|
|
24846
|
+
type: "core::array::Span::<vesu::data_model::AssetParams>"
|
|
24847
|
+
},
|
|
24848
|
+
{
|
|
24849
|
+
name: "v_token_params",
|
|
24850
|
+
type: "core::array::Span::<vesu::extension::default_extension_po::VTokenParams>"
|
|
24851
|
+
},
|
|
24852
|
+
{
|
|
24853
|
+
name: "ltv_params",
|
|
24854
|
+
type: "core::array::Span::<vesu::data_model::LTVParams>"
|
|
24855
|
+
},
|
|
24856
|
+
{
|
|
24857
|
+
name: "interest_rate_configs",
|
|
24858
|
+
type: "core::array::Span::<vesu::extension::components::interest_rate_model::InterestRateConfig>"
|
|
24859
|
+
},
|
|
24860
|
+
{
|
|
24861
|
+
name: "pragma_oracle_params",
|
|
24862
|
+
type: "core::array::Span::<vesu::extension::default_extension_po::PragmaOracleParams>"
|
|
24863
|
+
},
|
|
24864
|
+
{
|
|
24865
|
+
name: "liquidation_params",
|
|
24866
|
+
type: "core::array::Span::<vesu::extension::default_extension_po::LiquidationParams>"
|
|
24867
|
+
},
|
|
24868
|
+
{
|
|
24869
|
+
name: "debt_caps",
|
|
24870
|
+
type: "core::array::Span::<vesu::data_model::DebtCapParams>"
|
|
24871
|
+
},
|
|
24872
|
+
{
|
|
24873
|
+
name: "shutdown_params",
|
|
24874
|
+
type: "vesu::extension::default_extension_po::ShutdownParams"
|
|
24875
|
+
},
|
|
24876
|
+
{
|
|
24877
|
+
name: "fee_params",
|
|
24878
|
+
type: "vesu::extension::default_extension_po::FeeParams"
|
|
24879
|
+
},
|
|
24880
|
+
{
|
|
24881
|
+
name: "owner",
|
|
24882
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24883
|
+
}
|
|
24884
|
+
],
|
|
24885
|
+
outputs: [
|
|
24886
|
+
{
|
|
24887
|
+
type: "core::felt252"
|
|
24888
|
+
}
|
|
24889
|
+
],
|
|
24890
|
+
state_mutability: "external"
|
|
24891
|
+
},
|
|
24892
|
+
{
|
|
24893
|
+
type: "function",
|
|
24894
|
+
name: "add_asset",
|
|
24895
|
+
inputs: [
|
|
24896
|
+
{
|
|
24897
|
+
name: "pool_id",
|
|
24898
|
+
type: "core::felt252"
|
|
24899
|
+
},
|
|
24900
|
+
{
|
|
24901
|
+
name: "asset_params",
|
|
24902
|
+
type: "vesu::data_model::AssetParams"
|
|
24903
|
+
},
|
|
24904
|
+
{
|
|
24905
|
+
name: "v_token_params",
|
|
24906
|
+
type: "vesu::extension::default_extension_po::VTokenParams"
|
|
24907
|
+
},
|
|
24908
|
+
{
|
|
24909
|
+
name: "interest_rate_config",
|
|
24910
|
+
type: "vesu::extension::components::interest_rate_model::InterestRateConfig"
|
|
24911
|
+
},
|
|
24912
|
+
{
|
|
24913
|
+
name: "pragma_oracle_params",
|
|
24914
|
+
type: "vesu::extension::default_extension_po::PragmaOracleParams"
|
|
24915
|
+
}
|
|
24916
|
+
],
|
|
24917
|
+
outputs: [],
|
|
24918
|
+
state_mutability: "external"
|
|
24919
|
+
},
|
|
24920
|
+
{
|
|
24921
|
+
type: "function",
|
|
24922
|
+
name: "set_asset_parameter",
|
|
24923
|
+
inputs: [
|
|
24924
|
+
{
|
|
24925
|
+
name: "pool_id",
|
|
24926
|
+
type: "core::felt252"
|
|
24927
|
+
},
|
|
24928
|
+
{
|
|
24929
|
+
name: "asset",
|
|
24930
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24931
|
+
},
|
|
24932
|
+
{
|
|
24933
|
+
name: "parameter",
|
|
24934
|
+
type: "core::felt252"
|
|
24935
|
+
},
|
|
24936
|
+
{
|
|
24937
|
+
name: "value",
|
|
24938
|
+
type: "core::integer::u256"
|
|
24939
|
+
}
|
|
24940
|
+
],
|
|
24941
|
+
outputs: [],
|
|
24942
|
+
state_mutability: "external"
|
|
24943
|
+
},
|
|
24944
|
+
{
|
|
24945
|
+
type: "function",
|
|
24946
|
+
name: "set_debt_cap",
|
|
24947
|
+
inputs: [
|
|
24948
|
+
{
|
|
24949
|
+
name: "pool_id",
|
|
24950
|
+
type: "core::felt252"
|
|
24951
|
+
},
|
|
24952
|
+
{
|
|
24953
|
+
name: "collateral_asset",
|
|
24954
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24955
|
+
},
|
|
24956
|
+
{
|
|
24957
|
+
name: "debt_asset",
|
|
24958
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24959
|
+
},
|
|
24960
|
+
{
|
|
24961
|
+
name: "debt_cap",
|
|
24962
|
+
type: "core::integer::u256"
|
|
24963
|
+
}
|
|
24964
|
+
],
|
|
24965
|
+
outputs: [],
|
|
24966
|
+
state_mutability: "external"
|
|
24967
|
+
},
|
|
24968
|
+
{
|
|
24969
|
+
type: "function",
|
|
24970
|
+
name: "set_interest_rate_parameter",
|
|
24971
|
+
inputs: [
|
|
24972
|
+
{
|
|
24973
|
+
name: "pool_id",
|
|
24974
|
+
type: "core::felt252"
|
|
24975
|
+
},
|
|
24976
|
+
{
|
|
24977
|
+
name: "asset",
|
|
24978
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
24979
|
+
},
|
|
24980
|
+
{
|
|
24981
|
+
name: "parameter",
|
|
24982
|
+
type: "core::felt252"
|
|
24983
|
+
},
|
|
24984
|
+
{
|
|
24985
|
+
name: "value",
|
|
24986
|
+
type: "core::integer::u256"
|
|
24987
|
+
}
|
|
24988
|
+
],
|
|
24989
|
+
outputs: [],
|
|
24990
|
+
state_mutability: "external"
|
|
24991
|
+
},
|
|
24992
|
+
{
|
|
24993
|
+
type: "function",
|
|
24994
|
+
name: "set_oracle_parameter",
|
|
24995
|
+
inputs: [
|
|
24996
|
+
{
|
|
24997
|
+
name: "pool_id",
|
|
24998
|
+
type: "core::felt252"
|
|
24999
|
+
},
|
|
25000
|
+
{
|
|
25001
|
+
name: "asset",
|
|
25002
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25003
|
+
},
|
|
25004
|
+
{
|
|
25005
|
+
name: "parameter",
|
|
25006
|
+
type: "core::felt252"
|
|
25007
|
+
},
|
|
25008
|
+
{
|
|
25009
|
+
name: "value",
|
|
25010
|
+
type: "core::felt252"
|
|
25011
|
+
}
|
|
25012
|
+
],
|
|
25013
|
+
outputs: [],
|
|
25014
|
+
state_mutability: "external"
|
|
25015
|
+
},
|
|
25016
|
+
{
|
|
25017
|
+
type: "function",
|
|
25018
|
+
name: "set_liquidation_config",
|
|
25019
|
+
inputs: [
|
|
25020
|
+
{
|
|
25021
|
+
name: "pool_id",
|
|
25022
|
+
type: "core::felt252"
|
|
25023
|
+
},
|
|
25024
|
+
{
|
|
25025
|
+
name: "collateral_asset",
|
|
25026
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25027
|
+
},
|
|
25028
|
+
{
|
|
25029
|
+
name: "debt_asset",
|
|
25030
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25031
|
+
},
|
|
25032
|
+
{
|
|
25033
|
+
name: "liquidation_config",
|
|
25034
|
+
type: "vesu::extension::components::position_hooks::LiquidationConfig"
|
|
25035
|
+
}
|
|
25036
|
+
],
|
|
25037
|
+
outputs: [],
|
|
25038
|
+
state_mutability: "external"
|
|
25039
|
+
},
|
|
25040
|
+
{
|
|
25041
|
+
type: "function",
|
|
25042
|
+
name: "set_ltv_config",
|
|
25043
|
+
inputs: [
|
|
25044
|
+
{
|
|
25045
|
+
name: "pool_id",
|
|
25046
|
+
type: "core::felt252"
|
|
25047
|
+
},
|
|
25048
|
+
{
|
|
25049
|
+
name: "collateral_asset",
|
|
25050
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25051
|
+
},
|
|
25052
|
+
{
|
|
25053
|
+
name: "debt_asset",
|
|
25054
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25055
|
+
},
|
|
25056
|
+
{
|
|
25057
|
+
name: "ltv_config",
|
|
25058
|
+
type: "vesu::data_model::LTVConfig"
|
|
25059
|
+
}
|
|
25060
|
+
],
|
|
25061
|
+
outputs: [],
|
|
25062
|
+
state_mutability: "external"
|
|
25063
|
+
},
|
|
25064
|
+
{
|
|
25065
|
+
type: "function",
|
|
25066
|
+
name: "set_shutdown_config",
|
|
25067
|
+
inputs: [
|
|
25068
|
+
{
|
|
25069
|
+
name: "pool_id",
|
|
25070
|
+
type: "core::felt252"
|
|
25071
|
+
},
|
|
25072
|
+
{
|
|
25073
|
+
name: "shutdown_config",
|
|
25074
|
+
type: "vesu::extension::components::position_hooks::ShutdownConfig"
|
|
25075
|
+
}
|
|
25076
|
+
],
|
|
25077
|
+
outputs: [],
|
|
25078
|
+
state_mutability: "external"
|
|
25079
|
+
},
|
|
25080
|
+
{
|
|
25081
|
+
type: "function",
|
|
25082
|
+
name: "set_shutdown_ltv_config",
|
|
25083
|
+
inputs: [
|
|
25084
|
+
{
|
|
25085
|
+
name: "pool_id",
|
|
25086
|
+
type: "core::felt252"
|
|
25087
|
+
},
|
|
25088
|
+
{
|
|
25089
|
+
name: "collateral_asset",
|
|
25090
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25091
|
+
},
|
|
25092
|
+
{
|
|
25093
|
+
name: "debt_asset",
|
|
25094
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25095
|
+
},
|
|
25096
|
+
{
|
|
25097
|
+
name: "shutdown_ltv_config",
|
|
25098
|
+
type: "vesu::data_model::LTVConfig"
|
|
25099
|
+
}
|
|
25100
|
+
],
|
|
25101
|
+
outputs: [],
|
|
25102
|
+
state_mutability: "external"
|
|
25103
|
+
},
|
|
25104
|
+
{
|
|
25105
|
+
type: "function",
|
|
25106
|
+
name: "set_shutdown_mode",
|
|
25107
|
+
inputs: [
|
|
25108
|
+
{
|
|
25109
|
+
name: "pool_id",
|
|
25110
|
+
type: "core::felt252"
|
|
25111
|
+
},
|
|
25112
|
+
{
|
|
25113
|
+
name: "shutdown_mode",
|
|
25114
|
+
type: "vesu::extension::components::position_hooks::ShutdownMode"
|
|
25115
|
+
}
|
|
25116
|
+
],
|
|
25117
|
+
outputs: [],
|
|
25118
|
+
state_mutability: "external"
|
|
25119
|
+
},
|
|
25120
|
+
{
|
|
25121
|
+
type: "function",
|
|
25122
|
+
name: "set_pool_owner",
|
|
25123
|
+
inputs: [
|
|
25124
|
+
{
|
|
25125
|
+
name: "pool_id",
|
|
25126
|
+
type: "core::felt252"
|
|
25127
|
+
},
|
|
25128
|
+
{
|
|
25129
|
+
name: "owner",
|
|
25130
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25131
|
+
}
|
|
25132
|
+
],
|
|
25133
|
+
outputs: [],
|
|
25134
|
+
state_mutability: "external"
|
|
25135
|
+
},
|
|
25136
|
+
{
|
|
25137
|
+
type: "function",
|
|
25138
|
+
name: "set_shutdown_mode_agent",
|
|
25139
|
+
inputs: [
|
|
25140
|
+
{
|
|
25141
|
+
name: "pool_id",
|
|
25142
|
+
type: "core::felt252"
|
|
25143
|
+
},
|
|
25144
|
+
{
|
|
25145
|
+
name: "shutdown_mode_agent",
|
|
25146
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25147
|
+
}
|
|
25148
|
+
],
|
|
25149
|
+
outputs: [],
|
|
25150
|
+
state_mutability: "external"
|
|
25151
|
+
},
|
|
25152
|
+
{
|
|
25153
|
+
type: "function",
|
|
25154
|
+
name: "update_shutdown_status",
|
|
25155
|
+
inputs: [
|
|
25156
|
+
{
|
|
25157
|
+
name: "pool_id",
|
|
25158
|
+
type: "core::felt252"
|
|
25159
|
+
},
|
|
25160
|
+
{
|
|
25161
|
+
name: "collateral_asset",
|
|
25162
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25163
|
+
},
|
|
25164
|
+
{
|
|
25165
|
+
name: "debt_asset",
|
|
25166
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25167
|
+
}
|
|
25168
|
+
],
|
|
25169
|
+
outputs: [
|
|
25170
|
+
{
|
|
25171
|
+
type: "vesu::extension::components::position_hooks::ShutdownMode"
|
|
25172
|
+
}
|
|
25173
|
+
],
|
|
25174
|
+
state_mutability: "external"
|
|
25175
|
+
},
|
|
25176
|
+
{
|
|
25177
|
+
type: "function",
|
|
25178
|
+
name: "set_fee_config",
|
|
25179
|
+
inputs: [
|
|
25180
|
+
{
|
|
25181
|
+
name: "pool_id",
|
|
25182
|
+
type: "core::felt252"
|
|
25183
|
+
},
|
|
25184
|
+
{
|
|
25185
|
+
name: "fee_config",
|
|
25186
|
+
type: "vesu::extension::components::fee_model::FeeConfig"
|
|
25187
|
+
}
|
|
25188
|
+
],
|
|
25189
|
+
outputs: [],
|
|
25190
|
+
state_mutability: "external"
|
|
25191
|
+
},
|
|
25192
|
+
{
|
|
25193
|
+
type: "function",
|
|
25194
|
+
name: "claim_fees",
|
|
25195
|
+
inputs: [
|
|
25196
|
+
{
|
|
25197
|
+
name: "pool_id",
|
|
25198
|
+
type: "core::felt252"
|
|
25199
|
+
},
|
|
25200
|
+
{
|
|
25201
|
+
name: "collateral_asset",
|
|
25202
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25203
|
+
}
|
|
25204
|
+
],
|
|
25205
|
+
outputs: [],
|
|
25206
|
+
state_mutability: "external"
|
|
25207
|
+
},
|
|
25208
|
+
{
|
|
25209
|
+
type: "function",
|
|
25210
|
+
name: "migrate_pool",
|
|
25211
|
+
inputs: [
|
|
25212
|
+
{
|
|
25213
|
+
name: "pool_id",
|
|
25214
|
+
type: "core::felt252"
|
|
25215
|
+
},
|
|
25216
|
+
{
|
|
25217
|
+
name: "name",
|
|
25218
|
+
type: "core::felt252"
|
|
25219
|
+
},
|
|
25220
|
+
{
|
|
25221
|
+
name: "v_token_configs",
|
|
25222
|
+
type: "core::array::Span::<(core::felt252, core::felt252, core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress)>"
|
|
25223
|
+
},
|
|
25224
|
+
{
|
|
25225
|
+
name: "interest_rate_configs",
|
|
25226
|
+
type: "core::array::Span::<(core::starknet::contract_address::ContractAddress, vesu::extension::components::interest_rate_model::InterestRateConfig)>"
|
|
25227
|
+
},
|
|
25228
|
+
{
|
|
25229
|
+
name: "pragma_oracle_configs",
|
|
25230
|
+
type: "core::array::Span::<(core::starknet::contract_address::ContractAddress, vesu::extension::components::pragma_oracle::OracleConfig)>"
|
|
25231
|
+
},
|
|
25232
|
+
{
|
|
25233
|
+
name: "liquidation_configs",
|
|
25234
|
+
type: "core::array::Span::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, vesu::extension::components::position_hooks::LiquidationConfig)>"
|
|
25235
|
+
},
|
|
25236
|
+
{
|
|
25237
|
+
name: "pairs",
|
|
25238
|
+
type: "core::array::Span::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, vesu::extension::components::position_hooks::Pair)>"
|
|
25239
|
+
},
|
|
25240
|
+
{
|
|
25241
|
+
name: "debt_caps",
|
|
25242
|
+
type: "core::array::Span::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, core::integer::u256)>"
|
|
25243
|
+
},
|
|
25244
|
+
{
|
|
25245
|
+
name: "shutdown_ltv_configs",
|
|
25246
|
+
type: "core::array::Span::<(core::starknet::contract_address::ContractAddress, core::starknet::contract_address::ContractAddress, vesu::data_model::LTVConfig)>"
|
|
25247
|
+
},
|
|
25248
|
+
{
|
|
25249
|
+
name: "shutdown_config",
|
|
25250
|
+
type: "vesu::extension::components::position_hooks::ShutdownConfig"
|
|
25251
|
+
},
|
|
25252
|
+
{
|
|
25253
|
+
name: "fee_config",
|
|
25254
|
+
type: "vesu::extension::components::fee_model::FeeConfig"
|
|
25255
|
+
},
|
|
25256
|
+
{
|
|
25257
|
+
name: "owner",
|
|
25258
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25259
|
+
}
|
|
25260
|
+
],
|
|
25261
|
+
outputs: [],
|
|
25262
|
+
state_mutability: "external"
|
|
25263
|
+
},
|
|
25264
|
+
{
|
|
25265
|
+
type: "function",
|
|
25266
|
+
name: "set_migrator",
|
|
25267
|
+
inputs: [
|
|
25268
|
+
{
|
|
25269
|
+
name: "migrator",
|
|
25270
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25271
|
+
}
|
|
25272
|
+
],
|
|
25273
|
+
outputs: [],
|
|
25274
|
+
state_mutability: "external"
|
|
25275
|
+
},
|
|
25276
|
+
{
|
|
25277
|
+
type: "function",
|
|
25278
|
+
name: "set_extension_utils_class_hash",
|
|
25279
|
+
inputs: [
|
|
25280
|
+
{
|
|
25281
|
+
name: "extension",
|
|
25282
|
+
type: "core::felt252"
|
|
25283
|
+
}
|
|
25284
|
+
],
|
|
25285
|
+
outputs: [],
|
|
25286
|
+
state_mutability: "external"
|
|
25287
|
+
},
|
|
25288
|
+
{
|
|
25289
|
+
type: "function",
|
|
25290
|
+
name: "upgrade_name",
|
|
25291
|
+
inputs: [],
|
|
25292
|
+
outputs: [
|
|
25293
|
+
{
|
|
25294
|
+
type: "core::felt252"
|
|
25295
|
+
}
|
|
25296
|
+
],
|
|
25297
|
+
state_mutability: "view"
|
|
25298
|
+
},
|
|
25299
|
+
{
|
|
25300
|
+
type: "function",
|
|
25301
|
+
name: "upgrade",
|
|
25302
|
+
inputs: [
|
|
25303
|
+
{
|
|
25304
|
+
name: "new_implementation",
|
|
25305
|
+
type: "core::starknet::class_hash::ClassHash"
|
|
25306
|
+
}
|
|
25307
|
+
],
|
|
25308
|
+
outputs: [],
|
|
25309
|
+
state_mutability: "external"
|
|
25310
|
+
}
|
|
25311
|
+
]
|
|
25312
|
+
},
|
|
25313
|
+
{
|
|
25314
|
+
type: "impl",
|
|
25315
|
+
name: "ExtensionImpl",
|
|
25316
|
+
interface_name: "vesu::extension::interface::IExtension"
|
|
25317
|
+
},
|
|
25318
|
+
{
|
|
25319
|
+
type: "struct",
|
|
25320
|
+
name: "vesu::data_model::AssetPrice",
|
|
25321
|
+
members: [
|
|
25322
|
+
{
|
|
25323
|
+
name: "value",
|
|
25324
|
+
type: "core::integer::u256"
|
|
25325
|
+
},
|
|
25326
|
+
{
|
|
25327
|
+
name: "is_valid",
|
|
25328
|
+
type: "core::bool"
|
|
25329
|
+
}
|
|
25330
|
+
]
|
|
25331
|
+
},
|
|
25332
|
+
{
|
|
25333
|
+
type: "struct",
|
|
25334
|
+
name: "vesu::data_model::AssetConfig",
|
|
25335
|
+
members: [
|
|
25336
|
+
{
|
|
25337
|
+
name: "total_collateral_shares",
|
|
25338
|
+
type: "core::integer::u256"
|
|
25339
|
+
},
|
|
25340
|
+
{
|
|
25341
|
+
name: "total_nominal_debt",
|
|
25342
|
+
type: "core::integer::u256"
|
|
25343
|
+
},
|
|
25344
|
+
{
|
|
25345
|
+
name: "reserve",
|
|
25346
|
+
type: "core::integer::u256"
|
|
25347
|
+
},
|
|
25348
|
+
{
|
|
25349
|
+
name: "max_utilization",
|
|
25350
|
+
type: "core::integer::u256"
|
|
25351
|
+
},
|
|
25352
|
+
{
|
|
25353
|
+
name: "floor",
|
|
25354
|
+
type: "core::integer::u256"
|
|
25355
|
+
},
|
|
25356
|
+
{
|
|
25357
|
+
name: "scale",
|
|
25358
|
+
type: "core::integer::u256"
|
|
25359
|
+
},
|
|
25360
|
+
{
|
|
25361
|
+
name: "is_legacy",
|
|
25362
|
+
type: "core::bool"
|
|
25363
|
+
},
|
|
25364
|
+
{
|
|
25365
|
+
name: "last_updated",
|
|
25366
|
+
type: "core::integer::u64"
|
|
25367
|
+
},
|
|
25368
|
+
{
|
|
25369
|
+
name: "last_rate_accumulator",
|
|
25370
|
+
type: "core::integer::u256"
|
|
25371
|
+
},
|
|
25372
|
+
{
|
|
25373
|
+
name: "last_full_utilization_rate",
|
|
25374
|
+
type: "core::integer::u256"
|
|
25375
|
+
},
|
|
25376
|
+
{
|
|
25377
|
+
name: "fee_rate",
|
|
25378
|
+
type: "core::integer::u256"
|
|
25379
|
+
}
|
|
25380
|
+
]
|
|
25381
|
+
},
|
|
25382
|
+
{
|
|
25383
|
+
type: "struct",
|
|
25384
|
+
name: "vesu::data_model::Position",
|
|
25385
|
+
members: [
|
|
25386
|
+
{
|
|
25387
|
+
name: "collateral_shares",
|
|
25388
|
+
type: "core::integer::u256"
|
|
25389
|
+
},
|
|
25390
|
+
{
|
|
25391
|
+
name: "nominal_debt",
|
|
25392
|
+
type: "core::integer::u256"
|
|
25393
|
+
}
|
|
25394
|
+
]
|
|
25395
|
+
},
|
|
25396
|
+
{
|
|
25397
|
+
type: "struct",
|
|
25398
|
+
name: "vesu::data_model::Context",
|
|
25399
|
+
members: [
|
|
25400
|
+
{
|
|
25401
|
+
name: "pool_id",
|
|
25402
|
+
type: "core::felt252"
|
|
25403
|
+
},
|
|
25404
|
+
{
|
|
25405
|
+
name: "extension",
|
|
25406
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25407
|
+
},
|
|
25408
|
+
{
|
|
25409
|
+
name: "collateral_asset",
|
|
25410
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25411
|
+
},
|
|
25412
|
+
{
|
|
25413
|
+
name: "debt_asset",
|
|
25414
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25415
|
+
},
|
|
25416
|
+
{
|
|
25417
|
+
name: "collateral_asset_config",
|
|
25418
|
+
type: "vesu::data_model::AssetConfig"
|
|
25419
|
+
},
|
|
25420
|
+
{
|
|
25421
|
+
name: "debt_asset_config",
|
|
25422
|
+
type: "vesu::data_model::AssetConfig"
|
|
25423
|
+
},
|
|
25424
|
+
{
|
|
25425
|
+
name: "collateral_asset_price",
|
|
25426
|
+
type: "vesu::data_model::AssetPrice"
|
|
25427
|
+
},
|
|
25428
|
+
{
|
|
25429
|
+
name: "debt_asset_price",
|
|
25430
|
+
type: "vesu::data_model::AssetPrice"
|
|
25431
|
+
},
|
|
25432
|
+
{
|
|
25433
|
+
name: "collateral_asset_fee_shares",
|
|
25434
|
+
type: "core::integer::u256"
|
|
25435
|
+
},
|
|
25436
|
+
{
|
|
25437
|
+
name: "debt_asset_fee_shares",
|
|
25438
|
+
type: "core::integer::u256"
|
|
25439
|
+
},
|
|
25440
|
+
{
|
|
25441
|
+
name: "max_ltv",
|
|
25442
|
+
type: "core::integer::u64"
|
|
25443
|
+
},
|
|
25444
|
+
{
|
|
25445
|
+
name: "user",
|
|
25446
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25447
|
+
},
|
|
25448
|
+
{
|
|
25449
|
+
name: "position",
|
|
25450
|
+
type: "vesu::data_model::Position"
|
|
25451
|
+
}
|
|
25452
|
+
]
|
|
25453
|
+
},
|
|
25454
|
+
{
|
|
25455
|
+
type: "enum",
|
|
25456
|
+
name: "vesu::data_model::AmountType",
|
|
25457
|
+
variants: [
|
|
25458
|
+
{
|
|
25459
|
+
name: "Delta",
|
|
25460
|
+
type: "()"
|
|
25461
|
+
},
|
|
25462
|
+
{
|
|
25463
|
+
name: "Target",
|
|
25464
|
+
type: "()"
|
|
25465
|
+
}
|
|
25466
|
+
]
|
|
25467
|
+
},
|
|
25468
|
+
{
|
|
25469
|
+
type: "enum",
|
|
25470
|
+
name: "vesu::data_model::AmountDenomination",
|
|
25471
|
+
variants: [
|
|
25472
|
+
{
|
|
25473
|
+
name: "Native",
|
|
25474
|
+
type: "()"
|
|
25475
|
+
},
|
|
25476
|
+
{
|
|
25477
|
+
name: "Assets",
|
|
25478
|
+
type: "()"
|
|
25479
|
+
}
|
|
25480
|
+
]
|
|
25481
|
+
},
|
|
25482
|
+
{
|
|
25483
|
+
type: "struct",
|
|
25484
|
+
name: "alexandria_math::i257::i257",
|
|
25485
|
+
members: [
|
|
25486
|
+
{
|
|
25487
|
+
name: "abs",
|
|
25488
|
+
type: "core::integer::u256"
|
|
25489
|
+
},
|
|
25490
|
+
{
|
|
25491
|
+
name: "is_negative",
|
|
25492
|
+
type: "core::bool"
|
|
25493
|
+
}
|
|
25494
|
+
]
|
|
25495
|
+
},
|
|
25496
|
+
{
|
|
25497
|
+
type: "struct",
|
|
25498
|
+
name: "vesu::data_model::Amount",
|
|
25499
|
+
members: [
|
|
25500
|
+
{
|
|
25501
|
+
name: "amount_type",
|
|
25502
|
+
type: "vesu::data_model::AmountType"
|
|
25503
|
+
},
|
|
25504
|
+
{
|
|
25505
|
+
name: "denomination",
|
|
25506
|
+
type: "vesu::data_model::AmountDenomination"
|
|
25507
|
+
},
|
|
25508
|
+
{
|
|
25509
|
+
name: "value",
|
|
25510
|
+
type: "alexandria_math::i257::i257"
|
|
25511
|
+
}
|
|
25512
|
+
]
|
|
25513
|
+
},
|
|
25514
|
+
{
|
|
25515
|
+
type: "struct",
|
|
25516
|
+
name: "core::array::Span::<core::felt252>",
|
|
25517
|
+
members: [
|
|
25518
|
+
{
|
|
25519
|
+
name: "snapshot",
|
|
25520
|
+
type: "@core::array::Array::<core::felt252>"
|
|
25521
|
+
}
|
|
25522
|
+
]
|
|
25523
|
+
},
|
|
25524
|
+
{
|
|
25525
|
+
type: "struct",
|
|
25526
|
+
name: "vesu::data_model::UnsignedAmount",
|
|
25527
|
+
members: [
|
|
25528
|
+
{
|
|
25529
|
+
name: "amount_type",
|
|
25530
|
+
type: "vesu::data_model::AmountType"
|
|
25531
|
+
},
|
|
25532
|
+
{
|
|
25533
|
+
name: "denomination",
|
|
25534
|
+
type: "vesu::data_model::AmountDenomination"
|
|
25535
|
+
},
|
|
25536
|
+
{
|
|
25537
|
+
name: "value",
|
|
25538
|
+
type: "core::integer::u256"
|
|
25539
|
+
}
|
|
25540
|
+
]
|
|
25541
|
+
},
|
|
25542
|
+
{
|
|
25543
|
+
type: "interface",
|
|
25544
|
+
name: "vesu::extension::interface::IExtension",
|
|
25545
|
+
items: [
|
|
25546
|
+
{
|
|
25547
|
+
type: "function",
|
|
25548
|
+
name: "singleton",
|
|
25549
|
+
inputs: [],
|
|
25550
|
+
outputs: [
|
|
25551
|
+
{
|
|
25552
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25553
|
+
}
|
|
25554
|
+
],
|
|
25555
|
+
state_mutability: "view"
|
|
25556
|
+
},
|
|
25557
|
+
{
|
|
25558
|
+
type: "function",
|
|
25559
|
+
name: "price",
|
|
25560
|
+
inputs: [
|
|
25561
|
+
{
|
|
25562
|
+
name: "pool_id",
|
|
25563
|
+
type: "core::felt252"
|
|
25564
|
+
},
|
|
25565
|
+
{
|
|
25566
|
+
name: "asset",
|
|
25567
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25568
|
+
}
|
|
25569
|
+
],
|
|
25570
|
+
outputs: [
|
|
25571
|
+
{
|
|
25572
|
+
type: "vesu::data_model::AssetPrice"
|
|
25573
|
+
}
|
|
25574
|
+
],
|
|
25575
|
+
state_mutability: "view"
|
|
25576
|
+
},
|
|
25577
|
+
{
|
|
25578
|
+
type: "function",
|
|
25579
|
+
name: "interest_rate",
|
|
25580
|
+
inputs: [
|
|
25581
|
+
{
|
|
25582
|
+
name: "pool_id",
|
|
25583
|
+
type: "core::felt252"
|
|
25584
|
+
},
|
|
25585
|
+
{
|
|
25586
|
+
name: "asset",
|
|
25587
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25588
|
+
},
|
|
25589
|
+
{
|
|
25590
|
+
name: "utilization",
|
|
25591
|
+
type: "core::integer::u256"
|
|
25592
|
+
},
|
|
25593
|
+
{
|
|
25594
|
+
name: "last_updated",
|
|
25595
|
+
type: "core::integer::u64"
|
|
25596
|
+
},
|
|
25597
|
+
{
|
|
25598
|
+
name: "last_full_utilization_rate",
|
|
25599
|
+
type: "core::integer::u256"
|
|
25600
|
+
}
|
|
25601
|
+
],
|
|
25602
|
+
outputs: [
|
|
25603
|
+
{
|
|
25604
|
+
type: "core::integer::u256"
|
|
25605
|
+
}
|
|
25606
|
+
],
|
|
25607
|
+
state_mutability: "view"
|
|
25608
|
+
},
|
|
25609
|
+
{
|
|
25610
|
+
type: "function",
|
|
25611
|
+
name: "rate_accumulator",
|
|
25612
|
+
inputs: [
|
|
25613
|
+
{
|
|
25614
|
+
name: "pool_id",
|
|
25615
|
+
type: "core::felt252"
|
|
25616
|
+
},
|
|
25617
|
+
{
|
|
25618
|
+
name: "asset",
|
|
25619
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25620
|
+
},
|
|
25621
|
+
{
|
|
25622
|
+
name: "utilization",
|
|
25623
|
+
type: "core::integer::u256"
|
|
25624
|
+
},
|
|
25625
|
+
{
|
|
25626
|
+
name: "last_updated",
|
|
25627
|
+
type: "core::integer::u64"
|
|
25628
|
+
},
|
|
25629
|
+
{
|
|
25630
|
+
name: "last_rate_accumulator",
|
|
25631
|
+
type: "core::integer::u256"
|
|
25632
|
+
},
|
|
25633
|
+
{
|
|
25634
|
+
name: "last_full_utilization_rate",
|
|
25635
|
+
type: "core::integer::u256"
|
|
25636
|
+
}
|
|
25637
|
+
],
|
|
25638
|
+
outputs: [
|
|
25639
|
+
{
|
|
25640
|
+
type: "(core::integer::u256, core::integer::u256)"
|
|
25641
|
+
}
|
|
25642
|
+
],
|
|
25643
|
+
state_mutability: "view"
|
|
25644
|
+
},
|
|
25645
|
+
{
|
|
25646
|
+
type: "function",
|
|
25647
|
+
name: "before_modify_position",
|
|
25648
|
+
inputs: [
|
|
25649
|
+
{
|
|
25650
|
+
name: "context",
|
|
25651
|
+
type: "vesu::data_model::Context"
|
|
25652
|
+
},
|
|
25653
|
+
{
|
|
25654
|
+
name: "collateral",
|
|
25655
|
+
type: "vesu::data_model::Amount"
|
|
25656
|
+
},
|
|
25657
|
+
{
|
|
25658
|
+
name: "debt",
|
|
25659
|
+
type: "vesu::data_model::Amount"
|
|
25660
|
+
},
|
|
25661
|
+
{
|
|
25662
|
+
name: "data",
|
|
25663
|
+
type: "core::array::Span::<core::felt252>"
|
|
25664
|
+
},
|
|
25665
|
+
{
|
|
25666
|
+
name: "caller",
|
|
25667
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25668
|
+
}
|
|
25669
|
+
],
|
|
25670
|
+
outputs: [
|
|
25671
|
+
{
|
|
25672
|
+
type: "(vesu::data_model::Amount, vesu::data_model::Amount)"
|
|
25673
|
+
}
|
|
25674
|
+
],
|
|
25675
|
+
state_mutability: "external"
|
|
25676
|
+
},
|
|
25677
|
+
{
|
|
25678
|
+
type: "function",
|
|
25679
|
+
name: "after_modify_position",
|
|
25680
|
+
inputs: [
|
|
25681
|
+
{
|
|
25682
|
+
name: "context",
|
|
25683
|
+
type: "vesu::data_model::Context"
|
|
25684
|
+
},
|
|
25685
|
+
{
|
|
25686
|
+
name: "collateral_delta",
|
|
25687
|
+
type: "alexandria_math::i257::i257"
|
|
25688
|
+
},
|
|
25689
|
+
{
|
|
25690
|
+
name: "collateral_shares_delta",
|
|
25691
|
+
type: "alexandria_math::i257::i257"
|
|
25692
|
+
},
|
|
25693
|
+
{
|
|
25694
|
+
name: "debt_delta",
|
|
25695
|
+
type: "alexandria_math::i257::i257"
|
|
25696
|
+
},
|
|
25697
|
+
{
|
|
25698
|
+
name: "nominal_debt_delta",
|
|
25699
|
+
type: "alexandria_math::i257::i257"
|
|
25700
|
+
},
|
|
25701
|
+
{
|
|
25702
|
+
name: "data",
|
|
25703
|
+
type: "core::array::Span::<core::felt252>"
|
|
25704
|
+
},
|
|
25705
|
+
{
|
|
25706
|
+
name: "caller",
|
|
25707
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25708
|
+
}
|
|
25709
|
+
],
|
|
25710
|
+
outputs: [
|
|
25711
|
+
{
|
|
25712
|
+
type: "core::bool"
|
|
25713
|
+
}
|
|
25714
|
+
],
|
|
25715
|
+
state_mutability: "external"
|
|
25716
|
+
},
|
|
25717
|
+
{
|
|
25718
|
+
type: "function",
|
|
25719
|
+
name: "before_transfer_position",
|
|
25720
|
+
inputs: [
|
|
25721
|
+
{
|
|
25722
|
+
name: "from_context",
|
|
25723
|
+
type: "vesu::data_model::Context"
|
|
25724
|
+
},
|
|
25725
|
+
{
|
|
25726
|
+
name: "to_context",
|
|
25727
|
+
type: "vesu::data_model::Context"
|
|
25728
|
+
},
|
|
25729
|
+
{
|
|
25730
|
+
name: "collateral",
|
|
25731
|
+
type: "vesu::data_model::UnsignedAmount"
|
|
25732
|
+
},
|
|
25733
|
+
{
|
|
25734
|
+
name: "debt",
|
|
25735
|
+
type: "vesu::data_model::UnsignedAmount"
|
|
25736
|
+
},
|
|
25737
|
+
{
|
|
25738
|
+
name: "data",
|
|
25739
|
+
type: "core::array::Span::<core::felt252>"
|
|
25740
|
+
},
|
|
25741
|
+
{
|
|
25742
|
+
name: "caller",
|
|
25743
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25744
|
+
}
|
|
25745
|
+
],
|
|
25746
|
+
outputs: [
|
|
25747
|
+
{
|
|
25748
|
+
type: "(vesu::data_model::UnsignedAmount, vesu::data_model::UnsignedAmount)"
|
|
25749
|
+
}
|
|
25750
|
+
],
|
|
25751
|
+
state_mutability: "external"
|
|
25752
|
+
},
|
|
25753
|
+
{
|
|
25754
|
+
type: "function",
|
|
25755
|
+
name: "after_transfer_position",
|
|
25756
|
+
inputs: [
|
|
25757
|
+
{
|
|
25758
|
+
name: "from_context",
|
|
25759
|
+
type: "vesu::data_model::Context"
|
|
25760
|
+
},
|
|
25761
|
+
{
|
|
25762
|
+
name: "to_context",
|
|
25763
|
+
type: "vesu::data_model::Context"
|
|
25764
|
+
},
|
|
25765
|
+
{
|
|
25766
|
+
name: "collateral_delta",
|
|
25767
|
+
type: "core::integer::u256"
|
|
25768
|
+
},
|
|
25769
|
+
{
|
|
25770
|
+
name: "collateral_shares_delta",
|
|
25771
|
+
type: "core::integer::u256"
|
|
25772
|
+
},
|
|
25773
|
+
{
|
|
25774
|
+
name: "debt_delta",
|
|
25775
|
+
type: "core::integer::u256"
|
|
25776
|
+
},
|
|
25777
|
+
{
|
|
25778
|
+
name: "nominal_debt_delta",
|
|
25779
|
+
type: "core::integer::u256"
|
|
25780
|
+
},
|
|
25781
|
+
{
|
|
25782
|
+
name: "data",
|
|
25783
|
+
type: "core::array::Span::<core::felt252>"
|
|
25784
|
+
},
|
|
25785
|
+
{
|
|
25786
|
+
name: "caller",
|
|
25787
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25788
|
+
}
|
|
25789
|
+
],
|
|
25790
|
+
outputs: [
|
|
25791
|
+
{
|
|
25792
|
+
type: "core::bool"
|
|
25793
|
+
}
|
|
25794
|
+
],
|
|
25795
|
+
state_mutability: "external"
|
|
25796
|
+
},
|
|
25797
|
+
{
|
|
25798
|
+
type: "function",
|
|
25799
|
+
name: "before_liquidate_position",
|
|
25800
|
+
inputs: [
|
|
25801
|
+
{
|
|
25802
|
+
name: "context",
|
|
25803
|
+
type: "vesu::data_model::Context"
|
|
25804
|
+
},
|
|
25805
|
+
{
|
|
25806
|
+
name: "data",
|
|
25807
|
+
type: "core::array::Span::<core::felt252>"
|
|
25808
|
+
},
|
|
25809
|
+
{
|
|
25810
|
+
name: "caller",
|
|
25811
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25812
|
+
}
|
|
25813
|
+
],
|
|
25814
|
+
outputs: [
|
|
25815
|
+
{
|
|
25816
|
+
type: "(core::integer::u256, core::integer::u256, core::integer::u256)"
|
|
25817
|
+
}
|
|
25818
|
+
],
|
|
25819
|
+
state_mutability: "external"
|
|
25820
|
+
},
|
|
25821
|
+
{
|
|
25822
|
+
type: "function",
|
|
25823
|
+
name: "after_liquidate_position",
|
|
25824
|
+
inputs: [
|
|
25825
|
+
{
|
|
25826
|
+
name: "context",
|
|
25827
|
+
type: "vesu::data_model::Context"
|
|
25828
|
+
},
|
|
25829
|
+
{
|
|
25830
|
+
name: "collateral_delta",
|
|
25831
|
+
type: "alexandria_math::i257::i257"
|
|
25832
|
+
},
|
|
25833
|
+
{
|
|
25834
|
+
name: "collateral_shares_delta",
|
|
25835
|
+
type: "alexandria_math::i257::i257"
|
|
25836
|
+
},
|
|
25837
|
+
{
|
|
25838
|
+
name: "debt_delta",
|
|
25839
|
+
type: "alexandria_math::i257::i257"
|
|
25840
|
+
},
|
|
25841
|
+
{
|
|
25842
|
+
name: "nominal_debt_delta",
|
|
25843
|
+
type: "alexandria_math::i257::i257"
|
|
25844
|
+
},
|
|
25845
|
+
{
|
|
25846
|
+
name: "bad_debt",
|
|
25847
|
+
type: "core::integer::u256"
|
|
25848
|
+
},
|
|
25849
|
+
{
|
|
25850
|
+
name: "data",
|
|
25851
|
+
type: "core::array::Span::<core::felt252>"
|
|
25852
|
+
},
|
|
25853
|
+
{
|
|
25854
|
+
name: "caller",
|
|
25855
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25856
|
+
}
|
|
25857
|
+
],
|
|
25858
|
+
outputs: [
|
|
25859
|
+
{
|
|
25860
|
+
type: "core::bool"
|
|
25861
|
+
}
|
|
25862
|
+
],
|
|
25863
|
+
state_mutability: "external"
|
|
25864
|
+
}
|
|
25865
|
+
]
|
|
25866
|
+
},
|
|
25867
|
+
{
|
|
25868
|
+
type: "constructor",
|
|
25869
|
+
name: "constructor",
|
|
25870
|
+
inputs: [
|
|
25871
|
+
{
|
|
25872
|
+
name: "singleton",
|
|
25873
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25874
|
+
},
|
|
25875
|
+
{
|
|
25876
|
+
name: "oracle_address",
|
|
25877
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25878
|
+
},
|
|
25879
|
+
{
|
|
25880
|
+
name: "summary_address",
|
|
25881
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25882
|
+
},
|
|
25883
|
+
{
|
|
25884
|
+
name: "v_token_class_hash",
|
|
25885
|
+
type: "core::felt252"
|
|
25886
|
+
},
|
|
25887
|
+
{
|
|
25888
|
+
name: "v_token_v2_class_hash",
|
|
25889
|
+
type: "core::felt252"
|
|
25890
|
+
},
|
|
25891
|
+
{
|
|
25892
|
+
name: "migrator",
|
|
25893
|
+
type: "core::starknet::contract_address::ContractAddress"
|
|
25894
|
+
},
|
|
25895
|
+
{
|
|
25896
|
+
name: "extension_utils_class_hash",
|
|
25897
|
+
type: "core::felt252"
|
|
25898
|
+
}
|
|
25899
|
+
]
|
|
25900
|
+
},
|
|
25901
|
+
{
|
|
25902
|
+
type: "event",
|
|
25903
|
+
name: "vesu::extension::components::position_hooks::position_hooks_component::SetLiquidationConfig",
|
|
25904
|
+
kind: "struct",
|
|
25905
|
+
members: [
|
|
25906
|
+
{
|
|
25907
|
+
name: "pool_id",
|
|
25908
|
+
type: "core::felt252",
|
|
25909
|
+
kind: "key"
|
|
25910
|
+
},
|
|
25911
|
+
{
|
|
25912
|
+
name: "collateral_asset",
|
|
25913
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
25914
|
+
kind: "key"
|
|
25915
|
+
},
|
|
25916
|
+
{
|
|
25917
|
+
name: "debt_asset",
|
|
25918
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
25919
|
+
kind: "key"
|
|
25920
|
+
},
|
|
25921
|
+
{
|
|
25922
|
+
name: "liquidation_config",
|
|
25923
|
+
type: "vesu::extension::components::position_hooks::LiquidationConfig",
|
|
25924
|
+
kind: "data"
|
|
25925
|
+
}
|
|
25926
|
+
]
|
|
25927
|
+
},
|
|
25928
|
+
{
|
|
25929
|
+
type: "event",
|
|
25930
|
+
name: "vesu::extension::components::position_hooks::position_hooks_component::SetShutdownConfig",
|
|
25931
|
+
kind: "struct",
|
|
25932
|
+
members: [
|
|
25933
|
+
{
|
|
25934
|
+
name: "pool_id",
|
|
25935
|
+
type: "core::felt252",
|
|
25936
|
+
kind: "key"
|
|
25937
|
+
},
|
|
25938
|
+
{
|
|
25939
|
+
name: "shutdown_config",
|
|
25940
|
+
type: "vesu::extension::components::position_hooks::ShutdownConfig",
|
|
25941
|
+
kind: "data"
|
|
25942
|
+
}
|
|
25943
|
+
]
|
|
25944
|
+
},
|
|
25945
|
+
{
|
|
25946
|
+
type: "event",
|
|
25947
|
+
name: "vesu::extension::components::position_hooks::position_hooks_component::SetShutdownLTVConfig",
|
|
25948
|
+
kind: "struct",
|
|
25949
|
+
members: [
|
|
25950
|
+
{
|
|
25951
|
+
name: "pool_id",
|
|
25952
|
+
type: "core::felt252",
|
|
25953
|
+
kind: "key"
|
|
25954
|
+
},
|
|
25955
|
+
{
|
|
25956
|
+
name: "collateral_asset",
|
|
25957
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
25958
|
+
kind: "key"
|
|
25959
|
+
},
|
|
25960
|
+
{
|
|
25961
|
+
name: "debt_asset",
|
|
25962
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
25963
|
+
kind: "key"
|
|
25964
|
+
},
|
|
25965
|
+
{
|
|
25966
|
+
name: "shutdown_ltv_config",
|
|
25967
|
+
type: "vesu::data_model::LTVConfig",
|
|
25968
|
+
kind: "data"
|
|
25969
|
+
}
|
|
25970
|
+
]
|
|
25971
|
+
},
|
|
25972
|
+
{
|
|
25973
|
+
type: "event",
|
|
25974
|
+
name: "vesu::extension::components::position_hooks::position_hooks_component::SetDebtCap",
|
|
25975
|
+
kind: "struct",
|
|
25976
|
+
members: [
|
|
25977
|
+
{
|
|
25978
|
+
name: "pool_id",
|
|
25979
|
+
type: "core::felt252",
|
|
25980
|
+
kind: "key"
|
|
25981
|
+
},
|
|
25982
|
+
{
|
|
25983
|
+
name: "collateral_asset",
|
|
25984
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
25985
|
+
kind: "key"
|
|
25986
|
+
},
|
|
25987
|
+
{
|
|
25988
|
+
name: "debt_asset",
|
|
25989
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
25990
|
+
kind: "key"
|
|
25991
|
+
},
|
|
25992
|
+
{
|
|
25993
|
+
name: "debt_cap",
|
|
25994
|
+
type: "core::integer::u256",
|
|
25995
|
+
kind: "data"
|
|
25996
|
+
}
|
|
25997
|
+
]
|
|
25998
|
+
},
|
|
25999
|
+
{
|
|
26000
|
+
type: "event",
|
|
26001
|
+
name: "vesu::extension::components::position_hooks::position_hooks_component::Event",
|
|
26002
|
+
kind: "enum",
|
|
26003
|
+
variants: [
|
|
26004
|
+
{
|
|
26005
|
+
name: "SetLiquidationConfig",
|
|
26006
|
+
type: "vesu::extension::components::position_hooks::position_hooks_component::SetLiquidationConfig",
|
|
26007
|
+
kind: "nested"
|
|
26008
|
+
},
|
|
26009
|
+
{
|
|
26010
|
+
name: "SetShutdownConfig",
|
|
26011
|
+
type: "vesu::extension::components::position_hooks::position_hooks_component::SetShutdownConfig",
|
|
26012
|
+
kind: "nested"
|
|
26013
|
+
},
|
|
26014
|
+
{
|
|
26015
|
+
name: "SetShutdownLTVConfig",
|
|
26016
|
+
type: "vesu::extension::components::position_hooks::position_hooks_component::SetShutdownLTVConfig",
|
|
26017
|
+
kind: "nested"
|
|
26018
|
+
},
|
|
26019
|
+
{
|
|
26020
|
+
name: "SetDebtCap",
|
|
26021
|
+
type: "vesu::extension::components::position_hooks::position_hooks_component::SetDebtCap",
|
|
26022
|
+
kind: "nested"
|
|
26023
|
+
}
|
|
26024
|
+
]
|
|
26025
|
+
},
|
|
26026
|
+
{
|
|
26027
|
+
type: "event",
|
|
26028
|
+
name: "vesu::extension::components::interest_rate_model::interest_rate_model_component::SetInterestRateConfig",
|
|
26029
|
+
kind: "struct",
|
|
26030
|
+
members: [
|
|
26031
|
+
{
|
|
26032
|
+
name: "pool_id",
|
|
26033
|
+
type: "core::felt252",
|
|
26034
|
+
kind: "data"
|
|
26035
|
+
},
|
|
26036
|
+
{
|
|
26037
|
+
name: "asset",
|
|
26038
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
26039
|
+
kind: "data"
|
|
26040
|
+
},
|
|
26041
|
+
{
|
|
26042
|
+
name: "interest_rate_config",
|
|
26043
|
+
type: "vesu::extension::components::interest_rate_model::InterestRateConfig",
|
|
26044
|
+
kind: "data"
|
|
26045
|
+
}
|
|
26046
|
+
]
|
|
26047
|
+
},
|
|
26048
|
+
{
|
|
26049
|
+
type: "event",
|
|
26050
|
+
name: "vesu::extension::components::interest_rate_model::interest_rate_model_component::Event",
|
|
26051
|
+
kind: "enum",
|
|
26052
|
+
variants: [
|
|
26053
|
+
{
|
|
26054
|
+
name: "SetInterestRateConfig",
|
|
26055
|
+
type: "vesu::extension::components::interest_rate_model::interest_rate_model_component::SetInterestRateConfig",
|
|
26056
|
+
kind: "nested"
|
|
26057
|
+
}
|
|
26058
|
+
]
|
|
26059
|
+
},
|
|
26060
|
+
{
|
|
26061
|
+
type: "event",
|
|
26062
|
+
name: "vesu::extension::components::pragma_oracle::pragma_oracle_component::SetOracleConfig",
|
|
26063
|
+
kind: "struct",
|
|
26064
|
+
members: [
|
|
26065
|
+
{
|
|
26066
|
+
name: "pool_id",
|
|
26067
|
+
type: "core::felt252",
|
|
26068
|
+
kind: "data"
|
|
26069
|
+
},
|
|
26070
|
+
{
|
|
26071
|
+
name: "asset",
|
|
26072
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
26073
|
+
kind: "data"
|
|
26074
|
+
},
|
|
26075
|
+
{
|
|
26076
|
+
name: "oracle_config",
|
|
26077
|
+
type: "vesu::extension::components::pragma_oracle::OracleConfig",
|
|
26078
|
+
kind: "data"
|
|
26079
|
+
}
|
|
26080
|
+
]
|
|
26081
|
+
},
|
|
26082
|
+
{
|
|
26083
|
+
type: "event",
|
|
26084
|
+
name: "vesu::extension::components::pragma_oracle::pragma_oracle_component::SetOracleParameter",
|
|
26085
|
+
kind: "struct",
|
|
26086
|
+
members: [
|
|
26087
|
+
{
|
|
26088
|
+
name: "pool_id",
|
|
26089
|
+
type: "core::felt252",
|
|
26090
|
+
kind: "data"
|
|
26091
|
+
},
|
|
26092
|
+
{
|
|
26093
|
+
name: "asset",
|
|
26094
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
26095
|
+
kind: "data"
|
|
26096
|
+
},
|
|
26097
|
+
{
|
|
26098
|
+
name: "parameter",
|
|
26099
|
+
type: "core::felt252",
|
|
26100
|
+
kind: "data"
|
|
26101
|
+
},
|
|
26102
|
+
{
|
|
26103
|
+
name: "value",
|
|
26104
|
+
type: "core::felt252",
|
|
26105
|
+
kind: "data"
|
|
26106
|
+
}
|
|
26107
|
+
]
|
|
26108
|
+
},
|
|
26109
|
+
{
|
|
26110
|
+
type: "event",
|
|
26111
|
+
name: "vesu::extension::components::pragma_oracle::pragma_oracle_component::Event",
|
|
26112
|
+
kind: "enum",
|
|
26113
|
+
variants: [
|
|
26114
|
+
{
|
|
26115
|
+
name: "SetOracleConfig",
|
|
26116
|
+
type: "vesu::extension::components::pragma_oracle::pragma_oracle_component::SetOracleConfig",
|
|
26117
|
+
kind: "nested"
|
|
26118
|
+
},
|
|
26119
|
+
{
|
|
26120
|
+
name: "SetOracleParameter",
|
|
26121
|
+
type: "vesu::extension::components::pragma_oracle::pragma_oracle_component::SetOracleParameter",
|
|
26122
|
+
kind: "nested"
|
|
26123
|
+
}
|
|
26124
|
+
]
|
|
26125
|
+
},
|
|
26126
|
+
{
|
|
26127
|
+
type: "event",
|
|
26128
|
+
name: "vesu::map_list::map_list_component::Event",
|
|
26129
|
+
kind: "enum",
|
|
26130
|
+
variants: []
|
|
26131
|
+
},
|
|
26132
|
+
{
|
|
26133
|
+
type: "event",
|
|
26134
|
+
name: "vesu::extension::components::fee_model::fee_model_component::SetFeeConfig",
|
|
26135
|
+
kind: "struct",
|
|
26136
|
+
members: [
|
|
26137
|
+
{
|
|
26138
|
+
name: "pool_id",
|
|
26139
|
+
type: "core::felt252",
|
|
26140
|
+
kind: "key"
|
|
26141
|
+
},
|
|
26142
|
+
{
|
|
26143
|
+
name: "fee_config",
|
|
26144
|
+
type: "vesu::extension::components::fee_model::FeeConfig",
|
|
26145
|
+
kind: "key"
|
|
26146
|
+
}
|
|
26147
|
+
]
|
|
26148
|
+
},
|
|
26149
|
+
{
|
|
26150
|
+
type: "event",
|
|
26151
|
+
name: "vesu::extension::components::fee_model::fee_model_component::ClaimFees",
|
|
26152
|
+
kind: "struct",
|
|
26153
|
+
members: [
|
|
26154
|
+
{
|
|
26155
|
+
name: "pool_id",
|
|
26156
|
+
type: "core::felt252",
|
|
26157
|
+
kind: "key"
|
|
26158
|
+
},
|
|
26159
|
+
{
|
|
26160
|
+
name: "collateral_asset",
|
|
26161
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
26162
|
+
kind: "data"
|
|
26163
|
+
},
|
|
26164
|
+
{
|
|
26165
|
+
name: "debt_asset",
|
|
26166
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
26167
|
+
kind: "data"
|
|
26168
|
+
},
|
|
26169
|
+
{
|
|
26170
|
+
name: "recipient",
|
|
26171
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
26172
|
+
kind: "data"
|
|
26173
|
+
},
|
|
26174
|
+
{
|
|
26175
|
+
name: "amount",
|
|
26176
|
+
type: "core::integer::u256",
|
|
26177
|
+
kind: "data"
|
|
26178
|
+
}
|
|
26179
|
+
]
|
|
26180
|
+
},
|
|
26181
|
+
{
|
|
26182
|
+
type: "event",
|
|
26183
|
+
name: "vesu::extension::components::fee_model::fee_model_component::Event",
|
|
26184
|
+
kind: "enum",
|
|
26185
|
+
variants: [
|
|
26186
|
+
{
|
|
26187
|
+
name: "SetFeeConfig",
|
|
26188
|
+
type: "vesu::extension::components::fee_model::fee_model_component::SetFeeConfig",
|
|
26189
|
+
kind: "nested"
|
|
26190
|
+
},
|
|
26191
|
+
{
|
|
26192
|
+
name: "ClaimFees",
|
|
26193
|
+
type: "vesu::extension::components::fee_model::fee_model_component::ClaimFees",
|
|
26194
|
+
kind: "nested"
|
|
26195
|
+
}
|
|
26196
|
+
]
|
|
26197
|
+
},
|
|
26198
|
+
{
|
|
26199
|
+
type: "event",
|
|
26200
|
+
name: "vesu::extension::components::tokenization::tokenization_component::CreateVToken",
|
|
26201
|
+
kind: "struct",
|
|
26202
|
+
members: [
|
|
26203
|
+
{
|
|
26204
|
+
name: "v_token",
|
|
26205
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
26206
|
+
kind: "key"
|
|
26207
|
+
},
|
|
26208
|
+
{
|
|
26209
|
+
name: "pool_id",
|
|
26210
|
+
type: "core::felt252",
|
|
26211
|
+
kind: "key"
|
|
26212
|
+
},
|
|
26213
|
+
{
|
|
26214
|
+
name: "collateral_asset",
|
|
26215
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
26216
|
+
kind: "key"
|
|
26217
|
+
}
|
|
26218
|
+
]
|
|
26219
|
+
},
|
|
26220
|
+
{
|
|
26221
|
+
type: "event",
|
|
26222
|
+
name: "vesu::extension::components::tokenization::tokenization_component::Event",
|
|
26223
|
+
kind: "enum",
|
|
26224
|
+
variants: [
|
|
26225
|
+
{
|
|
26226
|
+
name: "CreateVToken",
|
|
26227
|
+
type: "vesu::extension::components::tokenization::tokenization_component::CreateVToken",
|
|
26228
|
+
kind: "nested"
|
|
26229
|
+
}
|
|
26230
|
+
]
|
|
26231
|
+
},
|
|
26232
|
+
{
|
|
26233
|
+
type: "event",
|
|
26234
|
+
name: "vesu::v2::default_extension_po_v2::DefaultExtensionPOV2::SetAssetParameter",
|
|
26235
|
+
kind: "struct",
|
|
26236
|
+
members: [
|
|
26237
|
+
{
|
|
26238
|
+
name: "pool_id",
|
|
26239
|
+
type: "core::felt252",
|
|
26240
|
+
kind: "key"
|
|
26241
|
+
},
|
|
26242
|
+
{
|
|
26243
|
+
name: "asset",
|
|
26244
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
26245
|
+
kind: "key"
|
|
26246
|
+
},
|
|
26247
|
+
{
|
|
26248
|
+
name: "parameter",
|
|
26249
|
+
type: "core::felt252",
|
|
26250
|
+
kind: "key"
|
|
26251
|
+
},
|
|
26252
|
+
{
|
|
26253
|
+
name: "value",
|
|
26254
|
+
type: "core::integer::u256",
|
|
26255
|
+
kind: "data"
|
|
26256
|
+
}
|
|
26257
|
+
]
|
|
26258
|
+
},
|
|
26259
|
+
{
|
|
26260
|
+
type: "event",
|
|
26261
|
+
name: "vesu::v2::default_extension_po_v2::DefaultExtensionPOV2::SetPoolOwner",
|
|
26262
|
+
kind: "struct",
|
|
26263
|
+
members: [
|
|
26264
|
+
{
|
|
26265
|
+
name: "pool_id",
|
|
26266
|
+
type: "core::felt252",
|
|
26267
|
+
kind: "key"
|
|
26268
|
+
},
|
|
26269
|
+
{
|
|
26270
|
+
name: "owner",
|
|
26271
|
+
type: "core::starknet::contract_address::ContractAddress",
|
|
26272
|
+
kind: "key"
|
|
26273
|
+
}
|
|
26274
|
+
]
|
|
26275
|
+
},
|
|
26276
|
+
{
|
|
26277
|
+
type: "event",
|
|
26278
|
+
name: "vesu::v2::default_extension_po_v2::DefaultExtensionPOV2::ContractUpgraded",
|
|
26279
|
+
kind: "struct",
|
|
26280
|
+
members: [
|
|
26281
|
+
{
|
|
26282
|
+
name: "new_implementation",
|
|
26283
|
+
type: "core::starknet::class_hash::ClassHash",
|
|
26284
|
+
kind: "data"
|
|
26285
|
+
}
|
|
26286
|
+
]
|
|
26287
|
+
},
|
|
26288
|
+
{
|
|
26289
|
+
type: "event",
|
|
26290
|
+
name: "vesu::v2::default_extension_po_v2::DefaultExtensionPOV2::Event",
|
|
26291
|
+
kind: "enum",
|
|
26292
|
+
variants: [
|
|
26293
|
+
{
|
|
26294
|
+
name: "PositionHooksEvents",
|
|
26295
|
+
type: "vesu::extension::components::position_hooks::position_hooks_component::Event",
|
|
26296
|
+
kind: "nested"
|
|
26297
|
+
},
|
|
26298
|
+
{
|
|
26299
|
+
name: "InterestRateModelEvents",
|
|
26300
|
+
type: "vesu::extension::components::interest_rate_model::interest_rate_model_component::Event",
|
|
26301
|
+
kind: "nested"
|
|
26302
|
+
},
|
|
26303
|
+
{
|
|
26304
|
+
name: "PragmaOracleEvents",
|
|
26305
|
+
type: "vesu::extension::components::pragma_oracle::pragma_oracle_component::Event",
|
|
26306
|
+
kind: "nested"
|
|
26307
|
+
},
|
|
26308
|
+
{
|
|
26309
|
+
name: "MapListEvents",
|
|
26310
|
+
type: "vesu::map_list::map_list_component::Event",
|
|
26311
|
+
kind: "nested"
|
|
26312
|
+
},
|
|
26313
|
+
{
|
|
26314
|
+
name: "FeeModelEvents",
|
|
26315
|
+
type: "vesu::extension::components::fee_model::fee_model_component::Event",
|
|
26316
|
+
kind: "nested"
|
|
26317
|
+
},
|
|
26318
|
+
{
|
|
26319
|
+
name: "TokenizationEvents",
|
|
26320
|
+
type: "vesu::extension::components::tokenization::tokenization_component::Event",
|
|
26321
|
+
kind: "nested"
|
|
26322
|
+
},
|
|
26323
|
+
{
|
|
26324
|
+
name: "SetAssetParameter",
|
|
26325
|
+
type: "vesu::v2::default_extension_po_v2::DefaultExtensionPOV2::SetAssetParameter",
|
|
26326
|
+
kind: "nested"
|
|
26327
|
+
},
|
|
26328
|
+
{
|
|
26329
|
+
name: "SetPoolOwner",
|
|
26330
|
+
type: "vesu::v2::default_extension_po_v2::DefaultExtensionPOV2::SetPoolOwner",
|
|
26331
|
+
kind: "nested"
|
|
26332
|
+
},
|
|
26333
|
+
{
|
|
26334
|
+
name: "CreateVToken",
|
|
26335
|
+
type: "vesu::extension::components::tokenization::tokenization_component::CreateVToken",
|
|
26336
|
+
kind: "nested"
|
|
26337
|
+
},
|
|
26338
|
+
{
|
|
26339
|
+
name: "SetInterestRateConfig",
|
|
26340
|
+
type: "vesu::extension::components::interest_rate_model::interest_rate_model_component::SetInterestRateConfig",
|
|
26341
|
+
kind: "nested"
|
|
26342
|
+
},
|
|
26343
|
+
{
|
|
26344
|
+
name: "SetOracleConfig",
|
|
26345
|
+
type: "vesu::extension::components::pragma_oracle::pragma_oracle_component::SetOracleConfig",
|
|
26346
|
+
kind: "nested"
|
|
26347
|
+
},
|
|
26348
|
+
{
|
|
26349
|
+
name: "SetLiquidationConfig",
|
|
26350
|
+
type: "vesu::extension::components::position_hooks::position_hooks_component::SetLiquidationConfig",
|
|
26351
|
+
kind: "nested"
|
|
26352
|
+
},
|
|
26353
|
+
{
|
|
26354
|
+
name: "SetDebtCap",
|
|
26355
|
+
type: "vesu::extension::components::position_hooks::position_hooks_component::SetDebtCap",
|
|
26356
|
+
kind: "nested"
|
|
26357
|
+
},
|
|
26358
|
+
{
|
|
26359
|
+
name: "SetShutdownLTVConfig",
|
|
26360
|
+
type: "vesu::extension::components::position_hooks::position_hooks_component::SetShutdownLTVConfig",
|
|
26361
|
+
kind: "nested"
|
|
26362
|
+
},
|
|
26363
|
+
{
|
|
26364
|
+
name: "ContractUpgraded",
|
|
26365
|
+
type: "vesu::v2::default_extension_po_v2::DefaultExtensionPOV2::ContractUpgraded",
|
|
26366
|
+
kind: "nested"
|
|
26367
|
+
}
|
|
26368
|
+
]
|
|
26369
|
+
}
|
|
26370
|
+
];
|
|
26371
|
+
|
|
23926
26372
|
// src/strategies/universal-adapters/vesu-adapter.ts
|
|
23927
26373
|
var VesuAmountType = /* @__PURE__ */ ((VesuAmountType2) => {
|
|
23928
26374
|
VesuAmountType2[VesuAmountType2["Delta"] = 0] = "Delta";
|
|
@@ -23934,6 +26380,9 @@ var VesuAmountDenomination = /* @__PURE__ */ ((VesuAmountDenomination2) => {
|
|
|
23934
26380
|
VesuAmountDenomination2[VesuAmountDenomination2["Assets"] = 1] = "Assets";
|
|
23935
26381
|
return VesuAmountDenomination2;
|
|
23936
26382
|
})(VesuAmountDenomination || {});
|
|
26383
|
+
var SCALE = BigInt(1e18);
|
|
26384
|
+
var UTILIZATION_SCALE = 100000n;
|
|
26385
|
+
var UTILIZATION_SCALE_TO_SCALE = BigInt(1e13);
|
|
23937
26386
|
function getVesuMultiplyParams(isIncrease, params) {
|
|
23938
26387
|
if (isIncrease) {
|
|
23939
26388
|
const _params2 = params;
|
|
@@ -24039,6 +26488,8 @@ var VesuPools = {
|
|
|
24039
26488
|
Re7xSTRK: ContractAddr.from("0x052fb52363939c3aa848f8f4ac28f0a51379f8d1b971d8444de25fbd77d8f161"),
|
|
24040
26489
|
Re7xBTC: ContractAddr.from("0x3a8416bf20d036df5b1cf3447630a2e1cb04685f6b0c3a70ed7fb1473548ecf")
|
|
24041
26490
|
};
|
|
26491
|
+
var extensionMap = {};
|
|
26492
|
+
extensionMap[VesuPools.Re7xSTRK.address] = ContractAddr.from("0x04e06e04b8d624d039aa1c3ca8e0aa9e21dc1ccba1d88d0d650837159e0ee054");
|
|
24042
26493
|
function getVesuSingletonAddress(vesuPool) {
|
|
24043
26494
|
if (vesuPool.eq(VesuPools.Genesis) || vesuPool.eq(VesuPools.Re7xSTRK)) {
|
|
24044
26495
|
return { addr: VESU_SINGLETON, isV2: false };
|
|
@@ -24302,6 +26753,61 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
|
|
|
24302
26753
|
isV2
|
|
24303
26754
|
};
|
|
24304
26755
|
}
|
|
26756
|
+
async getDebtCap(config) {
|
|
26757
|
+
const { contract, isV2 } = await this.getVesuSingletonContract(config, this.config.poolId);
|
|
26758
|
+
if (!isV2) {
|
|
26759
|
+
const extensionAddr = extensionMap[this.config.poolId.address];
|
|
26760
|
+
if (!extensionAddr) {
|
|
26761
|
+
throw new Error("Extension address not found");
|
|
26762
|
+
}
|
|
26763
|
+
const extensionContract = new Contract8({ abi: vesu_extension_abi_default, address: extensionAddr.address, providerOrAccount: config.provider });
|
|
26764
|
+
const output2 = await extensionContract.call("debt_caps", [this.config.poolId.address, this.config.collateral.address.address, this.config.debt.address.address]);
|
|
26765
|
+
logger.verbose(`${this.config.debt.symbol}::VesuAdapter::getDebtCap debt_cap: ${output2.toString()}`);
|
|
26766
|
+
return Web3Number.fromWei(output2.toString(), this.config.debt.decimals);
|
|
26767
|
+
}
|
|
26768
|
+
const output = await contract.call("pair_config", [this.config.collateral.address.address, this.config.debt.address.address]);
|
|
26769
|
+
logger.verbose(`${this.config.debt.symbol}::VesuAdapter::getDebtCap debt_cap: ${output.debt_cap.toString()}`);
|
|
26770
|
+
return Web3Number.fromWei(output.debt_cap.toString(), this.config.debt.decimals);
|
|
26771
|
+
}
|
|
26772
|
+
async getMaxBorrowableByInterestRate(config, asset, maxBorrowAPY) {
|
|
26773
|
+
const { contract, isV2 } = await this.getVesuSingletonContract(config, this.config.poolId);
|
|
26774
|
+
let interestRateConfigContract = contract;
|
|
26775
|
+
if (!isV2) {
|
|
26776
|
+
const extensionAddr = extensionMap[this.config.poolId.address];
|
|
26777
|
+
if (!extensionAddr) {
|
|
26778
|
+
throw new Error("Extension address not found");
|
|
26779
|
+
}
|
|
26780
|
+
interestRateConfigContract = new Contract8({ abi: vesu_extension_abi_default, address: extensionAddr.address, providerOrAccount: config.provider });
|
|
26781
|
+
}
|
|
26782
|
+
const _interestRateConfig = await interestRateConfigContract.call(
|
|
26783
|
+
"interest_rate_config",
|
|
26784
|
+
isV2 ? [this.config.debt.address.address] : [this.config.poolId.address, this.config.debt.address.address]
|
|
26785
|
+
);
|
|
26786
|
+
const interestRateConfig = {
|
|
26787
|
+
target_utilization: _interestRateConfig.target_utilization,
|
|
26788
|
+
zero_utilization_rate: _interestRateConfig.zero_utilization_rate,
|
|
26789
|
+
target_rate_percent: _interestRateConfig.target_rate_percent,
|
|
26790
|
+
min_target_utilization: _interestRateConfig.min_target_utilization,
|
|
26791
|
+
max_target_utilization: _interestRateConfig.max_target_utilization,
|
|
26792
|
+
rate_half_life: _interestRateConfig.rate_half_life,
|
|
26793
|
+
min_full_utilization_rate: _interestRateConfig.min_full_utilization_rate,
|
|
26794
|
+
max_full_utilization_rate: _interestRateConfig.max_full_utilization_rate
|
|
26795
|
+
};
|
|
26796
|
+
const _assetConfig = await contract.call(
|
|
26797
|
+
isV2 ? "asset_config" : "asset_config_unsafe",
|
|
26798
|
+
isV2 ? [asset.address.address] : [this.config.poolId.address, asset.address.address]
|
|
26799
|
+
);
|
|
26800
|
+
const assetConfig = isV2 ? _assetConfig : _assetConfig["0"];
|
|
26801
|
+
const timeDelta = assetConfig.last_updated;
|
|
26802
|
+
const lastFullUtilizationRate = assetConfig.last_full_utilization_rate;
|
|
26803
|
+
const totalSupply = new Web3Number((Number(assetConfig.total_nominal_debt) / 1e18).toFixed(9), asset.decimals).plus(Web3Number.fromWei(assetConfig.reserve, asset.decimals));
|
|
26804
|
+
const ratePerSecond = BigInt(Math.round(maxBorrowAPY / 365 / 24 / 60 / 60 * Number(SCALE)));
|
|
26805
|
+
const maxUtilisation = this.getMaxUtilizationGivenRatePerSecond(interestRateConfig, ratePerSecond, timeDelta, lastFullUtilizationRate);
|
|
26806
|
+
logger.verbose(`${asset.symbol}::VesuAdapter::getMaxBorrowableByInterestRate maxUtilisation: ${Number(maxUtilisation) / 1e18}, totalSupply: ${totalSupply.toString()}`);
|
|
26807
|
+
const maxDebtToHave = totalSupply.multipliedBy(Number(maxUtilisation) / 1e18);
|
|
26808
|
+
const currentDebt = new Web3Number((Number(assetConfig.total_nominal_debt) / 1e18).toFixed(9), asset.decimals);
|
|
26809
|
+
return maxDebtToHave.minus(currentDebt);
|
|
26810
|
+
}
|
|
24305
26811
|
async getLTVConfig(config) {
|
|
24306
26812
|
const CACHE_KEY = "ltv_config";
|
|
24307
26813
|
const cacheData = this.getCache(CACHE_KEY);
|
|
@@ -24317,6 +26823,9 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
|
|
|
24317
26823
|
const output = await contract.call("ltv_config", [this.config.poolId.address, this.config.collateral.address.address, this.config.debt.address.address]);
|
|
24318
26824
|
ltv = Number(output.max_ltv) / 1e18;
|
|
24319
26825
|
}
|
|
26826
|
+
if (ltv == 0) {
|
|
26827
|
+
throw new Error("LTV is 0");
|
|
26828
|
+
}
|
|
24320
26829
|
this.setCache(CACHE_KEY, ltv, 3e5);
|
|
24321
26830
|
return this.getCache(CACHE_KEY);
|
|
24322
26831
|
}
|
|
@@ -24451,6 +26960,78 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
|
|
|
24451
26960
|
Global.setGlobalCache(CACHE_KEY, { pools, isErrorPoolsAPI }, 3e5);
|
|
24452
26961
|
return { pools, isErrorPoolsAPI };
|
|
24453
26962
|
}
|
|
26963
|
+
fullUtilizationRate(interestRateConfig, timeDelta, utilization, fullUtilizationRate) {
|
|
26964
|
+
const {
|
|
26965
|
+
min_target_utilization,
|
|
26966
|
+
max_target_utilization,
|
|
26967
|
+
rate_half_life,
|
|
26968
|
+
min_full_utilization_rate,
|
|
26969
|
+
max_full_utilization_rate
|
|
26970
|
+
} = interestRateConfig;
|
|
26971
|
+
const halfLifeScaled = rate_half_life * SCALE;
|
|
26972
|
+
let nextFullUtilizationRate;
|
|
26973
|
+
if (utilization < min_target_utilization) {
|
|
26974
|
+
const utilizationDelta = (min_target_utilization - utilization) * SCALE / min_target_utilization;
|
|
26975
|
+
const decay = halfLifeScaled + utilizationDelta * timeDelta;
|
|
26976
|
+
nextFullUtilizationRate = fullUtilizationRate * halfLifeScaled / decay;
|
|
26977
|
+
} else if (utilization > max_target_utilization) {
|
|
26978
|
+
const utilizationDelta = (utilization - max_target_utilization) * SCALE / (UTILIZATION_SCALE - max_target_utilization);
|
|
26979
|
+
const growth = halfLifeScaled + utilizationDelta * timeDelta;
|
|
26980
|
+
nextFullUtilizationRate = fullUtilizationRate * growth / halfLifeScaled;
|
|
26981
|
+
} else {
|
|
26982
|
+
nextFullUtilizationRate = fullUtilizationRate;
|
|
26983
|
+
}
|
|
26984
|
+
if (nextFullUtilizationRate > max_full_utilization_rate) {
|
|
26985
|
+
return max_full_utilization_rate;
|
|
26986
|
+
} else if (nextFullUtilizationRate < min_full_utilization_rate) {
|
|
26987
|
+
return min_full_utilization_rate;
|
|
26988
|
+
} else {
|
|
26989
|
+
return nextFullUtilizationRate;
|
|
26990
|
+
}
|
|
26991
|
+
}
|
|
26992
|
+
/**
|
|
26993
|
+
* Calculates new interest rate per second and next full utilization rate.
|
|
26994
|
+
*/
|
|
26995
|
+
calculateInterestRate(interestRateConfig, utilization, timeDelta, lastFullUtilizationRate) {
|
|
26996
|
+
const scaledUtilization = utilization / UTILIZATION_SCALE_TO_SCALE;
|
|
26997
|
+
const {
|
|
26998
|
+
target_utilization,
|
|
26999
|
+
zero_utilization_rate,
|
|
27000
|
+
target_rate_percent
|
|
27001
|
+
} = interestRateConfig;
|
|
27002
|
+
const nextFullUtilizationRate = this.fullUtilizationRate(
|
|
27003
|
+
interestRateConfig,
|
|
27004
|
+
timeDelta,
|
|
27005
|
+
scaledUtilization,
|
|
27006
|
+
lastFullUtilizationRate
|
|
27007
|
+
);
|
|
27008
|
+
const targetRate = (nextFullUtilizationRate - zero_utilization_rate) * target_rate_percent / SCALE + zero_utilization_rate;
|
|
27009
|
+
let newRatePerSecond;
|
|
27010
|
+
if (scaledUtilization < target_utilization) {
|
|
27011
|
+
newRatePerSecond = zero_utilization_rate + scaledUtilization * (targetRate - zero_utilization_rate) / target_utilization;
|
|
27012
|
+
} else {
|
|
27013
|
+
newRatePerSecond = targetRate + (scaledUtilization - target_utilization) * (nextFullUtilizationRate - targetRate) / (UTILIZATION_SCALE - target_utilization);
|
|
27014
|
+
}
|
|
27015
|
+
return { newRatePerSecond, nextFullUtilizationRate };
|
|
27016
|
+
}
|
|
27017
|
+
/**
|
|
27018
|
+
* Calculates utilization given a specific rate per second.
|
|
27019
|
+
* This is an inverse function of the piecewise interest rate formula above.
|
|
27020
|
+
*/
|
|
27021
|
+
getMaxUtilizationGivenRatePerSecond(interestRateConfig, ratePerSecond, timeDelta, last_full_utilization_rate) {
|
|
27022
|
+
logger.verbose(`VesuAdapter::getMaxUtilizationGivenRatePerSecond ratePerSecond: ${Number(ratePerSecond) / 1e18}, timeDelta: ${Number(timeDelta) / 1e18}, last_full_utilization_rate: ${Number(last_full_utilization_rate) / 1e18}`);
|
|
27023
|
+
let utilization = 0n;
|
|
27024
|
+
let nextUtilization = SCALE / 100n;
|
|
27025
|
+
while (utilization <= SCALE) {
|
|
27026
|
+
logger.verbose(`VesuAdapter::getMaxUtilizationGivenRatePerSecond utilization: ${Number(utilization) / 1e18}, nextUtilization: ${Number(nextUtilization) / 1e18}`);
|
|
27027
|
+
const { newRatePerSecond } = this.calculateInterestRate(interestRateConfig, utilization, timeDelta, last_full_utilization_rate);
|
|
27028
|
+
if (newRatePerSecond > ratePerSecond) {
|
|
27029
|
+
return utilization;
|
|
27030
|
+
}
|
|
27031
|
+
utilization += nextUtilization;
|
|
27032
|
+
}
|
|
27033
|
+
throw new Error("Max utilization not found");
|
|
27034
|
+
}
|
|
24454
27035
|
};
|
|
24455
27036
|
|
|
24456
27037
|
// src/strategies/universal-strategy.tsx
|
|
@@ -26787,21 +29368,7 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
|
|
|
26787
29368
|
usdValue
|
|
26788
29369
|
};
|
|
26789
29370
|
}
|
|
26790
|
-
|
|
26791
|
-
* Calculates the weighted average APY across all pools based on USD value.
|
|
26792
|
-
* @returns {Promise<number>} The weighted average APY across all pools
|
|
26793
|
-
*/
|
|
26794
|
-
async netAPY() {
|
|
26795
|
-
if (this.metadata.isPreview) {
|
|
26796
|
-
return { net: 0, splits: [{
|
|
26797
|
-
apy: 0,
|
|
26798
|
-
id: "base"
|
|
26799
|
-
}, {
|
|
26800
|
-
apy: 0,
|
|
26801
|
-
id: "defispring"
|
|
26802
|
-
}] };
|
|
26803
|
-
}
|
|
26804
|
-
const prevAUM = await this.getPrevAUM();
|
|
29371
|
+
async getVesuAPYs() {
|
|
26805
29372
|
const vesuAdapters = this.getVesuAdapters();
|
|
26806
29373
|
const allVesuPools = await VesuAdapter.getVesuPools();
|
|
26807
29374
|
const pools = vesuAdapters.map((vesuAdapter) => {
|
|
@@ -26829,7 +29396,18 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
|
|
|
26829
29396
|
logger.verbose(`${this.metadata.name}::netAPY: baseAPYs: ${JSON.stringify(baseAPYs)}`);
|
|
26830
29397
|
logger.verbose(`${this.metadata.name}::netAPY: rewardAPYs: ${JSON.stringify(rewardAPYs)}`);
|
|
26831
29398
|
assert(baseAPYs.length == positions.length, "APYs and positions length mismatch");
|
|
26832
|
-
|
|
29399
|
+
return {
|
|
29400
|
+
baseAPYs,
|
|
29401
|
+
rewardAPYs,
|
|
29402
|
+
positions
|
|
29403
|
+
};
|
|
29404
|
+
}
|
|
29405
|
+
/**
|
|
29406
|
+
* Calculates the weighted average APY across all pools based on USD value.
|
|
29407
|
+
* @returns {Promise<number>} The weighted average APY across all pools
|
|
29408
|
+
*/
|
|
29409
|
+
async netAPY() {
|
|
29410
|
+
if (this.metadata.isPreview) {
|
|
26833
29411
|
return { net: 0, splits: [{
|
|
26834
29412
|
apy: 0,
|
|
26835
29413
|
id: "base"
|
|
@@ -26838,11 +29416,25 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
|
|
|
26838
29416
|
id: "defispring"
|
|
26839
29417
|
}] };
|
|
26840
29418
|
}
|
|
29419
|
+
const { positions, baseAPYs, rewardAPYs } = await this.getVesuAPYs();
|
|
26841
29420
|
const unusedBalanceAPY = await this.getUnusedBalanceAPY();
|
|
26842
29421
|
baseAPYs.push(...[unusedBalanceAPY.apy]);
|
|
26843
29422
|
rewardAPYs.push(0);
|
|
26844
29423
|
const weights = positions.map((p, index) => p.usdValue * (index % 2 == 0 ? 1 : -1));
|
|
26845
29424
|
weights.push(unusedBalanceAPY.weight);
|
|
29425
|
+
return this.returnNetAPY(baseAPYs, rewardAPYs, weights);
|
|
29426
|
+
}
|
|
29427
|
+
async returnNetAPY(baseAPYs, rewardAPYs, weights) {
|
|
29428
|
+
if (weights.every((p) => p == 0)) {
|
|
29429
|
+
return { net: 0, splits: [{
|
|
29430
|
+
apy: 0,
|
|
29431
|
+
id: "base"
|
|
29432
|
+
}, {
|
|
29433
|
+
apy: 0,
|
|
29434
|
+
id: "defispring"
|
|
29435
|
+
}] };
|
|
29436
|
+
}
|
|
29437
|
+
const prevAUM = await this.getPrevAUM();
|
|
26846
29438
|
const price = await this.pricer.getPrice(this.metadata.depositTokens[0].symbol);
|
|
26847
29439
|
const prevAUMUSD = prevAUM.multipliedBy(price.price);
|
|
26848
29440
|
const baseAPY = this.computeAPY(baseAPYs, weights, prevAUMUSD);
|
|
@@ -27680,13 +30272,31 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
27680
30272
|
getTag() {
|
|
27681
30273
|
return `${_UniversalLstMultiplierStrategy.name}:${this.metadata.name}`;
|
|
27682
30274
|
}
|
|
30275
|
+
// Vesu adapter with LST and base token match
|
|
30276
|
+
getVesuSameTokenAdapter() {
|
|
30277
|
+
const baseAdapter = this.getAdapter("vesu_leg1_adapter" /* VESU_LEG1 */);
|
|
30278
|
+
baseAdapter.networkConfig = this.config;
|
|
30279
|
+
baseAdapter.pricer = this.pricer;
|
|
30280
|
+
return baseAdapter;
|
|
30281
|
+
}
|
|
27683
30282
|
// only one leg is used
|
|
27684
30283
|
// todo support lending assets of underlying as well (like if xSTRK looping is not viable, simply supply STRK)
|
|
27685
30284
|
getVesuAdapters() {
|
|
27686
|
-
const
|
|
27687
|
-
|
|
27688
|
-
|
|
27689
|
-
|
|
30285
|
+
const adapters = [];
|
|
30286
|
+
const baseAdapter = this.getVesuSameTokenAdapter();
|
|
30287
|
+
for (const asset of this.metadata.additionalInfo.borrowable_assets) {
|
|
30288
|
+
const vesuAdapter1 = new VesuAdapter({
|
|
30289
|
+
poolId: baseAdapter.config.poolId,
|
|
30290
|
+
collateral: this.asset(),
|
|
30291
|
+
debt: asset,
|
|
30292
|
+
vaultAllocator: this.metadata.additionalInfo.vaultAllocator,
|
|
30293
|
+
id: ""
|
|
30294
|
+
});
|
|
30295
|
+
vesuAdapter1.pricer = this.pricer;
|
|
30296
|
+
vesuAdapter1.networkConfig = this.config;
|
|
30297
|
+
adapters.push(vesuAdapter1);
|
|
30298
|
+
}
|
|
30299
|
+
return adapters;
|
|
27690
30300
|
}
|
|
27691
30301
|
// not applicable for this strategy
|
|
27692
30302
|
// No rewards on collateral or borrowing of LST assets
|
|
@@ -27714,7 +30324,8 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
27714
30324
|
async getAvnuSwapMultiplyCall(params) {
|
|
27715
30325
|
return this._getAvnuDepositSwapLegCall({
|
|
27716
30326
|
...params,
|
|
27717
|
-
minHF: 1.
|
|
30327
|
+
minHF: 1.1
|
|
30328
|
+
// undo
|
|
27718
30329
|
});
|
|
27719
30330
|
}
|
|
27720
30331
|
async _getAvnuDepositSwapLegCall(params) {
|
|
@@ -27737,6 +30348,7 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
27737
30348
|
const totalDebtAmount = totalCollateral.multipliedBy(collateralPrice).multipliedBy(legLTV).dividedBy(debtPrice).dividedBy(params.minHF);
|
|
27738
30349
|
logger.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall totalDebtAmount: ${totalDebtAmount}`);
|
|
27739
30350
|
const debtAmount = totalDebtAmount.minus(existingDebtInfo.amount);
|
|
30351
|
+
logger.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall debtAmount: ${debtAmount}`);
|
|
27740
30352
|
if (debtAmount.lt(0)) {
|
|
27741
30353
|
const lstDEXPrice = await this.getLSTDexPrice();
|
|
27742
30354
|
const debtAmountInLST = debtAmount.abs().dividedBy(lstDEXPrice);
|
|
@@ -27744,10 +30356,9 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
27744
30356
|
isDeposit: false,
|
|
27745
30357
|
leg1DepositAmount: debtAmountInLST
|
|
27746
30358
|
});
|
|
27747
|
-
assert(calls.length == 1,
|
|
30359
|
+
assert(calls.length == 1, `Expected 1 call for unwind, got ${calls.length}`);
|
|
27748
30360
|
return calls[0];
|
|
27749
30361
|
}
|
|
27750
|
-
logger.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall debtAmount: ${debtAmount}`);
|
|
27751
30362
|
const STEP0 = "approve_token1" /* APPROVE_TOKEN1 */;
|
|
27752
30363
|
const manage0Info = this.getProofs(STEP0);
|
|
27753
30364
|
const manageCall0 = manage0Info.callConstructor({
|
|
@@ -27852,10 +30463,32 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
27852
30463
|
return { shouldRebalance: false, manageCall: void 0 };
|
|
27853
30464
|
}
|
|
27854
30465
|
}
|
|
30466
|
+
async getVesuAUM(adapter) {
|
|
30467
|
+
const legAUM = await adapter.getPositions(this.config);
|
|
30468
|
+
const underlying = this.asset();
|
|
30469
|
+
assert(underlying.symbol.startsWith("x"), "Underlying is not an LST of Endur");
|
|
30470
|
+
let vesuAum = Web3Number.fromWei("0", underlying.decimals);
|
|
30471
|
+
let tokenUnderlyingPrice = await this.getLSTExchangeRate();
|
|
30472
|
+
tokenUnderlyingPrice = tokenUnderlyingPrice * 0.998;
|
|
30473
|
+
logger.verbose(`${this.getTag()} tokenUnderlyingPrice: ${tokenUnderlyingPrice}`);
|
|
30474
|
+
if (legAUM[0].token.address.eq(underlying.address)) {
|
|
30475
|
+
vesuAum = vesuAum.plus(legAUM[0].amount);
|
|
30476
|
+
} else {
|
|
30477
|
+
vesuAum = vesuAum.plus(legAUM[0].amount.dividedBy(tokenUnderlyingPrice));
|
|
30478
|
+
}
|
|
30479
|
+
if (legAUM[1].token.address.eq(underlying.address)) {
|
|
30480
|
+
vesuAum = vesuAum.minus(legAUM[1].amount);
|
|
30481
|
+
} else {
|
|
30482
|
+
vesuAum = vesuAum.minus(legAUM[1].amount.dividedBy(tokenUnderlyingPrice));
|
|
30483
|
+
}
|
|
30484
|
+
;
|
|
30485
|
+
logger.verbose(`${this.getTag()} Vesu AUM: ${vesuAum}, legCollateral: ${legAUM[0].amount.toNumber()}, legDebt: ${legAUM[1].amount.toNumber()}`);
|
|
30486
|
+
return vesuAum;
|
|
30487
|
+
}
|
|
27855
30488
|
//
|
|
27856
30489
|
async _getMinOutputAmountLSTBuy(amountInUnderlying) {
|
|
27857
30490
|
const lstTruePrice = await this.getLSTExchangeRate();
|
|
27858
|
-
const minOutputAmount = amountInUnderlying.dividedBy(lstTruePrice);
|
|
30491
|
+
const minOutputAmount = amountInUnderlying.dividedBy(lstTruePrice).multipliedBy(0.99979);
|
|
27859
30492
|
return minOutputAmount;
|
|
27860
30493
|
}
|
|
27861
30494
|
async _getMinOutputAmountLSTSell(amountInLST) {
|
|
@@ -27874,6 +30507,10 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
27874
30507
|
const [vesuAdapter1] = this.getVesuAdapters();
|
|
27875
30508
|
const legLTV = await vesuAdapter1.getLTVConfig(this.config);
|
|
27876
30509
|
logger.verbose(`${this.getTag()}::getVesuMultiplyCall legLTV: ${legLTV}`);
|
|
30510
|
+
if (!params.isDeposit) {
|
|
30511
|
+
const unusedBalance = await this.getUnusedBalance();
|
|
30512
|
+
logger.verbose(`${this.getTag()}::getVesuMultiplyCall unusedBalance: ${unusedBalance.amount.toString()}, required: ${params.leg1DepositAmount.toString()}`);
|
|
30513
|
+
}
|
|
27877
30514
|
const existingPositions = await vesuAdapter1.getPositions(this.config);
|
|
27878
30515
|
const collateralisation = await vesuAdapter1.getCollateralization(this.config);
|
|
27879
30516
|
const existingCollateralInfo = existingPositions[0];
|
|
@@ -27906,16 +30543,34 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
27906
30543
|
});
|
|
27907
30544
|
}
|
|
27908
30545
|
getLSTUnderlyingTokenInfo() {
|
|
27909
|
-
const
|
|
30546
|
+
const vesuAdapter1 = this.getVesuSameTokenAdapter();
|
|
27910
30547
|
return vesuAdapter1.config.debt;
|
|
27911
30548
|
}
|
|
30549
|
+
async getMaxBorrowableAmount() {
|
|
30550
|
+
const vesuAdapters = this.getVesuAdapters();
|
|
30551
|
+
let netMaxBorrowableAmount = Web3Number.fromWei("0", this.getLSTUnderlyingTokenInfo().decimals);
|
|
30552
|
+
const maxBorrowables = [];
|
|
30553
|
+
const lstAPY = await this.getLSTAPR(this.getLSTUnderlyingTokenInfo().address);
|
|
30554
|
+
const maxInterestRate = lstAPY * 0.8;
|
|
30555
|
+
for (const vesuAdapter of vesuAdapters) {
|
|
30556
|
+
const maxBorrowableAmount = await vesuAdapter.getMaxBorrowableByInterestRate(this.config, vesuAdapter.config.debt, maxInterestRate);
|
|
30557
|
+
const debtCap = await vesuAdapter.getDebtCap(this.config);
|
|
30558
|
+
maxBorrowables.push({ amount: maxBorrowableAmount.minimum(debtCap), borrowableAsset: vesuAdapter.config.debt });
|
|
30559
|
+
}
|
|
30560
|
+
maxBorrowables.sort((a, b) => b.amount.toNumber() - a.amount.toNumber());
|
|
30561
|
+
netMaxBorrowableAmount = maxBorrowables.reduce((acc, curr) => acc.plus(curr.amount), Web3Number.fromWei("0", this.getLSTUnderlyingTokenInfo().decimals));
|
|
30562
|
+
return { netMaxBorrowableAmount, maxBorrowables };
|
|
30563
|
+
}
|
|
30564
|
+
// todo how much to unwind to get back healthy APY zone again
|
|
30565
|
+
// if net APY < LST APR + 0.5%, we need to unwind to get back to LST APR + 1% atleast or 0 vesu position
|
|
30566
|
+
// For xSTRK, simply deposit in Vesu if looping is not viable
|
|
27912
30567
|
/**
|
|
27913
30568
|
* Gets LST APR for the strategy's underlying asset from Endur API
|
|
27914
30569
|
* @returns Promise<number> The LST APR (not divided by 1e18)
|
|
27915
30570
|
*/
|
|
27916
30571
|
async getLSTAPR(_address) {
|
|
27917
30572
|
try {
|
|
27918
|
-
const vesuAdapter1 = this.
|
|
30573
|
+
const vesuAdapter1 = this.getVesuSameTokenAdapter();
|
|
27919
30574
|
const apr = await LSTAPRService.getLSTAPR(vesuAdapter1.config.debt.address);
|
|
27920
30575
|
if (!apr) {
|
|
27921
30576
|
throw new Error("Failed to get LST APR");
|
|
@@ -27928,21 +30583,41 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
27928
30583
|
}
|
|
27929
30584
|
// todo undo this
|
|
27930
30585
|
async netAPY() {
|
|
27931
|
-
const
|
|
27932
|
-
|
|
27933
|
-
if (
|
|
27934
|
-
|
|
27935
|
-
|
|
27936
|
-
|
|
30586
|
+
const unusedBalance = await this.getUnusedBalance();
|
|
30587
|
+
const maxNewDeposits = await this.maxNewDeposits();
|
|
30588
|
+
if (maxNewDeposits * 1.5 < unusedBalance.amount.toNumber()) {
|
|
30589
|
+
return super.netAPY();
|
|
30590
|
+
} else {
|
|
30591
|
+
const { positions, baseAPYs, rewardAPYs } = await this.getVesuAPYs();
|
|
30592
|
+
const weights = positions.map((p, index) => p.usdValue * (index % 2 == 0 ? 1 : -1));
|
|
30593
|
+
return this.returnNetAPY(baseAPYs, rewardAPYs, weights);
|
|
27937
30594
|
}
|
|
27938
|
-
return {
|
|
27939
|
-
net: _net,
|
|
27940
|
-
splits
|
|
27941
|
-
};
|
|
27942
30595
|
}
|
|
30596
|
+
async maxNewDeposits() {
|
|
30597
|
+
const maxBorrowableAmounts = await this.getMaxBorrowableAmount();
|
|
30598
|
+
let ltv = void 0;
|
|
30599
|
+
for (let adapter of this.getVesuAdapters()) {
|
|
30600
|
+
const maxBorrowableAmount = maxBorrowableAmounts.maxBorrowables.find((b) => b.borrowableAsset.address.eq(adapter.config.debt.address))?.amount;
|
|
30601
|
+
if (!maxBorrowableAmount) {
|
|
30602
|
+
throw new Error(`Max borrowable amount not found for adapter: ${adapter.config.debt.symbol}`);
|
|
30603
|
+
}
|
|
30604
|
+
const maxLTV = await adapter.getLTVConfig(this.config);
|
|
30605
|
+
if (!ltv) {
|
|
30606
|
+
ltv = maxLTV;
|
|
30607
|
+
} else if (ltv != maxLTV) {
|
|
30608
|
+
throw new Error(`LTV mismatch for adapter: ${adapter.config.debt.symbol}`);
|
|
30609
|
+
}
|
|
30610
|
+
}
|
|
30611
|
+
if (!ltv) {
|
|
30612
|
+
throw new Error("LTV not found");
|
|
30613
|
+
}
|
|
30614
|
+
const numerator = this.metadata.additionalInfo.targetHealthFactor * maxBorrowableAmounts.netMaxBorrowableAmount.toNumber() / ltv;
|
|
30615
|
+
return numerator - maxBorrowableAmounts.netMaxBorrowableAmount.toNumber();
|
|
30616
|
+
}
|
|
30617
|
+
// todo revisit cases where 0th adapters is used
|
|
27943
30618
|
async getUnusedBalanceAPY() {
|
|
27944
30619
|
const unusedBalance = await this.getUnusedBalance();
|
|
27945
|
-
const vesuAdapter = this.
|
|
30620
|
+
const vesuAdapter = this.getVesuSameTokenAdapter();
|
|
27946
30621
|
const underlying = vesuAdapter.config.debt;
|
|
27947
30622
|
const lstAPY = await this.getLSTAPR(underlying.address);
|
|
27948
30623
|
return {
|
|
@@ -27951,7 +30626,7 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
27951
30626
|
};
|
|
27952
30627
|
}
|
|
27953
30628
|
async getLSTExchangeRate() {
|
|
27954
|
-
const
|
|
30629
|
+
const vesuAdapter1 = this.getVesuSameTokenAdapter();
|
|
27955
30630
|
const lstTokenInfo = vesuAdapter1.config.collateral;
|
|
27956
30631
|
const lstABI = new Contract10({
|
|
27957
30632
|
abi: erc4626_abi_default,
|
|
@@ -27970,7 +30645,7 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
27970
30645
|
async getModifyLeverCall(params) {
|
|
27971
30646
|
logger.verbose(`${this.getTag()}::getModifyLeverCall marginAmount: ${params.marginAmount}, debtAmount: ${params.debtAmount}, lstDexPriceInUnderlying: ${params.lstDexPriceInUnderlying}, isIncrease: ${params.isIncrease}`);
|
|
27972
30647
|
assert(!params.marginAmount.isZero() || !params.debtAmount.isZero(), "Deposit/debt must be non-0");
|
|
27973
|
-
const
|
|
30648
|
+
const vesuAdapter1 = this.getVesuSameTokenAdapter();
|
|
27974
30649
|
const lstTokenInfo = this.asset();
|
|
27975
30650
|
const lstUnderlyingTokenInfo = vesuAdapter1.config.debt;
|
|
27976
30651
|
const maxAmounts = lstTokenInfo.symbol == "xSTRK" ? 5e5 : 0.5;
|
|
@@ -28207,6 +30882,12 @@ var _riskFactor4 = [
|
|
|
28207
30882
|
{ type: "Technical Risk" /* TECHNICAL_RISK */, value: 1 /* STABLE_INFRASTRUCTURE */, weight: 25, reason: "Liquidation can only happen if vault is left un-monitored for weeks, which is highly unlikely. We actively monitor all services on a daily basis." },
|
|
28208
30883
|
{ type: "Depeg Risk" /* DEPEG_RISK */, value: 2 /* GENERALLY_STABLE */, weight: 25, reason: "Generally stable pegged assets" }
|
|
28209
30884
|
];
|
|
30885
|
+
var borrowableAssets = [
|
|
30886
|
+
"WBTC",
|
|
30887
|
+
"tBTC",
|
|
30888
|
+
"LBTC",
|
|
30889
|
+
"solvBTC"
|
|
30890
|
+
];
|
|
28210
30891
|
var hyperxSTRK = {
|
|
28211
30892
|
vaultAddress: ContractAddr.from("0x46c7a54c82b1fe374353859f554a40b8bd31d3e30f742901579e7b57b1b5960"),
|
|
28212
30893
|
manager: ContractAddr.from("0x5d499cd333757f461a0bedaca3dfc4d77320c773037e0aa299f22a6dbfdc03a"),
|
|
@@ -28216,7 +30897,8 @@ var hyperxSTRK = {
|
|
|
28216
30897
|
leafAdapters: [],
|
|
28217
30898
|
adapters: [],
|
|
28218
30899
|
targetHealthFactor: 1.1,
|
|
28219
|
-
minHealthFactor: 1.05
|
|
30900
|
+
minHealthFactor: 1.05,
|
|
30901
|
+
borrowable_assets: Global.getDefaultTokens().filter((token) => token.symbol === "STRK")
|
|
28220
30902
|
};
|
|
28221
30903
|
var hyperxWBTC = {
|
|
28222
30904
|
vaultAddress: ContractAddr.from("0x2da9d0f96a46b453f55604313785dc866424240b1c6811d13bef594343db818"),
|
|
@@ -28227,7 +30909,8 @@ var hyperxWBTC = {
|
|
|
28227
30909
|
leafAdapters: [],
|
|
28228
30910
|
adapters: [],
|
|
28229
30911
|
targetHealthFactor: 1.1,
|
|
28230
|
-
minHealthFactor: 1.05
|
|
30912
|
+
minHealthFactor: 1.05,
|
|
30913
|
+
borrowable_assets: borrowableAssets.map((asset) => Global.getDefaultTokens().find((token) => token.symbol === asset))
|
|
28231
30914
|
};
|
|
28232
30915
|
var hyperxtBTC = {
|
|
28233
30916
|
vaultAddress: ContractAddr.from("0x47d5f68477e5637ce0e56436c6b5eee5a354e6828995dae106b11a48679328"),
|
|
@@ -28238,7 +30921,8 @@ var hyperxtBTC = {
|
|
|
28238
30921
|
leafAdapters: [],
|
|
28239
30922
|
adapters: [],
|
|
28240
30923
|
targetHealthFactor: 1.1,
|
|
28241
|
-
minHealthFactor: 1.05
|
|
30924
|
+
minHealthFactor: 1.05,
|
|
30925
|
+
borrowable_assets: borrowableAssets.map((asset) => Global.getDefaultTokens().find((token) => token.symbol === asset))
|
|
28242
30926
|
};
|
|
28243
30927
|
var hyperxsBTC = {
|
|
28244
30928
|
vaultAddress: ContractAddr.from("0x437ef1e7d0f100b2e070b7a65cafec0b2be31b0290776da8b4112f5473d8d9"),
|
|
@@ -28249,7 +30933,8 @@ var hyperxsBTC = {
|
|
|
28249
30933
|
leafAdapters: [],
|
|
28250
30934
|
adapters: [],
|
|
28251
30935
|
targetHealthFactor: 1.1,
|
|
28252
|
-
minHealthFactor: 1.05
|
|
30936
|
+
minHealthFactor: 1.05,
|
|
30937
|
+
borrowable_assets: borrowableAssets.map((asset) => Global.getDefaultTokens().find((token) => token.symbol === asset))
|
|
28253
30938
|
};
|
|
28254
30939
|
var hyperxLBTC = {
|
|
28255
30940
|
vaultAddress: ContractAddr.from("0x64cf24d4883fe569926419a0569ab34497c6956a1a308fa883257f7486d7030"),
|
|
@@ -28260,7 +30945,8 @@ var hyperxLBTC = {
|
|
|
28260
30945
|
leafAdapters: [],
|
|
28261
30946
|
adapters: [],
|
|
28262
30947
|
targetHealthFactor: 1.1,
|
|
28263
|
-
minHealthFactor: 1.05
|
|
30948
|
+
minHealthFactor: 1.05,
|
|
30949
|
+
borrowable_assets: borrowableAssets.map((asset) => Global.getDefaultTokens().find((token) => token.symbol === asset))
|
|
28264
30950
|
};
|
|
28265
30951
|
function getInvestmentSteps(lstSymbol, underlyingSymbol) {
|
|
28266
30952
|
return [
|
|
@@ -28291,7 +30977,8 @@ function getStrategySettings(lstSymbol, underlyingSymbol, addresses, isPreview =
|
|
|
28291
30977
|
contractDetails: getContractDetails(addresses),
|
|
28292
30978
|
faqs: getFAQs2(lstSymbol, underlyingSymbol),
|
|
28293
30979
|
investmentSteps: getInvestmentSteps(lstSymbol, underlyingSymbol),
|
|
28294
|
-
isPreview
|
|
30980
|
+
isPreview,
|
|
30981
|
+
apyMethodology: "Current annualized APY in terms of base asset of the LST"
|
|
28295
30982
|
};
|
|
28296
30983
|
}
|
|
28297
30984
|
var HyperLSTStrategies = [
|
|
@@ -28351,6 +31038,7 @@ export {
|
|
|
28351
31038
|
VesuRebalanceStrategies,
|
|
28352
31039
|
Web3Number,
|
|
28353
31040
|
ZkLend,
|
|
31041
|
+
extensionMap,
|
|
28354
31042
|
getContractDetails,
|
|
28355
31043
|
getMainnetConfig,
|
|
28356
31044
|
getNoRiskTags,
|