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