tx · Dw1GhRzANAb3ESyqgH6WTHKsAmcvcM84RzkjHbyZJfiK

3Mu2PwJee48weazycAfVcfntFkJhiueQ77z:  -0.01400000 Waves

2020.12.12 18:53 [1305648] smart account 3Mu2PwJee48weazycAfVcfntFkJhiueQ77z > SELF 0.00000000 Waves

{ "type": 13, "id": "Dw1GhRzANAb3ESyqgH6WTHKsAmcvcM84RzkjHbyZJfiK", "fee": 1400000, "feeAssetId": null, "timestamp": 1607788445831, "version": 1, "sender": "3Mu2PwJee48weazycAfVcfntFkJhiueQ77z", "senderPublicKey": "56n3JqpWBcmXUGeuGzjHgkdQybrq57sCxUn7gWZ73rJ7", "proofs": [ "5CryvyhH6YCFoYNjBwdSoMcPD5fadRf63ai18pShwyMkG4GDs8j8oKdFjWTUWPb7s3sLSXnx7W2dLaodpLmeJi3V" ], "script": "base64:AAIEAAAAAAAAABkIAhIAEgMKAQgSAwoBCBIECgIIARIDCgEIAAAAHAAAAAAMYWRtaW5QdWJLZXkxAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAMYWRtaW5QdWJLZXkyAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAMYWRtaW5QdWJLZXkzAQAAACAQsOLq5CB1W9qjcQbPak46dbMqu5F1eul3gOhttbJnHwAAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3ABAAAAIBCw4urkIHVb2qNxBs9qTjp1syq7kXV66XeA6G21smcfAAAAABJhZG1pblB1YktleVN0YWtpbmcBAAAAIBCw4urkIHVb2qNxBs9qTjp1syq7kXV66XeA6G21smcfAAAAABRrZXlTaGFyZVRva2Vuc0xvY2tlZAIAAAAaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAAAAAEGtleUN1cnJlbnRSZXdhcmQCAAAAD19jdXJyZW50X3Jld2FyZAAAAAAVa2V5UmV3YXJkVXBkYXRlSGVpZ2h0AgAAABVfcmV3YXJkX3VwZGF0ZV9oZ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IBQAAAAskdDA4OTE5OTMyNQAAAAJfNAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAE2tleVVzZXJMYXN0SW50ZXJlc3QFAAAAD3VzZXJOZXdJbnRlcmVzdAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAABHBvb2wCAAAAAV8FAAAAD2tleUxhc3RJbnRlcmVzdAUAAAAPY3VycmVudEludGVyZXN0CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAEcG9vbAIAAAABXwUAAAAVa2V5TGFzdEludGVyZXN0SGVpZ2h0BQAAAAZoZWlnaHQJAARMAAAAAgkBAAAAB1JlaXNzdWUAAAADBQAAAARTV09QBQAAAAtjbGFpbUFtb3VudAYJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAtjbGFpbUFtb3VudAUAAAAEU1dPUAUAAAADbmlsAAAAAGD8iO4=", "chainId": 84, "height": 1305648, "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 keyRewardUpdateHeight = "_reward_update_height"
19+
20+let keyPreviousReward = "_previous_reward"
21+
22+let keyLastInterest = "_last_interest"
23+
24+let keyLastInterestHeight = "_last_interest_height"
25+
26+let keyUserShareTokensLocked = "_share_tokens_locked"
27+
28+let keyUserLastInterest = "_last_interest"
29+
30+let keySWOPid = "SWOP_id"
31+
32+let keyPoolAddress = "_address"
33+
34+let votingAddress = Address(base58'3N5F5DCmWNzT8ZPe1tBfiXaVYzWJriaJZ9E')
35+
36+let SWOP = fromBase58String(getStringValue(this, keySWOPid))
37+
38+let scale8 = 100000000
39+
40+let heightRewardUpdate = getIntegerValue(this, "height_reward_update")
41+
42+func throwOnlyAdmin () = throw("Only admin can call this function")
43+
44+
45+func throwIsActive () = throw("DApp is already active")
46+
47+
48+func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked))
49+
50+
51+func rewardInfo (pool) = {
52+ let currentReward = valueOrErrorMessage(getInteger(votingAddress, (pool + keyCurrentReward)), (((("No data on the key: " + pool) + keyCurrentReward) + " at address ") + toString(votingAddress)))
53+ let rewardUpdateHeight = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardUpdateHeight)), (((("No data on the key: " + pool) + keyRewardUpdateHeight) + " at address ") + toString(votingAddress)))
54+ let rewardPreviousAmount = valueOrErrorMessage(getInteger(votingAddress, (pool + keyRewardUpdateHeight)), (((("No data on the key: " + pool) + keyPreviousReward) + " at address ") + toString(votingAddress)))
55+ $Tuple3(currentReward, rewardUpdateHeight, rewardPreviousAmount)
56+ }
57+
58+
59+func getLastInterestInfo (pool) = {
60+ let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (((("No data on the key: " + pool) + "_") + pool) + keyLastInterest))
61+ let lastInterestHeight = valueOrErrorMessage(getInteger(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 if ((shareTokenLocked == 0))
87+ then 0
88+ else {
89+ let reward = (currentRewardPerBlock * (height - lastInterestHeight))
90+ (lastInterest + fraction(reward, scale8, shareTokenLocked))
91+ }
92+ else {
93+ let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight))
94+ let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scale8, shareTokenLocked))
95+ let reward = (currentRewardPerBlock * (height - rewardUpdateHeight))
96+ (interestAfterUpdate + fraction(reward, scale8, shareTokenLocked))
97+ }
98+
99+
100+func ClaimCalc (pool,caller) = {
101+ let shareTokenLocked = getTotalShareTokenLocked(pool)
102+ let $t045264591 = getLastInterestInfo(pool)
103+ let lastInterestHeight = $t045264591._1
104+ let lastInterest = $t045264591._2
105+ let $t045964684 = rewardInfo(pool)
106+ let currentRewardPerBlock = $t045964684._1
107+ let rewardUpdateHeight = $t045964684._2
108+ let previousRewardPerBlock = $t045964684._3
109+ let $t046894768 = getUserInterestInfo(pool, caller)
110+ let userLastInterest = $t046894768._1
111+ let userShareTokensAmount = $t046894768._2
112+ let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock)
113+ let claimAmount = fraction(userShareTokensAmount, (currentInterest - (userLastInterest * scale8)), scale8)
114+ let userNewInterest = currentInterest
115+ $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount)
116+ }
117+
118+
119+func checkPmtAssetIdCorrect (pool,pmtAssetId) = {
120+ let poolAddres = value(addressFromString(getStringValue(this, (pool + keyPoolAddress))))
121+ let poolShareAssetId = fromBase58String(getStringValue(poolAddres, "share_asset_id"))
122+ if ((pmtAssetId == poolShareAssetId))
123+ then true
124+ else false
125+ }
126+
127+
128+@Callable(i)
129+func init () = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
130+ then throw("Only admin can call this function")
131+ else {
132+ let SWOPissue = Issue("SWOP", "SWOP protocol token", 1, 8, true)
133+ let SWOPid = calculateAssetId(SWOPissue)
134+[Issue("SWOP", "SWOP protocol token", 1, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))]
135+ }
136+
137+
138+
139+@Callable(i)
140+func initPoolShareLocking (pool) = if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
141+ then throw("Only admin can call this function")
142+ else {
143+ let $t061106190 = rewardInfo(pool)
144+ let currentReward = $t061106190._1
145+ let rewardUpdateHeight = $t061106190._2
146+ let previousRewardPerBlock = $t061106190._3
147+[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)]
148+ }
149+
150+
151+
152+@Callable(i)
153+func lockShareTokens (pool) = {
154+ let $t066406715 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
155+ let pmtAmount = $t066406715._1
156+ let pmtAssetId = $t066406715._2
157+ if (!(checkPmtAssetIdCorrect(pool, pmtAssetId)))
158+ then throw("Incorrect pmtAssetId")
159+ else {
160+ let $t068086906 = ClaimCalc(pool, i.caller)
161+ let userNewInterest = $t068086906._1
162+ let currentInterest = $t068086906._2
163+ let claimAmount = $t068086906._3
164+ let userShareTokensAmount = $t068086906._4
165+ let userShareAmountNew = (userShareTokensAmount + pmtAmount)
166+ let totalShareAmount = getTotalShareTokenLocked(pool)
167+ let totalShareAmountNew = (totalShareAmount + pmtAmount)
168+[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)]
169+ }
170+ }
171+
172+
173+
174+@Callable(i)
175+func withdrawShareTokens (pool,shareTokensWithdrawAmount) = {
176+ let $t076827780 = ClaimCalc(pool, i.caller)
177+ let userNewInterest = $t076827780._1
178+ let currentInterest = $t076827780._2
179+ let claimAmount = $t076827780._3
180+ let userShareTokensAmount = $t076827780._4
181+ if ((shareTokensWithdrawAmount > userShareTokensAmount))
182+ then throw("Withdraw amount more then user locked amount")
183+ else {
184+ let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount)
185+ let shareTokensId = fromBase58String(getStringValue(this, (pool + "share_asset_id")))
186+[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)]
187+ }
188+ }
189+
190+
191+
192+@Callable(i)
193+func claim (pool) = {
194+ let shareTokenLocked = getTotalShareTokenLocked(pool)
195+ let $t086808745 = getLastInterestInfo(pool)
196+ let lastInterestHeight = $t086808745._1
197+ let lastInterest = $t086808745._2
198+ let $t087508914 = rewardInfo(pool)
199+ let currentRewardPerBlock = $t087508914._1
200+ let rewardUpdateHeight = $t087508914._2
201+ let previousRewardPerBlock = $t087508914._3
202+ let $t089199325 = ClaimCalc(pool, i.caller)
203+ let userNewInterest = $t089199325._1
204+ let currentInterest = $t089199325._2
205+ let claimAmount = $t089199325._3
206+ let userShareTokensAmount = $t089199325._4
207+[IntegerEntry((((pool + "_") + toString(i.caller)) + keyUserLastInterest), userNewInterest), IntegerEntry(((pool + "_") + keyLastInterest), currentInterest), IntegerEntry(((pool + "_") + keyLastInterestHeight), height), Reissue(SWOP, claimAmount, true), ScriptTransfer(i.caller, claimAmount, SWOP)]
208+ }
209+
210+

github/deemru/w8io/169f3d6 
24.17 ms