tx · 4ANkMz4DGaFvtGXBkYWpkTGidXYLDE6Ztq6JTmLaPjwF 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz: -0.01000000 Waves 2021.12.15 11:37 [1835137] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves
{ "type": 13, "id": "4ANkMz4DGaFvtGXBkYWpkTGidXYLDE6Ztq6JTmLaPjwF", "fee": 1000000, "feeAssetId": null, "timestamp": 1639557493528, "version": 1, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "tBncB78VRv6hQap7of3EPSrXMxPnmpFLQfcEU1dpmUDmDEp6v9j22HAq26njPuRMyVGEaPfCDFvz2wJTqowfEMb" ], "script": "base64:AAIFAAAAAAAAABoIAhIDCgEIEgASBAoCCAESAwoBCBIECgIICAAAAEYAAAAABlNDQUxFOAAAAAAAAAAACAAAAAAFTVVMVDgAAAAAAAX14QAAAAAAB1NDQUxFMTgAAAAAAAAAABIAAAAABk1VTFQxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAAAAAA5QT09MV0VJR0hUTVVMVAUAAAAFTVVMVDgBAAAACWFzQW55TGlzdAAAAAEAAAADdmFsBAAAAAckbWF0Y2gwBQAAAAN2YWwDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACUxpc3RbQW55XQQAAAAKdmFsQW55THlzdAUAAAAHJG1hdGNoMAUAAAAKdmFsQW55THlzdAkAAAIAAAABAgAAABtmYWlsIHRvIGNhc3QgaW50byBMaXN0W0FueV0BAAAABWFzSW50AAAAAQAAAAN2YWwEAAAAByRtYXRjaDAFAAAAA3ZhbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAZ2YWxJbnQFAAAAByRtYXRjaDAFAAAABnZhbEludAkAAAIAAAABAgAAABVmYWlsI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AAAACCQABpAAAAAEFAAAAD2Jvb3N0UmV3YXJkUGFydAkABEwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAABWRlYnVnAgAAAAI6OgkAAaQAAAABBQAAAAx1c2VyV3hSZXdhcmQCAAAADjo6Qk9PU1RERUJVRzo6BQAAAApib29zdERlYnVnBQAAAANuaWwFAAAAA1NFUAAAAABf1T1n", "chainId": 84, "height": 1835137, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: mq3BN61DGfVzK9yG6hf6GknxbjTvw7T2mHhWrPBoeaQ Next: 7VasV9EDZPvJLDMRqomGxTE5diWCUrALey8gHsHuPgqa Diff:
Old | New | Differences | |
---|---|---|---|
241 | 241 | let wxPerLpIntegral = getIntOrZero(this, wxPerLpIntegralKEY) | |
242 | 242 | let wxToClaimUser = getIntOrZero(this, wxToClaimUserKEY) | |
243 | 243 | let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY) | |
244 | - | let wxPerLpOrZeroX8 = | |
244 | + | let wxPerLpOrZeroX8 = 0 | |
245 | 245 | let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0]) | |
246 | 246 | let wxPerLpX8 = if ((wxPerLpOrZeroX8 != 0)) | |
247 | 247 | then wxPerLpOrZeroX8 | |
283 | 283 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
284 | 284 | let stakedByUser = readStaked(stakedByUserKEY) | |
285 | 285 | let stakedTotal = readStaked(stakedTotalKEY) | |
286 | - | let $ | |
287 | - | let wxToClaimUserNew = $ | |
288 | - | let integralSTATE = $ | |
289 | - | let debug = $ | |
286 | + | let $t01252212639 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
287 | + | let wxToClaimUserNew = $t01252212639._1 | |
288 | + | let integralSTATE = $t01252212639._2 | |
289 | + | let debug = $t01252212639._3 | |
290 | 290 | ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
291 | 291 | } | |
292 | 292 | ||
301 | 301 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
302 | 302 | let stakedByUser = readStaked(stakedByUserKEY) | |
303 | 303 | let stakedTotal = readStaked(stakedTotalKEY) | |
304 | - | let $ | |
305 | - | let wxToClaimUserNew = $ | |
306 | - | let integralSTATE = $ | |
307 | - | let debug = $ | |
304 | + | let $t01345613574 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount)) | |
305 | + | let wxToClaimUserNew = $t01345613574._1 | |
306 | + | let integralSTATE = $t01345613574._2 | |
307 | + | let debug = $t01345613574._3 | |
308 | 308 | if ((amount > stakedByUser)) | |
309 | 309 | then throw("passed amount is less then available") | |
310 | 310 | else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
325 | 325 | let claimedByUserMinReward = getIntOrZero(this, claimedByUserMinRewardKEY) | |
326 | 326 | let claimedByUserBoostReward = getIntOrZero(this, claimedByUserBoostRewardKEY) | |
327 | 327 | let claimedTotal = getIntOrZero(this, claimedTotalKEY) | |
328 | - | let $ | |
329 | - | let wxToClaimUserNew = $ | |
330 | - | let integralSTATE = $ | |
331 | - | let debug = $ | |
328 | + | let $t01476614878 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
329 | + | let wxToClaimUserNew = $t01476614878._1 | |
330 | + | let integralSTATE = $t01476614878._2 | |
331 | + | let debug = $t01476614878._3 | |
332 | 332 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
333 | 333 | if ((0 >= availableToClaim)) | |
334 | 334 | then throw("nothing to claim") | |
365 | 365 | else (height - emissionStartBlock) | |
366 | 366 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, poolWeightMult) | |
367 | 367 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
368 | - | let $ | |
369 | - | let wxToClaimUserNew = $ | |
370 | - | let integralSTATE = $ | |
371 | - | let debug = $ | |
368 | + | let $t01722917341 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
369 | + | let wxToClaimUserNew = $t01722917341._1 | |
370 | + | let integralSTATE = $t01722917341._2 | |
371 | + | let debug = $t01722917341._3 | |
372 | 372 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
373 | 373 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
374 | 374 | let wxAmountBoostTotal = asInt(boostInvResult[0]) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
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 | func asAnyList (val) = match val { | |
17 | 17 | case valAnyLyst: List[Any] => | |
18 | 18 | valAnyLyst | |
19 | 19 | case _ => | |
20 | 20 | throw("fail to cast into List[Any]") | |
21 | 21 | } | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func asInt (val) = match val { | |
25 | 25 | case valInt: Int => | |
26 | 26 | valInt | |
27 | 27 | case _ => | |
28 | 28 | throw("fail to cast into Int") | |
29 | 29 | } | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func asString (val) = match val { | |
33 | 33 | case valStr: String => | |
34 | 34 | valStr | |
35 | 35 | case _ => | |
36 | 36 | throw("fail to cast into Int") | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func asByteVector (val) = match val { | |
41 | 41 | case valBin: ByteVector => | |
42 | 42 | valBin | |
43 | 43 | case _ => | |
44 | 44 | throw("fail to cast into Int") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18)) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | let IdxFactoryCfgStakingDapp = 1 | |
73 | 73 | ||
74 | 74 | let IdxFactoryCfgBoostingDapp = 2 | |
75 | 75 | ||
76 | 76 | let IdxFactoryCfgIdoDapp = 3 | |
77 | 77 | ||
78 | 78 | let IdxFactoryCfgTeamDapp = 4 | |
79 | 79 | ||
80 | 80 | let IdxFactoryCfgEmissionDapp = 5 | |
81 | 81 | ||
82 | 82 | let IdxFactoryCfgRestDapp = 6 | |
83 | 83 | ||
84 | 84 | let IdxFactoryCfgSlippageDapp = 7 | |
85 | 85 | ||
86 | 86 | func keyFactoryCfg () = "%s__factoryConfig" | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func keyFactoryLpList () = "%s__lpTokensList" | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress())) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed", "total", lpAssetIdStr], SEP) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func readStaked (key) = valueOrElse(getInteger(this, key), 0) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP) | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP) | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP) | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP) | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP) | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP) | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP) | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount)) | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | let factoryContract = readFactoryAddressOrFail() | |
204 | 204 | ||
205 | 205 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
206 | 206 | ||
207 | 207 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
208 | 208 | ||
209 | 209 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
210 | 210 | ||
211 | 211 | func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == 0)) | |
212 | 212 | then (stakedByUser > 0) | |
213 | 213 | else false) | |
214 | 214 | then 0 | |
215 | 215 | else if ((stakedByUser == 0)) | |
216 | 216 | then wxPerLpIntegralNew | |
217 | 217 | else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > 0)) | |
218 | 218 | then (stakedByUser > 0) | |
219 | 219 | else false) | |
220 | 220 | then getIntOrFail(this, wxPerLpIntegralUserLastKEY) | |
221 | 221 | else throw("calcWxPerLpIntegralUserLast: unexpected state") | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
225 | 225 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
226 | 226 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
227 | 227 | let stakedByUser = readStaked(stakedByUserKEY) | |
228 | 228 | let stakedTotal = readStaked(stakedTotalKEY) | |
229 | 229 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
230 | 230 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
231 | 231 | let MULT3 = 1000 | |
232 | 232 | let wxEmissionPerBlock = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3) | |
233 | 233 | let poolWxEmissionPerBlock = fraction(wxEmissionPerBlock, poolWeight, (POOLWEIGHTMULT * 3)) | |
234 | 234 | let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr) | |
235 | 235 | let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr) | |
236 | 236 | let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr) | |
237 | 237 | let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr) | |
238 | 238 | let wxPerLpKEY = keyWxPerLp(lpAssetIdStr) | |
239 | 239 | let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr) | |
240 | 240 | let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock) | |
241 | 241 | let wxPerLpIntegral = getIntOrZero(this, wxPerLpIntegralKEY) | |
242 | 242 | let wxToClaimUser = getIntOrZero(this, wxToClaimUserKEY) | |
243 | 243 | let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY) | |
244 | - | let wxPerLpOrZeroX8 = | |
244 | + | let wxPerLpOrZeroX8 = 0 | |
245 | 245 | let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0]) | |
246 | 246 | let wxPerLpX8 = if ((wxPerLpOrZeroX8 != 0)) | |
247 | 247 | then wxPerLpOrZeroX8 | |
248 | 248 | else fraction(poolWxEmissionPerBlock, MULT8, stakedTotal) | |
249 | 249 | let stakedTotalNew = (stakedTotal + lpDeltaAmount) | |
250 | 250 | let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX8 * dh)) | |
251 | 251 | let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(stakedByUser, wxPerLpIntegralUserLastUpdHeightOrZero, wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY) | |
252 | 252 | let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), stakedByUser, (MULT8 * MULT3))) | |
253 | 253 | let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew | |
254 | 254 | let wxPerLpNewX8 = 0 | |
255 | 255 | let wxPerLpIntegralLastUpdHeightNew = height | |
256 | 256 | let wxPerLpIntegralUserLastUpdHeightNew = height | |
257 | 257 | let debug = makeString([toString(wxToClaimUserNew), toString(wxPerLpIntegralNew), toString(wxPerLpIntegralUserLast), toString(stakedByUser), toString(dh), toString(wxPerLpX8), toString(stakedTotal), toString(poolWxEmissionPerBlock), toString(wxEmissionPerBlock), toString(poolWeight), toString(height)], "::") | |
258 | 258 | $Tuple3(wxToClaimUserNew, [IntegerEntry(wxPerLpIntegralKEY, wxPerLpIntegralNew), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), IntegerEntry(wxToClaimUserKEY, wxToClaimUserNew), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), IntegerEntry(wxPerLpKEY, wxPerLpNewX8), IntegerEntry(wxPerLpIntegralUserLastKEY, wxPerLpIntegralUserLastNew)], debug) | |
259 | 259 | } | |
260 | 260 | ||
261 | 261 | ||
262 | 262 | @Callable(i) | |
263 | 263 | func constructor (factoryAddressStr) = if ((i.caller != this)) | |
264 | 264 | then throw("not authorized") | |
265 | 265 | else [StringEntry(keyFactoryAddress(), factoryAddressStr)] | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | ||
269 | 269 | @Callable(i) | |
270 | 270 | func stake () = if ((size(i.payments) != 1)) | |
271 | 271 | then throw("invalid payment - exact one payment must be attached") | |
272 | 272 | else { | |
273 | 273 | let pmt = i.payments[0] | |
274 | 274 | let lpAssetId = value(pmt.assetId) | |
275 | 275 | let lpAssetIdStr = toBase58String(lpAssetId) | |
276 | 276 | let amount = pmt.amount | |
277 | 277 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
278 | 278 | let callerStr = toString(i.caller) | |
279 | 279 | let userAddressStr = if ((callerStr == poolAddressStr)) | |
280 | 280 | then toString(i.originCaller) | |
281 | 281 | else callerStr | |
282 | 282 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
283 | 283 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
284 | 284 | let stakedByUser = readStaked(stakedByUserKEY) | |
285 | 285 | let stakedTotal = readStaked(stakedTotalKEY) | |
286 | - | let $ | |
287 | - | let wxToClaimUserNew = $ | |
288 | - | let integralSTATE = $ | |
289 | - | let debug = $ | |
286 | + | let $t01252212639 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
287 | + | let wxToClaimUserNew = $t01252212639._1 | |
288 | + | let integralSTATE = $t01252212639._2 | |
289 | + | let debug = $t01252212639._3 | |
290 | 290 | ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | ||
295 | 295 | @Callable(i) | |
296 | 296 | func unstake (lpAssetIdStr,amount) = { | |
297 | 297 | let userAddressStr = toString(i.caller) | |
298 | 298 | let lpAssetId = fromBase58String(lpAssetIdStr) | |
299 | 299 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
300 | 300 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
301 | 301 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
302 | 302 | let stakedByUser = readStaked(stakedByUserKEY) | |
303 | 303 | let stakedTotal = readStaked(stakedTotalKEY) | |
304 | - | let $ | |
305 | - | let wxToClaimUserNew = $ | |
306 | - | let integralSTATE = $ | |
307 | - | let debug = $ | |
304 | + | let $t01345613574 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount)) | |
305 | + | let wxToClaimUserNew = $t01345613574._1 | |
306 | + | let integralSTATE = $t01345613574._2 | |
307 | + | let debug = $t01345613574._3 | |
308 | 308 | if ((amount > stakedByUser)) | |
309 | 309 | then throw("passed amount is less then available") | |
310 | 310 | else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
311 | 311 | } | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | ||
315 | 315 | @Callable(i) | |
316 | 316 | func claimWx (lpAssetIdStr) = { | |
317 | 317 | let userAddress = i.caller | |
318 | 318 | let userAddressStr = toString(i.caller) | |
319 | 319 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
320 | 320 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
321 | 321 | let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr) | |
322 | 322 | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr) | |
323 | 323 | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr) | |
324 | 324 | let claimedByUser = getIntOrZero(this, claimedByUserKEY) | |
325 | 325 | let claimedByUserMinReward = getIntOrZero(this, claimedByUserMinRewardKEY) | |
326 | 326 | let claimedByUserBoostReward = getIntOrZero(this, claimedByUserBoostRewardKEY) | |
327 | 327 | let claimedTotal = getIntOrZero(this, claimedTotalKEY) | |
328 | - | let $ | |
329 | - | let wxToClaimUserNew = $ | |
330 | - | let integralSTATE = $ | |
331 | - | let debug = $ | |
328 | + | let $t01476614878 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
329 | + | let wxToClaimUserNew = $t01476614878._1 | |
330 | + | let integralSTATE = $t01476614878._2 | |
331 | + | let debug = $t01476614878._3 | |
332 | 332 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
333 | 333 | if ((0 >= availableToClaim)) | |
334 | 334 | then throw("nothing to claim") | |
335 | 335 | else { | |
336 | 336 | let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]) | |
337 | 337 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
338 | 338 | let minRewardPart = availableToClaim | |
339 | 339 | let boostRewardPart = min([(minRewardPart * 2), wxAmountBoostTotal]) | |
340 | 340 | let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [minRewardPart], nil))[0]) | |
341 | 341 | let emitBoost = asAnyList(invoke(emissionContract, "emit", [boostRewardPart], nil)) | |
342 | 342 | if ((emitBoost == emitBoost)) | |
343 | 343 | then [IntegerEntry(claimedByUserKEY, (claimedByUser + availableToClaim)), IntegerEntry(claimedByUserMinRewardKEY, (claimedByUserMinReward + minRewardPart)), IntegerEntry(claimedByUserBoostRewardKEY, (claimedByUserBoostReward + boostRewardPart)), IntegerEntry(claimedTotalKEY, (claimedTotal + availableToClaim)), ScriptTransfer(userAddress, minRewardPart, wxAssetId), ScriptTransfer(userAddress, boostRewardPart, wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, availableToClaim, i.transactionId)] | |
344 | 344 | else throw("Strict value is not equal to itself.") | |
345 | 345 | } | |
346 | 346 | } | |
347 | 347 | ||
348 | 348 | ||
349 | 349 | ||
350 | 350 | @Callable(i) | |
351 | 351 | func claimWxREADONLY (lpAssetIdStr,userAddressStr) = { | |
352 | 352 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
353 | 353 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
354 | 354 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
355 | 355 | let stakedByUser = readStaked(stakedByUserKEY) | |
356 | 356 | let stakedTotal = readStaked(stakedTotalKEY) | |
357 | 357 | let claimedByUser = getIntOrZero(this, claimedByUserKEY) | |
358 | 358 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
359 | 359 | let poolWeightMult = MULT8 | |
360 | 360 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
361 | 361 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
362 | 362 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
363 | 363 | let passedBlocks = if ((emissionStartBlock > height)) | |
364 | 364 | then 0 | |
365 | 365 | else (height - emissionStartBlock) | |
366 | 366 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, poolWeightMult) | |
367 | 367 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
368 | - | let $ | |
369 | - | let wxToClaimUserNew = $ | |
370 | - | let integralSTATE = $ | |
371 | - | let debug = $ | |
368 | + | let $t01722917341 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
369 | + | let wxToClaimUserNew = $t01722917341._1 | |
370 | + | let integralSTATE = $t01722917341._2 | |
371 | + | let debug = $t01722917341._3 | |
372 | 372 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
373 | 373 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
374 | 374 | let wxAmountBoostTotal = asInt(boostInvResult[0]) | |
375 | 375 | let boostDebug = asString(boostInvResult[1]) | |
376 | 376 | let minRewardPart = availableToClaim | |
377 | 377 | let boostRewardPart = min([(minRewardPart * 2), wxAmountBoostTotal]) | |
378 | 378 | let totalReward = (minRewardPart + boostRewardPart) | |
379 | 379 | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOSTDEBUG::") + boostDebug)], SEP)) | |
380 | 380 | } | |
381 | 381 | ||
382 | 382 |
github/deemru/w8io/fabc49c 58.98 ms ◑