tx · 4JUY7BUs9ztdJthkPXiMsMDdWGhBfiDsCWKbcSHjNbVa 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE: -0.02900000 Waves 2022.09.29 15:14 [2250383] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves
{ "type": 13, "id": "4JUY7BUs9ztdJthkPXiMsMDdWGhBfiDsCWKbcSHjNbVa", "fee": 2900000, "feeAssetId": null, "timestamp": 1664453769122, "version": 1, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "21p5NfpwMv2siKZyQh7EmsCt9maydxrYNs6rSWJ1678GSqH2x26dz2mbCk61S4T94z2GYcjNvEXxacJNbn3YtFUJ" ], "script": "base64:BgJtCAISBAoCCAESABIDCgEBEgASABIAEgMKAQgSAwoBCBIDCgEIEgUKAwEBARIFCgMBAQESABIDCgEIEgcKBQgICAgIEgoKCAgICAgICAgIEgoKCAgICAgICAgIEgoKCAgICAgICAgIEgMKAQgSAE8AA1NFUAICX18ABVNDQUxFAOgHAAVNVUxUOACAwtcvAAp6ZXJvQmlnSW50CQC2AgEAAAAUcHJvY2Vzc2luZ1N0YWdlVG90YWwAAAAVcHJvY2Vzc2luZ1N0YWdlU2hhcmVzAAEBDmdldE51bWJlckJ5S2V5AQNrZXkJAQt2YWx1ZU9yRWxzZQIJAJoIAgUEdGhpcwUDa2V5AAABD2dldE51bWJlck9yRmFpbAEDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUEdGhpcwUDa2V5CQCsAgIJAKwCAgIPbWFuZGF0b3J5IHRoaXMuBQNrZXkCDyBpcyBub3QgZGVmaW5lZAEOZ2V0U3RyaW5nQnlLZXkBA2tleQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzBQNrZXkCAAEPZ2V0U3RyaW5nT3JGYWlsAQNrZXkJARN2YW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NYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5dc8QTw==", "chainId": 84, "height": 2250383, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D7JRtBeN5Acyxr3BQ1AHamq57fMFb7m4UGkHRrgSXboB Next: ebqeJFZUEpJvxwjUu8Sv8GopsrLatfHcE5CNqjBoBco Diff:
Old | New | Differences | |
---|---|---|---|
620 | 620 | ||
621 | 621 | ||
622 | 622 | @Callable(i) | |
623 | - | func | |
623 | + | func calcSwapXToYOld (amountAssetAmountBigIntStr,amountAssetBalanceBigIntStr,priceAssetBalanceBigIntStr,dBigIntStr,amplificatorBigIntStr,amplificatorPrecisionBigIntStr,targetXPrecisionBigIntStr,targetDPrecisionBigIntStr) = { | |
624 | 624 | let nCoins = toBigInt(2) | |
625 | 625 | let aPrecision = parseBigIntValue(amplificatorPrecisionBigIntStr) | |
626 | 626 | let targetPrecision = parseBigIntValue(targetXPrecisionBigIntStr) | |
636 | 636 | }) | |
637 | 637 | else parseBigIntValue(dBigIntStr) | |
638 | 638 | let amp = (parseBigIntValue(amplificatorBigIntStr) * aPrecision) | |
639 | - | let S = parseBigIntValue(amountAssetAmountBigIntStr) | |
640 | 639 | let ann = (amp * nCoins) | |
641 | 640 | let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] | |
642 | 641 | func calc (acc,cur) = { | |
643 | - | let $ | |
644 | - | let y = $ | |
645 | - | let yPrev = $ | |
642 | + | let $t02493024950 = acc | |
643 | + | let y = $t02493024950._1 | |
644 | + | let yPrev = $t02493024950._2 | |
646 | 645 | let newX = (X + x) | |
647 | 646 | let newY = (Y - y) | |
648 | 647 | let dp = (((d * d) * d) / (((newX * newY) * nCoins) * nCoins)) | |
650 | 649 | $Tuple2(yNext, y) | |
651 | 650 | } | |
652 | 651 | ||
653 | - | let $ | |
652 | + | let $t02519225243 = { | |
654 | 653 | let $l = arr | |
655 | 654 | let $s = size($l) | |
656 | - | let $acc0 = $Tuple2( | |
655 | + | let $acc0 = $Tuple2(d, unit) | |
657 | 656 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
658 | 657 | then $a | |
659 | 658 | else calc($a, $l[$i]) | |
664 | 663 | ||
665 | 664 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17) | |
666 | 665 | } | |
667 | - | let yNext = $ | |
668 | - | let yPrev = $ | |
669 | - | let | |
670 | - | if ((targetPrecision >= | |
666 | + | let yNext = $t02519225243._1 | |
667 | + | let yPrev = $t02519225243._2 | |
668 | + | let yDiff = absBigInt((yNext - value(yPrev))) | |
669 | + | if ((targetPrecision >= yDiff)) | |
671 | 670 | then $Tuple2(nil, toInt(yNext)) | |
672 | - | else throw(((((("Y calculation error, yDiff = " + toString(xDiff)) + ", yNext = ") + toString(yNext)) + ", yPrev = ") + toString(value(yPrev)))) | |
671 | + | else throw(((((("Y calculation error, yDiff = " + toString(yDiff)) + ", yNext = ") + toString(yNext)) + ", yPrev = ") + toString(value(yPrev)))) | |
672 | + | } | |
673 | + | ||
674 | + | ||
675 | + | ||
676 | + | @Callable(i) | |
677 | + | func calcSwapXToY (amountAssetAmountBigIntStr,amountAssetBalanceBigIntStr,priceAssetBalanceBigIntStr,dBigIntStr,amplificatorBigIntStr,amplificatorPrecisionBigIntStr,targetXPrecisionBigIntStr,targetDPrecisionBigIntStr) = { | |
678 | + | let nCoins = toBigInt(2) | |
679 | + | let aPrecision = parseBigIntValue(amplificatorPrecisionBigIntStr) | |
680 | + | let targetPrecision = parseBigIntValue(targetXPrecisionBigIntStr) | |
681 | + | let oldX = parseBigIntValue(amountAssetBalanceBigIntStr) | |
682 | + | let Y = parseBigIntValue(priceAssetBalanceBigIntStr) | |
683 | + | let x = parseBigIntValue(amountAssetAmountBigIntStr) | |
684 | + | let X = (oldX + x) | |
685 | + | let D = if ((dBigIntStr == "")) | |
686 | + | then parseBigIntValue({ | |
687 | + | let @ = invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil) | |
688 | + | if ($isInstanceOf(@, "String")) | |
689 | + | then @ | |
690 | + | else throw(($getType(invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil)) + " couldn't be cast to String")) | |
691 | + | }) | |
692 | + | else parseBigIntValue(dBigIntStr) | |
693 | + | let amp = (parseBigIntValue(amplificatorBigIntStr) * aPrecision) | |
694 | + | let S = (X + Y) | |
695 | + | let ann = (amp * nCoins) | |
696 | + | let c = fraction((((D * D) * D) * D), aPrecision, (((((X * Y) * nCoins) * nCoins) * nCoins) * ann)) | |
697 | + | let b = (S + ((D * aPrecision) / ann)) | |
698 | + | let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
699 | + | func calc (acc,cur) = { | |
700 | + | let $t02684926869 = acc | |
701 | + | let y = $t02684926869._1 | |
702 | + | let yPrev = $t02684926869._2 | |
703 | + | let yNext = (((y * y) + c) / (((toBigInt(2) * y) + b) - D)) | |
704 | + | $Tuple2(yNext, y) | |
705 | + | } | |
706 | + | ||
707 | + | let $t02694826999 = { | |
708 | + | let $l = arr | |
709 | + | let $s = size($l) | |
710 | + | let $acc0 = $Tuple2(D, unit) | |
711 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
712 | + | then $a | |
713 | + | else calc($a, $l[$i]) | |
714 | + | ||
715 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
716 | + | then $a | |
717 | + | else throw("List size exceeds 15") | |
718 | + | ||
719 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
720 | + | } | |
721 | + | let yNext = $t02694826999._1 | |
722 | + | let yPrev = $t02694826999._2 | |
723 | + | let yDiff = absBigInt((yNext - value(yPrev))) | |
724 | + | if ((targetPrecision >= yDiff)) | |
725 | + | then $Tuple2(nil, toInt((Y - yNext))) | |
726 | + | else throw(((((("Y calculation error, yDiff = " + toString(yDiff)) + ", yNext = ") + toString(yNext)) + ", yPrev = ") + toString(value(yPrev)))) | |
673 | 727 | } | |
674 | 728 | ||
675 | 729 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let SCALE = 1000 | |
7 | 7 | ||
8 | 8 | let MULT8 = 100000000 | |
9 | 9 | ||
10 | 10 | let zeroBigInt = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let processingStageTotal = 0 | |
13 | 13 | ||
14 | 14 | let processingStageShares = 1 | |
15 | 15 | ||
16 | 16 | func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func getNumberOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("mandatory this." + key) + " is not defined")) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getStringByKey (key) = valueOrElse(getString(this, key), "") | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (("mandatory this." + key) + " is not defined")) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func abs (val) = if ((0 > val)) | |
29 | 29 | then -(val) | |
30 | 30 | else val | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func absBigInt (val) = if ((zeroBigInt > val)) | |
34 | 34 | then -(val) | |
35 | 35 | else val | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | let keyMaxDepth = "%s__maxDepth" | |
39 | 39 | ||
40 | 40 | let maxDepthDefault = 30 | |
41 | 41 | ||
42 | 42 | let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault) | |
43 | 43 | ||
44 | 44 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | let factoryAddressStr = getStringOrFail(keyFactoryAddress()) | |
48 | 48 | ||
49 | 49 | let factoryContract = addressFromStringValue(factoryAddressStr) | |
50 | 50 | ||
51 | 51 | func keyEmissionAddress () = "%s%s__config__emissionAddress" | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyNumToUserMapping (num) = makeString(["%s%s%s", "mapping", "num2user", toString(num)], SEP) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP) | |
58 | 58 | ||
59 | 59 | let referralProgramNameDefault = "wxlock" | |
60 | 60 | ||
61 | 61 | let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault) | |
62 | 62 | ||
63 | 63 | let keyReferralMinGWxAmount = makeString(["%s%s", "referral", "minGWxAmount"], SEP) | |
64 | 64 | ||
65 | 65 | let referralMinGWxAmountDefault = (500 * MULT8) | |
66 | 66 | ||
67 | 67 | let referralMinGWxAmount = valueOrElse(getInteger(this, keyReferralMinGWxAmount), referralMinGWxAmountDefault) | |
68 | 68 | ||
69 | 69 | let keyReferrerRewardPermille = makeString(["%s%s", "referral", "referrerRewardPermille"], SEP) | |
70 | 70 | ||
71 | 71 | let referrerRewardPermilleDefault = 50 | |
72 | 72 | ||
73 | 73 | let referrerRewardPermille = valueOrElse(getInteger(this, keyReferrerRewardPermille), referrerRewardPermilleDefault) | |
74 | 74 | ||
75 | 75 | let keyReferralRewardPermille = makeString(["%s%s", "referral", "referralRewardPermille"], SEP) | |
76 | 76 | ||
77 | 77 | let referralRewardPermilleDefault = 50 | |
78 | 78 | ||
79 | 79 | let referralRewardPermille = valueOrElse(getInteger(this, keyReferralRewardPermille), referralRewardPermilleDefault) | |
80 | 80 | ||
81 | 81 | func keyReferrer (referralAddress) = makeString(["%s%s%s", "referrer", referralProgramName, referralAddress], SEP) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyUnclaimedReferral (programName,claimerAddress) = makeString(["%s%s%s%s", "unclaimedReferral", programName, claimerAddress], SEP) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | let emissionAddressStr = getStringOrFail(keyEmissionAddress()) | |
88 | 88 | ||
89 | 89 | let emissionContract = addressFromStringValue(emissionAddressStr) | |
90 | 90 | ||
91 | 91 | let IdxCfgAssetId = 1 | |
92 | 92 | ||
93 | 93 | let IdxCfgPacemakerAddress = 2 | |
94 | 94 | ||
95 | 95 | let IdxCfgBoostingContract = 3 | |
96 | 96 | ||
97 | 97 | let IdxCfgMaxDepth = 4 | |
98 | 98 | ||
99 | 99 | func keyConfig () = "%s__config" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func readConfigArrayOrFail () = split(getStringOrFail(keyConfig()), SEP) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func formatConfig (wxAssetIdStr,matcherPacemakerAddressStr,boostingContractAddressStr,maxDepth) = makeString(["%s%s%s%d", wxAssetIdStr, matcherPacemakerAddressStr, boostingContractAddressStr, toString(maxDepth)], SEP) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func boostingContractOrFail () = { | |
109 | 109 | let cfgArray = readConfigArrayOrFail() | |
110 | 110 | valueOrErrorMessage(addressFromString(cfgArray[IdxCfgBoostingContract]), "boosting contract address is not defined") | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyUsersCount () = "%s__nextUserNum" | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyPoolWeightVirtual () = "%s%s__poolWeight__GWXvirtualPOOL" | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyNextProcessedUser () = "%s__nextProcessedUser" | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyLatestPeriod () = "%s__latestPeriod" | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyNextPeriod () = "%s__nextPeriod" | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyProcessingStage () = "%s__processingStage" | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyNextProcessedPeriod () = "%s__nextProcessedPeriod" | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyUserUnclaimed (userIndex) = makeString(["%s%d", "userUnclaimed", toString(userIndex)], SEP) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyNextUnlaimedPeriodOfUser (userIndex) = makeString(["%s%d__nextClaimedPeriod", toString(userIndex)], SEP) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyLastProcessedPeriodOfUser (userIndex) = makeString(["%s%d__lastProcessedPeriod", toString(userIndex)], SEP) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyHeightForPeriod (period) = makeString(["%s%d__startHeightForPeriod", toString(period)], SEP) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyAuxEmissionRewardForPeriod (period) = makeString(["%s%d__auxEmissionReward", toString(period)], SEP) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func keyTotalAmountForPeriod (period) = makeString(["%s%d__totalAmountForPeriod", toString(period)], SEP) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func keyLastPayoutInfo () = "%s__lastPayoutInfo" | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func PeriodPayoutInfo (period,matcherReward,emissionReward) = makeString(["%d%d%d", toString(period), toString(matcherReward), toString(emissionReward)], SEP) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func keyPayoutHistoryInfo (period) = makeString(["%s%s%d__payouts__history", toString(period)], SEP) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func keyTotalWeightForPeriod (period) = makeString(["%s%d__totalWeightForPeriod", toString(period)], SEP) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func keyUserKValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "k", toString(period)], SEP) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func keyUserBValueForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "b", toString(period)], SEP) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func keyUserWeightForPeriod (period,userIndex) = makeString(["%s%d%s%d__paramByPeriod", toString(userIndex), "weight", toString(period)], SEP) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | let referralsContractAddressOrFail = addressFromStringValue(getStringOrFail(keyReferralsContractAddress())) | |
184 | 184 | ||
185 | 185 | func HistoryEntry (type,user,amount,i) = { | |
186 | 186 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
187 | 187 | let historyDATA = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
188 | 188 | StringEntry(historyKEY, historyDATA) | |
189 | 189 | } | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
199 | 199 | case s: String => | |
200 | 200 | fromBase58String(s) | |
201 | 201 | case _: Unit => | |
202 | 202 | unit | |
203 | 203 | case _ => | |
204 | 204 | throw("Match error") | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
209 | 209 | case s: String => | |
210 | 210 | fromBase58String(s) | |
211 | 211 | case _: Unit => | |
212 | 212 | unit | |
213 | 213 | case _ => | |
214 | 214 | throw("Match error") | |
215 | 215 | } | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func mustManager (i) = { | |
219 | 219 | let pd = throw("Permission denied") | |
220 | 220 | match managerPublicKeyOrUnit() { | |
221 | 221 | case pk: ByteVector => | |
222 | 222 | if ((i.callerPublicKey == pk)) | |
223 | 223 | then true | |
224 | 224 | else pd | |
225 | 225 | case _: Unit => | |
226 | 226 | if ((i.caller == this)) | |
227 | 227 | then true | |
228 | 228 | else pd | |
229 | 229 | case _ => | |
230 | 230 | throw("Match error") | |
231 | 231 | } | |
232 | 232 | } | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func calcUserWeight (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
236 | 236 | let kLast = keyLastProcessedPeriodOfUser(userIndex) | |
237 | 237 | let kKey = keyUserKValueForPeriod(period, userIndex) | |
238 | 238 | let kRaw = getInteger(boostingContractAddress, kKey) | |
239 | 239 | let kUserWeight = keyUserWeightForPeriod(period, userIndex) | |
240 | 240 | if (isDefined(kRaw)) | |
241 | 241 | then { | |
242 | 242 | let k = value(kRaw) | |
243 | 243 | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(period, userIndex))) | |
244 | 244 | let w = ((k * heightForPeriod) + b) | |
245 | 245 | if ((w > 0)) | |
246 | 246 | then $Tuple2((w / SCALE), [IntegerEntry(kLast, period), IntegerEntry(kUserWeight, w)]) | |
247 | 247 | else $Tuple2(0, nil) | |
248 | 248 | } | |
249 | 249 | else { | |
250 | 250 | let p = getInteger(this, kLast) | |
251 | 251 | if (if (isDefined(p)) | |
252 | 252 | then (period >= value(p)) | |
253 | 253 | else false) | |
254 | 254 | then { | |
255 | 255 | let pv = value(p) | |
256 | 256 | let k = value(getInteger(boostingContractAddress, keyUserKValueForPeriod(pv, userIndex))) | |
257 | 257 | let b = value(getInteger(boostingContractAddress, keyUserBValueForPeriod(pv, userIndex))) | |
258 | 258 | let w = ((k * heightForPeriod) + b) | |
259 | 259 | if ((w > 0)) | |
260 | 260 | then $Tuple2((w / SCALE), [IntegerEntry(kUserWeight, w)]) | |
261 | 261 | else $Tuple2(0, nil) | |
262 | 262 | } | |
263 | 263 | else $Tuple2(0, nil) | |
264 | 264 | } | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func calcUserWeightForClaim (boostingContractAddress,heightForPeriod,period,userIndex) = { | |
269 | 269 | let kUserWeight = keyUserWeightForPeriod(period, userIndex) | |
270 | 270 | let userWeightOrUnit = getInteger(kUserWeight) | |
271 | 271 | match userWeightOrUnit { | |
272 | 272 | case _: Unit => | |
273 | 273 | 0 | |
274 | 274 | case w: Int => | |
275 | 275 | (w / SCALE) | |
276 | 276 | case _ => | |
277 | 277 | throw("Match error") | |
278 | 278 | } | |
279 | 279 | } | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | func getUserIndexByAddress (boostingContractAddressStr,userAddress) = { | |
283 | 283 | let key = makeString(["%s%s%s", "mapping", "user2num", userAddress], SEP) | |
284 | 284 | parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(boostingContractAddressStr)), key), ((("User address " + userAddress) + " is not found in boosting contract data, key=") + key))) | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | func nextPeriod () = getNumberByKey(keyNextPeriod()) | |
289 | 289 | ||
290 | 290 | ||
291 | 291 | func commonClaimReward (userAddress) = { | |
292 | 292 | let cfgArray = readConfigArrayOrFail() | |
293 | 293 | let userIdx = getUserIndexByAddress(cfgArray[IdxCfgBoostingContract], userAddress) | |
294 | 294 | let userUnclaimedOption = getInteger(keyUserUnclaimed(userIdx)) | |
295 | 295 | match userUnclaimedOption { | |
296 | 296 | case _: Unit => | |
297 | 297 | $Tuple2(0, nil) | |
298 | 298 | case u: Int => | |
299 | 299 | $Tuple2(u, [IntegerEntry(keyUserUnclaimed(userIdx), 0)]) | |
300 | 300 | case _ => | |
301 | 301 | throw("Match error") | |
302 | 302 | } | |
303 | 303 | } | |
304 | 304 | ||
305 | 305 | ||
306 | 306 | @Callable(i) | |
307 | 307 | func updateReferralActivity (userAddress,gWxAmountStart) = { | |
308 | 308 | let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress)) | |
309 | 309 | let activeReferralInv = if ((referrer == unit)) | |
310 | 310 | then unit | |
311 | 311 | else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (gWxAmountStart >= referralMinGWxAmount)], nil) | |
312 | 312 | if ((activeReferralInv == activeReferralInv)) | |
313 | 313 | then $Tuple2(nil, unit) | |
314 | 314 | else throw("Strict value is not equal to itself.") | |
315 | 315 | } | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | ||
319 | 319 | @Callable(i) | |
320 | 320 | func finalizeHelper () = { | |
321 | 321 | let processingStage = valueOrElse(getInteger(keyProcessingStage()), processingStageTotal) | |
322 | 322 | let currentPeriod = getNumberByKey(keyNextProcessedPeriod()) | |
323 | 323 | let currentUser = getNumberByKey(keyNextProcessedUser()) | |
324 | 324 | let latestPeriod = getNumberByKey(keyLatestPeriod()) | |
325 | 325 | let usersCount = valueOrElse(getInteger(boostingContractOrFail(), keyUsersCount()), 0) | |
326 | 326 | let totalWeightKey = keyTotalWeightForPeriod(currentPeriod) | |
327 | 327 | let totalWeight = getNumberByKey(keyTotalWeightForPeriod(currentPeriod)) | |
328 | 328 | let heightForPeriod = getNumberByKey(keyHeightForPeriod(currentPeriod)) | |
329 | 329 | if ((currentPeriod > latestPeriod)) | |
330 | 330 | then $Tuple2(nil, false) | |
331 | 331 | else if ((processingStage == processingStageTotal)) | |
332 | 332 | then { | |
333 | 333 | let $t01208412200 = calcUserWeight(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser) | |
334 | 334 | let userWeight = $t01208412200._1 | |
335 | 335 | let userActions = $t01208412200._2 | |
336 | 336 | let totalWeightNew = (totalWeight + userWeight) | |
337 | 337 | let processingActions = if (((usersCount - 1) > currentUser)) | |
338 | 338 | then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))] | |
339 | 339 | else [IntegerEntry(keyProcessingStage(), processingStageShares), IntegerEntry(keyNextProcessedUser(), 0)] | |
340 | 340 | $Tuple2((([IntegerEntry(totalWeightKey, totalWeightNew)] ++ processingActions) ++ userActions), true) | |
341 | 341 | } | |
342 | 342 | else if ((processingStage == processingStageShares)) | |
343 | 343 | then { | |
344 | 344 | let userWeight = calcUserWeightForClaim(boostingContractOrFail(), heightForPeriod, currentPeriod, currentUser) | |
345 | 345 | let userAmountMatcherForPeriod = fraction(getNumberByKey(keyTotalAmountForPeriod(currentPeriod)), userWeight, totalWeight) | |
346 | 346 | let userAmountEmissionForPeriod = fraction(getNumberByKey(keyAuxEmissionRewardForPeriod(currentPeriod)), userWeight, totalWeight) | |
347 | 347 | let userTotalAmount = (userAmountEmissionForPeriod + userAmountMatcherForPeriod) | |
348 | 348 | let userUnclaimedOption = getInteger(keyUserUnclaimed(currentUser)) | |
349 | 349 | let userAddress = getStringValue(boostingContractOrFail(), keyNumToUserMapping(currentUser)) | |
350 | 350 | let referrer = getString(referralsContractAddressOrFail, keyReferrer(userAddress)) | |
351 | 351 | let activeReferralInv = if ((referrer == unit)) | |
352 | 352 | then unit | |
353 | 353 | else invoke(referralsContractAddressOrFail, "updateReferralActivity", [referralProgramName, userAddress, (userWeight >= referralMinGWxAmount)], nil) | |
354 | 354 | if ((activeReferralInv == activeReferralInv)) | |
355 | 355 | then { | |
356 | 356 | let referralInv = if (if ((referrer == unit)) | |
357 | 357 | then true | |
358 | 358 | else (referralMinGWxAmount > userWeight)) | |
359 | 359 | then unit | |
360 | 360 | else { | |
361 | 361 | let referrerReward = fraction(userTotalAmount, referrerRewardPermille, SCALE) | |
362 | 362 | let referralReward = fraction(userTotalAmount, referralRewardPermille, SCALE) | |
363 | 363 | invoke(referralsContractAddressOrFail, "incUnclaimed", [referralProgramName, userAddress, referrerReward, referralReward], nil) | |
364 | 364 | } | |
365 | 365 | if ((referralInv == referralInv)) | |
366 | 366 | then { | |
367 | 367 | let unclaimedActions = [IntegerEntry(keyUserUnclaimed(currentUser), (valueOrElse(userUnclaimedOption, 0) + userTotalAmount))] | |
368 | 368 | let processingActions = if (((usersCount - 1) > currentUser)) | |
369 | 369 | then [IntegerEntry(keyNextProcessedUser(), (currentUser + 1))] | |
370 | 370 | else [IntegerEntry(keyNextProcessedPeriod(), (currentPeriod + 1)), IntegerEntry(keyNextProcessedUser(), 0), DeleteEntry(keyProcessingStage())] | |
371 | 371 | $Tuple2((unclaimedActions ++ processingActions), true) | |
372 | 372 | } | |
373 | 373 | else throw("Strict value is not equal to itself.") | |
374 | 374 | } | |
375 | 375 | else throw("Strict value is not equal to itself.") | |
376 | 376 | } | |
377 | 377 | else throw("invalid processing stage") | |
378 | 378 | } | |
379 | 379 | ||
380 | 380 | ||
381 | 381 | ||
382 | 382 | @Callable(i) | |
383 | 383 | func finalizeWrapper (counter) = { | |
384 | 384 | let result = { | |
385 | 385 | let @ = invoke(this, "finalizeHelper", nil, nil) | |
386 | 386 | if ($isInstanceOf(@, "Boolean")) | |
387 | 387 | then @ | |
388 | 388 | else throw(($getType(invoke(this, "finalizeHelper", nil, nil)) + " couldn't be cast to Boolean")) | |
389 | 389 | } | |
390 | 390 | if ((result == result)) | |
391 | 391 | then if (!(result)) | |
392 | 392 | then if ((counter == maxDepth)) | |
393 | 393 | then throw("Nothing to process") | |
394 | 394 | else $Tuple2(nil, unit) | |
395 | 395 | else if ((counter > 0)) | |
396 | 396 | then $Tuple2(nil, invoke(this, "finalizeWrapper", [(counter - 1)], nil)) | |
397 | 397 | else $Tuple2(nil, unit) | |
398 | 398 | else throw("Strict value is not equal to itself.") | |
399 | 399 | } | |
400 | 400 | ||
401 | 401 | ||
402 | 402 | ||
403 | 403 | @Callable(i) | |
404 | 404 | func processPendingPeriodsAndUsers () = $Tuple2(nil, invoke(this, "finalizeWrapper", [maxDepth], nil)) | |
405 | 405 | ||
406 | 406 | ||
407 | 407 | ||
408 | 408 | @Callable(i) | |
409 | 409 | func deposit () = { | |
410 | 410 | let cfgArray = readConfigArrayOrFail() | |
411 | 411 | if ((i.caller != Address(fromBase58String(cfgArray[IdxCfgPacemakerAddress])))) | |
412 | 412 | then throw("Wrong caller address") | |
413 | 413 | else { | |
414 | 414 | let assetId = value(value(i.payments[0]).assetId) | |
415 | 415 | if ((assetId != fromBase58String(cfgArray[IdxCfgAssetId]))) | |
416 | 416 | then throw("Wrong payment asset") | |
417 | 417 | else { | |
418 | 418 | let period = nextPeriod() | |
419 | 419 | let deltaH = (height - getNumberOrFail(keyGwxRewardEmissionStartHeight())) | |
420 | 420 | let emissionRate = valueOrErrorMessage(getInteger(emissionContract, keyRatePerBlockCurrent()), (("mandatory emission_contract." + keyRatePerBlockCurrent()) + " is not defined")) | |
421 | 421 | let weight = valueOrErrorMessage(getInteger(factoryContract, keyPoolWeightVirtual()), (("mandatory factory_contract." + keyPoolWeightVirtual()) + " is not defined")) | |
422 | 422 | let auxAmount = fraction((deltaH * weight), emissionRate, MULT8) | |
423 | 423 | let em = invoke(emissionContract, "emit", [auxAmount], nil) | |
424 | 424 | if ((em == em)) | |
425 | 425 | then { | |
426 | 426 | let matcherPart = value(i.payments[0]).amount | |
427 | 427 | let payoutInfo = PeriodPayoutInfo(period, matcherPart, auxAmount) | |
428 | 428 | [IntegerEntry(keyLatestPeriod(), period), IntegerEntry(keyHeightForPeriod(period), height), IntegerEntry(keyAuxEmissionRewardForPeriod(period), auxAmount), IntegerEntry(keyGwxRewardEmissionStartHeight(), height), IntegerEntry(keyTotalAmountForPeriod(period), matcherPart), IntegerEntry(keyNextPeriod(), (period + 1)), StringEntry(keyLastPayoutInfo(), payoutInfo), StringEntry(keyPayoutHistoryInfo(period), payoutInfo)] | |
429 | 429 | } | |
430 | 430 | else throw("Strict value is not equal to itself.") | |
431 | 431 | } | |
432 | 432 | } | |
433 | 433 | } | |
434 | 434 | ||
435 | 435 | ||
436 | 436 | ||
437 | 437 | @Callable(i) | |
438 | 438 | func claimReward () = { | |
439 | 439 | let cfgArray = readConfigArrayOrFail() | |
440 | 440 | let address = toString(i.caller) | |
441 | 441 | let $t01754217592 = commonClaimReward(address) | |
442 | 442 | let amount = $t01754217592._1 | |
443 | 443 | let actions = $t01754217592._2 | |
444 | 444 | let checkAmount = if ((amount > 0)) | |
445 | 445 | then true | |
446 | 446 | else throw("Nothing to claim") | |
447 | 447 | if ((checkAmount == checkAmount)) | |
448 | 448 | then { | |
449 | 449 | let amountFromEmission = 0 | |
450 | 450 | let claimedReferral = { | |
451 | 451 | let @ = invoke(referralsContractAddressOrFail, "claim", [referralProgramName], nil) | |
452 | 452 | if ($isInstanceOf(@, "Int")) | |
453 | 453 | then @ | |
454 | 454 | else throw(($getType(invoke(referralsContractAddressOrFail, "claim", [referralProgramName], nil)) + " couldn't be cast to Int")) | |
455 | 455 | } | |
456 | 456 | let totalAmount = (amount + claimedReferral) | |
457 | 457 | $Tuple2(([ScriptTransfer(i.caller, totalAmount, fromBase58String(cfgArray[IdxCfgAssetId])), HistoryEntry("claim", address, amount, i)] ++ actions), [totalAmount, amountFromEmission]) | |
458 | 458 | } | |
459 | 459 | else throw("Strict value is not equal to itself.") | |
460 | 460 | } | |
461 | 461 | ||
462 | 462 | ||
463 | 463 | ||
464 | 464 | @Callable(i) | |
465 | 465 | func claimRewardREADONLY (address) = { | |
466 | 466 | let $t01816518215 = commonClaimReward(address) | |
467 | 467 | let amount = $t01816518215._1 | |
468 | 468 | let actions = $t01816518215._2 | |
469 | 469 | let referralUnclaimed = valueOrElse(getInteger(referralsContractAddressOrFail, keyUnclaimedReferral(referralProgramName, address)), 0) | |
470 | 470 | let totalAmount = (amount + referralUnclaimed) | |
471 | 471 | $Tuple2(nil, totalAmount) | |
472 | 472 | } | |
473 | 473 | ||
474 | 474 | ||
475 | 475 | ||
476 | 476 | @Callable(i) | |
477 | 477 | func latestFinalizedPeriodREADONLY (address) = $Tuple2(nil, valueOrElse(getInteger(this, keyLatestPeriod()), -1)) | |
478 | 478 | ||
479 | 479 | ||
480 | 480 | ||
481 | 481 | @Callable(i) | |
482 | 482 | func latestFinalizedPeriodInfoREADONLY (address) = $Tuple2(nil, getStringByKey(keyLastPayoutInfo())) | |
483 | 483 | ||
484 | 484 | ||
485 | 485 | ||
486 | 486 | @Callable(i) | |
487 | 487 | func calcGwxParamsREADONLY (gwxAmountStart,lockStartHeight,lockDurationBlocks) = { | |
488 | 488 | let lockEndHeight = (lockStartHeight + lockDurationBlocks) | |
489 | 489 | let scale8ParamK = -(fraction(gwxAmountStart, SCALE, lockDurationBlocks)) | |
490 | 490 | let scale8ParamB = (fraction(gwxAmountStart, SCALE, lockDurationBlocks) * lockEndHeight) | |
491 | 491 | $Tuple2(nil, [scale8ParamK, scale8ParamB, nextPeriod()]) | |
492 | 492 | } | |
493 | 493 | ||
494 | 494 | ||
495 | 495 | ||
496 | 496 | @Callable(i) | |
497 | 497 | func calcGwxAmountStartREADONLY (wxLockAmount,lockDuration,maxLockDuration) = { | |
498 | 498 | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
499 | 499 | let gWxAmountStart = fraction(wxLockAmount, coeffX8, MULT8) | |
500 | 500 | $Tuple2(nil, [gWxAmountStart]) | |
501 | 501 | } | |
502 | 502 | ||
503 | 503 | ||
504 | 504 | ||
505 | 505 | @Callable(i) | |
506 | 506 | func onEmissionForGwxStart () = if ((i.caller != factoryContract)) | |
507 | 507 | then throw("permissions denied") | |
508 | 508 | else [IntegerEntry(keyGwxRewardEmissionStartHeight(), height)] | |
509 | 509 | ||
510 | 510 | ||
511 | 511 | ||
512 | 512 | @Callable(i) | |
513 | 513 | func latestPeriodEmissionRewardsREADONLY (address) = { | |
514 | 514 | let period = nextPeriod() | |
515 | 515 | $Tuple2(nil, [getNumberByKey(keyAuxEmissionRewardForPeriod(period))]) | |
516 | 516 | } | |
517 | 517 | ||
518 | 518 | ||
519 | 519 | ||
520 | 520 | @Callable(i) | |
521 | 521 | func calcD (x1BigIntStr,x2BigIntStr,ampBigIntStr,aPrecisionBigIntStr,targetPrecisionBigIntStr) = { | |
522 | 522 | let nCoins = toBigInt(2) | |
523 | 523 | let aPrecision = parseBigIntValue(aPrecisionBigIntStr) | |
524 | 524 | let targetPrecision = parseBigIntValue(targetPrecisionBigIntStr) | |
525 | 525 | let x1 = parseBigIntValue(x1BigIntStr) | |
526 | 526 | let x2 = parseBigIntValue(x2BigIntStr) | |
527 | 527 | let amp = (parseBigIntValue(ampBigIntStr) * aPrecision) | |
528 | 528 | let s = (x1 + x2) | |
529 | 529 | if ((s == zeroBigInt)) | |
530 | 530 | then $Tuple2(nil, toString(zeroBigInt)) | |
531 | 531 | else { | |
532 | 532 | let ann = (amp * nCoins) | |
533 | 533 | let arr = [1, 2, 3, 4, 5, 6, 7] | |
534 | 534 | func calc (acc,cur) = { | |
535 | 535 | let $t02083821027 = acc | |
536 | 536 | let d = $t02083821027._1 | |
537 | 537 | let dPrev = $t02083821027._2 | |
538 | 538 | let dp = (((d * d) * d) / (((x1 * x2) * nCoins) * nCoins)) | |
539 | 539 | let dNext = (((((ann * s) / aPrecision) + (dp * nCoins)) * d) / ((((ann - aPrecision) * d) / aPrecision) + ((nCoins + toBigInt(1)) * dp))) | |
540 | 540 | $Tuple2(dNext, d) | |
541 | 541 | } | |
542 | 542 | ||
543 | 543 | let $t02124021290 = { | |
544 | 544 | let $l = arr | |
545 | 545 | let $s = size($l) | |
546 | 546 | let $acc0 = $Tuple2(s, unit) | |
547 | 547 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
548 | 548 | then $a | |
549 | 549 | else calc($a, $l[$i]) | |
550 | 550 | ||
551 | 551 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
552 | 552 | then $a | |
553 | 553 | else throw("List size exceeds 7") | |
554 | 554 | ||
555 | 555 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7) | |
556 | 556 | } | |
557 | 557 | let dNext = $t02124021290._1 | |
558 | 558 | let dPrev = $t02124021290._2 | |
559 | 559 | let dDiff = absBigInt((dNext - value(dPrev))) | |
560 | 560 | if ((targetPrecision >= dDiff)) | |
561 | 561 | then $Tuple2(nil, toString(dNext)) | |
562 | 562 | else throw(("D calculation error, dDiff = " + toString(dDiff))) | |
563 | 563 | } | |
564 | 564 | } | |
565 | 565 | ||
566 | 566 | ||
567 | 567 | ||
568 | 568 | @Callable(i) | |
569 | 569 | func calcPutXOnly (amountAssetAmountBigIntStr,amountAssetBalanceBigIntStr,priceAssetBalanceBigIntStr,dBigIntStr,amplificatorBigIntStr,amplificatorPrecisionBigIntStr,targetXPrecisionBigIntStr,targetDPrecisionBigIntStr) = { | |
570 | 570 | let nCoins = toBigInt(2) | |
571 | 571 | let aPrecision = parseBigIntValue(amplificatorPrecisionBigIntStr) | |
572 | 572 | let targetPrecision = parseBigIntValue(targetXPrecisionBigIntStr) | |
573 | 573 | let X = parseBigIntValue(amountAssetBalanceBigIntStr) | |
574 | 574 | let Y = parseBigIntValue(priceAssetBalanceBigIntStr) | |
575 | 575 | let d = if ((dBigIntStr == "")) | |
576 | 576 | then parseBigIntValue({ | |
577 | 577 | let @ = invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil) | |
578 | 578 | if ($isInstanceOf(@, "String")) | |
579 | 579 | then @ | |
580 | 580 | else throw(($getType(invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil)) + " couldn't be cast to String")) | |
581 | 581 | }) | |
582 | 582 | else parseBigIntValue(dBigIntStr) | |
583 | 583 | let amp = (parseBigIntValue(amplificatorBigIntStr) * aPrecision) | |
584 | 584 | let S = parseBigIntValue(amountAssetAmountBigIntStr) | |
585 | 585 | let ann = (amp * nCoins) | |
586 | 586 | let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] | |
587 | 587 | func calc (acc,cur) = { | |
588 | 588 | let $t02289822918 = acc | |
589 | 589 | let x = $t02289822918._1 | |
590 | 590 | let xPrev = $t02289822918._2 | |
591 | 591 | let newX = ((X + S) - x) | |
592 | 592 | let newY = (Y - ((x * Y) / X)) | |
593 | 593 | let dp = (((d * d) * d) / (((newX * newY) * nCoins) * nCoins)) | |
594 | 594 | let xNext = (x + ((((((-(d) * ann) / aPrecision) + d) + ((ann * (newX + newY)) / aPrecision)) - dp) / ((((-(ann) * (toBigInt(-1) - (Y / X))) / aPrecision) + (dp / newX)) + ((Y * dp) / (X * newY))))) | |
595 | 595 | $Tuple2(xNext, x) | |
596 | 596 | } | |
597 | 597 | ||
598 | 598 | let $t02322123281 = { | |
599 | 599 | let $l = arr | |
600 | 600 | let $s = size($l) | |
601 | 601 | let $acc0 = $Tuple2(zeroBigInt, unit) | |
602 | 602 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
603 | 603 | then $a | |
604 | 604 | else calc($a, $l[$i]) | |
605 | 605 | ||
606 | 606 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
607 | 607 | then $a | |
608 | 608 | else throw("List size exceeds 20") | |
609 | 609 | ||
610 | 610 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
611 | 611 | } | |
612 | 612 | let xNext = $t02322123281._1 | |
613 | 613 | let xPrev = $t02322123281._2 | |
614 | 614 | let xDiff = absBigInt((xNext - value(xPrev))) | |
615 | 615 | if ((targetPrecision >= xDiff)) | |
616 | 616 | then $Tuple2(nil, $Tuple2(toInt(xNext), toInt(fraction(xNext, Y, X)))) | |
617 | 617 | else throw(((((("X calculation error, xDiff = " + toString(xDiff)) + ", xNext = ") + toString(xNext)) + ", xPrev = ") + toString(value(xPrev)))) | |
618 | 618 | } | |
619 | 619 | ||
620 | 620 | ||
621 | 621 | ||
622 | 622 | @Callable(i) | |
623 | - | func | |
623 | + | func calcSwapXToYOld (amountAssetAmountBigIntStr,amountAssetBalanceBigIntStr,priceAssetBalanceBigIntStr,dBigIntStr,amplificatorBigIntStr,amplificatorPrecisionBigIntStr,targetXPrecisionBigIntStr,targetDPrecisionBigIntStr) = { | |
624 | 624 | let nCoins = toBigInt(2) | |
625 | 625 | let aPrecision = parseBigIntValue(amplificatorPrecisionBigIntStr) | |
626 | 626 | let targetPrecision = parseBigIntValue(targetXPrecisionBigIntStr) | |
627 | 627 | let X = parseBigIntValue(amountAssetBalanceBigIntStr) | |
628 | 628 | let Y = parseBigIntValue(priceAssetBalanceBigIntStr) | |
629 | 629 | let x = parseBigIntValue(amountAssetAmountBigIntStr) | |
630 | 630 | let d = if ((dBigIntStr == "")) | |
631 | 631 | then parseBigIntValue({ | |
632 | 632 | let @ = invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil) | |
633 | 633 | if ($isInstanceOf(@, "String")) | |
634 | 634 | then @ | |
635 | 635 | else throw(($getType(invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil)) + " couldn't be cast to String")) | |
636 | 636 | }) | |
637 | 637 | else parseBigIntValue(dBigIntStr) | |
638 | 638 | let amp = (parseBigIntValue(amplificatorBigIntStr) * aPrecision) | |
639 | - | let S = parseBigIntValue(amountAssetAmountBigIntStr) | |
640 | 639 | let ann = (amp * nCoins) | |
641 | 640 | let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] | |
642 | 641 | func calc (acc,cur) = { | |
643 | - | let $ | |
644 | - | let y = $ | |
645 | - | let yPrev = $ | |
642 | + | let $t02493024950 = acc | |
643 | + | let y = $t02493024950._1 | |
644 | + | let yPrev = $t02493024950._2 | |
646 | 645 | let newX = (X + x) | |
647 | 646 | let newY = (Y - y) | |
648 | 647 | let dp = (((d * d) * d) / (((newX * newY) * nCoins) * nCoins)) | |
649 | 648 | let yNext = (y + ((((((-(d) * ann) / aPrecision) + d) + ((ann * (newX + newY)) / aPrecision)) - dp) / ((ann / aPrecision) + (dp / newY)))) | |
650 | 649 | $Tuple2(yNext, y) | |
651 | 650 | } | |
652 | 651 | ||
653 | - | let $ | |
652 | + | let $t02519225243 = { | |
654 | 653 | let $l = arr | |
655 | 654 | let $s = size($l) | |
656 | - | let $acc0 = $Tuple2( | |
655 | + | let $acc0 = $Tuple2(d, unit) | |
657 | 656 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
658 | 657 | then $a | |
659 | 658 | else calc($a, $l[$i]) | |
660 | 659 | ||
661 | 660 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
662 | 661 | then $a | |
663 | 662 | else throw("List size exceeds 17") | |
664 | 663 | ||
665 | 664 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17) | |
666 | 665 | } | |
667 | - | let yNext = $ | |
668 | - | let yPrev = $ | |
669 | - | let | |
670 | - | if ((targetPrecision >= | |
666 | + | let yNext = $t02519225243._1 | |
667 | + | let yPrev = $t02519225243._2 | |
668 | + | let yDiff = absBigInt((yNext - value(yPrev))) | |
669 | + | if ((targetPrecision >= yDiff)) | |
671 | 670 | then $Tuple2(nil, toInt(yNext)) | |
672 | - | else throw(((((("Y calculation error, yDiff = " + toString(xDiff)) + ", yNext = ") + toString(yNext)) + ", yPrev = ") + toString(value(yPrev)))) | |
671 | + | else throw(((((("Y calculation error, yDiff = " + toString(yDiff)) + ", yNext = ") + toString(yNext)) + ", yPrev = ") + toString(value(yPrev)))) | |
672 | + | } | |
673 | + | ||
674 | + | ||
675 | + | ||
676 | + | @Callable(i) | |
677 | + | func calcSwapXToY (amountAssetAmountBigIntStr,amountAssetBalanceBigIntStr,priceAssetBalanceBigIntStr,dBigIntStr,amplificatorBigIntStr,amplificatorPrecisionBigIntStr,targetXPrecisionBigIntStr,targetDPrecisionBigIntStr) = { | |
678 | + | let nCoins = toBigInt(2) | |
679 | + | let aPrecision = parseBigIntValue(amplificatorPrecisionBigIntStr) | |
680 | + | let targetPrecision = parseBigIntValue(targetXPrecisionBigIntStr) | |
681 | + | let oldX = parseBigIntValue(amountAssetBalanceBigIntStr) | |
682 | + | let Y = parseBigIntValue(priceAssetBalanceBigIntStr) | |
683 | + | let x = parseBigIntValue(amountAssetAmountBigIntStr) | |
684 | + | let X = (oldX + x) | |
685 | + | let D = if ((dBigIntStr == "")) | |
686 | + | then parseBigIntValue({ | |
687 | + | let @ = invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil) | |
688 | + | if ($isInstanceOf(@, "String")) | |
689 | + | then @ | |
690 | + | else throw(($getType(invoke(this, "calcD", [amountAssetBalanceBigIntStr, priceAssetBalanceBigIntStr, amplificatorBigIntStr, amplificatorPrecisionBigIntStr, targetDPrecisionBigIntStr], nil)) + " couldn't be cast to String")) | |
691 | + | }) | |
692 | + | else parseBigIntValue(dBigIntStr) | |
693 | + | let amp = (parseBigIntValue(amplificatorBigIntStr) * aPrecision) | |
694 | + | let S = (X + Y) | |
695 | + | let ann = (amp * nCoins) | |
696 | + | let c = fraction((((D * D) * D) * D), aPrecision, (((((X * Y) * nCoins) * nCoins) * nCoins) * ann)) | |
697 | + | let b = (S + ((D * aPrecision) / ann)) | |
698 | + | let arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
699 | + | func calc (acc,cur) = { | |
700 | + | let $t02684926869 = acc | |
701 | + | let y = $t02684926869._1 | |
702 | + | let yPrev = $t02684926869._2 | |
703 | + | let yNext = (((y * y) + c) / (((toBigInt(2) * y) + b) - D)) | |
704 | + | $Tuple2(yNext, y) | |
705 | + | } | |
706 | + | ||
707 | + | let $t02694826999 = { | |
708 | + | let $l = arr | |
709 | + | let $s = size($l) | |
710 | + | let $acc0 = $Tuple2(D, unit) | |
711 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
712 | + | then $a | |
713 | + | else calc($a, $l[$i]) | |
714 | + | ||
715 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
716 | + | then $a | |
717 | + | else throw("List size exceeds 15") | |
718 | + | ||
719 | + | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
720 | + | } | |
721 | + | let yNext = $t02694826999._1 | |
722 | + | let yPrev = $t02694826999._2 | |
723 | + | let yDiff = absBigInt((yNext - value(yPrev))) | |
724 | + | if ((targetPrecision >= yDiff)) | |
725 | + | then $Tuple2(nil, toInt((Y - yNext))) | |
726 | + | else throw(((((("Y calculation error, yDiff = " + toString(yDiff)) + ", yNext = ") + toString(yNext)) + ", yPrev = ") + toString(value(yPrev)))) | |
673 | 727 | } | |
674 | 728 | ||
675 | 729 | ||
676 | 730 | ||
677 | 731 | @Callable(i) | |
678 | 732 | func setManager (pendingManagerPublicKey) = { | |
679 | 733 | let checkCaller = mustManager(i) | |
680 | 734 | if ((checkCaller == checkCaller)) | |
681 | 735 | then { | |
682 | 736 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
683 | 737 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
684 | 738 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
685 | 739 | else throw("Strict value is not equal to itself.") | |
686 | 740 | } | |
687 | 741 | else throw("Strict value is not equal to itself.") | |
688 | 742 | } | |
689 | 743 | ||
690 | 744 | ||
691 | 745 | ||
692 | 746 | @Callable(i) | |
693 | 747 | func confirmManager () = { | |
694 | 748 | let pm = pendingManagerPublicKeyOrUnit() | |
695 | 749 | let hasPM = if (isDefined(pm)) | |
696 | 750 | then true | |
697 | 751 | else throw("No pending manager") | |
698 | 752 | if ((hasPM == hasPM)) | |
699 | 753 | then { | |
700 | 754 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
701 | 755 | then true | |
702 | 756 | else throw("You are not pending manager") | |
703 | 757 | if ((checkPM == checkPM)) | |
704 | 758 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
705 | 759 | else throw("Strict value is not equal to itself.") | |
706 | 760 | } | |
707 | 761 | else throw("Strict value is not equal to itself.") | |
708 | 762 | } | |
709 | 763 | ||
710 | 764 | ||
711 | 765 | @Verifier(tx) | |
712 | 766 | func verify () = { | |
713 | 767 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
714 | 768 | case pk: ByteVector => | |
715 | 769 | pk | |
716 | 770 | case _: Unit => | |
717 | 771 | tx.senderPublicKey | |
718 | 772 | case _ => | |
719 | 773 | throw("Match error") | |
720 | 774 | } | |
721 | 775 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
722 | 776 | } | |
723 | 777 |
github/deemru/w8io/026f985 119.69 ms ◑