tx · Du2mjeg5WpWkPHtoyE48gCkWH6WuCmiJybTTRcU4BvNY

3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn:  -0.02400000 Waves

2023.08.28 11:36 [2730290] smart account 3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn > SELF 0.00000000 Waves

{ "type": 13, "id": "Du2mjeg5WpWkPHtoyE48gCkWH6WuCmiJybTTRcU4BvNY", "fee": 2400000, "feeAssetId": null, "timestamp": 1693211804067, "version": 2, "chainId": 84, "sender": "3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn", "senderPublicKey": "Fj9LPkCtmW3pDnVU6wPQnvqpZJCBieWSvZqY5FAGeCyp", "proofs": [ "41PsBwQ1saBBWDZVviBs38BsTg3rkZx9FrHcFGifKBsf9Eq3mx9Bzp3s7kPjFrBwvwkBrQe5uFy9cynF1XuLteAi", "2WhWuBDnkczKrFQQJiiSqJLUsaF2vctVPiPhrLz7GZEPd5pmGcJJkcgvYn1LqLmnXABNVappV7z8GbbiQTkh9jzU" ], "script": "base64:BgIhCAISABIAEgQKAggIEgMKAQgSBwoFCAgIAQESAwoBCBIAUAAGU0NBTEU4AIDC1y8AC0xFTkRFUlNfQVBSCQDMCAIAlgEJAMwIAgB4CQDMCAIAZAkAzAgCAFAJAMwIAgA8CQDMCAIAKAkAzAgCAB4JAMwIAgAUCQDMCAIACgUDbmlsABNMRU5ERVJTX0FQUl9QRVJJT0RTCQDMCAICAzEtMQkAzAgCAgMyLTIJAMwIAgIDMy0zCQDMCAICAzQtNAkAzAgCAgM1LTgJAMwIAgIEOS0xMgkAzAgCAgUxNC0xNgkAzAgCAgUxNy0yMAkAzAgCAgYyMC0xMDQFA25pbAATTEVOREVSU19NQVhfUEVSSU9EUwBoAAZMUF9BUFIJAMwIAgCWAQkAzAgCAHgJAMwIAgBkCQDMCAIAUAkAzAgCADwJAMwIAgAoBQNuaWwADkxQX0FQUl9QRVJJT0RTCQDMCAICAzEtMQkAzAgCAgMyLTIJAMwIAgI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LAAEAAAQSYWRtaW5QdWJLZXkzU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUIYWRtaW4zUEsAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAIEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBANpbnYFByRtYXRjaDAEBmlzU2VsZgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQQKaXNSaWdodEZlZQMJAAACCAUDaW52A2ZlZQCg9zYJAAACCAUDaW52CmZlZUFzc2V0SWQFBHVuaXQHBAppc0luaXRDYWxsCQAAAggFA2ludghmdW5jdGlvbgIEaW5pdAQMaXNub1BheW1lbnRzCQAAAgkAkAMBCAUDaW52CHBheW1lbnRzAAADAwMDBQppc1JpZ2h0RmVlBQppc0luaXRDYWxsBwUGaXNTZWxmBwUMaXNub1BheW1lbnRzBwYFE211bHRpU2lnbmVkQnlBZG1pbnMFE211bHRpU2lnbmVkQnlBZG1pbnNd363n", "height": 2730290, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FPKLWkgy6Zyj2uXph7GjFcrdZcyNFMGewQVs8tPsYURU Next: none Diff:
OldNewDifferences
432432
433433 @Callable(i)
434434 func lendAction (user,tokenId) = valueOrElse(isLandCall(i), {
435- let userAvailableClaim = valueOrElse(getInteger(this, (tokenId + kUserLendAvailableClaim)), 0)
436- let $t01239912466 = calcLendUserReward(user, tokenId)
437- let uReward = $t01239912466._1
438- let newTokenInterest = $t01239912466._2
435+ let userAvailableClaim = valueOrElse(getInteger(this, (((tokenId + "_") + user) + kUserLendAvailableClaim)), 0)
436+ let $t01241212479 = calcLendUserReward(user, tokenId)
437+ let uReward = $t01241212479._1
438+ let newTokenInterest = $t01241212479._2
439439 [IntegerEntry((((tokenId + "_") + user) + kUserLendInterest), newTokenInterest), IntegerEntry((((tokenId + "_") + user) + kUserLendAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry((tokenId + kTokenInterest), newTokenInterest), IntegerEntry((tokenId + kTokenInterestHeight), height)]
440440 })
441441
443443
444444 @Callable(i)
445445 func lpAction (user) = valueOrElse(isSFFarmingCall(i), {
446- let userAvailableClaim = valueOrElse(getInteger(this, kUserLpAvailableClaim), 0)
447- let $t01293112984 = calcLpUserReward(user)
448- let uReward = $t01293112984._1
449- let newLpInterest = $t01293112984._2
446+ let userAvailableClaim = valueOrElse(getInteger(this, (user + kUserLpAvailableClaim)), 0)
447+ let $t01295113004 = calcLpUserReward(user)
448+ let uReward = $t01295113004._1
449+ let newLpInterest = $t01295113004._2
450450 [IntegerEntry((user + kUserLpInterest), newLpInterest), IntegerEntry((user + kUserLpAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry(kLpInterest, newLpInterest), IntegerEntry(kLpInterestHeight, height)]
451451 })
452452
487487 else false)
488488 then throw("rewards alredy updated in this period")
489489 else {
490- let $t01492815008 = getTotalSupplyAllTokens()
491- let totalSupply = $t01492815008._1
492- let totalSupplyUsd = $t01492815008._2
493- let totalSupplyUsdAll = $t01492815008._3
490+ let $t01494815028 = getTotalSupplyAllTokens()
491+ let totalSupply = $t01494815028._1
492+ let totalSupplyUsd = $t01494815028._2
493+ let totalSupplyUsdAll = $t01494815028._3
494494 let axlyPrice = getAssetPrice(axlyId)
495495 let axlyPrecision = getAssetPrecision(axlyId)
496496 let maxAPR = getAdoptedAPRByPeriod(curPeriod, LENDERS_APR_PERIODS, LENDERS_APR)
497497 func updateReward (a,tokenId) = {
498- let $t01525715301 = a
499- let enteries = $t01525715301._1
500- let totalPeriodReward = $t01525715301._2
501- let index = $t01525715301._3
498+ let $t01527715321 = a
499+ let enteries = $t01527715321._1
500+ let totalPeriodReward = $t01527715321._2
501+ let index = $t01527715321._3
502502 if ((totalSupply[index] == 0))
503503 then $Tuple3((enteries ++ [IntegerEntry((tokenId + kPrevLendTokenSupply), totalSupply[index]), IntegerEntry((tokenId + kTokenRewardPerBlock), 0), IntegerEntry((tokenId + kTokenInterest), calcNewTokenInterest(tokenId, totalSupply[index])), IntegerEntry((tokenId + kTokenInterestHeight), max([startHeight, height]))]), totalPeriodReward, (index + 1))
504504 else {
519519 }
520520 }
521521
522- let $t01699317085 = {
522+ let $t01701317105 = {
523523 let $l = getAllTokens()
524524 let $s = size($l)
525525 let $acc0 = $Tuple3(nil, 0, 0)
533533
534534 $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)
535535 }
536- let tokensEnteries = $t01699317085._1
537- let totalTokenReward = $t01699317085._2
536+ let tokensEnteries = $t01701317105._1
537+ let totalTokenReward = $t01701317105._2
538538 let lpMaxAPR = getAdoptedAPRByPeriod(curPeriod, LP_APR_PERIODS, LP_APR)
539539 let lpTotalSupply = getIntegerValue(sfFarmingContract, (axlyPool + kSFTotalSupply))
540540 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 kLastUpdatePeriod = "rewardUpdatePeriod"
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 lendMaxAmount = getIntegerValue(tokenContract, kLendersMaxAmount)
119119
120120 let lendMaxPeriodAmount = (lendMaxAmount / LENDERS_MAX_PERIODS)
121121
122122 let lpMaxAmount = getIntegerValue(tokenContract, kLPMaxAmount)
123123
124124 let lpMaxPeriodAmount = (lpMaxAmount / LP_MAX_PERIODS)
125125
126126 func isAdminCall (i) = if (containsElement([admin1PK, admin2PK, admin3PK], i.callerPublicKey))
127127 then unit
128128 else throw("Only admin group1 can call this function")
129129
130130
131131 func isSelfCall (i) = if ((i.caller == this))
132132 then unit
133133 else throw("Only contract itself can call this function")
134134
135135
136136 func isOperatorCall (i) = if ((i.callerPublicKey == operatorPK))
137137 then unit
138138 else throw("Only operator can call this function")
139139
140140
141141 func isLandCall (i) = if ((i.caller == lendContract))
142142 then unit
143143 else throw("Only land contract can call this function")
144144
145145
146146 func isSFFarmingCall (i) = if ((i.caller == sfFarmingContract))
147147 then unit
148148 else throw("Only land contract can call this function")
149149
150150
151151 func getAllTokens () = {
152152 let tokens = valueOrElse(getString(this, kTokens), "")
153153 if ((tokens == ""))
154154 then nil
155155 else split(tokens, ",")
156156 }
157157
158158
159159 func getAssetPrice (assetId) = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
160160
161161
162162 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
163163 then 8
164164 else match assetInfo(fromBase58String(assetId)) {
165165 case asset: Asset =>
166166 asset.decimals
167167 case _ =>
168168 throw("Can't find asset")
169169 }
170170
171171
172172 func getAssetPrecision (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN)
173173
174174
175175 func getAdoptedAPRByPeriod (period,aprPeriods,apr) = {
176176 func for (a,aperiod) = {
177177 let $t053625384 = a
178178 let index = $t053625384._1
179179 let found = $t053625384._2
180180 let ft = split(aperiod, "-")
181181 let $t054215484 = $Tuple2(parseIntValue(ft[0]), parseIntValue(ft[1]))
182182 let from = $t054215484._1
183183 let to = $t054215484._2
184184 if (found)
185185 then a
186186 else if (if ((period >= from))
187187 then (to >= period)
188188 else false)
189189 then $Tuple2(index, true)
190190 else $Tuple2((index + 1), false)
191191 }
192192
193193 let $t056215687 = {
194194 let $l = LENDERS_APR_PERIODS
195195 let $s = size($l)
196196 let $acc0 = $Tuple2(0, false)
197197 func $f0_1 ($a,$i) = if (($i >= $s))
198198 then $a
199199 else for($a, $l[$i])
200200
201201 func $f0_2 ($a,$i) = if (($i >= $s))
202202 then $a
203203 else throw("List size exceeds 9")
204204
205205 $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)
206206 }
207207 let index = $t056215687._1
208208 let found = $t056215687._2
209209 if (found)
210210 then fraction((LENDERS_APR[index] * SCALE8), 7, 365)
211211 else 0
212212 }
213213
214214
215215 func getTotalSupplyAllTokens () = {
216216 func for (a,tokenId) = {
217217 let $t058755931 = a
218218 let totalSupply = $t058755931._1
219219 let totalSupplyUsd = $t058755931._2
220220 let totalSupplyUsdAll = $t058755931._3
221221 let tSupply = valueOrElse(getInteger(lendContract, (kLendTokenSupply + tokenId)), 0)
222222 let assetPrice = getAssetPrice(tokenId)
223223 let assetPrecision = getAssetPrecision(tokenId)
224224 let tSupplyUsd = fraction(tSupply, assetPrice, assetPrecision)
225225 $Tuple3((totalSupply :+ tSupply), (totalSupplyUsd :+ tSupplyUsd), (totalSupplyUsdAll + tSupplyUsd))
226226 }
227227
228228 let $l = getAllTokens()
229229 let $s = size($l)
230230 let $acc0 = $Tuple3(nil, nil, 0)
231231 func $f0_1 ($a,$i) = if (($i >= $s))
232232 then $a
233233 else for($a, $l[$i])
234234
235235 func $f0_2 ($a,$i) = if (($i >= $s))
236236 then $a
237237 else throw("List size exceeds 30")
238238
239239 $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)
240240 }
241241
242242
243243 func getTotalSupplyUsd (tokenId) = {
244244 let tSupply = valueOrElse(getInteger(lendContract, (kLendTokenSupply + tokenId)), 0)
245245 let assetPrice = getAssetPrice(tokenId)
246246 let assetPrecision = getAssetPrecision(tokenId)
247247 fraction(tSupply, assetPrice, assetPrecision)
248248 }
249249
250250
251251 func calcNewTokenInterest (tokenId,totalSupply) = if ((startHeight >= height))
252252 then 0
253253 else {
254254 let rewardPerBlock = getIntegerValue(this, (tokenId + kTokenRewardPerBlock))
255255 let oldInterest = getIntegerValue(this, (tokenId + kTokenInterest))
256256 let updateHeight = getIntegerValue(this, (tokenId + kTokenInterestHeight))
257257 let reward = ((height - updateHeight) * rewardPerBlock)
258258 let interest = if ((totalSupply > 0))
259259 then fraction(reward, SCALE8, totalSupply)
260260 else 0
261261 (oldInterest + interest)
262262 }
263263
264264
265265 func calcNewLpInterest (totalSupply) = if ((startHeight >= height))
266266 then 0
267267 else {
268268 let rewardPerBlock = valueOrElse(getInteger(this, kLpRewardPerBlock), 0)
269269 let oldInterest = valueOrElse(getInteger(this, kLpInterest), 0)
270270 let updateHeight = valueOrElse(getInteger(this, kLpInterestHeight), height)
271271 let reward = ((height - updateHeight) * rewardPerBlock)
272272 let interest = if ((totalSupply > 0))
273273 then fraction(reward, SCALE8, totalSupply)
274274 else 0
275275 (oldInterest + interest)
276276 }
277277
278278
279279 func calcLendUserReward (user,tokenId) = {
280280 let totalSupply = valueOrElse(getInteger(lendContract, (kLendTokenSupply + tokenId)), 0)
281281 let tokenInterest = calcNewTokenInterest(tokenId, totalSupply)
282282 let userSupply = valueOrElse(getInteger(lendContract, ((user + kLendUserSupply) + tokenId)), 0)
283283 let userTokenInterest = valueOrElse(getInteger(this, (((tokenId + "_") + user) + kUserLendInterest)), if ((userSupply == 0))
284284 then tokenInterest
285285 else 0)
286286 let reward = fraction(userSupply, (tokenInterest - userTokenInterest), SCALE8)
287287 $Tuple3(reward, tokenInterest, userSupply)
288288 }
289289
290290
291291 func calcLpUserReward (user) = {
292292 let totalSupply = valueOrElse(getInteger(sfFarmingContract, (axlyPool + kSFTotalSupply)), 0)
293293 let tokenInterest = calcNewLpInterest(totalSupply)
294294 let userSupply = valueOrElse(getInteger(sfFarmingContract, (((axlyPool + "_") + user) + kSFUserTotalSupply)), 0)
295295 let userTokenInterest = valueOrElse(getInteger(this, (user + kUserLpInterest)), if ((userSupply == 0))
296296 then tokenInterest
297297 else 0)
298298 let reward = fraction(userSupply, (tokenInterest - userTokenInterest), SCALE8)
299299 $Tuple3(reward, tokenInterest, userSupply)
300300 }
301301
302302
303303 func claimLenderRewardsCommon (user,readOnly) = {
304304 func claim (a,tokenId) = {
305305 let $t088208864 = a
306306 let tokenIds = $t088208864._1
307307 let cAmount = $t088208864._2
308308 let total = $t088208864._3
309309 let enteries = $t088208864._4
310310 let userAvailableClaim = valueOrElse(getInteger(this, (((tokenId + "_") + user) + kUserLendAvailableClaim)), 0)
311311 let $t089779056 = calcLendUserReward(user, tokenId)
312312 let uReward = $t089779056._1
313313 let newTokenInterest = $t089779056._2
314314 let userSupply = $t089779056._3
315315 let totalToClaim = (userAvailableClaim + uReward)
316316 if (if ((totalToClaim > 0))
317317 then true
318318 else (userSupply > 0))
319319 then {
320320 let newEntreries = if (if (readOnly)
321321 then true
322322 else (totalToClaim == 0))
323323 then enteries
324324 else (enteries ++ [IntegerEntry((((tokenId + "_") + user) + kUserLendInterest), newTokenInterest), IntegerEntry((((tokenId + "_") + user) + kUserLendAvailableClaim), 0), IntegerEntry((tokenId + kTokenInterest), newTokenInterest), IntegerEntry((tokenId + kTokenInterestHeight), height)])
325325 $Tuple4((tokenIds :+ tokenId), (cAmount :+ totalToClaim), (total + totalToClaim), newEntreries)
326326 }
327327 else $Tuple4(tokenIds, cAmount, total, enteries)
328328 }
329329
330330 let $l = getAllTokens()
331331 let $s = size($l)
332332 let $acc0 = $Tuple4(nil, nil, 0, nil)
333333 func $f0_1 ($a,$i) = if (($i >= $s))
334334 then $a
335335 else claim($a, $l[$i])
336336
337337 func $f0_2 ($a,$i) = if (($i >= $s))
338338 then $a
339339 else throw("List size exceeds 30")
340340
341341 $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)
342342 }
343343
344344
345345 func claimLpRewardsCommon (user,readOnly) = {
346346 let userAvailableClaim = valueOrElse(getInteger(this, (user + kUserLpAvailableClaim)), 0)
347347 let $t0998710052 = calcLpUserReward(user)
348348 let uReward = $t0998710052._1
349349 let newLpInterest = $t0998710052._2
350350 let userSupply = $t0998710052._3
351351 let totalToClaim = (userAvailableClaim + uReward)
352352 if (if (readOnly)
353353 then true
354354 else (totalToClaim == 0))
355355 then $Tuple2(totalToClaim, nil)
356356 else $Tuple2(totalToClaim, [IntegerEntry((user + kUserLpInterest), newLpInterest), IntegerEntry((user + kUserLpAvailableClaim), 0), IntegerEntry(kLpInterest, newLpInterest), IntegerEntry(kLpInterestHeight, height)])
357357 }
358358
359359
360360 func getTokensAPRs () = {
361361 let axlyPrice = getAssetPrice(axlyId)
362362 let axlyPrecision = getAssetPrecision(axlyId)
363363 func tokensAprs (apr,tokenId) = {
364364 let rwpb = valueOrElse(getInteger(this, (tokenId + kTokenRewardPerBlock)), 0)
365365 let rwpbUsd = fraction(rwpb, axlyPrice, axlyPrecision)
366366 let rwYear = ((rwpbUsd * periodLength) * 52)
367367 let totalSupplyUsd = getTotalSupplyUsd(tokenId)
368368 (apr :+ fraction(rwYear, SCALE8, totalSupplyUsd))
369369 }
370370
371371 let aprs = {
372372 let $l = getAllTokens()
373373 let $s = size($l)
374374 let $acc0 = nil
375375 func $f0_1 ($a,$i) = if (($i >= $s))
376376 then $a
377377 else tokensAprs($a, $l[$i])
378378
379379 func $f0_2 ($a,$i) = if (($i >= $s))
380380 then $a
381381 else throw("List size exceeds 30")
382382
383383 $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)
384384 }
385385 let lpTotalSupply = getIntegerValue(sfFarmingContract, (axlyPool + kSFTotalSupply))
386386 let lpId = getStringValue(addressFromStringValue(axlyPool), kLpId)
387387 let lpPrecision = getAssetPrecision(lpId)
388388 let lpPrice = {
389389 let @ = invoke(mainContract, "getShareAssetPriceREADONLY", [lpId], nil)
390390 if ($isInstanceOf(@, "Int"))
391391 then @
392392 else throw(($getType(@) + " couldn't be cast to Int"))
393393 }
394394 let lpTotalSupplyUsd = fraction(lpTotalSupply, lpPrice, lpPrecision)
395395 let rwpb = valueOrElse(getInteger(this, kLpRewardPerBlock), 0)
396396 let rwpbUsd = fraction(rwpb, axlyPrice, axlyPrecision)
397397 let rwYear = ((rwpbUsd * periodLength) * 52)
398398 let lpApr = fraction(rwYear, SCALE8, lpTotalSupplyUsd)
399399 $Tuple3(getAllTokens(), aprs, lpApr)
400400 }
401401
402402
403403 @Callable(i)
404404 func claimLenderRewards () = {
405405 let claimRes = claimLenderRewardsCommon(toString(i.caller), false)
406406 if ((claimRes._3 == 0))
407407 then throw("claim amount must be greater than 0")
408408 else {
409409 let inv = invoke(tokenContract, "withdrawLendReward", [claimRes._3, toString(i.caller)], nil)
410410 if ((inv == inv))
411411 then claimRes._4
412412 else throw("Strict value is not equal to itself.")
413413 }
414414 }
415415
416416
417417
418418 @Callable(i)
419419 func claimLpRewards () = {
420420 let claimRes = claimLpRewardsCommon(toString(i.caller), false)
421421 if ((claimRes._1 == 0))
422422 then throw("claim amount must be greater than 0")
423423 else {
424424 let inv = invoke(tokenContract, "withdrawLpReward", [claimRes._1, toString(i.caller)], nil)
425425 if ((inv == inv))
426426 then claimRes._2
427427 else throw("Strict value is not equal to itself.")
428428 }
429429 }
430430
431431
432432
433433 @Callable(i)
434434 func lendAction (user,tokenId) = valueOrElse(isLandCall(i), {
435- let userAvailableClaim = valueOrElse(getInteger(this, (tokenId + kUserLendAvailableClaim)), 0)
436- let $t01239912466 = calcLendUserReward(user, tokenId)
437- let uReward = $t01239912466._1
438- let newTokenInterest = $t01239912466._2
435+ let userAvailableClaim = valueOrElse(getInteger(this, (((tokenId + "_") + user) + kUserLendAvailableClaim)), 0)
436+ let $t01241212479 = calcLendUserReward(user, tokenId)
437+ let uReward = $t01241212479._1
438+ let newTokenInterest = $t01241212479._2
439439 [IntegerEntry((((tokenId + "_") + user) + kUserLendInterest), newTokenInterest), IntegerEntry((((tokenId + "_") + user) + kUserLendAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry((tokenId + kTokenInterest), newTokenInterest), IntegerEntry((tokenId + kTokenInterestHeight), height)]
440440 })
441441
442442
443443
444444 @Callable(i)
445445 func lpAction (user) = valueOrElse(isSFFarmingCall(i), {
446- let userAvailableClaim = valueOrElse(getInteger(this, kUserLpAvailableClaim), 0)
447- let $t01293112984 = calcLpUserReward(user)
448- let uReward = $t01293112984._1
449- let newLpInterest = $t01293112984._2
446+ let userAvailableClaim = valueOrElse(getInteger(this, (user + kUserLpAvailableClaim)), 0)
447+ let $t01295113004 = calcLpUserReward(user)
448+ let uReward = $t01295113004._1
449+ let newLpInterest = $t01295113004._2
450450 [IntegerEntry((user + kUserLpInterest), newLpInterest), IntegerEntry((user + kUserLpAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry(kLpInterest, newLpInterest), IntegerEntry(kLpInterestHeight, height)]
451451 })
452452
453453
454454
455455 @Callable(i)
456456 func init (axlyMainContractAddr,axlyTokenomicContractAddr,axlyPoolAddr,farmingStartHeight,periodLength) = valueOrElse(isSelfCall(i), if (!(isDefined(addressFromString(axlyMainContractAddr))))
457457 then throw("Wrong farming address")
458458 else if (!(isDefined(addressFromString(axlyTokenomicContractAddr))))
459459 then throw("Wrong main contract address")
460460 else [StringEntry(kAxlyMainContract, axlyMainContractAddr), StringEntry(kAxlyTokenomicContract, axlyTokenomicContractAddr), StringEntry(kAxlyPool, axlyPoolAddr), IntegerEntry(kStartHeight, farmingStartHeight), IntegerEntry(kPeriodLength, periodLength)])
461461
462462
463463
464464 @Callable(i)
465465 func initNewToken (tokenId) = valueOrElse(isAdminCall(i), if (isDefined(getInteger(this, (tokenId + kTokenInterest))))
466466 then throw("token already inited")
467467 else if (!(contains(getStringValue(lendContract, kLendSetupTokens), tokenId)))
468468 then throw("no token on landing")
469469 else {
470470 let newAllTokens = (getAllTokens() :+ tokenId)
471471 [IntegerEntry((tokenId + kTokenInterest), 0), IntegerEntry((tokenId + kTokenInterestHeight), max([startHeight, height])), StringEntry(kTokens, makeString(newAllTokens, ",")), IntegerEntry((tokenId + kTokenRewardPerBlock), 0)]
472472 })
473473
474474
475475
476476 @Callable(i)
477477 func updateRewards () = valueOrElse(isOperatorCall(i), {
478478 let lastUpdatePeriod = valueOrElse(getInteger(this, kLastUpdatePeriod), 0)
479479 let calcPeriod = (((height - startHeight) / periodLength) + 1)
480480 let curPeriod = if ((0 >= calcPeriod))
481481 then 1
482482 else calcPeriod
483483 if ((curPeriod > 104))
484484 then throw("max period is 104")
485485 else if (if ((lastUpdatePeriod >= curPeriod))
486486 then (lastUpdatePeriod != 0)
487487 else false)
488488 then throw("rewards alredy updated in this period")
489489 else {
490- let $t01492815008 = getTotalSupplyAllTokens()
491- let totalSupply = $t01492815008._1
492- let totalSupplyUsd = $t01492815008._2
493- let totalSupplyUsdAll = $t01492815008._3
490+ let $t01494815028 = getTotalSupplyAllTokens()
491+ let totalSupply = $t01494815028._1
492+ let totalSupplyUsd = $t01494815028._2
493+ let totalSupplyUsdAll = $t01494815028._3
494494 let axlyPrice = getAssetPrice(axlyId)
495495 let axlyPrecision = getAssetPrecision(axlyId)
496496 let maxAPR = getAdoptedAPRByPeriod(curPeriod, LENDERS_APR_PERIODS, LENDERS_APR)
497497 func updateReward (a,tokenId) = {
498- let $t01525715301 = a
499- let enteries = $t01525715301._1
500- let totalPeriodReward = $t01525715301._2
501- let index = $t01525715301._3
498+ let $t01527715321 = a
499+ let enteries = $t01527715321._1
500+ let totalPeriodReward = $t01527715321._2
501+ let index = $t01527715321._3
502502 if ((totalSupply[index] == 0))
503503 then $Tuple3((enteries ++ [IntegerEntry((tokenId + kPrevLendTokenSupply), totalSupply[index]), IntegerEntry((tokenId + kTokenRewardPerBlock), 0), IntegerEntry((tokenId + kTokenInterest), calcNewTokenInterest(tokenId, totalSupply[index])), IntegerEntry((tokenId + kTokenInterestHeight), max([startHeight, height]))]), totalPeriodReward, (index + 1))
504504 else {
505505 let share = fraction(totalSupplyUsd[index], SCALE8, totalSupplyUsdAll)
506506 let maxReward = fraction(share, lendMaxPeriodAmount, SCALE8)
507507 let maxRewardUsd = fraction(maxReward, axlyPrice, axlyPrecision)
508508 let prevTotalSupply = valueOrElse(getInteger(this, (tokenId + kPrevLendTokenSupply)), 0)
509509 let rtCoef = if (if ((prevTotalSupply == 0))
510510 then true
511511 else (totalSupply[index] == 0))
512512 then 0
513513 else (fraction(totalSupply[index], SCALE8, prevTotalSupply) - SCALE8)
514514 let reward = ((min([(maxAPR * (SCALE8 + max([rtCoef, 0]))), fraction(maxAPR, (15 * SCALE8), 10)]) / SCALE8) / 100)
515515 let rewardUsd = min([maxRewardUsd, fraction(totalSupplyUsd[index], reward, SCALE8)])
516516 let rewardPeriod = fraction(rewardUsd, axlyPrecision, axlyPrice)
517517 let rewardPerBlock = (rewardPeriod / periodLength)
518518 $Tuple3((enteries ++ [IntegerEntry((tokenId + kPrevLendTokenSupply), totalSupply[index]), IntegerEntry((tokenId + kTokenRewardPerBlock), rewardPerBlock), IntegerEntry((tokenId + kTokenInterest), calcNewTokenInterest(tokenId, totalSupply[index])), IntegerEntry((tokenId + kTokenInterestHeight), max([startHeight, height]))]), (totalPeriodReward + rewardPeriod), (index + 1))
519519 }
520520 }
521521
522- let $t01699317085 = {
522+ let $t01701317105 = {
523523 let $l = getAllTokens()
524524 let $s = size($l)
525525 let $acc0 = $Tuple3(nil, 0, 0)
526526 func $f0_1 ($a,$i) = if (($i >= $s))
527527 then $a
528528 else updateReward($a, $l[$i])
529529
530530 func $f0_2 ($a,$i) = if (($i >= $s))
531531 then $a
532532 else throw("List size exceeds 30")
533533
534534 $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)
535535 }
536- let tokensEnteries = $t01699317085._1
537- let totalTokenReward = $t01699317085._2
536+ let tokensEnteries = $t01701317105._1
537+ let totalTokenReward = $t01701317105._2
538538 let lpMaxAPR = getAdoptedAPRByPeriod(curPeriod, LP_APR_PERIODS, LP_APR)
539539 let lpTotalSupply = getIntegerValue(sfFarmingContract, (axlyPool + kSFTotalSupply))
540540 let preLPSupply = valueOrElse(getInteger(this, kPrevLPSupply), 0)
541541 let lpId = getStringValue(addressFromStringValue(axlyPool), kLpId)
542542 let lpPrecision = getAssetPrecision(lpId)
543543 let lpPrice = {
544544 let @ = invoke(mainContract, "getShareAssetPriceREADONLY", [lpId], nil)
545545 if ($isInstanceOf(@, "Int"))
546546 then @
547547 else throw(($getType(@) + " couldn't be cast to Int"))
548548 }
549549 let lpTotalSupplyUsd = fraction(lpTotalSupply, lpPrice, lpPrecision)
550550 let maxLPRewardUsd = fraction(lpMaxPeriodAmount, axlyPrice, axlyPrecision)
551551 let rtLPCoef = if (if ((preLPSupply == 0))
552552 then true
553553 else (lpTotalSupply == 0))
554554 then 0
555555 else (fraction(lpTotalSupply, SCALE8, preLPSupply) - SCALE8)
556556 let rewardLp = ((min([(lpMaxAPR * (SCALE8 + max([rtLPCoef, 0]))), fraction(lpMaxAPR, (15 * SCALE8), 10)]) / SCALE8) / 100)
557557 let rewardLpUsd = min([maxLPRewardUsd, fraction(lpTotalSupplyUsd, rewardLp, SCALE8)])
558558 let rewardLpPeriod = fraction(rewardLpUsd, axlyPrecision, axlyPrice)
559559 let rewardLpPerBlock = (rewardLpPeriod / periodLength)
560560 let burnLend = (lendMaxPeriodAmount - totalTokenReward)
561561 let burnLp = (lpMaxPeriodAmount - rewardLpPeriod)
562562 let inv = invoke(tokenContract, "withdrawLpReward", [(burnLend + burnLp), toString(this)], nil)
563563 if ((inv == inv))
564564 then {
565565 let lpEnteries = if ((12 >= curPeriod))
566566 then [IntegerEntry(kPrevLPSupply, lpTotalSupply), IntegerEntry(kLpRewardPerBlock, rewardLpPerBlock), IntegerEntry(kLpInterest, calcNewLpInterest(lpTotalSupply)), IntegerEntry(kLpInterestHeight, max([startHeight, height])), ScriptTransfer(Address(base58'3MsXJ3BesPECkYejzBQGHZPJT8GVYy4Fd3Q'), burnLend, fromBase58String(axlyId)), ScriptTransfer(Address(base58'3MsXJ3BesPECkYejzBQGHZPJT8GVYy4Fd3Q'), burnLp, fromBase58String(axlyId))]
567567 else nil
568568 ((lpEnteries ++ tokensEnteries) :+ IntegerEntry(kLastUpdatePeriod, curPeriod))
569569 }
570570 else throw("Strict value is not equal to itself.")
571571 }
572572 })
573573
574574
575575 @Verifier(tx)
576576 func verify () = {
577577 let multiSignedByAdmins = {
578578 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK))
579579 then 1
580580 else 0
581581 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], admin2PK))
582582 then 1
583583 else 0
584584 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], admin3PK))
585585 then 1
586586 else 0
587587 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
588588 }
589589 match tx {
590590 case inv: InvokeScriptTransaction =>
591591 let isSelf = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
592592 let isRightFee = if ((inv.fee == 900000))
593593 then (inv.feeAssetId == unit)
594594 else false
595595 let isInitCall = (inv.function == "init")
596596 let isnoPayments = (size(inv.payments) == 0)
597597 if (if (if (if (isRightFee)
598598 then isInitCall
599599 else false)
600600 then isSelf
601601 else false)
602602 then isnoPayments
603603 else false)
604604 then true
605605 else multiSignedByAdmins
606606 case _ =>
607607 multiSignedByAdmins
608608 }
609609 }
610610

github/deemru/w8io/169f3d6 
74.47 ms