tx · E3yMgRXnYujy2oV8W5LDv98PeUamSkJTT1ZuDPSXTS8W

3MyN19SDzDpXyEtabWvag2P5mkeFrdFVd4h:  -0.01900000 Waves

2022.10.12 12:27 [2268960] smart account 3MyN19SDzDpXyEtabWvag2P5mkeFrdFVd4h > SELF 0.00000000 Waves

{ "type": 13, "id": "E3yMgRXnYujy2oV8W5LDv98PeUamSkJTT1ZuDPSXTS8W", "fee": 1900000, "feeAssetId": null, "timestamp": 1665566879072, "version": 2, "chainId": 84, "sender": "3MyN19SDzDpXyEtabWvag2P5mkeFrdFVd4h", "senderPublicKey": "4HqqczFwZHAsxp1oNq8dQkRStfCKBL79X99icQ2B6FYn", "proofs": [ "5SnETHWXsCv6wpPvFeh1E16c7dEMzSSHxZqsC1dPn9n81zPqY9ktxnAKn8vzZonxkNa3J9qySKSnyFgpzfABuQsM" ], "script": "base64:BgIlCAISBQoDAQgIEgASABIDCgEBEgASABIAEgMKAQgSBAoCCAESAEwAC3JldmlzaW9uTnVtAgAACXNlcGFyYXRvcgICX18AA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDgAgMLXLwAGTVVMVFg2CQC2AgEFBU1VTFQ2AAZNVUxUWDgJALYCAQUFTVVMVDgAB01VTFRYMTgJALYCAQCAgJC7utat8A0AGUlkeENvbnRyb2xDZmdOZXV0cmlub0RhcHAAAQAYSWR4Q29udHJvbENmZ0F1Y3Rpb25EYXBwAAIAFElkeENvbnRyb2xDZmdScGREYXBwAAMAFUlkeENvbnRyb2xDZmdNYXRoRGFwcAAEABxJZHhDb250cm9sQ2ZnTGlxdWlkYXRpb25EYXBwAAUAFUlkeENvbnRyb2xDZmdSZXN0RGFwcAAGAB1JZHhDb250cm9sQ2ZnTm9kZVJlZ2lzdHJ5RGFwcAAHABxJZHhDb250cm9sQ2ZnTnNidFN0YWtpbmdEYXBwAAgAGUlkeENvbnRyb2xDZmdNZWRpYXRvckRhcHAACQAcSWR4Q29udHJvbENmZ1N1cmZTdGFraW5nRGFwcA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AEFFXVzZXJBZGRyZXNzU3RyT3JFbXB0eQQKbWVyZ2VkRGF0YQkBCm1lcmdlU3Rha2UCBQt1c2VyQWRkcmVzcwUIdXNkbkRpZmYECWlzTmV3VXNlcggFCm1lcmdlZERhdGECXzEEDHN0YWtlZEFtb3VudAgFCm1lcmdlZERhdGECXzIEEXZwRWZmZWN0aXZlSGVpZ2h0CAUKbWVyZ2VkRGF0YQJfMwQPc3Rha2VkQW1vdW50TkVXCAUKbWVyZ2VkRGF0YQJfNAQUdnBFZmZlY3RpdmVIZWlnaHRORVcIBQptZXJnZWREYXRhAl81BAh1c2RuVXNlcgUMc3Rha2VkQW1vdW50CQCUCgIFA25pbAkAzAgCBQh1c2RuVXNlcgkAzAgCBQl1c2RuVG90YWwJAMwIAgAACQDMCAIAAAkAzAgCBRF2cEVmZmVjdGl2ZUhlaWdodAkAzAgCBRR2cEVmZmVjdGl2ZUhlaWdodE5FVwUDbmlsAWkBEWNvbmZpZ1NZU1JFQURPTkxZAAQKbWluTG9ja0FtdAkBEUBleHRyTmF0aXZlKDEwNTUpAQkBEGtleU1pbkxvY2tBbW91bnQACQCUCgIFA25pbAkAzAgCBQptaW5Mb2NrQW10BQNuaWwAgSQJWw==", "height": 2268960, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5izKXppfmhfDmuwJgSTaKuoXBSKL46hU5tXYvF5K4KFn Next: CG7KVqCcnKv6x8HarFkyTrUWRkxG6c1CMjuJ9uw5zoNC Diff:
OldNewDifferences
1616 let MULTX8 = toBigInt(MULT8)
1717
1818 let MULTX18 = toBigInt(1000000000000000000)
19-
20-let USDNIDSTR = "USDN"
21-
22-let USDNID = fromBase58String(USDNIDSTR)
2319
2420 let IdxControlCfgNeutrinoDapp = 1
2521
143139 func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr))
144140
145141
146-func toAssetVect (assetStr) = if ((assetStr == USDNIDSTR))
147- then unit
148- else fromBase58String(assetStr)
142+func toAssetVect (assetStr) = fromBase58String(assetStr)
149143
150144
151145 func asInt (val) = match val {
223217 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
224218 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
225219 func forEachAssetCacheUserReward (accum,asset) = {
226- let $t087978932 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
227- let rewardTotal = $t087978932._1
228- let cached = $t087978932._2
229- let dynamic = $t087978932._3
230- let rewardCachedPartKEY = $t087978932._4
220+ let $t086918826 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
221+ let rewardTotal = $t086918826._1
222+ let cached = $t086918826._2
223+ let dynamic = $t086918826._3
224+ let rewardCachedPartKEY = $t086918826._4
231225 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
232226 }
233227
284278
285279
286280 func mergeStake (userAddress,amountToAdd) = {
287- let $t01251712627 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
288- let isNewUser = $t01251712627._1
289- let stakedAmount = $t01251712627._2
290- let vpEffectiveHeight = $t01251712627._3
281+ let $t01241112521 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
282+ let isNewUser = $t01241112521._1
283+ let stakedAmount = $t01241112521._2
284+ let vpEffectiveHeight = $t01241112521._3
291285 let stakedAmountNEW = if (isNewUser)
292286 then amountToAdd
293287 else (amountToAdd + stakedAmount)
300294
301295
302296 func commonStake (userAddress,i) = {
303- let $t01311313167 = getParamsOrFail()
304- let stakedAssetId = $t01311313167._1
305- let minLockAmount = $t01311313167._2
297+ let $t01300713061 = getParamsOrFail()
298+ let stakedAssetId = $t01300713061._1
299+ let minLockAmount = $t01300713061._2
306300 if ((size(i.payments) != 1))
307301 then throw("Invalid payments size")
308302 else {
323317 if ((minLockAmount > stakedAmountNEW))
324318 then throw(("Min lock amount is " + toString(minLockAmount)))
325319 else {
326- let $t01396614068 = StatsResult(amount, 1, if (isNewUser)
320+ let $t01386013962 = StatsResult(amount, 1, if (isNewUser)
327321 then 1
328322 else 0)
329- let statsEntries = $t01396614068._1
330- let totalStaked = $t01396614068._2
331- let totalStakedNew = $t01396614068._3
323+ let statsEntries = $t01386013962._1
324+ let totalStaked = $t01386013962._2
325+ let totalStakedNew = $t01386013962._3
332326 ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeightNEW)) ++ statsEntries)
333327 }
334328 }
341335 if ((size(i.payments) > 0))
342336 then throw("payments are not accepted")
343337 else {
344- let $t01454714652 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
345- let isNewUser = $t01454714652._1
346- let stakedAmount = $t01454714652._2
347- let stakingStart = $t01454714652._3
338+ let $t01444114546 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
339+ let isNewUser = $t01444114546._1
340+ let stakedAmount = $t01444114546._2
341+ let stakingStart = $t01444114546._3
348342 let stakedAmountX = toBigInt(stakedAmount)
349343 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
350344 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
351345 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
352346 func forEachAssetCalcUnclaimedReward (accum,asset) = {
353- let $t01502315161 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
354- let rewardTotal = $t01502315161._1
355- let cached = $t01502315161._2
356- let dynamic = $t01502315161._3
357- let rewardCachedPartKEY = $t01502315161._4
347+ let $t01491715055 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
348+ let rewardTotal = $t01491715055._1
349+ let cached = $t01491715055._2
350+ let dynamic = $t01491715055._3
351+ let rewardCachedPartKEY = $t01491715055._4
358352 let claimedKEY = keyClaimed(userAddressStr, asset)
359- let $t01522115258 = accum
360- let data = $t01522115258._1
361- let claimedAmtByAsset = $t01522115258._2
353+ let $t01511515152 = accum
354+ let data = $t01511515152._1
355+ let claimedAmtByAsset = $t01511515152._2
362356 let newPart = makeString([asset, toString(rewardTotal)], ":")
363357 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
364358 if ((0 >= rewardTotal))
366360 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
367361 }
368362
369- let $t01571815832 = {
363+ let $t01561215726 = {
370364 let $l = supportedAssetsList
371365 let $s = size($l)
372366 let $acc0 = $Tuple2(nil, "")
380374
381375 $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)
382376 }
383- let transfers = $t01571815832._1
384- let claimedAmtByAssetResult = $t01571815832._2
377+ let transfers = $t01561215726._1
378+ let claimedAmtByAssetResult = $t01561215726._2
385379 if ((0 >= size(transfers)))
386380 then nil
387381 else ((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1)))
412406 else {
413407 let userAddress = i.caller
414408 let userAddressStr = toString(userAddress)
415- let $t01674116795 = getParamsOrFail()
416- let stakedAssetId = $t01674116795._1
417- let minLockAmount = $t01674116795._2
418- let $t01679816882 = getUserParamsOrFail(userAddress)
419- let isNewUser = $t01679816882._1
420- let stakedAmount = $t01679816882._2
421- let vpEffectiveHeight = $t01679816882._3
409+ let $t01663516689 = getParamsOrFail()
410+ let stakedAssetId = $t01663516689._1
411+ let minLockAmount = $t01663516689._2
412+ let $t01669216776 = getUserParamsOrFail(userAddress)
413+ let isNewUser = $t01669216776._1
414+ let stakedAmount = $t01669216776._2
415+ let vpEffectiveHeight = $t01669216776._3
422416 let swapParamsSTRUCT = asSwapParamsSTRUCT(reentrantInvoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil))
423417 let swapLimitSpentInUsdn = swapParamsSTRUCT._2
424418 let blcks2LmtReset = swapParamsSTRUCT._3
430424 then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount)))
431425 else {
432426 let stakedAmountNEW = (stakedAmount - amount)
433- let $t01752017678 = StatsResult(-(amount), if ((amount == stakedAmount))
427+ let $t01741417572 = StatsResult(-(amount), if ((amount == stakedAmount))
434428 then -1
435429 else 0, if ((amount == stakedAmount))
436430 then -1
437431 else 0)
438- let statsEntries = $t01752017678._1
439- let totalStaked = $t01752017678._2
440- let totalStakedNew = $t01752017678._3
432+ let statsEntries = $t01741417572._1
433+ let totalStaked = $t01741417572._2
434+ let totalStakedNew = $t01741417572._3
441435 ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeight)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeight)) ++ statsEntries)
442436 }
443437 }
450444 else {
451445 let pmt = i.payments[0]
452446 let amount = pmt.amount
453- let pmtAssetId = valueOrElse(pmt.assetId, USDNID)
447+ let pmtAssetId = value(pmt.assetId)
454448 let pmtAssetIdStr = toBase58String(pmtAssetId)
455- let pmtMultX = if ((pmtAssetId == USDNID))
456- then MULTX8
457- else MULTX6
449+ let pmtMultX = MULTX6
458450 let amountX = toBigInt(amount)
459451 let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0)
460452 let totalStakedX = toBigInt(totalStaked)
529521 }
530522 else {
531523 let userAddress = addressFromStringValue(userAddressStr)
532- let $t02025020355 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
533- let isNewUser = $t02025020355._1
534- let stakedAmount = $t02025020355._2
535- let stakingStart = $t02025020355._3
524+ let $t02008920194 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
525+ let isNewUser = $t02008920194._1
526+ let stakedAmount = $t02008920194._2
527+ let stakingStart = $t02008920194._3
536528 let stakedAmountX = toBigInt(stakedAmount)
537529 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
538530 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
539531 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
540532 func forEachAssetCalcUnclaimedReward (accum,asset) = {
541- let $t02070120839 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
542- let rewardTotal = $t02070120839._1
543- let cached = $t02070120839._2
544- let dynamic = $t02070120839._3
545- let rewardCachedPartKEY = $t02070120839._4
533+ let $t02054020678 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
534+ let rewardTotal = $t02054020678._1
535+ let cached = $t02054020678._2
536+ let dynamic = $t02054020678._3
537+ let rewardCachedPartKEY = $t02054020678._4
546538 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
547539 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
548540 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let revisionNum = ""
55
66 let separator = "__"
77
88 let SEP = "__"
99
1010 let MULT6 = 1000000
1111
1212 let MULT8 = 100000000
1313
1414 let MULTX6 = toBigInt(MULT6)
1515
1616 let MULTX8 = toBigInt(MULT8)
1717
1818 let MULTX18 = toBigInt(1000000000000000000)
19-
20-let USDNIDSTR = "USDN"
21-
22-let USDNID = fromBase58String(USDNIDSTR)
2319
2420 let IdxControlCfgNeutrinoDapp = 1
2521
2622 let IdxControlCfgAuctionDapp = 2
2723
2824 let IdxControlCfgRpdDapp = 3
2925
3026 let IdxControlCfgMathDapp = 4
3127
3228 let IdxControlCfgLiquidationDapp = 5
3329
3430 let IdxControlCfgRestDapp = 6
3531
3632 let IdxControlCfgNodeRegistryDapp = 7
3733
3834 let IdxControlCfgNsbtStakingDapp = 8
3935
4036 let IdxControlCfgMediatorDapp = 9
4137
4238 let IdxControlCfgSurfStakingDapp = 10
4339
4440 let IdxControlCfgGnsbtControllerDapp = 11
4541
4642 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
4743
4844
4945 func keyControlAddress () = "%s%s__config__controlAddress"
5046
5147
5248 func keyControlCfg () = "%s__controlConfig"
5349
5450
5551 func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP)
5652
5753
5854 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
5955
6056
6157 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3P5Bfd58PPfNvBM2Hy8QfbcDqMeNtzg7KfP"))
6258
6359 let controlCfg = readControlCfgOrFail(controlContract)
6460
6561 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
6662
6763 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
6864
6965 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
7066
7167 func keyBondAsset () = "bond_asset_id"
7268
7369
7470 func keyAuctionContractAddress () = "auction_contract"
7571
7672
7773 func keyMinLockAmount () = "%s__minLockAmount"
7874
7975
8076 func keyStakedAssetId () = "%s__stakedAssetId"
8177
8278
8379 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator)
8480
8581
8682 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator)
8783
8884
8985 func keyLockParamVotingPowerEffectiveHeight (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "vpEffectiveHeight"], separator)
9086
9187
9288 func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator)
9389
9490
9591 func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator)
9692
9793
9894 func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator)
9995
10096
10197 func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator)
10298
10399
104100 func keyNextPeriod () = "%s__nextPeriod"
105101
106102
107103 func keySupportedRewardAssets () = "supportedRewardAssets"
108104
109105
110106 func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator)
111107
112108
113109 func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator)
114110
115111
116112 func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator)
117113
118114
119115 func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator)
120116
121117
122118 func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator)
123119
124120
125121 func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator)
126122
127123
128124 func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult)
129125
130126
131127 func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0)
132128
133129
134130 func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal)
135131
136132
137133 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined"))
138134
139135
140136 func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal)
141137
142138
143139 func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr))
144140
145141
146-func toAssetVect (assetStr) = if ((assetStr == USDNIDSTR))
147- then unit
148- else fromBase58String(assetStr)
142+func toAssetVect (assetStr) = fromBase58String(assetStr)
149143
150144
151145 func asInt (val) = match val {
152146 case valInt: Int =>
153147 valInt
154148 case _ =>
155149 throw("fail to cast into Int")
156150 }
157151
158152
159153 func asSwapParamsSTRUCT (v) = match v {
160154 case struct: (Int, Int, Int, Int, Int, Int, Int) =>
161155 struct
162156 case _ =>
163157 throw("fail to cast into Int")
164158 }
165159
166160
167161 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)
168162
169163
170164 func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator)
171165
172166
173167 func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart))
174168
175169
176170 func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards))
177171
178172
179173 func StatsResult (totalLockedInc,lockCountInc,usersCountInc) = {
180174 let locksCount = getIntOrZero(keyStatsLocksCount())
181175 let usersCount = getIntOrZero(keyStatsUsersCount())
182176 let totalAmount = getIntOrZero(keyLockParamTotalAmount())
183177 let totalAmountNew = (totalAmount + totalLockedInc)
184178 $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)], totalAmount, totalAmountNew)
185179 }
186180
187181
188182 func LockParamsEntry (userAddress,amount,votingPowerEffectiveHeight) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), votingPowerEffectiveHeight)]
189183
190184
191185 func getParamsOrFail () = $Tuple2(fromBase58String(getStringOrFail(this, keyStakedAssetId())), getIntOrFail(keyMinLockAmount()))
192186
193187
194188 func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0)
195189
196190
197191 func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress))
198192 then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress)))
199193 else unit
200194
201195
202196 func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined"))
203197
204198
205199 let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "")
206200
207201 let supportedAssetsList = split(supportedAssetsStr, "_")
208202
209203 func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = {
210204 let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId)
211205 let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0"))
212206 let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0"))
213207 let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18))
214208 let rewardCachedPartKEY = keyReward(userAddress, assetId)
215209 let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0)
216210 $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY)
217211 }
218212
219213
220214 func RewardEntries (isNewUser,userAddress,stakedAmount) = {
221215 let stakedAmountX = toBigInt(stakedAmount)
222216 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress)
223217 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
224218 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
225219 func forEachAssetCacheUserReward (accum,asset) = {
226- let $t087978932 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
227- let rewardTotal = $t087978932._1
228- let cached = $t087978932._2
229- let dynamic = $t087978932._3
230- let rewardCachedPartKEY = $t087978932._4
220+ let $t086918826 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast)
221+ let rewardTotal = $t086918826._1
222+ let cached = $t086918826._2
223+ let dynamic = $t086918826._3
224+ let rewardCachedPartKEY = $t086918826._4
231225 (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal))
232226 }
233227
234228 if (if ((depositNumLast == -1))
235229 then (depositNumUser == -1)
236230 else false)
237231 then nil
238232 else if (if ((depositNumLast == -1))
239233 then (depositNumUser > -1)
240234 else false)
241235 then throw("invalid depositNumLast and depositNumUser state")
242236 else if (if ((depositNumLast > -1))
243237 then (depositNumUser >= -1)
244238 else false)
245239 then if (isNewUser)
246240 then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)]
247241 else ({
248242 let $l = supportedAssetsList
249243 let $s = size($l)
250244 let $acc0 = nil
251245 func $f0_1 ($a,$i) = if (($i >= $s))
252246 then $a
253247 else forEachAssetCacheUserReward($a, $l[$i])
254248
255249 func $f0_2 ($a,$i) = if (($i >= $s))
256250 then $a
257251 else throw("List size exceeds 10")
258252
259253 $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)
260254 } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast))
261255 else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser)))
262256 }
263257
264258
265259 func IncrementNotDistributedRewardEntry (tkn,amountInc) = {
266260 let notDistributedRewardKEY = keyNotDistributedReward(tkn)
267261 let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0)
268262 [IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))]
269263 }
270264
271265
272266 func mergeVotingPowerEffectiveHeight (quarantinePeriod,vpEffectiveHeight,stakedAmt,stakedAmtNEW) = {
273267 let remainingToWait = (vpEffectiveHeight - height)
274268 if ((0 >= remainingToWait))
275269 then (height + quarantinePeriod)
276270 else {
277271 let alreadyWaited = (quarantinePeriod - remainingToWait)
278272 let kX8 = if ((stakedAmtNEW != 0))
279273 then fraction(stakedAmt, MULT8, stakedAmtNEW)
280274 else vpEffectiveHeight
281275 ((quarantinePeriod + height) - fraction(alreadyWaited, kX8, MULT8))
282276 }
283277 }
284278
285279
286280 func mergeStake (userAddress,amountToAdd) = {
287- let $t01251712627 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
288- let isNewUser = $t01251712627._1
289- let stakedAmount = $t01251712627._2
290- let vpEffectiveHeight = $t01251712627._3
281+ let $t01241112521 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
282+ let isNewUser = $t01241112521._1
283+ let stakedAmount = $t01241112521._2
284+ let vpEffectiveHeight = $t01241112521._3
291285 let stakedAmountNEW = if (isNewUser)
292286 then amountToAdd
293287 else (amountToAdd + stakedAmount)
294288 let quarantinePeriod = (1440 * 14)
295289 let vpEffectiveHeightNEW = if (isNewUser)
296290 then (quarantinePeriod + height)
297291 else mergeVotingPowerEffectiveHeight(quarantinePeriod, vpEffectiveHeight, stakedAmount, stakedAmountNEW)
298292 $Tuple5(isNewUser, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)
299293 }
300294
301295
302296 func commonStake (userAddress,i) = {
303- let $t01311313167 = getParamsOrFail()
304- let stakedAssetId = $t01311313167._1
305- let minLockAmount = $t01311313167._2
297+ let $t01300713061 = getParamsOrFail()
298+ let stakedAssetId = $t01300713061._1
299+ let minLockAmount = $t01300713061._2
306300 if ((size(i.payments) != 1))
307301 then throw("Invalid payments size")
308302 else {
309303 let payment = i.payments[0]
310304 let amount = payment.amount
311305 let invalidAssetMessage = (("Invalid asset. " + toBase58String(stakedAssetId)) + " is expected")
312306 let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage)
313307 if ((assetId != stakedAssetId))
314308 then throw(invalidAssetMessage)
315309 else {
316310 let userAddressStr = toString(userAddress)
317311 let mergedData = mergeStake(userAddress, amount)
318312 let isNewUser = mergedData._1
319313 let stakedAmount = mergedData._2
320314 let vpEffectiveHeight = mergedData._3
321315 let stakedAmountNEW = mergedData._4
322316 let vpEffectiveHeightNEW = mergedData._5
323317 if ((minLockAmount > stakedAmountNEW))
324318 then throw(("Min lock amount is " + toString(minLockAmount)))
325319 else {
326- let $t01396614068 = StatsResult(amount, 1, if (isNewUser)
320+ let $t01386013962 = StatsResult(amount, 1, if (isNewUser)
327321 then 1
328322 else 0)
329- let statsEntries = $t01396614068._1
330- let totalStaked = $t01396614068._2
331- let totalStakedNew = $t01396614068._3
323+ let statsEntries = $t01386013962._1
324+ let totalStaked = $t01386013962._2
325+ let totalStakedNew = $t01386013962._3
332326 ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeightNEW)) ++ statsEntries)
333327 }
334328 }
335329 }
336330 }
337331
338332
339333 func commonClaim (userAddress,i) = {
340334 let userAddressStr = toString(userAddress)
341335 if ((size(i.payments) > 0))
342336 then throw("payments are not accepted")
343337 else {
344- let $t01454714652 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
345- let isNewUser = $t01454714652._1
346- let stakedAmount = $t01454714652._2
347- let stakingStart = $t01454714652._3
338+ let $t01444114546 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
339+ let isNewUser = $t01444114546._1
340+ let stakedAmount = $t01444114546._2
341+ let stakingStart = $t01444114546._3
348342 let stakedAmountX = toBigInt(stakedAmount)
349343 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
350344 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
351345 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
352346 func forEachAssetCalcUnclaimedReward (accum,asset) = {
353- let $t01502315161 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
354- let rewardTotal = $t01502315161._1
355- let cached = $t01502315161._2
356- let dynamic = $t01502315161._3
357- let rewardCachedPartKEY = $t01502315161._4
347+ let $t01491715055 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
348+ let rewardTotal = $t01491715055._1
349+ let cached = $t01491715055._2
350+ let dynamic = $t01491715055._3
351+ let rewardCachedPartKEY = $t01491715055._4
358352 let claimedKEY = keyClaimed(userAddressStr, asset)
359- let $t01522115258 = accum
360- let data = $t01522115258._1
361- let claimedAmtByAsset = $t01522115258._2
353+ let $t01511515152 = accum
354+ let data = $t01511515152._1
355+ let claimedAmtByAsset = $t01511515152._2
362356 let newPart = makeString([asset, toString(rewardTotal)], ":")
363357 let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_")
364358 if ((0 >= rewardTotal))
365359 then $Tuple2(data, claimedAmtByAssetNew)
366360 else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew)
367361 }
368362
369- let $t01571815832 = {
363+ let $t01561215726 = {
370364 let $l = supportedAssetsList
371365 let $s = size($l)
372366 let $acc0 = $Tuple2(nil, "")
373367 func $f0_1 ($a,$i) = if (($i >= $s))
374368 then $a
375369 else forEachAssetCalcUnclaimedReward($a, $l[$i])
376370
377371 func $f0_2 ($a,$i) = if (($i >= $s))
378372 then $a
379373 else throw("List size exceeds 10")
380374
381375 $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)
382376 }
383- let transfers = $t01571815832._1
384- let claimedAmtByAssetResult = $t01571815832._2
377+ let transfers = $t01561215726._1
378+ let claimedAmtByAssetResult = $t01561215726._2
385379 if ((0 >= size(transfers)))
386380 then nil
387381 else ((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1)))
388382 }
389383 }
390384
391385
392386 @Callable(i)
393387 func constructor (minLockAmount,supportedRewardAssets,stakedAssetId) = if ((i.caller != this))
394388 then throw("Permission denied")
395389 else [IntegerEntry(keyMinLockAmount(), minLockAmount), StringEntry(keySupportedRewardAssets(), supportedRewardAssets), StringEntry(keyStakedAssetId(), stakedAssetId)]
396390
397391
398392
399393 @Callable(i)
400394 func stake () = commonStake(i.caller, i)
401395
402396
403397
404398 @Callable(i)
405399 func stakeByOriginCaller () = commonStake(i.originCaller, i)
406400
407401
408402
409403 @Callable(i)
410404 func unstake (amount) = if ((size(i.payments) != 0))
411405 then throw("unstake doesn't require any payment")
412406 else {
413407 let userAddress = i.caller
414408 let userAddressStr = toString(userAddress)
415- let $t01674116795 = getParamsOrFail()
416- let stakedAssetId = $t01674116795._1
417- let minLockAmount = $t01674116795._2
418- let $t01679816882 = getUserParamsOrFail(userAddress)
419- let isNewUser = $t01679816882._1
420- let stakedAmount = $t01679816882._2
421- let vpEffectiveHeight = $t01679816882._3
409+ let $t01663516689 = getParamsOrFail()
410+ let stakedAssetId = $t01663516689._1
411+ let minLockAmount = $t01663516689._2
412+ let $t01669216776 = getUserParamsOrFail(userAddress)
413+ let isNewUser = $t01669216776._1
414+ let stakedAmount = $t01669216776._2
415+ let vpEffectiveHeight = $t01669216776._3
422416 let swapParamsSTRUCT = asSwapParamsSTRUCT(reentrantInvoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil))
423417 let swapLimitSpentInUsdn = swapParamsSTRUCT._2
424418 let blcks2LmtReset = swapParamsSTRUCT._3
425419 if ((swapLimitSpentInUsdn > 0))
426420 then throw((("You have already made a swap operation. Wait " + toString((height + blcks2LmtReset))) + " height to unstake"))
427421 else if ((0 >= stakedAmount))
428422 then throw("Nothing to unstake")
429423 else if ((amount > stakedAmount))
430424 then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount)))
431425 else {
432426 let stakedAmountNEW = (stakedAmount - amount)
433- let $t01752017678 = StatsResult(-(amount), if ((amount == stakedAmount))
427+ let $t01741417572 = StatsResult(-(amount), if ((amount == stakedAmount))
434428 then -1
435429 else 0, if ((amount == stakedAmount))
436430 then -1
437431 else 0)
438- let statsEntries = $t01752017678._1
439- let totalStaked = $t01752017678._2
440- let totalStakedNew = $t01752017678._3
432+ let statsEntries = $t01741417572._1
433+ let totalStaked = $t01741417572._2
434+ let totalStakedNew = $t01741417572._3
441435 ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeight)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeight)) ++ statsEntries)
442436 }
443437 }
444438
445439
446440
447441 @Callable(i)
448442 func deposit () = if ((size(i.payments) != 1))
449443 then throw("exact 1 payment is allowed only")
450444 else {
451445 let pmt = i.payments[0]
452446 let amount = pmt.amount
453- let pmtAssetId = valueOrElse(pmt.assetId, USDNID)
447+ let pmtAssetId = value(pmt.assetId)
454448 let pmtAssetIdStr = toBase58String(pmtAssetId)
455- let pmtMultX = if ((pmtAssetId == USDNID))
456- then MULTX8
457- else MULTX6
449+ let pmtMultX = MULTX6
458450 let amountX = toBigInt(amount)
459451 let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0)
460452 let totalStakedX = toBigInt(totalStaked)
461453 if ((0 > totalStaked))
462454 then throw("TODO: case is not supported")
463455 else if ((totalStaked == 0))
464456 then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount)
465457 else {
466458 let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX)
467459 let depositNumLastKEY = keyDepositNumLast()
468460 let depositNumLast = getIntOrElse(depositNumLastKEY, -1)
469461 let depositNumNew = (depositNumLast + 1)
470462 if (!(contains(supportedAssetsStr, pmtAssetIdStr)))
471463 then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr))
472464 else {
473465 func refreshRewardPerNsbtSUM (accum,nextAsset) = {
474466 let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset)
475467 let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0")
476468 (accum :+ (if ((nextAsset == pmtAssetIdStr))
477469 then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18)))
478470 else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr)))
479471 }
480472
481473 ({
482474 let $l = supportedAssetsList
483475 let $s = size($l)
484476 let $acc0 = nil
485477 func $f0_1 ($a,$i) = if (($i >= $s))
486478 then $a
487479 else refreshRewardPerNsbtSUM($a, $l[$i])
488480
489481 func $f0_2 ($a,$i) = if (($i >= $s))
490482 then $a
491483 else throw("List size exceeds 10")
492484
493485 $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)
494486 } :+ IntegerEntry(depositNumLastKEY, depositNumNew))
495487 }
496488 }
497489 }
498490
499491
500492
501493 @Callable(i)
502494 func claimRewards () = commonClaim(i.caller, i)
503495
504496
505497
506498 @Callable(i)
507499 func claimRewardsByOriginCaller () = commonClaim(i.originCaller, i)
508500
509501
510502
511503 @Callable(i)
512504 func unclaimedRewardsREADONLY (userAddressStr) = {
513505 func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_")
514506
515507 let unclaimedRewardStr = if ((userAddressStr == ""))
516508 then {
517509 let $l = supportedAssetsList
518510 let $s = size($l)
519511 let $acc0 = ""
520512 func $f0_1 ($a,$i) = if (($i >= $s))
521513 then $a
522514 else forEachAssetZeroReward($a, $l[$i])
523515
524516 func $f0_2 ($a,$i) = if (($i >= $s))
525517 then $a
526518 else throw("List size exceeds 10")
527519
528520 $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)
529521 }
530522 else {
531523 let userAddress = addressFromStringValue(userAddressStr)
532- let $t02025020355 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
533- let isNewUser = $t02025020355._1
534- let stakedAmount = $t02025020355._2
535- let stakingStart = $t02025020355._3
524+ let $t02008920194 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0))
525+ let isNewUser = $t02008920194._1
526+ let stakedAmount = $t02008920194._2
527+ let stakingStart = $t02008920194._3
536528 let stakedAmountX = toBigInt(stakedAmount)
537529 let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr)
538530 let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1)
539531 let depositNumLast = getIntOrElse(keyDepositNumLast(), -1)
540532 func forEachAssetCalcUnclaimedReward (accum,asset) = {
541- let $t02070120839 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
542- let rewardTotal = $t02070120839._1
543- let cached = $t02070120839._2
544- let dynamic = $t02070120839._3
545- let rewardCachedPartKEY = $t02070120839._4
533+ let $t02054020678 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast)
534+ let rewardTotal = $t02054020678._1
535+ let cached = $t02054020678._2
536+ let dynamic = $t02054020678._3
537+ let rewardCachedPartKEY = $t02054020678._4
546538 let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0)
547539 ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_")
548540 }
549541
550542 let $l = supportedAssetsList
551543 let $s = size($l)
552544 let $acc0 = ""
553545 func $f0_1 ($a,$i) = if (($i >= $s))
554546 then $a
555547 else forEachAssetCalcUnclaimedReward($a, $l[$i])
556548
557549 func $f0_2 ($a,$i) = if (($i >= $s))
558550 then $a
559551 else throw("List size exceeds 10")
560552
561553 $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)
562554 }
563555 $Tuple2(nil, dropRight(unclaimedRewardStr, 1))
564556 }
565557
566558
567559
568560 @Callable(i)
569561 func usdnStakingSYSREADONLY (userAddressStrOrEmpty,usdnDiff) = {
570562 let usdnTotal = getIntOrElse(keyLockParamTotalAmount(), 0)
571563 if ((userAddressStrOrEmpty == ""))
572564 then $Tuple2(nil, [0, usdnTotal, 0, 0, 0, height, height])
573565 else {
574566 let userAddress = toAddressOrFail(userAddressStrOrEmpty)
575567 let mergedData = mergeStake(userAddress, usdnDiff)
576568 let isNewUser = mergedData._1
577569 let stakedAmount = mergedData._2
578570 let vpEffectiveHeight = mergedData._3
579571 let stakedAmountNEW = mergedData._4
580572 let vpEffectiveHeightNEW = mergedData._5
581573 let usdnUser = stakedAmount
582574 $Tuple2(nil, [usdnUser, usdnTotal, 0, 0, vpEffectiveHeight, vpEffectiveHeightNEW])
583575 }
584576 }
585577
586578
587579
588580 @Callable(i)
589581 func configSYSREADONLY () = {
590582 let minLockAmt = getIntegerValue(keyMinLockAmount())
591583 $Tuple2(nil, [minLockAmt])
592584 }
593585
594586

github/deemru/w8io/026f985 
86.11 ms