tx · 2qRzKZdmurowyBEXEwxVC2au5ZwaH61iEi2Ddcc7neey

3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN:  -0.03700000 Waves

2023.05.23 14:28 [2590562] smart account 3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN > SELF 0.00000000 Waves

{ "type": 13, "id": "2qRzKZdmurowyBEXEwxVC2au5ZwaH61iEi2Ddcc7neey", "fee": 3700000, "feeAssetId": null, "timestamp": 1684841333903, "version": 2, "chainId": 84, "sender": "3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN", "senderPublicKey": "HHCdafdi3D2htEYJw8cBoNYC8w76euLWKYENK4kanmGM", "proofs": [ "3SY3pentYxwdRKvQqC8s3iZQv6t51hULXeMj6s68NYThH7TL2ejBMBkRoWpVgtpCrwMTSzmpGUAybwWcQhD2ugbn" ], "script": "base64:BgI1CAISABIFCgMICAESABIDCgEBEgASABIAEgMKAQESAwoBARIAEgASAwoBCBIDCgEIEgMKAQhfAA1rX3RvdGFsU3VwcGx5Ag1rX3RvdGFsU3VwcGx5AA9rX3Jld2FyZEJhbGFuY2UCD2tfcmV3YXJkQmFsYW5jZQAPa19sb2NrZWRCYWxhbmNlAg9rX2xvY2tlZEJhbGFuY2UADWtfZnJlZUJhbGFuY2UCDWtfZnJlZUJhbGFuY2UAD2tfZXhjZXNzQmFsYW5jZQIPa19leGNlc3NCYWxhbmNlAAxrX3ZhdWx0QXNzZXQCDGtfdmF1bHRBc3NldAAUa192YXVsdEFzc2V0RGVjaW1hbHMCFGtfdmF1bHRBc3NldERlY2ltYWxzABRrX21heFNwb3RVdGlsaXphdGlvbgIUa19tYXhTcG90VXRpbGl6YXRpb24ABmtfcmF0ZQIGa19yYXRlABBrX2xhc3RVcGRhdGVUaW1lAhBrX2xhc3RVcGRhdGVUaW1lABZrX3Jld2FyZFBlclRva2VuU3RvcmVkAhZrX3Jld2FyZFBlclRva2VuU3RvcmVkAAxrX3Jld2FyZFJhdGUCDGtfcm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kzCthDYWNRLvfsHSH7W Next: DCzuVn8JPmDJ7YBHy4bXwgg8XT1ndW5FWkzccwFwzhNY Diff:
OldNewDifferences
329329
330330
331331 @Callable(i)
332+func migrate () = if ((i.caller != adminAddress()))
333+ then throw("Invalid migrate parameters")
334+ else {
335+ let _vaultAsset = toBase58String(quoteAsset())
336+ let assetDecimals = if ((_vaultAsset == "WAVES"))
337+ then 8
338+ else {
339+ let info = valueOrErrorMessage(assetInfo(fromBase58String(_vaultAsset)), ("Invalid token id: " + _vaultAsset))
340+ info.decimals
341+ }
342+[StringEntry(k_vaultAsset, _vaultAsset), IntegerEntry(k_vaultAssetDecimals, assetDecimals), IntegerEntry(k_maxSpotUtilization, 0)]
343+ }
344+
345+
346+
347+@Callable(i)
332348 func initialize (_coordinator,_vaultAsset,_maxSpotUtilization) = if (if (if (if (initialized())
333349 then true
334350 else (i.caller != this))
360376 else !(initialized()))
361377 then throw("Invalid call to stake")
362378 else {
363- let $t01253712766 = updateReward(_staker, 0)
364- let newRewardPerTokenStored = $t01253712766._1
365- let newLastUpdateTime = $t01253712766._2
366- let stakerEarned = $t01253712766._3
367- let stakerRewardPerTokenPaid = $t01253712766._4
379+ let $t01314713376 = updateReward(_staker, 0)
380+ let newRewardPerTokenStored = $t01314713376._1
381+ let newLastUpdateTime = $t01314713376._2
382+ let stakerEarned = $t01314713376._3
383+ let stakerRewardPerTokenPaid = $t01314713376._4
368384 let currentRate = rate()
369385 let prevAverageRate = averageRate(_staker)
370386 let vAmount = divd(_amount, currentRate)
391407 else !(initialized()))
392408 then throw("Invalid call to unStake")
393409 else {
394- let $t01427414490 = updateReward(_staker, 0)
395- let newRewardPerTokenStored = $t01427414490._1
396- let newLastUpdateTime = $t01427414490._2
397- let stakerEarned = $t01427414490._3
398- let stakerRewardPerTokenPaid = $t01427414490._4
399- let $t01449714664 = getWithdrawLimitLeft(_staker)
400- let newLastWithdrawnDate = $t01449714664._1
401- let withdrawLimitLeft = $t01449714664._2
402- let alreadyWithdrawnInPeriod = $t01449714664._3
410+ let $t01488415100 = updateReward(_staker, 0)
411+ let newRewardPerTokenStored = $t01488415100._1
412+ let newLastUpdateTime = $t01488415100._2
413+ let stakerEarned = $t01488415100._3
414+ let stakerRewardPerTokenPaid = $t01488415100._4
415+ let $t01510715274 = getWithdrawLimitLeft(_staker)
416+ let newLastWithdrawnDate = $t01510715274._1
417+ let withdrawLimitLeft = $t01510715274._2
418+ let alreadyWithdrawnInPeriod = $t01510715274._3
403419 let vAmount = divd(amountOfQuoteAsset, rate())
404420 if ((vAmount > withdrawLimitLeft))
405421 then throw("Invalid call to unStake: withdraw over limit")
422438 @Callable(i)
423439 func withdrawRewards () = {
424440 let _staker = toString(i.caller)
425- let $t01618116326 = updateReward(_staker, 0)
426- let newRewardPerTokenStored = $t01618116326._1
427- let newLastUpdateTime = $t01618116326._2
428- let stakerEarned = $t01618116326._3
429- let stakerRewardPerTokenPaid = $t01618116326._4
441+ let $t01679116936 = updateReward(_staker, 0)
442+ let newRewardPerTokenStored = $t01679116936._1
443+ let newLastUpdateTime = $t01679116936._2
444+ let stakerEarned = $t01679116936._3
445+ let stakerRewardPerTokenPaid = $t01679116936._4
430446 if (if ((0 >= stakerEarned))
431447 then true
432448 else !(initialized()))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let k_totalSupply = "k_totalSupply"
55
66 let k_rewardBalance = "k_rewardBalance"
77
88 let k_lockedBalance = "k_lockedBalance"
99
1010 let k_freeBalance = "k_freeBalance"
1111
1212 let k_excessBalance = "k_excessBalance"
1313
1414 let k_vaultAsset = "k_vaultAsset"
1515
1616 let k_vaultAssetDecimals = "k_vaultAssetDecimals"
1717
1818 let k_maxSpotUtilization = "k_maxSpotUtilization"
1919
2020 let k_rate = "k_rate"
2121
2222 let k_lastUpdateTime = "k_lastUpdateTime"
2323
2424 let k_rewardPerTokenStored = "k_rewardPerTokenStored"
2525
2626 let k_rewardRate = "k_rewardRate"
2727
2828 let k_periodFinish = "k_periodFinish"
2929
3030 let k_userRewardPerToken = "k_userRewardPerToken"
3131
3232 let k_userReward = "k_userReward"
3333
3434 let k_balance = "k_balance"
3535
3636 let k_average_rate = "k_average_rate"
3737
3838 let k_withdraw_limit = "k_withdraw_limit"
3939
4040 let k_last_withdraw_date = "k_last_withdraw_date"
4141
4242 let k_withdraw_in_period = "k_withdraw_in_period"
4343
4444 let k_initialized = "k_initialized"
4545
4646 let k_coordinatorAddress = "k_coordinatorAddress"
4747
4848 let k_amm = "k_amm"
4949
5050 let k_governance_asset = "k_gov_asset"
5151
5252 let k_quote_asset = "k_quote_asset"
5353
5454 let k_admin_address = "k_admin_address"
5555
5656 let k_manager_address = "k_manager_address"
5757
5858 let k_spot_address = "k_spot_address"
5959
6060 let k_collateral_address = "k_collateral_address"
6161
6262 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
6363
6464
6565 func coordinator () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, k_coordinatorAddress), "Coordinator not set")), "Coordinator address invalid")
6666
6767
6868 func adminAddress () = addressFromString(valueOrErrorMessage(getString(coordinator(), k_admin_address), "Admin address not set"))
6969
7070
7171 func isWhitelist (_address) = valueOrElse(getBoolean(coordinator(), toCompositeKey(k_amm, _address)), false)
7272
7373
7474 func governanceAsset () = fromBase58String(valueOrErrorMessage(getString(coordinator(), k_governance_asset), "Governance asset not set"))
7575
7676
7777 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
7878
7979
8080 func vaultAssetStr () = valueOrErrorMessage(getString(this, k_vaultAsset), "Vault asset not set")
8181
8282
8383 func vaultAsset () = {
8484 let _assetIdStr = vaultAssetStr()
8585 if ((_assetIdStr == "WAVES"))
8686 then unit
8787 else fromBase58String(_assetIdStr)
8888 }
8989
9090
9191 func vaultAssetDecimals () = valueOrErrorMessage(getInteger(this, k_vaultAssetDecimals), "Vault asset decimals not set")
9292
9393
9494 func managerAddress () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(coordinator(), k_manager_address), "Manager address not set")), "Manager address invalid")
9595
9696
9797 let DECIMAL_UNIT = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10))
9898
9999 let DURATION = (((7 * 60) * 60) * 24)
100100
101101 let NO_ADDRESS = ""
102102
103103 let NO_STAKER = 0
104104
105105 func assetFromDecimals (_amount) = {
106106 let assetDecimals = vaultAssetDecimals()
107107 if ((assetDecimals == 6))
108108 then (_amount / 100)
109109 else if ((assetDecimals == 8))
110110 then _amount
111111 else throw("Invalid asset decimals")
112112 }
113113
114114
115115 func assetToDecimals (_amount) = {
116116 let assetDecimals = vaultAssetDecimals()
117117 if ((assetDecimals == 6))
118118 then (_amount * 100)
119119 else if ((assetDecimals == 8))
120120 then _amount
121121 else throw("Invalid asset decimals")
122122 }
123123
124124
125125 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
126126
127127
128128 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
129129
130130
131131 func abs (_x) = if ((_x > 0))
132132 then _x
133133 else -(_x)
134134
135135
136136 func minv (_x,_y) = if ((_x > _y))
137137 then _y
138138 else _x
139139
140140
141141 let WITHDRAW_PERIOD = (86400 * 1000)
142142
143143 let WITHDRAW_PER_PERIOD = divd((1 * DECIMAL_UNIT), (4 * DECIMAL_UNIT))
144144
145145 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
146146
147147
148148 func int0 (k) = valueOrElse(getInteger(this, k), 0)
149149
150150
151151 func int1 (k) = valueOrElse(getInteger(this, k), DECIMAL_UNIT)
152152
153153
154154 func totalSupply () = int0(k_totalSupply)
155155
156156
157157 func rate () = int1(k_rate)
158158
159159
160160 func balanceOf (_staker) = int0(toCompositeKey(k_balance, _staker))
161161
162162
163163 func averageRate (_staker) = int0(toCompositeKey(k_average_rate, _staker))
164164
165165
166166 func withdrawLimit (_staker) = int0(toCompositeKey(k_withdraw_limit, _staker))
167167
168168
169169 func withdrawnInPeriod (_staker) = int0(toCompositeKey(k_withdraw_in_period, _staker))
170170
171171
172172 func lastWithdrawnDate (_staker) = int0(toCompositeKey(k_last_withdraw_date, _staker))
173173
174174
175175 func freeBalance () = int0(k_freeBalance)
176176
177177
178178 func lockedBalance () = int0(k_lockedBalance)
179179
180180
181181 func excessBalance () = int0(k_excessBalance)
182182
183183
184184 func rewardPerTokenStored () = int0(k_rewardPerTokenStored)
185185
186186
187187 func lastUpdateTime () = int0(k_lastUpdateTime)
188188
189189
190190 func rewardRate () = int0(k_rewardRate)
191191
192192
193193 func periodFinish () = int0(k_periodFinish)
194194
195195
196196 func rewardBalance () = int0(k_rewardBalance)
197197
198198
199199 func rewards (_staker) = int0(toCompositeKey(k_userReward, _staker))
200200
201201
202202 func userRewardPerTokenPaid (_staker) = int0(toCompositeKey(k_userRewardPerToken, _staker))
203203
204204
205205 func maxSpotUtilization () = int0(k_maxSpotUtilization)
206206
207207
208208 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
209209
210210
211211 func currentTimestamp () = lastBlock.timestamp
212212
213213
214214 func currentTimestampSec () = (currentTimestamp() / 1000)
215215
216216
217217 func getWithdrawLimitLeft (_staker) = {
218218 let currentDate = currentTimestamp()
219219 let lastWithdrawDate = lastWithdrawnDate(_staker)
220220 let $t062676588 = if (((currentDate - lastWithdrawDate) > WITHDRAW_PERIOD))
221221 then $Tuple3(currentDate, withdrawLimit(_staker), 0)
222222 else $Tuple3(lastWithdrawDate, (withdrawLimit(_staker) - withdrawnInPeriod(_staker)), withdrawnInPeriod(_staker))
223223 let newLastWithdrawnDate = $t062676588._1
224224 let withdrawLimitLeft = $t062676588._2
225225 let alreadyWithdrawnInPeriod = $t062676588._3
226226 $Tuple3(newLastWithdrawnDate, withdrawLimitLeft, alreadyWithdrawnInPeriod)
227227 }
228228
229229
230230 func computeNewRate (_amountOfQuoteAsset) = {
231231 let newRate = if ((totalSupply() > 0))
232232 then divd((freeBalance() + _amountOfQuoteAsset), totalSupply())
233233 else DECIMAL_UNIT
234234 newRate
235235 }
236236
237237
238238 func lastTimeRewardApplicable () = minv(currentTimestampSec(), periodFinish())
239239
240240
241241 func rewardPerToken (_balanceDelta) = if (((totalSupply() + _balanceDelta) == 0))
242242 then rewardPerTokenStored()
243243 else {
244244 let timeInterval = (lastTimeRewardApplicable() - lastUpdateTime())
245245 let actualTimeInterval = if ((0 > timeInterval))
246246 then 0
247247 else timeInterval
248248 let diff = divd((rewardRate() * actualTimeInterval), (totalSupply() + _balanceDelta))
249249 (rewardPerTokenStored() + diff)
250250 }
251251
252252
253253 func earned (_staker,_balanceDelta) = {
254254 let rewardDelta = (rewardPerToken(_balanceDelta) - userRewardPerTokenPaid(_staker))
255255 (muld((balanceOf(_staker) + _balanceDelta), rewardDelta) + rewards(_staker))
256256 }
257257
258258
259259 func updateReward (_staker,_balanceDelta) = {
260260 let newRewardPerTokenStored = rewardPerToken(_balanceDelta)
261261 let newLastUpdateTime = currentTimestampSec()
262262 let $t078108002 = if ((_staker != ""))
263263 then $Tuple2(earned(_staker, _balanceDelta), newRewardPerTokenStored)
264264 else $Tuple2(0, 0)
265265 let stakerEarned = $t078108002._1
266266 let stakerRewardPerTokenPaid = $t078108002._2
267267 $Tuple4(newRewardPerTokenStored, newLastUpdateTime, stakerEarned, stakerRewardPerTokenPaid)
268268 }
269269
270270
271271 func updateUserBalance (_user,_change) = if (((balanceOf(_user) + _change) >= 0))
272272 then [IntegerEntry(toCompositeKey(k_balance, _user), (balanceOf(_user) + _change))]
273273 else throw(((("Vault: can not update user balance. Balance: " + toString(balanceOf(_user))) + " change: ") + toString(_change)))
274274
275275
276276 func setUserWithdrawLimit (_user,_rate) = [IntegerEntry(toCompositeKey(k_withdraw_limit, _user), _rate)]
277277
278278
279279 func setUserAverageRate (_user,_rate) = [IntegerEntry(toCompositeKey(k_average_rate, _user), _rate)]
280280
281281
282282 func updateFreeBalance (_change) = {
283283 let balance = freeBalance()
284284 if (((balance + _change) >= 0))
285285 then [IntegerEntry(k_freeBalance, (balance + _change))]
286286 else throw(((("Vault: can not update free balance. Balance: " + toString(balance)) + " change: ") + toString(_change)))
287287 }
288288
289289
290290 func updateLockedBalance (_change) = {
291291 let balance = lockedBalance()
292292 if (((balance + _change) >= 0))
293293 then [IntegerEntry(k_lockedBalance, (balance + _change))]
294294 else throw(((("Vault: can not update locked balance. Balance: " + toString(balance)) + " change: ") + toString(_change)))
295295 }
296296
297297
298298 func updateExcessBalance (_change) = {
299299 let newImbalance = (excessBalance() + _change)
300300 let utilizationRate = divd(abs(newImbalance), freeBalance())
301301 if ((maxSpotUtilization() > utilizationRate))
302302 then [IntegerEntry(k_excessBalance, newImbalance)]
303303 else throw(((((((("Vault: can not update excess balance. Balance: " + toString(excessBalance())) + " change: ") + toString(_change)) + " utilization rate: ") + toString(utilizationRate)) + " max utilization rate: ") + toString(maxSpotUtilization())))
304304 }
305305
306306
307307 func updateTotalSupply (_change) = [IntegerEntry(k_totalSupply, (totalSupply() + _change))]
308308
309309
310310 func updateRate (_rate) = [IntegerEntry(k_rate, _rate)]
311311
312312
313313 func setUserWithdrawParams (_user,_lastWithdrawDate,_withdrawn) = [IntegerEntry(toCompositeKey(k_last_withdraw_date, _user), _lastWithdrawDate), IntegerEntry(toCompositeKey(k_withdraw_in_period, _user), _withdrawn)]
314314
315315
316316 func updateRewardBalance (_delta) = [IntegerEntry(k_rewardBalance, (rewardBalance() + _delta))]
317317
318318
319319 func updateRewardRate (_rewardRate) = [IntegerEntry(k_rewardRate, _rewardRate)]
320320
321321
322322 func updateTime (_lastUpdateTime,_periodFinish) = [IntegerEntry(k_lastUpdateTime, _lastUpdateTime), IntegerEntry(k_periodFinish, _periodFinish)]
323323
324324
325325 func updateRewardPerTokenStored (_rewardPerTokenStored) = [IntegerEntry(k_rewardPerTokenStored, _rewardPerTokenStored)]
326326
327327
328328 func updateUserRewards (_staker,_reward,_userRewardPerToken) = [IntegerEntry(toCompositeKey(k_userReward, _staker), _reward), IntegerEntry(toCompositeKey(k_userRewardPerToken, _staker), _userRewardPerToken)]
329329
330330
331331 @Callable(i)
332+func migrate () = if ((i.caller != adminAddress()))
333+ then throw("Invalid migrate parameters")
334+ else {
335+ let _vaultAsset = toBase58String(quoteAsset())
336+ let assetDecimals = if ((_vaultAsset == "WAVES"))
337+ then 8
338+ else {
339+ let info = valueOrErrorMessage(assetInfo(fromBase58String(_vaultAsset)), ("Invalid token id: " + _vaultAsset))
340+ info.decimals
341+ }
342+[StringEntry(k_vaultAsset, _vaultAsset), IntegerEntry(k_vaultAssetDecimals, assetDecimals), IntegerEntry(k_maxSpotUtilization, 0)]
343+ }
344+
345+
346+
347+@Callable(i)
332348 func initialize (_coordinator,_vaultAsset,_maxSpotUtilization) = if (if (if (if (initialized())
333349 then true
334350 else (i.caller != this))
335351 then true
336352 else (0 > _maxSpotUtilization))
337353 then true
338354 else (_maxSpotUtilization > DECIMAL_UNIT))
339355 then throw("Unable to initialize")
340356 else {
341357 let assetDecimals = if ((_vaultAsset == "WAVES"))
342358 then 8
343359 else {
344360 let info = valueOrErrorMessage(assetInfo(fromBase58String(_vaultAsset)), ("Invalid token id: " + _vaultAsset))
345361 info.decimals
346362 }
347363 [StringEntry(k_coordinatorAddress, toString(valueOrErrorMessage(addressFromString(_coordinator), "Invalid coordinator address"))), StringEntry(k_vaultAsset, _vaultAsset), IntegerEntry(k_vaultAssetDecimals, assetDecimals), IntegerEntry(k_maxSpotUtilization, _maxSpotUtilization), BooleanEntry(k_initialized, true)]
348364 }
349365
350366
351367
352368 @Callable(i)
353369 func stake () = {
354370 let _staker = toString(i.caller)
355371 let _amount = assetToDecimals(i.payments[0].amount)
356372 if (if (if ((i.payments[0].assetId != vaultAsset()))
357373 then true
358374 else (size(i.payments) != 1))
359375 then true
360376 else !(initialized()))
361377 then throw("Invalid call to stake")
362378 else {
363- let $t01253712766 = updateReward(_staker, 0)
364- let newRewardPerTokenStored = $t01253712766._1
365- let newLastUpdateTime = $t01253712766._2
366- let stakerEarned = $t01253712766._3
367- let stakerRewardPerTokenPaid = $t01253712766._4
379+ let $t01314713376 = updateReward(_staker, 0)
380+ let newRewardPerTokenStored = $t01314713376._1
381+ let newLastUpdateTime = $t01314713376._2
382+ let stakerEarned = $t01314713376._3
383+ let stakerRewardPerTokenPaid = $t01314713376._4
368384 let currentRate = rate()
369385 let prevAverageRate = averageRate(_staker)
370386 let vAmount = divd(_amount, currentRate)
371387 let newAverageRate = divd((muld(vAmount, currentRate) + muld(balanceOf(_staker), prevAverageRate)), (vAmount + balanceOf(_staker)))
372388 let newTotalBalance = (vAmount + balanceOf(_staker))
373389 let newWithdrawLimit = muld(newTotalBalance, WITHDRAW_PER_PERIOD)
374390 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
375391 if ((stake == stake))
376392 then (((((((updateUserRewards(_staker, stakerEarned, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateFreeBalance(_amount)) ++ updateUserBalance(_staker, vAmount)) ++ setUserAverageRate(_staker, newAverageRate)) ++ setUserWithdrawLimit(_staker, newWithdrawLimit)) ++ updateTotalSupply(vAmount))
377393 else throw("Strict value is not equal to itself.")
378394 }
379395 }
380396
381397
382398
383399 @Callable(i)
384400 func unStake (_amount) = {
385401 let _staker = toString(i.caller)
386402 let amountOfQuoteAsset = assetToDecimals(_amount)
387403 if (if (if ((i.payments != nil))
388404 then true
389405 else (0 >= amountOfQuoteAsset))
390406 then true
391407 else !(initialized()))
392408 then throw("Invalid call to unStake")
393409 else {
394- let $t01427414490 = updateReward(_staker, 0)
395- let newRewardPerTokenStored = $t01427414490._1
396- let newLastUpdateTime = $t01427414490._2
397- let stakerEarned = $t01427414490._3
398- let stakerRewardPerTokenPaid = $t01427414490._4
399- let $t01449714664 = getWithdrawLimitLeft(_staker)
400- let newLastWithdrawnDate = $t01449714664._1
401- let withdrawLimitLeft = $t01449714664._2
402- let alreadyWithdrawnInPeriod = $t01449714664._3
410+ let $t01488415100 = updateReward(_staker, 0)
411+ let newRewardPerTokenStored = $t01488415100._1
412+ let newLastUpdateTime = $t01488415100._2
413+ let stakerEarned = $t01488415100._3
414+ let stakerRewardPerTokenPaid = $t01488415100._4
415+ let $t01510715274 = getWithdrawLimitLeft(_staker)
416+ let newLastWithdrawnDate = $t01510715274._1
417+ let withdrawLimitLeft = $t01510715274._2
418+ let alreadyWithdrawnInPeriod = $t01510715274._3
403419 let vAmount = divd(amountOfQuoteAsset, rate())
404420 if ((vAmount > withdrawLimitLeft))
405421 then throw("Invalid call to unStake: withdraw over limit")
406422 else {
407423 let newWithdrawnInPeriod = (alreadyWithdrawnInPeriod + vAmount)
408424 if ((amountOfQuoteAsset > freeBalance()))
409425 then throw("Invalid call to unStake: balance too low")
410426 else {
411427 let unstake = invoke(managerAddress(), "withdraw", [vaultAssetStr(), assetFromDecimals(amountOfQuoteAsset)], nil)
412428 if ((unstake == unstake))
413429 then (((((((updateUserRewards(_staker, stakerEarned, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateFreeBalance(-(amountOfQuoteAsset))) ++ updateUserBalance(_staker, -(vAmount))) ++ updateTotalSupply(-(vAmount))) ++ setUserWithdrawParams(_staker, newLastWithdrawnDate, newWithdrawnInPeriod)) ++ [ScriptTransfer(i.caller, assetFromDecimals(amountOfQuoteAsset), vaultAsset())])
414430 else throw("Strict value is not equal to itself.")
415431 }
416432 }
417433 }
418434 }
419435
420436
421437
422438 @Callable(i)
423439 func withdrawRewards () = {
424440 let _staker = toString(i.caller)
425- let $t01618116326 = updateReward(_staker, 0)
426- let newRewardPerTokenStored = $t01618116326._1
427- let newLastUpdateTime = $t01618116326._2
428- let stakerEarned = $t01618116326._3
429- let stakerRewardPerTokenPaid = $t01618116326._4
441+ let $t01679116936 = updateReward(_staker, 0)
442+ let newRewardPerTokenStored = $t01679116936._1
443+ let newLastUpdateTime = $t01679116936._2
444+ let stakerEarned = $t01679116936._3
445+ let stakerRewardPerTokenPaid = $t01679116936._4
430446 if (if ((0 >= stakerEarned))
431447 then true
432448 else !(initialized()))
433449 then throw("No reward: Vault")
434450 else ((((updateUserRewards(_staker, 0, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateRewardBalance(-(stakerEarned))) ++ [ScriptTransfer(i.caller, stakerEarned, governanceAsset())])
435451 }
436452
437453
438454
439455 @Callable(i)
440456 func addFree () = {
441457 let _amount = assetToDecimals(i.payments[0].amount)
442458 if (if (if (if ((i.payments[0].assetId != vaultAsset()))
443459 then true
444460 else (size(i.payments) != 1))
445461 then true
446462 else !(initialized()))
447463 then true
448464 else !(if (isWhitelist(toString(i.caller)))
449465 then true
450466 else (i.caller == adminAddress())))
451467 then throw("Invalid addFree params")
452468 else {
453469 let newRate = computeNewRate(_amount)
454470 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
455471 if ((stake == stake))
456472 then (updateFreeBalance(_amount) ++ updateRate(newRate))
457473 else throw("Strict value is not equal to itself.")
458474 }
459475 }
460476
461477
462478
463479 @Callable(i)
464480 func addLocked () = {
465481 let _amount = assetToDecimals(i.payments[0].amount)
466482 if (if (if (if ((i.payments[0].assetId != vaultAsset()))
467483 then true
468484 else (size(i.payments) != 1))
469485 then true
470486 else !(initialized()))
471487 then true
472488 else !(if (isWhitelist(toString(i.caller)))
473489 then true
474490 else (i.caller == adminAddress())))
475491 then throw("Invalid addLocked params")
476492 else {
477493 let unstake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
478494 if ((unstake == unstake))
479495 then updateLockedBalance(_amount)
480496 else throw("Strict value is not equal to itself.")
481497 }
482498 }
483499
484500
485501
486502 @Callable(i)
487503 func exchangeFreeAndLocked (_amount) = if (if (!(initialized()))
488504 then true
489505 else if (!(isWhitelist(toString(i.caller))))
490506 then (i.caller != adminAddress())
491507 else false)
492508 then throw("Invalid exchangeFreeAndLocked params")
493509 else {
494510 let amountOfQuoteAsset = assetToDecimals(_amount)
495511 let newRate = computeNewRate(-(amountOfQuoteAsset))
496512 ((updateLockedBalance(amountOfQuoteAsset) ++ updateFreeBalance(-(amountOfQuoteAsset))) ++ updateRate(newRate))
497513 }
498514
499515
500516
501517 @Callable(i)
502518 func withdrawLocked (_amount) = if (if (if (!(initialized()))
503519 then true
504520 else (0 >= _amount))
505521 then true
506522 else !(isWhitelist(toString(i.caller))))
507523 then throw("Invalid withdrawLocked params")
508524 else {
509525 let amountOfQuoteAsset = assetToDecimals(_amount)
510526 let unstake = invoke(managerAddress(), "withdraw", [vaultAssetStr(), assetFromDecimals(amountOfQuoteAsset)], nil)
511527 if ((unstake == unstake))
512528 then (updateLockedBalance(-(amountOfQuoteAsset)) ++ [ScriptTransfer(i.caller, assetFromDecimals(amountOfQuoteAsset), vaultAsset())])
513529 else throw("Strict value is not equal to itself.")
514530 }
515531
516532
517533
518534 @Callable(i)
519535 func addRewards () = if (if (if ((i.payments[0].assetId != governanceAsset()))
520536 then true
521537 else (size(i.payments) != 1))
522538 then true
523539 else !(initialized()))
524540 then throw("Invalid addRewards params")
525541 else {
526542 let _reward = i.payments[0].amount
527543 let newRewardPerTokenStored = updateReward(NO_ADDRESS, NO_STAKER)._1
528544 let timestamp = currentTimestampSec()
529545 let newRewardRate = if ((timestamp > periodFinish()))
530546 then (_reward / DURATION)
531547 else {
532548 let remainingTime = (periodFinish() - timestamp)
533549 let leftover = (rewardRate() * remainingTime)
534550 ((_reward + leftover) / DURATION)
535551 }
536552 (((updateRewardRate(newRewardRate) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateRewardBalance(_reward)) ++ updateTime(timestamp, (timestamp + DURATION)))
537553 }
538554
539555
540556
541557 @Callable(i)
542558 func ackRewards () = {
543559 let profitResp = invoke(managerAddress(), "claimProfit", [vaultAssetStr()], nil)
544560 if ((profitResp == profitResp))
545561 then {
546562 let profit = match profitResp {
547563 case p: Int =>
548564 assetToDecimals(p)
549565 case _ =>
550566 throw("Invalid claimProfit response")
551567 }
552568 let result = if ((profit > 0))
553569 then {
554570 let newRate = computeNewRate(profit)
555571 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(profit))])
556572 if ((stake == stake))
557573 then (updateFreeBalance(profit) ++ updateRate(newRate))
558574 else throw("Strict value is not equal to itself.")
559575 }
560576 else nil
561577 if ((result == result))
562578 then result
563579 else throw("Strict value is not equal to itself.")
564580 }
565581 else throw("Strict value is not equal to itself.")
566582 }
567583
568584
569585
570586 @Callable(i)
571587 func view_reward (_staker) = {
572588 let balance = balanceOf(_staker)
573589 let depositedAmount = muld(averageRate(_staker), balance)
574590 let currentAmount = muld(rate(), balance)
575591 let earnedQuote = (currentAmount - depositedAmount)
576592 throw(toString(earnedQuote))
577593 }
578594
579595
580596
581597 @Callable(i)
582598 func view_stakingReward (_staker) = {
583599 let stakerEarned = updateReward(_staker, 0)._3
584600 throw(toString(assetFromDecimals(stakerEarned)))
585601 }
586602
587603
588604
589605 @Callable(i)
590606 func view_withdrawLimit (_staker) = {
591607 let withdrawLimitLeft = getWithdrawLimitLeft(_staker)._2
592608 let limitInAsset = assetFromDecimals(muld(withdrawLimitLeft, rate()))
593609 throw(toString(limitInAsset))
594610 }
595611
596612
597613 @Verifier(tx)
598614 func verify () = {
599615 let coordinatorStr = getString(this, k_coordinatorAddress)
600616 if (isDefined(coordinatorStr))
601617 then {
602618 let admin = getString(addressFromStringValue(value(coordinatorStr)), k_admin_address)
603619 if (isDefined(admin))
604620 then valueOrElse(getBoolean(addressFromStringValue(value(admin)), ((("status_" + toString(this)) + "_") + toBase58String(tx.id))), false)
605621 else throw("unable to verify: admin not set in coordinator")
606622 }
607623 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
608624 }
609625

github/deemru/w8io/026f985 
70.27 ms