tx · H7DmuyYxWsXne84GZuMu4rMD7DTV8xen5hDAzABqprXQ

3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J:  -0.02500000 Waves

2023.02.10 10:54 [2443255] smart account 3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J > SELF 0.00000000 Waves

{ "type": 13, "id": "H7DmuyYxWsXne84GZuMu4rMD7DTV8xen5hDAzABqprXQ", "fee": 2500000, "feeAssetId": null, "timestamp": 1676015670441, "version": 2, "chainId": 84, "sender": "3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J", "senderPublicKey": "4DthuG3xjZV9WtZ34Y66AummdAr67wRzwWsVQL4y2bob", "proofs": [ "4XBuKpidA93ughDb3ANkfedcy64AE7uyhv69FVPwHFhkEaCBvY7sNzycpYM3vNUND8whjff4Fiybrs2BTzUyqTvz", "UKNGjYqYvRCpvU7Yj1AM85kRKV7ojLeUZ1Gx46EThP7VAL7sr5QiQPiBswivTHPad4Ee5MR16V4JFUNvJSWyqL9", "59ZcZGsKYLp9VUcVH4DrHU9Fmo6KroGy223npNTSUgXKpDS1KwV8gP9Ythv47R1tbVw4D6Jpoo2CEB4XBGpRgKFP" ], "script": "base64:BgIpCAISBwoFCAgBAQgSABIDCgEBEgASABIAEgMKAQgSBAoCCAESBAoCCAFSAAlzZXBhcmF0b3ICAl9fAANTRVACAl9fAAVNVUxUNgDAhD0ABU1VTFQ4AIDC1y8ABk1VTFRYNgkAtgIBBQVNVUxUNgAGTVVMVFg4CQC2AgEFBU1VTFQ4AAdNVUxUWDE4CQC2AgEAgICQu7rWrfANAApXQVZFU0lEU1RSAgVXQVZFUwAHV0FWRVNJRAkA2QQBBQpXQVZFU0lEU1RSAAlEQVlNSUxMSVMAgLiZKQAZSWR4Q29udHJvbENmZ05ldXRyaW5vRGFwcAABABhJZHhDb250cm9sQ2ZnQXVjdGlvbkRhcHAAAgAUSWR4Q29udHJvbENmZ1JwZERhcHAAAwAVSWR4Q29udHJvbENmZ01hdGhEY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"height": 2443255, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G3m4WoFVto2gB57qYS2pnvttJNqw84wP55eytu41BHoS Next: EJkoxxWdHk8tnPnYp3ih2YCWhMamX4TJVczwhzL2jK8T Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
5050 func keyControlCfg () = "%s__controlConfig"
5151
5252
53-func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP)
53+func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP)
5454
5555
5656 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
262262 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
263263 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
264264 func forEachAssetCacheUserReward (accum,asset) = {
265- let $t01079510930 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
266- let rewardTotal = $t01079510930._1
267- let cached = $t01079510930._2
268- let dynamic = $t01079510930._3
269- let rewardCachedPartKEY = $t01079510930._4
265+ let $t01079910934 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
266+ let rewardTotal = $t01079910934._1
267+ let cached = $t01079910934._2
268+ let dynamic = $t01079910934._3
269+ let rewardCachedPartKEY = $t01079910934._4
270270 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
271271 }
272272
304304 func IncrementNotDistributedRewardEntry (tkn,amountInc) = {
305305 let notDistributedRewardKEY = keyNotDistributedReward(tkn)
306306 let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0)
307-[IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))]
307+ IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))
308308 }
309309
310310
313313 if ((size(i.payments) > 0))
314314 then throw("payments are not accepted")
315315 else {
316- let $t01387313978 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
317- let isNewUser = $t01387313978._1
318- let stakedAmount = $t01387313978._2
319- let stakingStart = $t01387313978._3
316+ let $t01387513980 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
317+ let isNewUser = $t01387513980._1
318+ let stakedAmount = $t01387513980._2
319+ let stakingStart = $t01387513980._3
320320 let stakedAmountX = toBigInt(stakedAmount)
321321 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
322322 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
323323 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
324324 func forEachAssetCalcUnclaimedReward (accum,asset) = {
325- let $t01434914487 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
326- let rewardTotal = $t01434914487._1
327- let cached = $t01434914487._2
328- let dynamic = $t01434914487._3
329- let rewardCachedPartKEY = $t01434914487._4
325+ let $t01435114489 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
326+ let rewardTotal = $t01435114489._1
327+ let cached = $t01435114489._2
328+ let dynamic = $t01435114489._3
329+ let rewardCachedPartKEY = $t01435114489._4
330330 let claimedKEY = keyClaimed(userAddressStr, asset)
331- let $t01454714584 = accum
332- let data = $t01454714584._1
333- let claimedAmtByAsset = $t01454714584._2
331+ let $t01454914586 = accum
332+ let data = $t01454914586._1
333+ let claimedAmtByAsset = $t01454914586._2
334334 let newPart = makeString([asset, toString(rewardTotal)], ":")
335335 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
336336 if ((0 >= rewardTotal))
338338 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
339339 }
340340
341- let $t01504415157 = {
341+ let $t01504615159 = {
342342 let $l = supportedAssetsList
343343 let $s = size($l)
344344 let $acc0 = $Tuple2(nil, "")
352352
353353 $f0_2($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)
354354 }
355- let transfers = $t01504415157._1
356- let claimedAmtByAssetResult = $t01504415157._2
355+ let transfers = $t01504615159._1
356+ let claimedAmtByAssetResult = $t01504615159._2
357357 if ((0 >= size(transfers)))
358358 then $Tuple2(nil, 0)
359359 else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers))
362362
363363
364364 @Callable(i)
365-func constructor (neutrinoContractAddress,mathContractAddress,minLockAmount,halfLife,supportedRewardAssets) = if ((i.caller != this))
365+func constructorV1 (neutrinoContractAddress,mathContractAddress,minLockAmount,halfLife,supportedRewardAssets) = if ((i.caller != this))
366366 then throw("Permission denied")
367367 else [StringEntry(keyNeutrinoContractAddress(), neutrinoContractAddress), StringEntry(keyMathContractAddress(), mathContractAddress), IntegerEntry(keyMinLockAmount(), minLockAmount), IntegerEntry(keyHalfLife(), halfLife), StringEntry(keySupportedRewardAssets(), supportedRewardAssets)]
368368
370370
371371 @Callable(i)
372372 func stake () = {
373- let $t01600616068 = getParamsOrFail()
374- let bondAssetId = $t01600616068._1
375- let minLockAmount = $t01600616068._2
376- let halfLife = $t01600616068._3
373+ let $t01601016072 = getParamsOrFail()
374+ let bondAssetId = $t01601016072._1
375+ let minLockAmount = $t01601016072._2
376+ let halfLife = $t01601016072._3
377377 if ((size(i.payments) != 1))
378378 then throw("Invalid payments size")
379379 else {
386386 else {
387387 let userAddress = i.caller
388388 let userAddressStr = toString(i.caller)
389- let $t01661016717 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1))
390- let isNewUser = $t01661016717._1
391- let lockAmount = $t01661016717._2
392- let lockStartHeight = $t01661016717._3
389+ let $t01661416721 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1))
390+ let isNewUser = $t01661416721._1
391+ let lockAmount = $t01661416721._2
392+ let lockStartHeight = $t01661416721._3
393393 let mergedAmount = if (isNewUser)
394394 then amount
395395 else (amount + lockAmount)
399399 if ((minLockAmount > mergedAmount))
400400 then throw(("Min lock amount is " + toString(minLockAmount)))
401401 else {
402- let $t01707817180 = StatsResult(amount, 1, if (isNewUser)
402+ let $t01708217184 = StatsResult(amount, 1, if (isNewUser)
403403 then 1
404404 else 0)
405- let statsEntries = $t01707817180._1
406- let totalStaked = $t01707817180._2
407- let totalStakedNew = $t01707817180._3
405+ let statsEntries = $t01708217184._1
406+ let totalStaked = $t01708217184._2
407+ let totalStakedNew = $t01708217184._3
408408 ((([HistoryRecordEntry("stake", userAddress, i.transactionId, lockAmount, lockStartHeight, mergedAmount, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, mergedAmount, mergedStartHeight)) ++ statsEntries)
409409 }
410410 }
419419 else {
420420 let userAddress = i.caller
421421 let userAddressStr = toString(userAddress)
422- let $t01766617728 = getParamsOrFail()
423- let bondAssetId = $t01766617728._1
424- let minLockAmount = $t01766617728._2
425- let halfLife = $t01766617728._3
426- let $t01773117805 = getUserParamsOrFail(userAddress)
427- let isNewUser = $t01773117805._1
428- let lockAmount = $t01773117805._2
429- let lockStart = $t01773117805._3
422+ let $t01767017732 = getParamsOrFail()
423+ let bondAssetId = $t01767017732._1
424+ let minLockAmount = $t01767017732._2
425+ let halfLife = $t01767017732._3
426+ let $t01773517809 = getUserParamsOrFail(userAddress)
427+ let isNewUser = $t01773517809._1
428+ let lockAmount = $t01773517809._2
429+ let lockStart = $t01773517809._3
430430 if ((0 >= lockAmount))
431431 then throw("Nothing to unstake")
432432 else if ((amount > lockAmount))
438438 then throw(("Your gNsbt are taking part in voting, cannot unstake until " + toString(releaseTime)))
439439 else {
440440 let comissionAmount = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, lockStart, halfLife], nil))
441- let $t01844618600 = StatsResult(-(amount), if ((amount == lockAmount))
441+ let $t01845018604 = StatsResult(-(amount), if ((amount == lockAmount))
442442 then -1
443443 else 0, if ((amount == lockAmount))
444444 then -1
445445 else 0)
446- let statsEntries = $t01844618600._1
447- let totalStaked = $t01844618600._2
448- let totalStakedNew = $t01844618600._3
446+ let statsEntries = $t01845018604._1
447+ let totalStaked = $t01845018604._2
448+ let totalStakedNew = $t01845018604._3
449449 ((([ScriptTransfer(userAddress, (amount - comissionAmount), bondAssetId), ScriptTransfer(auctionContract, comissionAmount, bondAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, lockAmount, lockStart, (lockAmount - amount), lockStart)] ++ RewardEntries(false, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, (lockAmount - amount), lockStart)) ++ statsEntries)
450450 }
451451 }
454454
455455
456456 @Callable(i)
457-func deposit () = if ((size(i.payments) != 1))
458- then throw("exact 1 payment is allowed only")
459- else {
460- let pmt = i.payments[0]
461- let amount = pmt.amount
462- let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
463- let pmtAssetIdStr = toBase58String(pmtAssetId)
464- let pmtMultX = if ((pmtAssetId == WAVESID))
465- then MULTX8
466- else MULTX6
467- let amountX = toBigInt(amount)
468- let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0)
469- let totalStakedX = toBigInt(totalStaked)
470- if ((0 > totalStaked))
471- then throw("TODO: case is not supported")
472- else if ((totalStaked == 0))
473- then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount)
474- else {
475- let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX)
476- let depositNumLastKEY = keyDepositNumLast()
477- let depositNumLast = getIntOrElse(depositNumLastKEY, -1)
478- let depositNumNew = (depositNumLast + 1)
479- if (!(contains(supportedAssetsStr, pmtAssetIdStr)))
480- then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr))
457+func deposit () = {
458+ let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0)
459+ if ((0 > totalStaked))
460+ then throw("TODO: case is not supported")
461+ else {
462+ let depositNumLastKEY = keyDepositNumLast()
463+ let depositNumLast = getIntOrElse(depositNumLastKEY, -1)
464+ let depositNumNew = (depositNumLast + 1)
465+ func dep (acc,pmt) = {
466+ let amount = pmt.amount
467+ let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
468+ let pmtAssetIdStr = toBase58String(pmtAssetId)
469+ if (!(contains(supportedAssetsStr, pmtAssetIdStr)))
470+ then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr))
471+ else if ((totalStaked == 0))
472+ then (acc :+ IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount))
481473 else {
474+ let rewardPerNsbtX18 = fraction(toBigInt(amount), MULTX18, toBigInt(totalStaked))
482475 func refreshRewardPerNsbtSUM (accum,nextAsset) = {
483- let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset)
484476 let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0")
485- (accum :+ (if ((nextAsset == pmtAssetIdStr))
486- then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18)))
487- else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr)))
477+ (accum :+ StringEntry(keyRewardPerNsbtSumAt(depositNumNew, nextAsset), if ((nextAsset == pmtAssetIdStr))
478+ then toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18))
479+ else sumLastStr))
488480 }
489481
490- (({
482+ ((acc ++ {
491483 let $l = supportedAssetsList
492484 let $s = size($l)
493485 let $acc0 = nil
500492 else throw("List size exceeds 9")
501493
502494 $f0_2($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)
503- } :+ IntegerEntry(depositNumLastKEY, depositNumNew)) ++ DepositsTotalsEntries(amount, pmtAssetIdStr))
495+ }) ++ DepositsTotalsEntries(amount, pmtAssetIdStr))
504496 }
505- }
506- }
497+ }
498+
499+ ({
500+ let $l = i.payments
501+ let $s = size($l)
502+ let $acc0 = nil
503+ func $f0_1 ($a,$i) = if (($i >= $s))
504+ then $a
505+ else dep($a, $l[$i])
506+
507+ func $f0_2 ($a,$i) = if (($i >= $s))
508+ then $a
509+ else throw("List size exceeds 10")
510+
511+ $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)
512+ } :+ IntegerEntry(depositNumLastKEY, depositNumNew))
513+ }
514+ }
507515
508516
509517
538546 }
539547 else {
540548 let userAddress = addressFromStringValue(userAddressStr)
541- let $t02132621431 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
542- let isNewUser = $t02132621431._1
543- let stakedAmount = $t02132621431._2
544- let stakingStart = $t02132621431._3
549+ let $t02111121216 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
550+ let isNewUser = $t02111121216._1
551+ let stakedAmount = $t02111121216._2
552+ let stakingStart = $t02111121216._3
545553 let stakedAmountX = toBigInt(stakedAmount)
546554 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
547555 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
548556 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
549557 func forEachAssetCalcUnclaimedReward (accum,asset) = {
550- let $t02177721915 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
551- let rewardTotal = $t02177721915._1
552- let cached = $t02177721915._2
553- let dynamic = $t02177721915._3
554- let rewardCachedPartKEY = $t02177721915._4
558+ let $t02156221700 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
559+ let rewardTotal = $t02156221700._1
560+ let cached = $t02156221700._2
561+ let dynamic = $t02156221700._3
562+ let rewardCachedPartKEY = $t02156221700._4
555563 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
556564 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
557565 }
610618 then $Tuple2(nil, [0, totalNsbtAmt, 0])
611619 else {
612620 let userAddress = toAddressOrFail(userAddressStr)
613- let $t02359323697 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
614- let isNewUser = $t02359323697._1
615- let userNsbtAmt = $t02359323697._2
616- let stakingStart = $t02359323697._3
621+ let $t02337823482 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
622+ let isNewUser = $t02337823482._1
623+ let userNsbtAmt = $t02337823482._2
624+ let stakingStart = $t02337823482._3
617625 $Tuple2(nil, [userNsbtAmt, totalNsbtAmt, stakingStart])
618626 }
619627 }
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let SEP = "__"
77
88 let MULT6 = 1000000
99
1010 let MULT8 = 100000000
1111
1212 let MULTX6 = toBigInt(MULT6)
1313
1414 let MULTX8 = toBigInt(MULT8)
1515
1616 let MULTX18 = toBigInt(1000000000000000000)
1717
1818 let WAVESIDSTR = "WAVES"
1919
2020 let WAVESID = fromBase58String(WAVESIDSTR)
2121
2222 let DAYMILLIS = 86400000
2323
2424 let IdxControlCfgNeutrinoDapp = 1
2525
2626 let IdxControlCfgAuctionDapp = 2
2727
2828 let IdxControlCfgRpdDapp = 3
2929
3030 let IdxControlCfgMathDapp = 4
3131
3232 let IdxControlCfgLiquidationDapp = 5
3333
3434 let IdxControlCfgRestDapp = 6
3535
3636 let IdxControlCfgNodeRegistryDapp = 7
3737
3838 let IdxControlCfgNsbtStakingDapp = 8
3939
4040 let IdxControlCfgMediatorDapp = 9
4141
4242 let IdxControlCfgGovernanceDapp = 13
4343
4444 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
4545
4646
4747 func keyControlAddress () = "%s%s__config__controlAddress"
4848
4949
5050 func keyControlCfg () = "%s__controlConfig"
5151
5252
53-func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP)
53+func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP)
5454
5555
5656 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
5757
5858
5959 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
6060
6161 let controlCfg = readControlCfgOrFail(controlContract)
6262
6363 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
6464
6565 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
6666
6767 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
6868
6969 let govContract = getContractAddressOrFail(controlCfg, IdxControlCfgGovernanceDapp)
7070
7171 func keyBondAsset () = "bond_asset_id"
7272
7373
7474 func keyUserGnsbtReleaseTime (userAddr) = ("%s%s_userGnsbtReleaseTime__" + userAddr)
7575
7676
7777 func keyNeutrinoContractAddress () = "%s__neutrinoContractAddress"
7878
7979
8080 func keyMathContractAddress () = "%s__mathContract"
8181
8282
8383 func keyMinLockAmount () = "%s__minLockAmount"
8484
8585
8686 func keyHalfLife () = "%s__halfLife"
8787
8888
8989 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator)
9090
9191
9292 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator)
9393
9494
9595 func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator)
9696
9797
9898 func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator)
9999
100100
101101 func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator)
102102
103103
104104 func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator)
105105
106106
107107 func keyStatsDepositAmtByDay (timestamp) = makeString(["%s%s%d", "stats", "depositAmtByDay", toString(timestamp)], separator)
108108
109109
110110 func keyStatsDepositAmtTotals () = makeString(["%s%s%d", "stats", "depositAmtTotals"], separator)
111111
112112
113113 func keyNextPeriod () = "%s__nextPeriod"
114114
115115
116116 func keySupportedRewardAssets () = "supportedRewardAssets"
117117
118118
119119 func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator)
120120
121121
122122 func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator)
123123
124124
125125 func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator)
126126
127127
128128 func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator)
129129
130130
131131 func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator)
132132
133133
134134 func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator)
135135
136136
137137 func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult)
138138
139139
140140 func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0)
141141
142142
143143 func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
144144
145145
146146 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined"))
147147
148148
149149 func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal)
150150
151151
152152 func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr))
153153
154154
155155 func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR))
156156 then unit
157157 else fromBase58String(assetStr)
158158
159159
160160 func asInt (val) = match val {
161161 case valInt: Int =>
162162 valInt
163163 case _ =>
164164 throw("fail to cast into Int")
165165 }
166166
167167
168168 func formatHistoryRecord (oldAmount,oldStart,newAmount,newStart) = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(oldAmount), toString(oldStart), toString(newAmount), toString(newStart)], separator)
169169
170170
171171 func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator)
172172
173173
174174 func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart))
175175
176176
177177 func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards))
178178
179179
180180 func StatsResult (totalLockedInc,lockCountInc,usersCountInc) = {
181181 let locksCount = getIntOrZero(keyStatsLocksCount())
182182 let usersCount = getIntOrZero(keyStatsUsersCount())
183183 let totalAmount = getIntOrZero(keyLockParamTotalAmount())
184184 let totalAmountNew = (totalAmount + totalLockedInc)
185185 $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)], totalAmount, totalAmountNew)
186186 }
187187
188188
189189 func LockParamsEntry (userAddress,amount,start) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), start)]
190190
191191
192192 func getParamsOrFail () = $Tuple3(fromBase58String(getStringValue(neutrinoContract, keyBondAsset())), getIntOrFail(keyMinLockAmount()), getIntOrFail(keyHalfLife()))
193193
194194
195195 func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0)
196196
197197
198198 func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress))
199199 then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress)))
200200 else unit
201201
202202
203203 func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined"))
204204
205205
206206 let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "")
207207
208208 let supportedAssetsList = split(supportedAssetsStr, "_")
209209
210210 func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = {
211211 let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId)
212212 let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0"))
213213 let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0"))
214214 let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18))
215215 let rewardCachedPartKEY = keyReward(userAddress, assetId)
216216 let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0)
217217 $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY)
218218 }
219219
220220
221221 func toStartOfDay (timestamp) = ((timestamp / DAYMILLIS) * DAYMILLIS)
222222
223223
224224 func findElementPosition (src,element,sep) = {
225225 let elementStart = valueOrErrorMessage(indexOf(src, element), ((("there is no substring " + element) + " in ") + src))
226226 if ((elementStart == 0))
227227 then 0
228228 else {
229229 let left = take(src, elementStart)
230230 (size(split(left, sep)) - 1)
231231 }
232232 }
233233
234234
235235 let DepositTotalsPREFIX = "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d"
236236
237237 func updateDepositTotals (currVal,idxToUpdate,deltaAmt) = {
238238 let currArr = split(currVal, SEP)
239239 func updDepTotByIdx (idx) = if ((idx != idxToUpdate))
240240 then currArr[idx]
241241 else toString((parseIntValue(currArr[idx]) + deltaAmt))
242242
243243 makeString([DepositTotalsPREFIX, updDepTotByIdx(1), updDepTotByIdx(2), updDepTotByIdx(3), updDepTotByIdx(4), updDepTotByIdx(5), updDepTotByIdx(6), updDepTotByIdx(7), updDepTotByIdx(8), updDepTotByIdx(9), updDepTotByIdx(10), updDepTotByIdx(11), updDepTotByIdx(12), updDepTotByIdx(13), updDepTotByIdx(14), updDepTotByIdx(15), updDepTotByIdx(16), updDepTotByIdx(17), updDepTotByIdx(18)], SEP)
244244 }
245245
246246
247247 func DepositsTotalsEntries (depositAmount,assetIdStr) = {
248248 let startOfDay = toStartOfDay(lastBlock.timestamp)
249249 let byDayKEY = keyStatsDepositAmtByDay(startOfDay)
250250 let totalsKEY = keyStatsDepositAmtTotals()
251251 let position = findElementPosition(supportedAssetsStr, assetIdStr, "_")
252252 let defaultDATA = (DepositTotalsPREFIX + "__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0")
253253 let currTotalsDATA = valueOrElse(getString(this, totalsKEY), defaultDATA)
254254 let newTotalsDATA = updateDepositTotals(currTotalsDATA, (position + 1), depositAmount)
255255 [StringEntry(totalsKEY, newTotalsDATA), StringEntry(byDayKEY, newTotalsDATA)]
256256 }
257257
258258
259259 func RewardEntries (isNewUser,userAddress,stakedAmount) = {
260260 let stakedAmountX = toBigInt(stakedAmount)
261261 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress)
262262 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
263263 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
264264 func forEachAssetCacheUserReward (accum,asset) = {
265- let $t01079510930 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
266- let rewardTotal = $t01079510930._1
267- let cached = $t01079510930._2
268- let dynamic = $t01079510930._3
269- let rewardCachedPartKEY = $t01079510930._4
265+ let $t01079910934 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
266+ let rewardTotal = $t01079910934._1
267+ let cached = $t01079910934._2
268+ let dynamic = $t01079910934._3
269+ let rewardCachedPartKEY = $t01079910934._4
270270 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
271271 }
272272
273273 if (if ((depositNumLast == -1))
274274 then (depositNumUser == -1)
275275 else false)
276276 then nil
277277 else if (if ((depositNumLast == -1))
278278 then (depositNumUser > -1)
279279 else false)
280280 then throw("invalid depositNumLast and depositNumUser state")
281281 else if (if ((depositNumLast > -1))
282282 then (depositNumUser >= -1)
283283 else false)
284284 then if (isNewUser)
285285 then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)]
286286 else ({
287287 let $l = supportedAssetsList
288288 let $s = size($l)
289289 let $acc0 = nil
290290 func $f0_1 ($a,$i) = if (($i >= $s))
291291 then $a
292292 else forEachAssetCacheUserReward($a, $l[$i])
293293
294294 func $f0_2 ($a,$i) = if (($i >= $s))
295295 then $a
296296 else throw("List size exceeds 9")
297297
298298 $f0_2($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)
299299 } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast))
300300 else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser)))
301301 }
302302
303303
304304 func IncrementNotDistributedRewardEntry (tkn,amountInc) = {
305305 let notDistributedRewardKEY = keyNotDistributedReward(tkn)
306306 let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0)
307-[IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))]
307+ IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))
308308 }
309309
310310
311311 func commonClaim (userAddress,i) = {
312312 let userAddressStr = toString(userAddress)
313313 if ((size(i.payments) > 0))
314314 then throw("payments are not accepted")
315315 else {
316- let $t01387313978 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
317- let isNewUser = $t01387313978._1
318- let stakedAmount = $t01387313978._2
319- let stakingStart = $t01387313978._3
316+ let $t01387513980 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
317+ let isNewUser = $t01387513980._1
318+ let stakedAmount = $t01387513980._2
319+ let stakingStart = $t01387513980._3
320320 let stakedAmountX = toBigInt(stakedAmount)
321321 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
322322 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
323323 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
324324 func forEachAssetCalcUnclaimedReward (accum,asset) = {
325- let $t01434914487 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
326- let rewardTotal = $t01434914487._1
327- let cached = $t01434914487._2
328- let dynamic = $t01434914487._3
329- let rewardCachedPartKEY = $t01434914487._4
325+ let $t01435114489 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
326+ let rewardTotal = $t01435114489._1
327+ let cached = $t01435114489._2
328+ let dynamic = $t01435114489._3
329+ let rewardCachedPartKEY = $t01435114489._4
330330 let claimedKEY = keyClaimed(userAddressStr, asset)
331- let $t01454714584 = accum
332- let data = $t01454714584._1
333- let claimedAmtByAsset = $t01454714584._2
331+ let $t01454914586 = accum
332+ let data = $t01454914586._1
333+ let claimedAmtByAsset = $t01454914586._2
334334 let newPart = makeString([asset, toString(rewardTotal)], ":")
335335 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
336336 if ((0 >= rewardTotal))
337337 then $Tuple2(data, claimedAmtByAssetNew)
338338 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
339339 }
340340
341- let $t01504415157 = {
341+ let $t01504615159 = {
342342 let $l = supportedAssetsList
343343 let $s = size($l)
344344 let $acc0 = $Tuple2(nil, "")
345345 func $f0_1 ($a,$i) = if (($i >= $s))
346346 then $a
347347 else forEachAssetCalcUnclaimedReward($a, $l[$i])
348348
349349 func $f0_2 ($a,$i) = if (($i >= $s))
350350 then $a
351351 else throw("List size exceeds 9")
352352
353353 $f0_2($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)
354354 }
355- let transfers = $t01504415157._1
356- let claimedAmtByAssetResult = $t01504415157._2
355+ let transfers = $t01504615159._1
356+ let claimedAmtByAssetResult = $t01504615159._2
357357 if ((0 >= size(transfers)))
358358 then $Tuple2(nil, 0)
359359 else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers))
360360 }
361361 }
362362
363363
364364 @Callable(i)
365-func constructor (neutrinoContractAddress,mathContractAddress,minLockAmount,halfLife,supportedRewardAssets) = if ((i.caller != this))
365+func constructorV1 (neutrinoContractAddress,mathContractAddress,minLockAmount,halfLife,supportedRewardAssets) = if ((i.caller != this))
366366 then throw("Permission denied")
367367 else [StringEntry(keyNeutrinoContractAddress(), neutrinoContractAddress), StringEntry(keyMathContractAddress(), mathContractAddress), IntegerEntry(keyMinLockAmount(), minLockAmount), IntegerEntry(keyHalfLife(), halfLife), StringEntry(keySupportedRewardAssets(), supportedRewardAssets)]
368368
369369
370370
371371 @Callable(i)
372372 func stake () = {
373- let $t01600616068 = getParamsOrFail()
374- let bondAssetId = $t01600616068._1
375- let minLockAmount = $t01600616068._2
376- let halfLife = $t01600616068._3
373+ let $t01601016072 = getParamsOrFail()
374+ let bondAssetId = $t01601016072._1
375+ let minLockAmount = $t01601016072._2
376+ let halfLife = $t01601016072._3
377377 if ((size(i.payments) != 1))
378378 then throw("Invalid payments size")
379379 else {
380380 let payment = i.payments[0]
381381 let amount = payment.amount
382382 let invalidAssetMessage = (("Invalid asset. " + toBase58String(bondAssetId)) + " is expected")
383383 let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage)
384384 if ((assetId != bondAssetId))
385385 then throw(invalidAssetMessage)
386386 else {
387387 let userAddress = i.caller
388388 let userAddressStr = toString(i.caller)
389- let $t01661016717 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1))
390- let isNewUser = $t01661016717._1
391- let lockAmount = $t01661016717._2
392- let lockStartHeight = $t01661016717._3
389+ let $t01661416721 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1))
390+ let isNewUser = $t01661416721._1
391+ let lockAmount = $t01661416721._2
392+ let lockStartHeight = $t01661416721._3
393393 let mergedAmount = if (isNewUser)
394394 then amount
395395 else (amount + lockAmount)
396396 let mergedStartHeight = if (isNewUser)
397397 then height
398398 else asInt(invoke(mathContract, "mergeStakesREADONLY", [amount, height, lockAmount, lockStartHeight, halfLife], nil))
399399 if ((minLockAmount > mergedAmount))
400400 then throw(("Min lock amount is " + toString(minLockAmount)))
401401 else {
402- let $t01707817180 = StatsResult(amount, 1, if (isNewUser)
402+ let $t01708217184 = StatsResult(amount, 1, if (isNewUser)
403403 then 1
404404 else 0)
405- let statsEntries = $t01707817180._1
406- let totalStaked = $t01707817180._2
407- let totalStakedNew = $t01707817180._3
405+ let statsEntries = $t01708217184._1
406+ let totalStaked = $t01708217184._2
407+ let totalStakedNew = $t01708217184._3
408408 ((([HistoryRecordEntry("stake", userAddress, i.transactionId, lockAmount, lockStartHeight, mergedAmount, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, mergedAmount, mergedStartHeight)) ++ statsEntries)
409409 }
410410 }
411411 }
412412 }
413413
414414
415415
416416 @Callable(i)
417417 func unstake (amount) = if ((size(i.payments) != 0))
418418 then throw("unstake doesn't require any payment")
419419 else {
420420 let userAddress = i.caller
421421 let userAddressStr = toString(userAddress)
422- let $t01766617728 = getParamsOrFail()
423- let bondAssetId = $t01766617728._1
424- let minLockAmount = $t01766617728._2
425- let halfLife = $t01766617728._3
426- let $t01773117805 = getUserParamsOrFail(userAddress)
427- let isNewUser = $t01773117805._1
428- let lockAmount = $t01773117805._2
429- let lockStart = $t01773117805._3
422+ let $t01767017732 = getParamsOrFail()
423+ let bondAssetId = $t01767017732._1
424+ let minLockAmount = $t01767017732._2
425+ let halfLife = $t01767017732._3
426+ let $t01773517809 = getUserParamsOrFail(userAddress)
427+ let isNewUser = $t01773517809._1
428+ let lockAmount = $t01773517809._2
429+ let lockStart = $t01773517809._3
430430 if ((0 >= lockAmount))
431431 then throw("Nothing to unstake")
432432 else if ((amount > lockAmount))
433433 then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(lockAmount)))
434434 else {
435435 let t = value(blockInfoByHeight(height)).timestamp
436436 let releaseTime = valueOrElse(getInteger(govContract, keyUserGnsbtReleaseTime(userAddressStr)), 0)
437437 if ((releaseTime >= t))
438438 then throw(("Your gNsbt are taking part in voting, cannot unstake until " + toString(releaseTime)))
439439 else {
440440 let comissionAmount = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, lockStart, halfLife], nil))
441- let $t01844618600 = StatsResult(-(amount), if ((amount == lockAmount))
441+ let $t01845018604 = StatsResult(-(amount), if ((amount == lockAmount))
442442 then -1
443443 else 0, if ((amount == lockAmount))
444444 then -1
445445 else 0)
446- let statsEntries = $t01844618600._1
447- let totalStaked = $t01844618600._2
448- let totalStakedNew = $t01844618600._3
446+ let statsEntries = $t01845018604._1
447+ let totalStaked = $t01845018604._2
448+ let totalStakedNew = $t01845018604._3
449449 ((([ScriptTransfer(userAddress, (amount - comissionAmount), bondAssetId), ScriptTransfer(auctionContract, comissionAmount, bondAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, lockAmount, lockStart, (lockAmount - amount), lockStart)] ++ RewardEntries(false, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, (lockAmount - amount), lockStart)) ++ statsEntries)
450450 }
451451 }
452452 }
453453
454454
455455
456456 @Callable(i)
457-func deposit () = if ((size(i.payments) != 1))
458- then throw("exact 1 payment is allowed only")
459- else {
460- let pmt = i.payments[0]
461- let amount = pmt.amount
462- let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
463- let pmtAssetIdStr = toBase58String(pmtAssetId)
464- let pmtMultX = if ((pmtAssetId == WAVESID))
465- then MULTX8
466- else MULTX6
467- let amountX = toBigInt(amount)
468- let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0)
469- let totalStakedX = toBigInt(totalStaked)
470- if ((0 > totalStaked))
471- then throw("TODO: case is not supported")
472- else if ((totalStaked == 0))
473- then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount)
474- else {
475- let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX)
476- let depositNumLastKEY = keyDepositNumLast()
477- let depositNumLast = getIntOrElse(depositNumLastKEY, -1)
478- let depositNumNew = (depositNumLast + 1)
479- if (!(contains(supportedAssetsStr, pmtAssetIdStr)))
480- then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr))
457+func deposit () = {
458+ let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0)
459+ if ((0 > totalStaked))
460+ then throw("TODO: case is not supported")
461+ else {
462+ let depositNumLastKEY = keyDepositNumLast()
463+ let depositNumLast = getIntOrElse(depositNumLastKEY, -1)
464+ let depositNumNew = (depositNumLast + 1)
465+ func dep (acc,pmt) = {
466+ let amount = pmt.amount
467+ let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
468+ let pmtAssetIdStr = toBase58String(pmtAssetId)
469+ if (!(contains(supportedAssetsStr, pmtAssetIdStr)))
470+ then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr))
471+ else if ((totalStaked == 0))
472+ then (acc :+ IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount))
481473 else {
474+ let rewardPerNsbtX18 = fraction(toBigInt(amount), MULTX18, toBigInt(totalStaked))
482475 func refreshRewardPerNsbtSUM (accum,nextAsset) = {
483- let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset)
484476 let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0")
485- (accum :+ (if ((nextAsset == pmtAssetIdStr))
486- then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18)))
487- else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr)))
477+ (accum :+ StringEntry(keyRewardPerNsbtSumAt(depositNumNew, nextAsset), if ((nextAsset == pmtAssetIdStr))
478+ then toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18))
479+ else sumLastStr))
488480 }
489481
490- (({
482+ ((acc ++ {
491483 let $l = supportedAssetsList
492484 let $s = size($l)
493485 let $acc0 = nil
494486 func $f0_1 ($a,$i) = if (($i >= $s))
495487 then $a
496488 else refreshRewardPerNsbtSUM($a, $l[$i])
497489
498490 func $f0_2 ($a,$i) = if (($i >= $s))
499491 then $a
500492 else throw("List size exceeds 9")
501493
502494 $f0_2($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)
503- } :+ IntegerEntry(depositNumLastKEY, depositNumNew)) ++ DepositsTotalsEntries(amount, pmtAssetIdStr))
495+ }) ++ DepositsTotalsEntries(amount, pmtAssetIdStr))
504496 }
505- }
506- }
497+ }
498+
499+ ({
500+ let $l = i.payments
501+ let $s = size($l)
502+ let $acc0 = nil
503+ func $f0_1 ($a,$i) = if (($i >= $s))
504+ then $a
505+ else dep($a, $l[$i])
506+
507+ func $f0_2 ($a,$i) = if (($i >= $s))
508+ then $a
509+ else throw("List size exceeds 10")
510+
511+ $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)
512+ } :+ IntegerEntry(depositNumLastKEY, depositNumNew))
513+ }
514+ }
507515
508516
509517
510518 @Callable(i)
511519 func claimRewards () = commonClaim(i.caller, i)
512520
513521
514522
515523 @Callable(i)
516524 func claimRewardsByOriginCaller () = commonClaim(i.originCaller, i)
517525
518526
519527
520528 @Callable(i)
521529 func unclaimedRewardsREADONLY (userAddressStr) = {
522530 func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_")
523531
524532 let unclaimedRewardStr = if ((userAddressStr == ""))
525533 then {
526534 let $l = supportedAssetsList
527535 let $s = size($l)
528536 let $acc0 = ""
529537 func $f0_1 ($a,$i) = if (($i >= $s))
530538 then $a
531539 else forEachAssetZeroReward($a, $l[$i])
532540
533541 func $f0_2 ($a,$i) = if (($i >= $s))
534542 then $a
535543 else throw("List size exceeds 9")
536544
537545 $f0_2($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)
538546 }
539547 else {
540548 let userAddress = addressFromStringValue(userAddressStr)
541- let $t02132621431 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
542- let isNewUser = $t02132621431._1
543- let stakedAmount = $t02132621431._2
544- let stakingStart = $t02132621431._3
549+ let $t02111121216 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
550+ let isNewUser = $t02111121216._1
551+ let stakedAmount = $t02111121216._2
552+ let stakingStart = $t02111121216._3
545553 let stakedAmountX = toBigInt(stakedAmount)
546554 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
547555 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
548556 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
549557 func forEachAssetCalcUnclaimedReward (accum,asset) = {
550- let $t02177721915 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
551- let rewardTotal = $t02177721915._1
552- let cached = $t02177721915._2
553- let dynamic = $t02177721915._3
554- let rewardCachedPartKEY = $t02177721915._4
558+ let $t02156221700 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
559+ let rewardTotal = $t02156221700._1
560+ let cached = $t02156221700._2
561+ let dynamic = $t02156221700._3
562+ let rewardCachedPartKEY = $t02156221700._4
555563 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
556564 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
557565 }
558566
559567 let $l = supportedAssetsList
560568 let $s = size($l)
561569 let $acc0 = ""
562570 func $f0_1 ($a,$i) = if (($i >= $s))
563571 then $a
564572 else forEachAssetCalcUnclaimedReward($a, $l[$i])
565573
566574 func $f0_2 ($a,$i) = if (($i >= $s))
567575 then $a
568576 else throw("List size exceeds 9")
569577
570578 $f0_2($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)
571579 }
572580 $Tuple2(nil, dropRight(unclaimedRewardStr, 1))
573581 }
574582
575583
576584
577585 @Callable(i)
578586 func nsbtUnstakingSYSREADONLY (userAddressStrOrEmpty,unstakeAmtP) = {
579587 let resultArray = if ((userAddressStrOrEmpty == ""))
580588 then [0, 0, 0, 0]
581589 else {
582590 let userAddress = addressFromStringValue(userAddressStrOrEmpty)
583591 let cfgDATA = getParamsOrFail()
584592 let nsbtAssetId = cfgDATA._1
585593 let minLockAmount = cfgDATA._2
586594 let halfLife = cfgDATA._3
587595 let userDATA = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
588596 let isNewUser = userDATA._1
589597 let stakedAmount = userDATA._2
590598 let lockStart = userDATA._3
591599 let unstakeAmt = if ((unstakeAmtP > stakedAmount))
592600 then stakedAmount
593601 else unstakeAmtP
594602 let stakedAmountNEW = (stakedAmount - unstakeAmt)
595603 let comissionAmount = if ((unstakeAmt == 0))
596604 then 0
597605 else asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [unstakeAmt, lockStart, halfLife], nil))
598606 let receiveAmount = (unstakeAmt - comissionAmount)
599607 [stakedAmount, stakedAmountNEW, receiveAmount, comissionAmount]
600608 }
601609 $Tuple2(nil, resultArray)
602610 }
603611
604612
605613
606614 @Callable(i)
607615 func nsbtStakingSYSREADONLY (userAddressStr,nsbtDiff) = {
608616 let totalNsbtAmt = getIntOrElse(keyLockParamTotalAmount(), 0)
609617 if ((userAddressStr == ""))
610618 then $Tuple2(nil, [0, totalNsbtAmt, 0])
611619 else {
612620 let userAddress = toAddressOrFail(userAddressStr)
613- let $t02359323697 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
614- let isNewUser = $t02359323697._1
615- let userNsbtAmt = $t02359323697._2
616- let stakingStart = $t02359323697._3
621+ let $t02337823482 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
622+ let isNewUser = $t02337823482._1
623+ let userNsbtAmt = $t02337823482._2
624+ let stakingStart = $t02337823482._3
617625 $Tuple2(nil, [userNsbtAmt, totalNsbtAmt, stakingStart])
618626 }
619627 }
620628
621629
622630 @Verifier(tx)
623631 func verify () = {
624632 let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP)
625633 let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP)
626634 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
627635 then 1
628636 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
629637 then 1
630638 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
631639 then 1
632640 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
633641 then 2
634642 else 0))
635643 (count >= 3)
636644 }
637645

github/deemru/w8io/169f3d6 
102.15 ms