tx · bU4sQQwQSRJuv1UbBqTZ3pybQGGyNFRYV5UPwQui7t4

3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz:  -0.01400000 Waves

2021.12.17 12:53 [1838098] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves

{ "type": 13, "id": "bU4sQQwQSRJuv1UbBqTZ3pybQGGyNFRYV5UPwQui7t4", "fee": 1400000, "feeAssetId": null, "timestamp": 1639734803240, "version": 1, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "4gdHUxJK8gEAUg3x37ExgsXUeaBTSNU2ESGw3RiNcSQarDaSQgExpudquC7XzxXcVRfV3wPXCULBURrd3pWn2hEW" ], "script": "base64:AAIFAAAAAAAAACAIAhIDCgEIEgASBAoCCAESAwoBCBIECgIICBIECgIICAAAAEcAAAAABlNDQUxFOAAAAAAAAAAACAAAAAAFTVVMVDgAAAAAAAX14QAAAAAAB1NDQUxFMTgAAAAAAAAAABIAAAAABk1VTFQxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAAAAAA5QT09MV0VJR0hUTVVMVAUAAAAFTVVMVDgBAAAACWFzQW55TGlzdAAAAAEAAAADdmFsBAAAAAckbWF0Y2gwBQAAAAN2YWwDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACUxpc3RbQW55XQQAAAAKdmFsQW55THlzdAUAAAAHJG1hdGNoMAUAAAAKdmFsQW55THlzdAkAAAIAAAABAgAAABtmYWlsIHRvIGNhc3QgaW50byBMaXN0W0FueV0BAAAABWFzSW50AAAAAQAAAAN2YWwEAAAAByRtYXRjaDAFAAAAA3ZhbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAZ2YWxJbnQFAAAAByRtYXRjaDAFAAAABnZhbEludAkAAAIAAAABAgAAABVmY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NTdHIAAAAAAAAAAAAEAAAAEnd4UGVyTHBJbnRlZ3JhbE5ldwgFAAAADSR0MDE4NjMyMTg3NDIAAAACXzEEAAAAEXBvb2xJbnRlZ3JhbFNUQVRFCAUAAAANJHQwMTg2MzIxODc0MgAAAAJfMgQAAAAJcG9vbERFQlVHCAUAAAANJHQwMTg2MzIxODc0MgAAAAJfMwUAAAARcG9vbEludGVncmFsU1RBVEUAAAAAmiPaPg==", "chainId": 84, "height": 1838098, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DUV2LNSVwddMRoXf18Tz3WYJzSB49Yf14x7CnWpp1dhc Next: BDFdJTnCymCGtZioUho11u4WiBSAJ6hqEALiyuN736Cf Diff:
OldNewDifferences
304304
305305 @Callable(i)
306306 func unstake (lpAssetIdStr,amount) = {
307- let userAddressStr = toString(i.caller)
308307 let lpAssetId = fromBase58String(lpAssetIdStr)
309308 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
309+ let callerStr = toString(i.caller)
310+ let userAddressStr = if ((callerStr == poolAddressStr))
311+ then toString(i.originCaller)
312+ else callerStr
310313 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
311314 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
312315 let stakedByUser = readStaked(stakedByUserKEY)
313316 let stakedTotal = readStaked(stakedTotalKEY)
314- let $t01392214040 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
315- let wxToClaimUserNew = $t01392214040._1
316- let integralSTATE = $t01392214040._2
317- let debug = $t01392214040._3
317+ let $t01401814136 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
318+ let wxToClaimUserNew = $t01401814136._1
319+ let integralSTATE = $t01401814136._2
320+ let debug = $t01401814136._3
318321 if ((amount > stakedByUser))
319322 then throw("passed amount is less then available")
320323 else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
335338 let claimedByUserMinReward = getIntOrZero(this, claimedByUserMinRewardKEY)
336339 let claimedByUserBoostReward = getIntOrZero(this, claimedByUserBoostRewardKEY)
337340 let claimedTotal = getIntOrZero(this, claimedTotalKEY)
338- let $t01523215344 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
339- let wxToClaimUserNew = $t01523215344._1
340- let integralSTATE = $t01523215344._2
341- let debug = $t01523215344._3
341+ let $t01532815440 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
342+ let wxToClaimUserNew = $t01532815440._1
343+ let integralSTATE = $t01532815440._2
344+ let debug = $t01532815440._3
342345 let availableToClaim = (wxToClaimUserNew - claimedByUser)
343346 if ((0 >= availableToClaim))
344347 then throw("nothing to claim")
373376 else (height - emissionStartBlock)
374377 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
375378 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
376- let $t01754417656 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
377- let wxToClaimUserNew = $t01754417656._1
378- let integralSTATE = $t01754417656._2
379- let debug = $t01754417656._3
379+ let $t01764017752 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
380+ let wxToClaimUserNew = $t01764017752._1
381+ let integralSTATE = $t01764017752._2
382+ let debug = $t01764017752._3
380383 let availableToClaim = (wxToClaimUserNew - claimedByUser)
381384 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
382385 let wxAmountBoostTotal = asInt(boostInvResult[0])
393396 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
394397 then throw("permissions denied")
395398 else {
396- let $t01853618646 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
397- let wxPerLpIntegralNew = $t01853618646._1
398- let poolIntegralSTATE = $t01853618646._2
399- let poolDEBUG = $t01853618646._3
399+ let $t01863218742 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
400+ let wxPerLpIntegralNew = $t01863218742._1
401+ let poolIntegralSTATE = $t01863218742._2
402+ let poolDEBUG = $t01863218742._3
400403 poolIntegralSTATE
401404 }
402405
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
55
66 let MULT8 = 100000000
77
88 let SCALE18 = 18
99
1010 let MULT18 = toBigInt(1000000000000000000)
1111
1212 let SEP = "__"
1313
1414 let POOLWEIGHTMULT = MULT8
1515
1616 func asAnyList (val) = match val {
1717 case valAnyLyst: List[Any] =>
1818 valAnyLyst
1919 case _ =>
2020 throw("fail to cast into List[Any]")
2121 }
2222
2323
2424 func asInt (val) = match val {
2525 case valInt: Int =>
2626 valInt
2727 case _ =>
2828 throw("fail to cast into Int")
2929 }
3030
3131
3232 func asString (val) = match val {
3333 case valStr: String =>
3434 valStr
3535 case _ =>
3636 throw("fail to cast into Int")
3737 }
3838
3939
4040 func asByteVector (val) = match val {
4141 case valBin: ByteVector =>
4242 valBin
4343 case _ =>
4444 throw("fail to cast into Int")
4545 }
4646
4747
4848 func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
4949
5050
5151 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
5252
5353
5454 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
5555
5656
5757 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
5858
5959
6060 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
6161
6262
6363 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
6464
6565
6666 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
6767
6868
6969 func keyFactoryAddress () = "%s%s__config__factoryAddress"
7070
7171
7272 let IdxFactoryCfgStakingDapp = 1
7373
7474 let IdxFactoryCfgBoostingDapp = 2
7575
7676 let IdxFactoryCfgIdoDapp = 3
7777
7878 let IdxFactoryCfgTeamDapp = 4
7979
8080 let IdxFactoryCfgEmissionDapp = 5
8181
8282 let IdxFactoryCfgRestDapp = 6
8383
8484 let IdxFactoryCfgSlippageDapp = 7
8585
8686 func keyFactoryCfg () = "%s__factoryConfig"
8787
8888
8989 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
9090
9191
9292 func keyFactoryLpList () = "%s__lpTokensList"
9393
9494
9595 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
9696
9797
9898 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
9999
100100
101101 func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP)
102102
103103
104104 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
105105
106106
107107 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
108108
109109
110110 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
111111
112112
113113 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
114114
115115
116116 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
117117
118118
119119 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
120120
121121
122122 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
123123
124124
125125 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
126126
127127
128128 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
129129
130130
131131 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
132132
133133
134134 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
135135
136136
137137 func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
138138
139139
140140 func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP)
141141
142142
143143 func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP)
144144
145145
146146 func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed", "total", lpAssetIdStr], SEP)
147147
148148
149149 func readStaked (key) = valueOrElse(getInteger(this, key), 0)
150150
151151
152152 func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP)
153153
154154
155155 func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP)
156156
157157
158158 func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP)
159159
160160
161161 func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP)
162162
163163
164164 func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP)
165165
166166
167167 func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP)
168168
169169
170170 func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP)
171171
172172
173173 func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP)
174174
175175
176176 func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP)
177177
178178
179179 func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP)
180180
181181
182182 func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP)
183183
184184
185185 func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP)
186186
187187
188188 func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP)
189189
190190
191191 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
192192
193193
194194 func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP)
195195
196196
197197 func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount))
198198
199199
200200 let factoryAddress = getStringOrFail(keyFactoryAddress())
201201
202202 let factoryContract = addressFromStringValue(factoryAddress)
203203
204204 let factoryCfg = readFactoryCfgOrFail(factoryContract)
205205
206206 let emissionContract = getEmissionAddressOrFail(factoryCfg)
207207
208208 let boostingContract = getBoostingAddressOrFail(factoryCfg)
209209
210210 func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == 0))
211211 then (stakedByUser > 0)
212212 else false)
213213 then 0
214214 else if ((stakedByUser == 0))
215215 then wxPerLpIntegralNew
216216 else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > 0))
217217 then (stakedByUser > 0)
218218 else false)
219219 then getIntOrFail(this, wxPerLpIntegralUserLastKEY)
220220 else throw("calcWxPerLpIntegralUserLast: unexpected state")
221221
222222
223223 func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = {
224224 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
225225 let stakedTotal = readStaked(stakedTotalKEY)
226226 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
227227 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
228228 let MULT3 = 1000
229229 let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3)
230230 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3))
231231 let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr)
232232 let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr)
233233 let wxPerLpKEY = keyWxPerLp(lpAssetIdStr)
234234 let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock)
235235 let wxPerLpIntegral = getIntOrZero(this, wxPerLpIntegralKEY)
236236 let wxPerLpOrZeroX3 = 0
237237 let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0])
238238 let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0))
239239 then wxPerLpOrZeroX3
240240 else fraction(poolWxEmissionPerBlockX3, MULT8, stakedTotal)
241241 let stakedTotalNew = (stakedTotal + lpDeltaAmount)
242242 let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * dh))
243243 let wxPerLpX3New = (poolWxEmissionPerBlockX3 / stakedTotalNew)
244244 let wxPerLpIntegralLastUpdHeightNew = height
245245 let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::")
246246 $Tuple3(wxPerLpIntegralNew, [IntegerEntry(wxPerLpIntegralKEY, wxPerLpIntegralNew), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), IntegerEntry(wxPerLpKEY, wxPerLpX3New)], debug)
247247 }
248248
249249
250250 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
251251 let $t01032310445 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
252252 let wxPerLpIntegralNew = $t01032310445._1
253253 let poolIntegralSTATE = $t01032310445._2
254254 let poolDEBUG = $t01032310445._3
255255 let MULT3 = 1000
256256 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
257257 let stakedByUser = readStaked(stakedByUserKEY)
258258 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
259259 let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr)
260260 let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr)
261261 let wxToClaimUser = getIntOrZero(this, wxToClaimUserKEY)
262262 let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY)
263263 let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(stakedByUser, wxPerLpIntegralUserLastUpdHeightOrZero, wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
264264 let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), stakedByUser, (MULT8 * MULT3)))
265265 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
266266 let wxPerLpIntegralUserLastUpdHeightNew = height
267267 let debug = makeString([toString(wxToClaimUserNew), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::")
268268 $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [IntegerEntry(wxToClaimUserKEY, wxToClaimUserNew), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), IntegerEntry(wxPerLpIntegralUserLastKEY, wxPerLpIntegralUserLastNew)]), debug)
269269 }
270270
271271
272272 @Callable(i)
273273 func constructor (factoryAddressStr) = if ((i.caller != this))
274274 then throw("not authorized")
275275 else [StringEntry(keyFactoryAddress(), factoryAddressStr)]
276276
277277
278278
279279 @Callable(i)
280280 func stake () = if ((size(i.payments) != 1))
281281 then throw("invalid payment - exact one payment must be attached")
282282 else {
283283 let pmt = i.payments[0]
284284 let lpAssetId = value(pmt.assetId)
285285 let lpAssetIdStr = toBase58String(lpAssetId)
286286 let amount = pmt.amount
287287 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
288288 let callerStr = toString(i.caller)
289289 let userAddressStr = if ((callerStr == poolAddressStr))
290290 then toString(i.originCaller)
291291 else callerStr
292292 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
293293 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
294294 let stakedByUser = readStaked(stakedByUserKEY)
295295 let stakedTotal = readStaked(stakedTotalKEY)
296296 let $t01298813105 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
297297 let wxToClaimUserNew = $t01298813105._1
298298 let integralSTATE = $t01298813105._2
299299 let debug = $t01298813105._3
300300 ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
301301 }
302302
303303
304304
305305 @Callable(i)
306306 func unstake (lpAssetIdStr,amount) = {
307- let userAddressStr = toString(i.caller)
308307 let lpAssetId = fromBase58String(lpAssetIdStr)
309308 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
309+ let callerStr = toString(i.caller)
310+ let userAddressStr = if ((callerStr == poolAddressStr))
311+ then toString(i.originCaller)
312+ else callerStr
310313 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
311314 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
312315 let stakedByUser = readStaked(stakedByUserKEY)
313316 let stakedTotal = readStaked(stakedTotalKEY)
314- let $t01392214040 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
315- let wxToClaimUserNew = $t01392214040._1
316- let integralSTATE = $t01392214040._2
317- let debug = $t01392214040._3
317+ let $t01401814136 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))
318+ let wxToClaimUserNew = $t01401814136._1
319+ let integralSTATE = $t01401814136._2
320+ let debug = $t01401814136._3
318321 if ((amount > stakedByUser))
319322 then throw("passed amount is less then available")
320323 else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
321324 }
322325
323326
324327
325328 @Callable(i)
326329 func claimWx (lpAssetIdStr) = {
327330 let userAddress = i.caller
328331 let userAddressStr = toString(i.caller)
329332 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
330333 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
331334 let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
332335 let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
333336 let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
334337 let claimedByUser = getIntOrZero(this, claimedByUserKEY)
335338 let claimedByUserMinReward = getIntOrZero(this, claimedByUserMinRewardKEY)
336339 let claimedByUserBoostReward = getIntOrZero(this, claimedByUserBoostRewardKEY)
337340 let claimedTotal = getIntOrZero(this, claimedTotalKEY)
338- let $t01523215344 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
339- let wxToClaimUserNew = $t01523215344._1
340- let integralSTATE = $t01523215344._2
341- let debug = $t01523215344._3
341+ let $t01532815440 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
342+ let wxToClaimUserNew = $t01532815440._1
343+ let integralSTATE = $t01532815440._2
344+ let debug = $t01532815440._3
342345 let availableToClaim = (wxToClaimUserNew - claimedByUser)
343346 if ((0 >= availableToClaim))
344347 then throw("nothing to claim")
345348 else {
346349 let wxAmountBoostTotal = asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0])
347350 let minRewardPart = availableToClaim
348351 let boostRewardPart = min([(minRewardPart * 2), wxAmountBoostTotal])
349352 let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [minRewardPart], nil))[0])
350353 let emitBoost = asAnyList(invoke(emissionContract, "emit", [boostRewardPart], nil))
351354 if ((emitBoost == emitBoost))
352355 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)]
353356 else throw("Strict value is not equal to itself.")
354357 }
355358 }
356359
357360
358361
359362 @Callable(i)
360363 func claimWxREADONLY (lpAssetIdStr,userAddressStr) = {
361364 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
362365 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
363366 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
364367 let stakedByUser = readStaked(stakedByUserKEY)
365368 let stakedTotal = readStaked(stakedTotalKEY)
366369 let claimedByUser = getIntOrZero(this, claimedByUserKEY)
367370 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
368371 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
369372 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
370373 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
371374 let passedBlocks = if ((emissionStartBlock > height))
372375 then 0
373376 else (height - emissionStartBlock)
374377 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
375378 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
376- let $t01754417656 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
377- let wxToClaimUserNew = $t01754417656._1
378- let integralSTATE = $t01754417656._2
379- let debug = $t01754417656._3
379+ let $t01764017752 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
380+ let wxToClaimUserNew = $t01764017752._1
381+ let integralSTATE = $t01764017752._2
382+ let debug = $t01764017752._3
380383 let availableToClaim = (wxToClaimUserNew - claimedByUser)
381384 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
382385 let wxAmountBoostTotal = asInt(boostInvResult[0])
383386 let boostDebug = asString(boostInvResult[1])
384387 let minRewardPart = availableToClaim
385388 let boostRewardPart = min([(minRewardPart * 2), wxAmountBoostTotal])
386389 let totalReward = (minRewardPart + boostRewardPart)
387390 $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))
388391 }
389392
390393
391394
392395 @Callable(i)
393396 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
394397 then throw("permissions denied")
395398 else {
396- let $t01853618646 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
397- let wxPerLpIntegralNew = $t01853618646._1
398- let poolIntegralSTATE = $t01853618646._2
399- let poolDEBUG = $t01853618646._3
399+ let $t01863218742 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
400+ let wxPerLpIntegralNew = $t01863218742._1
401+ let poolIntegralSTATE = $t01863218742._2
402+ let poolDEBUG = $t01863218742._3
400403 poolIntegralSTATE
401404 }
402405
403406

github/deemru/w8io/fabc49c 
68.73 ms