tx · 6bTZzmbsMRhpbhnkQDASWPq1FvQvJwEgmGGnTMyFcrk8

3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh:  -0.02400000 Waves

2023.02.13 10:49 [2447555] smart account 3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh > SELF 0.00000000 Waves

{ "type": 13, "id": "6bTZzmbsMRhpbhnkQDASWPq1FvQvJwEgmGGnTMyFcrk8", "fee": 2400000, "feeAssetId": null, "timestamp": 1676274575834, "version": 2, "chainId": 84, "sender": "3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh", "senderPublicKey": "HiTi1JT7GQRqLNxg4yZhD1mV42y1Mv2AYvRx92JQRbwX", "proofs": [ "CNLg9cgpLwxWkkbMDDtHCVJV43X1ppyo44n8hreMG6sFQpixtSyLL4mWdy85WVYbWjgcmg5kJEPxp3kdLKvLn9b" ], "script": "base64:BgJYCAISBAoCAQQSBQoDCAEBEgUKAwgBARIDCgEIEgMKAQgSBAoCCAESBQoDCAEIEgUKAwgBCBIFCgMIAQgSABIDCgEBEgMKAQESBAoCAQESAwoBARIECgIBAW8ABkVVTEVSOADWic+BAQAFTVVMVDYAwIQ9AAZNVUxUWDYJALYCAQDAhD0ABU1VTFQ4AIDC1y8ABk1VTFRYOAkAtgIBAIDC1y8AB01VTFRYMTAJALYCAQCAyK+gJQAGTVVMVDEyAICglKWNHQAHTVVMVFgxNgkAtgIBAICAhP6m3uERAAZNVUxUMTgJALYCAQCAgJC7utat8A0AA1NFUAICX18AEURFRkFVTFRTV0FQRkVFTjJXAIgnABFERUZBVUxUU1dBUEZFRVcyTgCgnAEAC0JSUFJPVEVDVEVEAKCNBgAHV0FWRVNJRAkA2QQBAgVXQVZFUwAJREFZTUlMTElTAIC4mSkBEmtleU5ldXRyaW5vQXNzZXRJZAACEW5ldXRyaW5vX2Fzc2V0X2lkAQ5rZXlOc2J0QXNzZXRJZAACDWJvbmRfYXNzZXRfaWQBDmtleVN1cmZBc3NldElkAAINc3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XlzAAMED2luY29tZUZvclBlcmlvZAkBF2NhbGNVc2RuSW5jb21lRm9yUGVyaW9kAgUTc3VyZlN0YWtpbmdDb250cmFjdAUHdG1wRGF5cwQDYXByCQEHY2FsY0FwcgQFE3N1cmZTdGFraW5nQ29udHJhY3QFB3RtcERheXMFD2luY29tZUZvclBlcmlvZAUPc3VyZlVzZG5QcmljZVg2CQCUCgIFA25pbAkArAICAgQlZF9fCQCkAwEFA2FwcgFpARZuc2J0U3Rha2luZ0FwclJFQURPTkxZAQRkYXlzBAd0bXBEYXlzAAMEEW5zYnRQcmljZVRvVXNkblg2AICk6AMED2luY29tZUZvclBlcmlvZAkBF2NhbGNVc2RuSW5jb21lRm9yUGVyaW9kAgUTbnNidFN0YWtpbmdDb250cmFjdAUHdG1wRGF5cwQDYXByCQEHY2FsY0FwcgQFE25zYnRTdGFraW5nQ29udHJhY3QFB3RtcERheXMFD2luY29tZUZvclBlcmlvZAURbnNidFByaWNlVG9Vc2RuWDYJAJQKAgUDbmlsCQCsAgICBCVkX18JAKQDAQUDYXByAWkBGG5zYnRTdGFraW5nQXByVjJSRUFET05MWQIEZGF5cw9uc2J0VXNkblByaWNlWDYEB3RtcERheXMAAwQPaW5jb21lRm9yUGVyaW9kCQEXY2FsY1VzZG5JbmNvbWVGb3JQZXJpb2QCBRNuc2J0U3Rha2luZ0NvbnRyYWN0BQd0bXBEYXlzBANhcHIJAQdjYWxjQXByBAUTbnNidFN0YWtpbmdDb250cmFjdAUHdG1wRGF5cwUPaW5jb21lRm9yUGVyaW9kBQ9uc2J0VXNkblByaWNlWDYJAJQKAgUDbmlsCQCsAgICBCVkX18JAKQDAQUDYXByABMfthU=", "height": 2447555, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9WUGuchhMLgrzNpmgPDNhNTdtWcbxPwXKTnSg3MJ8nFh Next: GWpb91ZsRwiFqQLF3rWm2fPY9JjjZowahupDCSPYYkPp Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let EULER8 = 271828182
55
66 let MULT6 = 1000000
77
88 let MULTX6 = toBigInt(1000000)
99
1010 let MULT8 = 100000000
1111
1212 let MULTX8 = toBigInt(100000000)
1313
1414 let MULTX10 = toBigInt(10000000000)
1515
1616 let MULT12 = 1000000000000
1717
1818 let MULTX16 = toBigInt(10000000000000000)
1919
2020 let MULT18 = toBigInt(1000000000000000000)
2121
2222 let SEP = "__"
2323
2424 let DEFAULTSWAPFEEN2W = 5000
2525
2626 let DEFAULTSWAPFEEW2N = 20000
2727
2828 let BRPROTECTED = 100000
2929
3030 let WAVESID = fromBase58String("WAVES")
3131
3232 let DAYMILLIS = 86400000
3333
3434 func keyNeutrinoAssetId () = "neutrino_asset_id"
3535
3636
3737 func keyNsbtAssetId () = "bond_asset_id"
3838
3939
4040 func keySurfAssetId () = "surf_asset_id"
4141
4242
4343 func keySwapAmountAParam () = "%s%s__config__swapAParam"
4444
4545
4646 func keySwapAmountBParam () = "%s%s__config__swapBParam"
4747
4848
4949 func keyUsdnSwapAmountAParam () = "%s%s__config__usdnSwapAParam"
5050
5151
5252 func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam"
5353
5454
5555 func keyNsbtLockContract () = "%s__nsbtLockContract"
5656
5757
5858 func keyMathContract () = "%s__mathContract"
5959
6060
6161 func basketAssetsKey () = "%s%s__common__basketAssets"
6262
6363
6464 func keyPrice () = "price"
6565
6666
6767 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
6868
6969
7070 func keyHalfLife () = "%s__halfLife"
7171
7272
7373 func keyMinLockAmount () = "%s__minLockAmount"
7474
7575
7676 func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy"
7777
7878
7979 func keyMinNsbtSell () = "min_nsbt_sell"
8080
8181
8282 func keyStatsDepositAmtByDay (timestamp) = makeString(["%s%s%d", "stats", "depositAmtByDay", toString(timestamp)], SEP)
8383
8484
8585 func toStartOfDay (timestamp) = ((timestamp / DAYMILLIS) * DAYMILLIS)
8686
8787
8888 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
8989
9090
9191 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
9292
9393
9494 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
9595
9696
9797 func getIntOrElse (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
9898
9999
100100 func getStrOrElse (address,key,defaultVal) = valueOrElse(getString(address, key), defaultVal)
101101
102102
103103 func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price)
104104
105105
106106 func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8)
107107
108108
109109 func asAnyList (val) = match val {
110110 case valAnyList: List[Any] =>
111111 valAnyList
112112 case _ =>
113113 throw("fail to cast into List[Any]")
114114 }
115115
116116
117117 func asInt (val) = match val {
118118 case valInt: Int =>
119119 valInt
120120 case _ =>
121121 throw("fail to cast into Int")
122122 }
123123
124124
125125 func asString (val) = match val {
126126 case valStr: String =>
127127 valStr
128128 case _ =>
129129 throw("fail to cast into String")
130130 }
131131
132132
133133 func asTuple2Ints (val) = match val {
134134 case v: (Int, Int) =>
135135 v
136136 case _ =>
137137 throw("fail to cast into Tuple2 ints")
138138 }
139139
140140
141141 func asSwapParamsSTRUCT (val) = match val {
142142 case struct: (Int, Int, Int, Int, Int, Int, Int) =>
143143 struct
144144 case _ =>
145145 throw("fail to cast into SwapParamsSTRUCT")
146146 }
147147
148148
149149 func asWithdrawResultSTRUCT (val) = match val {
150150 case struct: (Int, Unit, Int, Int, Int, Int, Int, Int, String)|(Int, ByteVector, Int, Int, Int, Int, Int, Int, String) =>
151151 struct
152152 case _ =>
153153 throw("fail to cast into WithdrawResult")
154154 }
155155
156156
157157 func toTimestamp (start) = if ((0 > start))
158158 then -1
159159 else match blockInfoByHeight(start) {
160160 case block: BlockInfo =>
161161 block.timestamp
162162 case _ =>
163163 -1
164164 }
165165
166166
167167 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
168168
169169
170170 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
171171
172172
173173 let nMetricIdxPrice = 0
174174
175175 let nMetricIdxUsdnLockedBalance = 1
176176
177177 let nMetricIdxWavesLockedBalance = 2
178178
179179 let nMetricIdxReserve = 3
180180
181181 let nMetricIdxReserveInUsdn = 4
182182
183183 let nMetricIdxUsdnSupply = 5
184184
185185 let nMetricIdxSurplus = 6
186186
187187 let nMetricIdxSurplusPercent = 7
188188
189189 let nMetricIdxBR = 8
190190
191191 let nMetricIdxNsbtSupply = 9
192192
193193 let nMetricIdxMaxNsbtSupply = 10
194194
195195 let nMetricIdxSurfSupply = 11
196196
197197 let nMetricUsdnUsdtPeg = 12
198198
199199 let nMetricCurrentPriceAdj = 13
200200
201201 let nMetricBasketInfo = 14
202202
203203 let nMetricWeightedPrice = 15
204204
205205 let nMetricTotalReservesUsd = 16
206206
207207 let IdxControlCfgNeutrinoDapp = 1
208208
209209 let IdxControlCfgAuctionDapp = 2
210210
211211 let IdxControlCfgRpdDapp = 3
212212
213213 let IdxControlCfgMathDapp = 4
214214
215215 let IdxControlCfgLiquidationDapp = 5
216216
217217 let IdxControlCfgRestDapp = 6
218218
219219 let IdxControlCfgNodeRegistryDapp = 7
220220
221221 let IdxControlCfgNsbtStakingDapp = 8
222222
223223 let IdxControlCfgMediatorDapp = 9
224224
225225 let IdxControlCfgSurfStakingDapp = 10
226226
227227 let IdxControlCfgGnsbtControllerDapp = 11
228228
229229 let bFuncIdxSurf = 0
230230
231231 let bFuncIdxWaves = 1
232232
233233 let bFuncIdxUsdn = 2
234234
235235 let bFuncIdxReserveStart = 3
236236
237237 let bFuncIdxSupplyStart = 4
238238
239239 let bFuncIdxBRStart = 5
240240
241241 let bFuncIdxReserveEnd = 6
242242
243243 let bFuncIdxSupplyEnd = 7
244244
245245 let bFuncIdxBREnd = 8
246246
247247 let bFuncIdxRest = 9
248248
249249 let bFuncIdxWavesPrice = 10
250250
251251 func keyControlAddress () = "%s%s__config__controlAddress"
252252
253253
254254 func keyControlCfg () = "%s__controlConfig"
255255
256256
257257 func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP)
258258
259259
260260 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
261261
262262
263263 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
264264
265265 let controlCfg = readControlCfgOrFail(controlContract)
266266
267267 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
268268
269269 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
270270
271271 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
272272
273273 let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp)
274274
275275 let rpdContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp)
276276
277277 let nsbtStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgNsbtStakingDapp)
278278
279279 let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp)
280280
281281 let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp)
282282
283283 let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
284284
285285 let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
286286
287287 let nsbtAssetIdStr = getStringValue(neutrinoContract, keyNsbtAssetId())
288288
289289 let nsbtAssetId = fromBase58String(nsbtAssetIdStr)
290290
291291 let surfAssetIdStr = getStringValue(auctionContract, keySurfAssetId())
292292
293293 let surfAssetId = fromBase58String(surfAssetIdStr)
294294
295295 func readUsdnIncomeForDay (stakingAcc,startOfDayTimestamp,neutrinoMetrics) = {
296296 let amtByDayKEY = keyStatsDepositAmtByDay(startOfDayTimestamp)
297297 let incomeStr = getStrOrElse(stakingAcc, amtByDayKEY, "%s%s__0__0")
298298 let incomeArray = split(incomeStr, SEP)
299299 let wavesAmt = parseIntValue(incomeArray[1])
300300 let usdnAmt = parseIntValue(incomeArray[2])
301301 let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice])
302302 let wavesAsUsdnAmt = fraction(wavesAmt, currentPrice, MULT8)
303303 (wavesAsUsdnAmt + usdnAmt)
304304 }
305305
306306
307307 func calcUsdnIncomeForPeriod (stakingAcc,days) = {
308308 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
309309 let currStartOfDay = toStartOfDay(lastBlock.timestamp)
310310 let startTimestamp = (currStartOfDay - (DAYMILLIS * (days + 1)))
311311 let endTimestamp = (currStartOfDay - DAYMILLIS)
312312 let startUsdnAmtTMP = readUsdnIncomeForDay(stakingAcc, startTimestamp, neutrinoMetrics)
313313 let endUsdnAmt = readUsdnIncomeForDay(stakingAcc, endTimestamp, neutrinoMetrics)
314314 let startUsdnAmt = if ((startUsdnAmtTMP == 0))
315315 then endUsdnAmt
316316 else startUsdnAmtTMP
317317 (endUsdnAmt - startUsdnAmt)
318318 }
319319
320320
321321 func calcApr (stakingAcc,periodInDays,incomeForPeriod,stakingAssetPriceToUsdnX6) = {
322322 let totalStaked = getIntOrElse(stakingAcc, "%s%s__stats__activeTotalLocked", 1)
323323 let totalStakedInUsdn = fraction(totalStaked, stakingAssetPriceToUsdnX6, MULT6)
324324 if ((0 > incomeForPeriod))
325325 then 0
326326 else fraction((incomeForPeriod * MULT6), 365, (totalStakedInUsdn * periodInDays))
327327 }
328328
329329
330330 @Callable(i)
331331 func reverseSwapLimitREADONLY (lim,isWavesSwap) = {
332332 let BR = asInt(asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))[nMetricIdxBR])
333333 let gNsbt = if ((0 >= lim))
334334 then 0
335335 else {
336336 let aParamX8 = toBigInt(getIntOrFail(mathContract, if (isWavesSwap)
337337 then keySwapAmountAParam()
338338 else keyUsdnSwapAmountAParam()))
339339 let bParamX16 = toBigInt(getIntOrFail(mathContract, if (isWavesSwap)
340340 then keySwapAmountBParam()
341341 else keyUsdnSwapAmountBParam()))
342342 let limDivAX8 = if (isWavesSwap)
343343 then fraction(toBigInt(lim), MULTX10, aParamX8)
344344 else fraction(fraction(toBigInt(lim), MULTX10, aParamX8), MULTX6, toBigInt(BR))
345345 let revBX16 = fraction(MULTX16, MULTX16, bParamX16)
346346 toInt(pow(limDivAX8, 8, revBX16, 16, 6, CEILING))
347347 }
348348 $Tuple2(nil, gNsbt)
349349 }
350350
351351
352352
353353 @Callable(i)
354354 func gnsbtInfoINTERNAL (userAddressStrOrEmpty,additionalNsbtToStakeOrZero,additionalSurfToStakeOrZero) = {
355355 let userAddressOrThis = if ((userAddressStrOrEmpty != ""))
356356 then addressFromStringValue(userAddressStrOrEmpty)
357357 else this
358358 let currentPrice = getIntegerValue(controlContract, keyPrice())
359359 let gnsbtFromNsbtDiff = additionalNsbtToStakeOrZero
360360 let gnsbtFromSurfDiff = asInt(invoke(surfStakingContract, "gnsbtFromSurfSYSREADONLY", [additionalSurfToStakeOrZero], nil))
361361 let gNsbtDiff = (gnsbtFromNsbtDiff + gnsbtFromSurfDiff)
362362 let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil))
363363 let blcks2LmtReset = swapParamsTuple._3
364364 let gnsbtAmt = swapParamsTuple._4
365365 let gnsbtAmtTotal = swapParamsTuple._5
366366 let limitMaxWaves = swapParamsTuple._6
367367 let limitMaxUsdn = swapParamsTuple._7
368368 let swapParamsTupleNEW = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, gNsbtDiff], nil))
369369 let blcks2LmtResetNEW = swapParamsTupleNEW._3
370370 let gnsbtAmtNEW = swapParamsTupleNEW._4
371371 let gnsbtAmtTotalNEW = swapParamsTupleNEW._5
372372 let limitMaxWavesNEW = swapParamsTupleNEW._6
373373 let limitMaxUsdnNEW = swapParamsTupleNEW._7
374374 let nsbtBalance = if ((userAddressStrOrEmpty != ""))
375375 then assetBalance(userAddressOrThis, nsbtAssetId)
376376 else 0
377377 let surfBalance = if ((userAddressStrOrEmpty != ""))
378378 then assetBalance(userAddressOrThis, surfAssetId)
379379 else 0
380380 let nsbtBalanceDiff = if ((additionalNsbtToStakeOrZero >= 0))
381381 then additionalNsbtToStakeOrZero
382382 else {
383383 let nsbtUnstakingData = asAnyList(invoke(nsbtStakingContract, "nsbtUnstakingSYSREADONLY", [userAddressStrOrEmpty, (-1 * additionalNsbtToStakeOrZero)], nil))
384384 let nsbtReceiveAmount = asInt(nsbtUnstakingData[2])
385385 let result = -(nsbtReceiveAmount)
386386 result
387387 }
388388 let nsbtBalanceNew = (nsbtBalance - nsbtBalanceDiff)
389389 let surfBalanceNew = (surfBalance - additionalSurfToStakeOrZero)
390390 let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty, additionalNsbtToStakeOrZero, additionalSurfToStakeOrZero], nil))
391391 let gnsbtUser = asInt(gnsbtData[0])
392392 let gnsbtTotal = asInt(gnsbtData[1])
393393 let nsbtData = asAnyList(gnsbtData[2])
394394 let surfData = asAnyList(gnsbtData[3])
395395 let vpEffectiveHeight = asInt(gnsbtData[4])
396396 let vpEffectiveHeightNEW = asInt(gnsbtData[5])
397397 let gnsbtAmtFromNsbt = asInt(nsbtData[2])
398398 let gnsbtAmtFromSurf = asInt(surfData[2])
399399 let gnsbtAmtFromNsbtNEW = (gnsbtAmtFromNsbt + gnsbtFromNsbtDiff)
400400 let gnsbtAmtFromSurfNEW = (gnsbtAmtFromSurf + gnsbtFromSurfDiff)
401401 let gnsbtFromNsbtTotal = asInt(nsbtData[3])
402402 let gnsbtFromSurfTotal = asInt(surfData[3])
403403 let gnsbtFromSurfActiveTotal = 0
404404 let gnsbtFromSurfFrozenTotal = gnsbtFromSurfTotal
405405 let gnsbtFromNsbtTotalNEW = (gnsbtFromNsbtTotal + gnsbtFromNsbtDiff)
406406 let gnsbtFromSurfTotalNEW = (gnsbtFromSurfTotal + gnsbtFromSurfDiff)
407407 let gnsbtFromSurfFrozenTotalNEW = gnsbtFromSurfTotalNEW
408408 let votingPower = fraction(gnsbtAmtFromNsbt, MULT8, (gnsbtFromNsbtTotal + gnsbtFromSurfActiveTotal))
409409 let votingPowerNew = fraction(gnsbtAmtFromNsbtNEW, MULT8, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfActiveTotal))
410410 let votingPowerMax = fraction((gnsbtAmtFromNsbt + gnsbtAmtFromSurf), MULT8, ((gnsbtFromNsbtTotal + gnsbtFromSurfActiveTotal) + gnsbtFromSurfFrozenTotal))
411411 let votingPowerMaxNew = fraction((gnsbtAmtFromNsbtNEW + gnsbtAmtFromSurfNEW), MULT8, ((gnsbtFromNsbtTotalNEW + gnsbtFromSurfActiveTotal) + gnsbtFromSurfFrozenTotalNEW))
412412 let votingPowerEta = if ((vpEffectiveHeight == 0))
413413 then height
414414 else vpEffectiveHeight
415415 let votingPowerEtaNew = if ((vpEffectiveHeightNEW == 0))
416416 then height
417417 else vpEffectiveHeightNEW
418418 $Tuple2(nil, [0, nsbtBalance, surfBalance, nsbtBalanceNew, surfBalanceNew, gnsbtAmtFromNsbt, gnsbtAmtFromSurf, gnsbtAmtFromNsbtNEW, gnsbtAmtFromSurfNEW, gnsbtFromNsbtTotal, gnsbtFromSurfTotal, gnsbtFromNsbtTotalNEW, gnsbtFromSurfTotalNEW, limitMaxUsdn, limitMaxWaves, limitMaxUsdnNEW, limitMaxWavesNEW, blcks2LmtReset, blcks2LmtResetNEW, votingPower, votingPowerNew, votingPowerMax, votingPowerMaxNew, votingPowerEta, votingPowerEtaNew])
419419 }
420420
421421
422422
423423 @Callable(i)
424424 func gnsbtInfoREADONLY (userAddressStrOrEmpty,additionalNsbtToStakeOrZero,additionalSurfToStakeOrZero) = {
425425 let gnsbtInfoDATA = asAnyList(invoke(this, "gnsbtInfoINTERNAL", [userAddressStrOrEmpty, additionalNsbtToStakeOrZero, additionalSurfToStakeOrZero], nil))
426426 $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))
427427 }
428428
429429
430430
431431 @Callable(i)
432432 func gnsbtEffectiveREADONLY (userAddressStrOrEmpty) = {
433433 let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty, 0, 0], nil))
434434 let nsbtData = asAnyList(gnsbtData[2])
435435 let userFromNsbt = asInt(nsbtData[2])
436436 let totalFromNsbt = asInt(nsbtData[3])
437437 let userMatureFromSurf = asInt(gnsbtData[9])
438438 let totalMatureFromSurf = asInt(gnsbtData[6])
439439 $Tuple2(nil, makeString(["%d%d", toString((totalFromNsbt + totalMatureFromSurf)), toString((userFromNsbt + userMatureFromSurf))], SEP))
440440 }
441441
442442
443443
444444 @Callable(i)
445445 func rewardInfoREADONLY (userAddressStrOrEmpty) = {
446446 let rewardsData = asAnyList(invoke(gnsbtControllerContract, "gnsbtRewardsSYSREADONLY", [userAddressStrOrEmpty], nil))
447447 let usdnRewards = asString(invoke(rpdContract, "unclaimedRewardsREADONLY", [userAddressStrOrEmpty], nil))
448448 $Tuple2(nil, makeString(["%s%s%s", asString(rewardsData[0]), asString(rewardsData[1]), usdnRewards], SEP))
449449 }
450450
451451
452452
453453 @Callable(i)
454454 func mergeNsbtREADONLY (userAddressMandatory,newAmount) = {
455455 let nsbtData = asAnyList(invoke(nsbtStakingContract, "nsbtStakingSYSREADONLY", [userAddressMandatory, newAmount], nil))
456456 let amount0 = asInt(nsbtData[0])
457457 let startHeight = if ((0 >= amount0))
458458 then -1
459459 else asInt(nsbtData[2])
460460 let startTimestamp = toTimestamp(startHeight)
461461 let startHeightNew = if ((0 >= newAmount))
462462 then startHeight
463463 else if ((0 >= amount0))
464464 then height
465465 else {
466466 let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
467467 asInt(invoke(mathContract, "mergeStakesREADONLY", [amount0, startHeight, newAmount, height, halfLife], nil))
468468 }
469469 let startTimestampNew = toTimestamp(startHeightNew)
470470 $Tuple2(nil, makeString(["%d%d%d%d", toString(startHeight), toString(startTimestamp), toString(startHeightNew), toString(startTimestampNew)], SEP))
471471 }
472472
473473
474474
475475 @Callable(i)
476476 func swapLimitCalculatorREADONLY (userAddressStrOpt,limitWanted,assetIdStr) = {
477477 let gNsbtCurrent = if ((userAddressStrOpt == ""))
478478 then 0
479479 else asInt(asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil))._4)
480480 let limitWantedUsdn = if ((assetIdStr == "WAVES"))
481481 then convertWavesToNeutrino(limitWanted, getIntegerValue(controlContract, keyPrice()))
482482 else limitWanted
483483 let gNsbtNeeded = asInt(invoke(this, "reverseSwapLimitREADONLY", [limitWantedUsdn, (assetIdStr == "WAVES")], nil))
484484 let gNsbtDelta = (gNsbtNeeded - gNsbtCurrent)
485485 $Tuple2(nil, makeString(["%s%s", toString(gNsbtCurrent), toString(gNsbtDelta)], SEP))
486486 }
487487
488488
489489
490490 @Callable(i)
491491 func swapInfoREADONLY (userAddressStrOrEmpty,amount,assetIdStr) = {
492492 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
493493 let price = asInt(neutrinoMetrics[nMetricIdxPrice])
494494 let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil))
495495 let blcks2LmtReset = swapParamsTuple._3
496496 let limitMaxWaves = swapParamsTuple._6
497497 let limitMaxUsdn = swapParamsTuple._7
498498 let assetId = fromBase58String(assetIdStr)
499499 let basketAssets = valueOrElse(getString(neutrinoContract, basketAssetsKey()), "WAVES")
500500 let swapType = if (contains(basketAssets, assetIdStr))
501501 then "outNeutrino"
502502 else if ((assetId == neutrinoAssetId))
503503 then "outMulti"
504504 else throw(("Can't swap assetId=" + assetIdStr))
505505 let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amount, price, assetIdStr], nil))
506506 let outNetAmount = withdrawTuple._1
507507 let outAssetId = withdrawTuple._2
508508 let outSurfAmt = withdrawTuple._3
509509 let inAmtToSurfPart = withdrawTuple._4
510510 let unleaseAmt = withdrawTuple._5
511511 let outFeeAmount = withdrawTuple._6
512512 let outAmtGross = withdrawTuple._7
513513 let withdrawPrice = withdrawTuple._8
514514 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(outNetAmount), toString(outSurfAmt), toString(outFeeAmount), toString(withdrawPrice), toString(blcks2LmtReset), toString(limitMaxWaves), toString(limitMaxUsdn), toString(inAmtToSurfPart)], SEP))
515515 }
516516
517517
518518
519519 @Callable(i)
520520 func swapInfoV2READONLY (userAddressStrOrEmpty,amount,assetIdStr) = {
521521 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
522522 let price = asInt(neutrinoMetrics[nMetricIdxPrice])
523523 let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil))
524524 let blcks2LmtReset = swapParamsTuple._3
525525 let limitMaxWaves = swapParamsTuple._6
526526 let limitMaxUsdn = swapParamsTuple._7
527527 let assetId = fromBase58String(assetIdStr)
528528 let basketAssets = valueOrElse(getString(neutrinoContract, basketAssetsKey()), "WAVES")
529529 let swapType = if (contains(basketAssets, assetIdStr))
530530 then "outNeutrino"
531531 else if ((assetId == neutrinoAssetId))
532532 then "outMulti"
533533 else throw(("Can't swap assetId=" + assetIdStr))
534534 let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amount, price, assetIdStr], nil))
535535 let outNetAmount = withdrawTuple._1
536536 let outAssetId = withdrawTuple._2
537537 let outSurfAmt = withdrawTuple._3
538538 let inAmtToSurfPart = withdrawTuple._4
539539 let unleaseAmt = withdrawTuple._5
540540 let outFeeAmount = withdrawTuple._6
541541 let outAmtGross = withdrawTuple._7
542542 let withdrawPrice = withdrawTuple._8
543543 let withdrawBasket = withdrawTuple._9
544544 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%s", toString(outNetAmount), toString(outSurfAmt), toString(outFeeAmount), toString(withdrawPrice), toString(blcks2LmtReset), toString(limitMaxWaves), toString(limitMaxUsdn), toString(inAmtToSurfPart), withdrawBasket], SEP))
545545 }
546546
547547
548548
549549 @Callable(i)
550550 func basketInfoREADONLY () = {
551551 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
552552 let basketInfo = asString(neutrinoMetrics[nMetricBasketInfo])
553553 $Tuple2(nil, makeString(["%s", basketInfo], SEP))
554554 }
555555
556556
557557
558558 @Callable(i)
559559 func usdnStakingAprREADONLY (days) = {
560560 let tmpDays = 1
561561 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
562562 let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice])
563563 let wavesIncome = (0 * MULT8)
564564 let incomeForPeriod = fraction(wavesIncome, currentPrice, MULT8)
565565 let apr = calcApr(rpdContract, tmpDays, incomeForPeriod, MULT6)
566566 $Tuple2(nil, ("%d__" + toString(apr)))
567567 }
568568
569569
570570
571571 @Callable(i)
572572 func surfStakingAprREADONLY (days) = {
573573 let tmpDays = 3
574574 let incomeForPeriod = calcUsdnIncomeForPeriod(surfStakingContract, tmpDays)
575575 let surfPriceToUsdnX6 = 86400
576576 let apr = calcApr(surfStakingContract, tmpDays, incomeForPeriod, surfPriceToUsdnX6)
577577 $Tuple2(nil, ("%d__" + toString(apr)))
578578 }
579579
580580
581581
582582 @Callable(i)
583583 func surfStakingAprV2READONLY (days,surfUsdnPriceX6) = {
584584 let tmpDays = 3
585585 let incomeForPeriod = calcUsdnIncomeForPeriod(surfStakingContract, tmpDays)
586586 let apr = calcApr(surfStakingContract, tmpDays, incomeForPeriod, surfUsdnPriceX6)
587587 $Tuple2(nil, ("%d__" + toString(apr)))
588588 }
589589
590590
591591
592592 @Callable(i)
593593 func nsbtStakingAprREADONLY (days) = {
594594 let tmpDays = 3
595595 let nsbtPriceToUsdnX6 = 8000000
596596 let incomeForPeriod = calcUsdnIncomeForPeriod(nsbtStakingContract, tmpDays)
597597 let apr = calcApr(nsbtStakingContract, tmpDays, incomeForPeriod, nsbtPriceToUsdnX6)
598598 $Tuple2(nil, ("%d__" + toString(apr)))
599599 }
600600
601601
602602
603603 @Callable(i)
604604 func nsbtStakingAprV2READONLY (days,nsbtUsdnPriceX6) = {
605605 let tmpDays = 3
606606 let incomeForPeriod = calcUsdnIncomeForPeriod(nsbtStakingContract, tmpDays)
607607 let apr = calcApr(nsbtStakingContract, tmpDays, incomeForPeriod, nsbtUsdnPriceX6)
608608 $Tuple2(nil, ("%d__" + toString(apr)))
609609 }
610610
611611

github/deemru/w8io/026f985 
47.47 ms