tx · FLVoJqYFBv9jiEJ5tTWUyfzzjfMgLfpX9oJGdzsxSPAD

3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy:  -0.03200000 Waves

2023.03.28 07:50 [2509346] smart account 3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy > SELF 0.00000000 Waves

{ "type": 13, "id": "FLVoJqYFBv9jiEJ5tTWUyfzzjfMgLfpX9oJGdzsxSPAD", "fee": 3200000, "feeAssetId": null, "timestamp": 1679979007030, "version": 2, "chainId": 84, "sender": "3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy", "senderPublicKey": "FK9j3YFWVChXKESTn33fMZz1JseCNMMqHhfB7smxJo4e", "proofs": [ "3fRsEjc3NTw2brD1J2k74UPqPnSGybnFRK8LRv3chkwbhTaHRavU8qQzTLMsk53yLN5DWjzrC5sZRpBqxUXV5gSA" ], "script": "base64:BgIvCAISBQoDAQgIEgASABIDCgEBEgASABIAEgMKAQgSAwoBCBIECgIIARIDCgEBEgBqAAlzZXBhcmF0b3ICAl9fAANTRVACAl9fAAVNVUxUNgDAhD0ABU1VTFQ4AIDC1y8ABk1VTFRYNgkAtgIBBQVNVUxUNgAGTVVMVFg4CQC2AgEFBU1VTFQ4AAdNVUxUWDE4CQC2AgEAgICQu7rWrfANAApXQVZFU0lEU1RSAgVXQVZFUwAHV0FWRVNJRAkA2QQBBQpXQVZFU0lEU1RSAAlEQVlNSUxMSVMAgLiZKQANREVGQVVMVFBFUklPRAkAaAIAoAsADgAZSWR4Q29udHJvbENmZ05ldXRyaW5vRGFwcAABABhJZHhDb250cm9sQ2ZnQXVjdGlvbkRhcHAAAgAUSWR4Q29udHJvbENmZ1JwZERhcHAAAwAVSWR4Q29udHJvbENmZ01hdGhEYXBwAAQAHElkeENvbnRyb2xDZmdMaXF1aWRhdGlvbkRhcHAABQAVSWR4Q29udHJvbENmZ1Jlc3REYXBwAAYAHUlkeENvbnRyb2xDZmdOb2RlUmVnaXN0cnlEYXBwAAcAHElkeENv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JARBrZXlNaW5Mb2NrQW1vdW50AAQgc3VyZlZvdGluZ1Bvd2VyUmVzdHJpY3RpdmVQZXJpb2QFDURFRkFVTFRQRVJJT0QEG2JyVG9TdGFydFN1cmZUcmFuc2Zvcm1hdGlvbgCwmEYJAJQKAgUDbmlsCQDMCAIFCm1pbkxvY2tBbXQJAMwIAgkAaAIFEmduc2J0RnJvbVN1cmZDb2VmZgUFTVVMVDYJAMwIAgUgc3VyZlZvdGluZ1Bvd2VyUmVzdHJpY3RpdmVQZXJpb2QJAMwIAgUbYnJUb1N0YXJ0U3VyZlRyYW5zZm9ybWF0aW9uBQNuaWwA91nanQ==", "height": 2509346, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4ux4K8gvKEFmfVZM2xizmVXtrD35gqaR6jJqsgNqwzX2 Next: C8gsepRXBqWsZ5eXKAhQtsymAfNhN4Gq38ubzxoGZtRV Diff:
OldNewDifferences
278278
279279 let defaultTotalsDATA = (DepositTotalsPREFIX + "__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0")
280280
281+func padList (in) = {
282+ let currSize = (size(in) - 1)
283+ func listPadder (acc,idx) = if ((currSize > idx))
284+ then acc
285+ else (acc :+ "0")
286+
287+ let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
288+ let $s = size($l)
289+ let $acc0 = in
290+ func $f0_1 ($a,$i) = if (($i >= $s))
291+ then $a
292+ else listPadder($a, $l[$i])
293+
294+ func $f0_2 ($a,$i) = if (($i >= $s))
295+ then $a
296+ else throw("List size exceeds 18")
297+
298+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18)
299+ }
300+
301+
302+func padString (in) = {
303+ let currSize = (size(split_4C(in, SEP)) - 1)
304+ func strPadder (acc,idx) = if ((currSize > idx))
305+ then acc
306+ else (acc + "__0")
307+
308+ let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
309+ let $s = size($l)
310+ let $acc0 = in
311+ func $f0_1 ($a,$i) = if (($i >= $s))
312+ then $a
313+ else strPadder($a, $l[$i])
314+
315+ func $f0_2 ($a,$i) = if (($i >= $s))
316+ then $a
317+ else throw("List size exceeds 18")
318+
319+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18)
320+ }
321+
322+
281323 func RewardEntries (isNewUser,userAddress,stakedAmount) = {
282324 let stakedAmountX = toBigInt(stakedAmount)
283325 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress)
284326 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
285327 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
286328 func forEachAssetCacheUserReward (accum,asset) = {
287- let $t01083110966 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
288- let rewardTotal = $t01083110966._1
289- let cached = $t01083110966._2
290- let dynamic = $t01083110966._3
291- let rewardCachedPartKEY = $t01083110966._4
329+ let $t01155311688 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
330+ let rewardTotal = $t01155311688._1
331+ let cached = $t01155311688._2
332+ let dynamic = $t01155311688._3
333+ let rewardCachedPartKEY = $t01155311688._4
292334 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
293335 }
294336
334376
335377
336378 func mergeStake (userAddress,amountToAdd,userTeen,userKid) = {
337- let $t01388713997 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
338- let isNewUser = $t01388713997._1
339- let stakedAmount = $t01388713997._2
340- let vpEffectiveHeight = $t01388713997._3
379+ let $t01460914719 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
380+ let isNewUser = $t01460914719._1
381+ let stakedAmount = $t01460914719._2
382+ let vpEffectiveHeight = $t01460914719._3
341383 let stakedAmountNEW = if (isNewUser)
342384 then amountToAdd
343385 else (amountToAdd + stakedAmount)
428470
429471
430472 func commonStake (userAddress,i) = {
431- let $t01988419938 = getParamsOrFail()
432- let stakedAssetId = $t01988419938._1
433- let minLockAmount = $t01988419938._2
473+ let $t02060620660 = getParamsOrFail()
474+ let stakedAssetId = $t02060620660._1
475+ let minLockAmount = $t02060620660._2
434476 if ((size(i.payments) != 1))
435477 then throw("Invalid payments size")
436478 else {
452494 if ((minLockAmount > stakedAmountNEW))
453495 then throw(("Min lock amount is " + toString(minLockAmount)))
454496 else {
455- let $t02079220894 = StatsResult(amount, 1, if (isNewUser)
497+ let $t02151421616 = StatsResult(amount, 1, if (isNewUser)
456498 then 1
457499 else 0)
458- let statsEntries = $t02079220894._1
459- let totalStaked = $t02079220894._2
460- let totalStakedNew = $t02079220894._3
500+ let statsEntries = $t02151421616._1
501+ let totalStaked = $t02151421616._2
502+ let totalStakedNew = $t02151421616._3
461503 (((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeightNEW)) ++ statsEntries) ++ r._1)
462504 }
463505 }
470512 if ((size(i.payments) > 0))
471513 then throw("payments are not accepted")
472514 else {
473- let $t02140121506 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
474- let isNewUser = $t02140121506._1
475- let stakedAmount = $t02140121506._2
476- let stakingStart = $t02140121506._3
515+ let $t02212322228 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
516+ let isNewUser = $t02212322228._1
517+ let stakedAmount = $t02212322228._2
518+ let stakingStart = $t02212322228._3
477519 let stakedAmountX = toBigInt(stakedAmount)
478520 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
479521 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
480522 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
481523 func forEachAssetCalcUnclaimedReward (accum,asset) = {
482- let $t02187722015 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
483- let rewardTotal = $t02187722015._1
484- let cached = $t02187722015._2
485- let dynamic = $t02187722015._3
486- let rewardCachedPartKEY = $t02187722015._4
524+ let $t02259922737 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
525+ let rewardTotal = $t02259922737._1
526+ let cached = $t02259922737._2
527+ let dynamic = $t02259922737._3
528+ let rewardCachedPartKEY = $t02259922737._4
487529 let claimedKEY = keyClaimed(userAddressStr, asset)
488- let $t02207522112 = accum
489- let data = $t02207522112._1
490- let claimedAmtByAsset = $t02207522112._2
530+ let $t02279722834 = accum
531+ let data = $t02279722834._1
532+ let claimedAmtByAsset = $t02279722834._2
491533 let newPart = makeString([asset, toString(rewardTotal)], ":")
492534 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
493535 if ((0 >= rewardTotal))
495537 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
496538 }
497539
498- let $t02257222685 = {
540+ let $t02329423407 = {
499541 let $l = supportedAssetsList
500542 let $s = size($l)
501543 let $acc0 = $Tuple2(nil, "")
509551
510552 $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)
511553 }
512- let transfers = $t02257222685._1
513- let claimedAmtByAssetResult = $t02257222685._2
554+ let transfers = $t02329423407._1
555+ let claimedAmtByAssetResult = $t02329423407._2
514556 if ((0 >= size(transfers)))
515557 then $Tuple2(nil, 0)
516558 else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers))
541583 else {
542584 let userAddress = i.caller
543585 let userAddressStr = toString(userAddress)
544- let $t02362123675 = getParamsOrFail()
545- let stakedAssetId = $t02362123675._1
546- let minLockAmount = $t02362123675._2
547- let $t02367823762 = getUserParamsOrFail(userAddress)
548- let isNewUser = $t02367823762._1
549- let stakedAmount = $t02367823762._2
550- let vpEffectiveHeight = $t02367823762._3
586+ let $t02434324397 = getParamsOrFail()
587+ let stakedAssetId = $t02434324397._1
588+ let minLockAmount = $t02434324397._2
589+ let $t02440024484 = getUserParamsOrFail(userAddress)
590+ let isNewUser = $t02440024484._1
591+ let stakedAmount = $t02440024484._2
592+ let vpEffectiveHeight = $t02440024484._3
551593 let swapParamsSTRUCT = asSwapParamsSTRUCT(reentrantInvoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil))
552594 let swapLimitSpentInUsdn = swapParamsSTRUCT._2
553595 let blcks2LmtReset = swapParamsSTRUCT._3
559601 then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount)))
560602 else {
561603 let stakedAmountNEW = (stakedAmount - amount)
562- let $t02440024558 = StatsResult(-(amount), if ((amount == stakedAmount))
604+ let $t02512225280 = StatsResult(-(amount), if ((amount == stakedAmount))
563605 then -1
564606 else 0, if ((amount == stakedAmount))
565607 then -1
566608 else 0)
567- let statsEntries = $t02440024558._1
568- let totalStaked = $t02440024558._2
569- let totalStakedNew = $t02440024558._3
609+ let statsEntries = $t02512225280._1
610+ let totalStaked = $t02512225280._2
611+ let totalStakedNew = $t02512225280._3
570612 (((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeight)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeight)) ++ statsEntries) ++ onUnstake(userAddressStr, amount)._1)
571613 }
572614 }
584626 let depositNumNew = (depositNumLast + 1)
585627 let totalsKEY = keyStatsDepositAmtTotals()
586628 let byDayKEY = keyStatsDepositAmtByDay(toStartOfDay(lastBlock.timestamp))
587- let currTotals = split(valueOrElse(getString(totalsKEY), defaultTotalsDATA), SEP)
588- let currByDay = split(valueOrElse(getString(byDayKEY), defaultTotalsDATA), SEP)
629+ let currTotals = padList(split(valueOrElse(getString(totalsKEY), defaultTotalsDATA), SEP))
589630 func dep (acc,pmt) = {
590631 let amount = pmt.amount
591632 let pmtAssetIdStr = toBase58String(valueOrElse(pmt.assetId, WAVESID))
614655 $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)
615656 }
616657 func refreshRewardUpdateTotals (accum,nextAsset) = {
617- let k = accum._4
658+ let k = accum._3
618659 let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0")
619660 let idx = indexOf(pmtsResult._2, nextAsset)
620661 let sum = if (isDefined(idx))
621662 then {
622663 let j = value(idx)
623664 let statsDelta = pmtsResult._4[j]
624- $Tuple3(toString((parseBigIntValue(sumLastStr) + pmtsResult._3[j])), toString((parseIntValue(currTotals[(k + 1)]) + statsDelta)), toString((parseIntValue(currByDay[(k + 1)]) + statsDelta)))
665+ $Tuple2(toString((parseBigIntValue(sumLastStr) + pmtsResult._3[j])), toString((parseIntValue(currTotals[(k + 1)]) + statsDelta)))
625666 }
626- else $Tuple3(sumLastStr, currTotals[(k + 1)], currByDay[(k + 1)])
627- $Tuple4((accum._1 :+ StringEntry(keyRewardPerNsbtSumAt(depositNumNew, nextAsset), sum._1)), ((accum._2 + SEP) + sum._2), ((accum._3 + SEP) + sum._3), (k + 1))
667+ else $Tuple2(sumLastStr, currTotals[(k + 1)])
668+ $Tuple3((accum._1 :+ StringEntry(keyRewardPerNsbtSumAt(depositNumNew, nextAsset), sum._1)), ((accum._2 + SEP) + sum._2), (k + 1))
628669 }
629670
630671 let assetsResult = {
631672 let $l = supportedAssetsList
632673 let $s = size($l)
633- let $acc0 = $Tuple4(nil, DepositTotalsPREFIX, DepositTotalsPREFIX, 0)
674+ let $acc0 = $Tuple3(nil, DepositTotalsPREFIX, 0)
634675 func $f1_1 ($a,$i) = if (($i >= $s))
635676 then $a
636677 else refreshRewardUpdateTotals($a, $l[$i])
641682
642683 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9)
643684 }
644- $Tuple2((((((pmtsResult._1 ++ assetsResult._1) ++ updateTotals()) :+ IntegerEntry(depositNumLastKEY, depositNumNew)) :+ StringEntry(totalsKEY, assetsResult._2)) :+ StringEntry(byDayKEY, assetsResult._3)), depositNumNew)
685+ let totals = padString(assetsResult._2)
686+ $Tuple2((((((pmtsResult._1 ++ assetsResult._1) ++ updateTotals()) :+ IntegerEntry(depositNumLastKEY, depositNumNew)) :+ StringEntry(totalsKEY, totals)) :+ StringEntry(byDayKEY, totals)), depositNumNew)
645687 }
646688 }
647689
678720 }
679721 else {
680722 let userAddress = addressFromStringValue(userAddressStr)
681- let $t02848428589 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
682- let isNewUser = $t02848428589._1
683- let stakedAmount = $t02848428589._2
684- let stakingStart = $t02848428589._3
723+ let $t02910429209 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
724+ let isNewUser = $t02910429209._1
725+ let stakedAmount = $t02910429209._2
726+ let stakingStart = $t02910429209._3
685727 let stakedAmountX = toBigInt(stakedAmount)
686728 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
687729 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
688730 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
689731 func forEachAssetCalcUnclaimedReward (accum,asset) = {
690- let $t02893529073 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
691- let rewardTotal = $t02893529073._1
692- let cached = $t02893529073._2
693- let dynamic = $t02893529073._3
694- let rewardCachedPartKEY = $t02893529073._4
732+ let $t02955529693 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
733+ let rewardTotal = $t02955529693._1
734+ let cached = $t02955529693._2
735+ let dynamic = $t02955529693._3
736+ let rewardCachedPartKEY = $t02955529693._4
695737 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
696738 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
697739 }
Full:
OldNewDifferences
11 {-# 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 DEFAULTPERIOD = (1440 * 14)
2525
2626 let IdxControlCfgNeutrinoDapp = 1
2727
2828 let IdxControlCfgAuctionDapp = 2
2929
3030 let IdxControlCfgRpdDapp = 3
3131
3232 let IdxControlCfgMathDapp = 4
3333
3434 let IdxControlCfgLiquidationDapp = 5
3535
3636 let IdxControlCfgRestDapp = 6
3737
3838 let IdxControlCfgNodeRegistryDapp = 7
3939
4040 let IdxControlCfgNsbtStakingDapp = 8
4141
4242 let IdxControlCfgMediatorDapp = 9
4343
4444 let IdxControlCfgSurfStakingDapp = 10
4545
4646 let IdxControlCfgGnsbtControllerDapp = 11
4747
4848 let IdxControlCfgRestV2Dapp = 12
4949
5050 let IdxControlCfgGovernanceDapp = 13
5151
5252 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
5353
5454
5555 func keyControlAddress () = "%s%s__config__controlAddress"
5656
5757
5858 func keyControlCfg () = "%s__controlConfig"
5959
6060
6161 func keyGnsbtFromSurfCoeff () = "%s%s__cfg__gnsbtFromSurfCoeff"
6262
6363
6464 func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP)
6565
6666
6767 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
6868
6969
7070 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
7171
7272 let controlCfg = readControlCfgOrFail(controlContract)
7373
7474 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
7575
7676 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
7777
7878 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
7979
8080 let govContract = getContractAddressOrFail(controlCfg, IdxControlCfgGovernanceDapp)
8181
8282 let gnsbtFromSurfCoeff = valueOrElse(getInteger(this, keyGnsbtFromSurfCoeff()), 300)
8383
8484 func keyBondAsset () = "bond_asset_id"
8585
8686
8787 func keyAuctionContractAddress () = "auction_contract"
8888
8989
9090 func keyMinLockAmount () = "%s__minLockAmount"
9191
9292
9393 func keyStakedAssetId () = "%s__stakedAssetId"
9494
9595
9696 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator)
9797
9898
9999 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator)
100100
101101
102102 func keyLockParamVotingPowerEffectiveHeight (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "vpEffectiveHeight"], separator)
103103
104104
105105 func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator)
106106
107107
108108 func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator)
109109
110110
111111 func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator)
112112
113113
114114 func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator)
115115
116116
117117 func keyStatsDepositAmtByDay (timestamp) = makeString(["%s%s%d", "stats", "depositAmtByDay", toString(timestamp)], separator)
118118
119119
120120 func keyStatsDepositAmtTotals () = makeString(["%s%s%d", "stats", "depositAmtTotals"], separator)
121121
122122
123123 func keySupportedRewardAssets () = "supportedRewardAssets"
124124
125125
126126 func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator)
127127
128128
129129 func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator)
130130
131131
132132 func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator)
133133
134134
135135 func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator)
136136
137137
138138 func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator)
139139
140140
141141 func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator)
142142
143143
144144 func keyVpPeriodDuration () = makeString(["%s%s", "vp", "periodDuration"], separator)
145145
146146
147147 func keyLastTotalsPeriodProcessed () = makeString(["%s%s", "vp", "lastTotalsPeriodProcessed"], separator)
148148
149149
150150 func keyLastUserPeriodProcessed (userAddress) = makeString(["%s%s%s", "vp", "lastUserPeriodProcessed", userAddress], separator)
151151
152152
153153 func keyTotalMature () = makeString(["%s%s", "vp", "totalMature"], separator)
154154
155155
156156 func keyTotalTeen () = makeString(["%s%s", "vp", "totalTeen"], separator)
157157
158158
159159 func keyTotalKid () = makeString(["%s%s", "vp", "totalKid"], separator)
160160
161161
162162 func keyUserMature (userAddress) = makeString(["%s%s%s", "vp", "userMature", userAddress], separator)
163163
164164
165165 func keyUserTeen (userAddress) = makeString(["%s%s%s", "vp", "userTeen", userAddress], separator)
166166
167167
168168 func keyUserKid (userAddress) = makeString(["%s%s%s", "vp", "userKid", userAddress], separator)
169169
170170
171171 func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult)
172172
173173
174174 func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0)
175175
176176
177177 func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
178178
179179
180180 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined"))
181181
182182
183183 func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal)
184184
185185
186186 func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr))
187187
188188
189189 func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR))
190190 then unit
191191 else fromBase58String(assetStr)
192192
193193
194194 func asInt (val) = match val {
195195 case valInt: Int =>
196196 valInt
197197 case _ =>
198198 throw("fail to cast into Int")
199199 }
200200
201201
202202 func asSwapParamsSTRUCT (v) = match v {
203203 case struct: (Int, Int, Int, Int, Int, Int, Int) =>
204204 struct
205205 case _ =>
206206 throw("fail to cast into Int")
207207 }
208208
209209
210210 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)
211211
212212
213213 func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator)
214214
215215
216216 func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart))
217217
218218
219219 func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards))
220220
221221
222222 func StatsResult (totalLockedInc,lockCountInc,usersCountInc) = {
223223 let locksCount = getIntOrZero(keyStatsLocksCount())
224224 let usersCount = getIntOrZero(keyStatsUsersCount())
225225 let totalAmount = getIntOrZero(keyLockParamTotalAmount())
226226 let totalAmountNew = (totalAmount + totalLockedInc)
227227 $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)], totalAmount, totalAmountNew)
228228 }
229229
230230
231231 func LockParamsEntry (userAddress,amount,votingPowerEffectiveHeight) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), votingPowerEffectiveHeight)]
232232
233233
234234 func getParamsOrFail () = $Tuple2(fromBase58String(getStringOrFail(this, keyStakedAssetId())), getIntOrFail(keyMinLockAmount()))
235235
236236
237237 func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0)
238238
239239
240240 func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress))
241241 then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress)))
242242 else unit
243243
244244
245245 func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined"))
246246
247247
248248 let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "")
249249
250250 let supportedAssetsList = split(supportedAssetsStr, "_")
251251
252252 func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = {
253253 let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId)
254254 let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0"))
255255 let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0"))
256256 let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18))
257257 let rewardCachedPartKEY = keyReward(userAddress, assetId)
258258 let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0)
259259 $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY)
260260 }
261261
262262
263263 func toStartOfDay (timestamp) = ((timestamp / DAYMILLIS) * DAYMILLIS)
264264
265265
266266 func findElementPosition (src,element,sep) = {
267267 let elementStart = valueOrErrorMessage(indexOf(src, element), ((("there is no substring " + element) + " in ") + src))
268268 if ((elementStart == 0))
269269 then 0
270270 else {
271271 let left = take(src, elementStart)
272272 (size(split(left, sep)) - 1)
273273 }
274274 }
275275
276276
277277 let DepositTotalsPREFIX = "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d"
278278
279279 let defaultTotalsDATA = (DepositTotalsPREFIX + "__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0")
280280
281+func padList (in) = {
282+ let currSize = (size(in) - 1)
283+ func listPadder (acc,idx) = if ((currSize > idx))
284+ then acc
285+ else (acc :+ "0")
286+
287+ let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
288+ let $s = size($l)
289+ let $acc0 = in
290+ func $f0_1 ($a,$i) = if (($i >= $s))
291+ then $a
292+ else listPadder($a, $l[$i])
293+
294+ func $f0_2 ($a,$i) = if (($i >= $s))
295+ then $a
296+ else throw("List size exceeds 18")
297+
298+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18)
299+ }
300+
301+
302+func padString (in) = {
303+ let currSize = (size(split_4C(in, SEP)) - 1)
304+ func strPadder (acc,idx) = if ((currSize > idx))
305+ then acc
306+ else (acc + "__0")
307+
308+ let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
309+ let $s = size($l)
310+ let $acc0 = in
311+ func $f0_1 ($a,$i) = if (($i >= $s))
312+ then $a
313+ else strPadder($a, $l[$i])
314+
315+ func $f0_2 ($a,$i) = if (($i >= $s))
316+ then $a
317+ else throw("List size exceeds 18")
318+
319+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18)
320+ }
321+
322+
281323 func RewardEntries (isNewUser,userAddress,stakedAmount) = {
282324 let stakedAmountX = toBigInt(stakedAmount)
283325 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress)
284326 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
285327 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
286328 func forEachAssetCacheUserReward (accum,asset) = {
287- let $t01083110966 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
288- let rewardTotal = $t01083110966._1
289- let cached = $t01083110966._2
290- let dynamic = $t01083110966._3
291- let rewardCachedPartKEY = $t01083110966._4
329+ let $t01155311688 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
330+ let rewardTotal = $t01155311688._1
331+ let cached = $t01155311688._2
332+ let dynamic = $t01155311688._3
333+ let rewardCachedPartKEY = $t01155311688._4
292334 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
293335 }
294336
295337 if (if ((depositNumLast == -1))
296338 then (depositNumUser == -1)
297339 else false)
298340 then nil
299341 else if (if ((depositNumLast == -1))
300342 then (depositNumUser > -1)
301343 else false)
302344 then throw("invalid depositNumLast and depositNumUser state")
303345 else if (if ((depositNumLast > -1))
304346 then (depositNumUser >= -1)
305347 else false)
306348 then if (isNewUser)
307349 then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)]
308350 else ({
309351 let $l = supportedAssetsList
310352 let $s = size($l)
311353 let $acc0 = nil
312354 func $f0_1 ($a,$i) = if (($i >= $s))
313355 then $a
314356 else forEachAssetCacheUserReward($a, $l[$i])
315357
316358 func $f0_2 ($a,$i) = if (($i >= $s))
317359 then $a
318360 else throw("List size exceeds 9")
319361
320362 $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)
321363 } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast))
322364 else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser)))
323365 }
324366
325367
326368 func IncrementNotDistributedRewardEntry (tkn,amountInc) = {
327369 let notDistributedRewardKEY = keyNotDistributedReward(tkn)
328370 let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0)
329371 IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))
330372 }
331373
332374
333375 func surfToGnsbt (surfAmt) = (surfAmt / gnsbtFromSurfCoeff)
334376
335377
336378 func mergeStake (userAddress,amountToAdd,userTeen,userKid) = {
337- let $t01388713997 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
338- let isNewUser = $t01388713997._1
339- let stakedAmount = $t01388713997._2
340- let vpEffectiveHeight = $t01388713997._3
379+ let $t01460914719 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
380+ let isNewUser = $t01460914719._1
381+ let stakedAmount = $t01460914719._2
382+ let vpEffectiveHeight = $t01460914719._3
341383 let stakedAmountNEW = if (isNewUser)
342384 then amountToAdd
343385 else (amountToAdd + stakedAmount)
344386 let W2 = getIntOrElse(keyVpPeriodDuration(), DEFAULTPERIOD)
345387 let period = (height / W2)
346388 let vpEffectivePeriodNEW = if ((userKid > 0))
347389 then (period + 2)
348390 else if ((userTeen > 0))
349391 then (period + 1)
350392 else period
351393 $Tuple5(isNewUser, stakedAmount, vpEffectiveHeight, stakedAmountNEW, (vpEffectivePeriodNEW * W2))
352394 }
353395
354396
355397 func updateTotals () = {
356398 let period = (height / getIntOrElse(keyVpPeriodDuration(), DEFAULTPERIOD))
357399 if ((period > getIntOrZero(keyLastTotalsPeriodProcessed())))
358400 then {
359401 let totalMature = valueOrElse(getInteger(keyTotalMature()), getIntOrZero(keyLockParamTotalAmount()))
360402 [IntegerEntry(keyTotalMature(), (totalMature + getIntOrZero(keyTotalTeen()))), IntegerEntry(keyTotalTeen(), getIntOrZero(keyTotalKid())), IntegerEntry(keyTotalKid(), 0), IntegerEntry(keyLastTotalsPeriodProcessed(), period)]
361403 }
362404 else nil
363405 }
364406
365407
366408 func onStake (userAddressStr,amountToAdd) = if ((0 > amountToAdd))
367409 then throw("amountToAdd should be >= 0")
368410 else {
369411 let W2 = getIntOrElse(keyVpPeriodDuration(), DEFAULTPERIOD)
370412 let period = (height / W2)
371413 let totalMature = valueOrElse(getInteger(keyTotalMature()), getIntOrZero(keyLockParamTotalAmount()))
372414 let totalTeen = getIntOrZero(keyTotalTeen())
373415 let totalKid = getIntOrZero(keyTotalKid())
374416 let userMature = if ((userAddressStr == ""))
375417 then 0
376418 else valueOrElse(getInteger(keyUserMature(userAddressStr)), getIntOrZero(keyLockParamUserAmount(addressFromStringValue(userAddressStr))))
377419 let userTeen = getIntOrZero(keyUserTeen(userAddressStr))
378420 let userKid = getIntOrZero(keyUserKid(userAddressStr))
379421 let tmp = if ((period > getIntOrZero(keyLastUserPeriodProcessed(userAddressStr))))
380422 then $Tuple7((totalMature + userTeen), (totalTeen + (userKid - userTeen)), (totalKid - userKid), (userMature + userTeen), userKid, 0, [IntegerEntry(keyLastUserPeriodProcessed(userAddressStr), period)])
381423 else $Tuple7(totalMature, totalTeen, totalKid, userMature, userTeen, userKid, nil)
382424 let totals = if ((period > getIntOrZero(keyLastTotalsPeriodProcessed())))
383425 then $Tuple4([IntegerEntry(keyTotalMature(), (tmp._1 + tmp._2)), IntegerEntry(keyTotalTeen(), tmp._3), IntegerEntry(keyTotalKid(), 0), IntegerEntry(keyLastTotalsPeriodProcessed(), period)], (tmp._1 + tmp._2), tmp._3, 0)
384426 else $Tuple4(nil, totalMature, totalTeen, totalKid)
385427 let newKid = fraction(amountToAdd, (height % W2), W2)
386428 let newTeen = (amountToAdd - newKid)
387429 $Tuple7(((((totals._1 :+ IntegerEntry(keyUserMature(userAddressStr), tmp._4)) :+ IntegerEntry(keyUserTeen(userAddressStr), (tmp._5 + newTeen))) :+ IntegerEntry(keyUserKid(userAddressStr), (tmp._6 + newKid))) ++ tmp._7), totals._2, totals._3, totals._4, tmp._4, (tmp._5 + newTeen), (tmp._6 + newKid))
388430 }
389431
390432
391433 let IdxNewDiff = 0
392434
393435 let IdxNewGnsbt = 1
394436
395437 func userDecrease (gnsbt,diff) = if ((diff >= gnsbt))
396438 then [(diff - gnsbt), 0]
397439 else [0, (gnsbt - diff)]
398440
399441
400442 func onUnstake (userAddressStr,amountToRemove) = if ((0 >= amountToRemove))
401443 then throw("amountToRemove should be > 0")
402444 else {
403445 let W2 = getIntOrElse(keyVpPeriodDuration(), DEFAULTPERIOD)
404446 let period = (height / W2)
405447 let totalMature = valueOrElse(getInteger(keyTotalMature()), getIntOrZero(keyLockParamTotalAmount()))
406448 let totalTeen = getIntOrZero(keyTotalTeen())
407449 let totalKid = getIntOrZero(keyTotalKid())
408450 let userMature = if ((userAddressStr == ""))
409451 then 0
410452 else valueOrElse(getInteger(keyUserMature(userAddressStr)), getIntOrZero(keyLockParamUserAmount(addressFromStringValue(userAddressStr))))
411453 let userTeen = getIntOrZero(keyUserTeen(userAddressStr))
412454 let userKid = getIntOrZero(keyUserKid(userAddressStr))
413455 let um = userDecrease(userMature, amountToRemove)
414456 let ut = userDecrease(userTeen, um[IdxNewDiff])
415457 let uk = userDecrease(userKid, ut[IdxNewDiff])
416458 if ((uk[IdxNewDiff] != 0))
417459 then throw("Should not happen")
418460 else {
419461 let tmp = if ((period > getIntOrZero(keyLastUserPeriodProcessed(userAddressStr))))
420462 then $Tuple7((totalMature + ut[IdxNewGnsbt]), (totalTeen + (uk[IdxNewGnsbt] - ut[IdxNewGnsbt])), (totalKid - uk[IdxNewGnsbt]), (um[IdxNewGnsbt] + ut[IdxNewGnsbt]), uk[IdxNewGnsbt], 0, [IntegerEntry(keyLastUserPeriodProcessed(userAddressStr), period)])
421463 else $Tuple7(totalMature, totalTeen, totalKid, um[IdxNewGnsbt], ut[IdxNewGnsbt], uk[IdxNewGnsbt], nil)
422464 let totals = if ((period > getIntOrZero(keyLastTotalsPeriodProcessed())))
423465 then $Tuple4([IntegerEntry(keyTotalMature(), (tmp._1 + tmp._2)), IntegerEntry(keyTotalTeen(), tmp._3), IntegerEntry(keyTotalKid(), 0), IntegerEntry(keyLastTotalsPeriodProcessed(), period)], (tmp._1 + tmp._2), tmp._3, 0)
424466 else $Tuple4(nil, totalMature, totalTeen, totalKid)
425467 $Tuple7(((((totals._1 :+ IntegerEntry(keyUserMature(userAddressStr), tmp._4)) :+ IntegerEntry(keyUserTeen(userAddressStr), tmp._5)) :+ IntegerEntry(keyUserKid(userAddressStr), tmp._6)) ++ tmp._7), totals._2, totals._3, totals._4, tmp._4, tmp._5, tmp._6)
426468 }
427469 }
428470
429471
430472 func commonStake (userAddress,i) = {
431- let $t01988419938 = getParamsOrFail()
432- let stakedAssetId = $t01988419938._1
433- let minLockAmount = $t01988419938._2
473+ let $t02060620660 = getParamsOrFail()
474+ let stakedAssetId = $t02060620660._1
475+ let minLockAmount = $t02060620660._2
434476 if ((size(i.payments) != 1))
435477 then throw("Invalid payments size")
436478 else {
437479 let payment = i.payments[0]
438480 let amount = payment.amount
439481 let invalidAssetMessage = (("Invalid asset. " + toBase58String(stakedAssetId)) + " is expected")
440482 let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage)
441483 if ((assetId != stakedAssetId))
442484 then throw(invalidAssetMessage)
443485 else {
444486 let userAddressStr = toString(userAddress)
445487 let r = onStake(userAddressStr, amount)
446488 let mergedData = mergeStake(userAddress, amount, r._6, r._7)
447489 let isNewUser = mergedData._1
448490 let stakedAmount = mergedData._2
449491 let vpEffectiveHeight = mergedData._3
450492 let stakedAmountNEW = mergedData._4
451493 let vpEffectiveHeightNEW = mergedData._5
452494 if ((minLockAmount > stakedAmountNEW))
453495 then throw(("Min lock amount is " + toString(minLockAmount)))
454496 else {
455- let $t02079220894 = StatsResult(amount, 1, if (isNewUser)
497+ let $t02151421616 = StatsResult(amount, 1, if (isNewUser)
456498 then 1
457499 else 0)
458- let statsEntries = $t02079220894._1
459- let totalStaked = $t02079220894._2
460- let totalStakedNew = $t02079220894._3
500+ let statsEntries = $t02151421616._1
501+ let totalStaked = $t02151421616._2
502+ let totalStakedNew = $t02151421616._3
461503 (((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeightNEW)) ++ statsEntries) ++ r._1)
462504 }
463505 }
464506 }
465507 }
466508
467509
468510 func commonClaim (userAddress,i) = {
469511 let userAddressStr = toString(userAddress)
470512 if ((size(i.payments) > 0))
471513 then throw("payments are not accepted")
472514 else {
473- let $t02140121506 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
474- let isNewUser = $t02140121506._1
475- let stakedAmount = $t02140121506._2
476- let stakingStart = $t02140121506._3
515+ let $t02212322228 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
516+ let isNewUser = $t02212322228._1
517+ let stakedAmount = $t02212322228._2
518+ let stakingStart = $t02212322228._3
477519 let stakedAmountX = toBigInt(stakedAmount)
478520 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
479521 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
480522 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
481523 func forEachAssetCalcUnclaimedReward (accum,asset) = {
482- let $t02187722015 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
483- let rewardTotal = $t02187722015._1
484- let cached = $t02187722015._2
485- let dynamic = $t02187722015._3
486- let rewardCachedPartKEY = $t02187722015._4
524+ let $t02259922737 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
525+ let rewardTotal = $t02259922737._1
526+ let cached = $t02259922737._2
527+ let dynamic = $t02259922737._3
528+ let rewardCachedPartKEY = $t02259922737._4
487529 let claimedKEY = keyClaimed(userAddressStr, asset)
488- let $t02207522112 = accum
489- let data = $t02207522112._1
490- let claimedAmtByAsset = $t02207522112._2
530+ let $t02279722834 = accum
531+ let data = $t02279722834._1
532+ let claimedAmtByAsset = $t02279722834._2
491533 let newPart = makeString([asset, toString(rewardTotal)], ":")
492534 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
493535 if ((0 >= rewardTotal))
494536 then $Tuple2(data, claimedAmtByAssetNew)
495537 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
496538 }
497539
498- let $t02257222685 = {
540+ let $t02329423407 = {
499541 let $l = supportedAssetsList
500542 let $s = size($l)
501543 let $acc0 = $Tuple2(nil, "")
502544 func $f0_1 ($a,$i) = if (($i >= $s))
503545 then $a
504546 else forEachAssetCalcUnclaimedReward($a, $l[$i])
505547
506548 func $f0_2 ($a,$i) = if (($i >= $s))
507549 then $a
508550 else throw("List size exceeds 9")
509551
510552 $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)
511553 }
512- let transfers = $t02257222685._1
513- let claimedAmtByAssetResult = $t02257222685._2
554+ let transfers = $t02329423407._1
555+ let claimedAmtByAssetResult = $t02329423407._2
514556 if ((0 >= size(transfers)))
515557 then $Tuple2(nil, 0)
516558 else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers))
517559 }
518560 }
519561
520562
521563 @Callable(i)
522564 func constructorV1 (minLockAmount,supportedRewardAssets,stakedAssetId) = if ((i.caller != this))
523565 then throw("Permission denied")
524566 else [IntegerEntry(keyMinLockAmount(), minLockAmount), StringEntry(keySupportedRewardAssets(), supportedRewardAssets), StringEntry(keyStakedAssetId(), stakedAssetId)]
525567
526568
527569
528570 @Callable(i)
529571 func stake () = commonStake(i.caller, i)
530572
531573
532574
533575 @Callable(i)
534576 func stakeByOriginCaller () = commonStake(i.originCaller, i)
535577
536578
537579
538580 @Callable(i)
539581 func unstake (amount) = if ((size(i.payments) != 0))
540582 then throw("unstake doesn't require any payment")
541583 else {
542584 let userAddress = i.caller
543585 let userAddressStr = toString(userAddress)
544- let $t02362123675 = getParamsOrFail()
545- let stakedAssetId = $t02362123675._1
546- let minLockAmount = $t02362123675._2
547- let $t02367823762 = getUserParamsOrFail(userAddress)
548- let isNewUser = $t02367823762._1
549- let stakedAmount = $t02367823762._2
550- let vpEffectiveHeight = $t02367823762._3
586+ let $t02434324397 = getParamsOrFail()
587+ let stakedAssetId = $t02434324397._1
588+ let minLockAmount = $t02434324397._2
589+ let $t02440024484 = getUserParamsOrFail(userAddress)
590+ let isNewUser = $t02440024484._1
591+ let stakedAmount = $t02440024484._2
592+ let vpEffectiveHeight = $t02440024484._3
551593 let swapParamsSTRUCT = asSwapParamsSTRUCT(reentrantInvoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil))
552594 let swapLimitSpentInUsdn = swapParamsSTRUCT._2
553595 let blcks2LmtReset = swapParamsSTRUCT._3
554596 if ((swapLimitSpentInUsdn > 0))
555597 then throw((("You have already made a swap operation. Wait " + toString((height + blcks2LmtReset))) + " height to unstake"))
556598 else if ((0 >= stakedAmount))
557599 then throw("Nothing to unstake")
558600 else if ((amount > stakedAmount))
559601 then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount)))
560602 else {
561603 let stakedAmountNEW = (stakedAmount - amount)
562- let $t02440024558 = StatsResult(-(amount), if ((amount == stakedAmount))
604+ let $t02512225280 = StatsResult(-(amount), if ((amount == stakedAmount))
563605 then -1
564606 else 0, if ((amount == stakedAmount))
565607 then -1
566608 else 0)
567- let statsEntries = $t02440024558._1
568- let totalStaked = $t02440024558._2
569- let totalStakedNew = $t02440024558._3
609+ let statsEntries = $t02512225280._1
610+ let totalStaked = $t02512225280._2
611+ let totalStakedNew = $t02512225280._3
570612 (((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeight)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeight)) ++ statsEntries) ++ onUnstake(userAddressStr, amount)._1)
571613 }
572614 }
573615
574616
575617
576618 @Callable(i)
577619 func deposit () = {
578620 let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0)
579621 if ((0 > totalStaked))
580622 then throw("TODO: case is not supported")
581623 else {
582624 let depositNumLastKEY = keyDepositNumLast()
583625 let depositNumLast = getIntOrElse(depositNumLastKEY, -1)
584626 let depositNumNew = (depositNumLast + 1)
585627 let totalsKEY = keyStatsDepositAmtTotals()
586628 let byDayKEY = keyStatsDepositAmtByDay(toStartOfDay(lastBlock.timestamp))
587- let currTotals = split(valueOrElse(getString(totalsKEY), defaultTotalsDATA), SEP)
588- let currByDay = split(valueOrElse(getString(byDayKEY), defaultTotalsDATA), SEP)
629+ let currTotals = padList(split(valueOrElse(getString(totalsKEY), defaultTotalsDATA), SEP))
589630 func dep (acc,pmt) = {
590631 let amount = pmt.amount
591632 let pmtAssetIdStr = toBase58String(valueOrElse(pmt.assetId, WAVESID))
592633 if (!(contains(supportedAssetsStr, pmtAssetIdStr)))
593634 then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr))
594635 else if ((totalStaked == 0))
595636 then $Tuple4((acc._1 :+ IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount)), (acc._2 :+ pmtAssetIdStr), (acc._3 :+ toBigInt(0)), (acc._4 :+ amount))
596637 else {
597638 let rewardPerNsbtX18 = fraction(toBigInt(amount), MULTX18, toBigInt(totalStaked))
598639 $Tuple4(acc._1, (acc._2 :+ pmtAssetIdStr), (acc._3 :+ rewardPerNsbtX18), (acc._4 :+ amount))
599640 }
600641 }
601642
602643 let pmtsResult = {
603644 let $l = i.payments
604645 let $s = size($l)
605646 let $acc0 = $Tuple4(nil, nil, nil, nil)
606647 func $f0_1 ($a,$i) = if (($i >= $s))
607648 then $a
608649 else dep($a, $l[$i])
609650
610651 func $f0_2 ($a,$i) = if (($i >= $s))
611652 then $a
612653 else throw("List size exceeds 10")
613654
614655 $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)
615656 }
616657 func refreshRewardUpdateTotals (accum,nextAsset) = {
617- let k = accum._4
658+ let k = accum._3
618659 let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0")
619660 let idx = indexOf(pmtsResult._2, nextAsset)
620661 let sum = if (isDefined(idx))
621662 then {
622663 let j = value(idx)
623664 let statsDelta = pmtsResult._4[j]
624- $Tuple3(toString((parseBigIntValue(sumLastStr) + pmtsResult._3[j])), toString((parseIntValue(currTotals[(k + 1)]) + statsDelta)), toString((parseIntValue(currByDay[(k + 1)]) + statsDelta)))
665+ $Tuple2(toString((parseBigIntValue(sumLastStr) + pmtsResult._3[j])), toString((parseIntValue(currTotals[(k + 1)]) + statsDelta)))
625666 }
626- else $Tuple3(sumLastStr, currTotals[(k + 1)], currByDay[(k + 1)])
627- $Tuple4((accum._1 :+ StringEntry(keyRewardPerNsbtSumAt(depositNumNew, nextAsset), sum._1)), ((accum._2 + SEP) + sum._2), ((accum._3 + SEP) + sum._3), (k + 1))
667+ else $Tuple2(sumLastStr, currTotals[(k + 1)])
668+ $Tuple3((accum._1 :+ StringEntry(keyRewardPerNsbtSumAt(depositNumNew, nextAsset), sum._1)), ((accum._2 + SEP) + sum._2), (k + 1))
628669 }
629670
630671 let assetsResult = {
631672 let $l = supportedAssetsList
632673 let $s = size($l)
633- let $acc0 = $Tuple4(nil, DepositTotalsPREFIX, DepositTotalsPREFIX, 0)
674+ let $acc0 = $Tuple3(nil, DepositTotalsPREFIX, 0)
634675 func $f1_1 ($a,$i) = if (($i >= $s))
635676 then $a
636677 else refreshRewardUpdateTotals($a, $l[$i])
637678
638679 func $f1_2 ($a,$i) = if (($i >= $s))
639680 then $a
640681 else throw("List size exceeds 9")
641682
642683 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9)
643684 }
644- $Tuple2((((((pmtsResult._1 ++ assetsResult._1) ++ updateTotals()) :+ IntegerEntry(depositNumLastKEY, depositNumNew)) :+ StringEntry(totalsKEY, assetsResult._2)) :+ StringEntry(byDayKEY, assetsResult._3)), depositNumNew)
685+ let totals = padString(assetsResult._2)
686+ $Tuple2((((((pmtsResult._1 ++ assetsResult._1) ++ updateTotals()) :+ IntegerEntry(depositNumLastKEY, depositNumNew)) :+ StringEntry(totalsKEY, totals)) :+ StringEntry(byDayKEY, totals)), depositNumNew)
645687 }
646688 }
647689
648690
649691
650692 @Callable(i)
651693 func claimRewards () = commonClaim(i.caller, i)
652694
653695
654696
655697 @Callable(i)
656698 func claimRewardsByOriginCaller () = commonClaim(i.originCaller, i)
657699
658700
659701
660702 @Callable(i)
661703 func unclaimedRewardsREADONLY (userAddressStr) = {
662704 func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_")
663705
664706 let unclaimedRewardStr = if ((userAddressStr == ""))
665707 then {
666708 let $l = supportedAssetsList
667709 let $s = size($l)
668710 let $acc0 = ""
669711 func $f0_1 ($a,$i) = if (($i >= $s))
670712 then $a
671713 else forEachAssetZeroReward($a, $l[$i])
672714
673715 func $f0_2 ($a,$i) = if (($i >= $s))
674716 then $a
675717 else throw("List size exceeds 9")
676718
677719 $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)
678720 }
679721 else {
680722 let userAddress = addressFromStringValue(userAddressStr)
681- let $t02848428589 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
682- let isNewUser = $t02848428589._1
683- let stakedAmount = $t02848428589._2
684- let stakingStart = $t02848428589._3
723+ let $t02910429209 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
724+ let isNewUser = $t02910429209._1
725+ let stakedAmount = $t02910429209._2
726+ let stakingStart = $t02910429209._3
685727 let stakedAmountX = toBigInt(stakedAmount)
686728 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
687729 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
688730 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
689731 func forEachAssetCalcUnclaimedReward (accum,asset) = {
690- let $t02893529073 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
691- let rewardTotal = $t02893529073._1
692- let cached = $t02893529073._2
693- let dynamic = $t02893529073._3
694- let rewardCachedPartKEY = $t02893529073._4
732+ let $t02955529693 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
733+ let rewardTotal = $t02955529693._1
734+ let cached = $t02955529693._2
735+ let dynamic = $t02955529693._3
736+ let rewardCachedPartKEY = $t02955529693._4
695737 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
696738 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
697739 }
698740
699741 let $l = supportedAssetsList
700742 let $s = size($l)
701743 let $acc0 = ""
702744 func $f0_1 ($a,$i) = if (($i >= $s))
703745 then $a
704746 else forEachAssetCalcUnclaimedReward($a, $l[$i])
705747
706748 func $f0_2 ($a,$i) = if (($i >= $s))
707749 then $a
708750 else throw("List size exceeds 9")
709751
710752 $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)
711753 }
712754 $Tuple2(nil, dropRight(unclaimedRewardStr, 1))
713755 }
714756
715757
716758
717759 @Callable(i)
718760 func updateVotingPower (userAddressStr) = if (!(isDefined(addressFromString(userAddressStr))))
719761 then throw("Invalid user address")
720762 else {
721763 let r = onStake(userAddressStr, 0)
722764 $Tuple2(r._1, [surfToGnsbt(r._2), surfToGnsbt(r._3), surfToGnsbt(r._4), surfToGnsbt(r._5), surfToGnsbt(r._6), surfToGnsbt(r._7)])
723765 }
724766
725767
726768
727769 @Callable(i)
728770 func surfStakingSYSREADONLY (userAddressStrOrEmpty,surfDiff) = {
729771 let surfTotal = getIntOrElse(keyLockParamTotalAmount(), 0)
730772 let gnsbtFromSurfTotal = surfToGnsbt(surfTotal)
731773 let r = if ((surfDiff >= 0))
732774 then onStake(userAddressStrOrEmpty, surfDiff)
733775 else onUnstake(userAddressStrOrEmpty, -(surfDiff))
734776 if ((userAddressStrOrEmpty == ""))
735777 then $Tuple2(nil, [0, surfTotal, 0, gnsbtFromSurfTotal, height, height, surfToGnsbt(r._2), surfToGnsbt(r._3), surfToGnsbt(r._4), surfToGnsbt(r._5), surfToGnsbt(r._6), surfToGnsbt(r._7)])
736778 else {
737779 let userAddress = toAddressOrFail(userAddressStrOrEmpty)
738780 let mergedData = mergeStake(userAddress, surfDiff, r._6, r._7)
739781 let stakedAmount = mergedData._2
740782 let vpEffectiveHeight = mergedData._3
741783 let stakedAmountNEW = mergedData._4
742784 let vpEffectiveHeightNEW = mergedData._5
743785 let surfUser = stakedAmount
744786 let gnsbtFromSurfUser = surfToGnsbt(surfUser)
745787 $Tuple2(nil, [surfUser, surfTotal, gnsbtFromSurfUser, gnsbtFromSurfTotal, vpEffectiveHeight, vpEffectiveHeightNEW, surfToGnsbt(r._2), surfToGnsbt(r._3), surfToGnsbt(r._4), surfToGnsbt(r._5), surfToGnsbt(r._6), surfToGnsbt(r._7)])
746788 }
747789 }
748790
749791
750792
751793 @Callable(i)
752794 func gnsbtFromSurfSYSREADONLY (surfAmt) = $Tuple2(nil, surfToGnsbt(surfAmt))
753795
754796
755797
756798 @Callable(i)
757799 func configSYSREADONLY () = {
758800 let minLockAmt = getIntegerValue(keyMinLockAmount())
759801 let surfVotingPowerRestrictivePeriod = DEFAULTPERIOD
760802 let brToStartSurfTransformation = 1150000
761803 $Tuple2(nil, [minLockAmt, (gnsbtFromSurfCoeff * MULT6), surfVotingPowerRestrictivePeriod, brToStartSurfTransformation])
762804 }
763805
764806

github/deemru/w8io/026f985 
138.35 ms