tx · HsgABABQU9j6fhArukcLfhNuoyVrenxUQj7cujjbtTob

3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn:  -0.02300000 Waves

2023.08.17 14:12 [2714518] smart account 3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn > SELF 0.00000000 Waves

{ "type": 13, "id": "HsgABABQU9j6fhArukcLfhNuoyVrenxUQj7cujjbtTob", "fee": 2300000, "feeAssetId": null, "timestamp": 1692270807059, "version": 2, "chainId": 84, "sender": "3N2M4PztorHwrfENp7D6LhYGgGodjiD1fjn", "senderPublicKey": "Fj9LPkCtmW3pDnVU6wPQnvqpZJCBieWSvZqY5FAGeCyp", "proofs": [ "5bpyryTAPVPHo8Y4JNzgHeN8QfYQCfJVJ3zv4ZUP7AeXKYa7bGnStEEbSBNWkJ9GxbxRrr8MfhuqjJkcCJTrcYja", "SdheJ1HZX49xWSPjiGWmS1BXFjLzofZjBRZB1Sgfgzm7jaK6qsdt5kzmSoqPwp7FVxfrz2ifqAer7rvjUgAJELN" ], "script": "base64:BgIhCAISABIAEgQKAggIEgMKAQgSBwoFCAgIAQESAwoBCBIAUQAGU0NBTEU4AIDC1y8AC0xFTkRFUlNfQVBSCQDMCAIAlgEJAMwIAgB4CQDMCAIAZAkAzAgCAFAJAMwIAgA8CQDMCAIAKAkAzAgCAB4JAMwIAgAUCQDMCAIACgUDbmlsABNMRU5ERVJTX0FQUl9QRVJJT0RTCQDMCAICAzEtMQkAzAgCAgMyLTIJAMwIAgIDMy0zCQDMCAICAzQtNAkAzAgCAgM1LTgJAMwIAgIEOS0xMgkAzAgCAgcxNCAtIDE2CQDMCAICBTE3LTIwCQDMCAICBjIwLTEwNAUDbmlsABNMRU5ERVJTX01BWF9QRVJJT0RTAGgABkxQX0FQUgkAzAgCAJYBCQDMCAIAeAkAzAgCAGQJAMwIAgBQCQDMCAIAPAkAzAgCACgFA25pbAAOTFBfQVBSX1BFUklPRFMJAMwIAgIDMS0xCQDMCAICAzItMgkAzAgCAgMzLT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Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5BAppc1JpZ2h0RmVlAwkAAAIIBQNpbnYDZmVlAKD3NgkAAAIIBQNpbnYKZmVlQXNzZXRJZAUEdW5pdAcECmlzSW5pdENhbGwJAAACCAUDaW52CGZ1bmN0aW9uAgRpbml0BAxpc25vUGF5bWVudHMJAAACCQCQAwEIBQNpbnYIcGF5bWVudHMAAAMDAwMFCmlzUmlnaHRGZWUFCmlzSW5pdENhbGwHBQZpc1NlbGYHBQxpc25vUGF5bWVudHMHBgUTbXVsdGlTaWduZWRCeUFkbWlucwUTbXVsdGlTaWduZWRCeUFkbWlucxwhBdU=", "height": 2714518, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8qRLHzPe2YAh37ehvXAD1Tte7ywnJK2j27zR5fiQDMkg Next: AaJfjphPicUsARKyY6bVziu4JTwjbb2GnxMq7op9RaDu Diff:
OldNewDifferences
244244 }
245245
246246
247-func calcNewTokenInterest (tokenId,totalSupply) = {
248- let rewardPerBlock = getIntegerValue(this, (tokenId + kTokenRewardPerBlock))
249- let oldInterest = getIntegerValue(this, (tokenId + kTokenInterest))
250- let updateHeight = getIntegerValue(this, (tokenId + kTokenInterestHeight))
251- let reward = ((height - updateHeight) * rewardPerBlock)
252- let interest = if ((totalSupply > 0))
253- then fraction(reward, SCALE8, totalSupply)
254- else 0
255- (oldInterest + interest)
256- }
247+func calcNewTokenInterest (tokenId,totalSupply) = if ((height >= startHeight))
248+ then 0
249+ else {
250+ let rewardPerBlock = getIntegerValue(this, (tokenId + kTokenRewardPerBlock))
251+ let oldInterest = getIntegerValue(this, (tokenId + kTokenInterest))
252+ let updateHeight = getIntegerValue(this, (tokenId + kTokenInterestHeight))
253+ let reward = ((height - updateHeight) * rewardPerBlock)
254+ let interest = if ((totalSupply > 0))
255+ then fraction(reward, SCALE8, totalSupply)
256+ else 0
257+ (oldInterest + interest)
258+ }
257259
258260
259-func calcNewLpInterest (totalSupply) = {
260- let rewardPerBlock = getIntegerValue(this, kLpRewardPerBlock)
261- let oldInterest = getIntegerValue(this, kLpInterest)
262- let updateHeight = getIntegerValue(this, kLpInterestHeight)
263- let reward = ((height - updateHeight) * rewardPerBlock)
264- let interest = if ((totalSupply > 0))
265- then fraction(reward, SCALE8, totalSupply)
266- else 0
267- (oldInterest + interest)
268- }
261+func calcNewLpInterest (totalSupply) = if ((height >= startHeight))
262+ then 0
263+ else {
264+ let rewardPerBlock = getIntegerValue(this, kLpRewardPerBlock)
265+ let oldInterest = getIntegerValue(this, kLpInterest)
266+ let updateHeight = getIntegerValue(this, kLpInterestHeight)
267+ let reward = ((height - updateHeight) * rewardPerBlock)
268+ let interest = if ((totalSupply > 0))
269+ then fraction(reward, SCALE8, totalSupply)
270+ else 0
271+ (oldInterest + interest)
272+ }
269273
270274
271275 func calcLendUserReward (user,tokenId) = {
294298
295299 func claimLenderRewardsCommon (user,readOnly) = {
296300 func claim (a,tokenId) = {
297- let $t086758719 = a
298- let tokenIds = $t086758719._1
299- let cAmount = $t086758719._2
300- let total = $t086758719._3
301- let enteries = $t086758719._4
301+ let $t087538797 = a
302+ let tokenIds = $t087538797._1
303+ let cAmount = $t087538797._2
304+ let total = $t087538797._3
305+ let enteries = $t087538797._4
302306 let userAvailableClaim = valueOrElse(getInteger(this, (((tokenId + "_") + user) + kUserLendAvailableClaim)), 0)
303- let $t088328911 = calcLendUserReward(user, tokenId)
304- let uReward = $t088328911._1
305- let newTokenInterest = $t088328911._2
306- let userSupply = $t088328911._3
307+ let $t089108989 = calcLendUserReward(user, tokenId)
308+ let uReward = $t089108989._1
309+ let newTokenInterest = $t089108989._2
310+ let userSupply = $t089108989._3
307311 let totalToClaim = (userAvailableClaim + uReward)
308312 if (if ((totalToClaim > 0))
309313 then true
336340
337341 func claimLpRewardsCommon (user,readOnly) = {
338342 let userAvailableClaim = valueOrElse(getInteger(this, (user + kUserLpAvailableClaim)), 0)
339- let $t098389903 = calcLpUserReward(user)
340- let uReward = $t098389903._1
341- let newLpInterest = $t098389903._2
342- let userSupply = $t098389903._3
343+ let $t099169981 = calcLpUserReward(user)
344+ let uReward = $t099169981._1
345+ let newLpInterest = $t099169981._2
346+ let userSupply = $t099169981._3
343347 let totalToClaim = (userAvailableClaim + uReward)
344348 if (if (readOnly)
345349 then true
430434 @Callable(i)
431435 func lendAction (user,tokenId) = valueOrElse(isLandCall(i), {
432436 let userAvailableClaim = valueOrElse(getInteger(this, (tokenId + kUserLendAvailableClaim)), 0)
433- let $t01226512332 = calcLendUserReward(user, tokenId)
434- let uReward = $t01226512332._1
435- let newTokenInterest = $t01226512332._2
437+ let $t01234312410 = calcLendUserReward(user, tokenId)
438+ let uReward = $t01234312410._1
439+ let newTokenInterest = $t01234312410._2
436440 [IntegerEntry((((user + "_") + tokenId) + kUserLendInterest), newTokenInterest), IntegerEntry((((user + "_") + tokenId) + kUserLendAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry((tokenId + kTokenInterest), newTokenInterest), IntegerEntry((tokenId + kTokenInterestHeight), height)]
437441 })
438442
441445 @Callable(i)
442446 func lpAction (user) = valueOrElse(isSFFarmingCall(i), {
443447 let userAvailableClaim = valueOrElse(getInteger(this, kUserLpAvailableClaim), 0)
444- let $t01279712850 = calcLpUserReward(user)
445- let uReward = $t01279712850._1
446- let newLpInterest = $t01279712850._2
448+ let $t01287512928 = calcLpUserReward(user)
449+ let uReward = $t01287512928._1
450+ let newLpInterest = $t01287512928._2
447451 [IntegerEntry((user + kUserLpInterest), newLpInterest), IntegerEntry((user + kUserLpAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry((user + kLpInterest), newLpInterest), IntegerEntry((user + kLpInterestHeight), height)]
448452 })
449453
473477 if (((lastUpdateHeight + periodLength) > height))
474478 then throw("rewards alredy updated in this period")
475479 else {
476- let $t01452614606 = getTotalSupplyAllTokens()
477- let totalSupply = $t01452614606._1
478- let totalSupplyUsd = $t01452614606._2
479- let totalSupplyUsdAll = $t01452614606._3
480+ let $t01460314683 = getTotalSupplyAllTokens()
481+ let totalSupply = $t01460314683._1
482+ let totalSupplyUsd = $t01460314683._2
483+ let totalSupplyUsdAll = $t01460314683._3
480484 let axlyPrice = getAssetPrice(axlyId)
481485 let axlyPrecision = getAssetPrecision(axlyId)
482486 let maxAPR = getAdoptedAPRByPeriod(curPeriod, LENDERS_APR_PERIODS, LENDERS_APR)
483487 func updateReward (a,tokenId) = {
484- let $t01485014875 = a
485- let enteries = $t01485014875._1
486- let index = $t01485014875._2
488+ let $t01492714952 = a
489+ let enteries = $t01492714952._1
490+ let index = $t01492714952._2
487491 if ((totalSupply[index] == 0))
488492 then $Tuple2((enteries ++ [IntegerEntry((tokenId + kTokenRewardPerBlock), 0), IntegerEntry((tokenId + kTokenInterest), calcNewTokenInterest(tokenId, totalSupply[index])), IntegerEntry((tokenId + kTokenInterestHeight), height)]), (index + 1))
489493 else {
504508 }
505509 }
506510
507- let $t01634616418 = {
511+ let $t01642316495 = {
508512 let $l = allTokens
509513 let $s = size($l)
510514 let $acc0 = $Tuple2(nil, 0)
518522
519523 $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)
520524 }
521- let tokensEnteries = $t01634616418._1
522- let index = $t01634616418._2
525+ let tokensEnteries = $t01642316495._1
526+ let index = $t01642316495._2
523527 let lpMaxAPR = getAdoptedAPRByPeriod(curPeriod, LP_APR_PERIODS, LP_APR)
524528 let lpTotalSupply = getIntegerValue(sfFarmingContract, (axlyPool + kSFTotalSupply))
525529 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 = ((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 let allTokens = split(getStringValue(this, kTokens), ",")
129129
130130 func isAdminCall (i) = if (containsElement([admin1PK, admin2PK, admin3PK], i.callerPublicKey))
131131 then unit
132132 else throw("Only admin group1 can call this function")
133133
134134
135135 func isSelfCall (i) = if ((i.caller == this))
136136 then unit
137137 else throw("Only contract itself can call this function")
138138
139139
140140 func isOperatorCall (i) = if ((i.callerPublicKey == operatorPK))
141141 then unit
142142 else throw("Only operator can call this function")
143143
144144
145145 func isLandCall (i) = if ((i.caller == lendContract))
146146 then unit
147147 else throw("Only land contract can call this function")
148148
149149
150150 func isSFFarmingCall (i) = if ((i.caller == sfFarmingContract))
151151 then unit
152152 else throw("Only land contract can call this function")
153153
154154
155155 func getAssetPrice (assetId) = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
156156
157157
158158 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
159159 then 8
160160 else match assetInfo(fromBase58String(assetId)) {
161161 case asset: Asset =>
162162 asset.decimals
163163 case _ =>
164164 throw("Can't find asset")
165165 }
166166
167167
168168 func getAssetPrecision (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN)
169169
170170
171171 func getAdoptedAPRByPeriod (period,aprPeriods,apr) = {
172172 func for (a,aperiod) = {
173173 let $t053405362 = a
174174 let index = $t053405362._1
175175 let found = $t053405362._2
176176 let ft = split(aperiod, "-")
177177 let $t053995462 = $Tuple2(parseIntValue(ft[0]), parseIntValue(ft[1]))
178178 let from = $t053995462._1
179179 let to = $t053995462._2
180180 if (found)
181181 then a
182182 else if (if ((period >= from))
183183 then (to >= period)
184184 else false)
185185 then $Tuple2(index, true)
186186 else $Tuple2((index + 1), false)
187187 }
188188
189189 let $t055995665 = {
190190 let $l = LENDERS_APR_PERIODS
191191 let $s = size($l)
192192 let $acc0 = $Tuple2(0, false)
193193 func $f0_1 ($a,$i) = if (($i >= $s))
194194 then $a
195195 else for($a, $l[$i])
196196
197197 func $f0_2 ($a,$i) = if (($i >= $s))
198198 then $a
199199 else throw("List size exceeds 9")
200200
201201 $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)
202202 }
203203 let index = $t055995665._1
204204 let found = $t055995665._2
205205 if (found)
206206 then fraction((LENDERS_APR[index] * SCALE8), 7, 365)
207207 else 0
208208 }
209209
210210
211211 func getTotalSupplyAllTokens () = {
212212 func for (a,tokenId) = {
213213 let $t058535909 = a
214214 let totalSupply = $t058535909._1
215215 let totalSupplyUsd = $t058535909._2
216216 let totalSupplyUsdAll = $t058535909._3
217217 let tSupply = valueOrElse(getInteger(lendContract, (kLendTokenSupply + tokenId)), 0)
218218 let assetPrice = getAssetPrice(tokenId)
219219 let assetPrecision = getAssetPrecision(tokenId)
220220 let tSupplyUsd = fraction(tSupply, assetPrice, assetPrecision)
221221 $Tuple3((totalSupply :+ tSupply), (totalSupplyUsd :+ tSupplyUsd), (totalSupplyUsdAll + tSupplyUsd))
222222 }
223223
224224 let $l = allTokens
225225 let $s = size($l)
226226 let $acc0 = $Tuple3(nil, nil, 0)
227227 func $f0_1 ($a,$i) = if (($i >= $s))
228228 then $a
229229 else for($a, $l[$i])
230230
231231 func $f0_2 ($a,$i) = if (($i >= $s))
232232 then $a
233233 else throw("List size exceeds 30")
234234
235235 $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)
236236 }
237237
238238
239239 func getTotalSupplyUsd (tokenId) = {
240240 let tSupply = valueOrElse(getInteger(lendContract, (kLendTokenSupply + tokenId)), 0)
241241 let assetPrice = getAssetPrice(tokenId)
242242 let assetPrecision = getAssetPrecision(tokenId)
243243 fraction(tSupply, assetPrice, assetPrecision)
244244 }
245245
246246
247-func calcNewTokenInterest (tokenId,totalSupply) = {
248- let rewardPerBlock = getIntegerValue(this, (tokenId + kTokenRewardPerBlock))
249- let oldInterest = getIntegerValue(this, (tokenId + kTokenInterest))
250- let updateHeight = getIntegerValue(this, (tokenId + kTokenInterestHeight))
251- let reward = ((height - updateHeight) * rewardPerBlock)
252- let interest = if ((totalSupply > 0))
253- then fraction(reward, SCALE8, totalSupply)
254- else 0
255- (oldInterest + interest)
256- }
247+func calcNewTokenInterest (tokenId,totalSupply) = if ((height >= startHeight))
248+ then 0
249+ else {
250+ let rewardPerBlock = getIntegerValue(this, (tokenId + kTokenRewardPerBlock))
251+ let oldInterest = getIntegerValue(this, (tokenId + kTokenInterest))
252+ let updateHeight = getIntegerValue(this, (tokenId + kTokenInterestHeight))
253+ let reward = ((height - updateHeight) * rewardPerBlock)
254+ let interest = if ((totalSupply > 0))
255+ then fraction(reward, SCALE8, totalSupply)
256+ else 0
257+ (oldInterest + interest)
258+ }
257259
258260
259-func calcNewLpInterest (totalSupply) = {
260- let rewardPerBlock = getIntegerValue(this, kLpRewardPerBlock)
261- let oldInterest = getIntegerValue(this, kLpInterest)
262- let updateHeight = getIntegerValue(this, kLpInterestHeight)
263- let reward = ((height - updateHeight) * rewardPerBlock)
264- let interest = if ((totalSupply > 0))
265- then fraction(reward, SCALE8, totalSupply)
266- else 0
267- (oldInterest + interest)
268- }
261+func calcNewLpInterest (totalSupply) = if ((height >= startHeight))
262+ then 0
263+ else {
264+ let rewardPerBlock = getIntegerValue(this, kLpRewardPerBlock)
265+ let oldInterest = getIntegerValue(this, kLpInterest)
266+ let updateHeight = getIntegerValue(this, kLpInterestHeight)
267+ let reward = ((height - updateHeight) * rewardPerBlock)
268+ let interest = if ((totalSupply > 0))
269+ then fraction(reward, SCALE8, totalSupply)
270+ else 0
271+ (oldInterest + interest)
272+ }
269273
270274
271275 func calcLendUserReward (user,tokenId) = {
272276 let totalSupply = valueOrElse(getInteger(lendContract, (kLendTokenSupply + tokenId)), 0)
273277 let tokenInterest = calcNewTokenInterest(tokenId, totalSupply)
274278 let userSupply = valueOrElse(getInteger(lendContract, ((user + kLendUserSupply) + tokenId)), 0)
275279 let userTokenInterest = valueOrElse(getInteger(this, (((tokenId + "_") + user) + kUserLendInterest)), if ((userSupply == 0))
276280 then tokenInterest
277281 else 0)
278282 let reward = fraction(userSupply, (tokenInterest - userTokenInterest), SCALE8)
279283 $Tuple3(reward, tokenInterest, userSupply)
280284 }
281285
282286
283287 func calcLpUserReward (user) = {
284288 let totalSupply = valueOrElse(getInteger(sfFarmingContract, (axlyPool + kSFTotalSupply)), 0)
285289 let tokenInterest = calcNewLpInterest(totalSupply)
286290 let userSupply = valueOrElse(getInteger(lendContract, (((axlyPool + "_") + user) + kSFUserTotalSupply)), 0)
287291 let userTokenInterest = valueOrElse(getInteger(this, (user + kUserLpInterest)), if ((userSupply == 0))
288292 then tokenInterest
289293 else 0)
290294 let reward = fraction(userSupply, (tokenInterest - userTokenInterest), SCALE8)
291295 $Tuple3(reward, tokenInterest, userSupply)
292296 }
293297
294298
295299 func claimLenderRewardsCommon (user,readOnly) = {
296300 func claim (a,tokenId) = {
297- let $t086758719 = a
298- let tokenIds = $t086758719._1
299- let cAmount = $t086758719._2
300- let total = $t086758719._3
301- let enteries = $t086758719._4
301+ let $t087538797 = a
302+ let tokenIds = $t087538797._1
303+ let cAmount = $t087538797._2
304+ let total = $t087538797._3
305+ let enteries = $t087538797._4
302306 let userAvailableClaim = valueOrElse(getInteger(this, (((tokenId + "_") + user) + kUserLendAvailableClaim)), 0)
303- let $t088328911 = calcLendUserReward(user, tokenId)
304- let uReward = $t088328911._1
305- let newTokenInterest = $t088328911._2
306- let userSupply = $t088328911._3
307+ let $t089108989 = calcLendUserReward(user, tokenId)
308+ let uReward = $t089108989._1
309+ let newTokenInterest = $t089108989._2
310+ let userSupply = $t089108989._3
307311 let totalToClaim = (userAvailableClaim + uReward)
308312 if (if ((totalToClaim > 0))
309313 then true
310314 else (userSupply > 0))
311315 then {
312316 let newEntreries = if (if (readOnly)
313317 then true
314318 else (totalToClaim == 0))
315319 then enteries
316320 else (enteries ++ [IntegerEntry((((tokenId + "_") + user) + kUserLendInterest), newTokenInterest), IntegerEntry((((tokenId + "_") + user) + kUserLendAvailableClaim), 0), IntegerEntry((tokenId + kTokenInterest), newTokenInterest), IntegerEntry((tokenId + kTokenInterestHeight), height)])
317321 $Tuple4((tokenIds :+ tokenId), (cAmount :+ totalToClaim), (total + totalToClaim), newEntreries)
318322 }
319323 else $Tuple4(tokenIds, cAmount, total, enteries)
320324 }
321325
322326 let $l = allTokens
323327 let $s = size($l)
324328 let $acc0 = $Tuple4(nil, nil, 0, nil)
325329 func $f0_1 ($a,$i) = if (($i >= $s))
326330 then $a
327331 else claim($a, $l[$i])
328332
329333 func $f0_2 ($a,$i) = if (($i >= $s))
330334 then $a
331335 else throw("List size exceeds 30")
332336
333337 $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)
334338 }
335339
336340
337341 func claimLpRewardsCommon (user,readOnly) = {
338342 let userAvailableClaim = valueOrElse(getInteger(this, (user + kUserLpAvailableClaim)), 0)
339- let $t098389903 = calcLpUserReward(user)
340- let uReward = $t098389903._1
341- let newLpInterest = $t098389903._2
342- let userSupply = $t098389903._3
343+ let $t099169981 = calcLpUserReward(user)
344+ let uReward = $t099169981._1
345+ let newLpInterest = $t099169981._2
346+ let userSupply = $t099169981._3
343347 let totalToClaim = (userAvailableClaim + uReward)
344348 if (if (readOnly)
345349 then true
346350 else (totalToClaim == 0))
347351 then $Tuple2(totalToClaim, nil)
348352 else $Tuple2(totalToClaim, [IntegerEntry((user + kUserLpInterest), newLpInterest), IntegerEntry((user + kUserLpAvailableClaim), 0), IntegerEntry(kLpInterest, newLpInterest), IntegerEntry(kLpInterestHeight, height)])
349353 }
350354
351355
352356 func getTokensAPRs () = {
353357 let axlyPrice = getAssetPrice(axlyId)
354358 let axlyPrecision = getAssetPrecision(axlyId)
355359 func tokensAprs (apr,tokenId) = {
356360 let rwpb = valueOrElse(getInteger(this, (tokenId + kTokenRewardPerBlock)), 0)
357361 let rwpbUsd = fraction(rwpb, axlyPrice, axlyPrecision)
358362 let rwYear = ((rwpbUsd * periodLength) * 52)
359363 let totalSupplyUsd = getTotalSupplyUsd(tokenId)
360364 (apr :+ fraction(rwYear, SCALE8, totalSupplyUsd))
361365 }
362366
363367 let aprs = {
364368 let $l = allTokens
365369 let $s = size($l)
366370 let $acc0 = nil
367371 func $f0_1 ($a,$i) = if (($i >= $s))
368372 then $a
369373 else tokensAprs($a, $l[$i])
370374
371375 func $f0_2 ($a,$i) = if (($i >= $s))
372376 then $a
373377 else throw("List size exceeds 30")
374378
375379 $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)
376380 }
377381 let lpTotalSupply = getIntegerValue(sfFarmingContract, (axlyPool + kSFTotalSupply))
378382 let lpId = getStringValue(addressFromStringValue(axlyPool), kLpId)
379383 let lpPrecision = getAssetPrecision(lpId)
380384 let lpPrice = {
381385 let @ = ({
382386 let @ = invoke(mainContract, "getShareAssetPriceREADONLY", [[lpId]], nil)
383387 if ($isInstanceOf(@, "List[Any]"))
384388 then @
385389 else throw(($getType(@) + " couldn't be cast to List[Any]"))
386390 })[0]
387391 if ($isInstanceOf(@, "Int"))
388392 then @
389393 else throw(($getType(@) + " couldn't be cast to Int"))
390394 }
391395 let lpTotalSupplyUsd = fraction(lpTotalSupply, lpPrice, lpPrecision)
392396 let rwpb = valueOrElse(getInteger(this, kLpRewardPerBlock), 0)
393397 let rwpbUsd = fraction(rwpb, axlyPrice, axlyPrecision)
394398 let rwYear = ((rwpbUsd * periodLength) * 52)
395399 let lpApr = fraction(rwYear, SCALE8, lpTotalSupplyUsd)
396400 $Tuple3(allTokens, aprs, lpApr)
397401 }
398402
399403
400404 @Callable(i)
401405 func claimLenderRewards () = {
402406 let claimRes = claimLenderRewardsCommon(toString(i.caller), false)
403407 if ((claimRes._3 == 0))
404408 then throw("claim amount must be greater than 0")
405409 else {
406410 let inv = invoke(tokenContract, "withdrawLendReward", [claimRes._3, toString(i.caller)], nil)
407411 if ((inv == inv))
408412 then claimRes._4
409413 else throw("Strict value is not equal to itself.")
410414 }
411415 }
412416
413417
414418
415419 @Callable(i)
416420 func claimLpRewards () = {
417421 let claimRes = claimLpRewardsCommon(toString(i.caller), false)
418422 if ((claimRes._1 == 0))
419423 then throw("claim amount must be greater than 0")
420424 else {
421425 let inv = invoke(tokenContract, "withdrawLpReward", [claimRes._1, toString(i.caller)], nil)
422426 if ((inv == inv))
423427 then claimRes._2
424428 else throw("Strict value is not equal to itself.")
425429 }
426430 }
427431
428432
429433
430434 @Callable(i)
431435 func lendAction (user,tokenId) = valueOrElse(isLandCall(i), {
432436 let userAvailableClaim = valueOrElse(getInteger(this, (tokenId + kUserLendAvailableClaim)), 0)
433- let $t01226512332 = calcLendUserReward(user, tokenId)
434- let uReward = $t01226512332._1
435- let newTokenInterest = $t01226512332._2
437+ let $t01234312410 = calcLendUserReward(user, tokenId)
438+ let uReward = $t01234312410._1
439+ let newTokenInterest = $t01234312410._2
436440 [IntegerEntry((((user + "_") + tokenId) + kUserLendInterest), newTokenInterest), IntegerEntry((((user + "_") + tokenId) + kUserLendAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry((tokenId + kTokenInterest), newTokenInterest), IntegerEntry((tokenId + kTokenInterestHeight), height)]
437441 })
438442
439443
440444
441445 @Callable(i)
442446 func lpAction (user) = valueOrElse(isSFFarmingCall(i), {
443447 let userAvailableClaim = valueOrElse(getInteger(this, kUserLpAvailableClaim), 0)
444- let $t01279712850 = calcLpUserReward(user)
445- let uReward = $t01279712850._1
446- let newLpInterest = $t01279712850._2
448+ let $t01287512928 = calcLpUserReward(user)
449+ let uReward = $t01287512928._1
450+ let newLpInterest = $t01287512928._2
447451 [IntegerEntry((user + kUserLpInterest), newLpInterest), IntegerEntry((user + kUserLpAvailableClaim), (userAvailableClaim + uReward)), IntegerEntry((user + kLpInterest), newLpInterest), IntegerEntry((user + kLpInterestHeight), height)]
448452 })
449453
450454
451455
452456 @Callable(i)
453457 func init (axlyMainContractAddr,axlyTokenomicContractAddr,axlyPoolAddr,farmingStartHeight,periodLength) = valueOrElse(isSelfCall(i), if (!(isDefined(addressFromString(axlyMainContractAddr))))
454458 then throw("Wrong farming address")
455459 else if (!(isDefined(addressFromString(axlyTokenomicContractAddr))))
456460 then throw("Wrong main contract address")
457461 else [StringEntry(kAxlyMainContract, axlyMainContractAddr), StringEntry(kAxlyTokenomicContract, axlyTokenomicContractAddr), StringEntry(kAxlyPool, axlyPoolAddr), IntegerEntry(kStartHeight, farmingStartHeight), StringEntry(kTokens, "")])
458462
459463
460464
461465 @Callable(i)
462466 func initNewToken (tokenId) = valueOrElse(isAdminCall(i), if (isDefined(getInteger(this, (tokenId + kTokenInterest))))
463467 then throw("token already inited")
464468 else if (!(contains(getStringValue(this, kLendSetupTokens), tokenId)))
465469 then throw("no token on landing")
466470 else [IntegerEntry((tokenId + kTokenInterest), 0), IntegerEntry((tokenId + kTokenInterestHeight), height), StringEntry(kTokens, makeString((allTokens :+ tokenId), ",")), IntegerEntry(kTokenRewardPerBlock, 0)])
467471
468472
469473
470474 @Callable(i)
471475 func updateRewards () = valueOrElse(isOperatorCall(i), {
472476 let lastUpdateHeight = valueOrElse(getInteger(this, kRewardUpdateHeight), 0)
473477 if (((lastUpdateHeight + periodLength) > height))
474478 then throw("rewards alredy updated in this period")
475479 else {
476- let $t01452614606 = getTotalSupplyAllTokens()
477- let totalSupply = $t01452614606._1
478- let totalSupplyUsd = $t01452614606._2
479- let totalSupplyUsdAll = $t01452614606._3
480+ let $t01460314683 = getTotalSupplyAllTokens()
481+ let totalSupply = $t01460314683._1
482+ let totalSupplyUsd = $t01460314683._2
483+ let totalSupplyUsdAll = $t01460314683._3
480484 let axlyPrice = getAssetPrice(axlyId)
481485 let axlyPrecision = getAssetPrecision(axlyId)
482486 let maxAPR = getAdoptedAPRByPeriod(curPeriod, LENDERS_APR_PERIODS, LENDERS_APR)
483487 func updateReward (a,tokenId) = {
484- let $t01485014875 = a
485- let enteries = $t01485014875._1
486- let index = $t01485014875._2
488+ let $t01492714952 = a
489+ let enteries = $t01492714952._1
490+ let index = $t01492714952._2
487491 if ((totalSupply[index] == 0))
488492 then $Tuple2((enteries ++ [IntegerEntry((tokenId + kTokenRewardPerBlock), 0), IntegerEntry((tokenId + kTokenInterest), calcNewTokenInterest(tokenId, totalSupply[index])), IntegerEntry((tokenId + kTokenInterestHeight), height)]), (index + 1))
489493 else {
490494 let share = fraction(totalSupplyUsd[index], SCALE8, totalSupplyUsdAll)
491495 let maxReward = fraction(share, lendMaxPeriodAmount, SCALE8)
492496 let maxRewardUsd = fraction(maxReward, axlyPrice, axlyPrecision)
493497 let prevTotalSupply = valueOrElse(getInteger(this, kPrevLendTokenSupply), 0)
494498 let rtCoef = if (if ((prevTotalSupply == 0))
495499 then true
496500 else (totalSupply[index] == 0))
497501 then 0
498502 else fraction(prevTotalSupply, SCALE8, totalSupply[index])
499503 let reward = (min([(maxAPR * (SCALE8 + rtCoef)), fraction(maxAPR, (15 * SCALE8), 10)]) / SCALE8)
500504 let rewardUsd = min([maxRewardUsd, fraction(totalSupplyUsd[index], reward, SCALE8)])
501505 let rewardPeriod = fraction(rewardUsd, axlyPrice, axlyPrecision)
502506 let rewardPerBlock = (rewardPeriod / periodLength)
503507 $Tuple2((enteries ++ [IntegerEntry((tokenId + kPrevLendTokenSupply), totalSupply[index]), IntegerEntry((tokenId + kTokenRewardPerBlock), rewardPerBlock), IntegerEntry((tokenId + kTokenInterest), calcNewTokenInterest(tokenId, totalSupply[index])), IntegerEntry((tokenId + kTokenInterestHeight), height)]), (index + 1))
504508 }
505509 }
506510
507- let $t01634616418 = {
511+ let $t01642316495 = {
508512 let $l = allTokens
509513 let $s = size($l)
510514 let $acc0 = $Tuple2(nil, 0)
511515 func $f0_1 ($a,$i) = if (($i >= $s))
512516 then $a
513517 else updateReward($a, $l[$i])
514518
515519 func $f0_2 ($a,$i) = if (($i >= $s))
516520 then $a
517521 else throw("List size exceeds 30")
518522
519523 $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)
520524 }
521- let tokensEnteries = $t01634616418._1
522- let index = $t01634616418._2
525+ let tokensEnteries = $t01642316495._1
526+ let index = $t01642316495._2
523527 let lpMaxAPR = getAdoptedAPRByPeriod(curPeriod, LP_APR_PERIODS, LP_APR)
524528 let lpTotalSupply = getIntegerValue(sfFarmingContract, (axlyPool + kSFTotalSupply))
525529 let preLPSupply = valueOrElse(getInteger(this, kPrevLPSupply), 0)
526530 let lpId = getStringValue(addressFromStringValue(axlyPool), kLpId)
527531 let lpPrecision = getAssetPrecision(lpId)
528532 let lpPrice = {
529533 let @ = ({
530534 let @ = invoke(mainContract, "getShareAssetPriceREADONLY", [[lpId]], nil)
531535 if ($isInstanceOf(@, "List[Any]"))
532536 then @
533537 else throw(($getType(@) + " couldn't be cast to List[Any]"))
534538 })[0]
535539 if ($isInstanceOf(@, "Int"))
536540 then @
537541 else throw(($getType(@) + " couldn't be cast to Int"))
538542 }
539543 let lpTotalSupplyUsd = fraction(lpTotalSupply, lpPrice, lpPrecision)
540544 let maxLPRewardUsd = fraction(lpMaxPeriodAmount, axlyPrice, axlyPrecision)
541545 let rtLPCoef = if (if ((preLPSupply == 0))
542546 then true
543547 else (lpTotalSupply == 0))
544548 then 0
545549 else fraction(preLPSupply, SCALE8, lpTotalSupply)
546550 let rewardLp = (min([(lpMaxAPR * (SCALE8 + rtLPCoef)), fraction(lpMaxAPR, (15 * SCALE8), 10)]) / SCALE8)
547551 let rewardLpUsd = min([maxLPRewardUsd, fraction(lpTotalSupplyUsd, rewardLp, SCALE8)])
548552 let rewardLpPeriod = fraction(rewardLpUsd, axlyPrice, axlyPrecision)
549553 let rewardLpPerBlock = (rewardLpPeriod / periodLength)
550554 let lpEnteries = [IntegerEntry(kPrevLPSupply, lpTotalSupply), IntegerEntry(kLpRewardPerBlock, rewardLpPerBlock), IntegerEntry(kLpInterest, calcNewLpInterest(lpTotalSupply)), IntegerEntry(kLpInterestHeight, height)]
551555 ((lpEnteries ++ tokensEnteries) :+ IntegerEntry(kRewardUpdateHeight, height))
552556 }
553557 })
554558
555559
556560 @Verifier(tx)
557561 func verify () = {
558562 let multiSignedByAdmins = {
559563 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK))
560564 then 1
561565 else 0
562566 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], admin2PK))
563567 then 1
564568 else 0
565569 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], admin3PK))
566570 then 1
567571 else 0
568572 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
569573 }
570574 match tx {
571575 case inv: InvokeScriptTransaction =>
572576 let isSelf = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
573577 let isRightFee = if ((inv.fee == 900000))
574578 then (inv.feeAssetId == unit)
575579 else false
576580 let isInitCall = (inv.function == "init")
577581 let isnoPayments = (size(inv.payments) == 0)
578582 if (if (if (if (isRightFee)
579583 then isInitCall
580584 else false)
581585 then isSelf
582586 else false)
583587 then isnoPayments
584588 else false)
585589 then true
586590 else multiSignedByAdmins
587591 case _ =>
588592 multiSignedByAdmins
589593 }
590594 }
591595

github/deemru/w8io/026f985 
76.46 ms