tx · 4LQkM8FVzsKULzCRucq5Xu3LFzP8DdXrBhc8t99f5dfs

3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN:  -0.03700000 Waves

2023.05.24 20:01 [2592328] smart account 3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN > SELF 0.00000000 Waves

{ "type": 13, "id": "4LQkM8FVzsKULzCRucq5Xu3LFzP8DdXrBhc8t99f5dfs", "fee": 3700000, "feeAssetId": null, "timestamp": 1684947668937, "version": 2, "chainId": 84, "sender": "3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN", "senderPublicKey": "HHCdafdi3D2htEYJw8cBoNYC8w76euLWKYENK4kanmGM", "proofs": [ "5qanaz715tqHcEo22joEidBkrY1hXW3ZgHJMXo5ZCcFvtUGCN9Uq4NV8cmr8nrPEoufdtJCLrBvzkMCjGQsaHu1h" ], "script": "base64:BgI/CAISAwoBARIFCgMICAESABIDCgEBEgASABIAEgMKAQESAwoBARIDCgEBEgASABIAEgMKAQgSAwoBCBIDCgEIYAANa190b3RhbFN1cHBseQINa190b3RhbFN1cHBseQAPa19yZXdhcmRCYWxhbmNlAg9rX3Jld2FyZEJhbGFuY2UAD2tfbG9ja2VkQmFsYW5jZQIPa19sb2NrZWRCYWxhbmNlAA1rX2ZyZWVCYWxhbmNlAg1rX2ZyZWVCYWxhbmNlAA9rX2V4Y2Vzc0JhbGFuY2UCD2tfZXhjZXNzQmFsYW5jZQAMa192YXVsdEFzc2V0AgxrX3ZhdWx0QXNzZXQAFGtfdmF1bHRBc3NldERlY2ltYWxzAhRrX3ZhdWx0QXNzZXREZWNpbWFscwAUa19tYXhTcG90VXRpbGl6YXRpb24CFGtfbWF4U3BvdFV0aWxpemF0aW9uAAZrX3JhdGUCBmtfcmF0ZQAQa19sYXN0VXBkYXRlVGltZQIQa19sYXN0VXBkYXRlVGltZQAWa19yZXdhcmRQZXJUb2tlblN0b3JlZAIWa19yZXdhcmRQZXJUb2tlblN0b3JlZAAMa19yZX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HJhd0xpbWl0TGVmdAgJARRnZXRXaXRoZHJhd0xpbWl0TGVmdAEFB19zdGFrZXICXzIEDGxpbWl0SW5Bc3NldAkBEWFzc2V0RnJvbURlY2ltYWxzAQkBBG11bGQCBRF3aXRoZHJhd0xpbWl0TGVmdAkBBHJhdGUACQACAQkApAMBBQxsaW1pdEluQXNzZXQBAnR4AQZ2ZXJpZnkABA5jb29yZGluYXRvclN0cgkAnQgCBQR0aGlzBRRrX2Nvb3JkaW5hdG9yQWRkcmVzcwMJAQlpc0RlZmluZWQBBQ5jb29yZGluYXRvclN0cgQFYWRtaW4JAJ0IAgkBEUBleHRyTmF0aXZlKDEwNjIpAQkBBXZhbHVlAQUOY29vcmRpbmF0b3JTdHIFD2tfYWRtaW5fYWRkcmVzcwMJAQlpc0RlZmluZWQBBQVhZG1pbgkBC3ZhbHVlT3JFbHNlAgkAmwgCCQERQGV4dHJOYXRpdmUoMTA2MikBCQEFdmFsdWUBBQVhZG1pbgkArAICCQCsAgIJAKwCAgIHc3RhdHVzXwkApQgBBQR0aGlzAgFfCQDYBAEIBQJ0eAJpZAcJAAIBAi51bmFibGUgdG8gdmVyaWZ5OiBhZG1pbiBub3Qgc2V0IGluIGNvb3JkaW5hdG9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5oNTfgg==", "height": 2592328, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DCzuVn8JPmDJ7YBHy4bXwgg8XT1ndW5FWkzccwFwzhNY Next: 5JLXz32PHBWVcFX4VkgRzYo1PPEm3P5fFUYyu75sxJJb Diff:
OldNewDifferences
332332
333333
334334 @Callable(i)
335-func migrate () = if ((i.caller != adminAddress()))
336- then throw("Invalid migrate parameters")
337- else {
338- let _vaultAsset = toBase58String(quoteAsset())
339- let assetDecimals = if ((_vaultAsset == "WAVES"))
340- then 8
341- else {
342- let info = valueOrErrorMessage(assetInfo(fromBase58String(_vaultAsset)), ("Invalid token id: " + _vaultAsset))
343- info.decimals
344- }
345-[StringEntry(k_vaultAsset, _vaultAsset), IntegerEntry(k_vaultAssetDecimals, assetDecimals), IntegerEntry(k_maxSpotUtilization, 0)]
346- }
335+func changeSettings (_maxSpotUtilization) = if (if (if (!(initialized()))
336+ then true
337+ else (i.caller != adminAddress()))
338+ then true
339+ else if ((0 > _maxSpotUtilization))
340+ then true
341+ else (_maxSpotUtilization > DECIMAL_UNIT))
342+ then throw("Invalid changeSettings params")
343+ else [IntegerEntry(k_maxSpotUtilization, _maxSpotUtilization)]
347344
348345
349346
379376 else !(initialized()))
380377 then throw("Invalid call to stake")
381378 else {
382- let $t01314513374 = updateReward(_staker, 0)
383- let newRewardPerTokenStored = $t01314513374._1
384- let newLastUpdateTime = $t01314513374._2
385- let stakerEarned = $t01314513374._3
386- let stakerRewardPerTokenPaid = $t01314513374._4
379+ let $t01291113140 = updateReward(_staker, 0)
380+ let newRewardPerTokenStored = $t01291113140._1
381+ let newLastUpdateTime = $t01291113140._2
382+ let stakerEarned = $t01291113140._3
383+ let stakerRewardPerTokenPaid = $t01291113140._4
387384 let currentRate = rate()
388385 let prevAverageRate = averageRate(_staker)
389386 let vAmount = divd(_amount, currentRate)
393390 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
394391 if ((stake == stake))
395392 then {
396- let notify = invoke(spotAddress(), "notifyVaultBalanceChange", [vaultAssetStr(), _amount], nil)
393+ let notify = if ((maxSpotUtilization() > 0))
394+ then invoke(spotAddress(), "notifyVaultBalanceChange", [vaultAssetStr(), _amount], nil)
395+ else nil
397396 if ((notify == notify))
398397 then (((((((updateUserRewards(_staker, stakerEarned, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateFreeBalance(_amount)) ++ updateUserBalance(_staker, vAmount)) ++ setUserAverageRate(_staker, newAverageRate)) ++ setUserWithdrawLimit(_staker, newWithdrawLimit)) ++ updateTotalSupply(vAmount))
399398 else throw("Strict value is not equal to itself.")
415414 else !(initialized()))
416415 then throw("Invalid call to unStake")
417416 else {
418- let $t01487415090 = updateReward(_staker, 0)
419- let newRewardPerTokenStored = $t01487415090._1
420- let newLastUpdateTime = $t01487415090._2
421- let stakerEarned = $t01487415090._3
422- let stakerRewardPerTokenPaid = $t01487415090._4
423- let $t01509715264 = getWithdrawLimitLeft(_staker)
424- let newLastWithdrawnDate = $t01509715264._1
425- let withdrawLimitLeft = $t01509715264._2
426- let alreadyWithdrawnInPeriod = $t01509715264._3
417+ let $t01473014946 = updateReward(_staker, 0)
418+ let newRewardPerTokenStored = $t01473014946._1
419+ let newLastUpdateTime = $t01473014946._2
420+ let stakerEarned = $t01473014946._3
421+ let stakerRewardPerTokenPaid = $t01473014946._4
422+ let $t01495315120 = getWithdrawLimitLeft(_staker)
423+ let newLastWithdrawnDate = $t01495315120._1
424+ let withdrawLimitLeft = $t01495315120._2
425+ let alreadyWithdrawnInPeriod = $t01495315120._3
427426 let vAmount = divd(amountOfQuoteAsset, rate())
428427 if ((vAmount > withdrawLimitLeft))
429428 then throw("Invalid call to unStake: withdraw over limit")
435434 let unstake = invoke(managerAddress(), "withdraw", [vaultAssetStr(), assetFromDecimals(amountOfQuoteAsset)], nil)
436435 if ((unstake == unstake))
437436 then {
438- let notify = invoke(spotAddress(), "notifyVaultBalanceChange", [vaultAssetStr(), -(amountOfQuoteAsset)], nil)
437+ let notify = if ((maxSpotUtilization() > 0))
438+ then invoke(spotAddress(), "notifyVaultBalanceChange", [vaultAssetStr(), -(amountOfQuoteAsset)], nil)
439+ else nil
439440 if ((notify == notify))
440441 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())])
441442 else throw("Strict value is not equal to itself.")
451452 @Callable(i)
452453 func withdrawRewards () = {
453454 let _staker = toString(i.caller)
454- let $t01676916914 = updateReward(_staker, 0)
455- let newRewardPerTokenStored = $t01676916914._1
456- let newLastUpdateTime = $t01676916914._2
457- let stakerEarned = $t01676916914._3
458- let stakerRewardPerTokenPaid = $t01676916914._4
455+ let $t01673016875 = updateReward(_staker, 0)
456+ let newRewardPerTokenStored = $t01673016875._1
457+ let newLastUpdateTime = $t01673016875._2
458+ let stakerEarned = $t01673016875._3
459+ let stakerRewardPerTokenPaid = $t01673016875._4
459460 if (if ((0 >= stakerEarned))
460461 then true
461462 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 spotAddress () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(coordinator(), k_spot_address), "Spot address not set")), "Spot address invalid")
7575
7676
7777 func governanceAsset () = fromBase58String(valueOrErrorMessage(getString(coordinator(), k_governance_asset), "Governance asset not set"))
7878
7979
8080 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
8181
8282
8383 func vaultAssetStr () = valueOrErrorMessage(getString(this, k_vaultAsset), "Vault asset not set")
8484
8585
8686 func vaultAsset () = {
8787 let _assetIdStr = vaultAssetStr()
8888 if ((_assetIdStr == "WAVES"))
8989 then unit
9090 else fromBase58String(_assetIdStr)
9191 }
9292
9393
9494 func vaultAssetDecimals () = valueOrErrorMessage(getInteger(this, k_vaultAssetDecimals), "Vault asset decimals not set")
9595
9696
9797 func managerAddress () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(coordinator(), k_manager_address), "Manager address not set")), "Manager address invalid")
9898
9999
100100 let DECIMAL_UNIT = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10))
101101
102102 let DURATION = (((7 * 60) * 60) * 24)
103103
104104 let NO_ADDRESS = ""
105105
106106 let NO_STAKER = 0
107107
108108 func assetFromDecimals (_amount) = {
109109 let assetDecimals = vaultAssetDecimals()
110110 if ((assetDecimals == 6))
111111 then (_amount / 100)
112112 else if ((assetDecimals == 8))
113113 then _amount
114114 else throw("Invalid asset decimals")
115115 }
116116
117117
118118 func assetToDecimals (_amount) = {
119119 let assetDecimals = vaultAssetDecimals()
120120 if ((assetDecimals == 6))
121121 then (_amount * 100)
122122 else if ((assetDecimals == 8))
123123 then _amount
124124 else throw("Invalid asset decimals")
125125 }
126126
127127
128128 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
129129
130130
131131 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
132132
133133
134134 func abs (_x) = if ((_x > 0))
135135 then _x
136136 else -(_x)
137137
138138
139139 func minv (_x,_y) = if ((_x > _y))
140140 then _y
141141 else _x
142142
143143
144144 let WITHDRAW_PERIOD = (86400 * 1000)
145145
146146 let WITHDRAW_PER_PERIOD = divd((1 * DECIMAL_UNIT), (4 * DECIMAL_UNIT))
147147
148148 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
149149
150150
151151 func int0 (k) = valueOrElse(getInteger(this, k), 0)
152152
153153
154154 func int1 (k) = valueOrElse(getInteger(this, k), DECIMAL_UNIT)
155155
156156
157157 func totalSupply () = int0(k_totalSupply)
158158
159159
160160 func rate () = int1(k_rate)
161161
162162
163163 func balanceOf (_staker) = int0(toCompositeKey(k_balance, _staker))
164164
165165
166166 func averageRate (_staker) = int0(toCompositeKey(k_average_rate, _staker))
167167
168168
169169 func withdrawLimit (_staker) = int0(toCompositeKey(k_withdraw_limit, _staker))
170170
171171
172172 func withdrawnInPeriod (_staker) = int0(toCompositeKey(k_withdraw_in_period, _staker))
173173
174174
175175 func lastWithdrawnDate (_staker) = int0(toCompositeKey(k_last_withdraw_date, _staker))
176176
177177
178178 func freeBalance () = int0(k_freeBalance)
179179
180180
181181 func lockedBalance () = int0(k_lockedBalance)
182182
183183
184184 func excessBalance () = int0(k_excessBalance)
185185
186186
187187 func rewardPerTokenStored () = int0(k_rewardPerTokenStored)
188188
189189
190190 func lastUpdateTime () = int0(k_lastUpdateTime)
191191
192192
193193 func rewardRate () = int0(k_rewardRate)
194194
195195
196196 func periodFinish () = int0(k_periodFinish)
197197
198198
199199 func rewardBalance () = int0(k_rewardBalance)
200200
201201
202202 func rewards (_staker) = int0(toCompositeKey(k_userReward, _staker))
203203
204204
205205 func userRewardPerTokenPaid (_staker) = int0(toCompositeKey(k_userRewardPerToken, _staker))
206206
207207
208208 func maxSpotUtilization () = int0(k_maxSpotUtilization)
209209
210210
211211 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
212212
213213
214214 func currentTimestamp () = lastBlock.timestamp
215215
216216
217217 func currentTimestampSec () = (currentTimestamp() / 1000)
218218
219219
220220 func getWithdrawLimitLeft (_staker) = {
221221 let currentDate = currentTimestamp()
222222 let lastWithdrawDate = lastWithdrawnDate(_staker)
223223 let $t062656586 = if (((currentDate - lastWithdrawDate) > WITHDRAW_PERIOD))
224224 then $Tuple3(currentDate, withdrawLimit(_staker), 0)
225225 else $Tuple3(lastWithdrawDate, (withdrawLimit(_staker) - withdrawnInPeriod(_staker)), withdrawnInPeriod(_staker))
226226 let newLastWithdrawnDate = $t062656586._1
227227 let withdrawLimitLeft = $t062656586._2
228228 let alreadyWithdrawnInPeriod = $t062656586._3
229229 $Tuple3(newLastWithdrawnDate, withdrawLimitLeft, alreadyWithdrawnInPeriod)
230230 }
231231
232232
233233 func computeNewRate (_amountOfQuoteAsset) = {
234234 let newRate = if ((totalSupply() > 0))
235235 then divd((freeBalance() + _amountOfQuoteAsset), totalSupply())
236236 else DECIMAL_UNIT
237237 newRate
238238 }
239239
240240
241241 func lastTimeRewardApplicable () = minv(currentTimestampSec(), periodFinish())
242242
243243
244244 func rewardPerToken (_balanceDelta) = if (((totalSupply() + _balanceDelta) == 0))
245245 then rewardPerTokenStored()
246246 else {
247247 let timeInterval = (lastTimeRewardApplicable() - lastUpdateTime())
248248 let actualTimeInterval = if ((0 > timeInterval))
249249 then 0
250250 else timeInterval
251251 let diff = divd((rewardRate() * actualTimeInterval), (totalSupply() + _balanceDelta))
252252 (rewardPerTokenStored() + diff)
253253 }
254254
255255
256256 func earned (_staker,_balanceDelta) = {
257257 let rewardDelta = (rewardPerToken(_balanceDelta) - userRewardPerTokenPaid(_staker))
258258 (muld((balanceOf(_staker) + _balanceDelta), rewardDelta) + rewards(_staker))
259259 }
260260
261261
262262 func updateReward (_staker,_balanceDelta) = {
263263 let newRewardPerTokenStored = rewardPerToken(_balanceDelta)
264264 let newLastUpdateTime = currentTimestampSec()
265265 let $t078088000 = if ((_staker != ""))
266266 then $Tuple2(earned(_staker, _balanceDelta), newRewardPerTokenStored)
267267 else $Tuple2(0, 0)
268268 let stakerEarned = $t078088000._1
269269 let stakerRewardPerTokenPaid = $t078088000._2
270270 $Tuple4(newRewardPerTokenStored, newLastUpdateTime, stakerEarned, stakerRewardPerTokenPaid)
271271 }
272272
273273
274274 func updateUserBalance (_user,_change) = if (((balanceOf(_user) + _change) >= 0))
275275 then [IntegerEntry(toCompositeKey(k_balance, _user), (balanceOf(_user) + _change))]
276276 else throw(((("Vault: can not update user balance. Balance: " + toString(balanceOf(_user))) + " change: ") + toString(_change)))
277277
278278
279279 func setUserWithdrawLimit (_user,_rate) = [IntegerEntry(toCompositeKey(k_withdraw_limit, _user), _rate)]
280280
281281
282282 func setUserAverageRate (_user,_rate) = [IntegerEntry(toCompositeKey(k_average_rate, _user), _rate)]
283283
284284
285285 func updateFreeBalance (_change) = {
286286 let balance = freeBalance()
287287 if (((balance + _change) >= 0))
288288 then [IntegerEntry(k_freeBalance, (balance + _change))]
289289 else throw(((("Vault: can not update free balance. Balance: " + toString(balance)) + " change: ") + toString(_change)))
290290 }
291291
292292
293293 func updateLockedBalance (_change) = {
294294 let balance = lockedBalance()
295295 if (((balance + _change) >= 0))
296296 then [IntegerEntry(k_lockedBalance, (balance + _change))]
297297 else throw(((("Vault: can not update locked balance. Balance: " + toString(balance)) + " change: ") + toString(_change)))
298298 }
299299
300300
301301 func updateExcessBalance (_change) = {
302302 let newImbalance = (excessBalance() + _change)
303303 let utilizationRate = divd(abs(newImbalance), freeBalance())
304304 if ((maxSpotUtilization() > utilizationRate))
305305 then [IntegerEntry(k_excessBalance, newImbalance)]
306306 else throw(((((((("Vault: can not update excess balance. Balance: " + toString(excessBalance())) + " change: ") + toString(_change)) + " utilization rate: ") + toString(utilizationRate)) + " max utilization rate: ") + toString(maxSpotUtilization())))
307307 }
308308
309309
310310 func updateTotalSupply (_change) = [IntegerEntry(k_totalSupply, (totalSupply() + _change))]
311311
312312
313313 func updateRate (_rate) = [IntegerEntry(k_rate, _rate)]
314314
315315
316316 func setUserWithdrawParams (_user,_lastWithdrawDate,_withdrawn) = [IntegerEntry(toCompositeKey(k_last_withdraw_date, _user), _lastWithdrawDate), IntegerEntry(toCompositeKey(k_withdraw_in_period, _user), _withdrawn)]
317317
318318
319319 func updateRewardBalance (_delta) = [IntegerEntry(k_rewardBalance, (rewardBalance() + _delta))]
320320
321321
322322 func updateRewardRate (_rewardRate) = [IntegerEntry(k_rewardRate, _rewardRate)]
323323
324324
325325 func updateTime (_lastUpdateTime,_periodFinish) = [IntegerEntry(k_lastUpdateTime, _lastUpdateTime), IntegerEntry(k_periodFinish, _periodFinish)]
326326
327327
328328 func updateRewardPerTokenStored (_rewardPerTokenStored) = [IntegerEntry(k_rewardPerTokenStored, _rewardPerTokenStored)]
329329
330330
331331 func updateUserRewards (_staker,_reward,_userRewardPerToken) = [IntegerEntry(toCompositeKey(k_userReward, _staker), _reward), IntegerEntry(toCompositeKey(k_userRewardPerToken, _staker), _userRewardPerToken)]
332332
333333
334334 @Callable(i)
335-func migrate () = if ((i.caller != adminAddress()))
336- then throw("Invalid migrate parameters")
337- else {
338- let _vaultAsset = toBase58String(quoteAsset())
339- let assetDecimals = if ((_vaultAsset == "WAVES"))
340- then 8
341- else {
342- let info = valueOrErrorMessage(assetInfo(fromBase58String(_vaultAsset)), ("Invalid token id: " + _vaultAsset))
343- info.decimals
344- }
345-[StringEntry(k_vaultAsset, _vaultAsset), IntegerEntry(k_vaultAssetDecimals, assetDecimals), IntegerEntry(k_maxSpotUtilization, 0)]
346- }
335+func changeSettings (_maxSpotUtilization) = if (if (if (!(initialized()))
336+ then true
337+ else (i.caller != adminAddress()))
338+ then true
339+ else if ((0 > _maxSpotUtilization))
340+ then true
341+ else (_maxSpotUtilization > DECIMAL_UNIT))
342+ then throw("Invalid changeSettings params")
343+ else [IntegerEntry(k_maxSpotUtilization, _maxSpotUtilization)]
347344
348345
349346
350347 @Callable(i)
351348 func initialize (_coordinator,_vaultAsset,_maxSpotUtilization) = if (if (if (if (initialized())
352349 then true
353350 else (i.caller != this))
354351 then true
355352 else (0 > _maxSpotUtilization))
356353 then true
357354 else (_maxSpotUtilization > DECIMAL_UNIT))
358355 then throw("Unable to initialize")
359356 else {
360357 let assetDecimals = if ((_vaultAsset == "WAVES"))
361358 then 8
362359 else {
363360 let info = valueOrErrorMessage(assetInfo(fromBase58String(_vaultAsset)), ("Invalid token id: " + _vaultAsset))
364361 info.decimals
365362 }
366363 [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)]
367364 }
368365
369366
370367
371368 @Callable(i)
372369 func stake () = {
373370 let _staker = toString(i.caller)
374371 let _amount = assetToDecimals(i.payments[0].amount)
375372 if (if (if ((i.payments[0].assetId != vaultAsset()))
376373 then true
377374 else (size(i.payments) != 1))
378375 then true
379376 else !(initialized()))
380377 then throw("Invalid call to stake")
381378 else {
382- let $t01314513374 = updateReward(_staker, 0)
383- let newRewardPerTokenStored = $t01314513374._1
384- let newLastUpdateTime = $t01314513374._2
385- let stakerEarned = $t01314513374._3
386- let stakerRewardPerTokenPaid = $t01314513374._4
379+ let $t01291113140 = updateReward(_staker, 0)
380+ let newRewardPerTokenStored = $t01291113140._1
381+ let newLastUpdateTime = $t01291113140._2
382+ let stakerEarned = $t01291113140._3
383+ let stakerRewardPerTokenPaid = $t01291113140._4
387384 let currentRate = rate()
388385 let prevAverageRate = averageRate(_staker)
389386 let vAmount = divd(_amount, currentRate)
390387 let newAverageRate = divd((muld(vAmount, currentRate) + muld(balanceOf(_staker), prevAverageRate)), (vAmount + balanceOf(_staker)))
391388 let newTotalBalance = (vAmount + balanceOf(_staker))
392389 let newWithdrawLimit = muld(newTotalBalance, WITHDRAW_PER_PERIOD)
393390 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
394391 if ((stake == stake))
395392 then {
396- let notify = invoke(spotAddress(), "notifyVaultBalanceChange", [vaultAssetStr(), _amount], nil)
393+ let notify = if ((maxSpotUtilization() > 0))
394+ then invoke(spotAddress(), "notifyVaultBalanceChange", [vaultAssetStr(), _amount], nil)
395+ else nil
397396 if ((notify == notify))
398397 then (((((((updateUserRewards(_staker, stakerEarned, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateFreeBalance(_amount)) ++ updateUserBalance(_staker, vAmount)) ++ setUserAverageRate(_staker, newAverageRate)) ++ setUserWithdrawLimit(_staker, newWithdrawLimit)) ++ updateTotalSupply(vAmount))
399398 else throw("Strict value is not equal to itself.")
400399 }
401400 else throw("Strict value is not equal to itself.")
402401 }
403402 }
404403
405404
406405
407406 @Callable(i)
408407 func unStake (_amount) = {
409408 let _staker = toString(i.caller)
410409 let amountOfQuoteAsset = assetToDecimals(_amount)
411410 if (if (if ((i.payments != nil))
412411 then true
413412 else (0 >= amountOfQuoteAsset))
414413 then true
415414 else !(initialized()))
416415 then throw("Invalid call to unStake")
417416 else {
418- let $t01487415090 = updateReward(_staker, 0)
419- let newRewardPerTokenStored = $t01487415090._1
420- let newLastUpdateTime = $t01487415090._2
421- let stakerEarned = $t01487415090._3
422- let stakerRewardPerTokenPaid = $t01487415090._4
423- let $t01509715264 = getWithdrawLimitLeft(_staker)
424- let newLastWithdrawnDate = $t01509715264._1
425- let withdrawLimitLeft = $t01509715264._2
426- let alreadyWithdrawnInPeriod = $t01509715264._3
417+ let $t01473014946 = updateReward(_staker, 0)
418+ let newRewardPerTokenStored = $t01473014946._1
419+ let newLastUpdateTime = $t01473014946._2
420+ let stakerEarned = $t01473014946._3
421+ let stakerRewardPerTokenPaid = $t01473014946._4
422+ let $t01495315120 = getWithdrawLimitLeft(_staker)
423+ let newLastWithdrawnDate = $t01495315120._1
424+ let withdrawLimitLeft = $t01495315120._2
425+ let alreadyWithdrawnInPeriod = $t01495315120._3
427426 let vAmount = divd(amountOfQuoteAsset, rate())
428427 if ((vAmount > withdrawLimitLeft))
429428 then throw("Invalid call to unStake: withdraw over limit")
430429 else {
431430 let newWithdrawnInPeriod = (alreadyWithdrawnInPeriod + vAmount)
432431 if ((amountOfQuoteAsset > freeBalance()))
433432 then throw("Invalid call to unStake: balance too low")
434433 else {
435434 let unstake = invoke(managerAddress(), "withdraw", [vaultAssetStr(), assetFromDecimals(amountOfQuoteAsset)], nil)
436435 if ((unstake == unstake))
437436 then {
438- let notify = invoke(spotAddress(), "notifyVaultBalanceChange", [vaultAssetStr(), -(amountOfQuoteAsset)], nil)
437+ let notify = if ((maxSpotUtilization() > 0))
438+ then invoke(spotAddress(), "notifyVaultBalanceChange", [vaultAssetStr(), -(amountOfQuoteAsset)], nil)
439+ else nil
439440 if ((notify == notify))
440441 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())])
441442 else throw("Strict value is not equal to itself.")
442443 }
443444 else throw("Strict value is not equal to itself.")
444445 }
445446 }
446447 }
447448 }
448449
449450
450451
451452 @Callable(i)
452453 func withdrawRewards () = {
453454 let _staker = toString(i.caller)
454- let $t01676916914 = updateReward(_staker, 0)
455- let newRewardPerTokenStored = $t01676916914._1
456- let newLastUpdateTime = $t01676916914._2
457- let stakerEarned = $t01676916914._3
458- let stakerRewardPerTokenPaid = $t01676916914._4
455+ let $t01673016875 = updateReward(_staker, 0)
456+ let newRewardPerTokenStored = $t01673016875._1
457+ let newLastUpdateTime = $t01673016875._2
458+ let stakerEarned = $t01673016875._3
459+ let stakerRewardPerTokenPaid = $t01673016875._4
459460 if (if ((0 >= stakerEarned))
460461 then true
461462 else !(initialized()))
462463 then throw("No reward: Vault")
463464 else ((((updateUserRewards(_staker, 0, stakerRewardPerTokenPaid) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateTime(newLastUpdateTime, periodFinish())) ++ updateRewardBalance(-(stakerEarned))) ++ [ScriptTransfer(i.caller, stakerEarned, governanceAsset())])
464465 }
465466
466467
467468
468469 @Callable(i)
469470 func addFree () = {
470471 let _amount = assetToDecimals(i.payments[0].amount)
471472 if (if (if (if ((i.payments[0].assetId != vaultAsset()))
472473 then true
473474 else (size(i.payments) != 1))
474475 then true
475476 else !(initialized()))
476477 then true
477478 else !(if (if (isWhitelist(toString(i.caller)))
478479 then true
479480 else (i.caller == spotAddress()))
480481 then true
481482 else (i.caller == adminAddress())))
482483 then throw("Invalid addFree params")
483484 else {
484485 let newRate = computeNewRate(_amount)
485486 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
486487 if ((stake == stake))
487488 then (updateFreeBalance(_amount) ++ updateRate(newRate))
488489 else throw("Strict value is not equal to itself.")
489490 }
490491 }
491492
492493
493494
494495 @Callable(i)
495496 func addLocked () = {
496497 let _amount = assetToDecimals(i.payments[0].amount)
497498 if (if (if (if ((i.payments[0].assetId != vaultAsset()))
498499 then true
499500 else (size(i.payments) != 1))
500501 then true
501502 else !(initialized()))
502503 then true
503504 else !(if (isWhitelist(toString(i.caller)))
504505 then true
505506 else (i.caller == adminAddress())))
506507 then throw("Invalid addLocked params")
507508 else {
508509 let unstake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
509510 if ((unstake == unstake))
510511 then updateLockedBalance(_amount)
511512 else throw("Strict value is not equal to itself.")
512513 }
513514 }
514515
515516
516517
517518 @Callable(i)
518519 func exchangeFreeAndLocked (_amount) = if (if (!(initialized()))
519520 then true
520521 else if (!(isWhitelist(toString(i.caller))))
521522 then (i.caller != adminAddress())
522523 else false)
523524 then throw("Invalid exchangeFreeAndLocked params")
524525 else {
525526 let amountOfQuoteAsset = assetToDecimals(_amount)
526527 let newRate = computeNewRate(-(amountOfQuoteAsset))
527528 ((updateLockedBalance(amountOfQuoteAsset) ++ updateFreeBalance(-(amountOfQuoteAsset))) ++ updateRate(newRate))
528529 }
529530
530531
531532
532533 @Callable(i)
533534 func withdrawLocked (_amount) = if (if (if (!(initialized()))
534535 then true
535536 else (0 >= _amount))
536537 then true
537538 else !(isWhitelist(toString(i.caller))))
538539 then throw("Invalid withdrawLocked params")
539540 else {
540541 let amountOfQuoteAsset = assetToDecimals(_amount)
541542 let unstake = invoke(managerAddress(), "withdraw", [vaultAssetStr(), assetFromDecimals(amountOfQuoteAsset)], nil)
542543 if ((unstake == unstake))
543544 then (updateLockedBalance(-(amountOfQuoteAsset)) ++ [ScriptTransfer(i.caller, assetFromDecimals(amountOfQuoteAsset), vaultAsset())])
544545 else throw("Strict value is not equal to itself.")
545546 }
546547
547548
548549
549550 @Callable(i)
550551 func borrow (_amount) = if (if (if (!(initialized()))
551552 then true
552553 else (0 >= _amount))
553554 then true
554555 else !((i.caller == spotAddress())))
555556 then throw("Invalid borrow params")
556557 else {
557558 let amountOfQuoteAsset = assetToDecimals(_amount)
558559 let unstake = invoke(managerAddress(), "withdraw", [vaultAssetStr(), assetFromDecimals(amountOfQuoteAsset)], nil)
559560 if ((unstake == unstake))
560561 then (updateExcessBalance(-(amountOfQuoteAsset)) ++ [ScriptTransfer(i.caller, assetFromDecimals(amountOfQuoteAsset), vaultAsset())])
561562 else throw("Strict value is not equal to itself.")
562563 }
563564
564565
565566
566567 @Callable(i)
567568 func repay () = {
568569 let _amount = assetToDecimals(i.payments[0].amount)
569570 if (if (if (if ((i.payments[0].assetId != vaultAsset()))
570571 then true
571572 else (size(i.payments) != 1))
572573 then true
573574 else !(initialized()))
574575 then true
575576 else !(if ((i.caller == spotAddress()))
576577 then true
577578 else (i.caller == adminAddress())))
578579 then throw("Invalid repay params")
579580 else {
580581 let unstake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(_amount))])
581582 if ((unstake == unstake))
582583 then updateExcessBalance(_amount)
583584 else throw("Strict value is not equal to itself.")
584585 }
585586 }
586587
587588
588589
589590 @Callable(i)
590591 func addRewards () = if (if (if ((i.payments[0].assetId != governanceAsset()))
591592 then true
592593 else (size(i.payments) != 1))
593594 then true
594595 else !(initialized()))
595596 then throw("Invalid addRewards params")
596597 else {
597598 let _reward = i.payments[0].amount
598599 let newRewardPerTokenStored = updateReward(NO_ADDRESS, NO_STAKER)._1
599600 let timestamp = currentTimestampSec()
600601 let newRewardRate = if ((timestamp > periodFinish()))
601602 then (_reward / DURATION)
602603 else {
603604 let remainingTime = (periodFinish() - timestamp)
604605 let leftover = (rewardRate() * remainingTime)
605606 ((_reward + leftover) / DURATION)
606607 }
607608 (((updateRewardRate(newRewardRate) ++ updateRewardPerTokenStored(newRewardPerTokenStored)) ++ updateRewardBalance(_reward)) ++ updateTime(timestamp, (timestamp + DURATION)))
608609 }
609610
610611
611612
612613 @Callable(i)
613614 func ackRewards () = {
614615 let profitResp = invoke(managerAddress(), "claimProfit", [vaultAssetStr()], nil)
615616 if ((profitResp == profitResp))
616617 then {
617618 let profit = match profitResp {
618619 case p: Int =>
619620 assetToDecimals(p)
620621 case _ =>
621622 throw("Invalid claimProfit response")
622623 }
623624 let result = if ((profit > 0))
624625 then {
625626 let newRate = computeNewRate(profit)
626627 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(vaultAsset(), assetFromDecimals(profit))])
627628 if ((stake == stake))
628629 then (updateFreeBalance(profit) ++ updateRate(newRate))
629630 else throw("Strict value is not equal to itself.")
630631 }
631632 else nil
632633 if ((result == result))
633634 then result
634635 else throw("Strict value is not equal to itself.")
635636 }
636637 else throw("Strict value is not equal to itself.")
637638 }
638639
639640
640641
641642 @Callable(i)
642643 func view_reward (_staker) = {
643644 let balance = balanceOf(_staker)
644645 let depositedAmount = muld(averageRate(_staker), balance)
645646 let currentAmount = muld(rate(), balance)
646647 let earnedQuote = (currentAmount - depositedAmount)
647648 throw(toString(earnedQuote))
648649 }
649650
650651
651652
652653 @Callable(i)
653654 func view_stakingReward (_staker) = {
654655 let stakerEarned = updateReward(_staker, 0)._3
655656 throw(toString(assetFromDecimals(stakerEarned)))
656657 }
657658
658659
659660
660661 @Callable(i)
661662 func view_withdrawLimit (_staker) = {
662663 let withdrawLimitLeft = getWithdrawLimitLeft(_staker)._2
663664 let limitInAsset = assetFromDecimals(muld(withdrawLimitLeft, rate()))
664665 throw(toString(limitInAsset))
665666 }
666667
667668
668669 @Verifier(tx)
669670 func verify () = {
670671 let coordinatorStr = getString(this, k_coordinatorAddress)
671672 if (isDefined(coordinatorStr))
672673 then {
673674 let admin = getString(addressFromStringValue(value(coordinatorStr)), k_admin_address)
674675 if (isDefined(admin))
675676 then valueOrElse(getBoolean(addressFromStringValue(value(admin)), ((("status_" + toString(this)) + "_") + toBase58String(tx.id))), false)
676677 else throw("unable to verify: admin not set in coordinator")
677678 }
678679 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
679680 }
680681

github/deemru/w8io/026f985 
79.41 ms