tx · 6qrvDNhEuVsToo6PAahMEfyniiTG32cFtvZYqeopzLYf

3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT:  -0.20300000 Waves

2022.06.30 10:45 [2118884] smart account 3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT > SELF 0.00000000 Waves

{ "type": 13, "id": "6qrvDNhEuVsToo6PAahMEfyniiTG32cFtvZYqeopzLYf", "fee": 20300000, "feeAssetId": null, "timestamp": 1656575205327, "version": 2, "chainId": 84, "sender": "3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT", "senderPublicKey": "3ijdmxaYrpDFsKVbQH2kvB7i6JzHj9bep9bGWiQPra2D", "proofs": [ "3KBGKxZKFkiwPsWLHd9fjm3g4ESG4yCV4SXahMTdSqSjSYVfPwkQkKWmM4hv8sXjmJuUouKmMMTQjen7rPv1mXBB", "21gf2nCiHDJbT7Vv4h2YsxFLFHk6r9wfVKXuL6wrJt45t1deWxWX8E68Wqio5uNykKgupBmP8LayjeqawPkN9uk4" ], "script": "base64:BgIlCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIECgIIARIDCgEIEgASAGYAFGtleVNoYXJlVG9rZW5zTG9ja2VkAhpfdG90YWxfc2hhcmVfdG9rZW5zX2xvY2tlZAALa1NoYXJlTGltaXQCHHNoYXJlX2xpbWl0X29uX2ZpcnN0X2hhcnZlc3QACWtleUFjdGl2ZQIGYWN0aXZlAA1rT3JhY2xlQWN0aXZlAhRhY3RpdmVfYWxsX2NvbnRyYWN0cwAIa2V5Q2F1c2UCDnNodXRkb3duX2NhdXNlABxrZXlSZXdhcmRQb29sRnJhY3Rpb25DdXJyZW50Ah1fY3VycmVudF9wb29sX2ZyYWN0aW9uX3Jld2FyZAAda2V5UmV3YXJkUG9vbEZyYWN0aW9uUHJldmlvdXMCHl9wcmV2aW91c19wb29sX2ZyYWN0aW9uX3Jld2FyZAAVa2V5SGVpZ2h0UG9vbEZyYWN0aW9uAhpfcG9vbF9yZXdhcmRfdXB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VkBRJhZG1pblB1YktleTNTaWduZWQAAiEGxxg=", "height": 2118884, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GtPPpj9uqMYgi57c6QfvDQnyV8yS2u4CnSFZSLrfYW4g Next: 4TSJTX4TAcaSJDXrZQXTW3aVNTKdMqijyFC7rBfsmvLt Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy'
5-
6-let adminPubKey2 = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk'
7-
8-let adminPubKey3 = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP'
9-
104 let keyShareTokensLocked = "_total_share_tokens_locked"
115
126 let kShareLimit = "share_limit_on_first_harvest"
137
148 let keyActive = "active"
9+
10+let kOracleActive = "active_all_contracts"
1511
1612 let keyCause = "shutdown_cause"
1713
7369
7470 let keyTempCurSum = "sum_reward_current"
7571
76-let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
77-
78-let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
79-
80-let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
81-
82-let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
83-
8472 let oneWeekInBlock = 10106
8573
8674 let totalVoteShare = 10000000000
9684 let scaleValue8 = 100000000
9785
9886 let scaleValue11 = 100000000000
87+
88+let kAdminPubKey1 = "admin_pub_1"
89+
90+let kAdminPubKey2 = "admin_pub_2"
91+
92+let kAdminPubKey3 = "admin_pub_3"
93+
94+let kAdminInvokePubKey = "admin_invoke_pub"
95+
96+let kMoneyBoxAddress = "money_box_address"
97+
98+let kVotingAddress = "voting_address"
99+
100+let kGovAddress = "governance_address"
101+
102+let kFarmingAddress = "farming_address"
103+
104+let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
105+
106+func getBase58FromOracle (key) = match getString(oracle, key) {
107+ case string: String =>
108+ fromBase58String(string)
109+ case nothing =>
110+ throw((key + "is empty"))
111+}
112+
113+
114+let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
115+
116+let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
117+
118+let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
119+
120+let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
121+
122+let votingAddress = Address(getBase58FromOracle(kVotingAddress))
123+
124+let govAddress = Address(getBase58FromOracle(kGovAddress))
125+
126+let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey)
99127
100128 func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA)
101129
135163
136164 let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower")
137165
138-let isActive = getBooleanValue(this, keyActive)
166+let isActive = if (getBooleanValue(oracle, kOracleActive))
167+ then getBooleanValue(this, keyActive)
168+ else false
139169
140170 let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
141171
215245 let assetId1Decimals = value(assetInfo(assetId1)).decimals
216246 let assetId2Decimals = value(assetInfo(assetId2)).decimals
217247 let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8)
218- pow(10, 0, scaleDigits, 0, 0, HALFDOWN)
248+ pow(10, 0, scaleDigits, 0, 0, DOWN)
219249 }
220250
221251
223253
224254
225255 func rewardInfo (pool) = {
226- let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress)))
227- let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress)))
228- let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress)))
229- let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress)))
230- let poolRewardUpdateHeight = valueOrElse(getInteger(governanceAddress, (pool + keyHeightPoolFraction)), 0)
231- let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress)))
256+ let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(govAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(govAddress)))
257+ let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(govAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(govAddress)))
258+ let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(govAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(govAddress)))
259+ let rewardUpdateHeight = valueOrErrorMessage(getInteger(govAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(govAddress)))
260+ let poolRewardUpdateHeight = valueOrElse(getInteger(govAddress, (pool + keyHeightPoolFraction)), 0)
261+ let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(govAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(govAddress)))
232262 let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare)
233263 let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare)
234264 if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent))
320350 let shareAssetId = getShareAssetId(pool)
321351 let scaleValue = calcScaleValue(SWOP, shareAssetId)
322352 let shareTokenLocked = getTotalShareTokenLocked(pool)
323- let $t01309513160 = getLastInterestInfo(pool)
324- let lastInterestHeight = $t01309513160._1
325- let lastInterest = $t01309513160._2
326- let $t01316513277 = rewardInfo(pool)
327- let currentRewardPerBlock = $t01316513277._1
328- let rewardUpdateHeight = $t01316513277._2
329- let previousRewardPerBlock = $t01316513277._3
330- let poolRewardUpdateHeight = $t01316513277._4
331- let $t01328213361 = getUserInterestInfo(pool, caller)
332- let userLastInterest = $t01328213361._1
333- let userShareTokensAmount = $t01328213361._2
353+ let $t01353813603 = getLastInterestInfo(pool)
354+ let lastInterestHeight = $t01353813603._1
355+ let lastInterest = $t01353813603._2
356+ let $t01360813720 = rewardInfo(pool)
357+ let currentRewardPerBlock = $t01360813720._1
358+ let rewardUpdateHeight = $t01360813720._2
359+ let previousRewardPerBlock = $t01360813720._3
360+ let poolRewardUpdateHeight = $t01360813720._4
361+ let $t01372513804 = getUserInterestInfo(pool, caller)
362+ let userLastInterest = $t01372513804._1
363+ let userShareTokensAmount = $t01372513804._2
334364 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
335365 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
336366 let userNewInterest = currentInterest
339369
340370
341371 func calculateProtocolReward (pool) = {
342- let $t01387913944 = getLastInterestInfo(pool)
343- let lastInterestHeight = $t01387913944._1
344- let lastInterest = $t01387913944._2
345- let $t01394914060 = rewardInfo(pool)
346- let currentRewardPerBlock = $t01394914060._1
347- let rewardUpdateHeight = $t01394914060._2
348- let previousRewardPerBlock = $t01394914060._3
349- let poolRewardUpdateHeight = $t01394914060._4
372+ let $t01432214387 = getLastInterestInfo(pool)
373+ let lastInterestHeight = $t01432214387._1
374+ let lastInterest = $t01432214387._2
375+ let $t01439214503 = rewardInfo(pool)
376+ let currentRewardPerBlock = $t01439214503._1
377+ let rewardUpdateHeight = $t01439214503._2
378+ let previousRewardPerBlock = $t01439214503._3
379+ let poolRewardUpdateHeight = $t01439214503._4
350380 let shareTokenLocked = getTotalShareTokenLocked(pool)
351381 if (if ((shareTokenLocked == 0))
352382 then (poolRewardUpdateHeight == 0)
431461 func initPoolShareFarming (pool) = if ((i.caller != this))
432462 then throw("Only the DApp itself can call this function")
433463 else {
434- let $t01704217145 = rewardInfo(pool)
435- let currentReward = $t01704217145._1
436- let rewardUpdateHeight = $t01704217145._2
437- let previousRewardPerBlock = $t01704217145._3
438- let poolRewardUpdateHeight = $t01704217145._4
464+ let $t01748517588 = rewardInfo(pool)
465+ let currentReward = $t01748517588._1
466+ let rewardUpdateHeight = $t01748517588._2
467+ let previousRewardPerBlock = $t01748517588._3
468+ let poolRewardUpdateHeight = $t01748517588._4
439469 [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
440470 }
441471
442472
443473
444474 @Callable(i)
445-func updatePoolInterest (pool) = if ((i.caller != wallet))
475+func updatePoolInterest (pool) = if ((i.caller != moneyBoxAddress))
446476 then throw("Only the Admin itself can call this function")
447477 else if (!(isActive))
448478 then throw("DApp is inactive at this moment")
449479 else {
450- let $t01755417674 = claimCalc(pool, adminIncreaseInterestAddress, 0)
451- let userNewInterest = $t01755417674._1
452- let currentInterest = $t01755417674._2
453- let claimAmount = $t01755417674._3
454- let userShareTokensAmount = $t01755417674._4
455- let $t01767917782 = rewardInfo(pool)
456- let currentReward = $t01767917782._1
457- let rewardUpdateHeight = $t01767917782._2
458- let previousRewardPerBlock = $t01767917782._3
459- let poolRewardUpdateHeight = $t01767917782._4
480+ let $t01800618139 = claimCalc(pool, addressFromPublicKey(adminInvokePubKey), 0)
481+ let userNewInterest = $t01800618139._1
482+ let currentInterest = $t01800618139._2
483+ let claimAmount = $t01800618139._3
484+ let userShareTokensAmount = $t01800618139._4
485+ let $t01814418247 = rewardInfo(pool)
486+ let currentReward = $t01814418247._1
487+ let rewardUpdateHeight = $t01814418247._2
488+ let previousRewardPerBlock = $t01814418247._3
489+ let poolRewardUpdateHeight = $t01814418247._4
460490 [IntegerEntry((pool + keyLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterestHeight), height)]
461491 }
462492
464494
465495 @Callable(i)
466496 func lockShareTokens (pool) = {
467- let $t01797418049 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
468- let pmtAmount = $t01797418049._1
469- let pmtAssetId = $t01797418049._2
470- let $t01805418127 = getAssetInfo(pmtAssetId)
471- let pmtStrAssetId = $t01805418127._1
472- let pmtAssetName = $t01805418127._2
473- let pmtDecimals = $t01805418127._3
474- let $t01813218240 = claimCalc(pool, i.caller, pmtAmount)
475- let userNewInterest = $t01813218240._1
476- let currentInterest = $t01813218240._2
477- let claimAmount = $t01813218240._3
478- let userShareTokensAmount = $t01813218240._4
497+ let $t01843918514 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
498+ let pmtAmount = $t01843918514._1
499+ let pmtAssetId = $t01843918514._2
500+ let $t01851918592 = getAssetInfo(pmtAssetId)
501+ let pmtStrAssetId = $t01851918592._1
502+ let pmtAssetName = $t01851918592._2
503+ let pmtDecimals = $t01851918592._3
504+ let $t01859718711 = claimCalc(pool, i.originCaller, pmtAmount)
505+ let userNewInterest = $t01859718711._1
506+ let currentInterest = $t01859718711._2
507+ let claimAmount = $t01859718711._3
508+ let userShareTokensAmount = $t01859718711._4
479509 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
480- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
510+ let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount)
481511 let totalShareAmount = getTotalShareTokenLocked(pool)
482512 let totalShareAmountNew = (totalShareAmount + pmtAmount)
483- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
513+ let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.originCaller)
484514 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
485- 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)]
486- let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
487- let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_")
488- let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
489- let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_")
490- let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_")
491- let userShareTokenLocked = userShareTokensAmount
492- let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
493- then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
494- else valueOrElse(parseInt(amountOfVoting[1]), 0)
495- let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
496- then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
497- else valueOrElse(parseInt(amountPoolStract[1]), 0)
498- let protocolReward = calculateProtocolReward(pool)
499- let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
500- let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
501- if ((fraction(99, (accountBalance(pmtAssetId) + pmtAmount), 100) > totalShareAmountNew))
502- then throw("Balance of share-token is greater than totalAmount")
503- else throw("test error")
515+ let baseEntry = [IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserSWOPLastClaimedAmount), claimAmount), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyAvailableSWOP), availableFundsNew)]
516+ if ((0 >= pmtAmount))
517+ then throw("You can't lock token")
518+ else if (!(isActive))
519+ then throw("DApp is inactive at this moment")
520+ else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
521+ then throw("Incorrect pmtAssetId")
522+ else if (if (isFirstHarvest(Address(fromBase58String(pool))))
523+ then (getHeightFirstHarvest(Address(fromBase58String(pool))) > height)
524+ else false)
525+ then {
526+ let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
527+ let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.originCaller) + "_") + pool) + "_user_pool_struc")), "_")
528+ let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
529+ let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.originCaller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_")
530+ let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_")
531+ let userShareTokenLocked = userShareTokensAmount
532+ let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
533+ then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
534+ else valueOrElse(parseInt(amountOfVoting[1]), 0)
535+ let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
536+ then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
537+ else valueOrElse(parseInt(amountPoolStract[1]), 0)
538+ let protocolReward = calculateProtocolReward(pool)
539+ if ((userPoolActiveVote != 0))
540+ then {
541+ let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
542+ let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
543+ if (if ((size(amountActiveVoteUserPoolStract) > 1))
544+ then (valueOrElse(parseInt(amountActiveVoteUserPoolStract[1]), 0) >= harvestPeriod)
545+ else false)
546+ then throw("You can't share token")
547+ else if ((pmtAmount > limitShareToken))
548+ then throw(("You can't share token more than " + toString(limitShareToken)))
549+ else if ((shareToken > 0))
550+ then if ((fraction(99, (accountBalance(pmtAssetId) + pmtAmount), 100) > totalShareAmountNew))
551+ then throw("Balance of share-token is greater than totalAmount")
552+ else if ((totalShareAmount == 0))
553+ then (baseEntry ++ [Reissue(SWOP, protocolReward, true), ScriptTransfer(moneyBoxAddress, protocolReward, SWOP)])
554+ else if ((shareToken >= pmtAmount))
555+ then baseEntry
556+ else throw(("Your maximum share token is " + toString(shareToken)))
557+ else throw("You can't share token")
558+ }
559+ else throw("Your amount of token less than 0")
560+ }
561+ else baseEntry
504562 }
505563
506564
508566 @Callable(i)
509567 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
510568 let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
511- let $t02123421334 = claimCalc(pool, i.caller, 1)
512- let userNewInterest = $t02123421334._1
513- let currentInterest = $t02123421334._2
514- let claimAmount = $t02123421334._3
515- let userShareTokensAmount = $t02123421334._4
569+ let $t02322023326 = claimCalc(pool, i.originCaller, 1)
570+ let userNewInterest = $t02322023326._1
571+ let currentInterest = $t02322023326._2
572+ let claimAmount = $t02322023326._3
573+ let userShareTokensAmount = $t02322023326._4
516574 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
517- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
575+ let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount)
518576 let totalShareAmount = getTotalShareTokenLocked(pool)
519577 let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
520- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
578+ let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.originCaller)
521579 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
522580 if ((shareTokensWithdrawAmount > userShareTokensAmount))
523581 then throw("Withdraw amount more then user locked amount")
527585 then throw("Withdraw amount more then user locked amount")
528586 else if ((fraction(99, (accountBalance(shareTokensId) - shareTokensWithdrawAmount), 100) > totalShareAmountNew))
529587 then throw("Balance of share-token is greater than totalAmount")
530- 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)]
588+ else [IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyAvailableSWOP), availableFundsNew), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)]
531589 }
532590
533591
536594 func claim (pool) = {
537595 let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
538596 let shareTokenLocked = getTotalShareTokenLocked(pool)
539- let $t02334123406 = getLastInterestInfo(pool)
540- let lastInterestHeight = $t02334123406._1
541- let lastInterest = $t02334123406._2
542- let $t02341123523 = rewardInfo(pool)
543- let currentRewardPerBlock = $t02341123523._1
544- let rewardUpdateHeight = $t02341123523._2
545- let previousRewardPerBlock = $t02341123523._3
546- let poolRewardUpdateHeight = $t02341123523._4
547- let $t02352823628 = claimCalc(pool, i.caller, 1)
548- let userNewInterest = $t02352823628._1
549- let currentInterest = $t02352823628._2
550- let claimAmount = $t02352823628._3
551- let userShareTokensAmount = $t02352823628._4
597+ let $t02537425439 = getLastInterestInfo(pool)
598+ let lastInterestHeight = $t02537425439._1
599+ let lastInterest = $t02537425439._2
600+ let $t02544425556 = rewardInfo(pool)
601+ let currentRewardPerBlock = $t02544425556._1
602+ let rewardUpdateHeight = $t02544425556._2
603+ let previousRewardPerBlock = $t02544425556._3
604+ let poolRewardUpdateHeight = $t02544425556._4
605+ let $t02556125661 = claimCalc(pool, i.caller, 1)
606+ let userNewInterest = $t02556125661._1
607+ let currentInterest = $t02556125661._2
608+ let claimAmount = $t02556125661._3
609+ let userShareTokensAmount = $t02556125661._4
552610 let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
553611 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
554612 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 4 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy'
5-
6-let adminPubKey2 = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk'
7-
8-let adminPubKey3 = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP'
9-
104 let keyShareTokensLocked = "_total_share_tokens_locked"
115
126 let kShareLimit = "share_limit_on_first_harvest"
137
148 let keyActive = "active"
9+
10+let kOracleActive = "active_all_contracts"
1511
1612 let keyCause = "shutdown_cause"
1713
1814 let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward"
1915
2016 let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward"
2117
2218 let keyHeightPoolFraction = "_pool_reward_update_height"
2319
2420 let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current"
2521
2622 let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous"
2723
2824 let keyRewardUpdateHeight = "reward_update_height"
2925
3026 let keyLastInterest = "_last_interest"
3127
3228 let keyLastInterestHeight = "_last_interest_height"
3329
3430 let keyUserShareTokensLocked = "_share_tokens_locked"
3531
3632 let keyUserLastInterest = "_last_interest"
3733
3834 let keySWOPid = "SWOP_id"
3935
4036 let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount"
4137
4238 let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount"
4339
4440 let keyAvailableSWOP = "_available_SWOP"
4541
4642 let keyFarmingStartHeight = "farming_start_height"
4743
4844 let keyAPY = "apy"
4945
5046 let kPreviousTotalVoteSWOP = "previous_total_vote_SWOP"
5147
5248 let keySwopYearEmission = "swop_year_emission"
5349
5450 let keyBalancecpmmA = "A_asset_balance"
5551
5652 let keyBalancecpmmB = "B_asset_balance"
5753
5854 let kHarvestPoolActiveVoteStrucVoting = "_harvest_pool_activeVote_struc"
5955
6056 let kHarvestUserPoolActiveVoteStrucVoting = "_harvest_user_pool_activeVote_struc"
6157
6258 let keyLimitShareFirstHarvest = "share_limit_on_first_harvest"
6359
6460 let keyAssetIdA = "A_asset_id"
6561
6662 let keyAssetIdB = "B_asset_id"
6763
6864 let keyFirstHarvestHeight = "first_harvest_height"
6965
7066 let keyfirstHarvestCpmm = "first_harvest"
7167
7268 let keyTempPrevSum = "sum_reward_previous"
7369
7470 let keyTempCurSum = "sum_reward_current"
7571
76-let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
77-
78-let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
79-
80-let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
81-
82-let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
83-
8472 let oneWeekInBlock = 10106
8573
8674 let totalVoteShare = 10000000000
8775
8876 let scaleValue1 = 10
8977
9078 let scaleValue3 = 1000
9179
9280 let scaleValue5 = 100000
9381
9482 let scaleValue6 = 1000000
9583
9684 let scaleValue8 = 100000000
9785
9886 let scaleValue11 = 100000000000
87+
88+let kAdminPubKey1 = "admin_pub_1"
89+
90+let kAdminPubKey2 = "admin_pub_2"
91+
92+let kAdminPubKey3 = "admin_pub_3"
93+
94+let kAdminInvokePubKey = "admin_invoke_pub"
95+
96+let kMoneyBoxAddress = "money_box_address"
97+
98+let kVotingAddress = "voting_address"
99+
100+let kGovAddress = "governance_address"
101+
102+let kFarmingAddress = "farming_address"
103+
104+let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
105+
106+func getBase58FromOracle (key) = match getString(oracle, key) {
107+ case string: String =>
108+ fromBase58String(string)
109+ case nothing =>
110+ throw((key + "is empty"))
111+}
112+
113+
114+let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
115+
116+let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
117+
118+let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
119+
120+let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
121+
122+let votingAddress = Address(getBase58FromOracle(kVotingAddress))
123+
124+let govAddress = Address(getBase58FromOracle(kGovAddress))
125+
126+let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey)
99127
100128 func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA)
101129
102130
103131 func strAssetIdB (pool) = getStringValue(pool, keyAssetIdB)
104132
105133
106134 func assetIdA (pool) = if ((strAssetIdA(pool) == "WAVES"))
107135 then unit
108136 else fromBase58String(strAssetIdA(pool))
109137
110138
111139 func assetIdB (pool) = if ((strAssetIdB(pool) == "WAVES"))
112140 then unit
113141 else fromBase58String(strAssetIdB(pool))
114142
115143
116144 let kBasePeriod = "base_period"
117145
118146 let kPeriodLength = "period_length"
119147
120148 let kStartHeight = "start_height"
121149
122150 let kFirstHarvestHeight = "first_harvest_height"
123151
124152 let kDurationFullVotePower = "duration_full_vote_power"
125153
126154 let kMinVotePower = "min_vote_power"
127155
128156 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
129157
130158 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
131159
132160 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
133161
134162 let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower")
135163
136164 let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower")
137165
138-let isActive = getBooleanValue(this, keyActive)
166+let isActive = if (getBooleanValue(oracle, kOracleActive))
167+ then getBooleanValue(this, keyActive)
168+ else false
139169
140170 let currPeriod = (basePeriod + ((height - startHeight) / periodLength))
141171
142172 func getLimitToken (pool) = valueOrElse(getIntegerValue(pool, keyLimitShareFirstHarvest), 0)
143173
144174
145175 let APY = getIntegerValue(this, keyAPY)
146176
147177 let SwopYearEmission = getIntegerValue(this, keySwopYearEmission)
148178
149179 func assetNameA (pool) = match assetIdA(pool) {
150180 case id: ByteVector =>
151181 value(assetInfo(id)).name
152182 case waves: Unit =>
153183 "WAVES"
154184 case _ =>
155185 throw("Match error")
156186 }
157187
158188
159189 func assetNameB (pool) = match assetIdB(pool) {
160190 case id: ByteVector =>
161191 value(assetInfo(id)).name
162192 case waves: Unit =>
163193 "WAVES"
164194 case _ =>
165195 throw("Match error")
166196 }
167197
168198
169199 let SWOP = fromBase58String(getStringValue(this, keySWOPid))
170200
171201 func isFirstHarvest (pool) = valueOrElse(getBoolean(pool, keyfirstHarvestCpmm), false)
172202
173203
174204 func getHeightFirstHarvest (pool) = valueOrElse(getInteger(pool, keyFirstHarvestHeight), 0)
175205
176206
177207 func getBalanceA (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmA), ("No data on the key: " + keyBalancecpmmA))
178208
179209
180210 func getBalanceB (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmB), ("No data on the key: " + keyBalancecpmmB))
181211
182212
183213 func getShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimit), ("No data on the key: " + kShareLimit))
184214
185215
186216 func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked))
187217
188218
189219 func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
190220
191221
192222 func accountBalance (assetId) = match assetId {
193223 case id: ByteVector =>
194224 assetBalance(this, id)
195225 case waves: Unit =>
196226 wavesBalance(this).available
197227 case _ =>
198228 throw("Match error")
199229 }
200230
201231
202232 func getAssetInfo (assetId) = match assetId {
203233 case id: ByteVector =>
204234 let stringId = toBase58String(id)
205235 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
206236 $Tuple3(stringId, info.name, info.decimals)
207237 case waves: Unit =>
208238 $Tuple3("WAVES", "WAVES", 8)
209239 case _ =>
210240 throw("Match error")
211241 }
212242
213243
214244 func calcScaleValue (assetId1,assetId2) = {
215245 let assetId1Decimals = value(assetInfo(assetId1)).decimals
216246 let assetId2Decimals = value(assetInfo(assetId2)).decimals
217247 let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8)
218- pow(10, 0, scaleDigits, 0, 0, HALFDOWN)
248+ pow(10, 0, scaleDigits, 0, 0, DOWN)
219249 }
220250
221251
222252 func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0)
223253
224254
225255 func rewardInfo (pool) = {
226- let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress)))
227- let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress)))
228- let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress)))
229- let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress)))
230- let poolRewardUpdateHeight = valueOrElse(getInteger(governanceAddress, (pool + keyHeightPoolFraction)), 0)
231- let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress)))
256+ let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(govAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(govAddress)))
257+ let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(govAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(govAddress)))
258+ let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(govAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(govAddress)))
259+ let rewardUpdateHeight = valueOrErrorMessage(getInteger(govAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(govAddress)))
260+ let poolRewardUpdateHeight = valueOrElse(getInteger(govAddress, (pool + keyHeightPoolFraction)), 0)
261+ let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(govAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(govAddress)))
232262 let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare)
233263 let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare)
234264 if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent))
235265 then true
236266 else (rewardPoolPrevious > totalRewardPerBlockPrevious))
237267 then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious")
238268 else $Tuple4(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight)
239269 }
240270
241271
242272 func getLastInterestInfo (pool) = {
243273 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
244274 let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height)
245275 $Tuple2(lastInterestHeight, lastInterest)
246276 }
247277
248278
249279 func getUserInterestInfo (pool,userAddress) = {
250280 let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest))
251281 let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked))
252282 let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest))
253283 let userLastInterestValue = match userLastInterest {
254284 case userLastInterest: Int =>
255285 userLastInterest
256286 case _ =>
257287 lastInterest
258288 }
259289 let userShareTokensAmount = match userShare {
260290 case userShare: Int =>
261291 userShare
262292 case _ =>
263293 0
264294 }
265295 $Tuple2(userLastInterestValue, userShareTokensAmount)
266296 }
267297
268298
269299 func calcInterest (lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0))
270300 then 0
271301 else if ((poolRewardUpdateHeight != 0))
272302 then if (if ((rewardUpdateHeight > height))
273303 then (rewardUpdateHeight == poolRewardUpdateHeight)
274304 else false)
275305 then {
276306 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
277307 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
278308 }
279309 else if (if ((height > rewardUpdateHeight))
280310 then (rewardUpdateHeight != poolRewardUpdateHeight)
281311 else false)
282312 then {
283313 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
284314 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
285315 }
286316 else if (if (if ((height > rewardUpdateHeight))
287317 then (rewardUpdateHeight == poolRewardUpdateHeight)
288318 else false)
289319 then (lastInterestHeight > rewardUpdateHeight)
290320 else false)
291321 then {
292322 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
293323 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
294324 }
295325 else {
296326 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
297327 let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
298328 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
299329 (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
300330 }
301331 else if ((rewardUpdateHeight > height))
302332 then {
303333 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
304334 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
305335 }
306336 else if ((lastInterestHeight > rewardUpdateHeight))
307337 then {
308338 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
309339 (lastInterest + fraction(reward, scaleValue, shareTokenLocked))
310340 }
311341 else {
312342 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
313343 let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked))
314344 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
315345 (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked))
316346 }
317347
318348
319349 func claimCalc (pool,caller,pmtAmount) = {
320350 let shareAssetId = getShareAssetId(pool)
321351 let scaleValue = calcScaleValue(SWOP, shareAssetId)
322352 let shareTokenLocked = getTotalShareTokenLocked(pool)
323- let $t01309513160 = getLastInterestInfo(pool)
324- let lastInterestHeight = $t01309513160._1
325- let lastInterest = $t01309513160._2
326- let $t01316513277 = rewardInfo(pool)
327- let currentRewardPerBlock = $t01316513277._1
328- let rewardUpdateHeight = $t01316513277._2
329- let previousRewardPerBlock = $t01316513277._3
330- let poolRewardUpdateHeight = $t01316513277._4
331- let $t01328213361 = getUserInterestInfo(pool, caller)
332- let userLastInterest = $t01328213361._1
333- let userShareTokensAmount = $t01328213361._2
353+ let $t01353813603 = getLastInterestInfo(pool)
354+ let lastInterestHeight = $t01353813603._1
355+ let lastInterest = $t01353813603._2
356+ let $t01360813720 = rewardInfo(pool)
357+ let currentRewardPerBlock = $t01360813720._1
358+ let rewardUpdateHeight = $t01360813720._2
359+ let previousRewardPerBlock = $t01360813720._3
360+ let poolRewardUpdateHeight = $t01360813720._4
361+ let $t01372513804 = getUserInterestInfo(pool, caller)
362+ let userLastInterest = $t01372513804._1
363+ let userShareTokensAmount = $t01372513804._2
334364 let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount)
335365 let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue)
336366 let userNewInterest = currentInterest
337367 $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
338368 }
339369
340370
341371 func calculateProtocolReward (pool) = {
342- let $t01387913944 = getLastInterestInfo(pool)
343- let lastInterestHeight = $t01387913944._1
344- let lastInterest = $t01387913944._2
345- let $t01394914060 = rewardInfo(pool)
346- let currentRewardPerBlock = $t01394914060._1
347- let rewardUpdateHeight = $t01394914060._2
348- let previousRewardPerBlock = $t01394914060._3
349- let poolRewardUpdateHeight = $t01394914060._4
372+ let $t01432214387 = getLastInterestInfo(pool)
373+ let lastInterestHeight = $t01432214387._1
374+ let lastInterest = $t01432214387._2
375+ let $t01439214503 = rewardInfo(pool)
376+ let currentRewardPerBlock = $t01439214503._1
377+ let rewardUpdateHeight = $t01439214503._2
378+ let previousRewardPerBlock = $t01439214503._3
379+ let poolRewardUpdateHeight = $t01439214503._4
350380 let shareTokenLocked = getTotalShareTokenLocked(pool)
351381 if (if ((shareTokenLocked == 0))
352382 then (poolRewardUpdateHeight == 0)
353383 else false)
354384 then if ((rewardUpdateHeight > height))
355385 then {
356386 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
357387 reward
358388 }
359389 else if ((lastInterestHeight > rewardUpdateHeight))
360390 then {
361391 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
362392 reward
363393 }
364394 else {
365395 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
366396 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
367397 (reward + rewardAfterLastInterestBeforeReawardUpdate)
368398 }
369399 else if (if ((shareTokenLocked == 0))
370400 then (poolRewardUpdateHeight != 0)
371401 else false)
372402 then if (if ((rewardUpdateHeight > height))
373403 then (rewardUpdateHeight == poolRewardUpdateHeight)
374404 else false)
375405 then {
376406 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
377407 reward
378408 }
379409 else if (if ((height > rewardUpdateHeight))
380410 then (rewardUpdateHeight != poolRewardUpdateHeight)
381411 else false)
382412 then {
383413 let reward = (previousRewardPerBlock * (height - lastInterestHeight))
384414 reward
385415 }
386416 else if (if (if ((height > rewardUpdateHeight))
387417 then (rewardUpdateHeight == poolRewardUpdateHeight)
388418 else false)
389419 then (lastInterestHeight > rewardUpdateHeight)
390420 else false)
391421 then {
392422 let reward = (currentRewardPerBlock * (height - lastInterestHeight))
393423 reward
394424 }
395425 else {
396426 let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
397427 let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
398428 (reward + rewardAfterLastInterestBeforeReawardUpdate)
399429 }
400430 else 0
401431 }
402432
403433
404434 func checkPmtAssetIdCorrect (pool,pmtAssetId) = {
405435 let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
406436 if ((pmtAssetId == poolShareAssetId))
407437 then true
408438 else false
409439 }
410440
411441
412442 func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0)
413443
414444
415445 func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
416446
417447
418448 @Callable(i)
419449 func init (earlyLP) = if (isDefined(getString(this, keySWOPid)))
420450 then throw("SWOP already initialized")
421451 else {
422452 let initAmount = 100000000000000
423453 let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true)
424454 let SWOPid = calculateAssetId(SWOPissue)
425455 [BooleanEntry(keyActive, true), Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
426456 }
427457
428458
429459
430460 @Callable(i)
431461 func initPoolShareFarming (pool) = if ((i.caller != this))
432462 then throw("Only the DApp itself can call this function")
433463 else {
434- let $t01704217145 = rewardInfo(pool)
435- let currentReward = $t01704217145._1
436- let rewardUpdateHeight = $t01704217145._2
437- let previousRewardPerBlock = $t01704217145._3
438- let poolRewardUpdateHeight = $t01704217145._4
464+ let $t01748517588 = rewardInfo(pool)
465+ let currentReward = $t01748517588._1
466+ let rewardUpdateHeight = $t01748517588._2
467+ let previousRewardPerBlock = $t01748517588._3
468+ let poolRewardUpdateHeight = $t01748517588._4
439469 [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)]
440470 }
441471
442472
443473
444474 @Callable(i)
445-func updatePoolInterest (pool) = if ((i.caller != wallet))
475+func updatePoolInterest (pool) = if ((i.caller != moneyBoxAddress))
446476 then throw("Only the Admin itself can call this function")
447477 else if (!(isActive))
448478 then throw("DApp is inactive at this moment")
449479 else {
450- let $t01755417674 = claimCalc(pool, adminIncreaseInterestAddress, 0)
451- let userNewInterest = $t01755417674._1
452- let currentInterest = $t01755417674._2
453- let claimAmount = $t01755417674._3
454- let userShareTokensAmount = $t01755417674._4
455- let $t01767917782 = rewardInfo(pool)
456- let currentReward = $t01767917782._1
457- let rewardUpdateHeight = $t01767917782._2
458- let previousRewardPerBlock = $t01767917782._3
459- let poolRewardUpdateHeight = $t01767917782._4
480+ let $t01800618139 = claimCalc(pool, addressFromPublicKey(adminInvokePubKey), 0)
481+ let userNewInterest = $t01800618139._1
482+ let currentInterest = $t01800618139._2
483+ let claimAmount = $t01800618139._3
484+ let userShareTokensAmount = $t01800618139._4
485+ let $t01814418247 = rewardInfo(pool)
486+ let currentReward = $t01814418247._1
487+ let rewardUpdateHeight = $t01814418247._2
488+ let previousRewardPerBlock = $t01814418247._3
489+ let poolRewardUpdateHeight = $t01814418247._4
460490 [IntegerEntry((pool + keyLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterestHeight), height)]
461491 }
462492
463493
464494
465495 @Callable(i)
466496 func lockShareTokens (pool) = {
467- let $t01797418049 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
468- let pmtAmount = $t01797418049._1
469- let pmtAssetId = $t01797418049._2
470- let $t01805418127 = getAssetInfo(pmtAssetId)
471- let pmtStrAssetId = $t01805418127._1
472- let pmtAssetName = $t01805418127._2
473- let pmtDecimals = $t01805418127._3
474- let $t01813218240 = claimCalc(pool, i.caller, pmtAmount)
475- let userNewInterest = $t01813218240._1
476- let currentInterest = $t01813218240._2
477- let claimAmount = $t01813218240._3
478- let userShareTokensAmount = $t01813218240._4
497+ let $t01843918514 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
498+ let pmtAmount = $t01843918514._1
499+ let pmtAssetId = $t01843918514._2
500+ let $t01851918592 = getAssetInfo(pmtAssetId)
501+ let pmtStrAssetId = $t01851918592._1
502+ let pmtAssetName = $t01851918592._2
503+ let pmtDecimals = $t01851918592._3
504+ let $t01859718711 = claimCalc(pool, i.originCaller, pmtAmount)
505+ let userNewInterest = $t01859718711._1
506+ let currentInterest = $t01859718711._2
507+ let claimAmount = $t01859718711._3
508+ let userShareTokensAmount = $t01859718711._4
479509 let userShareAmountNew = (userShareTokensAmount + pmtAmount)
480- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
510+ let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount)
481511 let totalShareAmount = getTotalShareTokenLocked(pool)
482512 let totalShareAmountNew = (totalShareAmount + pmtAmount)
483- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
513+ let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.originCaller)
484514 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
485- 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)]
486- let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
487- let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_")
488- let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
489- let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_")
490- let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_")
491- let userShareTokenLocked = userShareTokensAmount
492- let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
493- then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
494- else valueOrElse(parseInt(amountOfVoting[1]), 0)
495- let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
496- then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
497- else valueOrElse(parseInt(amountPoolStract[1]), 0)
498- let protocolReward = calculateProtocolReward(pool)
499- let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
500- let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
501- if ((fraction(99, (accountBalance(pmtAssetId) + pmtAmount), 100) > totalShareAmountNew))
502- then throw("Balance of share-token is greater than totalAmount")
503- else throw("test error")
515+ let baseEntry = [IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserSWOPLastClaimedAmount), claimAmount), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyAvailableSWOP), availableFundsNew)]
516+ if ((0 >= pmtAmount))
517+ then throw("You can't lock token")
518+ else if (!(isActive))
519+ then throw("DApp is inactive at this moment")
520+ else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
521+ then throw("Incorrect pmtAssetId")
522+ else if (if (isFirstHarvest(Address(fromBase58String(pool))))
523+ then (getHeightFirstHarvest(Address(fromBase58String(pool))) > height)
524+ else false)
525+ then {
526+ let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1)
527+ let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.originCaller) + "_") + pool) + "_user_pool_struc")), "_")
528+ let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_")
529+ let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.originCaller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_")
530+ let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_")
531+ let userShareTokenLocked = userShareTokensAmount
532+ let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2]))
533+ then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0)
534+ else valueOrElse(parseInt(amountOfVoting[1]), 0)
535+ let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2]))
536+ then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0)
537+ else valueOrElse(parseInt(amountPoolStract[1]), 0)
538+ let protocolReward = calculateProtocolReward(pool)
539+ if ((userPoolActiveVote != 0))
540+ then {
541+ let limitShareToken = getShareLimitToken(addressFromStringValue(pool))
542+ let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked)
543+ if (if ((size(amountActiveVoteUserPoolStract) > 1))
544+ then (valueOrElse(parseInt(amountActiveVoteUserPoolStract[1]), 0) >= harvestPeriod)
545+ else false)
546+ then throw("You can't share token")
547+ else if ((pmtAmount > limitShareToken))
548+ then throw(("You can't share token more than " + toString(limitShareToken)))
549+ else if ((shareToken > 0))
550+ then if ((fraction(99, (accountBalance(pmtAssetId) + pmtAmount), 100) > totalShareAmountNew))
551+ then throw("Balance of share-token is greater than totalAmount")
552+ else if ((totalShareAmount == 0))
553+ then (baseEntry ++ [Reissue(SWOP, protocolReward, true), ScriptTransfer(moneyBoxAddress, protocolReward, SWOP)])
554+ else if ((shareToken >= pmtAmount))
555+ then baseEntry
556+ else throw(("Your maximum share token is " + toString(shareToken)))
557+ else throw("You can't share token")
558+ }
559+ else throw("Your amount of token less than 0")
560+ }
561+ else baseEntry
504562 }
505563
506564
507565
508566 @Callable(i)
509567 func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
510568 let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
511- let $t02123421334 = claimCalc(pool, i.caller, 1)
512- let userNewInterest = $t02123421334._1
513- let currentInterest = $t02123421334._2
514- let claimAmount = $t02123421334._3
515- let userShareTokensAmount = $t02123421334._4
569+ let $t02322023326 = claimCalc(pool, i.originCaller, 1)
570+ let userNewInterest = $t02322023326._1
571+ let currentInterest = $t02322023326._2
572+ let claimAmount = $t02322023326._3
573+ let userShareTokensAmount = $t02322023326._4
516574 let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
517- let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount)
575+ let availableFundsNew = (userAvailableSWOP(pool, i.originCaller) + claimAmount)
518576 let totalShareAmount = getTotalShareTokenLocked(pool)
519577 let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount)
520- let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
578+ let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.originCaller)
521579 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
522580 if ((shareTokensWithdrawAmount > userShareTokensAmount))
523581 then throw("Withdraw amount more then user locked amount")
524582 else if (!(isActive))
525583 then throw("DApp is inactive at this moment")
526584 else if ((shareTokensWithdrawAmount > userShareTokensAmount))
527585 then throw("Withdraw amount more then user locked amount")
528586 else if ((fraction(99, (accountBalance(shareTokensId) - shareTokensWithdrawAmount), 100) > totalShareAmountNew))
529587 then throw("Balance of share-token is greater than totalAmount")
530- 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)]
588+ else [IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((pool + keyShareTokensLocked), totalShareAmountNew), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyAvailableSWOP), availableFundsNew), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserSWOPClaimedAmount), userClaimedAmountNew), IntegerEntry((((pool + "_") + toString(i.originCaller)) + keyUserSWOPLastClaimedAmount), claimAmount), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)]
531589 }
532590
533591
534592
535593 @Callable(i)
536594 func claim (pool) = {
537595 let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id"))
538596 let shareTokenLocked = getTotalShareTokenLocked(pool)
539- let $t02334123406 = getLastInterestInfo(pool)
540- let lastInterestHeight = $t02334123406._1
541- let lastInterest = $t02334123406._2
542- let $t02341123523 = rewardInfo(pool)
543- let currentRewardPerBlock = $t02341123523._1
544- let rewardUpdateHeight = $t02341123523._2
545- let previousRewardPerBlock = $t02341123523._3
546- let poolRewardUpdateHeight = $t02341123523._4
547- let $t02352823628 = claimCalc(pool, i.caller, 1)
548- let userNewInterest = $t02352823628._1
549- let currentInterest = $t02352823628._2
550- let claimAmount = $t02352823628._3
551- let userShareTokensAmount = $t02352823628._4
597+ let $t02537425439 = getLastInterestInfo(pool)
598+ let lastInterestHeight = $t02537425439._1
599+ let lastInterest = $t02537425439._2
600+ let $t02544425556 = rewardInfo(pool)
601+ let currentRewardPerBlock = $t02544425556._1
602+ let rewardUpdateHeight = $t02544425556._2
603+ let previousRewardPerBlock = $t02544425556._3
604+ let poolRewardUpdateHeight = $t02544425556._4
605+ let $t02556125661 = claimCalc(pool, i.caller, 1)
606+ let userNewInterest = $t02556125661._1
607+ let currentInterest = $t02556125661._2
608+ let claimAmount = $t02556125661._3
609+ let userShareTokensAmount = $t02556125661._4
552610 let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount)
553611 let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller)
554612 let userClaimedAmountNew = (userClaimedAmount + claimAmount)
555613 if ((availableFund == 0))
556614 then throw("You have 0 available SWOP")
557615 else if (!(isActive))
558616 then throw("DApp is inactive at this moment")
559617 else if ((availableFund == 0))
560618 then throw("You have 0 available SWOP")
561619 else if ((fraction(99, accountBalance(shareTokensId), 100) > shareTokenLocked))
562620 then throw("Balance of share-token is greater than totalAmount")
563621 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)]
564622 }
565623
566624
567625
568626 @Callable(i)
569627 func shutdown () = if (!(isActive))
570628 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
571629 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
572630 then throw("Only admin can call this function")
573631 else suspend("Paused by admin")
574632
575633
576634
577635 @Callable(i)
578636 func activate () = if (isActive)
579637 then throw("DApp is already active")
580638 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
581639 then throw("Only admin can call this function")
582640 else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
583641
584642
585643 @Verifier(tx)
586644 func verify () = match tx {
587645 case _ =>
588646 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
589647 then 1
590648 else 0
591649 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
592650 then 1
593651 else 0
594652 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
595653 then 1
596654 else 0
597655 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
598656 }
599657

github/deemru/w8io/169f3d6 
100.55 ms