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