tx · FqCyvpppz29Jz1RRhDknrvmM7QhkV9XL3QrKsLd1D4bT 3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh: -0.02600000 Waves 2023.08.30 14:08 [2733350] smart account 3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh > SELF 0.00000000 Waves
{ "type": 13, "id": "FqCyvpppz29Jz1RRhDknrvmM7QhkV9XL3QrKsLd1D4bT", "fee": 2600000, "feeAssetId": null, "timestamp": 1693393718548, "version": 2, "chainId": 84, "sender": "3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh", "senderPublicKey": "HiTi1JT7GQRqLNxg4yZhD1mV42y1Mv2AYvRx92JQRbwX", "proofs": [ "5WR79YPV53bXsGexbXG8Vny2hyasjwJNy3X2mWhFdrDJwAaiD17tq2dCXW1BJdMPHHHtXT5WCdL11xYdSRR9P4WR" ], "script": "base64:BgJgCAISBAoCAQQSBQoDCAEBEgUKAwgBARIDCgEIEgMKAQgSBAoCCAESBQoDCAEIEgUKAwgBCBIFCgMIAQgSBgoECAEICBIAEgMKAQESAwoBARIECgIBARIDCgEBEgQKAgEBeQAGRVVMRVI4ANaJz4EBAAVNVUxUNgDAhD0ABk1VTFRYNgkAtgIBAMCEPQAFTVVMVDgAgMLXLwAGTVVMVFg4CQC2AgEAgMLXLwAHTVVMVFgxMAkAtgIBAIDIr6AlAAZNVUxUMTIAgKCUpY0dAAdNVUxUWDE2CQC2AgEAgICE/qbe4REABk1VTFQxOAkAtgIBAICAkLu61q3wDQADU0VQAgJfXwAHTElTVFNFUAIBOgARREVGQVVMVFNXQVBGRUVOMlcAiCcAEURFRkFVTFRTV0FQRkVFVzJOAKCcAQALQlJQUk9URUNURUQAoI0GAAdXQVZFU0lECQDZBAECBVdBVkVTAAlEQVlNSUxMSVMAgLiZKQANREVGQVVMVFBFUklPRAkAaAIAoAsADgESa2V5TmV1dHJpbm9Bc3NldElkAAIRbmV1dHJpbm9fYXNzZXRfaWQBDmtleU5zYnRBc3N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jb21lRm9yUGVyaW9kBQ9zdXJmVXNkblByaWNlWDYJAJQKAgUDbmlsCQCsAgICBCVkX18JAKQDAQUDYXByAWkBFm5zYnRTdGFraW5nQXByUkVBRE9OTFkBBGRheXMEB3RtcERheXMAAwQRbnNidFByaWNlVG9Vc2RuWDYAgKToAwQPaW5jb21lRm9yUGVyaW9kCQEXY2FsY1VzZG5JbmNvbWVGb3JQZXJpb2QCBRNuc2J0U3Rha2luZ0NvbnRyYWN0BQd0bXBEYXlzBANhcHIJAQdjYWxjQXByBAUTbnNidFN0YWtpbmdDb250cmFjdAUHdG1wRGF5cwUPaW5jb21lRm9yUGVyaW9kBRFuc2J0UHJpY2VUb1VzZG5YNgkAlAoCBQNuaWwJAKwCAgIEJWRfXwkApAMBBQNhcHIBaQEYbnNidFN0YWtpbmdBcHJWMlJFQURPTkxZAgRkYXlzD25zYnRVc2RuUHJpY2VYNgQHdG1wRGF5cwADBA9pbmNvbWVGb3JQZXJpb2QJARdjYWxjVXNkbkluY29tZUZvclBlcmlvZAIFE25zYnRTdGFraW5nQ29udHJhY3QFB3RtcERheXMEA2FwcgkBB2NhbGNBcHIEBRNuc2J0U3Rha2luZ0NvbnRyYWN0BQd0bXBEYXlzBQ9pbmNvbWVGb3JQZXJpb2QFD25zYnRVc2RuUHJpY2VYNgkAlAoCBQNuaWwJAKwCAgIEJWRfXwkApAMBBQNhcHIAv9J/bA==", "height": 2733350, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8UGmJcQbat5wTS2V2pzWZ15nkj41TRop36L4PRgNy3RJ Next: EBkWvwwQdkNq78iCATwVkzhcvtS36DC1wxGaPXPTYLxQ Diff:
Old | New | Differences | |
---|---|---|---|
387 | 387 | else if ((assetId == neutrinoAssetId)) | |
388 | 388 | then "outMulti" | |
389 | 389 | else throw(("Can't swap assetId=" + assetIdStrIn)) | |
390 | - | let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amountIn, price, assetIdStrIn | |
390 | + | let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amountIn, price, assetIdStrIn], nil)) | |
391 | 391 | let outNeutrinoInfo = makeString([neutrinoAssetIdString, toString(withdrawTuple._8), toString(withdrawTuple._1), toString(withdrawTuple._6), "1000000"], LISTSEP) | |
392 | 392 | let withdrawBasket = if ((swapType == "outNeutrino")) | |
393 | 393 | then outNeutrinoInfo | |
579 | 579 | else if ((assetId == neutrinoAssetId)) | |
580 | 580 | then "outMulti" | |
581 | 581 | else throw(("Can't swap assetId=" + assetIdStr)) | |
582 | - | let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amount, price, assetIdStr | |
582 | + | let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amount, price, assetIdStr], nil)) | |
583 | 583 | let outNetAmount = withdrawTuple._1 | |
584 | 584 | let outSurfAmt = withdrawTuple._3 | |
585 | 585 | let inAmtToSurfPart = withdrawTuple._4 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let EULER8 = 271828182 | |
5 | 5 | ||
6 | 6 | let MULT6 = 1000000 | |
7 | 7 | ||
8 | 8 | let MULTX6 = toBigInt(1000000) | |
9 | 9 | ||
10 | 10 | let MULT8 = 100000000 | |
11 | 11 | ||
12 | 12 | let MULTX8 = toBigInt(100000000) | |
13 | 13 | ||
14 | 14 | let MULTX10 = toBigInt(10000000000) | |
15 | 15 | ||
16 | 16 | let MULT12 = 1000000000000 | |
17 | 17 | ||
18 | 18 | let MULTX16 = toBigInt(10000000000000000) | |
19 | 19 | ||
20 | 20 | let MULT18 = toBigInt(1000000000000000000) | |
21 | 21 | ||
22 | 22 | let SEP = "__" | |
23 | 23 | ||
24 | 24 | let LISTSEP = ":" | |
25 | 25 | ||
26 | 26 | let DEFAULTSWAPFEEN2W = 5000 | |
27 | 27 | ||
28 | 28 | let DEFAULTSWAPFEEW2N = 20000 | |
29 | 29 | ||
30 | 30 | let BRPROTECTED = 100000 | |
31 | 31 | ||
32 | 32 | let WAVESID = fromBase58String("WAVES") | |
33 | 33 | ||
34 | 34 | let DAYMILLIS = 86400000 | |
35 | 35 | ||
36 | 36 | let DEFAULTPERIOD = (1440 * 14) | |
37 | 37 | ||
38 | 38 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func keyNsbtAssetId () = "bond_asset_id" | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func keySurfAssetId () = "surf_asset_id" | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func keySwapAmountAParam () = "%s%s__config__swapAParam" | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func keySwapAmountBParam () = "%s%s__config__swapBParam" | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func keyUsdnSwapAmountAParam () = "%s%s__config__usdnSwapAParam" | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam" | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func keyNsbtLockContract () = "%s__nsbtLockContract" | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func keyMathContract () = "%s__mathContract" | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func basketAssetsKey () = "%s%s__common__basketAssets" | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func basketDKey () = "%s%s__common__basketD" | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func basketBKey () = "%s%s__common__basketB" | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func basketLogbDeltaKey () = "%s%s__common__basketLogbDelta" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func basketWeightByAssetKey (assetId) = ("%s%s%s__common__weightByAsset__" + assetId) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func keyPrice () = "price" | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func keyPriceByAsset (assetId) = ("%s%s%s__common__priceByAsset__" + assetId) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func keyHalfLife () = "%s__halfLife" | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyMinLockAmount () = "%s__minLockAmount" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyVpPeriodDuration () = makeString(["%s%s", "vp", "periodDuration"], SEP) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy" | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func keyMinNsbtSell () = "min_nsbt_sell" | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func keyStatsDepositAmtByDay (timestamp) = makeString(["%s%s%d", "stats", "depositAmtByDay", toString(timestamp)], SEP) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func keySupportedRewardAssets () = "supportedRewardAssets" | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func toStartOfDay (timestamp) = ((timestamp / DAYMILLIS) * DAYMILLIS) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getIntOrElse (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getStrOrElse (address,key,defaultVal) = valueOrElse(getString(address, key), defaultVal) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func convertTokenToUsd (amount,price) = fraction(amount, price, MULT8) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func asAnyList (val) = match val { | |
135 | 135 | case valAnyList: List[Any] => | |
136 | 136 | valAnyList | |
137 | 137 | case _ => | |
138 | 138 | throw("fail to cast into List[Any]") | |
139 | 139 | } | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func asInt (val) = match val { | |
143 | 143 | case valInt: Int => | |
144 | 144 | valInt | |
145 | 145 | case _ => | |
146 | 146 | throw("fail to cast into Int") | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func asString (val) = match val { | |
151 | 151 | case valStr: String => | |
152 | 152 | valStr | |
153 | 153 | case _ => | |
154 | 154 | throw("fail to cast into String") | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func asTuple2Ints (val) = match val { | |
159 | 159 | case v: (Int, Int) => | |
160 | 160 | v | |
161 | 161 | case _ => | |
162 | 162 | throw("fail to cast into Tuple2 ints") | |
163 | 163 | } | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func asSwapParamsSTRUCT (val) = match val { | |
167 | 167 | case struct: (Int, Int, Int, Int, Int, Int, Int) => | |
168 | 168 | struct | |
169 | 169 | case _ => | |
170 | 170 | throw("fail to cast into SwapParamsSTRUCT") | |
171 | 171 | } | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func asWithdrawResultSTRUCT (val) = match val { | |
175 | 175 | case struct: (Int, Unit, Int, Int, Int, Int, Int, Int, String)|(Int, ByteVector, Int, Int, Int, Int, Int, Int, String) => | |
176 | 176 | struct | |
177 | 177 | case _ => | |
178 | 178 | throw("fail to cast into WithdrawResult") | |
179 | 179 | } | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func toTimestamp (start) = if ((0 > start)) | |
183 | 183 | then -1 | |
184 | 184 | else match blockInfoByHeight(start) { | |
185 | 185 | case block: BlockInfo => | |
186 | 186 | block.timestamp | |
187 | 187 | case _ => | |
188 | 188 | -1 | |
189 | 189 | } | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult)) | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18)) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | let nMetricIdxPrice = 0 | |
199 | 199 | ||
200 | 200 | let nMetricIdxUsdnLockedBalance = 1 | |
201 | 201 | ||
202 | 202 | let nMetricIdxWavesLockedBalance = 2 | |
203 | 203 | ||
204 | 204 | let nMetricIdxReserve = 3 | |
205 | 205 | ||
206 | 206 | let nMetricIdxReserveInUsdn = 4 | |
207 | 207 | ||
208 | 208 | let nMetricIdxUsdnSupply = 5 | |
209 | 209 | ||
210 | 210 | let nMetricIdxSurplus = 6 | |
211 | 211 | ||
212 | 212 | let nMetricIdxSurplusPercent = 7 | |
213 | 213 | ||
214 | 214 | let nMetricIdxBR = 8 | |
215 | 215 | ||
216 | 216 | let nMetricIdxNsbtSupply = 9 | |
217 | 217 | ||
218 | 218 | let nMetricIdxMaxNsbtSupply = 10 | |
219 | 219 | ||
220 | 220 | let nMetricIdxSurfSupply = 11 | |
221 | 221 | ||
222 | 222 | let nMetricUsdnUsdtPeg = 12 | |
223 | 223 | ||
224 | 224 | let nMetricCurrentPriceAdj = 13 | |
225 | 225 | ||
226 | 226 | let nMetricBasketInfo = 14 | |
227 | 227 | ||
228 | 228 | let nMetricWeightedPrice = 15 | |
229 | 229 | ||
230 | 230 | let nMetricTotalReservesUsd = 16 | |
231 | 231 | ||
232 | 232 | let IdxControlCfgNeutrinoDapp = 1 | |
233 | 233 | ||
234 | 234 | let IdxControlCfgAuctionDapp = 2 | |
235 | 235 | ||
236 | 236 | let IdxControlCfgRpdDapp = 3 | |
237 | 237 | ||
238 | 238 | let IdxControlCfgMathDapp = 4 | |
239 | 239 | ||
240 | 240 | let IdxControlCfgLiquidationDapp = 5 | |
241 | 241 | ||
242 | 242 | let IdxControlCfgRestDapp = 6 | |
243 | 243 | ||
244 | 244 | let IdxControlCfgNodeRegistryDapp = 7 | |
245 | 245 | ||
246 | 246 | let IdxControlCfgNsbtStakingDapp = 8 | |
247 | 247 | ||
248 | 248 | let IdxControlCfgMediatorDapp = 9 | |
249 | 249 | ||
250 | 250 | let IdxControlCfgSurfStakingDapp = 10 | |
251 | 251 | ||
252 | 252 | let IdxControlCfgGnsbtControllerDapp = 11 | |
253 | 253 | ||
254 | 254 | let bFuncIdxSurf = 0 | |
255 | 255 | ||
256 | 256 | let bFuncIdxWaves = 1 | |
257 | 257 | ||
258 | 258 | let bFuncIdxUsdn = 2 | |
259 | 259 | ||
260 | 260 | let bFuncIdxReserveStart = 3 | |
261 | 261 | ||
262 | 262 | let bFuncIdxSupplyStart = 4 | |
263 | 263 | ||
264 | 264 | let bFuncIdxBRStart = 5 | |
265 | 265 | ||
266 | 266 | let bFuncIdxReserveEnd = 6 | |
267 | 267 | ||
268 | 268 | let bFuncIdxSupplyEnd = 7 | |
269 | 269 | ||
270 | 270 | let bFuncIdxBREnd = 8 | |
271 | 271 | ||
272 | 272 | let bFuncIdxRest = 9 | |
273 | 273 | ||
274 | 274 | let bFuncIdxWavesPrice = 10 | |
275 | 275 | ||
276 | 276 | func keyControlAddress () = "%s%s__config__controlAddress" | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | func keyControlCfg () = "%s__controlConfig" | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP) | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
289 | 289 | ||
290 | 290 | let controlCfg = readControlCfgOrFail(controlContract) | |
291 | 291 | ||
292 | 292 | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
293 | 293 | ||
294 | 294 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
295 | 295 | ||
296 | 296 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
297 | 297 | ||
298 | 298 | let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp) | |
299 | 299 | ||
300 | 300 | let rpdContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp) | |
301 | 301 | ||
302 | 302 | let nsbtStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgNsbtStakingDapp) | |
303 | 303 | ||
304 | 304 | let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp) | |
305 | 305 | ||
306 | 306 | let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp) | |
307 | 307 | ||
308 | 308 | let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
309 | 309 | ||
310 | 310 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdString) | |
311 | 311 | ||
312 | 312 | let nsbtAssetIdStr = getStringValue(neutrinoContract, keyNsbtAssetId()) | |
313 | 313 | ||
314 | 314 | let nsbtAssetId = fromBase58String(nsbtAssetIdStr) | |
315 | 315 | ||
316 | 316 | let surfAssetIdStr = getStringValue(auctionContract, keySurfAssetId()) | |
317 | 317 | ||
318 | 318 | let surfAssetId = fromBase58String(surfAssetIdStr) | |
319 | 319 | ||
320 | 320 | func readUsdnIncomeByDay (stakingAcc,startOfDayTimestamp,xtnPrice) = { | |
321 | 321 | let amtByDayKEY = keyStatsDepositAmtByDay(startOfDayTimestamp) | |
322 | 322 | let incomeStr = getStrOrElse(stakingAcc, amtByDayKEY, "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0") | |
323 | 323 | let incomeArray = split(incomeStr, SEP) | |
324 | 324 | let supportedAssets = split(getStrOrElse(mathContract, keySupportedRewardAssets(), ""), "_") | |
325 | 325 | func incomeAdder (acc,i) = { | |
326 | 326 | let assetId = supportedAssets[i] | |
327 | 327 | let income = parseIntValue(incomeArray[(i + 1)]) | |
328 | 328 | if ((assetId == neutrinoAssetIdString)) | |
329 | 329 | then (acc + income) | |
330 | 330 | else { | |
331 | 331 | let pr6 = value(getInteger(controlContract, keyPriceByAsset(assetId))) | |
332 | 332 | let assetInUsdAmt = fraction(income, pr6, MULT8) | |
333 | 333 | (acc + fraction(assetInUsdAmt, MULT6, xtnPrice)) | |
334 | 334 | } | |
335 | 335 | } | |
336 | 336 | ||
337 | 337 | let $l = [0, 1, 2] | |
338 | 338 | let $s = size($l) | |
339 | 339 | let $acc0 = 0 | |
340 | 340 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
341 | 341 | then $a | |
342 | 342 | else incomeAdder($a, $l[$i]) | |
343 | 343 | ||
344 | 344 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
345 | 345 | then $a | |
346 | 346 | else throw("List size exceeds 10") | |
347 | 347 | ||
348 | 348 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
349 | 349 | } | |
350 | 350 | ||
351 | 351 | ||
352 | 352 | func calcUsdnIncomeForPeriod (stakingAcc,days) = { | |
353 | 353 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
354 | 354 | let currStartOfDay = toStartOfDay(lastBlock.timestamp) | |
355 | 355 | let startTimestamp = (currStartOfDay - (DAYMILLIS * (days + 1))) | |
356 | 356 | let endTimestamp = (currStartOfDay - DAYMILLIS) | |
357 | 357 | let xtnPrice = asInt(neutrinoMetrics[nMetricWeightedPrice]) | |
358 | 358 | let startUsdnAmtTMP = readUsdnIncomeByDay(stakingAcc, startTimestamp, xtnPrice) | |
359 | 359 | let endUsdnAmt = readUsdnIncomeByDay(stakingAcc, endTimestamp, xtnPrice) | |
360 | 360 | let startUsdnAmt = if ((startUsdnAmtTMP == 0)) | |
361 | 361 | then endUsdnAmt | |
362 | 362 | else startUsdnAmtTMP | |
363 | 363 | (endUsdnAmt - startUsdnAmt) | |
364 | 364 | } | |
365 | 365 | ||
366 | 366 | ||
367 | 367 | func calcApr (stakingAcc,periodInDays,incomeForPeriod,stakingAssetPriceToUsdnX6) = { | |
368 | 368 | let totalStaked = getIntOrElse(stakingAcc, "%s%s__stats__activeTotalLocked", 1) | |
369 | 369 | let totalStakedInUsdn = fraction(totalStaked, stakingAssetPriceToUsdnX6, MULT6) | |
370 | 370 | if ((0 > incomeForPeriod)) | |
371 | 371 | then 0 | |
372 | 372 | else fraction((incomeForPeriod * MULT6), 365, (totalStakedInUsdn * periodInDays)) | |
373 | 373 | } | |
374 | 374 | ||
375 | 375 | ||
376 | 376 | func swapInfoInternal (userAddressStrOrEmpty,amountIn,assetIdStrIn,assetIdStrOutOrEmpty) = { | |
377 | 377 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
378 | 378 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
379 | 379 | let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil)) | |
380 | 380 | let limitMaxTokenInUsd = swapParamsTuple._1 | |
381 | 381 | let blcks2LmtReset = swapParamsTuple._3 | |
382 | 382 | let limitMaxUsdn = swapParamsTuple._7 | |
383 | 383 | let assetId = fromBase58String(assetIdStrIn) | |
384 | 384 | let basketAssets = valueOrElse(getString(neutrinoContract, basketAssetsKey()), "WAVES") | |
385 | 385 | let swapType = if (contains(basketAssets, assetIdStrIn)) | |
386 | 386 | then "outNeutrino" | |
387 | 387 | else if ((assetId == neutrinoAssetId)) | |
388 | 388 | then "outMulti" | |
389 | 389 | else throw(("Can't swap assetId=" + assetIdStrIn)) | |
390 | - | let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amountIn, price, assetIdStrIn | |
390 | + | let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amountIn, price, assetIdStrIn], nil)) | |
391 | 391 | let outNeutrinoInfo = makeString([neutrinoAssetIdString, toString(withdrawTuple._8), toString(withdrawTuple._1), toString(withdrawTuple._6), "1000000"], LISTSEP) | |
392 | 392 | let withdrawBasket = if ((swapType == "outNeutrino")) | |
393 | 393 | then outNeutrinoInfo | |
394 | 394 | else if ((assetIdStrOutOrEmpty == "")) | |
395 | 395 | then withdrawTuple._9 | |
396 | 396 | else "WAVES:38000000:123456:42:500000" | |
397 | 397 | $Tuple2(nil, makeString_2C(["%d%d%d%s", toString(blcks2LmtReset), toString(limitMaxTokenInUsd), toString(limitMaxUsdn), withdrawBasket], SEP)) | |
398 | 398 | } | |
399 | 399 | ||
400 | 400 | ||
401 | 401 | @Callable(i) | |
402 | 402 | func reverseSwapLimitREADONLY (lim,isOutMulti) = { | |
403 | 403 | let BR = asInt(asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))[nMetricIdxBR]) | |
404 | 404 | let gNsbt = if ((0 >= lim)) | |
405 | 405 | then 0 | |
406 | 406 | else { | |
407 | 407 | let aParamX8 = toBigInt(getIntOrFail(mathContract, if (isOutMulti) | |
408 | 408 | then keyUsdnSwapAmountAParam() | |
409 | 409 | else keySwapAmountAParam())) | |
410 | 410 | let bParamX16 = toBigInt(getIntOrFail(mathContract, if (isOutMulti) | |
411 | 411 | then keyUsdnSwapAmountBParam() | |
412 | 412 | else keySwapAmountBParam())) | |
413 | 413 | let limDivAX8 = if (isOutMulti) | |
414 | 414 | then fraction(fraction(toBigInt(lim), MULTX10, aParamX8), MULTX6, toBigInt(BR)) | |
415 | 415 | else fraction(toBigInt(lim), MULTX10, aParamX8) | |
416 | 416 | let revBX16 = fraction(MULTX16, MULTX16, bParamX16) | |
417 | 417 | toInt(pow(limDivAX8, 8, revBX16, 16, 6, CEILING)) | |
418 | 418 | } | |
419 | 419 | $Tuple2(nil, gNsbt) | |
420 | 420 | } | |
421 | 421 | ||
422 | 422 | ||
423 | 423 | ||
424 | 424 | @Callable(i) | |
425 | 425 | func gnsbtInfoINTERNAL (userAddressStrOrEmpty,additionalNsbtToStakeOrZero,additionalSurfToStakeOrZero) = { | |
426 | 426 | let userAddressOrThis = if ((userAddressStrOrEmpty != "")) | |
427 | 427 | then addressFromStringValue(userAddressStrOrEmpty) | |
428 | 428 | else this | |
429 | 429 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
430 | 430 | let gnsbtFromNsbtDiff = additionalNsbtToStakeOrZero | |
431 | 431 | let gnsbtFromSurfDiff = asInt(invoke(surfStakingContract, "gnsbtFromSurfSYSREADONLY", [additionalSurfToStakeOrZero], nil)) | |
432 | 432 | let gNsbtDiff = (gnsbtFromNsbtDiff + gnsbtFromSurfDiff) | |
433 | 433 | let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil)) | |
434 | 434 | let limitMaxTokenUsd = swapParamsTuple._1 | |
435 | 435 | let blcks2LmtReset = swapParamsTuple._3 | |
436 | 436 | let gnsbtAmt = swapParamsTuple._4 | |
437 | 437 | let gnsbtAmtTotal = swapParamsTuple._5 | |
438 | 438 | let limitMaxUsdn = swapParamsTuple._7 | |
439 | 439 | let swapParamsTupleNEW = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, gNsbtDiff], nil)) | |
440 | 440 | let limitMaxTokenUsdNEW = swapParamsTupleNEW._1 | |
441 | 441 | let blcks2LmtResetNEW = swapParamsTupleNEW._3 | |
442 | 442 | let gnsbtAmtNEW = swapParamsTupleNEW._4 | |
443 | 443 | let gnsbtAmtTotalNEW = swapParamsTupleNEW._5 | |
444 | 444 | let limitMaxUsdnNEW = swapParamsTupleNEW._7 | |
445 | 445 | let nsbtBalance = if ((userAddressStrOrEmpty != "")) | |
446 | 446 | then assetBalance(userAddressOrThis, nsbtAssetId) | |
447 | 447 | else 0 | |
448 | 448 | let surfBalance = if ((userAddressStrOrEmpty != "")) | |
449 | 449 | then assetBalance(userAddressOrThis, surfAssetId) | |
450 | 450 | else 0 | |
451 | 451 | let nsbtBalanceDiff = if ((additionalNsbtToStakeOrZero >= 0)) | |
452 | 452 | then additionalNsbtToStakeOrZero | |
453 | 453 | else { | |
454 | 454 | let nsbtUnstakingData = asAnyList(invoke(nsbtStakingContract, "nsbtUnstakingSYSREADONLY", [userAddressStrOrEmpty, (-1 * additionalNsbtToStakeOrZero)], nil)) | |
455 | 455 | let nsbtReceiveAmount = asInt(nsbtUnstakingData[2]) | |
456 | 456 | let result = -(nsbtReceiveAmount) | |
457 | 457 | result | |
458 | 458 | } | |
459 | 459 | let nsbtBalanceNew = (nsbtBalance - nsbtBalanceDiff) | |
460 | 460 | let surfBalanceNew = (surfBalance - additionalSurfToStakeOrZero) | |
461 | 461 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty, additionalNsbtToStakeOrZero, additionalSurfToStakeOrZero], nil)) | |
462 | 462 | let gnsbtUser = asInt(gnsbtData[0]) | |
463 | 463 | let gnsbtTotal = asInt(gnsbtData[1]) | |
464 | 464 | let nsbtData = asAnyList(gnsbtData[2]) | |
465 | 465 | let surfData = asAnyList(gnsbtData[3]) | |
466 | 466 | let gnsbtSurfTotalMature = asInt(gnsbtData[6]) | |
467 | 467 | let gnsbtSurfTotalTeen = asInt(gnsbtData[7]) | |
468 | 468 | let gnsbtSurfTotalKid = asInt(gnsbtData[8]) | |
469 | 469 | let gnsbtSurfUserMature = asInt(gnsbtData[9]) | |
470 | 470 | let gnsbtSurfUserTeen = asInt(gnsbtData[10]) | |
471 | 471 | let gnsbtSurfUserKid = asInt(gnsbtData[11]) | |
472 | 472 | let gnsbtAmtFromSurfMax = ((gnsbtSurfUserMature + gnsbtSurfUserTeen) + gnsbtSurfUserKid) | |
473 | 473 | let gnsbtAmtFromNsbt = asInt(nsbtData[2]) | |
474 | 474 | let gnsbtAmtFromNsbtNEW = (gnsbtAmtFromNsbt + gnsbtFromNsbtDiff) | |
475 | 475 | let gnsbtAmtFromSurfNEW = (gnsbtAmtFromSurfMax + gnsbtFromSurfDiff) | |
476 | 476 | let gnsbtFromNsbtTotal = asInt(nsbtData[3]) | |
477 | 477 | let gnsbtFromNsbtTotalNEW = (gnsbtFromNsbtTotal + gnsbtFromNsbtDiff) | |
478 | 478 | let gnsbtFromSurfTotalNEW = (((gnsbtSurfTotalMature + gnsbtSurfTotalTeen) + gnsbtSurfTotalKid) + gnsbtFromSurfDiff) | |
479 | 479 | let votingPower = (gnsbtAmtFromNsbt + gnsbtSurfUserMature) | |
480 | 480 | let votingPowerNew = (gnsbtAmtFromNsbtNEW + gnsbtSurfUserMature) | |
481 | 481 | let votingPowerMax = (gnsbtAmtFromNsbt + gnsbtAmtFromSurfMax) | |
482 | 482 | let votingPowerMaxNew = ((gnsbtAmtFromNsbtNEW + gnsbtAmtFromSurfMax) + gnsbtFromSurfDiff) | |
483 | 483 | let W2 = getIntOrElse(surfStakingContract, keyVpPeriodDuration(), DEFAULTPERIOD) | |
484 | 484 | let period = (height / W2) | |
485 | 485 | let votingPowerEta = if ((gnsbtSurfUserKid != 0)) | |
486 | 486 | then ((period + 2) * W2) | |
487 | 487 | else if ((gnsbtSurfUserTeen != 0)) | |
488 | 488 | then ((period + 1) * W2) | |
489 | 489 | else height | |
490 | 490 | let votingPowerEtaNew = if ((gnsbtFromSurfDiff != 0)) | |
491 | 491 | then ((period + 2) * W2) | |
492 | 492 | else votingPowerEta | |
493 | 493 | $Tuple2(nil, [0, nsbtBalance, surfBalance, nsbtBalanceNew, surfBalanceNew, gnsbtAmtFromNsbt, gnsbtSurfUserMature, gnsbtAmtFromNsbtNEW, gnsbtAmtFromSurfNEW, gnsbtFromNsbtTotal, gnsbtSurfTotalMature, gnsbtFromNsbtTotalNEW, gnsbtFromSurfTotalNEW, limitMaxUsdn, limitMaxTokenUsd, limitMaxUsdnNEW, limitMaxTokenUsdNEW, blcks2LmtReset, blcks2LmtResetNEW, votingPower, votingPowerNew, votingPowerMax, votingPowerMaxNew, votingPowerEta, votingPowerEtaNew]) | |
494 | 494 | } | |
495 | 495 | ||
496 | 496 | ||
497 | 497 | ||
498 | 498 | @Callable(i) | |
499 | 499 | func gnsbtInfoREADONLY (userAddressStrOrEmpty,additionalNsbtToStakeOrZero,additionalSurfToStakeOrZero) = { | |
500 | 500 | let gnsbtInfoDATA = asAnyList(invoke(this, "gnsbtInfoINTERNAL", [userAddressStrOrEmpty, additionalNsbtToStakeOrZero, additionalSurfToStakeOrZero], nil)) | |
501 | 501 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(asInt(gnsbtInfoDATA[1])), toString(asInt(gnsbtInfoDATA[2])), toString(asInt(gnsbtInfoDATA[3])), toString(asInt(gnsbtInfoDATA[4])), toString(asInt(gnsbtInfoDATA[5])), toString(asInt(gnsbtInfoDATA[6])), toString(asInt(gnsbtInfoDATA[7])), toString(asInt(gnsbtInfoDATA[8])), toString(asInt(gnsbtInfoDATA[9])), toString(asInt(gnsbtInfoDATA[10])), toString(asInt(gnsbtInfoDATA[11])), toString(asInt(gnsbtInfoDATA[12])), toString(asInt(gnsbtInfoDATA[13])), toString(asInt(gnsbtInfoDATA[14])), toString(asInt(gnsbtInfoDATA[15])), toString(asInt(gnsbtInfoDATA[16])), toString(asInt(gnsbtInfoDATA[17])), toString(asInt(gnsbtInfoDATA[18])), toString(asInt(gnsbtInfoDATA[19])), toString(asInt(gnsbtInfoDATA[20])), toString(asInt(gnsbtInfoDATA[21])), toString(asInt(gnsbtInfoDATA[22])), toString(asInt(gnsbtInfoDATA[23])), toString(asInt(gnsbtInfoDATA[24]))], SEP)) | |
502 | 502 | } | |
503 | 503 | ||
504 | 504 | ||
505 | 505 | ||
506 | 506 | @Callable(i) | |
507 | 507 | func gnsbtEffectiveREADONLY (userAddressStrOrEmpty) = { | |
508 | 508 | let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty, 0, 0], nil)) | |
509 | 509 | let nsbtData = asAnyList(gnsbtData[2]) | |
510 | 510 | let userFromNsbt = asInt(nsbtData[2]) | |
511 | 511 | let totalFromNsbt = asInt(nsbtData[3]) | |
512 | 512 | let userMatureFromSurf = asInt(gnsbtData[9]) | |
513 | 513 | let totalMatureFromSurf = asInt(gnsbtData[6]) | |
514 | 514 | $Tuple2(nil, makeString(["%d%d", toString((totalFromNsbt + totalMatureFromSurf)), toString((userFromNsbt + userMatureFromSurf))], SEP)) | |
515 | 515 | } | |
516 | 516 | ||
517 | 517 | ||
518 | 518 | ||
519 | 519 | @Callable(i) | |
520 | 520 | func rewardInfoREADONLY (userAddressStrOrEmpty) = { | |
521 | 521 | let rewardsData = asAnyList(invoke(gnsbtControllerContract, "gnsbtRewardsSYSREADONLY", [userAddressStrOrEmpty], nil)) | |
522 | 522 | let usdnRewards = asString(invoke(rpdContract, "unclaimedRewardsREADONLY", [userAddressStrOrEmpty], nil)) | |
523 | 523 | $Tuple2(nil, makeString_2C(["%s%s%s", asString(rewardsData[0]), asString(rewardsData[1]), usdnRewards], SEP)) | |
524 | 524 | } | |
525 | 525 | ||
526 | 526 | ||
527 | 527 | ||
528 | 528 | @Callable(i) | |
529 | 529 | func mergeNsbtREADONLY (userAddressMandatory,newAmount) = { | |
530 | 530 | let nsbtData = asAnyList(invoke(nsbtStakingContract, "nsbtStakingSYSREADONLY", [userAddressMandatory, newAmount], nil)) | |
531 | 531 | let amount0 = asInt(nsbtData[0]) | |
532 | 532 | let startHeight = if ((0 >= amount0)) | |
533 | 533 | then -1 | |
534 | 534 | else asInt(nsbtData[2]) | |
535 | 535 | let startTimestamp = toTimestamp(startHeight) | |
536 | 536 | let startHeightNew = if ((0 >= newAmount)) | |
537 | 537 | then startHeight | |
538 | 538 | else if ((0 >= amount0)) | |
539 | 539 | then height | |
540 | 540 | else { | |
541 | 541 | let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife()) | |
542 | 542 | asInt(invoke(mathContract, "mergeStakesREADONLY", [amount0, startHeight, newAmount, height, halfLife], nil)) | |
543 | 543 | } | |
544 | 544 | let startTimestampNew = toTimestamp(startHeightNew) | |
545 | 545 | $Tuple2(nil, makeString(["%d%d%d%d", toString(startHeight), toString(startTimestamp), toString(startHeightNew), toString(startTimestampNew)], SEP)) | |
546 | 546 | } | |
547 | 547 | ||
548 | 548 | ||
549 | 549 | ||
550 | 550 | @Callable(i) | |
551 | 551 | func swapLimitCalculatorREADONLY (userAddressStrOpt,limitWanted,assetIdStr) = { | |
552 | 552 | let gNsbtCurrent = if ((userAddressStrOpt == "")) | |
553 | 553 | then 0 | |
554 | 554 | else asInt(asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil))._4) | |
555 | 555 | let price = valueOrErrorMessage(getInteger(controlContract, keyPriceByAsset(assetIdStr)), ("No price for asset " + assetIdStr)) | |
556 | 556 | let isOutMulti = (assetIdStr == neutrinoAssetIdString) | |
557 | 557 | let limitWantedUsdn = if (isOutMulti) | |
558 | 558 | then limitWanted | |
559 | 559 | else convertTokenToUsd(limitWanted, price) | |
560 | 560 | let gNsbtNeeded = asInt(invoke(this, "reverseSwapLimitREADONLY", [limitWantedUsdn, isOutMulti], nil)) | |
561 | 561 | let gNsbtDelta = (gNsbtNeeded - gNsbtCurrent) | |
562 | 562 | $Tuple2(nil, makeString(["%s%s", toString(gNsbtCurrent), toString(gNsbtDelta)], SEP)) | |
563 | 563 | } | |
564 | 564 | ||
565 | 565 | ||
566 | 566 | ||
567 | 567 | @Callable(i) | |
568 | 568 | func swapInfoREADONLY (userAddressStrOrEmpty,amount,assetIdStr) = { | |
569 | 569 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
570 | 570 | let price = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
571 | 571 | let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil)) | |
572 | 572 | let limitMaxTokenInUsd = swapParamsTuple._1 | |
573 | 573 | let blcks2LmtReset = swapParamsTuple._3 | |
574 | 574 | let limitMaxUsdn = swapParamsTuple._7 | |
575 | 575 | let assetId = fromBase58String(assetIdStr) | |
576 | 576 | let basketAssets = valueOrElse(getString(neutrinoContract, basketAssetsKey()), "WAVES") | |
577 | 577 | let swapType = if (contains(basketAssets, assetIdStr)) | |
578 | 578 | then "outNeutrino" | |
579 | 579 | else if ((assetId == neutrinoAssetId)) | |
580 | 580 | then "outMulti" | |
581 | 581 | else throw(("Can't swap assetId=" + assetIdStr)) | |
582 | - | let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amount, price, assetIdStr | |
582 | + | let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amount, price, assetIdStr], nil)) | |
583 | 583 | let outNetAmount = withdrawTuple._1 | |
584 | 584 | let outSurfAmt = withdrawTuple._3 | |
585 | 585 | let inAmtToSurfPart = withdrawTuple._4 | |
586 | 586 | let outFeeAmount = withdrawTuple._6 | |
587 | 587 | let outAmtGross = withdrawTuple._7 | |
588 | 588 | let withdrawPrice = withdrawTuple._8 | |
589 | 589 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(outNetAmount), toString(outSurfAmt), toString(outFeeAmount), toString(withdrawPrice), toString(blcks2LmtReset), toString(limitMaxTokenInUsd), toString(limitMaxUsdn), toString(inAmtToSurfPart)], SEP)) | |
590 | 590 | } | |
591 | 591 | ||
592 | 592 | ||
593 | 593 | ||
594 | 594 | @Callable(i) | |
595 | 595 | func swapInfoV2READONLY (userAddressStrOrEmpty,amount,assetIdStr) = swapInfoInternal(userAddressStrOrEmpty, amount, assetIdStr, "") | |
596 | 596 | ||
597 | 597 | ||
598 | 598 | ||
599 | 599 | @Callable(i) | |
600 | 600 | func swapInfoV3READONLY (userAddressStrOrEmpty,amountIn,assetIdStrIn,assetIdStrOutOrEmpty) = swapInfoInternal(userAddressStrOrEmpty, amountIn, assetIdStrIn, assetIdStrOutOrEmpty) | |
601 | 601 | ||
602 | 602 | ||
603 | 603 | ||
604 | 604 | @Callable(i) | |
605 | 605 | func basketInfoREADONLY () = { | |
606 | 606 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
607 | 607 | let basketInfo = asString(neutrinoMetrics[nMetricBasketInfo]) | |
608 | 608 | let basket = split_4C(basketInfo, "_") | |
609 | 609 | func modify (acc,item) = { | |
610 | 610 | let parts = split(item, LISTSEP) | |
611 | 611 | let assetId = parts[0] | |
612 | 612 | let dlog6 = valueOrErrorMessage(getInteger(neutrinoContract, basketLogbDeltaKey()), "log(b, delta) key is undefined") | |
613 | 613 | let D6 = valueOrErrorMessage(getInteger(neutrinoContract, basketDKey()), "D key is undefined") | |
614 | 614 | let b6 = valueOrErrorMessage(getInteger(neutrinoContract, basketBKey()), "b key is undefined") | |
615 | 615 | let w6 = valueOrErrorMessage(getInteger(neutrinoContract, basketWeightByAssetKey(assetId)), (("Target weight for asset " + assetId) + " is undefined")) | |
616 | 616 | let p6 = ((dlog6 - w6) + parseIntValue(parts[1])) | |
617 | 617 | let d = (D6 - pow(b6, 6, p6, 6, 6, HALFUP)) | |
618 | 618 | (acc :+ makeString(((parts :+ toString(w6)) :+ toString(d)), LISTSEP)) | |
619 | 619 | } | |
620 | 620 | ||
621 | 621 | let b = { | |
622 | 622 | let $l = basket | |
623 | 623 | let $s = size($l) | |
624 | 624 | let $acc0 = nil | |
625 | 625 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
626 | 626 | then $a | |
627 | 627 | else modify($a, $l[$i]) | |
628 | 628 | ||
629 | 629 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
630 | 630 | then $a | |
631 | 631 | else throw("List size exceeds 10") | |
632 | 632 | ||
633 | 633 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
634 | 634 | } | |
635 | 635 | $Tuple2(nil, ("%s__" + makeString_2C(b, "_"))) | |
636 | 636 | } | |
637 | 637 | ||
638 | 638 | ||
639 | 639 | ||
640 | 640 | @Callable(i) | |
641 | 641 | func usdnStakingAprREADONLY (days) = { | |
642 | 642 | let tmpDays = 1 | |
643 | 643 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil)) | |
644 | 644 | let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice]) | |
645 | 645 | let wavesIncome = (0 * MULT8) | |
646 | 646 | let incomeForPeriod = fraction(wavesIncome, currentPrice, MULT8) | |
647 | 647 | let apr = calcApr(rpdContract, tmpDays, incomeForPeriod, MULT6) | |
648 | 648 | $Tuple2(nil, ("%d__" + toString(apr))) | |
649 | 649 | } | |
650 | 650 | ||
651 | 651 | ||
652 | 652 | ||
653 | 653 | @Callable(i) | |
654 | 654 | func surfStakingAprREADONLY (days) = { | |
655 | 655 | let tmpDays = 3 | |
656 | 656 | let incomeForPeriod = calcUsdnIncomeForPeriod(surfStakingContract, tmpDays) | |
657 | 657 | let surfPriceToUsdnX6 = 86400 | |
658 | 658 | let apr = calcApr(surfStakingContract, tmpDays, incomeForPeriod, surfPriceToUsdnX6) | |
659 | 659 | $Tuple2(nil, ("%d__" + toString(apr))) | |
660 | 660 | } | |
661 | 661 | ||
662 | 662 | ||
663 | 663 | ||
664 | 664 | @Callable(i) | |
665 | 665 | func surfStakingAprV2READONLY (days,surfUsdnPriceX6) = { | |
666 | 666 | let tmpDays = 3 | |
667 | 667 | let incomeForPeriod = calcUsdnIncomeForPeriod(surfStakingContract, tmpDays) | |
668 | 668 | let apr = calcApr(surfStakingContract, tmpDays, incomeForPeriod, surfUsdnPriceX6) | |
669 | 669 | $Tuple2(nil, ("%d__" + toString(apr))) | |
670 | 670 | } | |
671 | 671 | ||
672 | 672 | ||
673 | 673 | ||
674 | 674 | @Callable(i) | |
675 | 675 | func nsbtStakingAprREADONLY (days) = { | |
676 | 676 | let tmpDays = 3 | |
677 | 677 | let nsbtPriceToUsdnX6 = 8000000 | |
678 | 678 | let incomeForPeriod = calcUsdnIncomeForPeriod(nsbtStakingContract, tmpDays) | |
679 | 679 | let apr = calcApr(nsbtStakingContract, tmpDays, incomeForPeriod, nsbtPriceToUsdnX6) | |
680 | 680 | $Tuple2(nil, ("%d__" + toString(apr))) | |
681 | 681 | } | |
682 | 682 | ||
683 | 683 | ||
684 | 684 | ||
685 | 685 | @Callable(i) | |
686 | 686 | func nsbtStakingAprV2READONLY (days,nsbtUsdnPriceX6) = { | |
687 | 687 | let tmpDays = 3 | |
688 | 688 | let incomeForPeriod = calcUsdnIncomeForPeriod(nsbtStakingContract, tmpDays) | |
689 | 689 | let apr = calcApr(nsbtStakingContract, tmpDays, incomeForPeriod, nsbtUsdnPriceX6) | |
690 | 690 | $Tuple2(nil, ("%d__" + toString(apr))) | |
691 | 691 | } | |
692 | 692 | ||
693 | 693 |
github/deemru/w8io/169f3d6 105.22 ms ◑