tx · 79eS5SKYe5oQ3nLzueiYgaASt57yc8sxNapmu72UdzBD

3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn:  -0.02400000 Waves

2023.08.17 15:33 [2714595] smart account 3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn > SELF 0.00000000 Waves

{ "type": 13, "id": "79eS5SKYe5oQ3nLzueiYgaASt57yc8sxNapmu72UdzBD", "fee": 2400000, "feeAssetId": null, "timestamp": 1692275614171, "version": 2, "chainId": 84, "sender": "3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn", "senderPublicKey": "Fj9LPkCtmW3pDnVU6wPQnvqpZJCBieWSvZqY5FAGeCyp", "proofs": [ "5r7aQDxZc6tWjKso2Xeo2mCBQTiFpEqeeVs3qLX7dtqe4jjZEPSDXQ8hVGFSTYQqHHxCwez7MP4Mj5ikwhhy4rCm", "63qg7Rtax3RMiDiywNUREfQxT9DjDg2GTnZNCYrQJmkTxNTjHxd6sLWaByDC8qkv8Z7HsZFh8nQZsBZKqYQNKGhN" ], "script": "base64:BgIhCAISABIAEgQKAggIEgMKAQgSBwoFCAgIAQESAwoBCBIAUQAGU0NBTEU4AIDC1y8AC0xFTkRFUlNfQVBSCQDMCAIAlgEJAMwIAgB4CQDMCAIAZAkAzAgCAFAJAMwIAgA8CQDMCAIAKAkAzAgCAB4JAMwIAgAUCQDMCAIACgUDbmlsABNMRU5ERVJTX0FQUl9QRVJJT0RTCQDMCAICAzEtMQkAzAgCAgMyLTIJAMwIAgIDMy0zCQDMCAICAzQtNAkAzAgCAgM1LTgJAMwIAgIEOS0xMgkAzAgCAgUxNC0xNgkAzAgCAgUxNy0yMAkAzAgCAgYyMC0xMDQFA25pbAATTEVOREVSU19NQVhfUEVSSU9EUwBoAAZMUF9BUFIJAMwIAgCWAQkAzAgCAHgJAMwIAgBkCQDMCAIAUAkAzAgCADwJAMwIAgAoBQNuaWwADkxQX0FQUl9QRVJJT0RTCQDMCAICAzEtMQkAzAgCAgMyLTIJAMwIA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BnZlcmlmeQAEE211bHRpU2lnbmVkQnlBZG1pbnMEEmFkbWluUHViS2V5MVNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFCGFkbWluMVBLAAEAAAQSYWRtaW5QdWJLZXkyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAQUIYWRtaW4yUEsAAQAABBJhZG1pblB1YktleTNTaWduZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwACBQhhZG1pbjNQSwABAAAJAGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAgQHJG1hdGNoMAUCdHgDCQABAgUHJG1hdGNoMAIXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EA2ludgUHJG1hdGNoMAQGaXNTZWxmCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5BAppc1JpZ2h0RmVlAwkAAAIIBQNpbnYDZmVlAKD3NgkAAAIIBQNpbnYKZmVlQXNzZXRJZAUEdW5pdAcECmlzSW5pdENhbGwJAAACCAUDaW52CGZ1bmN0aW9uAgRpbml0BAxpc25vUGF5bWVudHMJAAACCQCQAwEIBQNpbnYIcGF5bWVudHMAAAMDAwMFCmlzUmlnaHRGZWUFCmlzSW5pdENhbGwHBQZpc1NlbGYHBQxpc25vUGF5bWVudHMHBgUTbXVsdGlTaWduZWRCeUFkbWlucwUTbXVsdGlTaWduZWRCeUFkbWlucwHb/e8=", "height": 2714595, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2MwfGqpDrR9Siqa38SvuSVoaNBt6vM96vf8hiuMbzvuZ Next: 3kx78gq64ddzmJUUjWSKP7Tcsa767m4SNgxy7q85wcDb Diff:
OldNewDifferences
267267 func calcNewLpInterest (totalSupply) = if ((height >= startHeight))
268268 then 0
269269 else {
270- let rewardPerBlock = getIntegerValue(this, kLpRewardPerBlock)
271- let oldInterest = getIntegerValue(this, kLpInterest)
272- let updateHeight = getIntegerValue(this, kLpInterestHeight)
270+ let rewardPerBlock = valueOrElse(getInteger(this, kLpRewardPerBlock), 0)
271+ let oldInterest = valueOrElse(getInteger(this, kLpInterest), 0)
272+ let updateHeight = valueOrElse(getInteger(this, kLpInterestHeight), height)
273273 let reward = ((height - updateHeight) * rewardPerBlock)
274274 let interest = if ((totalSupply > 0))
275275 then fraction(reward, SCALE8, totalSupply)
304304
305305 func claimLenderRewardsCommon (user,readOnly) = {
306306 func claim (a,tokenId) = {
307- let $t088478891 = a
308- let tokenIds = $t088478891._1
309- let cAmount = $t088478891._2
310- let total = $t088478891._3
311- let enteries = $t088478891._4
307+ let $t088828926 = a
308+ let tokenIds = $t088828926._1
309+ let cAmount = $t088828926._2
310+ let total = $t088828926._3
311+ let enteries = $t088828926._4
312312 let userAvailableClaim = valueOrElse(getInteger(this, (((tokenId + "_") + user) + kUserLendAvailableClaim)), 0)
313- let $t090049083 = calcLendUserReward(user, tokenId)
314- let uReward = $t090049083._1
315- let newTokenInterest = $t090049083._2
316- let userSupply = $t090049083._3
313+ let $t090399118 = calcLendUserReward(user, tokenId)
314+ let uReward = $t090399118._1
315+ let newTokenInterest = $t090399118._2
316+ let userSupply = $t090399118._3
317317 let totalToClaim = (userAvailableClaim + uReward)
318318 if (if ((totalToClaim > 0))
319319 then true
346346
347347 func claimLpRewardsCommon (user,readOnly) = {
348348 let userAvailableClaim = valueOrElse(getInteger(this, (user + kUserLpAvailableClaim)), 0)
349- let $t01001510080 = calcLpUserReward(user)
350- let uReward = $t01001510080._1
351- let newLpInterest = $t01001510080._2
352- let userSupply = $t01001510080._3
349+ let $t01005010115 = calcLpUserReward(user)
350+ let uReward = $t01005010115._1
351+ let newLpInterest = $t01005010115._2
352+ let userSupply = $t01005010115._3
353353 let totalToClaim = (userAvailableClaim + uReward)
354354 if (if (readOnly)
355355 then true
440440 @Callable(i)
441441 func lendAction (user,tokenId) = valueOrElse(isLandCall(i), {
442442 let userAvailableClaim = valueOrElse(getInteger(this, (tokenId + kUserLendAvailableClaim)), 0)
443- let $t01245212519 = calcLendUserReward(user, tokenId)
444- let uReward = $t01245212519._1
445- let newTokenInterest = $t01245212519._2
443+ let $t01248712554 = calcLendUserReward(user, tokenId)
444+ let uReward = $t01248712554._1
445+ let newTokenInterest = $t01248712554._2
446446 [IntegerEntry((((user + "_") + tokenId) + kUserLendInterest), newTokenInterest), IntegerEntry((((user + "_") + tokenId) + kUserLendAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry((tokenId + kTokenInterest), newTokenInterest), IntegerEntry((tokenId + kTokenInterestHeight), height)]
447447 })
448448
451451 @Callable(i)
452452 func lpAction (user) = valueOrElse(isSFFarmingCall(i), {
453453 let userAvailableClaim = valueOrElse(getInteger(this, kUserLpAvailableClaim), 0)
454- let $t01298413037 = calcLpUserReward(user)
455- let uReward = $t01298413037._1
456- let newLpInterest = $t01298413037._2
454+ let $t01301913072 = calcLpUserReward(user)
455+ let uReward = $t01301913072._1
456+ let newLpInterest = $t01301913072._2
457457 [IntegerEntry((user + kUserLpInterest), newLpInterest), IntegerEntry((user + kUserLpAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry((user + kLpInterest), newLpInterest), IntegerEntry((user + kLpInterestHeight), height)]
458458 })
459459
486486 if (((lastUpdateHeight + periodLength) > height))
487487 then throw("rewards alredy updated in this period")
488488 else {
489- let $t01480414884 = getTotalSupplyAllTokens()
490- let totalSupply = $t01480414884._1
491- let totalSupplyUsd = $t01480414884._2
492- let totalSupplyUsdAll = $t01480414884._3
489+ let $t01483914919 = getTotalSupplyAllTokens()
490+ let totalSupply = $t01483914919._1
491+ let totalSupplyUsd = $t01483914919._2
492+ let totalSupplyUsdAll = $t01483914919._3
493493 let axlyPrice = getAssetPrice(axlyId)
494494 let axlyPrecision = getAssetPrecision(axlyId)
495495 let maxAPR = getAdoptedAPRByPeriod(curPeriod, LENDERS_APR_PERIODS, LENDERS_APR)
496496 func updateReward (a,tokenId) = {
497- let $t01512815153 = a
498- let enteries = $t01512815153._1
499- let index = $t01512815153._2
497+ let $t01516315188 = a
498+ let enteries = $t01516315188._1
499+ let index = $t01516315188._2
500500 if ((totalSupply[index] == 0))
501501 then $Tuple2((enteries ++ [IntegerEntry((tokenId + kPrevLendTokenSupply), totalSupply[index]), IntegerEntry((tokenId + kTokenRewardPerBlock), 0), IntegerEntry((tokenId + kTokenInterest), calcNewTokenInterest(tokenId, totalSupply[index])), IntegerEntry((tokenId + kTokenInterestHeight), max([startHeight, height]))]), (index + 1))
502502 else {
517517 }
518518 }
519519
520- let $t01674016817 = {
520+ let $t01677516852 = {
521521 let $l = getAllTokens()
522522 let $s = size($l)
523523 let $acc0 = $Tuple2(nil, 0)
531531
532532 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30)
533533 }
534- let tokensEnteries = $t01674016817._1
535- let index = $t01674016817._2
534+ let tokensEnteries = $t01677516852._1
535+ let index = $t01677516852._2
536536 let lpMaxAPR = getAdoptedAPRByPeriod(curPeriod, LP_APR_PERIODS, LP_APR)
537537 let lpTotalSupply = getIntegerValue(sfFarmingContract, (axlyPool + kSFTotalSupply))
538538 let preLPSupply = valueOrElse(getInteger(this, kPrevLPSupply), 0)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 100000000
55
66 let LENDERS_APR = [150, 120, 100, 80, 60, 40, 30, 20, 10]
77
88 let LENDERS_APR_PERIODS = ["1-1", "2-2", "3-3", "4-4", "5-8", "9-12", "14-16", "17-20", "20-104"]
99
1010 let LENDERS_MAX_PERIODS = 104
1111
1212 let LP_APR = [150, 120, 100, 80, 60, 40]
1313
1414 let LP_APR_PERIODS = ["1-1", "2-2", "3-3", "4-4", "5-8", "9-12"]
1515
1616 let LP_MAX_PERIODS = 12
1717
1818 let kStartHeight = "startHeight"
1919
2020 let kPeriodLength = "periodLength"
2121
2222 let kLendersMaxAmount = "lendRewardsAmount"
2323
2424 let kLPMaxAmount = "lpRewardAmount"
2525
2626 let kTokens = "tokens"
2727
2828 let kUserSupply = "_userTotalSupply"
2929
3030 let kTokenInterest = "_tokenInterest"
3131
3232 let kTokenInterestHeight = "_tokenInterestHeight"
3333
3434 let kTokenRewardPerBlock = "_tokenRewardPerBlock"
3535
3636 let kRewardUpdateHeight = "rewardUpdateHeight"
3737
3838 let kUserLendInterest = "_userLandInterest"
3939
4040 let kUserLendAvailableClaim = "_userLendAvailableClaim"
4141
4242 let kUserLpAvailableClaim = "_userLpAvailableClaim"
4343
4444 let kLpInterest = "lpInterest"
4545
4646 let kLpInterestHeight = "lpInterestHeight"
4747
4848 let kPrevLPSupply = "prevLPTotalSupply"
4949
5050 let kLpRewardPerBlock = "lpRewardPerBlock"
5151
5252 let kUserLpInterest = "_userLpInterest"
5353
5454 let kPriceInOracle = "_twap5B"
5555
5656 let kPrevLendTokenSupply = "_prevLendTotalSupply"
5757
5858 let kAXLYTokenId = "axlyTokenId"
5959
6060 let kLendTokenSupply = "total_supplied_"
6161
6262 let kLendUserSupply = "_supplied_"
6363
6464 let kLendSetupTokens = "setup_tokens"
6565
6666 let kSFTotalSupply = "_total_share_tokens_locked"
6767
6868 let kSFUserTotalSupply = "_share_tokens_locked"
6969
7070 let kAxlyPool = "axlyPool"
7171
7272 let kLpId = "share_asset_id"
7373
7474 let kPriceOracle = "price_oracle"
7575
7676 let kAxlyMainContract = "mainContract"
7777
7878 let kAxlyTokenomicContract = "tokenomicContract"
7979
8080 let kSFFarmingContract = "swopfi_farming_addr"
8181
8282 let kLendContract = "lend_service_addr"
8383
8484 let kAdmin1PK = "group1_admin1_pub_key"
8585
8686 let kAdmin2PK = "group1_admin2_pub_key"
8787
8888 let kAdmin3PK = "group1_admin3_pub_key"
8989
9090 let kOperatorCallPK = "admin_call_pub_key"
9191
9292 let axlyPool = valueOrErrorMessage(getString(this, kAxlyPool), "Can't get axlyPool key")
9393
9494 let mainContract = addressFromStringValue(valueOrErrorMessage(getString(this, kAxlyMainContract), "Can't get mainContact key"))
9595
9696 let tokenContract = addressFromStringValue(valueOrErrorMessage(getString(this, kAxlyTokenomicContract), "Can't get tokenomicContract key"))
9797
9898 let lendContract = addressFromStringValue(valueOrErrorMessage(getString(mainContract, kLendContract), "Can't get lend_service_addr key"))
9999
100100 let sfFarmingContract = addressFromStringValue(valueOrErrorMessage(getString(mainContract, kSFFarmingContract), "Can't get swopfi_farming_addr key"))
101101
102102 let priceOracleAddr = addressFromStringValue(valueOrErrorMessage(getString(mainContract, kPriceOracle), "Can't get price_oracle key"))
103103
104104 let admin1PK = fromBase58String(valueOrErrorMessage(getString(mainContract, kAdmin1PK), "Can't get admin1PK"))
105105
106106 let admin2PK = fromBase58String(valueOrErrorMessage(getString(mainContract, kAdmin2PK), "Can't get admin2PK"))
107107
108108 let admin3PK = fromBase58String(valueOrErrorMessage(getString(mainContract, kAdmin3PK), "Can't get operatorPK"))
109109
110110 let operatorPK = fromBase58String(valueOrErrorMessage(getString(this, kOperatorCallPK), "Can't get operatorPK"))
111111
112112 let axlyId = valueOrErrorMessage(getString(tokenContract, kAXLYTokenId), "Can't get Axly token id")
113113
114114 let startHeight = getIntegerValue(this, kStartHeight)
115115
116116 let periodLength = getIntegerValue(this, kPeriodLength)
117117
118118 let curPeriod = max([1, ((height - startHeight) / periodLength)])
119119
120120 let lendMaxAmount = getIntegerValue(tokenContract, kLendersMaxAmount)
121121
122122 let lendMaxPeriodAmount = (lendMaxAmount / LENDERS_MAX_PERIODS)
123123
124124 let lpMaxAmount = getIntegerValue(tokenContract, kLPMaxAmount)
125125
126126 let lpMaxPeriodAmount = (lpMaxAmount / LP_MAX_PERIODS)
127127
128128 func isAdminCall (i) = if (containsElement([admin1PK, admin2PK, admin3PK], i.callerPublicKey))
129129 then unit
130130 else throw("Only admin group1 can call this function")
131131
132132
133133 func isSelfCall (i) = if ((i.caller == this))
134134 then unit
135135 else throw("Only contract itself can call this function")
136136
137137
138138 func isOperatorCall (i) = if ((i.callerPublicKey == operatorPK))
139139 then unit
140140 else throw("Only operator can call this function")
141141
142142
143143 func isLandCall (i) = if ((i.caller == lendContract))
144144 then unit
145145 else throw("Only land contract can call this function")
146146
147147
148148 func isSFFarmingCall (i) = if ((i.caller == sfFarmingContract))
149149 then unit
150150 else throw("Only land contract can call this function")
151151
152152
153153 func getAllTokens () = {
154154 let tokens = valueOrElse(getString(this, kTokens), "")
155155 if ((tokens == ""))
156156 then nil
157157 else split(tokens, ",")
158158 }
159159
160160
161161 func getAssetPrice (assetId) = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
162162
163163
164164 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
165165 then 8
166166 else match assetInfo(fromBase58String(assetId)) {
167167 case asset: Asset =>
168168 asset.decimals
169169 case _ =>
170170 throw("Can't find asset")
171171 }
172172
173173
174174 func getAssetPrecision (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN)
175175
176176
177177 func getAdoptedAPRByPeriod (period,aprPeriods,apr) = {
178178 func for (a,aperiod) = {
179179 let $t054295451 = a
180180 let index = $t054295451._1
181181 let found = $t054295451._2
182182 let ft = split(aperiod, "-")
183183 let $t054885551 = $Tuple2(parseIntValue(ft[0]), parseIntValue(ft[1]))
184184 let from = $t054885551._1
185185 let to = $t054885551._2
186186 if (found)
187187 then a
188188 else if (if ((period >= from))
189189 then (to >= period)
190190 else false)
191191 then $Tuple2(index, true)
192192 else $Tuple2((index + 1), false)
193193 }
194194
195195 let $t056885754 = {
196196 let $l = LENDERS_APR_PERIODS
197197 let $s = size($l)
198198 let $acc0 = $Tuple2(0, false)
199199 func $f0_1 ($a,$i) = if (($i >= $s))
200200 then $a
201201 else for($a, $l[$i])
202202
203203 func $f0_2 ($a,$i) = if (($i >= $s))
204204 then $a
205205 else throw("List size exceeds 9")
206206
207207 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9)
208208 }
209209 let index = $t056885754._1
210210 let found = $t056885754._2
211211 if (found)
212212 then fraction((LENDERS_APR[index] * SCALE8), 7, 365)
213213 else 0
214214 }
215215
216216
217217 func getTotalSupplyAllTokens () = {
218218 func for (a,tokenId) = {
219219 let $t059425998 = a
220220 let totalSupply = $t059425998._1
221221 let totalSupplyUsd = $t059425998._2
222222 let totalSupplyUsdAll = $t059425998._3
223223 let tSupply = valueOrElse(getInteger(lendContract, (kLendTokenSupply + tokenId)), 0)
224224 let assetPrice = getAssetPrice(tokenId)
225225 let assetPrecision = getAssetPrecision(tokenId)
226226 let tSupplyUsd = fraction(tSupply, assetPrice, assetPrecision)
227227 $Tuple3((totalSupply :+ tSupply), (totalSupplyUsd :+ tSupplyUsd), (totalSupplyUsdAll + tSupplyUsd))
228228 }
229229
230230 let $l = getAllTokens()
231231 let $s = size($l)
232232 let $acc0 = $Tuple3(nil, nil, 0)
233233 func $f0_1 ($a,$i) = if (($i >= $s))
234234 then $a
235235 else for($a, $l[$i])
236236
237237 func $f0_2 ($a,$i) = if (($i >= $s))
238238 then $a
239239 else throw("List size exceeds 30")
240240
241241 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30)
242242 }
243243
244244
245245 func getTotalSupplyUsd (tokenId) = {
246246 let tSupply = valueOrElse(getInteger(lendContract, (kLendTokenSupply + tokenId)), 0)
247247 let assetPrice = getAssetPrice(tokenId)
248248 let assetPrecision = getAssetPrecision(tokenId)
249249 fraction(tSupply, assetPrice, assetPrecision)
250250 }
251251
252252
253253 func calcNewTokenInterest (tokenId,totalSupply) = if ((height >= startHeight))
254254 then 0
255255 else {
256256 let rewardPerBlock = getIntegerValue(this, (tokenId + kTokenRewardPerBlock))
257257 let oldInterest = getIntegerValue(this, (tokenId + kTokenInterest))
258258 let updateHeight = getIntegerValue(this, (tokenId + kTokenInterestHeight))
259259 let reward = ((height - updateHeight) * rewardPerBlock)
260260 let interest = if ((totalSupply > 0))
261261 then fraction(reward, SCALE8, totalSupply)
262262 else 0
263263 (oldInterest + interest)
264264 }
265265
266266
267267 func calcNewLpInterest (totalSupply) = if ((height >= startHeight))
268268 then 0
269269 else {
270- let rewardPerBlock = getIntegerValue(this, kLpRewardPerBlock)
271- let oldInterest = getIntegerValue(this, kLpInterest)
272- let updateHeight = getIntegerValue(this, kLpInterestHeight)
270+ let rewardPerBlock = valueOrElse(getInteger(this, kLpRewardPerBlock), 0)
271+ let oldInterest = valueOrElse(getInteger(this, kLpInterest), 0)
272+ let updateHeight = valueOrElse(getInteger(this, kLpInterestHeight), height)
273273 let reward = ((height - updateHeight) * rewardPerBlock)
274274 let interest = if ((totalSupply > 0))
275275 then fraction(reward, SCALE8, totalSupply)
276276 else 0
277277 (oldInterest + interest)
278278 }
279279
280280
281281 func calcLendUserReward (user,tokenId) = {
282282 let totalSupply = valueOrElse(getInteger(lendContract, (kLendTokenSupply + tokenId)), 0)
283283 let tokenInterest = calcNewTokenInterest(tokenId, totalSupply)
284284 let userSupply = valueOrElse(getInteger(lendContract, ((user + kLendUserSupply) + tokenId)), 0)
285285 let userTokenInterest = valueOrElse(getInteger(this, (((tokenId + "_") + user) + kUserLendInterest)), if ((userSupply == 0))
286286 then tokenInterest
287287 else 0)
288288 let reward = fraction(userSupply, (tokenInterest - userTokenInterest), SCALE8)
289289 $Tuple3(reward, tokenInterest, userSupply)
290290 }
291291
292292
293293 func calcLpUserReward (user) = {
294294 let totalSupply = valueOrElse(getInteger(sfFarmingContract, (axlyPool + kSFTotalSupply)), 0)
295295 let tokenInterest = calcNewLpInterest(totalSupply)
296296 let userSupply = valueOrElse(getInteger(lendContract, (((axlyPool + "_") + user) + kSFUserTotalSupply)), 0)
297297 let userTokenInterest = valueOrElse(getInteger(this, (user + kUserLpInterest)), if ((userSupply == 0))
298298 then tokenInterest
299299 else 0)
300300 let reward = fraction(userSupply, (tokenInterest - userTokenInterest), SCALE8)
301301 $Tuple3(reward, tokenInterest, userSupply)
302302 }
303303
304304
305305 func claimLenderRewardsCommon (user,readOnly) = {
306306 func claim (a,tokenId) = {
307- let $t088478891 = a
308- let tokenIds = $t088478891._1
309- let cAmount = $t088478891._2
310- let total = $t088478891._3
311- let enteries = $t088478891._4
307+ let $t088828926 = a
308+ let tokenIds = $t088828926._1
309+ let cAmount = $t088828926._2
310+ let total = $t088828926._3
311+ let enteries = $t088828926._4
312312 let userAvailableClaim = valueOrElse(getInteger(this, (((tokenId + "_") + user) + kUserLendAvailableClaim)), 0)
313- let $t090049083 = calcLendUserReward(user, tokenId)
314- let uReward = $t090049083._1
315- let newTokenInterest = $t090049083._2
316- let userSupply = $t090049083._3
313+ let $t090399118 = calcLendUserReward(user, tokenId)
314+ let uReward = $t090399118._1
315+ let newTokenInterest = $t090399118._2
316+ let userSupply = $t090399118._3
317317 let totalToClaim = (userAvailableClaim + uReward)
318318 if (if ((totalToClaim > 0))
319319 then true
320320 else (userSupply > 0))
321321 then {
322322 let newEntreries = if (if (readOnly)
323323 then true
324324 else (totalToClaim == 0))
325325 then enteries
326326 else (enteries ++ [IntegerEntry((((tokenId + "_") + user) + kUserLendInterest), newTokenInterest), IntegerEntry((((tokenId + "_") + user) + kUserLendAvailableClaim), 0), IntegerEntry((tokenId + kTokenInterest), newTokenInterest), IntegerEntry((tokenId + kTokenInterestHeight), height)])
327327 $Tuple4((tokenIds :+ tokenId), (cAmount :+ totalToClaim), (total + totalToClaim), newEntreries)
328328 }
329329 else $Tuple4(tokenIds, cAmount, total, enteries)
330330 }
331331
332332 let $l = getAllTokens()
333333 let $s = size($l)
334334 let $acc0 = $Tuple4(nil, nil, 0, nil)
335335 func $f0_1 ($a,$i) = if (($i >= $s))
336336 then $a
337337 else claim($a, $l[$i])
338338
339339 func $f0_2 ($a,$i) = if (($i >= $s))
340340 then $a
341341 else throw("List size exceeds 30")
342342
343343 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30)
344344 }
345345
346346
347347 func claimLpRewardsCommon (user,readOnly) = {
348348 let userAvailableClaim = valueOrElse(getInteger(this, (user + kUserLpAvailableClaim)), 0)
349- let $t01001510080 = calcLpUserReward(user)
350- let uReward = $t01001510080._1
351- let newLpInterest = $t01001510080._2
352- let userSupply = $t01001510080._3
349+ let $t01005010115 = calcLpUserReward(user)
350+ let uReward = $t01005010115._1
351+ let newLpInterest = $t01005010115._2
352+ let userSupply = $t01005010115._3
353353 let totalToClaim = (userAvailableClaim + uReward)
354354 if (if (readOnly)
355355 then true
356356 else (totalToClaim == 0))
357357 then $Tuple2(totalToClaim, nil)
358358 else $Tuple2(totalToClaim, [IntegerEntry((user + kUserLpInterest), newLpInterest), IntegerEntry((user + kUserLpAvailableClaim), 0), IntegerEntry(kLpInterest, newLpInterest), IntegerEntry(kLpInterestHeight, height)])
359359 }
360360
361361
362362 func getTokensAPRs () = {
363363 let axlyPrice = getAssetPrice(axlyId)
364364 let axlyPrecision = getAssetPrecision(axlyId)
365365 func tokensAprs (apr,tokenId) = {
366366 let rwpb = valueOrElse(getInteger(this, (tokenId + kTokenRewardPerBlock)), 0)
367367 let rwpbUsd = fraction(rwpb, axlyPrice, axlyPrecision)
368368 let rwYear = ((rwpbUsd * periodLength) * 52)
369369 let totalSupplyUsd = getTotalSupplyUsd(tokenId)
370370 (apr :+ fraction(rwYear, SCALE8, totalSupplyUsd))
371371 }
372372
373373 let aprs = {
374374 let $l = getAllTokens()
375375 let $s = size($l)
376376 let $acc0 = nil
377377 func $f0_1 ($a,$i) = if (($i >= $s))
378378 then $a
379379 else tokensAprs($a, $l[$i])
380380
381381 func $f0_2 ($a,$i) = if (($i >= $s))
382382 then $a
383383 else throw("List size exceeds 30")
384384
385385 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30)
386386 }
387387 let lpTotalSupply = getIntegerValue(sfFarmingContract, (axlyPool + kSFTotalSupply))
388388 let lpId = getStringValue(addressFromStringValue(axlyPool), kLpId)
389389 let lpPrecision = getAssetPrecision(lpId)
390390 let lpPrice = {
391391 let @ = ({
392392 let @ = invoke(mainContract, "getShareAssetPriceREADONLY", [[lpId]], nil)
393393 if ($isInstanceOf(@, "List[Any]"))
394394 then @
395395 else throw(($getType(@) + " couldn't be cast to List[Any]"))
396396 })[0]
397397 if ($isInstanceOf(@, "Int"))
398398 then @
399399 else throw(($getType(@) + " couldn't be cast to Int"))
400400 }
401401 let lpTotalSupplyUsd = fraction(lpTotalSupply, lpPrice, lpPrecision)
402402 let rwpb = valueOrElse(getInteger(this, kLpRewardPerBlock), 0)
403403 let rwpbUsd = fraction(rwpb, axlyPrice, axlyPrecision)
404404 let rwYear = ((rwpbUsd * periodLength) * 52)
405405 let lpApr = fraction(rwYear, SCALE8, lpTotalSupplyUsd)
406406 $Tuple3(getAllTokens(), aprs, lpApr)
407407 }
408408
409409
410410 @Callable(i)
411411 func claimLenderRewards () = {
412412 let claimRes = claimLenderRewardsCommon(toString(i.caller), false)
413413 if ((claimRes._3 == 0))
414414 then throw("claim amount must be greater than 0")
415415 else {
416416 let inv = invoke(tokenContract, "withdrawLendReward", [claimRes._3, toString(i.caller)], nil)
417417 if ((inv == inv))
418418 then claimRes._4
419419 else throw("Strict value is not equal to itself.")
420420 }
421421 }
422422
423423
424424
425425 @Callable(i)
426426 func claimLpRewards () = {
427427 let claimRes = claimLpRewardsCommon(toString(i.caller), false)
428428 if ((claimRes._1 == 0))
429429 then throw("claim amount must be greater than 0")
430430 else {
431431 let inv = invoke(tokenContract, "withdrawLpReward", [claimRes._1, toString(i.caller)], nil)
432432 if ((inv == inv))
433433 then claimRes._2
434434 else throw("Strict value is not equal to itself.")
435435 }
436436 }
437437
438438
439439
440440 @Callable(i)
441441 func lendAction (user,tokenId) = valueOrElse(isLandCall(i), {
442442 let userAvailableClaim = valueOrElse(getInteger(this, (tokenId + kUserLendAvailableClaim)), 0)
443- let $t01245212519 = calcLendUserReward(user, tokenId)
444- let uReward = $t01245212519._1
445- let newTokenInterest = $t01245212519._2
443+ let $t01248712554 = calcLendUserReward(user, tokenId)
444+ let uReward = $t01248712554._1
445+ let newTokenInterest = $t01248712554._2
446446 [IntegerEntry((((user + "_") + tokenId) + kUserLendInterest), newTokenInterest), IntegerEntry((((user + "_") + tokenId) + kUserLendAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry((tokenId + kTokenInterest), newTokenInterest), IntegerEntry((tokenId + kTokenInterestHeight), height)]
447447 })
448448
449449
450450
451451 @Callable(i)
452452 func lpAction (user) = valueOrElse(isSFFarmingCall(i), {
453453 let userAvailableClaim = valueOrElse(getInteger(this, kUserLpAvailableClaim), 0)
454- let $t01298413037 = calcLpUserReward(user)
455- let uReward = $t01298413037._1
456- let newLpInterest = $t01298413037._2
454+ let $t01301913072 = calcLpUserReward(user)
455+ let uReward = $t01301913072._1
456+ let newLpInterest = $t01301913072._2
457457 [IntegerEntry((user + kUserLpInterest), newLpInterest), IntegerEntry((user + kUserLpAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry((user + kLpInterest), newLpInterest), IntegerEntry((user + kLpInterestHeight), height)]
458458 })
459459
460460
461461
462462 @Callable(i)
463463 func init (axlyMainContractAddr,axlyTokenomicContractAddr,axlyPoolAddr,farmingStartHeight,periodLength) = valueOrElse(isSelfCall(i), if (!(isDefined(addressFromString(axlyMainContractAddr))))
464464 then throw("Wrong farming address")
465465 else if (!(isDefined(addressFromString(axlyTokenomicContractAddr))))
466466 then throw("Wrong main contract address")
467467 else [StringEntry(kAxlyMainContract, axlyMainContractAddr), StringEntry(kAxlyTokenomicContract, axlyTokenomicContractAddr), StringEntry(kAxlyPool, axlyPoolAddr), IntegerEntry(kStartHeight, farmingStartHeight), IntegerEntry(kPeriodLength, periodLength)])
468468
469469
470470
471471 @Callable(i)
472472 func initNewToken (tokenId) = valueOrElse(isAdminCall(i), if (isDefined(getInteger(this, (tokenId + kTokenInterest))))
473473 then throw("token already inited")
474474 else if (!(contains(getStringValue(lendContract, kLendSetupTokens), tokenId)))
475475 then throw("no token on landing")
476476 else {
477477 let newAllTokens = (getAllTokens() :+ tokenId)
478478 [IntegerEntry((tokenId + kTokenInterest), 0), IntegerEntry((tokenId + kTokenInterestHeight), max([startHeight, height])), StringEntry(kTokens, makeString(newAllTokens, ",")), IntegerEntry((tokenId + kTokenRewardPerBlock), 0)]
479479 })
480480
481481
482482
483483 @Callable(i)
484484 func updateRewards () = valueOrElse(isOperatorCall(i), {
485485 let lastUpdateHeight = valueOrElse(getInteger(this, kRewardUpdateHeight), 0)
486486 if (((lastUpdateHeight + periodLength) > height))
487487 then throw("rewards alredy updated in this period")
488488 else {
489- let $t01480414884 = getTotalSupplyAllTokens()
490- let totalSupply = $t01480414884._1
491- let totalSupplyUsd = $t01480414884._2
492- let totalSupplyUsdAll = $t01480414884._3
489+ let $t01483914919 = getTotalSupplyAllTokens()
490+ let totalSupply = $t01483914919._1
491+ let totalSupplyUsd = $t01483914919._2
492+ let totalSupplyUsdAll = $t01483914919._3
493493 let axlyPrice = getAssetPrice(axlyId)
494494 let axlyPrecision = getAssetPrecision(axlyId)
495495 let maxAPR = getAdoptedAPRByPeriod(curPeriod, LENDERS_APR_PERIODS, LENDERS_APR)
496496 func updateReward (a,tokenId) = {
497- let $t01512815153 = a
498- let enteries = $t01512815153._1
499- let index = $t01512815153._2
497+ let $t01516315188 = a
498+ let enteries = $t01516315188._1
499+ let index = $t01516315188._2
500500 if ((totalSupply[index] == 0))
501501 then $Tuple2((enteries ++ [IntegerEntry((tokenId + kPrevLendTokenSupply), totalSupply[index]), IntegerEntry((tokenId + kTokenRewardPerBlock), 0), IntegerEntry((tokenId + kTokenInterest), calcNewTokenInterest(tokenId, totalSupply[index])), IntegerEntry((tokenId + kTokenInterestHeight), max([startHeight, height]))]), (index + 1))
502502 else {
503503 let share = fraction(totalSupplyUsd[index], SCALE8, totalSupplyUsdAll)
504504 let maxReward = fraction(share, lendMaxPeriodAmount, SCALE8)
505505 let maxRewardUsd = fraction(maxReward, axlyPrice, axlyPrecision)
506506 let prevTotalSupply = valueOrElse(getInteger(this, kPrevLendTokenSupply), 0)
507507 let rtCoef = if (if ((prevTotalSupply == 0))
508508 then true
509509 else (totalSupply[index] == 0))
510510 then 0
511511 else fraction(prevTotalSupply, SCALE8, totalSupply[index])
512512 let reward = (min([(maxAPR * (SCALE8 + rtCoef)), fraction(maxAPR, (15 * SCALE8), 10)]) / SCALE8)
513513 let rewardUsd = min([maxRewardUsd, fraction(totalSupplyUsd[index], reward, SCALE8)])
514514 let rewardPeriod = fraction(rewardUsd, axlyPrice, axlyPrecision)
515515 let rewardPerBlock = (rewardPeriod / periodLength)
516516 $Tuple2((enteries ++ [IntegerEntry((tokenId + kPrevLendTokenSupply), totalSupply[index]), IntegerEntry((tokenId + kTokenRewardPerBlock), rewardPerBlock), IntegerEntry((tokenId + kTokenInterest), calcNewTokenInterest(tokenId, totalSupply[index])), IntegerEntry((tokenId + kTokenInterestHeight), max([startHeight, height]))]), (index + 1))
517517 }
518518 }
519519
520- let $t01674016817 = {
520+ let $t01677516852 = {
521521 let $l = getAllTokens()
522522 let $s = size($l)
523523 let $acc0 = $Tuple2(nil, 0)
524524 func $f0_1 ($a,$i) = if (($i >= $s))
525525 then $a
526526 else updateReward($a, $l[$i])
527527
528528 func $f0_2 ($a,$i) = if (($i >= $s))
529529 then $a
530530 else throw("List size exceeds 30")
531531
532532 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30)
533533 }
534- let tokensEnteries = $t01674016817._1
535- let index = $t01674016817._2
534+ let tokensEnteries = $t01677516852._1
535+ let index = $t01677516852._2
536536 let lpMaxAPR = getAdoptedAPRByPeriod(curPeriod, LP_APR_PERIODS, LP_APR)
537537 let lpTotalSupply = getIntegerValue(sfFarmingContract, (axlyPool + kSFTotalSupply))
538538 let preLPSupply = valueOrElse(getInteger(this, kPrevLPSupply), 0)
539539 let lpId = getStringValue(addressFromStringValue(axlyPool), kLpId)
540540 let lpPrecision = getAssetPrecision(lpId)
541541 let lpPrice = {
542542 let @ = invoke(mainContract, "getShareAssetPriceREADONLY", [lpId], nil)
543543 if ($isInstanceOf(@, "Int"))
544544 then @
545545 else throw(($getType(@) + " couldn't be cast to Int"))
546546 }
547547 let lpTotalSupplyUsd = fraction(lpTotalSupply, lpPrice, lpPrecision)
548548 let maxLPRewardUsd = fraction(lpMaxPeriodAmount, axlyPrice, axlyPrecision)
549549 let rtLPCoef = if (if ((preLPSupply == 0))
550550 then true
551551 else (lpTotalSupply == 0))
552552 then 0
553553 else fraction(preLPSupply, SCALE8, lpTotalSupply)
554554 let rewardLp = (min([(lpMaxAPR * (SCALE8 + rtLPCoef)), fraction(lpMaxAPR, (15 * SCALE8), 10)]) / SCALE8)
555555 let rewardLpUsd = min([maxLPRewardUsd, fraction(lpTotalSupplyUsd, rewardLp, SCALE8)])
556556 let rewardLpPeriod = fraction(rewardLpUsd, axlyPrice, axlyPrecision)
557557 let rewardLpPerBlock = (rewardLpPeriod / periodLength)
558558 let lpEnteries = [IntegerEntry(kPrevLPSupply, lpTotalSupply), IntegerEntry(kLpRewardPerBlock, rewardLpPerBlock), IntegerEntry(kLpInterest, calcNewLpInterest(lpTotalSupply)), IntegerEntry(kLpInterestHeight, max([startHeight, height]))]
559559 ((lpEnteries ++ tokensEnteries) :+ IntegerEntry(kRewardUpdateHeight, max([startHeight, height])))
560560 }
561561 })
562562
563563
564564 @Verifier(tx)
565565 func verify () = {
566566 let multiSignedByAdmins = {
567567 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK))
568568 then 1
569569 else 0
570570 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], admin2PK))
571571 then 1
572572 else 0
573573 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], admin3PK))
574574 then 1
575575 else 0
576576 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
577577 }
578578 match tx {
579579 case inv: InvokeScriptTransaction =>
580580 let isSelf = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
581581 let isRightFee = if ((inv.fee == 900000))
582582 then (inv.feeAssetId == unit)
583583 else false
584584 let isInitCall = (inv.function == "init")
585585 let isnoPayments = (size(inv.payments) == 0)
586586 if (if (if (if (isRightFee)
587587 then isInitCall
588588 else false)
589589 then isSelf
590590 else false)
591591 then isnoPayments
592592 else false)
593593 then true
594594 else multiSignedByAdmins
595595 case _ =>
596596 multiSignedByAdmins
597597 }
598598 }
599599

github/deemru/w8io/026f985 
70.32 ms