tx · FANvdUD69AmAbDDCwtvkxuKJzLMN9ehHWEFBEepVWrrp 3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J: -0.04000000 Waves 2022.07.29 14:05 [2161025] smart account 3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J > SELF 0.00000000 Waves
{ "type": 13, "id": "FANvdUD69AmAbDDCwtvkxuKJzLMN9ehHWEFBEepVWrrp", "fee": 4000000, "feeAssetId": null, "timestamp": 1659092778489, "version": 1, "sender": "3MuGfNhF98CNBCfthhoJEo6SYUv7zTgkK4J", "senderPublicKey": "4DthuG3xjZV9WtZ34Y66AummdAr67wRzwWsVQL4y2bob", "proofs": [ "3Zsawxppaui4FhHAF6mjoja2BguJpHoTiyyzrR9CcVsmcnbADem6NdvdBsnrsMBJy2Mm6Z59QUduUv9yMT6pGgxq", "46yzSwutUWcA1uJLHYbMDyz4GgRoTZLoBSA5xxetV6Wa4AduCoMeoQYKBg2d1euhGphX26rtJkaKtgSPWk4epMwr", "2P4srFV7KZt66twwgKsKPWzGkme2UKyNFhmeXn6TgVh3FTk8EToU6jf44bMzVXGnGpFEdwGSF9cqW1aCPvsB1FR1" ], "script": "base64:AAIFAAAAAAAAACAIAhIHCgUICAEBCBIAEgMKAQESABIAEgMKAQgSAwoBCAAAAEYAAAAACXNlcGFyYXRvcgIAAAACX18AAAAAA1NFUAIAAAACX18AAAAABU1VTFQ2AAAAAAAAD0JAAAAAAAVNVUxUOAAAAAAABfXhAAAAAAAGTVVMVFg2CQABNgAAAAEFAAAABU1VTFQ2AAAAAAZNVUxUWDgJAAE2AAAAAQUAAAAFTVVMVDgAAAAAB01VTFRYMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAAKV0FWRVNJRFNUUgIAAAAFV0FWRVMAAAAAB1dBVkVTSUQJAAJZAAAAAQUAAAAKV0FWRVNJRFNUUgAAAAAZSWR4Q29udHJvbENmZ05ldXRyaW5vRGFwcAAAAAAAAAAAAQAAAAAYSWR4Q29udHJvbENmZ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AAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAQAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAgAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAADCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAwAAAAAAAAAAAgAAAAAAAAAAAAkAAGcAAAACBQAAAAVjb3VudAAAAAAAAAAAAwsBW4E=", "chainId": 84, "height": 2161025, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5WiKyA1KQfvsWUt4BFKaDJfAKLpeyhebAVsEceEqi5FU Next: 91K4ci1qHUfjVPBT8ESPr26haHhYEcQeLJLc4uESEbzJ Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | + | ||
6 | + | let SEP = "__" | |
5 | 7 | ||
6 | 8 | let MULT6 = 1000000 | |
7 | 9 | ||
17 | 19 | ||
18 | 20 | let WAVESID = fromBase58String(WAVESIDSTR) | |
19 | 21 | ||
20 | - | func keyBondAsset () = "bond_asset_id" | |
22 | + | let IdxControlCfgNeutrinoDapp = 1 | |
23 | + | ||
24 | + | let IdxControlCfgAuctionDapp = 2 | |
25 | + | ||
26 | + | let IdxControlCfgRpdDapp = 3 | |
27 | + | ||
28 | + | let IdxControlCfgMathDapp = 4 | |
29 | + | ||
30 | + | let IdxControlCfgLiquidationDapp = 5 | |
31 | + | ||
32 | + | let IdxControlCfgRestDapp = 6 | |
33 | + | ||
34 | + | let IdxControlCfgNodeRegistryDapp = 7 | |
35 | + | ||
36 | + | let IdxControlCfgNsbtStakingDapp = 8 | |
37 | + | ||
38 | + | let IdxControlCfgMediatorDapp = 9 | |
39 | + | ||
40 | + | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
21 | 41 | ||
22 | 42 | ||
23 | - | func keyAuctionContractAddress () = "auction_contract" | |
43 | + | func keyControlAddress () = "%s%s__config__controlAddress" | |
44 | + | ||
45 | + | ||
46 | + | func keyControlCfg () = "%s__controlConfig" | |
47 | + | ||
48 | + | ||
49 | + | func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP) | |
50 | + | ||
51 | + | ||
52 | + | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
53 | + | ||
54 | + | ||
55 | + | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
56 | + | ||
57 | + | let controlCfg = readControlCfgOrFail(controlContract) | |
58 | + | ||
59 | + | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
60 | + | ||
61 | + | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
62 | + | ||
63 | + | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
64 | + | ||
65 | + | func keyBondAsset () = "bond_asset_id" | |
24 | 66 | ||
25 | 67 | ||
26 | 68 | func keyNeutrinoContractAddress () = "%s__neutrinoContractAddress" | |
92 | 134 | func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal) | |
93 | 135 | ||
94 | 136 | ||
95 | - | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("Mandatory this." + key) + " is not defined")) | |
96 | - | ||
97 | - | ||
98 | 137 | func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr)) | |
99 | 138 | ||
100 | 139 | ||
135 | 174 | func LockParamsEntry (userAddress,amount,start) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), start)] | |
136 | 175 | ||
137 | 176 | ||
138 | - | func getParamsOrFail () = { | |
139 | - | let neutrinoContract = addressFromStringValue(getStringOrFail(keyNeutrinoContractAddress())) | |
140 | - | $Tuple4(fromBase58String(getStringValue(neutrinoContract, keyAuctionContractAddress())), fromBase58String(getStringValue(neutrinoContract, keyBondAsset())), getIntOrFail(keyMinLockAmount()), getIntOrFail(keyHalfLife())) | |
141 | - | } | |
177 | + | func getParamsOrFail () = $Tuple3(fromBase58String(getStringValue(neutrinoContract, keyBondAsset())), getIntOrFail(keyMinLockAmount()), getIntOrFail(keyHalfLife())) | |
142 | 178 | ||
143 | 179 | ||
144 | 180 | func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0) | |
173 | 209 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
174 | 210 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
175 | 211 | func forEachAssetCacheUserReward (accum,asset) = { | |
176 | - | let $ | |
177 | - | let rewardTotal = $ | |
178 | - | let cached = $ | |
179 | - | let dynamic = $ | |
180 | - | let rewardCachedPartKEY = $ | |
212 | + | let $t084098544 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast) | |
213 | + | let rewardTotal = $t084098544._1 | |
214 | + | let cached = $t084098544._2 | |
215 | + | let dynamic = $t084098544._3 | |
216 | + | let rewardCachedPartKEY = $t084098544._4 | |
181 | 217 | (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal)) | |
182 | 218 | } | |
183 | 219 | ||
247 | 283 | ||
248 | 284 | @Callable(i) | |
249 | 285 | func stake () = { | |
250 | - | let $t01118911268 = getParamsOrFail() | |
251 | - | let auctionContract = $t01118911268._1 | |
252 | - | let bondAssetId = $t01118911268._2 | |
253 | - | let minLockAmount = $t01118911268._3 | |
254 | - | let halfLife = $t01118911268._4 | |
286 | + | let $t01221812280 = getParamsOrFail() | |
287 | + | let bondAssetId = $t01221812280._1 | |
288 | + | let minLockAmount = $t01221812280._2 | |
289 | + | let halfLife = $t01221812280._3 | |
255 | 290 | if ((size(i.payments) != 1)) | |
256 | 291 | then throw("Invalid payments size") | |
257 | 292 | else { | |
264 | 299 | else { | |
265 | 300 | let userAddress = i.caller | |
266 | 301 | let userAddressStr = toString(i.caller) | |
267 | - | let $ | |
268 | - | let isNewUser = $ | |
269 | - | let lockAmount = $ | |
270 | - | let lockStartHeight = $ | |
302 | + | let $t01282212929 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1)) | |
303 | + | let isNewUser = $t01282212929._1 | |
304 | + | let lockAmount = $t01282212929._2 | |
305 | + | let lockStartHeight = $t01282212929._3 | |
271 | 306 | let mergedAmount = if (isNewUser) | |
272 | 307 | then amount | |
273 | 308 | else (amount + lockAmount) | |
274 | 309 | let mergedStartHeight = if (isNewUser) | |
275 | 310 | then height | |
276 | - | else { | |
277 | - | let mathContract = addressFromStringValue(getStringOrFail(keyMathContractAddress())) | |
278 | - | asInt(invoke(mathContract, "mergeStakesREADONLY", [amount, height, lockAmount, lockStartHeight, halfLife], nil)) | |
279 | - | } | |
311 | + | else asInt(invoke(mathContract, "mergeStakesREADONLY", [amount, height, lockAmount, lockStartHeight, halfLife], nil)) | |
280 | 312 | if ((minLockAmount > mergedAmount)) | |
281 | 313 | then throw(("Min lock amount is " + toString(minLockAmount))) | |
282 | 314 | else { | |
283 | - | let $ | |
315 | + | let $t01329013392 = StatsResult(amount, 1, if (isNewUser) | |
284 | 316 | then 1 | |
285 | 317 | else 0) | |
286 | - | let statsEntries = $ | |
287 | - | let totalStaked = $ | |
288 | - | let totalStakedNew = $ | |
318 | + | let statsEntries = $t01329013392._1 | |
319 | + | let totalStaked = $t01329013392._2 | |
320 | + | let totalStakedNew = $t01329013392._3 | |
289 | 321 | ((([HistoryRecordEntry("stake", userAddress, i.transactionId, lockAmount, lockStartHeight, mergedAmount, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, mergedAmount, mergedStartHeight)) ++ statsEntries) | |
290 | 322 | } | |
291 | 323 | } | |
300 | 332 | else { | |
301 | 333 | let userAddress = i.caller | |
302 | 334 | let userAddressStr = toString(userAddress) | |
303 | - | let $t01295513033 = getParamsOrFail() | |
304 | - | let auctionAddress = $t01295513033._1 | |
305 | - | let bondAssetId = $t01295513033._2 | |
306 | - | let minLockAmount = $t01295513033._3 | |
307 | - | let halfLife = $t01295513033._4 | |
308 | - | let $t01303613110 = getUserParamsOrFail(userAddress) | |
309 | - | let isNewUser = $t01303613110._1 | |
310 | - | let lockAmount = $t01303613110._2 | |
311 | - | let lockStart = $t01303613110._3 | |
335 | + | let $t01387813940 = getParamsOrFail() | |
336 | + | let bondAssetId = $t01387813940._1 | |
337 | + | let minLockAmount = $t01387813940._2 | |
338 | + | let halfLife = $t01387813940._3 | |
339 | + | let $t01394314017 = getUserParamsOrFail(userAddress) | |
340 | + | let isNewUser = $t01394314017._1 | |
341 | + | let lockAmount = $t01394314017._2 | |
342 | + | let lockStart = $t01394314017._3 | |
312 | 343 | if ((0 >= lockAmount)) | |
313 | 344 | then throw("Nothing to unstake") | |
314 | 345 | else if ((amount > lockAmount)) | |
315 | 346 | then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(lockAmount))) | |
316 | 347 | else { | |
317 | - | let mathContract = addressFromStringValue(getStringOrFail(keyMathContractAddress())) | |
318 | 348 | let comissionAmount = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, lockStart, halfLife], nil)) | |
319 | - | let $ | |
349 | + | let $t01433114485 = StatsResult(-(amount), if ((amount == lockAmount)) | |
320 | 350 | then -1 | |
321 | 351 | else 0, if ((amount == lockAmount)) | |
322 | 352 | then -1 | |
323 | 353 | else 0) | |
324 | - | let statsEntries = $ | |
325 | - | let totalStaked = $ | |
326 | - | let totalStakedNew = $ | |
327 | - | ((([ScriptTransfer(userAddress, (amount - comissionAmount), bondAssetId), ScriptTransfer( | |
354 | + | let statsEntries = $t01433114485._1 | |
355 | + | let totalStaked = $t01433114485._2 | |
356 | + | let totalStakedNew = $t01433114485._3 | |
357 | + | ((([ScriptTransfer(userAddress, (amount - comissionAmount), bondAssetId), ScriptTransfer(auctionContract, comissionAmount, bondAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, lockAmount, lockStart, (lockAmount - amount), lockStart)] ++ RewardEntries(false, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, (lockAmount - amount), lockStart)) ++ statsEntries) | |
328 | 358 | } | |
329 | 359 | } | |
330 | 360 | ||
391 | 421 | if ((size(i.payments) > 0)) | |
392 | 422 | then throw("payments are not accepted") | |
393 | 423 | else { | |
394 | - | let $ | |
395 | - | let isNewUser = $ | |
396 | - | let stakedAmount = $ | |
397 | - | let stakingStart = $ | |
424 | + | let $t01673216837 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
425 | + | let isNewUser = $t01673216837._1 | |
426 | + | let stakedAmount = $t01673216837._2 | |
427 | + | let stakingStart = $t01673216837._3 | |
398 | 428 | let stakedAmountX = toBigInt(stakedAmount) | |
399 | 429 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
400 | 430 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
401 | 431 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
402 | 432 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
403 | - | let $ | |
404 | - | let rewardTotal = $ | |
405 | - | let cached = $ | |
406 | - | let dynamic = $ | |
407 | - | let rewardCachedPartKEY = $ | |
433 | + | let $t01720817346 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
434 | + | let rewardTotal = $t01720817346._1 | |
435 | + | let cached = $t01720817346._2 | |
436 | + | let dynamic = $t01720817346._3 | |
437 | + | let rewardCachedPartKEY = $t01720817346._4 | |
408 | 438 | let claimedKEY = keyClaimed(userAddressStr, asset) | |
409 | - | let $ | |
410 | - | let data = $ | |
411 | - | let claimedAmtByAsset = $ | |
439 | + | let $t01740617443 = accum | |
440 | + | let data = $t01740617443._1 | |
441 | + | let claimedAmtByAsset = $t01740617443._2 | |
412 | 442 | let newPart = makeString([asset, toString(rewardTotal)], ":") | |
413 | 443 | let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_") | |
414 | 444 | if ((0 >= rewardTotal)) | |
416 | 446 | else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew) | |
417 | 447 | } | |
418 | 448 | ||
419 | - | let $ | |
449 | + | let $t01790318017 = { | |
420 | 450 | let $l = supportedAssetsList | |
421 | 451 | let $s = size($l) | |
422 | 452 | let $acc0 = $Tuple2(nil, "") | |
430 | 460 | ||
431 | 461 | $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) | |
432 | 462 | } | |
433 | - | let transfers = $ | |
434 | - | let claimedAmtByAssetResult = $ | |
463 | + | let transfers = $t01790318017._1 | |
464 | + | let claimedAmtByAssetResult = $t01790318017._2 | |
435 | 465 | if ((0 >= size(transfers))) | |
436 | 466 | then throw("nothing to claim") | |
437 | 467 | else ((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))) | |
461 | 491 | } | |
462 | 492 | else { | |
463 | 493 | let userAddress = addressFromStringValue(userAddressStr) | |
464 | - | let $ | |
465 | - | let isNewUser = $ | |
466 | - | let stakedAmount = $ | |
467 | - | let stakingStart = $ | |
494 | + | let $t01871518820 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
495 | + | let isNewUser = $t01871518820._1 | |
496 | + | let stakedAmount = $t01871518820._2 | |
497 | + | let stakingStart = $t01871518820._3 | |
468 | 498 | let stakedAmountX = toBigInt(stakedAmount) | |
469 | 499 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
470 | 500 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
471 | 501 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
472 | 502 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
473 | - | let $ | |
474 | - | let rewardTotal = $ | |
475 | - | let cached = $ | |
476 | - | let dynamic = $ | |
477 | - | let rewardCachedPartKEY = $ | |
503 | + | let $t01916619304 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
504 | + | let rewardTotal = $t01916619304._1 | |
505 | + | let cached = $t01916619304._2 | |
506 | + | let dynamic = $t01916619304._3 | |
507 | + | let rewardCachedPartKEY = $t01916619304._4 | |
478 | 508 | let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0) | |
479 | 509 | ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_") | |
480 | 510 | } | |
504 | 534 | then $Tuple2(nil, [0, totalNsbtAmt, 0]) | |
505 | 535 | else { | |
506 | 536 | let userAddress = toAddressOrFail(userAddressStr) | |
507 | - | let $ | |
508 | - | let isNewUser = $ | |
509 | - | let userNsbtAmt = $ | |
510 | - | let stakingStart = $ | |
537 | + | let $t01996920073 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
538 | + | let isNewUser = $t01996920073._1 | |
539 | + | let userNsbtAmt = $t01996920073._2 | |
540 | + | let stakingStart = $t01996920073._3 | |
511 | 541 | $Tuple2(nil, [userNsbtAmt, totalNsbtAmt, stakingStart]) | |
512 | 542 | } | |
513 | 543 | } | |
515 | 545 | ||
516 | 546 | @Verifier(tx) | |
517 | 547 | func verify () = { | |
518 | - | let pubKeyAdminsList = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"] | |
548 | + | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
549 | + | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
519 | 550 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
520 | 551 | then 1 | |
521 | 552 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | + | ||
6 | + | let SEP = "__" | |
5 | 7 | ||
6 | 8 | let MULT6 = 1000000 | |
7 | 9 | ||
8 | 10 | let MULT8 = 100000000 | |
9 | 11 | ||
10 | 12 | let MULTX6 = toBigInt(MULT6) | |
11 | 13 | ||
12 | 14 | let MULTX8 = toBigInt(MULT8) | |
13 | 15 | ||
14 | 16 | let MULTX18 = toBigInt(1000000000000000000) | |
15 | 17 | ||
16 | 18 | let WAVESIDSTR = "WAVES" | |
17 | 19 | ||
18 | 20 | let WAVESID = fromBase58String(WAVESIDSTR) | |
19 | 21 | ||
20 | - | func keyBondAsset () = "bond_asset_id" | |
22 | + | let IdxControlCfgNeutrinoDapp = 1 | |
23 | + | ||
24 | + | let IdxControlCfgAuctionDapp = 2 | |
25 | + | ||
26 | + | let IdxControlCfgRpdDapp = 3 | |
27 | + | ||
28 | + | let IdxControlCfgMathDapp = 4 | |
29 | + | ||
30 | + | let IdxControlCfgLiquidationDapp = 5 | |
31 | + | ||
32 | + | let IdxControlCfgRestDapp = 6 | |
33 | + | ||
34 | + | let IdxControlCfgNodeRegistryDapp = 7 | |
35 | + | ||
36 | + | let IdxControlCfgNsbtStakingDapp = 8 | |
37 | + | ||
38 | + | let IdxControlCfgMediatorDapp = 9 | |
39 | + | ||
40 | + | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
21 | 41 | ||
22 | 42 | ||
23 | - | func keyAuctionContractAddress () = "auction_contract" | |
43 | + | func keyControlAddress () = "%s%s__config__controlAddress" | |
44 | + | ||
45 | + | ||
46 | + | func keyControlCfg () = "%s__controlConfig" | |
47 | + | ||
48 | + | ||
49 | + | func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP) | |
50 | + | ||
51 | + | ||
52 | + | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
53 | + | ||
54 | + | ||
55 | + | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
56 | + | ||
57 | + | let controlCfg = readControlCfgOrFail(controlContract) | |
58 | + | ||
59 | + | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
60 | + | ||
61 | + | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
62 | + | ||
63 | + | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
64 | + | ||
65 | + | func keyBondAsset () = "bond_asset_id" | |
24 | 66 | ||
25 | 67 | ||
26 | 68 | func keyNeutrinoContractAddress () = "%s__neutrinoContractAddress" | |
27 | 69 | ||
28 | 70 | ||
29 | 71 | func keyMathContractAddress () = "%s__mathContract" | |
30 | 72 | ||
31 | 73 | ||
32 | 74 | func keyMinLockAmount () = "%s__minLockAmount" | |
33 | 75 | ||
34 | 76 | ||
35 | 77 | func keyHalfLife () = "%s__halfLife" | |
36 | 78 | ||
37 | 79 | ||
38 | 80 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator) | |
39 | 81 | ||
40 | 82 | ||
41 | 83 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator) | |
42 | 84 | ||
43 | 85 | ||
44 | 86 | func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator) | |
45 | 87 | ||
46 | 88 | ||
47 | 89 | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator) | |
48 | 90 | ||
49 | 91 | ||
50 | 92 | func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator) | |
51 | 93 | ||
52 | 94 | ||
53 | 95 | func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator) | |
54 | 96 | ||
55 | 97 | ||
56 | 98 | func keyNextPeriod () = "%s__nextPeriod" | |
57 | 99 | ||
58 | 100 | ||
59 | 101 | func keySupportedRewardAssets () = "supportedRewardAssets" | |
60 | 102 | ||
61 | 103 | ||
62 | 104 | func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator) | |
63 | 105 | ||
64 | 106 | ||
65 | 107 | func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator) | |
66 | 108 | ||
67 | 109 | ||
68 | 110 | func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator) | |
69 | 111 | ||
70 | 112 | ||
71 | 113 | func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator) | |
72 | 114 | ||
73 | 115 | ||
74 | 116 | func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator) | |
75 | 117 | ||
76 | 118 | ||
77 | 119 | func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator) | |
78 | 120 | ||
79 | 121 | ||
80 | 122 | func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult) | |
81 | 123 | ||
82 | 124 | ||
83 | 125 | func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0) | |
84 | 126 | ||
85 | 127 | ||
86 | 128 | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
87 | 129 | ||
88 | 130 | ||
89 | 131 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined")) | |
90 | 132 | ||
91 | 133 | ||
92 | 134 | func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal) | |
93 | 135 | ||
94 | 136 | ||
95 | - | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("Mandatory this." + key) + " is not defined")) | |
96 | - | ||
97 | - | ||
98 | 137 | func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr)) | |
99 | 138 | ||
100 | 139 | ||
101 | 140 | func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR)) | |
102 | 141 | then unit | |
103 | 142 | else fromBase58String(assetStr) | |
104 | 143 | ||
105 | 144 | ||
106 | 145 | func asInt (val) = match val { | |
107 | 146 | case valInt: Int => | |
108 | 147 | valInt | |
109 | 148 | case _ => | |
110 | 149 | throw("fail to cast into Int") | |
111 | 150 | } | |
112 | 151 | ||
113 | 152 | ||
114 | 153 | 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) | |
115 | 154 | ||
116 | 155 | ||
117 | 156 | func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator) | |
118 | 157 | ||
119 | 158 | ||
120 | 159 | func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart)) | |
121 | 160 | ||
122 | 161 | ||
123 | 162 | func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards)) | |
124 | 163 | ||
125 | 164 | ||
126 | 165 | func StatsResult (totalLockedInc,lockCountInc,usersCountInc) = { | |
127 | 166 | let locksCount = getIntOrZero(keyStatsLocksCount()) | |
128 | 167 | let usersCount = getIntOrZero(keyStatsUsersCount()) | |
129 | 168 | let totalAmount = getIntOrZero(keyLockParamTotalAmount()) | |
130 | 169 | let totalAmountNew = (totalAmount + totalLockedInc) | |
131 | 170 | $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)], totalAmount, totalAmountNew) | |
132 | 171 | } | |
133 | 172 | ||
134 | 173 | ||
135 | 174 | func LockParamsEntry (userAddress,amount,start) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), start)] | |
136 | 175 | ||
137 | 176 | ||
138 | - | func getParamsOrFail () = { | |
139 | - | let neutrinoContract = addressFromStringValue(getStringOrFail(keyNeutrinoContractAddress())) | |
140 | - | $Tuple4(fromBase58String(getStringValue(neutrinoContract, keyAuctionContractAddress())), fromBase58String(getStringValue(neutrinoContract, keyBondAsset())), getIntOrFail(keyMinLockAmount()), getIntOrFail(keyHalfLife())) | |
141 | - | } | |
177 | + | func getParamsOrFail () = $Tuple3(fromBase58String(getStringValue(neutrinoContract, keyBondAsset())), getIntOrFail(keyMinLockAmount()), getIntOrFail(keyHalfLife())) | |
142 | 178 | ||
143 | 179 | ||
144 | 180 | func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0) | |
145 | 181 | ||
146 | 182 | ||
147 | 183 | func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress)) | |
148 | 184 | then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress))) | |
149 | 185 | else unit | |
150 | 186 | ||
151 | 187 | ||
152 | 188 | func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined")) | |
153 | 189 | ||
154 | 190 | ||
155 | 191 | let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "") | |
156 | 192 | ||
157 | 193 | let supportedAssetsList = split(supportedAssetsStr, "_") | |
158 | 194 | ||
159 | 195 | func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = { | |
160 | 196 | let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId) | |
161 | 197 | let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0")) | |
162 | 198 | let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0")) | |
163 | 199 | let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18)) | |
164 | 200 | let rewardCachedPartKEY = keyReward(userAddress, assetId) | |
165 | 201 | let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0) | |
166 | 202 | $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY) | |
167 | 203 | } | |
168 | 204 | ||
169 | 205 | ||
170 | 206 | func RewardEntries (isNewUser,userAddress,stakedAmount) = { | |
171 | 207 | let stakedAmountX = toBigInt(stakedAmount) | |
172 | 208 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress) | |
173 | 209 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
174 | 210 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
175 | 211 | func forEachAssetCacheUserReward (accum,asset) = { | |
176 | - | let $ | |
177 | - | let rewardTotal = $ | |
178 | - | let cached = $ | |
179 | - | let dynamic = $ | |
180 | - | let rewardCachedPartKEY = $ | |
212 | + | let $t084098544 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast) | |
213 | + | let rewardTotal = $t084098544._1 | |
214 | + | let cached = $t084098544._2 | |
215 | + | let dynamic = $t084098544._3 | |
216 | + | let rewardCachedPartKEY = $t084098544._4 | |
181 | 217 | (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal)) | |
182 | 218 | } | |
183 | 219 | ||
184 | 220 | if (if ((depositNumLast == -1)) | |
185 | 221 | then (depositNumUser == -1) | |
186 | 222 | else false) | |
187 | 223 | then nil | |
188 | 224 | else if (if ((depositNumLast == -1)) | |
189 | 225 | then (depositNumUser > -1) | |
190 | 226 | else false) | |
191 | 227 | then throw("invalid depositNumLast and depositNumUser state") | |
192 | 228 | else if (if ((depositNumLast > -1)) | |
193 | 229 | then (depositNumUser == -1) | |
194 | 230 | else false) | |
195 | 231 | then if (isNewUser) | |
196 | 232 | then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)] | |
197 | 233 | else ({ | |
198 | 234 | let $l = supportedAssetsList | |
199 | 235 | let $s = size($l) | |
200 | 236 | let $acc0 = nil | |
201 | 237 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
202 | 238 | then $a | |
203 | 239 | else forEachAssetCacheUserReward($a, $l[$i]) | |
204 | 240 | ||
205 | 241 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
206 | 242 | then $a | |
207 | 243 | else throw("List size exceeds 10") | |
208 | 244 | ||
209 | 245 | $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) | |
210 | 246 | } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) | |
211 | 247 | else if (if ((depositNumLast > -1)) | |
212 | 248 | then (depositNumUser > -1) | |
213 | 249 | else false) | |
214 | 250 | then if (isNewUser) | |
215 | 251 | then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)] | |
216 | 252 | else ({ | |
217 | 253 | let $l = supportedAssetsList | |
218 | 254 | let $s = size($l) | |
219 | 255 | let $acc0 = nil | |
220 | 256 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
221 | 257 | then $a | |
222 | 258 | else forEachAssetCacheUserReward($a, $l[$i]) | |
223 | 259 | ||
224 | 260 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
225 | 261 | then $a | |
226 | 262 | else throw("List size exceeds 10") | |
227 | 263 | ||
228 | 264 | $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) | |
229 | 265 | } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) | |
230 | 266 | else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser))) | |
231 | 267 | } | |
232 | 268 | ||
233 | 269 | ||
234 | 270 | func IncrementNotDistributedRewardEntry (tkn,amountInc) = { | |
235 | 271 | let notDistributedRewardKEY = keyNotDistributedReward(tkn) | |
236 | 272 | let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0) | |
237 | 273 | [IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))] | |
238 | 274 | } | |
239 | 275 | ||
240 | 276 | ||
241 | 277 | @Callable(i) | |
242 | 278 | func constructor (neutrinoContractAddress,mathContractAddress,minLockAmount,halfLife,supportedRewardAssets) = if ((i.caller != this)) | |
243 | 279 | then throw("Permission denied") | |
244 | 280 | else [StringEntry(keyNeutrinoContractAddress(), neutrinoContractAddress), StringEntry(keyMathContractAddress(), mathContractAddress), IntegerEntry(keyMinLockAmount(), minLockAmount), IntegerEntry(keyHalfLife(), halfLife), StringEntry(keySupportedRewardAssets(), supportedRewardAssets)] | |
245 | 281 | ||
246 | 282 | ||
247 | 283 | ||
248 | 284 | @Callable(i) | |
249 | 285 | func stake () = { | |
250 | - | let $t01118911268 = getParamsOrFail() | |
251 | - | let auctionContract = $t01118911268._1 | |
252 | - | let bondAssetId = $t01118911268._2 | |
253 | - | let minLockAmount = $t01118911268._3 | |
254 | - | let halfLife = $t01118911268._4 | |
286 | + | let $t01221812280 = getParamsOrFail() | |
287 | + | let bondAssetId = $t01221812280._1 | |
288 | + | let minLockAmount = $t01221812280._2 | |
289 | + | let halfLife = $t01221812280._3 | |
255 | 290 | if ((size(i.payments) != 1)) | |
256 | 291 | then throw("Invalid payments size") | |
257 | 292 | else { | |
258 | 293 | let payment = i.payments[0] | |
259 | 294 | let amount = payment.amount | |
260 | 295 | let invalidAssetMessage = (("Invalid asset. " + toBase58String(bondAssetId)) + " is expected") | |
261 | 296 | let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage) | |
262 | 297 | if ((assetId != bondAssetId)) | |
263 | 298 | then throw(invalidAssetMessage) | |
264 | 299 | else { | |
265 | 300 | let userAddress = i.caller | |
266 | 301 | let userAddressStr = toString(i.caller) | |
267 | - | let $ | |
268 | - | let isNewUser = $ | |
269 | - | let lockAmount = $ | |
270 | - | let lockStartHeight = $ | |
302 | + | let $t01282212929 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1)) | |
303 | + | let isNewUser = $t01282212929._1 | |
304 | + | let lockAmount = $t01282212929._2 | |
305 | + | let lockStartHeight = $t01282212929._3 | |
271 | 306 | let mergedAmount = if (isNewUser) | |
272 | 307 | then amount | |
273 | 308 | else (amount + lockAmount) | |
274 | 309 | let mergedStartHeight = if (isNewUser) | |
275 | 310 | then height | |
276 | - | else { | |
277 | - | let mathContract = addressFromStringValue(getStringOrFail(keyMathContractAddress())) | |
278 | - | asInt(invoke(mathContract, "mergeStakesREADONLY", [amount, height, lockAmount, lockStartHeight, halfLife], nil)) | |
279 | - | } | |
311 | + | else asInt(invoke(mathContract, "mergeStakesREADONLY", [amount, height, lockAmount, lockStartHeight, halfLife], nil)) | |
280 | 312 | if ((minLockAmount > mergedAmount)) | |
281 | 313 | then throw(("Min lock amount is " + toString(minLockAmount))) | |
282 | 314 | else { | |
283 | - | let $ | |
315 | + | let $t01329013392 = StatsResult(amount, 1, if (isNewUser) | |
284 | 316 | then 1 | |
285 | 317 | else 0) | |
286 | - | let statsEntries = $ | |
287 | - | let totalStaked = $ | |
288 | - | let totalStakedNew = $ | |
318 | + | let statsEntries = $t01329013392._1 | |
319 | + | let totalStaked = $t01329013392._2 | |
320 | + | let totalStakedNew = $t01329013392._3 | |
289 | 321 | ((([HistoryRecordEntry("stake", userAddress, i.transactionId, lockAmount, lockStartHeight, mergedAmount, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, mergedAmount, mergedStartHeight)) ++ statsEntries) | |
290 | 322 | } | |
291 | 323 | } | |
292 | 324 | } | |
293 | 325 | } | |
294 | 326 | ||
295 | 327 | ||
296 | 328 | ||
297 | 329 | @Callable(i) | |
298 | 330 | func unstake (amount) = if ((size(i.payments) != 0)) | |
299 | 331 | then throw("unstake doesn't require any payment") | |
300 | 332 | else { | |
301 | 333 | let userAddress = i.caller | |
302 | 334 | let userAddressStr = toString(userAddress) | |
303 | - | let $t01295513033 = getParamsOrFail() | |
304 | - | let auctionAddress = $t01295513033._1 | |
305 | - | let bondAssetId = $t01295513033._2 | |
306 | - | let minLockAmount = $t01295513033._3 | |
307 | - | let halfLife = $t01295513033._4 | |
308 | - | let $t01303613110 = getUserParamsOrFail(userAddress) | |
309 | - | let isNewUser = $t01303613110._1 | |
310 | - | let lockAmount = $t01303613110._2 | |
311 | - | let lockStart = $t01303613110._3 | |
335 | + | let $t01387813940 = getParamsOrFail() | |
336 | + | let bondAssetId = $t01387813940._1 | |
337 | + | let minLockAmount = $t01387813940._2 | |
338 | + | let halfLife = $t01387813940._3 | |
339 | + | let $t01394314017 = getUserParamsOrFail(userAddress) | |
340 | + | let isNewUser = $t01394314017._1 | |
341 | + | let lockAmount = $t01394314017._2 | |
342 | + | let lockStart = $t01394314017._3 | |
312 | 343 | if ((0 >= lockAmount)) | |
313 | 344 | then throw("Nothing to unstake") | |
314 | 345 | else if ((amount > lockAmount)) | |
315 | 346 | then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(lockAmount))) | |
316 | 347 | else { | |
317 | - | let mathContract = addressFromStringValue(getStringOrFail(keyMathContractAddress())) | |
318 | 348 | let comissionAmount = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, lockStart, halfLife], nil)) | |
319 | - | let $ | |
349 | + | let $t01433114485 = StatsResult(-(amount), if ((amount == lockAmount)) | |
320 | 350 | then -1 | |
321 | 351 | else 0, if ((amount == lockAmount)) | |
322 | 352 | then -1 | |
323 | 353 | else 0) | |
324 | - | let statsEntries = $ | |
325 | - | let totalStaked = $ | |
326 | - | let totalStakedNew = $ | |
327 | - | ((([ScriptTransfer(userAddress, (amount - comissionAmount), bondAssetId), ScriptTransfer( | |
354 | + | let statsEntries = $t01433114485._1 | |
355 | + | let totalStaked = $t01433114485._2 | |
356 | + | let totalStakedNew = $t01433114485._3 | |
357 | + | ((([ScriptTransfer(userAddress, (amount - comissionAmount), bondAssetId), ScriptTransfer(auctionContract, comissionAmount, bondAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, lockAmount, lockStart, (lockAmount - amount), lockStart)] ++ RewardEntries(false, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, (lockAmount - amount), lockStart)) ++ statsEntries) | |
328 | 358 | } | |
329 | 359 | } | |
330 | 360 | ||
331 | 361 | ||
332 | 362 | ||
333 | 363 | @Callable(i) | |
334 | 364 | func deposit () = if ((size(i.payments) != 1)) | |
335 | 365 | then throw("exact 1 payment is allowed only") | |
336 | 366 | else { | |
337 | 367 | let pmt = i.payments[0] | |
338 | 368 | let amount = pmt.amount | |
339 | 369 | let pmtAssetId = valueOrElse(pmt.assetId, WAVESID) | |
340 | 370 | let pmtAssetIdStr = toBase58String(pmtAssetId) | |
341 | 371 | let pmtMultX = if ((pmtAssetId == WAVESID)) | |
342 | 372 | then MULTX8 | |
343 | 373 | else MULTX6 | |
344 | 374 | let amountX = toBigInt(amount) | |
345 | 375 | let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0) | |
346 | 376 | let totalStakedX = toBigInt(totalStaked) | |
347 | 377 | if ((0 > totalStaked)) | |
348 | 378 | then throw("TODO: case is not supported") | |
349 | 379 | else if ((totalStaked == 0)) | |
350 | 380 | then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount) | |
351 | 381 | else { | |
352 | 382 | let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX) | |
353 | 383 | let depositNumLastKEY = keyDepositNumLast() | |
354 | 384 | let depositNumLast = getIntOrElse(depositNumLastKEY, -1) | |
355 | 385 | let depositNumNew = (depositNumLast + 1) | |
356 | 386 | if (!(contains(supportedAssetsStr, pmtAssetIdStr))) | |
357 | 387 | then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr)) | |
358 | 388 | else { | |
359 | 389 | func refreshRewardPerNsbtSUM (accum,nextAsset) = { | |
360 | 390 | let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset) | |
361 | 391 | let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0") | |
362 | 392 | (accum :+ (if ((nextAsset == pmtAssetIdStr)) | |
363 | 393 | then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18))) | |
364 | 394 | else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr))) | |
365 | 395 | } | |
366 | 396 | ||
367 | 397 | ({ | |
368 | 398 | let $l = supportedAssetsList | |
369 | 399 | let $s = size($l) | |
370 | 400 | let $acc0 = nil | |
371 | 401 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
372 | 402 | then $a | |
373 | 403 | else refreshRewardPerNsbtSUM($a, $l[$i]) | |
374 | 404 | ||
375 | 405 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
376 | 406 | then $a | |
377 | 407 | else throw("List size exceeds 10") | |
378 | 408 | ||
379 | 409 | $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) | |
380 | 410 | } :+ IntegerEntry(depositNumLastKEY, depositNumNew)) | |
381 | 411 | } | |
382 | 412 | } | |
383 | 413 | } | |
384 | 414 | ||
385 | 415 | ||
386 | 416 | ||
387 | 417 | @Callable(i) | |
388 | 418 | func claimRewards () = { | |
389 | 419 | let userAddress = i.caller | |
390 | 420 | let userAddressStr = toString(userAddress) | |
391 | 421 | if ((size(i.payments) > 0)) | |
392 | 422 | then throw("payments are not accepted") | |
393 | 423 | else { | |
394 | - | let $ | |
395 | - | let isNewUser = $ | |
396 | - | let stakedAmount = $ | |
397 | - | let stakingStart = $ | |
424 | + | let $t01673216837 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
425 | + | let isNewUser = $t01673216837._1 | |
426 | + | let stakedAmount = $t01673216837._2 | |
427 | + | let stakingStart = $t01673216837._3 | |
398 | 428 | let stakedAmountX = toBigInt(stakedAmount) | |
399 | 429 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
400 | 430 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
401 | 431 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
402 | 432 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
403 | - | let $ | |
404 | - | let rewardTotal = $ | |
405 | - | let cached = $ | |
406 | - | let dynamic = $ | |
407 | - | let rewardCachedPartKEY = $ | |
433 | + | let $t01720817346 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
434 | + | let rewardTotal = $t01720817346._1 | |
435 | + | let cached = $t01720817346._2 | |
436 | + | let dynamic = $t01720817346._3 | |
437 | + | let rewardCachedPartKEY = $t01720817346._4 | |
408 | 438 | let claimedKEY = keyClaimed(userAddressStr, asset) | |
409 | - | let $ | |
410 | - | let data = $ | |
411 | - | let claimedAmtByAsset = $ | |
439 | + | let $t01740617443 = accum | |
440 | + | let data = $t01740617443._1 | |
441 | + | let claimedAmtByAsset = $t01740617443._2 | |
412 | 442 | let newPart = makeString([asset, toString(rewardTotal)], ":") | |
413 | 443 | let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_") | |
414 | 444 | if ((0 >= rewardTotal)) | |
415 | 445 | then $Tuple2(data, claimedAmtByAssetNew) | |
416 | 446 | else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew) | |
417 | 447 | } | |
418 | 448 | ||
419 | - | let $ | |
449 | + | let $t01790318017 = { | |
420 | 450 | let $l = supportedAssetsList | |
421 | 451 | let $s = size($l) | |
422 | 452 | let $acc0 = $Tuple2(nil, "") | |
423 | 453 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
424 | 454 | then $a | |
425 | 455 | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
426 | 456 | ||
427 | 457 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
428 | 458 | then $a | |
429 | 459 | else throw("List size exceeds 10") | |
430 | 460 | ||
431 | 461 | $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) | |
432 | 462 | } | |
433 | - | let transfers = $ | |
434 | - | let claimedAmtByAssetResult = $ | |
463 | + | let transfers = $t01790318017._1 | |
464 | + | let claimedAmtByAssetResult = $t01790318017._2 | |
435 | 465 | if ((0 >= size(transfers))) | |
436 | 466 | then throw("nothing to claim") | |
437 | 467 | else ((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))) | |
438 | 468 | } | |
439 | 469 | } | |
440 | 470 | ||
441 | 471 | ||
442 | 472 | ||
443 | 473 | @Callable(i) | |
444 | 474 | func unclaimedRewardsREADONLY (userAddressStr) = { | |
445 | 475 | func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_") | |
446 | 476 | ||
447 | 477 | let unclaimedRewardStr = if ((userAddressStr == "")) | |
448 | 478 | then { | |
449 | 479 | let $l = supportedAssetsList | |
450 | 480 | let $s = size($l) | |
451 | 481 | let $acc0 = "" | |
452 | 482 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
453 | 483 | then $a | |
454 | 484 | else forEachAssetZeroReward($a, $l[$i]) | |
455 | 485 | ||
456 | 486 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
457 | 487 | then $a | |
458 | 488 | else throw("List size exceeds 10") | |
459 | 489 | ||
460 | 490 | $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) | |
461 | 491 | } | |
462 | 492 | else { | |
463 | 493 | let userAddress = addressFromStringValue(userAddressStr) | |
464 | - | let $ | |
465 | - | let isNewUser = $ | |
466 | - | let stakedAmount = $ | |
467 | - | let stakingStart = $ | |
494 | + | let $t01871518820 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
495 | + | let isNewUser = $t01871518820._1 | |
496 | + | let stakedAmount = $t01871518820._2 | |
497 | + | let stakingStart = $t01871518820._3 | |
468 | 498 | let stakedAmountX = toBigInt(stakedAmount) | |
469 | 499 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
470 | 500 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
471 | 501 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
472 | 502 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
473 | - | let $ | |
474 | - | let rewardTotal = $ | |
475 | - | let cached = $ | |
476 | - | let dynamic = $ | |
477 | - | let rewardCachedPartKEY = $ | |
503 | + | let $t01916619304 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
504 | + | let rewardTotal = $t01916619304._1 | |
505 | + | let cached = $t01916619304._2 | |
506 | + | let dynamic = $t01916619304._3 | |
507 | + | let rewardCachedPartKEY = $t01916619304._4 | |
478 | 508 | let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0) | |
479 | 509 | ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_") | |
480 | 510 | } | |
481 | 511 | ||
482 | 512 | let $l = supportedAssetsList | |
483 | 513 | let $s = size($l) | |
484 | 514 | let $acc0 = "" | |
485 | 515 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
486 | 516 | then $a | |
487 | 517 | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
488 | 518 | ||
489 | 519 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
490 | 520 | then $a | |
491 | 521 | else throw("List size exceeds 10") | |
492 | 522 | ||
493 | 523 | $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) | |
494 | 524 | } | |
495 | 525 | $Tuple2(nil, dropRight(unclaimedRewardStr, 1)) | |
496 | 526 | } | |
497 | 527 | ||
498 | 528 | ||
499 | 529 | ||
500 | 530 | @Callable(i) | |
501 | 531 | func nsbtStakingSYSREADONLY (userAddressStr) = { | |
502 | 532 | let totalNsbtAmt = getIntOrElse(keyLockParamTotalAmount(), 0) | |
503 | 533 | if ((userAddressStr == "")) | |
504 | 534 | then $Tuple2(nil, [0, totalNsbtAmt, 0]) | |
505 | 535 | else { | |
506 | 536 | let userAddress = toAddressOrFail(userAddressStr) | |
507 | - | let $ | |
508 | - | let isNewUser = $ | |
509 | - | let userNsbtAmt = $ | |
510 | - | let stakingStart = $ | |
537 | + | let $t01996920073 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
538 | + | let isNewUser = $t01996920073._1 | |
539 | + | let userNsbtAmt = $t01996920073._2 | |
540 | + | let stakingStart = $t01996920073._3 | |
511 | 541 | $Tuple2(nil, [userNsbtAmt, totalNsbtAmt, stakingStart]) | |
512 | 542 | } | |
513 | 543 | } | |
514 | 544 | ||
515 | 545 | ||
516 | 546 | @Verifier(tx) | |
517 | 547 | func verify () = { | |
518 | - | let pubKeyAdminsList = ["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "5WRXFSjwcTbNfKcJs8ZqXmSSWYsSVJUtMvMqZj5hH4Nc"] | |
548 | + | let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP) | |
549 | + | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
519 | 550 | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
520 | 551 | then 1 | |
521 | 552 | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
522 | 553 | then 1 | |
523 | 554 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
524 | 555 | then 1 | |
525 | 556 | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
526 | 557 | then 2 | |
527 | 558 | else 0)) | |
528 | 559 | (count >= 3) | |
529 | 560 | } | |
530 | 561 |
github/deemru/w8io/169f3d6 82.14 ms ◑