tx · 8jMpDxhfGn11M1m7QqTccXb6n7P8EDQju6YCe2kjdH2J 3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy: -0.04000000 Waves 2022.10.18 13:26 [2277712] smart account 3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy > SELF 0.00000000 Waves
{ "type": 13, "id": "8jMpDxhfGn11M1m7QqTccXb6n7P8EDQju6YCe2kjdH2J", "fee": 4000000, "feeAssetId": null, "timestamp": 1666088867713, "version": 1, "sender": "3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy", "senderPublicKey": "FK9j3YFWVChXKESTn33fMZz1JseCNMMqHhfB7smxJo4e", "proofs": [ "5wdxxtSn2ojBbaofB4x6kbXSgTopDYWyMhYvDpbamzX381vsNPg4UBRFqb6fYQkP7tvt61nT3qU41mwXem38mKJW" ], "script": "base64:BgIqCAISBQoDAQgIEgASABIDCgEBEgASABIAEgMKAQgSBAoCCAESAwoBARIAWAAJc2VwYXJhdG9yAgJfXwADU0VQAgJfXwAFTVVMVDYAwIQ9AAVNVUxUOACAwtcvAAZNVUxUWDYJALYCAQUFTVVMVDYABk1VTFRYOAkAtgIBBQVNVUxUOAAHTVVMVFgxOAkAtgIBAICAkLu61q3wDQAKV0FWRVNJRFNUUgIFV0FWRVMAB1dBVkVTSUQJANkEAQUKV0FWRVNJRFNUUgAJREFZTUlMTElTAIC4mSkAGUlkeENvbnRyb2xDZmdOZXV0cmlub0RhcHAAAQAYSWR4Q29udHJvbENmZ0F1Y3Rpb25EYXBwAAIAFElkeENvbnRyb2xDZmdScGREYXBwAAMAFUlkeENvbnRyb2xDZmdNYXRoRGFwcAAEABxJZHhDb250cm9sQ2ZnTGlxdWlkYXRpb25EYXBwAAUAFUlkeENvbnRyb2xDZmdSZXN0RGFwcAAGAB1JZHhDb250cm9sQ2ZnTm9kZVJlZ2lzdHJ5RGFwcAAHABxJZHhDb250cm9sQ2ZnTnNidFN0YWtpbmdEYXBwAAgAGUlkeENvbnRyb2xDZmdN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2VkRGF0YQJfMgQRdnBFZmZlY3RpdmVIZWlnaHQIBQptZXJnZWREYXRhAl8zBA9zdGFrZWRBbW91bnRORVcIBQptZXJnZWREYXRhAl80BBR2cEVmZmVjdGl2ZUhlaWdodE5FVwgFCm1lcmdlZERhdGECXzUECHN1cmZVc2VyBQxzdGFrZWRBbW91bnQEEWduc2J0RnJvbVN1cmZVc2VyCQELc3VyZlRvR25zYnQBBQhzdXJmVXNlcgkAlAoCBQNuaWwJAMwIAgUIc3VyZlVzZXIJAMwIAgUJc3VyZlRvdGFsCQDMCAIFEWduc2J0RnJvbVN1cmZVc2VyCQDMCAIFEmduc2J0RnJvbVN1cmZUb3RhbAkAzAgCBRF2cEVmZmVjdGl2ZUhlaWdodAkAzAgCBRR2cEVmZmVjdGl2ZUhlaWdodE5FVwUDbmlsAWkBGGduc2J0RnJvbVN1cmZTWVNSRUFET05MWQEHc3VyZkFtdAkAlAoCBQNuaWwJAQtzdXJmVG9HbnNidAEFB3N1cmZBbXQBaQERY29uZmlnU1lTUkVBRE9OTFkABAptaW5Mb2NrQW10CQERQGV4dHJOYXRpdmUoMTA1NSkBCQEQa2V5TWluTG9ja0Ftb3VudAAEIHN1cmZWb3RpbmdQb3dlclJlc3RyaWN0aXZlUGVyaW9kCQBoAgCgCwAOBBticlRvU3RhcnRTdXJmVHJhbnNmb3JtYXRpb24AsJhGCQCUCgIFA25pbAkAzAgCBQptaW5Mb2NrQW10CQDMCAIJAGgCBRJnbnNidEZyb21TdXJmQ29lZmYFBU1VTFQ2CQDMCAIFIHN1cmZWb3RpbmdQb3dlclJlc3RyaWN0aXZlUGVyaW9kCQDMCAIFG2JyVG9TdGFydFN1cmZUcmFuc2Zvcm1hdGlvbgUDbmlsABIHYnc=", "chainId": 84, "height": 2277712, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D3PVQH9UExw5C2NusxkZETYytjddhiEAZnHRQ1xrbhwi Next: Ct8W11t2G1ttQsodNs5mHhYVhHNptaAmvS9NpgtE5rCK Diff:
Old | New | Differences | |
---|---|---|---|
55 | 55 | func keyGnsbtFromSurfCoeff () = "%s%s__cfg__gnsbtFromSurfCoeff" | |
56 | 56 | ||
57 | 57 | ||
58 | - | func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP) | |
58 | + | func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
272 | 272 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
273 | 273 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
274 | 274 | func forEachAssetCacheUserReward (accum,asset) = { | |
275 | - | let $ | |
276 | - | let rewardTotal = $ | |
277 | - | let cached = $ | |
278 | - | let dynamic = $ | |
279 | - | let rewardCachedPartKEY = $ | |
275 | + | let $t01108411219 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast) | |
276 | + | let rewardTotal = $t01108411219._1 | |
277 | + | let cached = $t01108411219._2 | |
278 | + | let dynamic = $t01108411219._3 | |
279 | + | let rewardCachedPartKEY = $t01108411219._4 | |
280 | 280 | (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal)) | |
281 | 281 | } | |
282 | 282 | ||
336 | 336 | ||
337 | 337 | ||
338 | 338 | func mergeStake (userAddress,amountToAdd) = { | |
339 | - | let $ | |
340 | - | let isNewUser = $ | |
341 | - | let stakedAmount = $ | |
342 | - | let vpEffectiveHeight = $ | |
339 | + | let $t01487114981 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
340 | + | let isNewUser = $t01487114981._1 | |
341 | + | let stakedAmount = $t01487114981._2 | |
342 | + | let vpEffectiveHeight = $t01487114981._3 | |
343 | 343 | let stakedAmountNEW = if (isNewUser) | |
344 | 344 | then amountToAdd | |
345 | 345 | else (amountToAdd + stakedAmount) | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | func commonStake (userAddress,i) = { | |
355 | - | let $ | |
356 | - | let stakedAssetId = $ | |
357 | - | let minLockAmount = $ | |
355 | + | let $t01546715521 = getParamsOrFail() | |
356 | + | let stakedAssetId = $t01546715521._1 | |
357 | + | let minLockAmount = $t01546715521._2 | |
358 | 358 | if ((size(i.payments) != 1)) | |
359 | 359 | then throw("Invalid payments size") | |
360 | 360 | else { | |
375 | 375 | if ((minLockAmount > stakedAmountNEW)) | |
376 | 376 | then throw(("Min lock amount is " + toString(minLockAmount))) | |
377 | 377 | else { | |
378 | - | let $ | |
378 | + | let $t01632016422 = StatsResult(amount, 1, if (isNewUser) | |
379 | 379 | then 1 | |
380 | 380 | else 0) | |
381 | - | let statsEntries = $ | |
382 | - | let totalStaked = $ | |
383 | - | let totalStakedNew = $ | |
381 | + | let statsEntries = $t01632016422._1 | |
382 | + | let totalStaked = $t01632016422._2 | |
383 | + | let totalStakedNew = $t01632016422._3 | |
384 | 384 | ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeightNEW)) ++ statsEntries) | |
385 | 385 | } | |
386 | 386 | } | |
393 | 393 | if ((size(i.payments) > 0)) | |
394 | 394 | then throw("payments are not accepted") | |
395 | 395 | else { | |
396 | - | let $ | |
397 | - | let isNewUser = $ | |
398 | - | let stakedAmount = $ | |
399 | - | let stakingStart = $ | |
396 | + | let $t01690117006 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
397 | + | let isNewUser = $t01690117006._1 | |
398 | + | let stakedAmount = $t01690117006._2 | |
399 | + | let stakingStart = $t01690117006._3 | |
400 | 400 | let stakedAmountX = toBigInt(stakedAmount) | |
401 | 401 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
402 | 402 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
403 | 403 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
404 | 404 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
405 | - | let $ | |
406 | - | let rewardTotal = $ | |
407 | - | let cached = $ | |
408 | - | let dynamic = $ | |
409 | - | let rewardCachedPartKEY = $ | |
405 | + | let $t01737717515 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
406 | + | let rewardTotal = $t01737717515._1 | |
407 | + | let cached = $t01737717515._2 | |
408 | + | let dynamic = $t01737717515._3 | |
409 | + | let rewardCachedPartKEY = $t01737717515._4 | |
410 | 410 | let claimedKEY = keyClaimed(userAddressStr, asset) | |
411 | - | let $ | |
412 | - | let data = $ | |
413 | - | let claimedAmtByAsset = $ | |
411 | + | let $t01757517612 = accum | |
412 | + | let data = $t01757517612._1 | |
413 | + | let claimedAmtByAsset = $t01757517612._2 | |
414 | 414 | let newPart = makeString([asset, toString(rewardTotal)], ":") | |
415 | 415 | let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_") | |
416 | 416 | if ((0 >= rewardTotal)) | |
418 | 418 | else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew) | |
419 | 419 | } | |
420 | 420 | ||
421 | - | let $ | |
421 | + | let $t01807218185 = { | |
422 | 422 | let $l = supportedAssetsList | |
423 | 423 | let $s = size($l) | |
424 | 424 | let $acc0 = $Tuple2(nil, "") | |
432 | 432 | ||
433 | 433 | $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) | |
434 | 434 | } | |
435 | - | let transfers = $ | |
436 | - | let claimedAmtByAssetResult = $ | |
435 | + | let transfers = $t01807218185._1 | |
436 | + | let claimedAmtByAssetResult = $t01807218185._2 | |
437 | 437 | if ((0 >= size(transfers))) | |
438 | 438 | then $Tuple2(nil, 0) | |
439 | 439 | else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers)) | |
464 | 464 | else { | |
465 | 465 | let userAddress = i.caller | |
466 | 466 | let userAddressStr = toString(userAddress) | |
467 | - | let $ | |
468 | - | let stakedAssetId = $ | |
469 | - | let minLockAmount = $ | |
470 | - | let $ | |
471 | - | let isNewUser = $ | |
472 | - | let stakedAmount = $ | |
473 | - | let vpEffectiveHeight = $ | |
467 | + | let $t01911919173 = getParamsOrFail() | |
468 | + | let stakedAssetId = $t01911919173._1 | |
469 | + | let minLockAmount = $t01911919173._2 | |
470 | + | let $t01917619260 = getUserParamsOrFail(userAddress) | |
471 | + | let isNewUser = $t01917619260._1 | |
472 | + | let stakedAmount = $t01917619260._2 | |
473 | + | let vpEffectiveHeight = $t01917619260._3 | |
474 | 474 | let swapParamsSTRUCT = asSwapParamsSTRUCT(reentrantInvoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil)) | |
475 | 475 | let swapLimitSpentInUsdn = swapParamsSTRUCT._2 | |
476 | 476 | let blcks2LmtReset = swapParamsSTRUCT._3 | |
482 | 482 | then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount))) | |
483 | 483 | else { | |
484 | 484 | let stakedAmountNEW = (stakedAmount - amount) | |
485 | - | let $ | |
485 | + | let $t01989820056 = StatsResult(-(amount), if ((amount == stakedAmount)) | |
486 | 486 | then -1 | |
487 | 487 | else 0, if ((amount == stakedAmount)) | |
488 | 488 | then -1 | |
489 | 489 | else 0) | |
490 | - | let statsEntries = $ | |
491 | - | let totalStaked = $ | |
492 | - | let totalStakedNew = $ | |
490 | + | let statsEntries = $t01989820056._1 | |
491 | + | let totalStaked = $t01989820056._2 | |
492 | + | let totalStakedNew = $t01989820056._3 | |
493 | 493 | ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeight)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeight)) ++ statsEntries) | |
494 | 494 | } | |
495 | 495 | } | |
581 | 581 | } | |
582 | 582 | else { | |
583 | 583 | let userAddress = addressFromStringValue(userAddressStr) | |
584 | - | let $ | |
585 | - | let isNewUser = $ | |
586 | - | let stakedAmount = $ | |
587 | - | let stakingStart = $ | |
584 | + | let $t02268022785 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
585 | + | let isNewUser = $t02268022785._1 | |
586 | + | let stakedAmount = $t02268022785._2 | |
587 | + | let stakingStart = $t02268022785._3 | |
588 | 588 | let stakedAmountX = toBigInt(stakedAmount) | |
589 | 589 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
590 | 590 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
591 | 591 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
592 | 592 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
593 | - | let $ | |
594 | - | let rewardTotal = $ | |
595 | - | let cached = $ | |
596 | - | let dynamic = $ | |
597 | - | let rewardCachedPartKEY = $ | |
593 | + | let $t02313123269 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
594 | + | let rewardTotal = $t02313123269._1 | |
595 | + | let cached = $t02313123269._2 | |
596 | + | let dynamic = $t02313123269._3 | |
597 | + | let rewardCachedPartKEY = $t02313123269._4 | |
598 | 598 | let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0) | |
599 | 599 | ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_") | |
600 | 600 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | 8 | let MULT6 = 1000000 | |
9 | 9 | ||
10 | 10 | let MULT8 = 100000000 | |
11 | 11 | ||
12 | 12 | let MULTX6 = toBigInt(MULT6) | |
13 | 13 | ||
14 | 14 | let MULTX8 = toBigInt(MULT8) | |
15 | 15 | ||
16 | 16 | let MULTX18 = toBigInt(1000000000000000000) | |
17 | 17 | ||
18 | 18 | let WAVESIDSTR = "WAVES" | |
19 | 19 | ||
20 | 20 | let WAVESID = fromBase58String(WAVESIDSTR) | |
21 | 21 | ||
22 | 22 | let DAYMILLIS = 86400000 | |
23 | 23 | ||
24 | 24 | let IdxControlCfgNeutrinoDapp = 1 | |
25 | 25 | ||
26 | 26 | let IdxControlCfgAuctionDapp = 2 | |
27 | 27 | ||
28 | 28 | let IdxControlCfgRpdDapp = 3 | |
29 | 29 | ||
30 | 30 | let IdxControlCfgMathDapp = 4 | |
31 | 31 | ||
32 | 32 | let IdxControlCfgLiquidationDapp = 5 | |
33 | 33 | ||
34 | 34 | let IdxControlCfgRestDapp = 6 | |
35 | 35 | ||
36 | 36 | let IdxControlCfgNodeRegistryDapp = 7 | |
37 | 37 | ||
38 | 38 | let IdxControlCfgNsbtStakingDapp = 8 | |
39 | 39 | ||
40 | 40 | let IdxControlCfgMediatorDapp = 9 | |
41 | 41 | ||
42 | 42 | let IdxControlCfgSurfStakingDapp = 10 | |
43 | 43 | ||
44 | 44 | let IdxControlCfgGnsbtControllerDapp = 11 | |
45 | 45 | ||
46 | 46 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyControlAddress () = "%s%s__config__controlAddress" | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func keyControlCfg () = "%s__controlConfig" | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func keyGnsbtFromSurfCoeff () = "%s%s__cfg__gnsbtFromSurfCoeff" | |
56 | 56 | ||
57 | 57 | ||
58 | - | func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP) | |
58 | + | func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
65 | 65 | ||
66 | 66 | let controlCfg = readControlCfgOrFail(controlContract) | |
67 | 67 | ||
68 | 68 | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
69 | 69 | ||
70 | 70 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
71 | 71 | ||
72 | 72 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
73 | 73 | ||
74 | 74 | let gnsbtFromSurfCoeff = valueOrElse(getInteger(this, keyGnsbtFromSurfCoeff()), 300) | |
75 | 75 | ||
76 | 76 | func keyBondAsset () = "bond_asset_id" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyAuctionContractAddress () = "auction_contract" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyMinLockAmount () = "%s__minLockAmount" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyStakedAssetId () = "%s__stakedAssetId" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyLockParamVotingPowerEffectiveHeight (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "vpEffectiveHeight"], separator) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyStatsDepositAmtByDay (timestamp) = makeString(["%s%s%d", "stats", "depositAmtByDay", toString(timestamp)], separator) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func keyStatsDepositAmtTotals () = makeString(["%s%s%d", "stats", "depositAmtTotals"], separator) | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func keyNextPeriod () = "%s__nextPeriod" | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func keySupportedRewardAssets () = "supportedRewardAssets" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined")) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr)) | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR)) | |
158 | 158 | then unit | |
159 | 159 | else fromBase58String(assetStr) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func asInt (val) = match val { | |
163 | 163 | case valInt: Int => | |
164 | 164 | valInt | |
165 | 165 | case _ => | |
166 | 166 | throw("fail to cast into Int") | |
167 | 167 | } | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func asSwapParamsSTRUCT (v) = match v { | |
171 | 171 | case struct: (Int, Int, Int, Int, Int, Int, Int) => | |
172 | 172 | struct | |
173 | 173 | case _ => | |
174 | 174 | throw("fail to cast into Int") | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | 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) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart)) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards)) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func StatsResult (totalLockedInc,lockCountInc,usersCountInc) = { | |
191 | 191 | let locksCount = getIntOrZero(keyStatsLocksCount()) | |
192 | 192 | let usersCount = getIntOrZero(keyStatsUsersCount()) | |
193 | 193 | let totalAmount = getIntOrZero(keyLockParamTotalAmount()) | |
194 | 194 | let totalAmountNew = (totalAmount + totalLockedInc) | |
195 | 195 | $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)], totalAmount, totalAmountNew) | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func LockParamsEntry (userAddress,amount,votingPowerEffectiveHeight) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), votingPowerEffectiveHeight)] | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func getParamsOrFail () = $Tuple2(fromBase58String(getStringOrFail(this, keyStakedAssetId())), getIntOrFail(keyMinLockAmount())) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0) | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress)) | |
209 | 209 | then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress))) | |
210 | 210 | else unit | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined")) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "") | |
217 | 217 | ||
218 | 218 | let supportedAssetsList = split(supportedAssetsStr, "_") | |
219 | 219 | ||
220 | 220 | func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = { | |
221 | 221 | let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId) | |
222 | 222 | let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0")) | |
223 | 223 | let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0")) | |
224 | 224 | let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18)) | |
225 | 225 | let rewardCachedPartKEY = keyReward(userAddress, assetId) | |
226 | 226 | let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0) | |
227 | 227 | $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY) | |
228 | 228 | } | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func toStartOfDay (timestamp) = ((timestamp / DAYMILLIS) * DAYMILLIS) | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func findElementPosition (src,element,sep) = { | |
235 | 235 | let elementStart = valueOrErrorMessage(indexOf(src, element), ((("there is no substring " + element) + " in ") + src)) | |
236 | 236 | if ((elementStart == 0)) | |
237 | 237 | then 0 | |
238 | 238 | else { | |
239 | 239 | let left = take(src, elementStart) | |
240 | 240 | (size(split(left, sep)) - 1) | |
241 | 241 | } | |
242 | 242 | } | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | let DepositTotalsPREFIX = "%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d" | |
246 | 246 | ||
247 | 247 | func updateDepositTotals (currVal,idxToUpdate,deltaAmt) = { | |
248 | 248 | let currArr = split(currVal, SEP) | |
249 | 249 | func updDepTotByIdx (idx) = if ((idx != idxToUpdate)) | |
250 | 250 | then currArr[idx] | |
251 | 251 | else toString((parseIntValue(currArr[idx]) + deltaAmt)) | |
252 | 252 | ||
253 | 253 | makeString([DepositTotalsPREFIX, updDepTotByIdx(1), updDepTotByIdx(2), updDepTotByIdx(3), updDepTotByIdx(4), updDepTotByIdx(5), updDepTotByIdx(6), updDepTotByIdx(7), updDepTotByIdx(8), updDepTotByIdx(9), updDepTotByIdx(10), updDepTotByIdx(11), updDepTotByIdx(12), updDepTotByIdx(13), updDepTotByIdx(14), updDepTotByIdx(15), updDepTotByIdx(16), updDepTotByIdx(17), updDepTotByIdx(18)], SEP) | |
254 | 254 | } | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func DepositsTotalsEntries (depositAmount,assetIdStr) = { | |
258 | 258 | let startOfDay = toStartOfDay(lastBlock.timestamp) | |
259 | 259 | let byDayKEY = keyStatsDepositAmtByDay(startOfDay) | |
260 | 260 | let totalsKEY = keyStatsDepositAmtTotals() | |
261 | 261 | let position = findElementPosition(supportedAssetsStr, assetIdStr, "_") | |
262 | 262 | let defaultDATA = (DepositTotalsPREFIX + "__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0__0") | |
263 | 263 | let currTotalsDATA = valueOrElse(getString(this, totalsKEY), defaultDATA) | |
264 | 264 | let newTotalsDATA = updateDepositTotals(currTotalsDATA, (position + 1), depositAmount) | |
265 | 265 | [StringEntry(totalsKEY, newTotalsDATA), StringEntry(byDayKEY, newTotalsDATA)] | |
266 | 266 | } | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func RewardEntries (isNewUser,userAddress,stakedAmount) = { | |
270 | 270 | let stakedAmountX = toBigInt(stakedAmount) | |
271 | 271 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress) | |
272 | 272 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
273 | 273 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
274 | 274 | func forEachAssetCacheUserReward (accum,asset) = { | |
275 | - | let $ | |
276 | - | let rewardTotal = $ | |
277 | - | let cached = $ | |
278 | - | let dynamic = $ | |
279 | - | let rewardCachedPartKEY = $ | |
275 | + | let $t01108411219 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast) | |
276 | + | let rewardTotal = $t01108411219._1 | |
277 | + | let cached = $t01108411219._2 | |
278 | + | let dynamic = $t01108411219._3 | |
279 | + | let rewardCachedPartKEY = $t01108411219._4 | |
280 | 280 | (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal)) | |
281 | 281 | } | |
282 | 282 | ||
283 | 283 | if (if ((depositNumLast == -1)) | |
284 | 284 | then (depositNumUser == -1) | |
285 | 285 | else false) | |
286 | 286 | then nil | |
287 | 287 | else if (if ((depositNumLast == -1)) | |
288 | 288 | then (depositNumUser > -1) | |
289 | 289 | else false) | |
290 | 290 | then throw("invalid depositNumLast and depositNumUser state") | |
291 | 291 | else if (if ((depositNumLast > -1)) | |
292 | 292 | then (depositNumUser >= -1) | |
293 | 293 | else false) | |
294 | 294 | then if (isNewUser) | |
295 | 295 | then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)] | |
296 | 296 | else ({ | |
297 | 297 | let $l = supportedAssetsList | |
298 | 298 | let $s = size($l) | |
299 | 299 | let $acc0 = nil | |
300 | 300 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
301 | 301 | then $a | |
302 | 302 | else forEachAssetCacheUserReward($a, $l[$i]) | |
303 | 303 | ||
304 | 304 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
305 | 305 | then $a | |
306 | 306 | else throw("List size exceeds 9") | |
307 | 307 | ||
308 | 308 | $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) | |
309 | 309 | } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) | |
310 | 310 | else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser))) | |
311 | 311 | } | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | func IncrementNotDistributedRewardEntry (tkn,amountInc) = { | |
315 | 315 | let notDistributedRewardKEY = keyNotDistributedReward(tkn) | |
316 | 316 | let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0) | |
317 | 317 | [IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))] | |
318 | 318 | } | |
319 | 319 | ||
320 | 320 | ||
321 | 321 | func surfToGnsbt (surfAmt) = (surfAmt / gnsbtFromSurfCoeff) | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | func mergeVotingPowerEffectiveHeight (quarantinePeriod,vpEffectiveHeight,stakedAmt,stakedAmtNEW) = { | |
325 | 325 | let remainingToWait = (vpEffectiveHeight - height) | |
326 | 326 | if ((0 >= remainingToWait)) | |
327 | 327 | then (height + quarantinePeriod) | |
328 | 328 | else { | |
329 | 329 | let alreadyWaited = (quarantinePeriod - remainingToWait) | |
330 | 330 | let kX8 = if ((stakedAmtNEW != 0)) | |
331 | 331 | then fraction(stakedAmt, MULT8, stakedAmtNEW) | |
332 | 332 | else vpEffectiveHeight | |
333 | 333 | ((quarantinePeriod + height) - fraction(alreadyWaited, kX8, MULT8)) | |
334 | 334 | } | |
335 | 335 | } | |
336 | 336 | ||
337 | 337 | ||
338 | 338 | func mergeStake (userAddress,amountToAdd) = { | |
339 | - | let $ | |
340 | - | let isNewUser = $ | |
341 | - | let stakedAmount = $ | |
342 | - | let vpEffectiveHeight = $ | |
339 | + | let $t01487114981 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
340 | + | let isNewUser = $t01487114981._1 | |
341 | + | let stakedAmount = $t01487114981._2 | |
342 | + | let vpEffectiveHeight = $t01487114981._3 | |
343 | 343 | let stakedAmountNEW = if (isNewUser) | |
344 | 344 | then amountToAdd | |
345 | 345 | else (amountToAdd + stakedAmount) | |
346 | 346 | let quarantinePeriod = (1440 * 14) | |
347 | 347 | let vpEffectiveHeightNEW = if (isNewUser) | |
348 | 348 | then (quarantinePeriod + height) | |
349 | 349 | else mergeVotingPowerEffectiveHeight(quarantinePeriod, vpEffectiveHeight, stakedAmount, stakedAmountNEW) | |
350 | 350 | $Tuple5(isNewUser, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW) | |
351 | 351 | } | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | func commonStake (userAddress,i) = { | |
355 | - | let $ | |
356 | - | let stakedAssetId = $ | |
357 | - | let minLockAmount = $ | |
355 | + | let $t01546715521 = getParamsOrFail() | |
356 | + | let stakedAssetId = $t01546715521._1 | |
357 | + | let minLockAmount = $t01546715521._2 | |
358 | 358 | if ((size(i.payments) != 1)) | |
359 | 359 | then throw("Invalid payments size") | |
360 | 360 | else { | |
361 | 361 | let payment = i.payments[0] | |
362 | 362 | let amount = payment.amount | |
363 | 363 | let invalidAssetMessage = (("Invalid asset. " + toBase58String(stakedAssetId)) + " is expected") | |
364 | 364 | let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage) | |
365 | 365 | if ((assetId != stakedAssetId)) | |
366 | 366 | then throw(invalidAssetMessage) | |
367 | 367 | else { | |
368 | 368 | let userAddressStr = toString(userAddress) | |
369 | 369 | let mergedData = mergeStake(userAddress, amount) | |
370 | 370 | let isNewUser = mergedData._1 | |
371 | 371 | let stakedAmount = mergedData._2 | |
372 | 372 | let vpEffectiveHeight = mergedData._3 | |
373 | 373 | let stakedAmountNEW = mergedData._4 | |
374 | 374 | let vpEffectiveHeightNEW = mergedData._5 | |
375 | 375 | if ((minLockAmount > stakedAmountNEW)) | |
376 | 376 | then throw(("Min lock amount is " + toString(minLockAmount))) | |
377 | 377 | else { | |
378 | - | let $ | |
378 | + | let $t01632016422 = StatsResult(amount, 1, if (isNewUser) | |
379 | 379 | then 1 | |
380 | 380 | else 0) | |
381 | - | let statsEntries = $ | |
382 | - | let totalStaked = $ | |
383 | - | let totalStakedNew = $ | |
381 | + | let statsEntries = $t01632016422._1 | |
382 | + | let totalStaked = $t01632016422._2 | |
383 | + | let totalStakedNew = $t01632016422._3 | |
384 | 384 | ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeightNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeightNEW)) ++ statsEntries) | |
385 | 385 | } | |
386 | 386 | } | |
387 | 387 | } | |
388 | 388 | } | |
389 | 389 | ||
390 | 390 | ||
391 | 391 | func commonClaim (userAddress,i) = { | |
392 | 392 | let userAddressStr = toString(userAddress) | |
393 | 393 | if ((size(i.payments) > 0)) | |
394 | 394 | then throw("payments are not accepted") | |
395 | 395 | else { | |
396 | - | let $ | |
397 | - | let isNewUser = $ | |
398 | - | let stakedAmount = $ | |
399 | - | let stakingStart = $ | |
396 | + | let $t01690117006 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
397 | + | let isNewUser = $t01690117006._1 | |
398 | + | let stakedAmount = $t01690117006._2 | |
399 | + | let stakingStart = $t01690117006._3 | |
400 | 400 | let stakedAmountX = toBigInt(stakedAmount) | |
401 | 401 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
402 | 402 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
403 | 403 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
404 | 404 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
405 | - | let $ | |
406 | - | let rewardTotal = $ | |
407 | - | let cached = $ | |
408 | - | let dynamic = $ | |
409 | - | let rewardCachedPartKEY = $ | |
405 | + | let $t01737717515 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
406 | + | let rewardTotal = $t01737717515._1 | |
407 | + | let cached = $t01737717515._2 | |
408 | + | let dynamic = $t01737717515._3 | |
409 | + | let rewardCachedPartKEY = $t01737717515._4 | |
410 | 410 | let claimedKEY = keyClaimed(userAddressStr, asset) | |
411 | - | let $ | |
412 | - | let data = $ | |
413 | - | let claimedAmtByAsset = $ | |
411 | + | let $t01757517612 = accum | |
412 | + | let data = $t01757517612._1 | |
413 | + | let claimedAmtByAsset = $t01757517612._2 | |
414 | 414 | let newPart = makeString([asset, toString(rewardTotal)], ":") | |
415 | 415 | let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_") | |
416 | 416 | if ((0 >= rewardTotal)) | |
417 | 417 | then $Tuple2(data, claimedAmtByAssetNew) | |
418 | 418 | else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew) | |
419 | 419 | } | |
420 | 420 | ||
421 | - | let $ | |
421 | + | let $t01807218185 = { | |
422 | 422 | let $l = supportedAssetsList | |
423 | 423 | let $s = size($l) | |
424 | 424 | let $acc0 = $Tuple2(nil, "") | |
425 | 425 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
426 | 426 | then $a | |
427 | 427 | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
428 | 428 | ||
429 | 429 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
430 | 430 | then $a | |
431 | 431 | else throw("List size exceeds 9") | |
432 | 432 | ||
433 | 433 | $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) | |
434 | 434 | } | |
435 | - | let transfers = $ | |
436 | - | let claimedAmtByAssetResult = $ | |
435 | + | let transfers = $t01807218185._1 | |
436 | + | let claimedAmtByAssetResult = $t01807218185._2 | |
437 | 437 | if ((0 >= size(transfers))) | |
438 | 438 | then $Tuple2(nil, 0) | |
439 | 439 | else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers)) | |
440 | 440 | } | |
441 | 441 | } | |
442 | 442 | ||
443 | 443 | ||
444 | 444 | @Callable(i) | |
445 | 445 | func constructor (minLockAmount,supportedRewardAssets,stakedAssetId) = if ((i.caller != this)) | |
446 | 446 | then throw("Permission denied") | |
447 | 447 | else [IntegerEntry(keyMinLockAmount(), minLockAmount), StringEntry(keySupportedRewardAssets(), supportedRewardAssets), StringEntry(keyStakedAssetId(), stakedAssetId)] | |
448 | 448 | ||
449 | 449 | ||
450 | 450 | ||
451 | 451 | @Callable(i) | |
452 | 452 | func stake () = commonStake(i.caller, i) | |
453 | 453 | ||
454 | 454 | ||
455 | 455 | ||
456 | 456 | @Callable(i) | |
457 | 457 | func stakeByOriginCaller () = commonStake(i.originCaller, i) | |
458 | 458 | ||
459 | 459 | ||
460 | 460 | ||
461 | 461 | @Callable(i) | |
462 | 462 | func unstake (amount) = if ((size(i.payments) != 0)) | |
463 | 463 | then throw("unstake doesn't require any payment") | |
464 | 464 | else { | |
465 | 465 | let userAddress = i.caller | |
466 | 466 | let userAddressStr = toString(userAddress) | |
467 | - | let $ | |
468 | - | let stakedAssetId = $ | |
469 | - | let minLockAmount = $ | |
470 | - | let $ | |
471 | - | let isNewUser = $ | |
472 | - | let stakedAmount = $ | |
473 | - | let vpEffectiveHeight = $ | |
467 | + | let $t01911919173 = getParamsOrFail() | |
468 | + | let stakedAssetId = $t01911919173._1 | |
469 | + | let minLockAmount = $t01911919173._2 | |
470 | + | let $t01917619260 = getUserParamsOrFail(userAddress) | |
471 | + | let isNewUser = $t01917619260._1 | |
472 | + | let stakedAmount = $t01917619260._2 | |
473 | + | let vpEffectiveHeight = $t01917619260._3 | |
474 | 474 | let swapParamsSTRUCT = asSwapParamsSTRUCT(reentrantInvoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil)) | |
475 | 475 | let swapLimitSpentInUsdn = swapParamsSTRUCT._2 | |
476 | 476 | let blcks2LmtReset = swapParamsSTRUCT._3 | |
477 | 477 | if ((swapLimitSpentInUsdn > 0)) | |
478 | 478 | then throw((("You have already made a swap operation. Wait " + toString((height + blcks2LmtReset))) + " height to unstake")) | |
479 | 479 | else if ((0 >= stakedAmount)) | |
480 | 480 | then throw("Nothing to unstake") | |
481 | 481 | else if ((amount > stakedAmount)) | |
482 | 482 | then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount))) | |
483 | 483 | else { | |
484 | 484 | let stakedAmountNEW = (stakedAmount - amount) | |
485 | - | let $ | |
485 | + | let $t01989820056 = StatsResult(-(amount), if ((amount == stakedAmount)) | |
486 | 486 | then -1 | |
487 | 487 | else 0, if ((amount == stakedAmount)) | |
488 | 488 | then -1 | |
489 | 489 | else 0) | |
490 | - | let statsEntries = $ | |
491 | - | let totalStaked = $ | |
492 | - | let totalStakedNew = $ | |
490 | + | let statsEntries = $t01989820056._1 | |
491 | + | let totalStaked = $t01989820056._2 | |
492 | + | let totalStakedNew = $t01989820056._3 | |
493 | 493 | ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, stakedAmount, vpEffectiveHeight, stakedAmountNEW, vpEffectiveHeight)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNEW, vpEffectiveHeight)) ++ statsEntries) | |
494 | 494 | } | |
495 | 495 | } | |
496 | 496 | ||
497 | 497 | ||
498 | 498 | ||
499 | 499 | @Callable(i) | |
500 | 500 | func deposit () = if ((size(i.payments) != 1)) | |
501 | 501 | then throw("exact 1 payment is allowed only") | |
502 | 502 | else { | |
503 | 503 | let pmt = i.payments[0] | |
504 | 504 | let amount = pmt.amount | |
505 | 505 | let pmtAssetId = valueOrElse(pmt.assetId, WAVESID) | |
506 | 506 | let pmtAssetIdStr = toBase58String(pmtAssetId) | |
507 | 507 | let pmtMultX = if ((pmtAssetId == WAVESID)) | |
508 | 508 | then MULTX8 | |
509 | 509 | else MULTX6 | |
510 | 510 | let amountX = toBigInt(amount) | |
511 | 511 | let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0) | |
512 | 512 | let totalStakedX = toBigInt(totalStaked) | |
513 | 513 | if ((0 > totalStaked)) | |
514 | 514 | then throw("TODO: case is not supported") | |
515 | 515 | else if ((totalStaked == 0)) | |
516 | 516 | then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount) | |
517 | 517 | else { | |
518 | 518 | let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX) | |
519 | 519 | let depositNumLastKEY = keyDepositNumLast() | |
520 | 520 | let depositNumLast = getIntOrElse(depositNumLastKEY, -1) | |
521 | 521 | let depositNumNew = (depositNumLast + 1) | |
522 | 522 | if (!(contains(supportedAssetsStr, pmtAssetIdStr))) | |
523 | 523 | then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr)) | |
524 | 524 | else { | |
525 | 525 | func refreshRewardPerNsbtSUM (accum,nextAsset) = { | |
526 | 526 | let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset) | |
527 | 527 | let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0") | |
528 | 528 | (accum :+ (if ((nextAsset == pmtAssetIdStr)) | |
529 | 529 | then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18))) | |
530 | 530 | else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr))) | |
531 | 531 | } | |
532 | 532 | ||
533 | 533 | (({ | |
534 | 534 | let $l = supportedAssetsList | |
535 | 535 | let $s = size($l) | |
536 | 536 | let $acc0 = nil | |
537 | 537 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
538 | 538 | then $a | |
539 | 539 | else refreshRewardPerNsbtSUM($a, $l[$i]) | |
540 | 540 | ||
541 | 541 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
542 | 542 | then $a | |
543 | 543 | else throw("List size exceeds 9") | |
544 | 544 | ||
545 | 545 | $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) | |
546 | 546 | } :+ IntegerEntry(depositNumLastKEY, depositNumNew)) ++ DepositsTotalsEntries(amount, pmtAssetIdStr)) | |
547 | 547 | } | |
548 | 548 | } | |
549 | 549 | } | |
550 | 550 | ||
551 | 551 | ||
552 | 552 | ||
553 | 553 | @Callable(i) | |
554 | 554 | func claimRewards () = commonClaim(i.caller, i) | |
555 | 555 | ||
556 | 556 | ||
557 | 557 | ||
558 | 558 | @Callable(i) | |
559 | 559 | func claimRewardsByOriginCaller () = commonClaim(i.originCaller, i) | |
560 | 560 | ||
561 | 561 | ||
562 | 562 | ||
563 | 563 | @Callable(i) | |
564 | 564 | func unclaimedRewardsREADONLY (userAddressStr) = { | |
565 | 565 | func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_") | |
566 | 566 | ||
567 | 567 | let unclaimedRewardStr = if ((userAddressStr == "")) | |
568 | 568 | then { | |
569 | 569 | let $l = supportedAssetsList | |
570 | 570 | let $s = size($l) | |
571 | 571 | let $acc0 = "" | |
572 | 572 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
573 | 573 | then $a | |
574 | 574 | else forEachAssetZeroReward($a, $l[$i]) | |
575 | 575 | ||
576 | 576 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
577 | 577 | then $a | |
578 | 578 | else throw("List size exceeds 9") | |
579 | 579 | ||
580 | 580 | $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) | |
581 | 581 | } | |
582 | 582 | else { | |
583 | 583 | let userAddress = addressFromStringValue(userAddressStr) | |
584 | - | let $ | |
585 | - | let isNewUser = $ | |
586 | - | let stakedAmount = $ | |
587 | - | let stakingStart = $ | |
584 | + | let $t02268022785 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
585 | + | let isNewUser = $t02268022785._1 | |
586 | + | let stakedAmount = $t02268022785._2 | |
587 | + | let stakingStart = $t02268022785._3 | |
588 | 588 | let stakedAmountX = toBigInt(stakedAmount) | |
589 | 589 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
590 | 590 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
591 | 591 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
592 | 592 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
593 | - | let $ | |
594 | - | let rewardTotal = $ | |
595 | - | let cached = $ | |
596 | - | let dynamic = $ | |
597 | - | let rewardCachedPartKEY = $ | |
593 | + | let $t02313123269 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
594 | + | let rewardTotal = $t02313123269._1 | |
595 | + | let cached = $t02313123269._2 | |
596 | + | let dynamic = $t02313123269._3 | |
597 | + | let rewardCachedPartKEY = $t02313123269._4 | |
598 | 598 | let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0) | |
599 | 599 | ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_") | |
600 | 600 | } | |
601 | 601 | ||
602 | 602 | let $l = supportedAssetsList | |
603 | 603 | let $s = size($l) | |
604 | 604 | let $acc0 = "" | |
605 | 605 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
606 | 606 | then $a | |
607 | 607 | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
608 | 608 | ||
609 | 609 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
610 | 610 | then $a | |
611 | 611 | else throw("List size exceeds 9") | |
612 | 612 | ||
613 | 613 | $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) | |
614 | 614 | } | |
615 | 615 | $Tuple2(nil, dropRight(unclaimedRewardStr, 1)) | |
616 | 616 | } | |
617 | 617 | ||
618 | 618 | ||
619 | 619 | ||
620 | 620 | @Callable(i) | |
621 | 621 | func surfStakingSYSREADONLY (userAddressStrOrEmpty,surfDiff) = { | |
622 | 622 | let surfTotal = getIntOrElse(keyLockParamTotalAmount(), 0) | |
623 | 623 | let gnsbtFromSurfTotal = surfToGnsbt(surfTotal) | |
624 | 624 | if ((userAddressStrOrEmpty == "")) | |
625 | 625 | then $Tuple2(nil, [0, surfTotal, 0, gnsbtFromSurfTotal, 0, height, height]) | |
626 | 626 | else { | |
627 | 627 | let userAddress = toAddressOrFail(userAddressStrOrEmpty) | |
628 | 628 | let mergedData = mergeStake(userAddress, surfDiff) | |
629 | 629 | let isNewUser = mergedData._1 | |
630 | 630 | let stakedAmount = mergedData._2 | |
631 | 631 | let vpEffectiveHeight = mergedData._3 | |
632 | 632 | let stakedAmountNEW = mergedData._4 | |
633 | 633 | let vpEffectiveHeightNEW = mergedData._5 | |
634 | 634 | let surfUser = stakedAmount | |
635 | 635 | let gnsbtFromSurfUser = surfToGnsbt(surfUser) | |
636 | 636 | $Tuple2(nil, [surfUser, surfTotal, gnsbtFromSurfUser, gnsbtFromSurfTotal, vpEffectiveHeight, vpEffectiveHeightNEW]) | |
637 | 637 | } | |
638 | 638 | } | |
639 | 639 | ||
640 | 640 | ||
641 | 641 | ||
642 | 642 | @Callable(i) | |
643 | 643 | func gnsbtFromSurfSYSREADONLY (surfAmt) = $Tuple2(nil, surfToGnsbt(surfAmt)) | |
644 | 644 | ||
645 | 645 | ||
646 | 646 | ||
647 | 647 | @Callable(i) | |
648 | 648 | func configSYSREADONLY () = { | |
649 | 649 | let minLockAmt = getIntegerValue(keyMinLockAmount()) | |
650 | 650 | let surfVotingPowerRestrictivePeriod = (1440 * 14) | |
651 | 651 | let brToStartSurfTransformation = 1150000 | |
652 | 652 | $Tuple2(nil, [minLockAmt, (gnsbtFromSurfCoeff * MULT6), surfVotingPowerRestrictivePeriod, brToStartSurfTransformation]) | |
653 | 653 | } | |
654 | 654 | ||
655 | 655 |
github/deemru/w8io/169f3d6 117.54 ms ◑