tx · DUCw5Wmd24KLRNN3AM4egAPQoZWog4iGYZk7UvSUYAPw 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz: -0.02200000 Waves 2023.01.11 17:13 [2400400] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves
{ "type": 13, "id": "DUCw5Wmd24KLRNN3AM4egAPQoZWog4iGYZk7UvSUYAPw", "fee": 2200000, "feeAssetId": null, "timestamp": 1673446430627, "version": 1, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "3UcSdLdu7f1s1RC3osQywDx5pX4Sjm1yTyJtYfA7BLdGRjtk2nyiqzU9K4RdnWYEKe84eD22NXUE2GADUWcZtkVG" ], "script": "base64:BgKrHwgCEgMKAQgSAwoBCBIDCgEIEgASABIECgIIARIDCgEIEgQKAggIEgYKBAEYCBgSBAoCGAgSBAoCCAgSBAoCCAgSAwoBCBIECgIICCIGU0NBTEU4IgVNVUxUOCIHU0NBTEUxOCIGTVVMVDE4IgNTRVAiDlBPT0xXRUlHSFRNVUxUIgp6ZXJvQmlnSW50IglvbmVCaWdJbnQiB3dyYXBFcnIiA21zZyIIdGhyb3dFcnIiCWFzQW55TGlzdCIDdmFsIgckbWF0Y2gwIgp2YWxBbnlMeXN0IgVhc0ludCIGdmFsSW50Ighhc1N0cmluZyIGdmFsU3RyIgxhc0J5dGVWZWN0b3IiBnZhbEJpbiIPZ2V0U3RyaW5nT3JGYWlsIgdhZGRyZXNzIgNrZXkiGGdldFN0cmluZ0J5QWRkcmVzc09yRmFpbCIMZ2V0SW50T3JaZXJvIg9nZXRJbnRPckRlZmF1bHQiCmRlZmF1bHRWYWwiDGdldEludE9yRmFpbCIZZ2V0QmlnSW50RnJvbVN0cmluZ09yWmVybyIcZ2V0QmlnSW50RnJvbVN0cmluZ09yRGVmYXVsd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JiAQUCYUIFA25pbAcDCQABAgUCZHICBlN0cmluZwQCZHUFAmRyCQCUCgIJAMwIAgkBC1N0cmluZ0VudHJ5AgkBAmJiAQUCYUIFAmR1BQNuaWwGCQACAQILTWF0Y2ggZXJyb3IJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAgtNYXRjaCBlcnJvcgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgJjbAEOb25Nb2RpZnlXZWlnaHQCAmF0AmJ4AwkBAiE9AggFAmNsBmNhbGxlcgUCYVgJAAIBAhJwZXJtaXNzaW9ucyBkZW5pZWQEAmR2CQECYncDBQJhdAUCYngAAAQCYnUIBQJkdgJfMQQCYlcIBQJkdgJfMgQCYlgIBQJkdgJfMwUCYlcBAmR3AQJkeAAEAmR5BAFuCQECY2gAAwkAAQIFAW4CCkJ5dGVWZWN0b3IEAmNuBQFuBQJjbgMJAAECBQFuAgRVbml0CAUCZHcPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmR3CWJvZHlCeXRlcwkAkQMCCAUCZHcGcHJvb2ZzAAAFAmR5PYBpPA==", "chainId": 84, "height": 2400400, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 58LniHVX6FCStpjmcHjGv5WQttBsKwDJvHqDL4TmVuAq Next: 3s5i5VQ7FQoQWcBz3K5KM7jB35NAPaTcYBK6WnEgSoMY Diff:
Old | New | Differences | |
---|---|---|---|
17 | 17 | ||
18 | 18 | let oneBigInt = toBigInt(1) | |
19 | 19 | ||
20 | - | func wrapErr (msg) = | |
20 | + | func wrapErr (msg) = makeString(["staking.ride:", toString(this), msg], " ") | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func throwErr (msg) = throw(wrapErr(msg)) | |
357 | 357 | ||
358 | 358 | ||
359 | 359 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
360 | - | let $ | |
361 | - | let wxPerLpIntegralNew = $ | |
362 | - | let poolIntegralSTATE = $ | |
363 | - | let poolDEBUG = $ | |
360 | + | let $t01475014872 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
361 | + | let wxPerLpIntegralNew = $t01475014872._1 | |
362 | + | let poolIntegralSTATE = $t01475014872._2 | |
363 | + | let poolDEBUG = $t01475014872._3 | |
364 | 364 | let MULT3 = 1000 | |
365 | 365 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
366 | 366 | let stakedByUser = readStaked(stakedByUserKEY) | |
494 | 494 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
495 | 495 | let stakedByUser = readStaked(stakedByUserKEY) | |
496 | 496 | let stakedTotal = readStaked(stakedTotalKEY) | |
497 | - | let $ | |
498 | - | let wxToClaimUserNew = $ | |
499 | - | let integralSTATE = $ | |
500 | - | let debug = $ | |
497 | + | let $t01930819425 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
498 | + | let wxToClaimUserNew = $t01930819425._1 | |
499 | + | let integralSTATE = $t01930819425._2 | |
500 | + | let debug = $t01930819425._3 | |
501 | 501 | let listName = getUsersListName(lpAssetIdStr) | |
502 | 502 | let listActions = if (containsNode(listName, userAddressStr)) | |
503 | 503 | then nil | |
513 | 513 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
514 | 514 | let poolAddon = valueOrElse(getString(addressFromStringValue(poolAddressStr), keyAddonAddr()), poolAddressStr) | |
515 | 515 | let callerStr = toString(i.caller) | |
516 | - | let test = lpStakingPoolsContract | |
517 | - | if ((test == test)) | |
518 | - | then { | |
519 | - | let userAddressStr = if (if (if ((callerStr == poolAddressStr)) | |
520 | - | then (i.originCaller != lpStakingPoolsContract) | |
521 | - | else false) | |
522 | - | then true | |
523 | - | else (callerStr == poolAddon)) | |
524 | - | then toString(i.originCaller) | |
525 | - | else callerStr | |
526 | - | if ((userAddressStr == userAddressStr)) | |
527 | - | then { | |
528 | - | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
529 | - | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
530 | - | let stakedByUser = readStaked(stakedByUserKEY) | |
531 | - | let stakedTotal = readStaked(stakedTotalKEY) | |
532 | - | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
533 | - | let listName = getUsersListName(lpAssetIdStr) | |
534 | - | let listActions = if (if (containsNode(listName, userAddressStr)) | |
535 | - | then (amount == stakedByUser) | |
536 | - | else false) | |
537 | - | then deleteNodeActions(listName, userAddressStr) | |
538 | - | else nil | |
539 | - | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
540 | - | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
541 | - | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
542 | - | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
543 | - | let r = if ((availableToClaim > zeroBigInt)) | |
544 | - | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
545 | - | else unit | |
546 | - | if ((r == r)) | |
547 | - | then if ((amount > stakedByUser)) | |
548 | - | then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY)) | |
549 | - | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
550 | - | else throw("Strict value is not equal to itself.") | |
551 | - | } | |
552 | - | else throw("Strict value is not equal to itself.") | |
553 | - | } | |
516 | + | let userAddressStr = if (if (if ((callerStr == poolAddressStr)) | |
517 | + | then (i.originCaller != lpStakingPoolsContract) | |
518 | + | else false) | |
519 | + | then true | |
520 | + | else (callerStr == poolAddon)) | |
521 | + | then toString(i.originCaller) | |
522 | + | else callerStr | |
523 | + | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
524 | + | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
525 | + | let stakedByUser = readStaked(stakedByUserKEY) | |
526 | + | let stakedTotal = readStaked(stakedTotalKEY) | |
527 | + | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
528 | + | let listName = getUsersListName(lpAssetIdStr) | |
529 | + | let listActions = if (if (containsNode(listName, userAddressStr)) | |
530 | + | then (amount == stakedByUser) | |
531 | + | else false) | |
532 | + | then deleteNodeActions(listName, userAddressStr) | |
533 | + | else nil | |
534 | + | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
535 | + | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
536 | + | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
537 | + | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
538 | + | let r = if ((availableToClaim > zeroBigInt)) | |
539 | + | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
540 | + | else unit | |
541 | + | if ((r == r)) | |
542 | + | then if ((amount > stakedByUser)) | |
543 | + | then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY)) | |
544 | + | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
554 | 545 | else throw("Strict value is not equal to itself.") | |
555 | 546 | } | |
556 | 547 | ||
580 | 571 | let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY) | |
581 | 572 | let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY) | |
582 | 573 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
583 | - | let $ | |
584 | - | let wxToClaimUserNew = $ | |
585 | - | let integralSTATE = $ | |
586 | - | let debug = $ | |
574 | + | let $t02331723429 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
575 | + | let wxToClaimUserNew = $t02331723429._1 | |
576 | + | let integralSTATE = $t02331723429._2 | |
577 | + | let debug = $t02331723429._3 | |
587 | 578 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
588 | 579 | if ((zeroBigInt >= availableToClaim)) | |
589 | 580 | then throw("nothing to claim") | |
662 | 653 | else (height - emissionStartBlock) | |
663 | 654 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
664 | 655 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
665 | - | let $ | |
666 | - | let wxToClaimUserNew = $ | |
667 | - | let integralSTATE = $ | |
668 | - | let debug = $ | |
656 | + | let $t02698227094 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
657 | + | let wxToClaimUserNew = $t02698227094._1 | |
658 | + | let integralSTATE = $t02698227094._2 | |
659 | + | let debug = $t02698227094._3 | |
669 | 660 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
670 | 661 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
671 | 662 | let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0]) | |
740 | 731 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
741 | 732 | then throw("permissions denied") | |
742 | 733 | else { | |
743 | - | let $ | |
744 | - | let wxPerLpIntegralNew = $ | |
745 | - | let poolIntegralSTATE = $ | |
746 | - | let poolDEBUG = $ | |
734 | + | let $t02960229712 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
735 | + | let wxPerLpIntegralNew = $t02960229712._1 | |
736 | + | let poolIntegralSTATE = $t02960229712._2 | |
737 | + | let poolDEBUG = $t02960229712._3 | |
747 | 738 | poolIntegralSTATE | |
748 | 739 | } | |
749 | - | ||
750 | - | ||
751 | - | ||
752 | - | @Callable(i) | |
753 | - | func test () = if (true) | |
754 | - | then throw(valueOrElse(getString(this, "%s__lpStakingPoolsContract"), "nothing")) | |
755 | - | else nil | |
756 | 740 | ||
757 | 741 | ||
758 | 742 | @Verifier(tx) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 8 | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | let SCALE18 = 18 | |
9 | 9 | ||
10 | 10 | let MULT18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let SEP = "__" | |
13 | 13 | ||
14 | 14 | let POOLWEIGHTMULT = MULT8 | |
15 | 15 | ||
16 | 16 | let zeroBigInt = toBigInt(0) | |
17 | 17 | ||
18 | 18 | let oneBigInt = toBigInt(1) | |
19 | 19 | ||
20 | - | func wrapErr (msg) = | |
20 | + | func wrapErr (msg) = makeString(["staking.ride:", toString(this), msg], " ") | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func throwErr (msg) = throw(wrapErr(msg)) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func asAnyList (val) = match val { | |
27 | 27 | case valAnyLyst: List[Any] => | |
28 | 28 | valAnyLyst | |
29 | 29 | case _ => | |
30 | 30 | throw("fail to cast into List[Any]") | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func asInt (val) = match val { | |
35 | 35 | case valInt: Int => | |
36 | 36 | valInt | |
37 | 37 | case _ => | |
38 | 38 | throw("fail to cast into Int") | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func asString (val) = match val { | |
43 | 43 | case valStr: String => | |
44 | 44 | valStr | |
45 | 45 | case _ => | |
46 | 46 | throw("fail to cast into Int") | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func asByteVector (val) = match val { | |
51 | 51 | case valBin: ByteVector => | |
52 | 52 | valBin | |
53 | 53 | case _ => | |
54 | 54 | throw("fail to cast into Int") | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0"))) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) { | |
77 | 77 | case s: String => | |
78 | 78 | value(parseBigInt(s)) | |
79 | 79 | case _: Unit => | |
80 | 80 | defaultVal | |
81 | 81 | case _ => | |
82 | 82 | throw("Match error") | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult)) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18)) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyVotingEmissionContract () = "%s__votingEmissionContract" | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | let IdxFactoryCfgStakingDapp = 1 | |
99 | 99 | ||
100 | 100 | let IdxFactoryCfgBoostingDapp = 2 | |
101 | 101 | ||
102 | 102 | let IdxFactoryCfgIdoDapp = 3 | |
103 | 103 | ||
104 | 104 | let IdxFactoryCfgTeamDapp = 4 | |
105 | 105 | ||
106 | 106 | let IdxFactoryCfgEmissionDapp = 5 | |
107 | 107 | ||
108 | 108 | let IdxFactoryCfgRestDapp = 6 | |
109 | 109 | ||
110 | 110 | let IdxFactoryCfgSlippageDapp = 7 | |
111 | 111 | ||
112 | 112 | func keyFactoryCfg () = "%s__factoryConfig" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr" | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func keyAddonAddr () = "%s__addonAddr" | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func keyFactoryLpList () = "%s__lpTokensList" | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed__total", lpAssetIdStr], SEP) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func readStaked (key) = valueOrElse(getInteger(this, key), 0) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP) | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP) | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP) | |
212 | 212 | ||
213 | 213 | ||
214 | 214 | func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP) | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP) | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP) | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount)) | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | let factoryAddress = getStringOrFail(this, keyFactoryAddress()) | |
239 | 239 | ||
240 | 240 | let factoryContract = addressFromStringValue(factoryAddress) | |
241 | 241 | ||
242 | 242 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
243 | 243 | ||
244 | 244 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
245 | 245 | ||
246 | 246 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
247 | 247 | ||
248 | 248 | let lpStakingPoolsContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], SEP)), wrapErr("lp_staking_pools contract address is undefined"))), wrapErr("invalid lp_staking_pools contract address")) | |
249 | 249 | ||
250 | 250 | func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP) | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP) | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP) | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP) | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP) | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func containsNode (listName,id) = { | |
269 | 269 | let headOrUnit = getString(this, keyListHead(listName)) | |
270 | 270 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
271 | 271 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
272 | 272 | if (if ((id == valueOrElse(headOrUnit, ""))) | |
273 | 273 | then true | |
274 | 274 | else (prevOrUnit != unit)) | |
275 | 275 | then true | |
276 | 276 | else (nextOrUnit != unit) | |
277 | 277 | } | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | func insertNodeActions (listName,id) = { | |
281 | 281 | let headOrUnit = getString(this, keyListHead(listName)) | |
282 | 282 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
283 | 283 | let checkNode = if (!(containsNode(listName, id))) | |
284 | 284 | then true | |
285 | 285 | else throw("Node exists") | |
286 | 286 | if ((checkNode == checkNode)) | |
287 | 287 | then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit)) | |
288 | 288 | then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)] | |
289 | 289 | else nil)) ++ [StringEntry(keyListHead(listName), id)]) | |
290 | 290 | else throw("Strict value is not equal to itself.") | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func deleteNodeActions (listName,id) = { | |
295 | 295 | let headOrUnit = getString(this, keyListHead(listName)) | |
296 | 296 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
297 | 297 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
298 | 298 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
299 | 299 | ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit)) | |
300 | 300 | then (nextOrUnit != unit) | |
301 | 301 | else false) | |
302 | 302 | then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))] | |
303 | 303 | else if ((nextOrUnit != unit)) | |
304 | 304 | then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))] | |
305 | 305 | else if ((prevOrUnit != unit)) | |
306 | 306 | then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))] | |
307 | 307 | else if ((id == valueOrElse(headOrUnit, ""))) | |
308 | 308 | then [DeleteEntry(keyListHead(listName))] | |
309 | 309 | else throw(((("invalid node: " + listName) + ".") + id)))) | |
310 | 310 | } | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt)) | |
314 | 314 | then (stakedByUser > zeroBigInt) | |
315 | 315 | else false) | |
316 | 316 | then zeroBigInt | |
317 | 317 | else if ((stakedByUser == zeroBigInt)) | |
318 | 318 | then wxPerLpIntegralNew | |
319 | 319 | else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt)) | |
320 | 320 | then (stakedByUser > zeroBigInt) | |
321 | 321 | else false) | |
322 | 322 | then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY))) | |
323 | 323 | else throw("calcWxPerLpIntegralUserLast: unexpected state") | |
324 | 324 | ||
325 | 325 | ||
326 | 326 | func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = { | |
327 | 327 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
328 | 328 | let stakedTotal = toBigInt(readStaked(stakedTotalKEY)) | |
329 | 329 | let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt)) | |
330 | 330 | then oneBigInt | |
331 | 331 | else stakedTotal | |
332 | 332 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
333 | 333 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
334 | 334 | let MULT3 = 1000 | |
335 | 335 | let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3) | |
336 | 336 | let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3)) | |
337 | 337 | let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr) | |
338 | 338 | let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr) | |
339 | 339 | let wxPerLpKEY = keyWxPerLp(lpAssetIdStr) | |
340 | 340 | let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock) | |
341 | 341 | let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY) | |
342 | 342 | let wxPerLpOrZeroX3 = 0 | |
343 | 343 | let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0]) | |
344 | 344 | let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0)) | |
345 | 345 | then toBigInt(wxPerLpOrZeroX3) | |
346 | 346 | else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal) | |
347 | 347 | let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount)) | |
348 | 348 | let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt)) | |
349 | 349 | then oneBigInt | |
350 | 350 | else stakedTotalNew | |
351 | 351 | let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh))) | |
352 | 352 | let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew) | |
353 | 353 | let wxPerLpIntegralLastUpdHeightNew = height | |
354 | 354 | let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::") | |
355 | 355 | $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug) | |
356 | 356 | } | |
357 | 357 | ||
358 | 358 | ||
359 | 359 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
360 | - | let $ | |
361 | - | let wxPerLpIntegralNew = $ | |
362 | - | let poolIntegralSTATE = $ | |
363 | - | let poolDEBUG = $ | |
360 | + | let $t01475014872 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
361 | + | let wxPerLpIntegralNew = $t01475014872._1 | |
362 | + | let poolIntegralSTATE = $t01475014872._2 | |
363 | + | let poolDEBUG = $t01475014872._3 | |
364 | 364 | let MULT3 = 1000 | |
365 | 365 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
366 | 366 | let stakedByUser = readStaked(stakedByUserKEY) | |
367 | 367 | let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr) | |
368 | 368 | let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr) | |
369 | 369 | let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr) | |
370 | 370 | let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY) | |
371 | 371 | let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY) | |
372 | 372 | let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY) | |
373 | 373 | let MULT11 = (MULT8 * MULT3) | |
374 | 374 | let wxToClaimUserNew = max([(wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))), zeroBigInt]) | |
375 | 375 | let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew | |
376 | 376 | let wxPerLpIntegralUserLastUpdHeightNew = height | |
377 | 377 | let debug = makeString([toString(wxToClaimUser), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::") | |
378 | 378 | $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug) | |
379 | 379 | } | |
380 | 380 | ||
381 | 381 | ||
382 | 382 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
383 | 383 | case s: String => | |
384 | 384 | fromBase58String(s) | |
385 | 385 | case _: Unit => | |
386 | 386 | unit | |
387 | 387 | case _ => | |
388 | 388 | throw("Match error") | |
389 | 389 | } | |
390 | 390 | ||
391 | 391 | ||
392 | 392 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
393 | 393 | case s: String => | |
394 | 394 | fromBase58String(s) | |
395 | 395 | case _: Unit => | |
396 | 396 | unit | |
397 | 397 | case _ => | |
398 | 398 | throw("Match error") | |
399 | 399 | } | |
400 | 400 | ||
401 | 401 | ||
402 | 402 | let permissionDeniedError = throw("Permission denied") | |
403 | 403 | ||
404 | 404 | func mustThis (i) = if ((i.caller == this)) | |
405 | 405 | then true | |
406 | 406 | else permissionDeniedError | |
407 | 407 | ||
408 | 408 | ||
409 | 409 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
410 | 410 | case pk: ByteVector => | |
411 | 411 | if ((i.callerPublicKey == pk)) | |
412 | 412 | then true | |
413 | 413 | else permissionDeniedError | |
414 | 414 | case _: Unit => | |
415 | 415 | if ((i.caller == this)) | |
416 | 416 | then true | |
417 | 417 | else permissionDeniedError | |
418 | 418 | case _ => | |
419 | 419 | throw("Match error") | |
420 | 420 | } | |
421 | 421 | ||
422 | 422 | ||
423 | 423 | @Callable(i) | |
424 | 424 | func constructor (factoryAddressStr) = { | |
425 | 425 | let checkCaller = mustManager(i) | |
426 | 426 | if ((checkCaller == checkCaller)) | |
427 | 427 | then [StringEntry(keyFactoryAddress(), factoryAddressStr)] | |
428 | 428 | else throw("Strict value is not equal to itself.") | |
429 | 429 | } | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | ||
433 | 433 | @Callable(i) | |
434 | 434 | func constructorV2 (votingEmissionContract) = { | |
435 | 435 | let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit)) | |
436 | 436 | then true | |
437 | 437 | else "invalid voting emission contract address"] | |
438 | 438 | if ((cheks == cheks)) | |
439 | 439 | then [StringEntry(keyVotingEmissionContract(), votingEmissionContract)] | |
440 | 440 | else throw("Strict value is not equal to itself.") | |
441 | 441 | } | |
442 | 442 | ||
443 | 443 | ||
444 | 444 | ||
445 | 445 | @Callable(i) | |
446 | 446 | func setManager (pendingManagerPublicKey) = { | |
447 | 447 | let checkCaller = mustManager(i) | |
448 | 448 | if ((checkCaller == checkCaller)) | |
449 | 449 | then { | |
450 | 450 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
451 | 451 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
452 | 452 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
453 | 453 | else throw("Strict value is not equal to itself.") | |
454 | 454 | } | |
455 | 455 | else throw("Strict value is not equal to itself.") | |
456 | 456 | } | |
457 | 457 | ||
458 | 458 | ||
459 | 459 | ||
460 | 460 | @Callable(i) | |
461 | 461 | func confirmManager () = { | |
462 | 462 | let pm = pendingManagerPublicKeyOrUnit() | |
463 | 463 | let hasPM = if (isDefined(pm)) | |
464 | 464 | then true | |
465 | 465 | else throw("No pending manager") | |
466 | 466 | if ((hasPM == hasPM)) | |
467 | 467 | then { | |
468 | 468 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
469 | 469 | then true | |
470 | 470 | else throw("You are not pending manager") | |
471 | 471 | if ((checkPM == checkPM)) | |
472 | 472 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
473 | 473 | else throw("Strict value is not equal to itself.") | |
474 | 474 | } | |
475 | 475 | else throw("Strict value is not equal to itself.") | |
476 | 476 | } | |
477 | 477 | ||
478 | 478 | ||
479 | 479 | ||
480 | 480 | @Callable(i) | |
481 | 481 | func stake () = if ((size(i.payments) != 1)) | |
482 | 482 | then throw("invalid payment - exact one payment must be attached") | |
483 | 483 | else { | |
484 | 484 | let pmt = i.payments[0] | |
485 | 485 | let lpAssetId = value(pmt.assetId) | |
486 | 486 | let lpAssetIdStr = toBase58String(lpAssetId) | |
487 | 487 | let amount = pmt.amount | |
488 | 488 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
489 | 489 | let callerStr = toString(i.caller) | |
490 | 490 | let userAddressStr = if ((callerStr == poolAddressStr)) | |
491 | 491 | then toString(i.originCaller) | |
492 | 492 | else callerStr | |
493 | 493 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
494 | 494 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
495 | 495 | let stakedByUser = readStaked(stakedByUserKEY) | |
496 | 496 | let stakedTotal = readStaked(stakedTotalKEY) | |
497 | - | let $ | |
498 | - | let wxToClaimUserNew = $ | |
499 | - | let integralSTATE = $ | |
500 | - | let debug = $ | |
497 | + | let $t01930819425 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
498 | + | let wxToClaimUserNew = $t01930819425._1 | |
499 | + | let integralSTATE = $t01930819425._2 | |
500 | + | let debug = $t01930819425._3 | |
501 | 501 | let listName = getUsersListName(lpAssetIdStr) | |
502 | 502 | let listActions = if (containsNode(listName, userAddressStr)) | |
503 | 503 | then nil | |
504 | 504 | else insertNodeActions(listName, userAddressStr) | |
505 | 505 | (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
506 | 506 | } | |
507 | 507 | ||
508 | 508 | ||
509 | 509 | ||
510 | 510 | @Callable(i) | |
511 | 511 | func unstake (lpAssetIdStr,amount) = { | |
512 | 512 | let lpAssetId = fromBase58String(lpAssetIdStr) | |
513 | 513 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
514 | 514 | let poolAddon = valueOrElse(getString(addressFromStringValue(poolAddressStr), keyAddonAddr()), poolAddressStr) | |
515 | 515 | let callerStr = toString(i.caller) | |
516 | - | let test = lpStakingPoolsContract | |
517 | - | if ((test == test)) | |
518 | - | then { | |
519 | - | let userAddressStr = if (if (if ((callerStr == poolAddressStr)) | |
520 | - | then (i.originCaller != lpStakingPoolsContract) | |
521 | - | else false) | |
522 | - | then true | |
523 | - | else (callerStr == poolAddon)) | |
524 | - | then toString(i.originCaller) | |
525 | - | else callerStr | |
526 | - | if ((userAddressStr == userAddressStr)) | |
527 | - | then { | |
528 | - | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
529 | - | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
530 | - | let stakedByUser = readStaked(stakedByUserKEY) | |
531 | - | let stakedTotal = readStaked(stakedTotalKEY) | |
532 | - | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
533 | - | let listName = getUsersListName(lpAssetIdStr) | |
534 | - | let listActions = if (if (containsNode(listName, userAddressStr)) | |
535 | - | then (amount == stakedByUser) | |
536 | - | else false) | |
537 | - | then deleteNodeActions(listName, userAddressStr) | |
538 | - | else nil | |
539 | - | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
540 | - | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
541 | - | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
542 | - | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
543 | - | let r = if ((availableToClaim > zeroBigInt)) | |
544 | - | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
545 | - | else unit | |
546 | - | if ((r == r)) | |
547 | - | then if ((amount > stakedByUser)) | |
548 | - | then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY)) | |
549 | - | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
550 | - | else throw("Strict value is not equal to itself.") | |
551 | - | } | |
552 | - | else throw("Strict value is not equal to itself.") | |
553 | - | } | |
516 | + | let userAddressStr = if (if (if ((callerStr == poolAddressStr)) | |
517 | + | then (i.originCaller != lpStakingPoolsContract) | |
518 | + | else false) | |
519 | + | then true | |
520 | + | else (callerStr == poolAddon)) | |
521 | + | then toString(i.originCaller) | |
522 | + | else callerStr | |
523 | + | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
524 | + | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
525 | + | let stakedByUser = readStaked(stakedByUserKEY) | |
526 | + | let stakedTotal = readStaked(stakedTotalKEY) | |
527 | + | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
528 | + | let listName = getUsersListName(lpAssetIdStr) | |
529 | + | let listActions = if (if (containsNode(listName, userAddressStr)) | |
530 | + | then (amount == stakedByUser) | |
531 | + | else false) | |
532 | + | then deleteNodeActions(listName, userAddressStr) | |
533 | + | else nil | |
534 | + | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
535 | + | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
536 | + | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
537 | + | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
538 | + | let r = if ((availableToClaim > zeroBigInt)) | |
539 | + | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
540 | + | else unit | |
541 | + | if ((r == r)) | |
542 | + | then if ((amount > stakedByUser)) | |
543 | + | then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY)) | |
544 | + | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
554 | 545 | else throw("Strict value is not equal to itself.") | |
555 | 546 | } | |
556 | 547 | ||
557 | 548 | ||
558 | 549 | ||
559 | 550 | @Callable(i) | |
560 | 551 | func claimWx (lpAssetIdStr) = { | |
561 | 552 | let userAddressStr = toString(i.caller) | |
562 | 553 | let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
563 | 554 | $Tuple2(nil, result) | |
564 | 555 | } | |
565 | 556 | ||
566 | 557 | ||
567 | 558 | ||
568 | 559 | @Callable(i) | |
569 | 560 | func claimWxINTERNAL (lpAssetIdStr,userAddressStr) = { | |
570 | 561 | let checkCaller = mustThis(i) | |
571 | 562 | if ((checkCaller == checkCaller)) | |
572 | 563 | then { | |
573 | 564 | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address") | |
574 | 565 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
575 | 566 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
576 | 567 | let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr) | |
577 | 568 | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr) | |
578 | 569 | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr) | |
579 | 570 | let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY) | |
580 | 571 | let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY) | |
581 | 572 | let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY) | |
582 | 573 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
583 | - | let $ | |
584 | - | let wxToClaimUserNew = $ | |
585 | - | let integralSTATE = $ | |
586 | - | let debug = $ | |
574 | + | let $t02331723429 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
575 | + | let wxToClaimUserNew = $t02331723429._1 | |
576 | + | let integralSTATE = $t02331723429._2 | |
577 | + | let debug = $t02331723429._3 | |
587 | 578 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
588 | 579 | if ((zeroBigInt >= availableToClaim)) | |
589 | 580 | then throw("nothing to claim") | |
590 | 581 | else { | |
591 | 582 | let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0]) | |
592 | 583 | let minRewardPart = availableToClaim | |
593 | 584 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
594 | 585 | let totalReward = (minRewardPart + boostRewardPart) | |
595 | 586 | let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0]) | |
596 | 587 | let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil)) | |
597 | 588 | if ((emitBoost == emitBoost)) | |
598 | 589 | then { | |
599 | 590 | let claimedByUserValue = (claimedByUser + availableToClaim) | |
600 | 591 | let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart) | |
601 | 592 | let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart) | |
602 | 593 | let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart) | |
603 | 594 | $Tuple2([StringEntry(claimedByUserKEY, toString(claimedByUserValue)), StringEntry(claimedByUserMinRewardKEY, toString(claimedByUserMinRewardPlusPart)), StringEntry(claimedByUserBoostRewardKEY, toString(claimedByUserBoostRewardPlusBoostRewardPart)), StringEntry(claimedTotalKEY, toString(claimedTotalPlusAvailableToClaim)), ScriptTransfer(userAddress, toInt(minRewardPart), wxAssetId), ScriptTransfer(userAddress, toInt(boostRewardPart), wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, toInt(availableToClaim), i.transactionId)], toInt(totalReward)) | |
604 | 595 | } | |
605 | 596 | else throw("Strict value is not equal to itself.") | |
606 | 597 | } | |
607 | 598 | } | |
608 | 599 | else throw("Strict value is not equal to itself.") | |
609 | 600 | } | |
610 | 601 | ||
611 | 602 | ||
612 | 603 | ||
613 | 604 | @Callable(i) | |
614 | 605 | func claimWxBulkInternalREADONLY (currentIter,lpAssetIds,userAddressStr,resAcc) = if ((currentIter == size(lpAssetIds))) | |
615 | 606 | then $Tuple2(nil, resAcc) | |
616 | 607 | else { | |
617 | 608 | let lpAssetId = lpAssetIds[currentIter] | |
618 | 609 | let info = split({ | |
619 | 610 | let @ = invoke(this, "claimWxREADONLY", [lpAssetId, userAddressStr], nil) | |
620 | 611 | if ($isInstanceOf(@, "String")) | |
621 | 612 | then @ | |
622 | 613 | else throw(($getType(@) + " couldn't be cast to String")) | |
623 | 614 | }, SEP) | |
624 | 615 | let unclaimed = info[3] | |
625 | 616 | let claimed = info[4] | |
626 | 617 | let res = (resAcc :+ makeString(["%d%d", unclaimed, claimed], SEP)) | |
627 | 618 | let inv = { | |
628 | 619 | let @ = invoke(this, "claimWxBulkInternalREADONLY", [(currentIter + 1), lpAssetIds, userAddressStr, res], nil) | |
629 | 620 | if ($isInstanceOf(@, "List[Any]")) | |
630 | 621 | then @ | |
631 | 622 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
632 | 623 | } | |
633 | 624 | if ((inv == inv)) | |
634 | 625 | then $Tuple2(nil, inv) | |
635 | 626 | else throw("Strict value is not equal to itself.") | |
636 | 627 | } | |
637 | 628 | ||
638 | 629 | ||
639 | 630 | ||
640 | 631 | @Callable(i) | |
641 | 632 | func claimWxBulkREADONLY (lpAssetIds,userAddressStr) = { | |
642 | 633 | let res = invoke(this, "claimWxBulkInternalREADONLY", [0, lpAssetIds, userAddressStr, nil], nil) | |
643 | 634 | $Tuple2(nil, res) | |
644 | 635 | } | |
645 | 636 | ||
646 | 637 | ||
647 | 638 | ||
648 | 639 | @Callable(i) | |
649 | 640 | func claimWxREADONLY (lpAssetIdStr,userAddressStr) = { | |
650 | 641 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
651 | 642 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
652 | 643 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
653 | 644 | let stakedByUser = readStaked(stakedByUserKEY) | |
654 | 645 | let stakedTotal = readStaked(stakedTotalKEY) | |
655 | 646 | let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY) | |
656 | 647 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
657 | 648 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
658 | 649 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
659 | 650 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
660 | 651 | let passedBlocks = if ((emissionStartBlock > height)) | |
661 | 652 | then 0 | |
662 | 653 | else (height - emissionStartBlock) | |
663 | 654 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
664 | 655 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
665 | - | let $ | |
666 | - | let wxToClaimUserNew = $ | |
667 | - | let integralSTATE = $ | |
668 | - | let debug = $ | |
656 | + | let $t02698227094 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
657 | + | let wxToClaimUserNew = $t02698227094._1 | |
658 | + | let integralSTATE = $t02698227094._2 | |
659 | + | let debug = $t02698227094._3 | |
669 | 660 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
670 | 661 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
671 | 662 | let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0]) | |
672 | 663 | let boostDebug = asString(boostInvResult[1]) | |
673 | 664 | let minRewardPart = availableToClaim | |
674 | 665 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
675 | 666 | let totalReward = (minRewardPart + boostRewardPart) | |
676 | 667 | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), "soon"], SEP)) | |
677 | 668 | } | |
678 | 669 | ||
679 | 670 | ||
680 | 671 | ||
681 | 672 | @Callable(i) | |
682 | 673 | func stakedByUserREADONLY (lpAssetIdStr,userAddressStr) = { | |
683 | 674 | let stakedByUser = valueOrElse(getInteger(keyStakedByUser(userAddressStr, lpAssetIdStr)), 0) | |
684 | 675 | $Tuple2(nil, stakedByUser) | |
685 | 676 | } | |
686 | 677 | ||
687 | 678 | ||
688 | 679 | ||
689 | 680 | @Callable(i) | |
690 | 681 | func usersListTraversal (lpAssetId) = { | |
691 | 682 | let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), ""))) | |
692 | 683 | then true | |
693 | 684 | else mustManager(i) | |
694 | 685 | if ((checkCaller == checkCaller)) | |
695 | 686 | then { | |
696 | 687 | let listName = getUsersListName(lpAssetId) | |
697 | 688 | let userOrUnit = getString(keyNextUser(lpAssetId)) | |
698 | 689 | let headOrUnit = getString(keyListHead(listName)) | |
699 | 690 | match userOrUnit { | |
700 | 691 | case _: Unit => | |
701 | 692 | match headOrUnit { | |
702 | 693 | case _: Unit => | |
703 | 694 | $Tuple2(nil, false) | |
704 | 695 | case head: String => | |
705 | 696 | $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true) | |
706 | 697 | case _ => | |
707 | 698 | throw("Match error") | |
708 | 699 | } | |
709 | 700 | case userAddress: String => | |
710 | 701 | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetId, userAddress)) | |
711 | 702 | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
712 | 703 | let wxToClaimUserNew = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)._1 | |
713 | 704 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
714 | 705 | let r = if ((availableToClaim > zeroBigInt)) | |
715 | 706 | then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil) | |
716 | 707 | else unit | |
717 | 708 | if ((r == r)) | |
718 | 709 | then { | |
719 | 710 | let nextUserOrUnit = getString(keyListNext(listName, userAddress)) | |
720 | 711 | match nextUserOrUnit { | |
721 | 712 | case _: Unit => | |
722 | 713 | $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false) | |
723 | 714 | case nextUser: String => | |
724 | 715 | $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true) | |
725 | 716 | case _ => | |
726 | 717 | throw("Match error") | |
727 | 718 | } | |
728 | 719 | } | |
729 | 720 | else throw("Strict value is not equal to itself.") | |
730 | 721 | case _ => | |
731 | 722 | throw("Match error") | |
732 | 723 | } | |
733 | 724 | } | |
734 | 725 | else throw("Strict value is not equal to itself.") | |
735 | 726 | } | |
736 | 727 | ||
737 | 728 | ||
738 | 729 | ||
739 | 730 | @Callable(i) | |
740 | 731 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
741 | 732 | then throw("permissions denied") | |
742 | 733 | else { | |
743 | - | let $ | |
744 | - | let wxPerLpIntegralNew = $ | |
745 | - | let poolIntegralSTATE = $ | |
746 | - | let poolDEBUG = $ | |
734 | + | let $t02960229712 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
735 | + | let wxPerLpIntegralNew = $t02960229712._1 | |
736 | + | let poolIntegralSTATE = $t02960229712._2 | |
737 | + | let poolDEBUG = $t02960229712._3 | |
747 | 738 | poolIntegralSTATE | |
748 | 739 | } | |
749 | - | ||
750 | - | ||
751 | - | ||
752 | - | @Callable(i) | |
753 | - | func test () = if (true) | |
754 | - | then throw(valueOrElse(getString(this, "%s__lpStakingPoolsContract"), "nothing")) | |
755 | - | else nil | |
756 | 740 | ||
757 | 741 | ||
758 | 742 | @Verifier(tx) | |
759 | 743 | func verify () = { | |
760 | 744 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
761 | 745 | case pk: ByteVector => | |
762 | 746 | pk | |
763 | 747 | case _: Unit => | |
764 | 748 | tx.senderPublicKey | |
765 | 749 | case _ => | |
766 | 750 | throw("Match error") | |
767 | 751 | } | |
768 | 752 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
769 | 753 | } | |
770 | 754 |
github/deemru/w8io/fabc49c 78.14 ms ◑