tx · 37j5GHYvnciKjeiEYLjeAJ3Pkf7TD5LQjEGmea7NEx3c

3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN:  -0.03700000 Waves

2023.06.24 13:14 [2636562] smart account 3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN > SELF 0.00000000 Waves

{ "type": 13, "id": "37j5GHYvnciKjeiEYLjeAJ3Pkf7TD5LQjEGmea7NEx3c", "fee": 3700000, "feeAssetId": null, "timestamp": 1687601680146, "version": 2, "chainId": 84, "sender": "3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN", "senderPublicKey": "HHCdafdi3D2htEYJw8cBoNYC8w76euLWKYENK4kanmGM", "proofs": [ "PNmMSkZ3sE7Turzau4otcqftdvkK4JoN1UmVZgWYjujoFu7nn6zoEowMGrVHZu8mVjcunSec5XzZMpfLMis3ihb" ], "script": "base64:BgJBCAISBQoDAQEEEgUKAwgIARIAEgMKAQESABIAEgASAwoBARIDCgEBEgMKAQESABIAEgASAwoBCBIDCgEIEgMKAQhlAA1rX3RvdGFsU3VwcGx5Ag1rX3RvdGFsU3VwcGx5AA9rX3Jld2FyZEJhbGFuY2UCD2tfcmV3YXJkQmFsYW5jZQAPa19sb2NrZWRCYWxhbmNlAg9rX2xvY2tlZEJhbGFuY2UADWtfZnJlZUJhbGFuY2UCDWtfZnJlZUJhbGFuY2UAD2tfZXhjZXNzQmFsYW5jZQIPa19leGNlc3NCYWxhbmNlAAxrX3ZhdWx0QXNzZXQCDGtfdmF1bHRBc3NldAAUa192YXVsdEFzc2V0RGVjaW1hbHMCFGtfdmF1bHRBc3NldERlY2ltYWxzABRrX21heFNwb3RVdGlsaXphdGlvbgIUa19tYXhTcG90VXRpbGl6YXRpb24AE2tfd2l0aGRyYXdQZXJQZXJpb2QCE2tfd2l0aGRyYXdQZXJQZXJpb2QAE2tfd2l0aGRyYXdVbmxpbWl0ZWQCE2tfd2l0aGRyYXdVbmxpbWl0ZWQABmtfcmF0ZQIGa19yYX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GluYXRvclN0cgkAnQgCBQR0aGlzBRRrX2Nvb3JkaW5hdG9yQWRkcmVzcwMJAQlpc0RlZmluZWQBBQ5jb29yZGluYXRvclN0cgQFYWRtaW4JAJ0IAgkBEUBleHRyTmF0aXZlKDEwNjIpAQkBBXZhbHVlAQUOY29vcmRpbmF0b3JTdHIFD2tfYWRtaW5fYWRkcmVzcwMJAQlpc0RlZmluZWQBBQVhZG1pbgkBC3ZhbHVlT3JFbHNlAgkAmwgCCQERQGV4dHJOYXRpdmUoMTA2MikBCQEFdmFsdWUBBQVhZG1pbgkArAICCQCsAgIJAKwCAgIHc3RhdHVzXwkApQgBBQR0aGlzAgFfCQDYBAEIBQJ0eAJpZAcJAAIBAi51bmFibGUgdG8gdmVyaWZ5OiBhZG1pbiBub3Qgc2V0IGluIGNvb3JkaW5hdG9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5Luc9Gw==", "height": 2636562, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5JLXz32PHBWVcFX4VkgRzYo1PPEm3P5fFUYyu75sxJJb Next: none Diff:
OldNewDifferences
1818 let k_maxSpotUtilization = "k_maxSpotUtilization"
1919
2020 let k_withdrawPerPeriod = "k_withdrawPerPeriod"
21+
22+let k_withdrawUnlimited = "k_withdrawUnlimited"
2123
2224 let k_rate = "k_rate"
2325
216218 func withdrawPerPeriod () = intOr(k_withdrawPerPeriod, WITHDRAW_PER_PERIOD)
217219
218220
221+func withdrawUnlimited () = valueOrElse(getBoolean(this, k_withdrawUnlimited), false)
222+
223+
219224 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
220225
221226
228233 func getWithdrawLimitLeft (_staker) = {
229234 let currentDate = currentTimestamp()
230235 let lastWithdrawDate = lastWithdrawnDate(_staker)
231- let $t064646785 = if (((currentDate - lastWithdrawDate) > WITHDRAW_PERIOD))
236+ let $t065997106 = if (((currentDate - lastWithdrawDate) > WITHDRAW_PERIOD))
232237 then $Tuple3(currentDate, withdrawLimit(_staker), 0)
233- else $Tuple3(lastWithdrawDate, (withdrawLimit(_staker) - withdrawnInPeriod(_staker)), withdrawnInPeriod(_staker))
234- let newLastWithdrawnDate = $t064646785._1
235- let withdrawLimitLeft = $t064646785._2
236- let alreadyWithdrawnInPeriod = $t064646785._3
238+ else {
239+ let _withdrawnInPeriod = withdrawnInPeriod(_staker)
240+ if (withdrawUnlimited())
241+ then $Tuple3(lastWithdrawDate, withdrawLimit(_staker), _withdrawnInPeriod)
242+ else $Tuple3(lastWithdrawDate, (withdrawLimit(_staker) - _withdrawnInPeriod), _withdrawnInPeriod)
243+ }
244+ let newLastWithdrawnDate = $t065997106._1
245+ let withdrawLimitLeft = $t065997106._2
246+ let alreadyWithdrawnInPeriod = $t065997106._3
237247 $Tuple3(newLastWithdrawnDate, withdrawLimitLeft, alreadyWithdrawnInPeriod)
238248 }
239249
270280 func updateReward (_staker,_balanceDelta) = {
271281 let newRewardPerTokenStored = rewardPerToken(_balanceDelta)
272282 let newLastUpdateTime = currentTimestampSec()
273- let $t080078199 = if ((_staker != ""))
283+ let $t083288520 = if ((_staker != ""))
274284 then $Tuple2(earned(_staker, _balanceDelta), newRewardPerTokenStored)
275285 else $Tuple2(0, 0)
276- let stakerEarned = $t080078199._1
277- let stakerRewardPerTokenPaid = $t080078199._2
286+ let stakerEarned = $t083288520._1
287+ let stakerRewardPerTokenPaid = $t083288520._2
278288 $Tuple4(newRewardPerTokenStored, newLastUpdateTime, stakerEarned, stakerRewardPerTokenPaid)
279289 }
280290
340350
341351
342352 @Callable(i)
343-func changeSettings (_maxSpotUtilization,_withdrawPerPeriod) = if (if (if (if (!(initialized()))
353+func changeSettings (_maxSpotUtilization,_withdrawPerPeriod,_withdrawUnlimited) = if (if (if (if (!(initialized()))
344354 then true
345355 else (i.caller != adminAddress()))
346356 then true
352362 then true
353363 else (_withdrawPerPeriod > DECIMAL_UNIT))
354364 then throw("Invalid changeSettings params")
355- else [IntegerEntry(k_maxSpotUtilization, _maxSpotUtilization), IntegerEntry(k_withdrawPerPeriod, _withdrawPerPeriod)]
365+ else [IntegerEntry(k_maxSpotUtilization, _maxSpotUtilization), IntegerEntry(k_withdrawPerPeriod, _withdrawPerPeriod), BooleanEntry(k_withdrawUnlimited, _withdrawUnlimited)]
356366
357367
358368
388398 else !(initialized()))
389399 then throw("Invalid call to stake")
390400 else {
391- let $t01327313502 = updateReward(_staker, 0)
392- let newRewardPerTokenStored = $t01327313502._1
393- let newLastUpdateTime = $t01327313502._2
394- let stakerEarned = $t01327313502._3
395- let stakerRewardPerTokenPaid = $t01327313502._4
401+ let $t01369013919 = updateReward(_staker, 0)
402+ let newRewardPerTokenStored = $t01369013919._1
403+ let newLastUpdateTime = $t01369013919._2
404+ let stakerEarned = $t01369013919._3
405+ let stakerRewardPerTokenPaid = $t01369013919._4
396406 let currentRate = rate()
397407 let prevAverageRate = averageRate(_staker)
398408 let vAmount = divd(_amount, currentRate)
426436 else !(initialized()))
427437 then throw("Invalid call to unStake")
428438 else {
429- let $t01509215308 = updateReward(_staker, 0)
430- let newRewardPerTokenStored = $t01509215308._1
431- let newLastUpdateTime = $t01509215308._2
432- let stakerEarned = $t01509215308._3
433- let stakerRewardPerTokenPaid = $t01509215308._4
434- let $t01531515482 = getWithdrawLimitLeft(_staker)
435- let newLastWithdrawnDate = $t01531515482._1
436- let withdrawLimitLeft = $t01531515482._2
437- let alreadyWithdrawnInPeriod = $t01531515482._3
439+ let $t01550915725 = updateReward(_staker, 0)
440+ let newRewardPerTokenStored = $t01550915725._1
441+ let newLastUpdateTime = $t01550915725._2
442+ let stakerEarned = $t01550915725._3
443+ let stakerRewardPerTokenPaid = $t01550915725._4
444+ let $t01573215899 = getWithdrawLimitLeft(_staker)
445+ let newLastWithdrawnDate = $t01573215899._1
446+ let withdrawLimitLeft = $t01573215899._2
447+ let alreadyWithdrawnInPeriod = $t01573215899._3
438448 let vAmount = divd(amountOfQuoteAsset, rate())
439449 if ((vAmount > withdrawLimitLeft))
440450 then throw("Invalid call to unStake: withdraw over limit")
464474 @Callable(i)
465475 func withdrawRewards () = {
466476 let _staker = toString(i.caller)
467- let $t01709217237 = updateReward(_staker, 0)
468- let newRewardPerTokenStored = $t01709217237._1
469- let newLastUpdateTime = $t01709217237._2
470- let stakerEarned = $t01709217237._3
471- let stakerRewardPerTokenPaid = $t01709217237._4
477+ let $t01750917654 = updateReward(_staker, 0)
478+ let newRewardPerTokenStored = $t01750917654._1
479+ let newLastUpdateTime = $t01750917654._2
480+ let stakerEarned = $t01750917654._3
481+ let stakerRewardPerTokenPaid = $t01750917654._4
472482 if (if ((0 >= stakerEarned))
473483 then true
474484 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_withdrawPerPeriod = "k_withdrawPerPeriod"
21+
22+let k_withdrawUnlimited = "k_withdrawUnlimited"
2123
2224 let k_rate = "k_rate"
2325
2426 let k_lastUpdateTime = "k_lastUpdateTime"
2527
2628 let k_rewardPerTokenStored = "k_rewardPerTokenStored"
2729
2830 let k_rewardRate = "k_rewardRate"
2931
3032 let k_periodFinish = "k_periodFinish"
3133
3234 let k_userRewardPerToken = "k_userRewardPerToken"
3335
3436 let k_userReward = "k_userReward"
3537
3638 let k_balance = "k_balance"
3739
3840 let k_average_rate = "k_average_rate"
3941
4042 let k_withdraw_limit = "k_withdraw_limit"
4143
4244 let k_last_withdraw_date = "k_last_withdraw_date"
4345
4446 let k_withdraw_in_period = "k_withdraw_in_period"
4547
4648 let k_initialized = "k_initialized"
4749
4850 let k_coordinatorAddress = "k_coordinatorAddress"
4951
5052 let k_amm = "k_amm"
5153
5254 let k_governance_asset = "k_gov_asset"
5355
5456 let k_quote_asset = "k_quote_asset"
5557
5658 let k_admin_address = "k_admin_address"
5759
5860 let k_manager_address = "k_manager_address"
5961
6062 let k_spot_address = "k_spot_address"
6163
6264 let k_collateral_address = "k_collateral_address"
6365
6466 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
6567
6668
6769 func coordinator () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, k_coordinatorAddress), "Coordinator not set")), "Coordinator address invalid")
6870
6971
7072 func adminAddress () = addressFromString(valueOrErrorMessage(getString(coordinator(), k_admin_address), "Admin address not set"))
7173
7274
7375 func isWhitelist (_address) = valueOrElse(getBoolean(coordinator(), toCompositeKey(k_amm, _address)), false)
7476
7577
7678 func spotAddress () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(coordinator(), k_spot_address), "Spot address not set")), "Spot address invalid")
7779
7880
7981 func governanceAsset () = fromBase58String(valueOrErrorMessage(getString(coordinator(), k_governance_asset), "Governance asset not set"))
8082
8183
8284 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
8385
8486
8587 func vaultAssetStr () = valueOrErrorMessage(getString(this, k_vaultAsset), "Vault asset not set")
8688
8789
8890 func vaultAsset () = {
8991 let _assetIdStr = vaultAssetStr()
9092 if ((_assetIdStr == "WAVES"))
9193 then unit
9294 else fromBase58String(_assetIdStr)
9395 }
9496
9597
9698 func vaultAssetDecimals () = valueOrErrorMessage(getInteger(this, k_vaultAssetDecimals), "Vault asset decimals not set")
9799
98100
99101 func managerAddress () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(coordinator(), k_manager_address), "Manager address not set")), "Manager address invalid")
100102
101103
102104 let DECIMAL_UNIT = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10))
103105
104106 let DURATION = (((7 * 60) * 60) * 24)
105107
106108 let NO_ADDRESS = ""
107109
108110 let NO_STAKER = 0
109111
110112 func assetFromDecimals (_amount) = {
111113 let assetDecimals = vaultAssetDecimals()
112114 if ((assetDecimals == 6))
113115 then (_amount / 100)
114116 else if ((assetDecimals == 8))
115117 then _amount
116118 else throw("Invalid asset decimals")
117119 }
118120
119121
120122 func assetToDecimals (_amount) = {
121123 let assetDecimals = vaultAssetDecimals()
122124 if ((assetDecimals == 6))
123125 then (_amount * 100)
124126 else if ((assetDecimals == 8))
125127 then _amount
126128 else throw("Invalid asset decimals")
127129 }
128130
129131
130132 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
131133
132134
133135 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
134136
135137
136138 func abs (_x) = if ((_x > 0))
137139 then _x
138140 else -(_x)
139141
140142
141143 func minv (_x,_y) = if ((_x > _y))
142144 then _y
143145 else _x
144146
145147
146148 let WITHDRAW_PERIOD = (86400 * 1000)
147149
148150 let WITHDRAW_PER_PERIOD = divd((1 * DECIMAL_UNIT), (4 * DECIMAL_UNIT))
149151
150152 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
151153
152154
153155 func int0 (k) = valueOrElse(getInteger(this, k), 0)
154156
155157
156158 func int1 (k) = valueOrElse(getInteger(this, k), DECIMAL_UNIT)
157159
158160
159161 func intOr (k,val) = valueOrElse(getInteger(this, k), val)
160162
161163
162164 func totalSupply () = int0(k_totalSupply)
163165
164166
165167 func rate () = int1(k_rate)
166168
167169
168170 func balanceOf (_staker) = int0(toCompositeKey(k_balance, _staker))
169171
170172
171173 func averageRate (_staker) = int0(toCompositeKey(k_average_rate, _staker))
172174
173175
174176 func withdrawLimit (_staker) = int0(toCompositeKey(k_withdraw_limit, _staker))
175177
176178
177179 func withdrawnInPeriod (_staker) = int0(toCompositeKey(k_withdraw_in_period, _staker))
178180
179181
180182 func lastWithdrawnDate (_staker) = int0(toCompositeKey(k_last_withdraw_date, _staker))
181183
182184
183185 func freeBalance () = int0(k_freeBalance)
184186
185187
186188 func lockedBalance () = int0(k_lockedBalance)
187189
188190
189191 func excessBalance () = int0(k_excessBalance)
190192
191193
192194 func rewardPerTokenStored () = int0(k_rewardPerTokenStored)
193195
194196
195197 func lastUpdateTime () = int0(k_lastUpdateTime)
196198
197199
198200 func rewardRate () = int0(k_rewardRate)
199201
200202
201203 func periodFinish () = int0(k_periodFinish)
202204
203205
204206 func rewardBalance () = int0(k_rewardBalance)
205207
206208
207209 func rewards (_staker) = int0(toCompositeKey(k_userReward, _staker))
208210
209211
210212 func userRewardPerTokenPaid (_staker) = int0(toCompositeKey(k_userRewardPerToken, _staker))
211213
212214
213215 func maxSpotUtilization () = int0(k_maxSpotUtilization)
214216
215217
216218 func withdrawPerPeriod () = intOr(k_withdrawPerPeriod, WITHDRAW_PER_PERIOD)
217219
218220
221+func withdrawUnlimited () = valueOrElse(getBoolean(this, k_withdrawUnlimited), false)
222+
223+
219224 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
220225
221226
222227 func currentTimestamp () = lastBlock.timestamp
223228
224229
225230 func currentTimestampSec () = (currentTimestamp() / 1000)
226231
227232
228233 func getWithdrawLimitLeft (_staker) = {
229234 let currentDate = currentTimestamp()
230235 let lastWithdrawDate = lastWithdrawnDate(_staker)
231- let $t064646785 = if (((currentDate - lastWithdrawDate) > WITHDRAW_PERIOD))
236+ let $t065997106 = if (((currentDate - lastWithdrawDate) > WITHDRAW_PERIOD))
232237 then $Tuple3(currentDate, withdrawLimit(_staker), 0)
233- else $Tuple3(lastWithdrawDate, (withdrawLimit(_staker) - withdrawnInPeriod(_staker)), withdrawnInPeriod(_staker))
234- let newLastWithdrawnDate = $t064646785._1
235- let withdrawLimitLeft = $t064646785._2
236- let alreadyWithdrawnInPeriod = $t064646785._3
238+ else {
239+ let _withdrawnInPeriod = withdrawnInPeriod(_staker)
240+ if (withdrawUnlimited())
241+ then $Tuple3(lastWithdrawDate, withdrawLimit(_staker), _withdrawnInPeriod)
242+ else $Tuple3(lastWithdrawDate, (withdrawLimit(_staker) - _withdrawnInPeriod), _withdrawnInPeriod)
243+ }
244+ let newLastWithdrawnDate = $t065997106._1
245+ let withdrawLimitLeft = $t065997106._2
246+ let alreadyWithdrawnInPeriod = $t065997106._3
237247 $Tuple3(newLastWithdrawnDate, withdrawLimitLeft, alreadyWithdrawnInPeriod)
238248 }
239249
240250
241251 func computeNewRate (_amountOfQuoteAsset) = {
242252 let newRate = if ((totalSupply() > 0))
243253 then divd((freeBalance() + _amountOfQuoteAsset), totalSupply())
244254 else DECIMAL_UNIT
245255 newRate
246256 }
247257
248258
249259 func lastTimeRewardApplicable () = minv(currentTimestampSec(), periodFinish())
250260
251261
252262 func rewardPerToken (_balanceDelta) = if (((totalSupply() + _balanceDelta) == 0))
253263 then rewardPerTokenStored()
254264 else {
255265 let timeInterval = (lastTimeRewardApplicable() - lastUpdateTime())
256266 let actualTimeInterval = if ((0 > timeInterval))
257267 then 0
258268 else timeInterval
259269 let diff = divd((rewardRate() * actualTimeInterval), (totalSupply() + _balanceDelta))
260270 (rewardPerTokenStored() + diff)
261271 }
262272
263273
264274 func earned (_staker,_balanceDelta) = {
265275 let rewardDelta = (rewardPerToken(_balanceDelta) - userRewardPerTokenPaid(_staker))
266276 (muld((balanceOf(_staker) + _balanceDelta), rewardDelta) + rewards(_staker))
267277 }
268278
269279
270280 func updateReward (_staker,_balanceDelta) = {
271281 let newRewardPerTokenStored = rewardPerToken(_balanceDelta)
272282 let newLastUpdateTime = currentTimestampSec()
273- let $t080078199 = if ((_staker != ""))
283+ let $t083288520 = if ((_staker != ""))
274284 then $Tuple2(earned(_staker, _balanceDelta), newRewardPerTokenStored)
275285 else $Tuple2(0, 0)
276- let stakerEarned = $t080078199._1
277- let stakerRewardPerTokenPaid = $t080078199._2
286+ let stakerEarned = $t083288520._1
287+ let stakerRewardPerTokenPaid = $t083288520._2
278288 $Tuple4(newRewardPerTokenStored, newLastUpdateTime, stakerEarned, stakerRewardPerTokenPaid)
279289 }
280290
281291
282292 func updateUserBalance (_user,_change) = if (((balanceOf(_user) + _change) >= 0))
283293 then [IntegerEntry(toCompositeKey(k_balance, _user), (balanceOf(_user) + _change))]
284294 else throw(((("Vault: can not update user balance. Balance: " + toString(balanceOf(_user))) + " change: ") + toString(_change)))
285295
286296
287297 func setUserWithdrawLimit (_user,_rate) = [IntegerEntry(toCompositeKey(k_withdraw_limit, _user), _rate)]
288298
289299
290300 func setUserAverageRate (_user,_rate) = [IntegerEntry(toCompositeKey(k_average_rate, _user), _rate)]
291301
292302
293303 func updateFreeBalance (_change) = {
294304 let balance = freeBalance()
295305 if (((balance + _change) >= 0))
296306 then [IntegerEntry(k_freeBalance, (balance + _change))]
297307 else throw(((("Vault: can not update free balance. Balance: " + toString(balance)) + " change: ") + toString(_change)))
298308 }
299309
300310
301311 func updateLockedBalance (_change) = {
302312 let balance = lockedBalance()
303313 if (((balance + _change) >= 0))
304314 then [IntegerEntry(k_lockedBalance, (balance + _change))]
305315 else throw(((("Vault: can not update locked balance. Balance: " + toString(balance)) + " change: ") + toString(_change)))
306316 }
307317
308318
309319 func updateExcessBalance (_change) = {
310320 let newImbalance = (excessBalance() + _change)
311321 let utilizationRate = divd(abs(newImbalance), freeBalance())
312322 if ((maxSpotUtilization() > utilizationRate))
313323 then [IntegerEntry(k_excessBalance, newImbalance)]
314324 else throw(((((((("Vault: can not update excess balance. Balance: " + toString(excessBalance())) + " change: ") + toString(_change)) + " utilization rate: ") + toString(utilizationRate)) + " max utilization rate: ") + toString(maxSpotUtilization())))
315325 }
316326
317327
318328 func updateTotalSupply (_change) = [IntegerEntry(k_totalSupply, (totalSupply() + _change))]
319329
320330
321331 func updateRate (_rate) = [IntegerEntry(k_rate, _rate)]
322332
323333
324334 func setUserWithdrawParams (_user,_lastWithdrawDate,_withdrawn) = [IntegerEntry(toCompositeKey(k_last_withdraw_date, _user), _lastWithdrawDate), IntegerEntry(toCompositeKey(k_withdraw_in_period, _user), _withdrawn)]
325335
326336
327337 func updateRewardBalance (_delta) = [IntegerEntry(k_rewardBalance, (rewardBalance() + _delta))]
328338
329339
330340 func updateRewardRate (_rewardRate) = [IntegerEntry(k_rewardRate, _rewardRate)]
331341
332342
333343 func updateTime (_lastUpdateTime,_periodFinish) = [IntegerEntry(k_lastUpdateTime, _lastUpdateTime), IntegerEntry(k_periodFinish, _periodFinish)]
334344
335345
336346 func updateRewardPerTokenStored (_rewardPerTokenStored) = [IntegerEntry(k_rewardPerTokenStored, _rewardPerTokenStored)]
337347
338348
339349 func updateUserRewards (_staker,_reward,_userRewardPerToken) = [IntegerEntry(toCompositeKey(k_userReward, _staker), _reward), IntegerEntry(toCompositeKey(k_userRewardPerToken, _staker), _userRewardPerToken)]
340350
341351
342352 @Callable(i)
343-func changeSettings (_maxSpotUtilization,_withdrawPerPeriod) = if (if (if (if (!(initialized()))
353+func changeSettings (_maxSpotUtilization,_withdrawPerPeriod,_withdrawUnlimited) = if (if (if (if (!(initialized()))
344354 then true
345355 else (i.caller != adminAddress()))
346356 then true
347357 else if ((0 > _maxSpotUtilization))
348358 then true
349359 else (_maxSpotUtilization > DECIMAL_UNIT))
350360 then true
351361 else if ((0 > _withdrawPerPeriod))
352362 then true
353363 else (_withdrawPerPeriod > DECIMAL_UNIT))
354364 then throw("Invalid changeSettings params")
355- else [IntegerEntry(k_maxSpotUtilization, _maxSpotUtilization), IntegerEntry(k_withdrawPerPeriod, _withdrawPerPeriod)]
365+ else [IntegerEntry(k_maxSpotUtilization, _maxSpotUtilization), IntegerEntry(k_withdrawPerPeriod, _withdrawPerPeriod), BooleanEntry(k_withdrawUnlimited, _withdrawUnlimited)]
356366
357367
358368
359369 @Callable(i)
360370 func initialize (_coordinator,_vaultAsset,_maxSpotUtilization) = if (if (if (if (initialized())
361371 then true
362372 else (i.caller != this))
363373 then true
364374 else (0 > _maxSpotUtilization))
365375 then true
366376 else (_maxSpotUtilization > DECIMAL_UNIT))
367377 then throw("Unable to initialize")
368378 else {
369379 let assetDecimals = if ((_vaultAsset == "WAVES"))
370380 then 8
371381 else {
372382 let info = valueOrErrorMessage(assetInfo(fromBase58String(_vaultAsset)), ("Invalid token id: " + _vaultAsset))
373383 info.decimals
374384 }
375385 [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)]
376386 }
377387
378388
379389
380390 @Callable(i)
381391 func stake () = {
382392 let _staker = toString(i.caller)
383393 let _amount = assetToDecimals(i.payments[0].amount)
384394 if (if (if ((i.payments[0].assetId != vaultAsset()))
385395 then true
386396 else (size(i.payments) != 1))
387397 then true
388398 else !(initialized()))
389399 then throw("Invalid call to stake")
390400 else {
391- let $t01327313502 = updateReward(_staker, 0)
392- let newRewardPerTokenStored = $t01327313502._1
393- let newLastUpdateTime = $t01327313502._2
394- let stakerEarned = $t01327313502._3
395- let stakerRewardPerTokenPaid = $t01327313502._4
401+ let $t01369013919 = updateReward(_staker, 0)
402+ let newRewardPerTokenStored = $t01369013919._1
403+ let newLastUpdateTime = $t01369013919._2
404+ let stakerEarned = $t01369013919._3
405+ let stakerRewardPerTokenPaid = $t01369013919._4
396406 let currentRate = rate()
397407 let prevAverageRate = averageRate(_staker)
398408 let vAmount = divd(_amount, currentRate)
399409 let newAverageRate = divd((muld(vAmount, currentRate) + muld(balanceOf(_staker), prevAverageRate)), (vAmount + balanceOf(_staker)))
400410 let newTotalBalance = (vAmount + balanceOf(_staker))
401411 let newWithdrawLimit = muld(newTotalBalance, withdrawPerPeriod())
402412 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
403413 if ((stake == stake))
404414 then {
405415 let notify = if ((maxSpotUtilization() > 0))
406416 then invoke(spotAddress(), "notifyVaultBalanceChange", [vaultAssetStr(), _amount], nil)
407417 else nil
408418 if ((notify == notify))
409419 then (((((((updateUserRewards(_staker, stakerEarned, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateFreeBalance(_amount)) ++ updateUserBalance(_staker, vAmount)) ++ setUserAverageRate(_staker, newAverageRate)) ++ setUserWithdrawLimit(_staker, newWithdrawLimit)) ++ updateTotalSupply(vAmount))
410420 else throw("Strict value is not equal to itself.")
411421 }
412422 else throw("Strict value is not equal to itself.")
413423 }
414424 }
415425
416426
417427
418428 @Callable(i)
419429 func unStake (_amount) = {
420430 let _staker = toString(i.caller)
421431 let amountOfQuoteAsset = assetToDecimals(_amount)
422432 if (if (if ((i.payments != nil))
423433 then true
424434 else (0 >= amountOfQuoteAsset))
425435 then true
426436 else !(initialized()))
427437 then throw("Invalid call to unStake")
428438 else {
429- let $t01509215308 = updateReward(_staker, 0)
430- let newRewardPerTokenStored = $t01509215308._1
431- let newLastUpdateTime = $t01509215308._2
432- let stakerEarned = $t01509215308._3
433- let stakerRewardPerTokenPaid = $t01509215308._4
434- let $t01531515482 = getWithdrawLimitLeft(_staker)
435- let newLastWithdrawnDate = $t01531515482._1
436- let withdrawLimitLeft = $t01531515482._2
437- let alreadyWithdrawnInPeriod = $t01531515482._3
439+ let $t01550915725 = updateReward(_staker, 0)
440+ let newRewardPerTokenStored = $t01550915725._1
441+ let newLastUpdateTime = $t01550915725._2
442+ let stakerEarned = $t01550915725._3
443+ let stakerRewardPerTokenPaid = $t01550915725._4
444+ let $t01573215899 = getWithdrawLimitLeft(_staker)
445+ let newLastWithdrawnDate = $t01573215899._1
446+ let withdrawLimitLeft = $t01573215899._2
447+ let alreadyWithdrawnInPeriod = $t01573215899._3
438448 let vAmount = divd(amountOfQuoteAsset, rate())
439449 if ((vAmount > withdrawLimitLeft))
440450 then throw("Invalid call to unStake: withdraw over limit")
441451 else {
442452 let newWithdrawnInPeriod = (alreadyWithdrawnInPeriod + vAmount)
443453 if ((amountOfQuoteAsset > freeBalance()))
444454 then throw("Invalid call to unStake: balance too low")
445455 else {
446456 let unstake = invoke(managerAddress(), "withdraw", [vaultAssetStr(), assetFromDecimals(amountOfQuoteAsset)], nil)
447457 if ((unstake == unstake))
448458 then {
449459 let notify = if ((maxSpotUtilization() > 0))
450460 then invoke(spotAddress(), "notifyVaultBalanceChange", [vaultAssetStr(), -(amountOfQuoteAsset)], nil)
451461 else nil
452462 if ((notify == notify))
453463 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())])
454464 else throw("Strict value is not equal to itself.")
455465 }
456466 else throw("Strict value is not equal to itself.")
457467 }
458468 }
459469 }
460470 }
461471
462472
463473
464474 @Callable(i)
465475 func withdrawRewards () = {
466476 let _staker = toString(i.caller)
467- let $t01709217237 = updateReward(_staker, 0)
468- let newRewardPerTokenStored = $t01709217237._1
469- let newLastUpdateTime = $t01709217237._2
470- let stakerEarned = $t01709217237._3
471- let stakerRewardPerTokenPaid = $t01709217237._4
477+ let $t01750917654 = updateReward(_staker, 0)
478+ let newRewardPerTokenStored = $t01750917654._1
479+ let newLastUpdateTime = $t01750917654._2
480+ let stakerEarned = $t01750917654._3
481+ let stakerRewardPerTokenPaid = $t01750917654._4
472482 if (if ((0 >= stakerEarned))
473483 then true
474484 else !(initialized()))
475485 then throw("No reward: Vault")
476486 else ((((updateUserRewards(_staker, 0, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateRewardBalance(-(stakerEarned))) ++ [ScriptTransfer(i.caller, stakerEarned, governanceAsset())])
477487 }
478488
479489
480490
481491 @Callable(i)
482492 func addFree () = {
483493 let _amount = assetToDecimals(i.payments[0].amount)
484494 if (if (if (if ((i.payments[0].assetId != vaultAsset()))
485495 then true
486496 else (size(i.payments) != 1))
487497 then true
488498 else !(initialized()))
489499 then true
490500 else !(if (if (isWhitelist(toString(i.caller)))
491501 then true
492502 else (i.caller == spotAddress()))
493503 then true
494504 else (i.caller == adminAddress())))
495505 then throw("Invalid addFree params")
496506 else {
497507 let newRate = computeNewRate(_amount)
498508 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
499509 if ((stake == stake))
500510 then (updateFreeBalance(_amount) ++ updateRate(newRate))
501511 else throw("Strict value is not equal to itself.")
502512 }
503513 }
504514
505515
506516
507517 @Callable(i)
508518 func addLocked () = {
509519 let _amount = assetToDecimals(i.payments[0].amount)
510520 if (if (if (if ((i.payments[0].assetId != vaultAsset()))
511521 then true
512522 else (size(i.payments) != 1))
513523 then true
514524 else !(initialized()))
515525 then true
516526 else !(if (isWhitelist(toString(i.caller)))
517527 then true
518528 else (i.caller == adminAddress())))
519529 then throw("Invalid addLocked params")
520530 else {
521531 let unstake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
522532 if ((unstake == unstake))
523533 then updateLockedBalance(_amount)
524534 else throw("Strict value is not equal to itself.")
525535 }
526536 }
527537
528538
529539
530540 @Callable(i)
531541 func exchangeFreeAndLocked (_amount) = if (if (!(initialized()))
532542 then true
533543 else if (!(isWhitelist(toString(i.caller))))
534544 then (i.caller != adminAddress())
535545 else false)
536546 then throw("Invalid exchangeFreeAndLocked params")
537547 else {
538548 let amountOfQuoteAsset = assetToDecimals(_amount)
539549 let newRate = computeNewRate(-(amountOfQuoteAsset))
540550 ((updateLockedBalance(amountOfQuoteAsset) ++ updateFreeBalance(-(amountOfQuoteAsset))) ++ updateRate(newRate))
541551 }
542552
543553
544554
545555 @Callable(i)
546556 func withdrawLocked (_amount) = if (if (if (!(initialized()))
547557 then true
548558 else (0 >= _amount))
549559 then true
550560 else !(isWhitelist(toString(i.caller))))
551561 then throw("Invalid withdrawLocked params")
552562 else {
553563 let amountOfQuoteAsset = assetToDecimals(_amount)
554564 let unstake = invoke(managerAddress(), "withdraw", [vaultAssetStr(), assetFromDecimals(amountOfQuoteAsset)], nil)
555565 if ((unstake == unstake))
556566 then (updateLockedBalance(-(amountOfQuoteAsset)) ++ [ScriptTransfer(i.caller, assetFromDecimals(amountOfQuoteAsset), vaultAsset())])
557567 else throw("Strict value is not equal to itself.")
558568 }
559569
560570
561571
562572 @Callable(i)
563573 func borrow (_amount) = if (if (if (!(initialized()))
564574 then true
565575 else (0 >= _amount))
566576 then true
567577 else !((i.caller == spotAddress())))
568578 then throw("Invalid borrow params")
569579 else {
570580 let amountOfQuoteAsset = assetToDecimals(_amount)
571581 let unstake = invoke(managerAddress(), "withdraw", [vaultAssetStr(), assetFromDecimals(amountOfQuoteAsset)], nil)
572582 if ((unstake == unstake))
573583 then (updateExcessBalance(-(amountOfQuoteAsset)) ++ [ScriptTransfer(i.caller, assetFromDecimals(amountOfQuoteAsset), vaultAsset())])
574584 else throw("Strict value is not equal to itself.")
575585 }
576586
577587
578588
579589 @Callable(i)
580590 func repay () = {
581591 let _amount = assetToDecimals(i.payments[0].amount)
582592 if (if (if (if ((i.payments[0].assetId != vaultAsset()))
583593 then true
584594 else (size(i.payments) != 1))
585595 then true
586596 else !(initialized()))
587597 then true
588598 else !(if ((i.caller == spotAddress()))
589599 then true
590600 else (i.caller == adminAddress())))
591601 then throw("Invalid repay params")
592602 else {
593603 let unstake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
594604 if ((unstake == unstake))
595605 then updateExcessBalance(_amount)
596606 else throw("Strict value is not equal to itself.")
597607 }
598608 }
599609
600610
601611
602612 @Callable(i)
603613 func addRewards () = if (if (if ((i.payments[0].assetId != governanceAsset()))
604614 then true
605615 else (size(i.payments) != 1))
606616 then true
607617 else !(initialized()))
608618 then throw("Invalid addRewards params")
609619 else {
610620 let _reward = i.payments[0].amount
611621 let newRewardPerTokenStored = updateReward(NO_ADDRESS, NO_STAKER)._1
612622 let timestamp = currentTimestampSec()
613623 let newRewardRate = if ((timestamp > periodFinish()))
614624 then (_reward / DURATION)
615625 else {
616626 let remainingTime = (periodFinish() - timestamp)
617627 let leftover = (rewardRate() * remainingTime)
618628 ((_reward + leftover) / DURATION)
619629 }
620630 (((updateRewardRate(newRewardRate) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateRewardBalance(_reward)) ++ updateTime(timestamp, (timestamp + DURATION)))
621631 }
622632
623633
624634
625635 @Callable(i)
626636 func ackRewards () = {
627637 let profitResp = invoke(managerAddress(), "claimProfit", [vaultAssetStr()], nil)
628638 if ((profitResp == profitResp))
629639 then {
630640 let profit = match profitResp {
631641 case p: Int =>
632642 assetToDecimals(p)
633643 case _ =>
634644 throw("Invalid claimProfit response")
635645 }
636646 let result = if ((profit > 0))
637647 then {
638648 let newRate = computeNewRate(profit)
639649 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(profit))])
640650 if ((stake == stake))
641651 then (updateFreeBalance(profit) ++ updateRate(newRate))
642652 else throw("Strict value is not equal to itself.")
643653 }
644654 else nil
645655 if ((result == result))
646656 then result
647657 else throw("Strict value is not equal to itself.")
648658 }
649659 else throw("Strict value is not equal to itself.")
650660 }
651661
652662
653663
654664 @Callable(i)
655665 func view_reward (_staker) = {
656666 let balance = balanceOf(_staker)
657667 let depositedAmount = muld(averageRate(_staker), balance)
658668 let currentAmount = muld(rate(), balance)
659669 let earnedQuote = (currentAmount - depositedAmount)
660670 throw(toString(earnedQuote))
661671 }
662672
663673
664674
665675 @Callable(i)
666676 func view_stakingReward (_staker) = {
667677 let stakerEarned = updateReward(_staker, 0)._3
668678 throw(toString(assetFromDecimals(stakerEarned)))
669679 }
670680
671681
672682
673683 @Callable(i)
674684 func view_withdrawLimit (_staker) = {
675685 let withdrawLimitLeft = getWithdrawLimitLeft(_staker)._2
676686 let limitInAsset = assetFromDecimals(muld(withdrawLimitLeft, rate()))
677687 throw(toString(limitInAsset))
678688 }
679689
680690
681691 @Verifier(tx)
682692 func verify () = {
683693 let coordinatorStr = getString(this, k_coordinatorAddress)
684694 if (isDefined(coordinatorStr))
685695 then {
686696 let admin = getString(addressFromStringValue(value(coordinatorStr)), k_admin_address)
687697 if (isDefined(admin))
688698 then valueOrElse(getBoolean(addressFromStringValue(value(admin)), ((("status_" + toString(this)) + "_") + toBase58String(tx.id))), false)
689699 else throw("unable to verify: admin not set in coordinator")
690700 }
691701 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
692702 }
693703

github/deemru/w8io/026f985 
79.28 ms