tx · EtWz3xvMC8e5yLGQpwFmoTub6fVaA1f4vYYy8uySL8Yr

3N9Q1fto4gNiBzBhunuF57xU7chekeJBzJb:  -0.01000000 Waves

2021.11.24 02:31 [1804342] smart account 3N9Q1fto4gNiBzBhunuF57xU7chekeJBzJb > SELF 0.00000000 Waves

{ "type": 13, "id": "EtWz3xvMC8e5yLGQpwFmoTub6fVaA1f4vYYy8uySL8Yr", "fee": 1000000, "feeAssetId": null, "timestamp": 1637710310897, "version": 1, "sender": "3N9Q1fto4gNiBzBhunuF57xU7chekeJBzJb", "senderPublicKey": "5LCbyfeLnA6WFFq4M6L7AEzy8ktT8sL9A5JXoyuaxCCJ", "proofs": [ "3p8ZWr6J64R4vhG13ckoL1AJSsxNjGxB9xHC1JZHx3M4L3wPQPrzTKVXiTvUNL3r4gnUUHrzNwcT6AfERKi8rDxj" ], "script": "base64:AAIFAAAAAAAAABoIAhIDCgEIEgASBAoCCAESAwoBCBIECgIICAAAADwAAAAABlNDQUxFOAAAAAAAAAAACAAAAAAFTVVMVDgAAAAAAAX14QAAAAAAB1NDQUxFMTgAAAAAAAAAABIAAAAABk1VTFQxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAAAAAA5QT09MV0VJR0hUTVVMVAUAAAAFTVVMVDgBAAAAD2dldFN0cmluZ09yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQiAAAAAQUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgIAAAAPbWFuZGF0b3J5IHRoaXMuBQAAAANrZXkCAAAADyBpcyBub3QgZGVmaW5lZAEAAAAYZ2V0U3RyaW5nQnlBZGRyZXNzT3JGYWlsAAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAA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plexity": 0 } View: original | compacted Prev: 5bhc79hGkAVU7bQqQYphYdyAVRnAbFSiW4fWqKoeSp5Y Next: FmcipJcDPpYxBDBwn8Krm9VujmMkiGjEJSbiAAY9z8rV Diff:
OldNewDifferences
237237 let wxToClaimUserNew = $t01127211389._1
238238 let integralSTATE = $t01127211389._2
239239 let debug = $t01127211389._3
240-[IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)]
240+ ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
241241 }
242242
243243
291291 else (height - emissionStartBlock)
292292 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, poolWeightMult)
293293 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
294- let $t01389814010 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
295- let wxToClaimUserNew = $t01389814010._1
296- let integralSTATE = $t01389814010._2
297- let debug = $t01389814010._3
294+ let $t01389614008 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
295+ let wxToClaimUserNew = $t01389614008._1
296+ let integralSTATE = $t01389614008._2
297+ let debug = $t01389614008._3
298298 $Tuple2(nil, makeString(["%s%s%d%d%s", lpAssetIdStr, userAddressStr, toString(userWxReward), "0", debug], SEP))
299299 }
300300
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 getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
1717
1818
1919 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
2020
2121
2222 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
2323
2424
2525 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
2626
2727
2828 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
2929
3030
3131 func keyFactoryAddress () = "%s%s__config__factoryAddress"
3232
3333
3434 let IdxFactoryCfgStakingDapp = 1
3535
3636 let IdxFactoryCfgBoostingDapp = 2
3737
3838 let IdxFactoryCfgIdoDapp = 3
3939
4040 let IdxFactoryCfgTeamDapp = 4
4141
4242 let IdxFactoryCfgEmissionDapp = 5
4343
4444 let IdxFactoryCfgRestDapp = 6
4545
4646 let IdxFactoryCfgSlippageDapp = 7
4747
4848 func keyFactoryCfg () = "%s__factoryConfig"
4949
5050
5151 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
5252
5353
5454 func keyFactoryLpList () = "%s__lpTokensList"
5555
5656
5757 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
5858
5959
6060 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
6161
6262
6363 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress()))
6464
6565
6666 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
6767
6868
6969 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
7070
7171
7272 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
7373
7474
7575 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
7676
7777
7878 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
7979
8080
8181 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
8282
8383
8484 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
8585
8686
8787 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
8888
8989
9090 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
9191
9292
9393 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
9494
9595
9696 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
9797
9898
9999 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
100100
101101
102102 func keyClaimedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
103103
104104
105105 func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed", "total", lpAssetIdStr], SEP)
106106
107107
108108 func readStaked (key) = valueOrElse(getInteger(this, key), 0)
109109
110110
111111 func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP)
112112
113113
114114 func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP)
115115
116116
117117 func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP)
118118
119119
120120 func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP)
121121
122122
123123 func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP)
124124
125125
126126 func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP)
127127
128128
129129 func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP)
130130
131131
132132 func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP)
133133
134134
135135 func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP)
136136
137137
138138 func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP)
139139
140140
141141 func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP)
142142
143143
144144 func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP)
145145
146146
147147 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
148148
149149
150150 func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP)
151151
152152
153153 func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount))
154154
155155
156156 let factoryContract = readFactoryAddressOrFail()
157157
158158 let factoryCfg = readFactoryCfgOrFail(factoryContract)
159159
160160 let emissionContract = getEmissionAddressOrFail(factoryCfg)
161161
162162 func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == 0))
163163 then (stakedByUser > 0)
164164 else false)
165165 then 0
166166 else if ((stakedByUser == 0))
167167 then wxPerLpIntegralNew
168168 else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > 0))
169169 then (stakedByUser > 0)
170170 else false)
171171 then getIntOrFail(this, wxPerLpIntegralUserLastKEY)
172172 else throw("calcWxPerLpIntegralUserLast: unexpected state")
173173
174174
175175 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
176176 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
177177 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
178178 let stakedByUser = readStaked(stakedByUserKEY)
179179 let stakedTotal = readStaked(stakedTotalKEY)
180180 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
181181 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
182182 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
183183 let poolWxEmissionPerBlock = fraction(wxEmissionPerBlock, poolWeight, POOLWEIGHTMULT)
184184 let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr)
185185 let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr)
186186 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
187187 let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr)
188188 let wxPerLpKEY = keyWxPerLp(lpAssetIdStr)
189189 let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr)
190190 let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock)
191191 let wxPerLpIntegral = getIntOrZero(this, wxPerLpIntegralKEY)
192192 let wxToClaimUser = getIntOrZero(this, wxToClaimUserKEY)
193193 let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY)
194194 let wxPerLpOrZero = getIntOrZero(this, wxPerLpKEY)
195195 let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0])
196196 let wxPerLp = if ((wxPerLpOrZero != 0))
197197 then wxPerLpOrZero
198198 else fraction(poolWxEmissionPerBlock, MULT8, stakedTotal)
199199 let stakedTotalNew = (stakedTotal + lpDeltaAmount)
200200 let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLp * dh))
201201 let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(stakedByUser, wxPerLpIntegralUserLastUpdHeightOrZero, wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
202202 let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), stakedByUser, MULT8))
203203 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
204204 let wxPerLpNew = (poolWxEmissionPerBlock / stakedTotalNew)
205205 let wxPerLpIntegralLastUpdHeightNew = height
206206 let wxPerLpIntegralUserLastUpdHeightNew = height
207207 let debug = makeString([toString(wxToClaimUserNew), toString(wxPerLpIntegralNew), toString(wxPerLpIntegralUserLast), toString(stakedByUser), toString(dh), toString(wxPerLp), toString(stakedTotal), toString(poolWxEmissionPerBlock), toString(wxEmissionPerBlock), toString(poolWeight), toString(height)], "::")
208208 $Tuple3(wxToClaimUserNew, [IntegerEntry(wxPerLpIntegralKEY, wxPerLpIntegralNew), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), IntegerEntry(wxToClaimUserKEY, wxToClaimUserNew), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), IntegerEntry(wxPerLpKEY, wxPerLpNew), IntegerEntry(wxPerLpIntegralUserLastKEY, wxPerLpIntegralUserLastNew)], debug)
209209 }
210210
211211
212212 @Callable(i)
213213 func constructor (factoryAddressStr) = if ((i.caller != this))
214214 then throw("not authorized")
215215 else [StringEntry(keyFactoryAddress(), factoryAddressStr)]
216216
217217
218218
219219 @Callable(i)
220220 func stake () = if ((size(i.payments) != 1))
221221 then throw("invalid payment - exact one payment must be attached")
222222 else {
223223 let pmt = i.payments[0]
224224 let lpAssetId = value(pmt.assetId)
225225 let lpAssetIdStr = toBase58String(lpAssetId)
226226 let amount = pmt.amount
227227 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
228228 let callerStr = toString(i.caller)
229229 let userAddressStr = if ((callerStr == poolAddressStr))
230230 then toString(i.originCaller)
231231 else callerStr
232232 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
233233 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
234234 let stakedByUser = readStaked(stakedByUserKEY)
235235 let stakedTotal = readStaked(stakedTotalKEY)
236236 let $t01127211389 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
237237 let wxToClaimUserNew = $t01127211389._1
238238 let integralSTATE = $t01127211389._2
239239 let debug = $t01127211389._3
240-[IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)]
240+ ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE)
241241 }
242242
243243
244244
245245 @Callable(i)
246246 func unstake (lpAssetIdStr,amount) = {
247247 let userAddressStr = toString(i.caller)
248248 let lpAssetId = fromBase58String(lpAssetIdStr)
249249 if (!(isDefined(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)))))
250250 then throw(("unsupported lp asset " + lpAssetIdStr))
251251 else {
252252 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
253253 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
254254 let stakedByUser = readStaked(stakedByUserKEY)
255255 let stakedTotal = readStaked(stakedTotalKEY)
256256 if ((amount > stakedByUser))
257257 then throw("passed amount is less then available")
258258 else [IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)]
259259 }
260260 }
261261
262262
263263
264264 @Callable(i)
265265 func claimWx (lpAssetIdStr) = {
266266 let userAddressStr = toString(i.caller)
267267 if (!(isDefined(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)))))
268268 then throw(("unsupported lp asset " + lpAssetIdStr))
269269 else {
270270 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
271271 let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
272272 throw("temporary disabled")
273273 }
274274 }
275275
276276
277277
278278 @Callable(i)
279279 func claimWxREADONLY (lpAssetIdStr,userAddressStr) = {
280280 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
281281 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
282282 let stakedByUser = readStaked(stakedByUserKEY)
283283 let stakedTotal = readStaked(stakedTotalKEY)
284284 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
285285 let poolWeightMult = MULT8
286286 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
287287 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
288288 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
289289 let passedBlocks = if ((emissionStartBlock > height))
290290 then 0
291291 else (height - emissionStartBlock)
292292 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, poolWeightMult)
293293 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
294- let $t01389814010 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
295- let wxToClaimUserNew = $t01389814010._1
296- let integralSTATE = $t01389814010._2
297- let debug = $t01389814010._3
294+ let $t01389614008 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
295+ let wxToClaimUserNew = $t01389614008._1
296+ let integralSTATE = $t01389614008._2
297+ let debug = $t01389614008._3
298298 $Tuple2(nil, makeString(["%s%s%d%d%s", lpAssetIdStr, userAddressStr, toString(userWxReward), "0", debug], SEP))
299299 }
300300
301301

github/deemru/w8io/026f985 
51.67 ms