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