tx · 5FdSS9RqcRhx5ng65ePpcAARKSu7MER8U9nr7sFqKN1E

3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh:  -0.02200000 Waves

2023.01.07 12:05 [2394331] smart account 3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh > SELF 0.00000000 Waves

{ "type": 13, "id": "5FdSS9RqcRhx5ng65ePpcAARKSu7MER8U9nr7sFqKN1E", "fee": 2200000, "feeAssetId": null, "timestamp": 1673082350284, "version": 2, "chainId": 84, "sender": "3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh", "senderPublicKey": "HiTi1JT7GQRqLNxg4yZhD1mV42y1Mv2AYvRx92JQRbwX", "proofs": [ "5pBqy8Qzt1ze7qfkHnnerWarF8x25eQpUeWAXzmvmur6nqbdDLdcuYFZWToaC4YjqcWuaBZzwVCbNsU1mfEFoMzW" ], "script": "base64:BgJPCAISBAoCAQQSBQoDCAEBEgUKAwgBARIDCgEIEgMKAQgSBAoCCAESBQoDCAEIEgUKAwgBCBIDCgEBEgMKAQESBAoCAQESAwoBARIECgIBAXIABkVVTEVSOADWic+BAQAFTVVMVDYAwIQ9AAZNVUxUWDYJALYCAQDAhD0ABU1VTFQ4AIDC1y8ABk1VTFRYOAkAtgIBAIDC1y8AB01VTFRYMTAJALYCAQCAyK+gJQAGTVVMVDEyAICglKWNHQAHTVVMVFgxNgkAtgIBAICAhP6m3uERAAZNVUxUMTgJALYCAQCAgJC7utat8A0AA1NFUAICX18AEURFRkFVTFRTV0FQRkVFTjJXAIgnABFERUZBVUxUU1dBUEZFRVcyTgCgnAEAC0JSUFJPVEVDVEVEAKCNBgAHV0FWRVNJRAkA2QQBAgVXQVZFUwAJREFZTUlMTElTAIC4mSkBEmtleU5ldXRyaW5vQXNzZXRJZAACEW5ldXRyaW5vX2Fzc2V0X2lkAQ5rZXlOc2J0QXNzZXRJZAACDWJvbmRfYXNzZXRfaWQBDmtleVN1cmZBc3NldElkAAINc3VyZl9hc3NldF9pZ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applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EgKEtT2Gva2Fvg7pqTBdUtNF6iMc71HH1ZXZgyZg28Zq Next: C6B1me3ckcGDpGuc2g2E6HnqunrnMsdN8bCpepNqm1Di Diff:
OldNewDifferences
171171
172172
173173 func asWithdrawResultSTRUCT (val) = match val {
174- case struct: (Int, Unit, Int, Int, Int, Int, Int)|(Int, ByteVector, Int, Int, Int, Int, Int) =>
174+ case struct: (Int, Unit, Int, Int, Int, Int, Int, Int)|(Int, ByteVector, Int, Int, Int, Int, Int, Int) =>
175175 struct
176176 case _ =>
177177 throw("fail to cast into WithdrawResult")
323323 let currStartOfDay = toStartOfDay(lastBlock.timestamp)
324324 let startTimestamp = (currStartOfDay - (DAYMILLIS * (days + 1)))
325325 let endTimestamp = (currStartOfDay - DAYMILLIS)
326- let startUsdnAmt = readUsdnIncomeForDay(stakingAcc, startTimestamp, neutrinoMetrics)
326+ let startUsdnAmtTMP = readUsdnIncomeForDay(stakingAcc, startTimestamp, neutrinoMetrics)
327327 let endUsdnAmt = readUsdnIncomeForDay(stakingAcc, endTimestamp, neutrinoMetrics)
328+ let startUsdnAmt = if ((startUsdnAmtTMP == 0))
329+ then endUsdnAmt
330+ else startUsdnAmtTMP
328331 (endUsdnAmt - startUsdnAmt)
329332 }
330333
332335 func calcApr (stakingAcc,periodInDays,incomeForPeriod,stakingAssetPriceToUsdnX6) = {
333336 let totalStaked = getIntOrElse(stakingAcc, "%s%s__stats__activeTotalLocked", 1)
334337 let totalStakedInUsdn = fraction(totalStaked, stakingAssetPriceToUsdnX6, MULT6)
335- fraction((incomeForPeriod * MULT6), 365, (totalStakedInUsdn * periodInDays))
338+ if ((0 > incomeForPeriod))
339+ then 0
340+ else fraction((incomeForPeriod * MULT6), 365, (totalStakedInUsdn * periodInDays))
336341 }
337342
338343
518523 let unleaseAmt = withdrawTuple._5
519524 let outFeeAmount = withdrawTuple._6
520525 let outAmtGross = withdrawTuple._7
521- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(outNetAmount), toString(outSurfAmt), toString(outFeeAmount), toString(price), toString(blcks2LmtReset), toString(limitMaxWaves), toString(limitMaxUsdn), toString(inAmtToSurfPart)], SEP))
526+ let withdrawPrice = withdrawTuple._8
527+ $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))
522528 }
523529
524530
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 keyBalanceLocked () = "balance_lock_"
4444
4545
4646 func keyWavesLockedBalance () = (keyBalanceLocked() + "waves")
4747
4848
4949 func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino")
5050
5151
5252 func keyMinWavesSwapAmount () = "min_waves_swap_amount"
5353
5454
5555 func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount"
5656
5757
5858 func keyWavesOutFeePart () = "wavesOut_swap_feePart"
5959
6060
6161 func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart"
6262
6363
6464 func keySwapAmountAParam () = "%s%s__config__swapAParam"
6565
6666
6767 func keySwapAmountBParam () = "%s%s__config__swapBParam"
6868
6969
7070 func keyUsdnSwapAmountAParam () = "%s%s__config__usdnSwapAParam"
7171
7272
7373 func keyUsdnSwapAmountBParam () = "%s%s__config__usdnSwapBParam"
7474
7575
7676 func keyNsbtLockContract () = "%s__nsbtLockContract"
7777
7878
7979 func keyMathContract () = "%s__mathContract"
8080
8181
8282 func keyBalanceWavesLockInterval () = "balance_waves_lock_interval"
8383
8484
8585 func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval"
8686
8787
8888 func keyPrice () = "price"
8989
9090
9191 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
9292
9393
9494 func keyHalfLife () = "%s__halfLife"
9595
9696
9797 func keyMinLockAmount () = "%s__minLockAmount"
9898
9999
100100 func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy"
101101
102102
103103 func keyMinNsbtSell () = "min_nsbt_sell"
104104
105105
106106 func keyStatsDepositAmtByDay (timestamp) = makeString(["%s%s%d", "stats", "depositAmtByDay", toString(timestamp)], SEP)
107107
108108
109109 func toStartOfDay (timestamp) = ((timestamp / DAYMILLIS) * DAYMILLIS)
110110
111111
112112 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
113113
114114
115115 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
116116
117117
118118 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
119119
120120
121121 func getIntOrElse (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
122122
123123
124124 func getStrOrElse (address,key,defaultVal) = valueOrElse(getString(address, key), defaultVal)
125125
126126
127127 func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price)
128128
129129
130130 func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8)
131131
132132
133133 func asAnyList (val) = match val {
134134 case valAnyList: List[Any] =>
135135 valAnyList
136136 case _ =>
137137 throw("fail to cast into List[Any]")
138138 }
139139
140140
141141 func asInt (val) = match val {
142142 case valInt: Int =>
143143 valInt
144144 case _ =>
145145 throw("fail to cast into Int")
146146 }
147147
148148
149149 func asString (val) = match val {
150150 case valStr: String =>
151151 valStr
152152 case _ =>
153153 throw("fail to cast into String")
154154 }
155155
156156
157157 func asTuple2Ints (val) = match val {
158158 case v: (Int, Int) =>
159159 v
160160 case _ =>
161161 throw("fail to cast into Tuple2 ints")
162162 }
163163
164164
165165 func asSwapParamsSTRUCT (val) = match val {
166166 case struct: (Int, Int, Int, Int, Int, Int, Int) =>
167167 struct
168168 case _ =>
169169 throw("fail to cast into SwapParamsSTRUCT")
170170 }
171171
172172
173173 func asWithdrawResultSTRUCT (val) = match val {
174- case struct: (Int, Unit, Int, Int, Int, Int, Int)|(Int, ByteVector, Int, Int, Int, Int, Int) =>
174+ case struct: (Int, Unit, Int, Int, Int, Int, Int, Int)|(Int, ByteVector, Int, Int, Int, Int, Int, Int) =>
175175 struct
176176 case _ =>
177177 throw("fail to cast into WithdrawResult")
178178 }
179179
180180
181181 func toTimestamp (start) = if ((0 > start))
182182 then -1
183183 else match blockInfoByHeight(start) {
184184 case block: BlockInfo =>
185185 block.timestamp
186186 case _ =>
187187 -1
188188 }
189189
190190
191191 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
192192
193193
194194 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
195195
196196
197197 let nMetricIdxPrice = 0
198198
199199 let nMetricIdxUsdnLockedBalance = 1
200200
201201 let nMetricIdxWavesLockedBalance = 2
202202
203203 let nMetricIdxReserve = 3
204204
205205 let nMetricIdxReserveInUsdn = 4
206206
207207 let nMetricIdxUsdnSupply = 5
208208
209209 let nMetricIdxSurplus = 6
210210
211211 let nMetricIdxSurplusPercent = 7
212212
213213 let nMetricIdxBR = 8
214214
215215 let nMetricIdxNsbtSupply = 9
216216
217217 let nMetricIdxMaxNsbtSupply = 10
218218
219219 let nMetricIdxSurfSupply = 11
220220
221221 let IdxControlCfgNeutrinoDapp = 1
222222
223223 let IdxControlCfgAuctionDapp = 2
224224
225225 let IdxControlCfgRpdDapp = 3
226226
227227 let IdxControlCfgMathDapp = 4
228228
229229 let IdxControlCfgLiquidationDapp = 5
230230
231231 let IdxControlCfgRestDapp = 6
232232
233233 let IdxControlCfgNodeRegistryDapp = 7
234234
235235 let IdxControlCfgNsbtStakingDapp = 8
236236
237237 let IdxControlCfgMediatorDapp = 9
238238
239239 let IdxControlCfgSurfStakingDapp = 10
240240
241241 let IdxControlCfgGnsbtControllerDapp = 11
242242
243243 let bFuncIdxSurf = 0
244244
245245 let bFuncIdxWaves = 1
246246
247247 let bFuncIdxUsdn = 2
248248
249249 let bFuncIdxReserveStart = 3
250250
251251 let bFuncIdxSupplyStart = 4
252252
253253 let bFuncIdxBRStart = 5
254254
255255 let bFuncIdxReserveEnd = 6
256256
257257 let bFuncIdxSupplyEnd = 7
258258
259259 let bFuncIdxBREnd = 8
260260
261261 let bFuncIdxRest = 9
262262
263263 let bFuncIdxWavesPrice = 10
264264
265265 func keyControlAddress () = "%s%s__config__controlAddress"
266266
267267
268268 func keyControlCfg () = "%s__controlConfig"
269269
270270
271271 func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP)
272272
273273
274274 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
275275
276276
277277 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
278278
279279 let controlCfg = readControlCfgOrFail(controlContract)
280280
281281 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
282282
283283 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
284284
285285 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
286286
287287 let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp)
288288
289289 let rpdContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp)
290290
291291 let nsbtStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgNsbtStakingDapp)
292292
293293 let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp)
294294
295295 let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp)
296296
297297 let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
298298
299299 let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
300300
301301 let nsbtAssetIdStr = getStringValue(neutrinoContract, keyNsbtAssetId())
302302
303303 let nsbtAssetId = fromBase58String(nsbtAssetIdStr)
304304
305305 let surfAssetIdStr = getStringValue(auctionContract, keySurfAssetId())
306306
307307 let surfAssetId = fromBase58String(surfAssetIdStr)
308308
309309 func readUsdnIncomeForDay (stakingAcc,startOfDayTimestamp,neutrinoMetrics) = {
310310 let amtByDayKEY = keyStatsDepositAmtByDay(startOfDayTimestamp)
311311 let incomeStr = getStrOrElse(stakingAcc, amtByDayKEY, "%s%s__0__0")
312312 let incomeArray = split(incomeStr, SEP)
313313 let wavesAmt = parseIntValue(incomeArray[1])
314314 let usdnAmt = parseIntValue(incomeArray[2])
315315 let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice])
316316 let wavesAsUsdnAmt = fraction(wavesAmt, currentPrice, MULT8)
317317 (wavesAsUsdnAmt + usdnAmt)
318318 }
319319
320320
321321 func calcUsdnIncomeForPeriod (stakingAcc,days) = {
322322 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
323323 let currStartOfDay = toStartOfDay(lastBlock.timestamp)
324324 let startTimestamp = (currStartOfDay - (DAYMILLIS * (days + 1)))
325325 let endTimestamp = (currStartOfDay - DAYMILLIS)
326- let startUsdnAmt = readUsdnIncomeForDay(stakingAcc, startTimestamp, neutrinoMetrics)
326+ let startUsdnAmtTMP = readUsdnIncomeForDay(stakingAcc, startTimestamp, neutrinoMetrics)
327327 let endUsdnAmt = readUsdnIncomeForDay(stakingAcc, endTimestamp, neutrinoMetrics)
328+ let startUsdnAmt = if ((startUsdnAmtTMP == 0))
329+ then endUsdnAmt
330+ else startUsdnAmtTMP
328331 (endUsdnAmt - startUsdnAmt)
329332 }
330333
331334
332335 func calcApr (stakingAcc,periodInDays,incomeForPeriod,stakingAssetPriceToUsdnX6) = {
333336 let totalStaked = getIntOrElse(stakingAcc, "%s%s__stats__activeTotalLocked", 1)
334337 let totalStakedInUsdn = fraction(totalStaked, stakingAssetPriceToUsdnX6, MULT6)
335- fraction((incomeForPeriod * MULT6), 365, (totalStakedInUsdn * periodInDays))
338+ if ((0 > incomeForPeriod))
339+ then 0
340+ else fraction((incomeForPeriod * MULT6), 365, (totalStakedInUsdn * periodInDays))
336341 }
337342
338343
339344 @Callable(i)
340345 func reverseSwapLimitREADONLY (lim,isWavesSwap) = {
341346 let BR = asInt(asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))[nMetricIdxBR])
342347 let gNsbt = if ((0 >= lim))
343348 then 0
344349 else {
345350 let aParamX8 = toBigInt(getIntOrFail(mathContract, if (isWavesSwap)
346351 then keySwapAmountAParam()
347352 else keyUsdnSwapAmountAParam()))
348353 let bParamX16 = toBigInt(getIntOrFail(mathContract, if (isWavesSwap)
349354 then keySwapAmountBParam()
350355 else keyUsdnSwapAmountBParam()))
351356 let limDivAX8 = if (isWavesSwap)
352357 then fraction(toBigInt(lim), MULTX10, aParamX8)
353358 else fraction(fraction(toBigInt(lim), MULTX10, aParamX8), MULTX6, toBigInt(BR))
354359 let revBX16 = fraction(MULTX16, MULTX16, bParamX16)
355360 toInt(pow(limDivAX8, 8, revBX16, 16, 6, CEILING))
356361 }
357362 $Tuple2(nil, gNsbt)
358363 }
359364
360365
361366
362367 @Callable(i)
363368 func gnsbtInfoINTERNAL (userAddressStrOrEmpty,additionalNsbtToStakeOrZero,additionalSurfToStakeOrZero) = {
364369 let userAddressOrThis = if ((userAddressStrOrEmpty != ""))
365370 then addressFromStringValue(userAddressStrOrEmpty)
366371 else this
367372 let currentPrice = getIntegerValue(controlContract, keyPrice())
368373 let gnsbtFromNsbtDiff = additionalNsbtToStakeOrZero
369374 let gnsbtFromSurfDiff = asInt(invoke(surfStakingContract, "gnsbtFromSurfSYSREADONLY", [additionalSurfToStakeOrZero], nil))
370375 let gNsbtDiff = (gnsbtFromNsbtDiff + gnsbtFromSurfDiff)
371376 let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil))
372377 let blcks2LmtReset = swapParamsTuple._3
373378 let gnsbtAmt = swapParamsTuple._4
374379 let gnsbtAmtTotal = swapParamsTuple._5
375380 let limitMaxWaves = swapParamsTuple._6
376381 let limitMaxUsdn = swapParamsTuple._7
377382 let swapParamsTupleNEW = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, gNsbtDiff], nil))
378383 let blcks2LmtResetNEW = swapParamsTupleNEW._3
379384 let gnsbtAmtNEW = swapParamsTupleNEW._4
380385 let gnsbtAmtTotalNEW = swapParamsTupleNEW._5
381386 let limitMaxWavesNEW = swapParamsTupleNEW._6
382387 let limitMaxUsdnNEW = swapParamsTupleNEW._7
383388 let nsbtBalance = if ((userAddressStrOrEmpty != ""))
384389 then assetBalance(userAddressOrThis, nsbtAssetId)
385390 else 0
386391 let surfBalance = if ((userAddressStrOrEmpty != ""))
387392 then assetBalance(userAddressOrThis, surfAssetId)
388393 else 0
389394 let nsbtBalanceDiff = if ((additionalNsbtToStakeOrZero >= 0))
390395 then additionalNsbtToStakeOrZero
391396 else {
392397 let nsbtUnstakingData = asAnyList(invoke(nsbtStakingContract, "nsbtUnstakingSYSREADONLY", [userAddressStrOrEmpty, (-1 * additionalNsbtToStakeOrZero)], nil))
393398 let nsbtReceiveAmount = asInt(nsbtUnstakingData[2])
394399 let result = -(nsbtReceiveAmount)
395400 result
396401 }
397402 let nsbtBalanceNew = (nsbtBalance - nsbtBalanceDiff)
398403 let surfBalanceNew = (surfBalance - additionalSurfToStakeOrZero)
399404 let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty, additionalNsbtToStakeOrZero, additionalSurfToStakeOrZero], nil))
400405 let gnsbtUser = asInt(gnsbtData[0])
401406 let gnsbtTotal = asInt(gnsbtData[1])
402407 let nsbtData = asAnyList(gnsbtData[2])
403408 let surfData = asAnyList(gnsbtData[3])
404409 let vpEffectiveHeight = asInt(gnsbtData[4])
405410 let vpEffectiveHeightNEW = asInt(gnsbtData[5])
406411 let gnsbtAmtFromNsbt = asInt(nsbtData[2])
407412 let gnsbtAmtFromSurf = asInt(surfData[2])
408413 let gnsbtAmtFromNsbtNEW = (gnsbtAmtFromNsbt + gnsbtFromNsbtDiff)
409414 let gnsbtAmtFromSurfNEW = (gnsbtAmtFromSurf + gnsbtFromSurfDiff)
410415 let gnsbtFromNsbtTotal = asInt(nsbtData[3])
411416 let gnsbtFromSurfTotal = asInt(surfData[3])
412417 let gnsbtFromSurfActiveTotal = 0
413418 let gnsbtFromSurfFrozenTotal = gnsbtFromSurfTotal
414419 let gnsbtFromNsbtTotalNEW = (gnsbtFromNsbtTotal + gnsbtFromNsbtDiff)
415420 let gnsbtFromSurfTotalNEW = (gnsbtFromSurfTotal + gnsbtFromSurfDiff)
416421 let gnsbtFromSurfFrozenTotalNEW = gnsbtFromSurfTotalNEW
417422 let votingPower = fraction(gnsbtAmtFromNsbt, MULT8, (gnsbtFromNsbtTotal + gnsbtFromSurfActiveTotal))
418423 let votingPowerNew = fraction(gnsbtAmtFromNsbtNEW, MULT8, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfActiveTotal))
419424 let votingPowerMax = fraction((gnsbtAmtFromNsbt + gnsbtAmtFromSurf), MULT8, ((gnsbtFromNsbtTotal + gnsbtFromSurfActiveTotal) + gnsbtFromSurfFrozenTotal))
420425 let votingPowerMaxNew = fraction((gnsbtAmtFromNsbtNEW + gnsbtAmtFromSurfNEW), MULT8, ((gnsbtFromNsbtTotalNEW + gnsbtFromSurfActiveTotal) + gnsbtFromSurfFrozenTotalNEW))
421426 let votingPowerEta = if ((vpEffectiveHeight == 0))
422427 then height
423428 else vpEffectiveHeight
424429 let votingPowerEtaNew = if ((vpEffectiveHeightNEW == 0))
425430 then height
426431 else vpEffectiveHeightNEW
427432 $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])
428433 }
429434
430435
431436
432437 @Callable(i)
433438 func gnsbtInfoREADONLY (userAddressStrOrEmpty,additionalNsbtToStakeOrZero,additionalSurfToStakeOrZero) = {
434439 let gnsbtInfoDATA = asAnyList(invoke(this, "gnsbtInfoINTERNAL", [userAddressStrOrEmpty, additionalNsbtToStakeOrZero, additionalSurfToStakeOrZero], nil))
435440 $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))
436441 }
437442
438443
439444
440445 @Callable(i)
441446 func gnsbtEffectiveREADONLY (userAddressStrOrEmpty) = {
442447 let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty, 0, 0], nil))
443448 let nsbtData = asAnyList(gnsbtData[2])
444449 let userFromNsbt = asInt(nsbtData[2])
445450 let totalFromNsbt = asInt(nsbtData[3])
446451 let userMatureFromSurf = asInt(gnsbtData[9])
447452 let totalMatureFromSurf = asInt(gnsbtData[6])
448453 $Tuple2(nil, makeString(["%d%d", toString((totalFromNsbt + totalMatureFromSurf)), toString((userFromNsbt + userMatureFromSurf))], SEP))
449454 }
450455
451456
452457
453458 @Callable(i)
454459 func rewardInfoREADONLY (userAddressStrOrEmpty) = {
455460 let rewardsData = asAnyList(invoke(gnsbtControllerContract, "gnsbtRewardsSYSREADONLY", [userAddressStrOrEmpty], nil))
456461 let usdnRewards = asString(invoke(rpdContract, "unclaimedRewardsREADONLY", [userAddressStrOrEmpty], nil))
457462 $Tuple2(nil, makeString(["%s%s%s", asString(rewardsData[0]), asString(rewardsData[1]), usdnRewards], SEP))
458463 }
459464
460465
461466
462467 @Callable(i)
463468 func mergeNsbtREADONLY (userAddressMandatory,newAmount) = {
464469 let nsbtData = asAnyList(invoke(nsbtStakingContract, "nsbtStakingSYSREADONLY", [userAddressMandatory, newAmount], nil))
465470 let amount0 = asInt(nsbtData[0])
466471 let startHeight = if ((0 >= amount0))
467472 then -1
468473 else asInt(nsbtData[2])
469474 let startTimestamp = toTimestamp(startHeight)
470475 let startHeightNew = if ((0 >= newAmount))
471476 then startHeight
472477 else if ((0 >= amount0))
473478 then height
474479 else {
475480 let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
476481 asInt(invoke(mathContract, "mergeStakesREADONLY", [amount0, startHeight, newAmount, height, halfLife], nil))
477482 }
478483 let startTimestampNew = toTimestamp(startHeightNew)
479484 $Tuple2(nil, makeString(["%d%d%d%d", toString(startHeight), toString(startTimestamp), toString(startHeightNew), toString(startTimestampNew)], SEP))
480485 }
481486
482487
483488
484489 @Callable(i)
485490 func swapLimitCalculatorREADONLY (userAddressStrOpt,limitWanted,assetIdStr) = {
486491 let gNsbtCurrent = if ((userAddressStrOpt == ""))
487492 then 0
488493 else asInt(asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil))._4)
489494 let limitWantedUsdn = if ((assetIdStr == "WAVES"))
490495 then convertWavesToNeutrino(limitWanted, getIntegerValue(controlContract, keyPrice()))
491496 else limitWanted
492497 let gNsbtNeeded = asInt(invoke(this, "reverseSwapLimitREADONLY", [limitWantedUsdn, (assetIdStr == "WAVES")], nil))
493498 let gNsbtDelta = (gNsbtNeeded - gNsbtCurrent)
494499 $Tuple2(nil, makeString(["%s%s", toString(gNsbtCurrent), toString(gNsbtDelta)], SEP))
495500 }
496501
497502
498503
499504 @Callable(i)
500505 func swapInfoREADONLY (userAddressStrOrEmpty,amount,assetIdStr) = {
501506 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
502507 let price = asInt(neutrinoMetrics[nMetricIdxPrice])
503508 let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil))
504509 let blcks2LmtReset = swapParamsTuple._3
505510 let limitMaxWaves = swapParamsTuple._6
506511 let limitMaxUsdn = swapParamsTuple._7
507512 let assetId = fromBase58String(assetIdStr)
508513 let swapType = if ((assetId == WAVESID))
509514 then "waves"
510515 else if ((assetId == neutrinoAssetId))
511516 then "neutrino"
512517 else throw(("Can't swap assetId=" + assetIdStr))
513518 let withdrawTuple = asWithdrawResultSTRUCT(invoke(neutrinoContract, "calcWithdrawResultSYSREADONLY", [swapType, amount, price], nil))
514519 let outNetAmount = withdrawTuple._1
515520 let outAssetId = withdrawTuple._2
516521 let outSurfAmt = withdrawTuple._3
517522 let inAmtToSurfPart = withdrawTuple._4
518523 let unleaseAmt = withdrawTuple._5
519524 let outFeeAmount = withdrawTuple._6
520525 let outAmtGross = withdrawTuple._7
521- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(outNetAmount), toString(outSurfAmt), toString(outFeeAmount), toString(price), toString(blcks2LmtReset), toString(limitMaxWaves), toString(limitMaxUsdn), toString(inAmtToSurfPart)], SEP))
526+ let withdrawPrice = withdrawTuple._8
527+ $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))
522528 }
523529
524530
525531
526532 @Callable(i)
527533 func usdnStakingAprREADONLY (days) = {
528534 let tmpDays = 1
529535 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
530536 let currentPrice = asInt(neutrinoMetrics[nMetricIdxPrice])
531537 let wavesIncome = (6000 * MULT8)
532538 let incomeForPeriod = fraction(wavesIncome, currentPrice, MULT8)
533539 let apr = calcApr(rpdContract, tmpDays, incomeForPeriod, MULT6)
534540 $Tuple2(nil, ("%d__" + toString(apr)))
535541 }
536542
537543
538544
539545 @Callable(i)
540546 func surfStakingAprREADONLY (days) = {
541547 let tmpDays = 3
542548 let incomeForPeriod = calcUsdnIncomeForPeriod(surfStakingContract, tmpDays)
543549 let surfPriceToUsdnX6 = 86400
544550 let apr = calcApr(surfStakingContract, tmpDays, incomeForPeriod, surfPriceToUsdnX6)
545551 $Tuple2(nil, ("%d__" + toString(apr)))
546552 }
547553
548554
549555
550556 @Callable(i)
551557 func surfStakingAprV2READONLY (days,surfUsdnPriceX6) = {
552558 let tmpDays = 3
553559 let incomeForPeriod = calcUsdnIncomeForPeriod(surfStakingContract, tmpDays)
554560 let apr = calcApr(surfStakingContract, tmpDays, incomeForPeriod, surfUsdnPriceX6)
555561 $Tuple2(nil, ("%d__" + toString(apr)))
556562 }
557563
558564
559565
560566 @Callable(i)
561567 func nsbtStakingAprREADONLY (days) = {
562568 let tmpDays = 3
563569 let nsbtPriceToUsdnX6 = 8000000
564570 let incomeForPeriod = calcUsdnIncomeForPeriod(nsbtStakingContract, tmpDays)
565571 let apr = calcApr(nsbtStakingContract, tmpDays, incomeForPeriod, nsbtPriceToUsdnX6)
566572 $Tuple2(nil, ("%d__" + toString(apr)))
567573 }
568574
569575
570576
571577 @Callable(i)
572578 func nsbtStakingAprV2READONLY (days,nsbtUsdnPriceX6) = {
573579 let tmpDays = 3
574580 let incomeForPeriod = calcUsdnIncomeForPeriod(nsbtStakingContract, tmpDays)
575581 let apr = calcApr(nsbtStakingContract, tmpDays, incomeForPeriod, nsbtUsdnPriceX6)
576582 $Tuple2(nil, ("%d__" + toString(apr)))
577583 }
578584
579585

github/deemru/w8io/026f985 
65.73 ms