tx · 3Muxo8JT5srpriJ1V38zbBEXjBym6x5WHoU8JGrZfxfX

3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC:  -0.01400000 Waves

2021.04.27 18:18 [1501028] smart account 3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC > SELF 0.00000000 Waves

{ "type": 13, "id": "3Muxo8JT5srpriJ1V38zbBEXjBym6x5WHoU8JGrZfxfX", "fee": 1400000, "feeAssetId": null, "timestamp": 1619536762753, "version": 2, "chainId": 84, "sender": "3MsjAKkxKjxVU4gC1BpJ1jKmAZyRufUCErC", "senderPublicKey": "FQ5JNhUjFS3Ty3nSykXrGWHDt4NvXJDCv4JQiJ3dXmKa", "proofs": [ "2NYASEAmGNkEMByFvMKo9CyYt3XDWeHwHoeoyakmGVEZCZvc6TEWxmrCbaZcQezf4BaXq1JrPg1aqHMpmGPFnnyY" ], "script": "base64:AAIEAAAAAAAAACEIAhIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgMKAQgAAABKAAAAAAxhZG1pblB1YktleTEBAAAAILoJ1zuJWaTRXaD/8bsz0KrhOWkPy+K9kdY77k9eqOATAAAAAAxhZG1pblB1YktleTIBAAAAIMKRRJmz0rC0DSKlkVi9iLyhN7sIy//djOaU71sWDn5AAAAAAAxhZG1pblB1YktleTMBAAAAII4eFy54sQc79EhOejMoYHYod/yZ5ZIwoyDCz6ir6Q5VAAAAABRrZXlTaGFyZVRva2Vuc0xvY2tlZAIAAAAaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAAAAAHGtleVJld2FyZFBvb2xGcmFjdGlvbkN1cnJlbnQCAAAAHV9jdXJyZW50X3Bvb2xfZnJhY3Rpb25fcmV3YXJkAAAAAB1rZXlSZXdhcmRQb29sRnJhY3Rpb25QcmV2aW91cwIAAAAeX3ByZXZpb3VzX3Bvb2xfZnJhY3Rpb25fcmV3YXJkAAAAAB1rZXlUb3RhbFJld2FyZFBlckJsb2NrQ3VycmVudAIAAAAedG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AAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAEGtleUF2YWlsYWJsZVNXT1AAAAAAAAAAAAAJAARMAAAAAgkBAAAAB1JlaXNzdWUAAAADBQAAAARTV09QBQAAAA1hdmFpbGFibGVGdW5kBgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAGGtleVVzZXJTV09QQ2xhaW1lZEFtb3VudAUAAAAUdXNlckNsYWltZWRBbW91bnROZXcJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAABHBvb2wCAAAAAV8JAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyBQAAABxrZXlVc2VyU1dPUExhc3RDbGFpbWVkQW1vdW50BQAAAAtjbGFpbUFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADWF2YWlsYWJsZUZ1bmQFAAAABFNXT1AFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleTcj4IY=", "height": 1501028, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J9ZNaeuBxmgfG8qwqjVGw5YDoEeb3FNQb1qTAHt9DW6c Next: BfriY1aHoJmeqHCRgQBssfrfdtn213LV8xynCtetdqmR Diff:
OldNewDifferences
7070 let oneWeekInBlock = 10106
7171
7272 let totalVoteShare = 10000000000
73+
74+let scaleValue6 = 1000000
75+
76+let scaleValue8 = 100000000
7377
7478 func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA)
7579
233237 let shareAssetId = getShareAssetId(pool)
234238 let scaleValue = calcScaleValue(SWOP, shareAssetId)
235239 let shareTokenLocked = getTotalShareTokenLocked(pool)
236- let $t01006510130 = getLastInterestInfo(pool)
237- let lastInterestHeight = $t01006510130._1
238- let lastInterest = $t01006510130._2
239- let $t01013510223 = rewardInfo(pool)
240- let currentRewardPerBlock = $t01013510223._1
241- let rewardUpdateHeight = $t01013510223._2
242- let previousRewardPerBlock = $t01013510223._3
243- let $t01022810307 = getUserInterestInfo(pool, caller)
244- let userLastInterest = $t01022810307._1
245- let userShareTokensAmount = $t01022810307._2
240+ let $t01012510190 = getLastInterestInfo(pool)
241+ let lastInterestHeight = $t01012510190._1
242+ let lastInterest = $t01012510190._2
243+ let $t01019510283 = rewardInfo(pool)
244+ let currentRewardPerBlock = $t01019510283._1
245+ let rewardUpdateHeight = $t01019510283._2
246+ let previousRewardPerBlock = $t01019510283._3
247+ let $t01028810367 = getUserInterestInfo(pool, caller)
248+ let userLastInterest = $t01028810367._1
249+ let userShareTokensAmount = $t01028810367._2
246250 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
247251 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
248252 let userNewInterest = currentInterest
251255
252256
253257 func calculateProtocolReward (pool) = {
254- let $t01078110846 = getLastInterestInfo(pool)
255- let lastInterestHeight = $t01078110846._1
256- let lastInterest = $t01078110846._2
257- let $t01085210940 = rewardInfo(pool)
258- let currentRewardPerBlock = $t01085210940._1
259- let rewardUpdateHeight = $t01085210940._2
260- let previousRewardPerBlock = $t01085210940._3
258+ let $t01084110906 = getLastInterestInfo(pool)
259+ let lastInterestHeight = $t01084110906._1
260+ let lastInterest = $t01084110906._2
261+ let $t01091211000 = rewardInfo(pool)
262+ let currentRewardPerBlock = $t01091211000._1
263+ let rewardUpdateHeight = $t01091211000._2
264+ let previousRewardPerBlock = $t01091211000._3
261265 let shareTokenLocked = getTotalShareTokenLocked(pool)
262266 if ((shareTokenLocked == 0))
263267 then 0
306310 func initPoolShareFarming (pool) = if ((i.caller != this))
307311 then throw("Only the DApp itself can call this function")
308312 else {
309- let $t01287512955 = rewardInfo(pool)
310- let currentReward = $t01287512955._1
311- let rewardUpdateHeight = $t01287512955._2
312- let previousRewardPerBlock = $t01287512955._3
313+ let $t01293513015 = rewardInfo(pool)
314+ let currentReward = $t01293513015._1
315+ let rewardUpdateHeight = $t01293513015._2
316+ let previousRewardPerBlock = $t01293513015._3
313317 [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
314318 }
315319
319323 func updatePoolInterest (pool) = if ((i.caller != wallet))
320324 then throw("Only the Admin itself can call this function")
321325 else {
322- let $t01330413424 = claimCalc(pool, adminIncreaseInterestAddress, 0)
323- let userNewInterest = $t01330413424._1
324- let currentInterest = $t01330413424._2
325- let claimAmount = $t01330413424._3
326- let userShareTokensAmount = $t01330413424._4
326+ let $t01336413484 = claimCalc(pool, adminIncreaseInterestAddress, 0)
327+ let userNewInterest = $t01336413484._1
328+ let currentInterest = $t01336413484._2
329+ let claimAmount = $t01336413484._3
330+ let userShareTokensAmount = $t01336413484._4
327331 [IntegerEntry((pool + keyLastInterest), userNewInterest)]
328332 }
329333
331335
332336 @Callable(i)
333337 func lockShareTokens (pool) = {
334- let $t01355713632 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
335- let pmtAmount = $t01355713632._1
336- let pmtAssetId = $t01355713632._2
337- let $t01363713745 = claimCalc(pool, i.caller, pmtAmount)
338- let userNewInterest = $t01363713745._1
339- let currentInterest = $t01363713745._2
340- let claimAmount = $t01363713745._3
341- let userShareTokensAmount = $t01363713745._4
338+ let $t01361713692 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
339+ let pmtAmount = $t01361713692._1
340+ let pmtAssetId = $t01361713692._2
341+ let $t01369713805 = claimCalc(pool, i.caller, pmtAmount)
342+ let userNewInterest = $t01369713805._1
343+ let currentInterest = $t01369713805._2
344+ let claimAmount = $t01369713805._3
345+ let userShareTokensAmount = $t01369713805._4
342346 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
343347 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
344348 let totalShareAmount = getTotalShareTokenLocked(pool)
364368 let userSwopVote = if ((toString(currPeriod) == amountOfVoting[2]))
365369 then valueOrElse(parseInt(amountOfVoting[1]), 0)
366370 else valueOrElse(parseInt(amountOfVoting[0]), 0)
367- let swopRate = ((assetbalanceswopusdnA / 100000000) / (assetbalanceswopusdnB / 1000000))
371+ let swopRate = ((assetbalanceswopusdnA / scaleValue8) / (assetbalanceswopusdnB / scaleValue6))
368372 let votingTotal = if ((currPeriod == valueOrElse(parseInt(totalPeriod), -1)))
369373 then valueOrElse(parseInt(previosTotal), 0)
370374 else valueOrElse(parseInt(totalPeriod), 0)
376380 let shareTokenRate = if ((assetNameB(Address(fromBase58String(pool))) == "USDN"))
377381 then ((2 * assetBalanceB) / totalShareAmount)
378382 else if ((assetNameA(Address(fromBase58String(pool))) == "SWOP"))
379- then (((2 * assetBalanceB) * ((assetbalanceswopusdnA / 100000000) / (assetbalanceswopusdnB / 1000000))) / totalShareAmount)
383+ then (((2 * assetBalanceB) * ((assetbalanceswopusdnB / scaleValue8) / (assetbalanceswopusdnA / scaleValue6))) / totalShareAmount)
380384 else if ((assetNameA(Address(fromBase58String(pool))) == "WAVES"))
381- then (((2 * assetBalanceB) * ((assetbalancewavesusdnA / 100000000) / (assetbalancewavesusdnB / 1000000))) / totalShareAmount)
385+ then (((2 * assetBalanceB) * ((assetbalancewavesusdnB / scaleValue8) / (assetbalancewavesusdnA / scaleValue6))) / totalShareAmount)
382386 else 0
383387 let shareToken = ((((userSwopVote * swopRate) * harvestPower) / shareTokenRate) - userShareTokenLocked)
384388 if ((shareToken > 0))
397401 @Callable(i)
398402 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
399403 let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
400- let $t01824318343 = claimCalc(pool, i.caller, 1)
401- let userNewInterest = $t01824318343._1
402- let currentInterest = $t01824318343._2
403- let claimAmount = $t01824318343._3
404- let userShareTokensAmount = $t01824318343._4
404+ let $t01832118421 = claimCalc(pool, i.caller, 1)
405+ let userNewInterest = $t01832118421._1
406+ let currentInterest = $t01832118421._2
407+ let claimAmount = $t01832118421._3
408+ let userShareTokensAmount = $t01832118421._4
405409 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
406410 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
407411 let totalShareAmount = getTotalShareTokenLocked(pool)
418422 @Callable(i)
419423 func claim (pool) = {
420424 let shareTokenLocked = getTotalShareTokenLocked(pool)
421- let $t01983619901 = getLastInterestInfo(pool)
422- let lastInterestHeight = $t01983619901._1
423- let lastInterest = $t01983619901._2
424- let $t01990619995 = rewardInfo(pool)
425- let currentRewardPerBlock = $t01990619995._1
426- let rewardUpdateHeight = $t01990619995._2
427- let previousRewardPerBlock = $t01990619995._3
428- let $t02000020100 = claimCalc(pool, i.caller, 1)
429- let userNewInterest = $t02000020100._1
430- let currentInterest = $t02000020100._2
431- let claimAmount = $t02000020100._3
432- let userShareTokensAmount = $t02000020100._4
425+ let $t01991419979 = getLastInterestInfo(pool)
426+ let lastInterestHeight = $t01991419979._1
427+ let lastInterest = $t01991419979._2
428+ let $t01998420073 = rewardInfo(pool)
429+ let currentRewardPerBlock = $t01998420073._1
430+ let rewardUpdateHeight = $t01998420073._2
431+ let previousRewardPerBlock = $t01998420073._3
432+ let $t02007820178 = claimCalc(pool, i.caller, 1)
433+ let userNewInterest = $t02007820178._1
434+ let currentInterest = $t02007820178._2
435+ let claimAmount = $t02007820178._3
436+ let userShareTokensAmount = $t02007820178._4
433437 let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
434438 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
435439 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let adminPubKey1 = base58'DXDY2itiEcYBtGkVLnkpHtDFyWQUkoLJz79uJ7ECbMrA'
55
66 let adminPubKey2 = base58'E6Wa1SGoktYcjHjsKrvjMiqJY3SWmGKcD8Q5L8kxSPS7'
77
88 let adminPubKey3 = base58'AZmWJtuy4GeVrMmJH4hfFBRApe1StvhJSk4jcbT6bArQ'
99
1010 let keyShareTokensLocked = "_total_share_tokens_locked"
1111
1212 let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward"
1313
1414 let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward"
1515
1616 let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current"
1717
1818 let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous"
1919
2020 let keyRewardUpdateHeight = "reward_update_height"
2121
2222 let keyLastInterest = "_last_interest"
2323
2424 let keyLastInterestHeight = "_last_interest_height"
2525
2626 let keyUserShareTokensLocked = "_share_tokens_locked"
2727
2828 let keyUserLastInterest = "_last_interest"
2929
3030 let keySWOPid = "SWOP_id"
3131
3232 let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount"
3333
3434 let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount"
3535
3636 let keyAvailableSWOP = "_available_SWOP"
3737
3838 let keyFarmingStartHeight = "farming_start_height"
3939
4040 let keyAPY = "apy"
4141
4242 let kPreviousTotalVoteSWOP = "previous_total_vote_SWOP"
4343
4444 let keySwopYearEmission = "swop_year_emission"
4545
4646 let keyBalancecpmmA = "A_asset_balance"
4747
4848 let keyBalancecpmmB = "B_asset_balance"
4949
5050 let keyAssetIdA = "A_asset_id"
5151
5252 let keyAssetIdB = "B_asset_id"
5353
5454 let keyFirstHarvestHeight = "first_harvest_height"
5555
5656 let keyfirstHarvestCpmm = "first_harvest"
5757
5858 let governanceAddress = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS')
5959
6060 let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
6161
6262 let votingAddress = Address(base58'3N6CYoCsxrcXKe75pQvvV3JqJrwJjm1t4QN')
6363
6464 let swopUsdnAddress = Address(base58'3N4kooq5242vPtJzBDrmukK6ptrjRRjEBWi')
6565
6666 let wavesUsdnAddress = Address(base58'3MxtJmAsKsfof4X28MJPBtvRUyz1PbCnbhF')
6767
6868 let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
6969
7070 let oneWeekInBlock = 10106
7171
7272 let totalVoteShare = 10000000000
73+
74+let scaleValue6 = 1000000
75+
76+let scaleValue8 = 100000000
7377
7478 func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA)
7579
7680
7781 func strAssetIdB (pool) = getStringValue(pool, keyAssetIdB)
7882
7983
8084 func assetIdA (pool) = if ((strAssetIdA(pool) == "WAVES"))
8185 then unit
8286 else fromBase58String(strAssetIdA(pool))
8387
8488
8589 func assetIdB (pool) = if ((strAssetIdB(pool) == "WAVES"))
8690 then unit
8791 else fromBase58String(strAssetIdB(pool))
8892
8993
9094 let kBasePeriod = "base_period"
9195
9296 let kPeriodLength = "period_length"
9397
9498 let kStartHeight = "start_height"
9599
96100 let kFirstHarvestHeight = "first_harvest_height"
97101
98102 let kDurationFullVotePower = "duration_full_vote_power"
99103
100104 let kMinVotePower = "min_vote_power"
101105
102106 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
103107
104108 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
105109
106110 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
107111
108112 let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower")
109113
110114 let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower")
111115
112116 let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
113117
114118 let APY = getIntegerValue(this, keyAPY)
115119
116120 let SwopYearEmission = getIntegerValue(this, keySwopYearEmission)
117121
118122 func assetNameA (pool) = match assetIdA(pool) {
119123 case id: ByteVector =>
120124 value(assetInfo(id)).name
121125 case waves: Unit =>
122126 "WAVES"
123127 case _ =>
124128 throw("Match error")
125129 }
126130
127131
128132 func assetNameB (pool) = match assetIdB(pool) {
129133 case id: ByteVector =>
130134 value(assetInfo(id)).name
131135 case waves: Unit =>
132136 "WAVES"
133137 case _ =>
134138 throw("Match error")
135139 }
136140
137141
138142 let SWOP = fromBase58String(getStringValue(this, keySWOPid))
139143
140144 func isFirstHarvest (pool) = valueOrElse(getBoolean(pool, keyfirstHarvestCpmm), false)
141145
142146
143147 func getHeightFirstHarvest (pool) = valueOrElse(getInteger(pool, keyFirstHarvestHeight), 0)
144148
145149
146150 func getBalanceA (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmA), ("No data on the key: " + keyBalancecpmmA))
147151
148152
149153 func getBalanceB (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmB), ("No data on the key: " + keyBalancecpmmB))
150154
151155
152156 func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked))
153157
154158
155159 func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
156160
157161
158162 func calcScaleValue (assetId1,assetId2) = {
159163 let assetId1Decimals = value(assetInfo(assetId1)).decimals
160164 let assetId2Decimals = value(assetInfo(assetId2)).decimals
161165 let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8)
162166 pow(10, 0, scaleDigits, 0, 0, HALFDOWN)
163167 }
164168
165169
166170 func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0)
167171
168172
169173 func rewardInfo (pool) = {
170174 let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress)))
171175 let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress)))
172176 let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress)))
173177 let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress)))
174178 let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress)))
175179 let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare)
176180 let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare)
177181 if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent))
178182 then true
179183 else (rewardPoolPrevious > totalRewardPerBlockPrevious))
180184 then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious")
181185 else $Tuple3(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious)
182186 }
183187
184188
185189 func getLastInterestInfo (pool) = {
186190 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
187191 let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height)
188192 $Tuple2(lastInterestHeight, lastInterest)
189193 }
190194
191195
192196 func getUserInterestInfo (pool,userAddress) = {
193197 let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest))
194198 let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked))
195199 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
196200 let userLastInterestValue = match userLastInterest {
197201 case userLastInterest: Int =>
198202 userLastInterest
199203 case _ =>
200204 lastInterest
201205 }
202206 let userShareTokensAmount = match userShare {
203207 case userShare: Int =>
204208 userShare
205209 case _ =>
206210 0
207211 }
208212 $Tuple2(userLastInterestValue, userShareTokensAmount)
209213 }
210214
211215
212216 func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0))
213217 then 0
214218 else if ((rewardUpdateHeight > height))
215219 then {
216220 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
217221 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
218222 }
219223 else if ((lastInterestHeight > rewardUpdateHeight))
220224 then {
221225 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
222226 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
223227 }
224228 else {
225229 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
226230 let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
227231 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
228232 (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
229233 }
230234
231235
232236 func claimCalc (pool,caller,pmtAmount) = {
233237 let shareAssetId = getShareAssetId(pool)
234238 let scaleValue = calcScaleValue(SWOP, shareAssetId)
235239 let shareTokenLocked = getTotalShareTokenLocked(pool)
236- let $t01006510130 = getLastInterestInfo(pool)
237- let lastInterestHeight = $t01006510130._1
238- let lastInterest = $t01006510130._2
239- let $t01013510223 = rewardInfo(pool)
240- let currentRewardPerBlock = $t01013510223._1
241- let rewardUpdateHeight = $t01013510223._2
242- let previousRewardPerBlock = $t01013510223._3
243- let $t01022810307 = getUserInterestInfo(pool, caller)
244- let userLastInterest = $t01022810307._1
245- let userShareTokensAmount = $t01022810307._2
240+ let $t01012510190 = getLastInterestInfo(pool)
241+ let lastInterestHeight = $t01012510190._1
242+ let lastInterest = $t01012510190._2
243+ let $t01019510283 = rewardInfo(pool)
244+ let currentRewardPerBlock = $t01019510283._1
245+ let rewardUpdateHeight = $t01019510283._2
246+ let previousRewardPerBlock = $t01019510283._3
247+ let $t01028810367 = getUserInterestInfo(pool, caller)
248+ let userLastInterest = $t01028810367._1
249+ let userShareTokensAmount = $t01028810367._2
246250 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
247251 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
248252 let userNewInterest = currentInterest
249253 $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
250254 }
251255
252256
253257 func calculateProtocolReward (pool) = {
254- let $t01078110846 = getLastInterestInfo(pool)
255- let lastInterestHeight = $t01078110846._1
256- let lastInterest = $t01078110846._2
257- let $t01085210940 = rewardInfo(pool)
258- let currentRewardPerBlock = $t01085210940._1
259- let rewardUpdateHeight = $t01085210940._2
260- let previousRewardPerBlock = $t01085210940._3
258+ let $t01084110906 = getLastInterestInfo(pool)
259+ let lastInterestHeight = $t01084110906._1
260+ let lastInterest = $t01084110906._2
261+ let $t01091211000 = rewardInfo(pool)
262+ let currentRewardPerBlock = $t01091211000._1
263+ let rewardUpdateHeight = $t01091211000._2
264+ let previousRewardPerBlock = $t01091211000._3
261265 let shareTokenLocked = getTotalShareTokenLocked(pool)
262266 if ((shareTokenLocked == 0))
263267 then 0
264268 else if ((rewardUpdateHeight > height))
265269 then {
266270 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
267271 reward
268272 }
269273 else if ((lastInterestHeight > rewardUpdateHeight))
270274 then {
271275 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
272276 reward
273277 }
274278 else {
275279 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
276280 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
277281 (reward + rewardAfterLastInterestBeforeReawardUpdate)
278282 }
279283 }
280284
281285
282286 func checkPmtAssetIdCorrect (pool,pmtAssetId) = {
283287 let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
284288 if ((pmtAssetId == poolShareAssetId))
285289 then true
286290 else false
287291 }
288292
289293
290294 func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0)
291295
292296
293297 @Callable(i)
294298 func init (earlyLP) = if (isDefined(getString(this, "keySWOPid")))
295299 then throw("SWOP already initialized")
296300 else {
297301 let initAmount = 100000000000000
298302 let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true)
299303 let SWOPid = calculateAssetId(SWOPissue)
300304 [Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
301305 }
302306
303307
304308
305309 @Callable(i)
306310 func initPoolShareFarming (pool) = if ((i.caller != this))
307311 then throw("Only the DApp itself can call this function")
308312 else {
309- let $t01287512955 = rewardInfo(pool)
310- let currentReward = $t01287512955._1
311- let rewardUpdateHeight = $t01287512955._2
312- let previousRewardPerBlock = $t01287512955._3
313+ let $t01293513015 = rewardInfo(pool)
314+ let currentReward = $t01293513015._1
315+ let rewardUpdateHeight = $t01293513015._2
316+ let previousRewardPerBlock = $t01293513015._3
313317 [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
314318 }
315319
316320
317321
318322 @Callable(i)
319323 func updatePoolInterest (pool) = if ((i.caller != wallet))
320324 then throw("Only the Admin itself can call this function")
321325 else {
322- let $t01330413424 = claimCalc(pool, adminIncreaseInterestAddress, 0)
323- let userNewInterest = $t01330413424._1
324- let currentInterest = $t01330413424._2
325- let claimAmount = $t01330413424._3
326- let userShareTokensAmount = $t01330413424._4
326+ let $t01336413484 = claimCalc(pool, adminIncreaseInterestAddress, 0)
327+ let userNewInterest = $t01336413484._1
328+ let currentInterest = $t01336413484._2
329+ let claimAmount = $t01336413484._3
330+ let userShareTokensAmount = $t01336413484._4
327331 [IntegerEntry((pool + keyLastInterest), userNewInterest)]
328332 }
329333
330334
331335
332336 @Callable(i)
333337 func lockShareTokens (pool) = {
334- let $t01355713632 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
335- let pmtAmount = $t01355713632._1
336- let pmtAssetId = $t01355713632._2
337- let $t01363713745 = claimCalc(pool, i.caller, pmtAmount)
338- let userNewInterest = $t01363713745._1
339- let currentInterest = $t01363713745._2
340- let claimAmount = $t01363713745._3
341- let userShareTokensAmount = $t01363713745._4
338+ let $t01361713692 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
339+ let pmtAmount = $t01361713692._1
340+ let pmtAssetId = $t01361713692._2
341+ let $t01369713805 = claimCalc(pool, i.caller, pmtAmount)
342+ let userNewInterest = $t01369713805._1
343+ let currentInterest = $t01369713805._2
344+ let claimAmount = $t01369713805._3
345+ let userShareTokensAmount = $t01369713805._4
342346 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
343347 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
344348 let totalShareAmount = getTotalShareTokenLocked(pool)
345349 let totalShareAmountNew = (totalShareAmount + pmtAmount)
346350 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
347351 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
348352 let baseEntry = [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), availableFundsNew)]
349353 if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
350354 then throw("Incorrect pmtAssetId")
351355 else if (if (isFirstHarvest(Address(fromBase58String(pool))))
352356 then (height > (getHeightFirstHarvest(Address(fromBase58String(pool))) * periodLength))
353357 else false)
354358 then {
355359 let amountOfVoting = split(getStringValue(votingAddress, (((toString(this) + "_") + pool) + "_user_pool_struc")), "_")
356360 let previosTotalVoting = split(getStringValue(votingAddress, kPreviousTotalVoteSWOP), "_")
357361 let assetbalanceswopusdnA = valueOrElse(getIntegerValue(swopUsdnAddress, keyBalancecpmmA), 0)
358362 let assetbalanceswopusdnB = valueOrElse(getIntegerValue(swopUsdnAddress, keyBalancecpmmB), 0)
359363 let assetbalancewavesusdnA = valueOrElse(getIntegerValue(wavesUsdnAddress, keyBalancecpmmA), 0)
360364 let assetbalancewavesusdnB = valueOrElse(getIntegerValue(wavesUsdnAddress, keyBalancecpmmB), 0)
361365 let totalPeriod = previosTotalVoting[1]
362366 let previosTotal = previosTotalVoting[0]
363367 let userShareTokenLocked = userShareTokensAmount
364368 let userSwopVote = if ((toString(currPeriod) == amountOfVoting[2]))
365369 then valueOrElse(parseInt(amountOfVoting[1]), 0)
366370 else valueOrElse(parseInt(amountOfVoting[0]), 0)
367- let swopRate = ((assetbalanceswopusdnA / 100000000) / (assetbalanceswopusdnB / 1000000))
371+ let swopRate = ((assetbalanceswopusdnA / scaleValue8) / (assetbalanceswopusdnB / scaleValue6))
368372 let votingTotal = if ((currPeriod == valueOrElse(parseInt(totalPeriod), -1)))
369373 then valueOrElse(parseInt(previosTotal), 0)
370374 else valueOrElse(parseInt(totalPeriod), 0)
371375 let harvestPower = ((SwopYearEmission / votingTotal) / APY)
372376 let protocolReward = calculateProtocolReward(pool)
373377 if ((parseInt(amountOfVoting[1]) != 0))
374378 then {
375379 let assetBalanceB = getBalanceB(Address(fromBase58String(pool)))
376380 let shareTokenRate = if ((assetNameB(Address(fromBase58String(pool))) == "USDN"))
377381 then ((2 * assetBalanceB) / totalShareAmount)
378382 else if ((assetNameA(Address(fromBase58String(pool))) == "SWOP"))
379- then (((2 * assetBalanceB) * ((assetbalanceswopusdnA / 100000000) / (assetbalanceswopusdnB / 1000000))) / totalShareAmount)
383+ then (((2 * assetBalanceB) * ((assetbalanceswopusdnB / scaleValue8) / (assetbalanceswopusdnA / scaleValue6))) / totalShareAmount)
380384 else if ((assetNameA(Address(fromBase58String(pool))) == "WAVES"))
381- then (((2 * assetBalanceB) * ((assetbalancewavesusdnA / 100000000) / (assetbalancewavesusdnB / 1000000))) / totalShareAmount)
385+ then (((2 * assetBalanceB) * ((assetbalancewavesusdnB / scaleValue8) / (assetbalancewavesusdnA / scaleValue6))) / totalShareAmount)
382386 else 0
383387 let shareToken = ((((userSwopVote * swopRate) * harvestPower) / shareTokenRate) - userShareTokenLocked)
384388 if ((shareToken > 0))
385389 then if ((totalShareAmountNew >= shareToken))
386390 then (baseEntry ++ [ScriptTransfer(wallet, protocolReward, SWOP)])
387391 else throw(("You maximum share token is " + toString(shareToken)))
388392 else throw("You can't share token")
389393 }
390394 else throw("Your amount of token less than 0")
391395 }
392396 else baseEntry
393397 }
394398
395399
396400
397401 @Callable(i)
398402 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
399403 let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
400- let $t01824318343 = claimCalc(pool, i.caller, 1)
401- let userNewInterest = $t01824318343._1
402- let currentInterest = $t01824318343._2
403- let claimAmount = $t01824318343._3
404- let userShareTokensAmount = $t01824318343._4
404+ let $t01832118421 = claimCalc(pool, i.caller, 1)
405+ let userNewInterest = $t01832118421._1
406+ let currentInterest = $t01832118421._2
407+ let claimAmount = $t01832118421._3
408+ let userShareTokensAmount = $t01832118421._4
405409 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
406410 let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
407411 let totalShareAmount = getTotalShareTokenLocked(pool)
408412 let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
409413 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
410414 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
411415 if ((shareTokensWithdrawAmount > userShareTokensAmount))
412416 then throw("Withdraw amount more then user locked amount")
413417 else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), availableFundsNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)]
414418 }
415419
416420
417421
418422 @Callable(i)
419423 func claim (pool) = {
420424 let shareTokenLocked = getTotalShareTokenLocked(pool)
421- let $t01983619901 = getLastInterestInfo(pool)
422- let lastInterestHeight = $t01983619901._1
423- let lastInterest = $t01983619901._2
424- let $t01990619995 = rewardInfo(pool)
425- let currentRewardPerBlock = $t01990619995._1
426- let rewardUpdateHeight = $t01990619995._2
427- let previousRewardPerBlock = $t01990619995._3
428- let $t02000020100 = claimCalc(pool, i.caller, 1)
429- let userNewInterest = $t02000020100._1
430- let currentInterest = $t02000020100._2
431- let claimAmount = $t02000020100._3
432- let userShareTokensAmount = $t02000020100._4
425+ let $t01991419979 = getLastInterestInfo(pool)
426+ let lastInterestHeight = $t01991419979._1
427+ let lastInterest = $t01991419979._2
428+ let $t01998420073 = rewardInfo(pool)
429+ let currentRewardPerBlock = $t01998420073._1
430+ let rewardUpdateHeight = $t01998420073._2
431+ let previousRewardPerBlock = $t01998420073._3
432+ let $t02007820178 = claimCalc(pool, i.caller, 1)
433+ let userNewInterest = $t02007820178._1
434+ let currentInterest = $t02007820178._2
435+ let claimAmount = $t02007820178._3
436+ let userShareTokensAmount = $t02007820178._4
433437 let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
434438 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
435439 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
436440 if ((availableFund == 0))
437441 then throw("You have 0 available SWOP")
438442 else [IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.caller)) + keyAvailableSWOP), 0), Reissue(SWOP, availableFund, true), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, availableFund, SWOP)]
439443 }
440444
441445
442446 @Verifier(tx)
443447 func verify () = match tx {
444448 case _ =>
445449 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
446450 }
447451

github/deemru/w8io/026f985 
69.68 ms