tx · 2bV8tuk1GqNChvcyEELVUuABqMByRbUnQyLDQ187Q5H7

3MxTNJhfE64Ma3bc848kbfmiMXUkVHuDAMV:  -0.01400000 Waves

2020.12.12 15:54 [1305471] smart account 3MxTNJhfE64Ma3bc848kbfmiMXUkVHuDAMV > SELF 0.00000000 Waves

{ "type": 13, "id": "2bV8tuk1GqNChvcyEELVUuABqMByRbUnQyLDQ187Q5H7", "fee": 1400000, "feeAssetId": null, "timestamp": 1607777676927, "version": 1, "sender": "3MxTNJhfE64Ma3bc848kbfmiMXUkVHuDAMV", "senderPublicKey": "DLqzEoWpVE1NWvsLZNBFkedCMYA2RWvJK94vBfLR5KQa", "proofs": [ "4d4JSLoB97j6ie8zcvnEofvzaGzMbuKSPsMjAY4QNvk1F2cwzV9CkAtyK7eD5g938ntgZjp8BSvkPebmcrfinqd4" ], "script": "base64:AAIEAAAAAAAAABcIAhIDCgEIEgMKAQgSBAoCCAESAwoBCAAAABwAAAAADGFkbWluUHViS2V5MQEAAAAgELDi6uQgdVvao3EGz2pOOnWzKruRdXrpd4DobbWyZx8AAAAADGFkbWluUHViS2V5MgEAAAAgELDi6uQgdVvao3EGz2pOOnWzKruRdXrpd4DobbWyZx8AAAAADGFkbWluUHViS2V5MwEAAAAgELDi6uQgdVvao3EGz2pOOnWzKruRdXrpd4DobbWyZx8AAAAAFGFkbWluUHViS2V5U3RhcnRTdG9wAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAASYWRtaW5QdWJLZXlTdGFraW5nAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAUa2V5U2hhcmVUb2tlbnNMb2NrZWQCAAAAGl90b3RhbF9zaGFyZV90b2tlbnNfbG9ja2VkAAAAABBrZXlDdXJyZW50UmV3YXJkAgAAAA9fY3VycmVudF9yZXdhcmQAAAAAD2tleUxhc3RJbnRlcmVzdAIAAAAOX2xhc3RfaW50ZXJlc3QAAAAAFWtleUxhc3RJ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lzc3VlAAAAAwUAAAAEU1dPUAUAAAALY2xhaW1BbW91bnQGCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAALY2xhaW1BbW91bnQFAAAABFNXT1AFAAAAA25pbAAAAAAkY0En", "chainId": 84, "height": 1305471, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 4 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let adminPubKey1 = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU'
5+
6+let adminPubKey2 = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU'
7+
8+let adminPubKey3 = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU'
9+
10+let adminPubKeyStartStop = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU'
11+
12+let adminPubKeyStaking = base58'289xpUrYrKbLjaKkqH3XNhfecukcYRaDRT3JDrvkvQRU'
13+
14+let keyShareTokensLocked = "_total_share_tokens_locked"
15+
16+let keyCurrentReward = "_current_reward"
17+
18+let keyLastInterest = "_last_interest"
19+
20+let keyLastInterestHeight = "_last_interest_height"
21+
22+let keyUserShareTokensLocked = "_share_tokens_locked"
23+
24+let keyUserLastInterest = "_last_index"
25+
26+let keyRewardUpdateHeight = "_reward_update_height"
27+
28+let keyPreviousReward = "_previous_reward"
29+
30+let keyPoolAddress = "_address"
31+
32+let votingAddress = Address(base58'3MTobDiK1kQpEw4XpwKvTYWXVoAH5wUZxBE')
33+
34+let SWOP = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
35+
36+let scale8 = 100000000
37+
38+let heightRewardUpdate = getIntegerValue(this, "height_reward_update")
39+
40+func throwOnlyAdmin () = throw("Only admin can call this function")
41+
42+
43+func throwIsActive () = throw("DApp is already active")
44+
45+
46+func getCurrentRewardPerBlock (pool) = valueOrErrorMessage(getIntegerValue(votingAddress, (pool + keyCurrentReward)), (("No data on the key: " + pool) + keyShareTokensLocked))
47+
48+
49+func getShateTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyUserShareTokensLocked)), (("No data on the key: " + pool) + keyUserShareTokensLocked))
50+
51+
52+func rewardUpdateInfo (pool) = {
53+ let rewardUpdateHeight = valueOrErrorMessage(getIntegerValue(votingAddress, (pool + keyRewardUpdateHeight)), (("No data on the key: " + pool) + keyRewardUpdateHeight))
54+ let rewardPreviousAmount = valueOrErrorMessage(getIntegerValue(votingAddress, (pool + keyRewardUpdateHeight)), (("No data on the key: " + pool) + keyPreviousReward))
55+ $Tuple2(rewardUpdateHeight, rewardPreviousAmount)
56+ }
57+
58+
59+func getLastInterestInfo (pool) = {
60+ let lastInterest = valueOrErrorMessage(getIntegerValue(this, (pool + keyLastInterest)), (((("No data on the key: " + pool) + "_") + pool) + keyLastInterest))
61+ let lastInterestHeight = valueOrErrorMessage(getIntegerValue(this, (pool + keyLastInterestHeight)), (("No data on the key: " + pool) + keyLastInterestHeight))
62+ $Tuple2(lastInterestHeight, lastInterest)
63+ }
64+
65+
66+func getUserInterestInfo (pool,userAddres) = {
67+ let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddres)) + keyUserLastInterest))
68+ let userShare = getInteger(this, (((pool + "_") + toString(userAddres)) + keyUserShareTokensLocked))
69+ let userLastInterestValue = match userLastInterest {
70+ case userLastInterest: Int =>
71+ userLastInterest
72+ case _ =>
73+ 0
74+ }
75+ let userShareTokensAmount = match userShare {
76+ case userShare: Int =>
77+ userShare
78+ case _ =>
79+ 0
80+ }
81+ $Tuple2(userLastInterestValue, userShareTokensAmount)
82+ }
83+
84+
85+func calcInterest (lastInterestHeight,rewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock) = if ((lastInterestHeight > rewardUpdateHeight))
86+ then {
87+ let reward = (currentRewardPerBlock * (height - lastInterestHeight))
88+ ((lastInterest * scale8) + fraction(reward, scale8, shareTokenLocked))
89+ }
90+ else {
91+ let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
92+ let interestAfterUpdate = ((lastInterest * scale8) + fraction(rewardAfterLastInterestBeforeReawardUpdate, scale8, shareTokenLocked))
93+ let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
94+ ((interestAfterUpdate * scale8) + fraction(reward, scale8, shareTokenLocked))
95+ }
96+
97+
98+func ClaimCalc (pool,caller) = {
99+ let currentRewardPerBlock = getCurrentRewardPerBlock(pool)
100+ let shareTokenLocked = getShateTokenLocked(pool)
101+ let $t044174482 = getLastInterestInfo(pool)
102+ let lastInterestHeight = $t044174482._1
103+ let lastInterest = $t044174482._2
104+ let $t044874559 = rewardUpdateInfo(pool)
105+ let rewardUpdateHeight = $t044874559._1
106+ let previousRewardPerBlock = $t044874559._2
107+ let $t045644643 = getUserInterestInfo(pool, caller)
108+ let userLastInterest = $t045644643._1
109+ let userShareTokensAmount = $t045644643._2
110+ let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock)
111+ let claimAmount = fraction(userShareTokensAmount, (currentInterest - (userLastInterest * scale8)), scale8)
112+ let userNewInterest = currentInterest
113+ $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
114+ }
115+
116+
117+func checkPmtAssetIdCorrect (pool,pmtAssetId) = {
118+ let poolAddres = value(addressFromString(getStringValue(this, (pool + keyPoolAddress))))
119+ let poolShareAssetId = fromBase58String(getStringValue(poolAddres, "share_asset_id"))
120+ if ((pmtAssetId == poolShareAssetId))
121+ then true
122+ else false
123+ }
124+
125+
126+@Callable(i)
127+func initPoolShareLocking (pool) = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
128+ then throw("Only admin can call this function")
129+ else {
130+ let $t055635635 = rewardUpdateInfo(pool)
131+ let rewardUpdateHeight = $t055635635._1
132+ let previousRewardPerBlock = $t055635635._2
133+[StringEntry((pool + keyPoolAddress), pool), IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyCurrentReward), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height), IntegerEntry((pool + keyRewardUpdateHeight), rewardUpdateHeight), IntegerEntry((pool + keyPreviousReward), previousRewardPerBlock)]
134+ }
135+
136+
137+
138+@Callable(i)
139+func lockShareTokens (pool) = {
140+ let $t060866161 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
141+ let pmtAmount = $t060866161._1
142+ let pmtAssetId = $t060866161._2
143+ if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
144+ then throw("Incorrect pmtAssetId")
145+ else {
146+ let $t062546352 = ClaimCalc(pool, i.caller)
147+ let userNewInterest = $t062546352._1
148+ let currentInterest = $t062546352._2
149+ let claimAmount = $t062546352._3
150+ let userShareTokensAmount = $t062546352._4
151+ let userShareAmountNew = (userShareTokensAmount + pmtAmount)
152+[IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), Reissue(SWOP, claimAmount, true), ScriptTransfer(i.caller, claimAmount, SWOP)]
153+ }
154+ }
155+
156+
157+
158+@Callable(i)
159+func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
160+ let $t069367034 = ClaimCalc(pool, i.caller)
161+ let userNewInterest = $t069367034._1
162+ let currentInterest = $t069367034._2
163+ let claimAmount = $t069367034._3
164+ let userShareTokensAmount = $t069367034._4
165+ if ((shareTokensWithdrawAmount > userShareTokensAmount))
166+ then throw("Withdraw amount more then user locked amount")
167+ else {
168+ let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
169+ let shareTokensId = fromBase58String(getStringValue(this, (pool + "share_asset_id")))
170+[IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserShareTokensLocked), userShareAmountNew), IntegerEntry((pool + keyLastInterest), currentInterest), IntegerEntry((pool + keyLastInterestHeight), height), Reissue(SWOP, claimAmount, true), ScriptTransfer(i.caller, claimAmount, SWOP), ScriptTransfer(i.caller, shareTokensWithdrawAmount, shareTokensId)]
171+ }
172+ }
173+
174+
175+
176+@Callable(i)
177+func claim (pool) = {
178+ let currentRewardPerBlock = getCurrentRewardPerBlock(pool)
179+ let shareTokenLocked = getShateTokenLocked(pool)
180+ let $t079928057 = getLastInterestInfo(pool)
181+ let lastInterestHeight = $t079928057._1
182+ let lastInterest = $t079928057._2
183+ let $t080628134 = rewardUpdateInfo(pool)
184+ let rewardUpdateHeight = $t080628134._1
185+ let previousRewardPerBlock = $t080628134._2
186+ let $t081398208 = getUserInterestInfo(pool, i.caller)
187+ let userLastInterest = $t081398208._1
188+ let userShare = $t081398208._2
189+ let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock)
190+ let claimAmount = fraction(userShare, (currentInterest - (userLastInterest * scale8)), scale8)
191+ let userNewInterest = currentInterest
192+[IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry(((pool + "_") + keyLastInterest), currentInterest), IntegerEntry(((pool + "_") + keyLastInterestHeight), height), Reissue(SWOP, claimAmount, true), ScriptTransfer(i.caller, claimAmount, SWOP)]
193+ }
194+
195+

github/deemru/w8io/169f3d6 
23.27 ms