tx · J4JLXWvz1JFTHvKBTWzkQPK76jPhJmr2KPj6XcUgx3Bg 3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT: -0.01400000 Waves 2021.06.13 17:40 [1568698] smart account 3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT > SELF 0.00000000 Waves
{ "type": 13, "id": "J4JLXWvz1JFTHvKBTWzkQPK76jPhJmr2KPj6XcUgx3Bg", "fee": 1400000, "feeAssetId": null, "timestamp": 1623595247330, "version": 2, "chainId": 84, "sender": "3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT", "senderPublicKey": "3ijdmxaYrpDFsKVbQH2kvB7i6JzHj9bep9bGWiQPra2D", "proofs": [ "5GdMCAAiBHD1PRPCFEiRnt9GdxBpcgyNeBbErYngfKZ3kHcRz31kdXW11WXfbit2tPECbAj8zg4xCc4GASpXeN2L" ], "script": "base64:AAIEAAAAAAAAACEIAhIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgMKAQgAAABXAAAAAAxhZG1pblB1YktleTEBAAAAIATPdeVk0MEPTme5HxNkxBoN6oQkQjF9M5BdQFgKnZNKAAAAAAxhZG1pblB1YktleTIBAAAAIATPdeVk0MEPTme5HxNkxBoN6oQkQjF9M5BdQFgKnZNKAAAAAAxhZG1pblB1YktleTMBAAAAIATPdeVk0MEPTme5HxNkxBoN6oQkQjF9M5BdQFgKnZNKAAAAABRrZXlTaGFyZVRva2Vuc0xvY2tlZAIAAAAaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAAAAAC2tTaGFyZUxpbWl0AgAAABxzaGFyZV9saW1pdF9vbl9maXJzdF9oYXJ2ZXN0AAAAABxrZXlSZXdhcmRQb29sRnJhY3Rpb25DdXJyZW50AgAAAB1fY3VycmVudF9wb29sX2ZyYWN0aW9uX3Jld2FyZAAAAAAda2V5UmV3YXJkUG9vbEZyYWN0aW9uUHJldmlvdXMCAAAAHl9wcmV2aW91c19wb29sX2ZyYWN0aW9uX3Jld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AAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmHA4eA", "height": 1568698, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AGy57Qu91Mqcsp6fbDpbHLmKN3bcmxaH3YezEzn9B4nA Next: AMNt9ra4rKnsKcEZJ3ZRzbmRLs294rmhdeZ5wcWjWV6g Diff:
Old | New | Differences | |
---|---|---|---|
504 | 504 | else if ((pmtAmount > limitShareToken)) | |
505 | 505 | then throw(("You can't share token more than " + toString(limitShareToken))) | |
506 | 506 | else if ((shareToken > 0)) | |
507 | - | then if (( | |
507 | + | then if ((fraction(99, (accountBalance(pmtAssetId) + pmtAmount), 100) > totalShareAmountNew)) | |
508 | 508 | then throw("Balance of share-token is greater than totalAmount") | |
509 | 509 | else if ((totalShareAmount == 0)) | |
510 | 510 | then (baseEntry ++ [Reissue(SWOP, protocolReward, true), ScriptTransfer(wallet, protocolReward, SWOP)]) | |
534 | 534 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
535 | 535 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
536 | 536 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
537 | - | throw(((toString(accountBalance(shareTokensId)) + "-") + toString(totalShareAmountNew))) | |
537 | + | if ((shareTokensWithdrawAmount > userShareTokensAmount)) | |
538 | + | then throw("Withdraw amount more then user locked amount") | |
539 | + | else if ((fraction(99, (accountBalance(shareTokensId) - shareTokensWithdrawAmount), 100) > totalShareAmountNew)) | |
540 | + | then throw("Balance of share-token is greater than totalAmount") | |
541 | + | 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)] | |
538 | 542 | } | |
539 | 543 | ||
540 | 544 | ||
543 | 547 | func claim (pool) = { | |
544 | 548 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
545 | 549 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
546 | - | let $ | |
547 | - | let lastInterestHeight = $ | |
548 | - | let lastInterest = $ | |
549 | - | let $ | |
550 | - | let currentRewardPerBlock = $ | |
551 | - | let rewardUpdateHeight = $ | |
552 | - | let previousRewardPerBlock = $ | |
553 | - | let poolRewardUpdateHeight = $ | |
554 | - | let $ | |
555 | - | let userNewInterest = $ | |
556 | - | let currentInterest = $ | |
557 | - | let claimAmount = $ | |
558 | - | let userShareTokensAmount = $ | |
550 | + | let $t02420924274 = getLastInterestInfo(pool) | |
551 | + | let lastInterestHeight = $t02420924274._1 | |
552 | + | let lastInterest = $t02420924274._2 | |
553 | + | let $t02427924391 = rewardInfo(pool) | |
554 | + | let currentRewardPerBlock = $t02427924391._1 | |
555 | + | let rewardUpdateHeight = $t02427924391._2 | |
556 | + | let previousRewardPerBlock = $t02427924391._3 | |
557 | + | let poolRewardUpdateHeight = $t02427924391._4 | |
558 | + | let $t02439624496 = claimCalc(pool, i.caller, 1) | |
559 | + | let userNewInterest = $t02439624496._1 | |
560 | + | let currentInterest = $t02439624496._2 | |
561 | + | let claimAmount = $t02439624496._3 | |
562 | + | let userShareTokensAmount = $t02439624496._4 | |
559 | 563 | let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
560 | 564 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
561 | 565 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let adminPubKey1 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
5 | 5 | ||
6 | 6 | let adminPubKey2 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
7 | 7 | ||
8 | 8 | let adminPubKey3 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
9 | 9 | ||
10 | 10 | let keyShareTokensLocked = "_total_share_tokens_locked" | |
11 | 11 | ||
12 | 12 | let kShareLimit = "share_limit_on_first_harvest" | |
13 | 13 | ||
14 | 14 | let keyRewardPoolFractionCurrent = "_current_pool_fraction_reward" | |
15 | 15 | ||
16 | 16 | let keyRewardPoolFractionPrevious = "_previous_pool_fraction_reward" | |
17 | 17 | ||
18 | 18 | let keyHeightPoolFraction = "_pool_reward_update_height" | |
19 | 19 | ||
20 | 20 | let keyTotalRewardPerBlockCurrent = "total_reward_per_block_current" | |
21 | 21 | ||
22 | 22 | let keyTotalRewardPerBlockPrevious = "total_reward_per_block_previous" | |
23 | 23 | ||
24 | 24 | let keyRewardUpdateHeight = "reward_update_height" | |
25 | 25 | ||
26 | 26 | let keyLastInterest = "_last_interest" | |
27 | 27 | ||
28 | 28 | let keyLastInterestHeight = "_last_interest_height" | |
29 | 29 | ||
30 | 30 | let keyUserShareTokensLocked = "_share_tokens_locked" | |
31 | 31 | ||
32 | 32 | let keyUserLastInterest = "_last_interest" | |
33 | 33 | ||
34 | 34 | let keySWOPid = "SWOP_id" | |
35 | 35 | ||
36 | 36 | let keyUserSWOPClaimedAmount = "_SWOP_claimed_amount" | |
37 | 37 | ||
38 | 38 | let keyUserSWOPLastClaimedAmount = "_SWOP_last_claimed_amount" | |
39 | 39 | ||
40 | 40 | let keyAvailableSWOP = "_available_SWOP" | |
41 | 41 | ||
42 | 42 | let keyFarmingStartHeight = "farming_start_height" | |
43 | 43 | ||
44 | 44 | let keyAPY = "apy" | |
45 | 45 | ||
46 | 46 | let kPreviousTotalVoteSWOP = "previous_total_vote_SWOP" | |
47 | 47 | ||
48 | 48 | let keySwopYearEmission = "swop_year_emission" | |
49 | 49 | ||
50 | 50 | let keyBalancecpmmA = "A_asset_balance" | |
51 | 51 | ||
52 | 52 | let keyBalancecpmmB = "B_asset_balance" | |
53 | 53 | ||
54 | 54 | let kHarvestPoolActiveVoteStrucVoting = "_harvest_pool_activeVote_struc" | |
55 | 55 | ||
56 | 56 | let kHarvestUserPoolActiveVoteStrucVoting = "_harvest_user_pool_activeVote_struc" | |
57 | 57 | ||
58 | 58 | let keyLimitShareFirstHarvest = "share_limit_on_first_harvest" | |
59 | 59 | ||
60 | 60 | let keyAssetIdA = "A_asset_id" | |
61 | 61 | ||
62 | 62 | let keyAssetIdB = "B_asset_id" | |
63 | 63 | ||
64 | 64 | let keyFirstHarvestHeight = "first_harvest_height" | |
65 | 65 | ||
66 | 66 | let keyfirstHarvestCpmm = "first_harvest" | |
67 | 67 | ||
68 | 68 | let keyTempPrevSum = "sum_reward_previous" | |
69 | 69 | ||
70 | 70 | let keyTempCurSum = "sum_reward_current" | |
71 | 71 | ||
72 | 72 | let governanceAddress = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU') | |
73 | 73 | ||
74 | 74 | let wallet = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
75 | 75 | ||
76 | 76 | let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
77 | 77 | ||
78 | 78 | let adminIncreaseInterestAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
79 | 79 | ||
80 | 80 | let oneWeekInBlock = 10106 | |
81 | 81 | ||
82 | 82 | let totalVoteShare = 10000000000 | |
83 | 83 | ||
84 | 84 | let scaleValue1 = 10 | |
85 | 85 | ||
86 | 86 | let scaleValue3 = 1000 | |
87 | 87 | ||
88 | 88 | let scaleValue5 = 100000 | |
89 | 89 | ||
90 | 90 | let scaleValue6 = 1000000 | |
91 | 91 | ||
92 | 92 | let scaleValue8 = 100000000 | |
93 | 93 | ||
94 | 94 | let scaleValue11 = 100000000000 | |
95 | 95 | ||
96 | 96 | func strAssetIdA (pool) = getStringValue(pool, keyAssetIdA) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func strAssetIdB (pool) = getStringValue(pool, keyAssetIdB) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func assetIdA (pool) = if ((strAssetIdA(pool) == "WAVES")) | |
103 | 103 | then unit | |
104 | 104 | else fromBase58String(strAssetIdA(pool)) | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func assetIdB (pool) = if ((strAssetIdB(pool) == "WAVES")) | |
108 | 108 | then unit | |
109 | 109 | else fromBase58String(strAssetIdB(pool)) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | let kBasePeriod = "base_period" | |
113 | 113 | ||
114 | 114 | let kPeriodLength = "period_length" | |
115 | 115 | ||
116 | 116 | let kStartHeight = "start_height" | |
117 | 117 | ||
118 | 118 | let kFirstHarvestHeight = "first_harvest_height" | |
119 | 119 | ||
120 | 120 | let kDurationFullVotePower = "duration_full_vote_power" | |
121 | 121 | ||
122 | 122 | let kMinVotePower = "min_vote_power" | |
123 | 123 | ||
124 | 124 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
125 | 125 | ||
126 | 126 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
127 | 127 | ||
128 | 128 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
129 | 129 | ||
130 | 130 | let durationFullVotePower = valueOrErrorMessage(getInteger(votingAddress, kDurationFullVotePower), "Empty kDurationFullVotePower") | |
131 | 131 | ||
132 | 132 | let minVotePower = valueOrErrorMessage(getInteger(votingAddress, kMinVotePower), "Empty kMinVotePower") | |
133 | 133 | ||
134 | 134 | let currPeriod = (basePeriod + ((height - startHeight) / periodLength)) | |
135 | 135 | ||
136 | 136 | func getLimitToken (pool) = valueOrElse(getIntegerValue(pool, keyLimitShareFirstHarvest), 0) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | let APY = getIntegerValue(this, keyAPY) | |
140 | 140 | ||
141 | 141 | let SwopYearEmission = getIntegerValue(this, keySwopYearEmission) | |
142 | 142 | ||
143 | 143 | func assetNameA (pool) = match assetIdA(pool) { | |
144 | 144 | case id: ByteVector => | |
145 | 145 | value(assetInfo(id)).name | |
146 | 146 | case waves: Unit => | |
147 | 147 | "WAVES" | |
148 | 148 | case _ => | |
149 | 149 | throw("Match error") | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func assetNameB (pool) = match assetIdB(pool) { | |
154 | 154 | case id: ByteVector => | |
155 | 155 | value(assetInfo(id)).name | |
156 | 156 | case waves: Unit => | |
157 | 157 | "WAVES" | |
158 | 158 | case _ => | |
159 | 159 | throw("Match error") | |
160 | 160 | } | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | let SWOP = fromBase58String(getStringValue(this, keySWOPid)) | |
164 | 164 | ||
165 | 165 | func isFirstHarvest (pool) = valueOrElse(getBoolean(pool, keyfirstHarvestCpmm), false) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func getHeightFirstHarvest (pool) = valueOrElse(getInteger(pool, keyFirstHarvestHeight), 0) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func getBalanceA (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmA), ("No data on the key: " + keyBalancecpmmA)) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func getBalanceB (pool) = valueOrErrorMessage(getInteger(pool, keyBalancecpmmB), ("No data on the key: " + keyBalancecpmmB)) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func getShareLimitToken (pool) = valueOrErrorMessage(getInteger(pool, kShareLimit), ("No data on the key: " + kShareLimit)) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func getTotalShareTokenLocked (pool) = valueOrErrorMessage(getInteger(this, (pool + keyShareTokensLocked)), (("No data on the key: " + pool) + keyShareTokensLocked)) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func getShareAssetId (pool) = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func accountBalance (assetId) = match assetId { | |
187 | 187 | case id: ByteVector => | |
188 | 188 | assetBalance(this, id) | |
189 | 189 | case waves: Unit => | |
190 | 190 | wavesBalance(this).available | |
191 | 191 | case _ => | |
192 | 192 | throw("Match error") | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func getAssetInfo (assetId) = match assetId { | |
197 | 197 | case id: ByteVector => | |
198 | 198 | let stringId = toBase58String(id) | |
199 | 199 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
200 | 200 | $Tuple3(stringId, info.name, info.decimals) | |
201 | 201 | case waves: Unit => | |
202 | 202 | $Tuple3("WAVES", "WAVES", 8) | |
203 | 203 | case _ => | |
204 | 204 | throw("Match error") | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func calcScaleValue (assetId1,assetId2) = { | |
209 | 209 | let assetId1Decimals = value(assetInfo(assetId1)).decimals | |
210 | 210 | let assetId2Decimals = value(assetInfo(assetId2)).decimals | |
211 | 211 | let scaleDigits = ((assetId2Decimals - assetId1Decimals) + 8) | |
212 | 212 | pow(10, 0, scaleDigits, 0, 0, HALFDOWN) | |
213 | 213 | } | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func userAvailableSWOP (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyAvailableSWOP)), 0) | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func rewardInfo (pool) = { | |
220 | 220 | let totalRewardPerBlockCurrent = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockCurrent), ((("No data on the key: " + keyTotalRewardPerBlockCurrent) + " at address ") + toString(governanceAddress))) | |
221 | 221 | let totalRewardPerBlockPrevious = valueOrErrorMessage(getInteger(governanceAddress, keyTotalRewardPerBlockPrevious), ((("No data on the key: " + keyTotalRewardPerBlockPrevious) + " at address ") + toString(governanceAddress))) | |
222 | 222 | let rewardPoolFractionCurrent = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionCurrent)), (((("No data on the key: " + pool) + keyRewardPoolFractionCurrent) + " at address ") + toString(governanceAddress))) | |
223 | 223 | let rewardUpdateHeight = valueOrErrorMessage(getInteger(governanceAddress, keyRewardUpdateHeight), ((("No data on the key: " + keyRewardUpdateHeight) + " at address ") + toString(governanceAddress))) | |
224 | 224 | let poolRewardUpdateHeight = valueOrElse(getInteger(governanceAddress, (pool + keyHeightPoolFraction)), 0) | |
225 | 225 | let rewardPoolFractionPrevious = valueOrErrorMessage(getInteger(governanceAddress, (pool + keyRewardPoolFractionPrevious)), (((("No data on the key: " + pool) + keyRewardPoolFractionPrevious) + " at address ") + toString(governanceAddress))) | |
226 | 226 | let rewardPoolCurrent = fraction(totalRewardPerBlockCurrent, rewardPoolFractionCurrent, totalVoteShare) | |
227 | 227 | let rewardPoolPrevious = fraction(totalRewardPerBlockPrevious, rewardPoolFractionPrevious, totalVoteShare) | |
228 | 228 | if (if ((rewardPoolCurrent > totalRewardPerBlockCurrent)) | |
229 | 229 | then true | |
230 | 230 | else (rewardPoolPrevious > totalRewardPerBlockPrevious)) | |
231 | 231 | then throw("rewardPoolCurrent > totalRewardPerBlockCurrent or rewardPoolPrevious > totalRewardPerBlockPrevious") | |
232 | 232 | else $Tuple4(rewardPoolCurrent, rewardUpdateHeight, rewardPoolPrevious, poolRewardUpdateHeight) | |
233 | 233 | } | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func getLastInterestInfo (pool) = { | |
237 | 237 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
238 | 238 | let lastInterestHeight = valueOrElse(getInteger(this, (pool + keyLastInterestHeight)), height) | |
239 | 239 | $Tuple2(lastInterestHeight, lastInterest) | |
240 | 240 | } | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func getUserInterestInfo (pool,userAddress) = { | |
244 | 244 | let userLastInterest = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserLastInterest)) | |
245 | 245 | let userShare = getInteger(this, (((pool + "_") + toString(userAddress)) + keyUserShareTokensLocked)) | |
246 | 246 | let lastInterest = valueOrErrorMessage(getInteger(this, (pool + keyLastInterest)), (("No data on the key: " + pool) + keyLastInterest)) | |
247 | 247 | let userLastInterestValue = match userLastInterest { | |
248 | 248 | case userLastInterest: Int => | |
249 | 249 | userLastInterest | |
250 | 250 | case _ => | |
251 | 251 | lastInterest | |
252 | 252 | } | |
253 | 253 | let userShareTokensAmount = match userShare { | |
254 | 254 | case userShare: Int => | |
255 | 255 | userShare | |
256 | 256 | case _ => | |
257 | 257 | 0 | |
258 | 258 | } | |
259 | 259 | $Tuple2(userLastInterestValue, userShareTokensAmount) | |
260 | 260 | } | |
261 | 261 | ||
262 | 262 | ||
263 | 263 | func calcInterest (lastInterestHeight,rewardUpdateHeight,poolRewardUpdateHeight,lastInterest,currentRewardPerBlock,shareTokenLocked,previousRewardPerBlock,shareAssetId,scaleValue,pmtAmount) = if ((shareTokenLocked == 0)) | |
264 | 264 | then 0 | |
265 | 265 | else if ((poolRewardUpdateHeight != 0)) | |
266 | 266 | then if (if ((rewardUpdateHeight > height)) | |
267 | 267 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
268 | 268 | else false) | |
269 | 269 | then { | |
270 | 270 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
271 | 271 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
272 | 272 | } | |
273 | 273 | else if (if ((height > rewardUpdateHeight)) | |
274 | 274 | then (rewardUpdateHeight != poolRewardUpdateHeight) | |
275 | 275 | else false) | |
276 | 276 | then { | |
277 | 277 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
278 | 278 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
279 | 279 | } | |
280 | 280 | else if (if (if ((height > rewardUpdateHeight)) | |
281 | 281 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
282 | 282 | else false) | |
283 | 283 | then (lastInterestHeight > rewardUpdateHeight) | |
284 | 284 | else false) | |
285 | 285 | then { | |
286 | 286 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
287 | 287 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
288 | 288 | } | |
289 | 289 | else { | |
290 | 290 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
291 | 291 | let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked)) | |
292 | 292 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
293 | 293 | (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked)) | |
294 | 294 | } | |
295 | 295 | else if ((rewardUpdateHeight > height)) | |
296 | 296 | then { | |
297 | 297 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
298 | 298 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
299 | 299 | } | |
300 | 300 | else if ((lastInterestHeight > rewardUpdateHeight)) | |
301 | 301 | then { | |
302 | 302 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
303 | 303 | (lastInterest + fraction(reward, scaleValue, shareTokenLocked)) | |
304 | 304 | } | |
305 | 305 | else { | |
306 | 306 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
307 | 307 | let interestAfterUpdate = (lastInterest + fraction(rewardAfterLastInterestBeforeReawardUpdate, scaleValue, shareTokenLocked)) | |
308 | 308 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
309 | 309 | (interestAfterUpdate + fraction(reward, scaleValue, shareTokenLocked)) | |
310 | 310 | } | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | func claimCalc (pool,caller,pmtAmount) = { | |
314 | 314 | let shareAssetId = getShareAssetId(pool) | |
315 | 315 | let scaleValue = calcScaleValue(SWOP, shareAssetId) | |
316 | 316 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
317 | 317 | let $t01300013065 = getLastInterestInfo(pool) | |
318 | 318 | let lastInterestHeight = $t01300013065._1 | |
319 | 319 | let lastInterest = $t01300013065._2 | |
320 | 320 | let $t01307013182 = rewardInfo(pool) | |
321 | 321 | let currentRewardPerBlock = $t01307013182._1 | |
322 | 322 | let rewardUpdateHeight = $t01307013182._2 | |
323 | 323 | let previousRewardPerBlock = $t01307013182._3 | |
324 | 324 | let poolRewardUpdateHeight = $t01307013182._4 | |
325 | 325 | let $t01318713266 = getUserInterestInfo(pool, caller) | |
326 | 326 | let userLastInterest = $t01318713266._1 | |
327 | 327 | let userShareTokensAmount = $t01318713266._2 | |
328 | 328 | let currentInterest = calcInterest(lastInterestHeight, rewardUpdateHeight, poolRewardUpdateHeight, lastInterest, currentRewardPerBlock, shareTokenLocked, previousRewardPerBlock, shareAssetId, scaleValue, pmtAmount) | |
329 | 329 | let claimAmount = fraction(userShareTokensAmount, (currentInterest - userLastInterest), scaleValue) | |
330 | 330 | let userNewInterest = currentInterest | |
331 | 331 | $Tuple4(userNewInterest, currentInterest, claimAmount, userShareTokensAmount) | |
332 | 332 | } | |
333 | 333 | ||
334 | 334 | ||
335 | 335 | func calculateProtocolReward (pool) = { | |
336 | 336 | let $t01378413849 = getLastInterestInfo(pool) | |
337 | 337 | let lastInterestHeight = $t01378413849._1 | |
338 | 338 | let lastInterest = $t01378413849._2 | |
339 | 339 | let $t01385413965 = rewardInfo(pool) | |
340 | 340 | let currentRewardPerBlock = $t01385413965._1 | |
341 | 341 | let rewardUpdateHeight = $t01385413965._2 | |
342 | 342 | let previousRewardPerBlock = $t01385413965._3 | |
343 | 343 | let poolRewardUpdateHeight = $t01385413965._4 | |
344 | 344 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
345 | 345 | if (if ((shareTokenLocked == 0)) | |
346 | 346 | then (poolRewardUpdateHeight == 0) | |
347 | 347 | else false) | |
348 | 348 | then if ((rewardUpdateHeight > height)) | |
349 | 349 | then { | |
350 | 350 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
351 | 351 | reward | |
352 | 352 | } | |
353 | 353 | else if ((lastInterestHeight > rewardUpdateHeight)) | |
354 | 354 | then { | |
355 | 355 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
356 | 356 | reward | |
357 | 357 | } | |
358 | 358 | else { | |
359 | 359 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
360 | 360 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
361 | 361 | (reward + rewardAfterLastInterestBeforeReawardUpdate) | |
362 | 362 | } | |
363 | 363 | else if (if ((shareTokenLocked == 0)) | |
364 | 364 | then (poolRewardUpdateHeight != 0) | |
365 | 365 | else false) | |
366 | 366 | then if (if ((rewardUpdateHeight > height)) | |
367 | 367 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
368 | 368 | else false) | |
369 | 369 | then { | |
370 | 370 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
371 | 371 | reward | |
372 | 372 | } | |
373 | 373 | else if (if ((height > rewardUpdateHeight)) | |
374 | 374 | then (rewardUpdateHeight != poolRewardUpdateHeight) | |
375 | 375 | else false) | |
376 | 376 | then { | |
377 | 377 | let reward = (previousRewardPerBlock * (height - lastInterestHeight)) | |
378 | 378 | reward | |
379 | 379 | } | |
380 | 380 | else if (if (if ((height > rewardUpdateHeight)) | |
381 | 381 | then (rewardUpdateHeight == poolRewardUpdateHeight) | |
382 | 382 | else false) | |
383 | 383 | then (lastInterestHeight > rewardUpdateHeight) | |
384 | 384 | else false) | |
385 | 385 | then { | |
386 | 386 | let reward = (currentRewardPerBlock * (height - lastInterestHeight)) | |
387 | 387 | reward | |
388 | 388 | } | |
389 | 389 | else { | |
390 | 390 | let rewardAfterLastInterestBeforeReawardUpdate = (previousRewardPerBlock * (rewardUpdateHeight - lastInterestHeight)) | |
391 | 391 | let reward = (currentRewardPerBlock * (height - rewardUpdateHeight)) | |
392 | 392 | (reward + rewardAfterLastInterestBeforeReawardUpdate) | |
393 | 393 | } | |
394 | 394 | else 0 | |
395 | 395 | } | |
396 | 396 | ||
397 | 397 | ||
398 | 398 | func checkPmtAssetIdCorrect (pool,pmtAssetId) = { | |
399 | 399 | let poolShareAssetId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
400 | 400 | if ((pmtAssetId == poolShareAssetId)) | |
401 | 401 | then true | |
402 | 402 | else false | |
403 | 403 | } | |
404 | 404 | ||
405 | 405 | ||
406 | 406 | func getUserSWOPClaimedAmount (pool,user) = valueOrElse(getInteger(this, (((pool + "_") + toString(user)) + keyUserSWOPClaimedAmount)), 0) | |
407 | 407 | ||
408 | 408 | ||
409 | 409 | @Callable(i) | |
410 | 410 | func init (earlyLP) = if (isDefined(getString(this, keySWOPid))) | |
411 | 411 | then throw("SWOP already initialized") | |
412 | 412 | else { | |
413 | 413 | let initAmount = 100000000000000 | |
414 | 414 | let SWOPissue = Issue("SWOP", "SWOP protocol token", initAmount, 8, true) | |
415 | 415 | let SWOPid = calculateAssetId(SWOPissue) | |
416 | 416 | [Issue("SWOP", "SWOP protocol token", initAmount, 8, true), StringEntry(keySWOPid, toBase58String(SWOPid))] | |
417 | 417 | } | |
418 | 418 | ||
419 | 419 | ||
420 | 420 | ||
421 | 421 | @Callable(i) | |
422 | 422 | func initPoolShareFarming (pool) = if ((i.caller != this)) | |
423 | 423 | then throw("Only the DApp itself can call this function") | |
424 | 424 | else { | |
425 | 425 | let $t01680516908 = rewardInfo(pool) | |
426 | 426 | let currentReward = $t01680516908._1 | |
427 | 427 | let rewardUpdateHeight = $t01680516908._2 | |
428 | 428 | let previousRewardPerBlock = $t01680516908._3 | |
429 | 429 | let poolRewardUpdateHeight = $t01680516908._4 | |
430 | 430 | [IntegerEntry((pool + keyShareTokensLocked), 0), IntegerEntry((pool + keyLastInterest), 0), IntegerEntry((pool + keyLastInterestHeight), height)] | |
431 | 431 | } | |
432 | 432 | ||
433 | 433 | ||
434 | 434 | ||
435 | 435 | @Callable(i) | |
436 | 436 | func updatePoolInterest (pool) = if ((i.caller != wallet)) | |
437 | 437 | then throw("Only the Admin itself can call this function") | |
438 | 438 | else { | |
439 | 439 | let $t01724217362 = claimCalc(pool, adminIncreaseInterestAddress, 0) | |
440 | 440 | let userNewInterest = $t01724217362._1 | |
441 | 441 | let currentInterest = $t01724217362._2 | |
442 | 442 | let claimAmount = $t01724217362._3 | |
443 | 443 | let userShareTokensAmount = $t01724217362._4 | |
444 | 444 | let $t01736717470 = rewardInfo(pool) | |
445 | 445 | let currentReward = $t01736717470._1 | |
446 | 446 | let rewardUpdateHeight = $t01736717470._2 | |
447 | 447 | let previousRewardPerBlock = $t01736717470._3 | |
448 | 448 | let poolRewardUpdateHeight = $t01736717470._4 | |
449 | 449 | [IntegerEntry((pool + keyLastInterest), userNewInterest), IntegerEntry((pool + keyLastInterestHeight), height)] | |
450 | 450 | } | |
451 | 451 | ||
452 | 452 | ||
453 | 453 | ||
454 | 454 | @Callable(i) | |
455 | 455 | func lockShareTokens (pool) = { | |
456 | 456 | let $t01766217737 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
457 | 457 | let pmtAmount = $t01766217737._1 | |
458 | 458 | let pmtAssetId = $t01766217737._2 | |
459 | 459 | let $t01774217815 = getAssetInfo(pmtAssetId) | |
460 | 460 | let pmtStrAssetId = $t01774217815._1 | |
461 | 461 | let pmtAssetName = $t01774217815._2 | |
462 | 462 | let pmtDecimals = $t01774217815._3 | |
463 | 463 | let $t01782017928 = claimCalc(pool, i.caller, pmtAmount) | |
464 | 464 | let userNewInterest = $t01782017928._1 | |
465 | 465 | let currentInterest = $t01782017928._2 | |
466 | 466 | let claimAmount = $t01782017928._3 | |
467 | 467 | let userShareTokensAmount = $t01782017928._4 | |
468 | 468 | let userShareAmountNew = (userShareTokensAmount + pmtAmount) | |
469 | 469 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
470 | 470 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
471 | 471 | let totalShareAmountNew = (totalShareAmount + pmtAmount) | |
472 | 472 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
473 | 473 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
474 | 474 | 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)] | |
475 | 475 | if ((0 >= pmtAmount)) | |
476 | 476 | then throw("You can't lock token") | |
477 | 477 | else if (!(checkPmtAssetIdCorrect(pool, pmtAssetId))) | |
478 | 478 | then throw("Incorrect pmtAssetId") | |
479 | 479 | else if (if (isFirstHarvest(Address(fromBase58String(pool)))) | |
480 | 480 | then (getHeightFirstHarvest(Address(fromBase58String(pool))) > height) | |
481 | 481 | else false) | |
482 | 482 | then { | |
483 | 483 | let harvestPeriod = ((((getHeightFirstHarvest(Address(fromBase58String(pool))) - startHeight) + 1) / periodLength) - 1) | |
484 | 484 | let amountOfVoting = split(getStringValue(votingAddress, (((toString(i.caller) + "_") + pool) + "_user_pool_struc")), "_") | |
485 | 485 | let amountPoolStract = split(getStringValue(votingAddress, (pool + "_pool_struc")), "_") | |
486 | 486 | let amountActiveVoteUserPoolStract = split(valueOrElse(getString(votingAddress, (((toString(i.caller) + "_") + pool) + kHarvestUserPoolActiveVoteStrucVoting)), ""), "_") | |
487 | 487 | let amountPoolActiveVoteStract = split(valueOrElse(getString(votingAddress, (pool + kHarvestPoolActiveVoteStrucVoting)), ""), "_") | |
488 | 488 | let userShareTokenLocked = userShareTokensAmount | |
489 | 489 | let userPoolActiveVote = if ((toString(currPeriod) == amountOfVoting[2])) | |
490 | 490 | then valueOrElse(parseInt(amountActiveVoteUserPoolStract[0]), 0) | |
491 | 491 | else valueOrElse(parseInt(amountOfVoting[1]), 0) | |
492 | 492 | let poolActiveVote = if ((toString(currPeriod) == amountPoolStract[2])) | |
493 | 493 | then valueOrElse(parseInt(amountPoolActiveVoteStract[0]), 0) | |
494 | 494 | else valueOrElse(parseInt(amountPoolStract[1]), 0) | |
495 | 495 | let protocolReward = calculateProtocolReward(pool) | |
496 | 496 | if ((userPoolActiveVote != 0)) | |
497 | 497 | then { | |
498 | 498 | let limitShareToken = getShareLimitToken(addressFromStringValue(pool)) | |
499 | 499 | let shareToken = (fraction(limitShareToken, userPoolActiveVote, poolActiveVote) - userShareTokenLocked) | |
500 | 500 | if (if ((size(amountActiveVoteUserPoolStract) > 1)) | |
501 | 501 | then (valueOrElse(parseInt(amountActiveVoteUserPoolStract[1]), 0) >= harvestPeriod) | |
502 | 502 | else false) | |
503 | 503 | then throw("You can't share token") | |
504 | 504 | else if ((pmtAmount > limitShareToken)) | |
505 | 505 | then throw(("You can't share token more than " + toString(limitShareToken))) | |
506 | 506 | else if ((shareToken > 0)) | |
507 | - | then if (( | |
507 | + | then if ((fraction(99, (accountBalance(pmtAssetId) + pmtAmount), 100) > totalShareAmountNew)) | |
508 | 508 | then throw("Balance of share-token is greater than totalAmount") | |
509 | 509 | else if ((totalShareAmount == 0)) | |
510 | 510 | then (baseEntry ++ [Reissue(SWOP, protocolReward, true), ScriptTransfer(wallet, protocolReward, SWOP)]) | |
511 | 511 | else if ((shareToken >= pmtAmount)) | |
512 | 512 | then baseEntry | |
513 | 513 | else throw(("Your maximum share token is " + toString(shareToken))) | |
514 | 514 | else throw("You can't share token") | |
515 | 515 | } | |
516 | 516 | else throw("Your amount of token less than 0") | |
517 | 517 | } | |
518 | 518 | else baseEntry | |
519 | 519 | } | |
520 | 520 | ||
521 | 521 | ||
522 | 522 | ||
523 | 523 | @Callable(i) | |
524 | 524 | func withdrawShareTokens (pool,shareTokensWithdrawAmount) = { | |
525 | 525 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
526 | 526 | let $t02232322423 = claimCalc(pool, i.caller, 1) | |
527 | 527 | let userNewInterest = $t02232322423._1 | |
528 | 528 | let currentInterest = $t02232322423._2 | |
529 | 529 | let claimAmount = $t02232322423._3 | |
530 | 530 | let userShareTokensAmount = $t02232322423._4 | |
531 | 531 | let userShareAmountNew = (userShareTokensAmount - shareTokensWithdrawAmount) | |
532 | 532 | let availableFundsNew = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
533 | 533 | let totalShareAmount = getTotalShareTokenLocked(pool) | |
534 | 534 | let totalShareAmountNew = (totalShareAmount - shareTokensWithdrawAmount) | |
535 | 535 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
536 | 536 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
537 | - | throw(((toString(accountBalance(shareTokensId)) + "-") + toString(totalShareAmountNew))) | |
537 | + | if ((shareTokensWithdrawAmount > userShareTokensAmount)) | |
538 | + | then throw("Withdraw amount more then user locked amount") | |
539 | + | else if ((fraction(99, (accountBalance(shareTokensId) - shareTokensWithdrawAmount), 100) > totalShareAmountNew)) | |
540 | + | then throw("Balance of share-token is greater than totalAmount") | |
541 | + | 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)] | |
538 | 542 | } | |
539 | 543 | ||
540 | 544 | ||
541 | 545 | ||
542 | 546 | @Callable(i) | |
543 | 547 | func claim (pool) = { | |
544 | 548 | let shareTokensId = fromBase58String(getStringValue(value(addressFromString(pool)), "share_asset_id")) | |
545 | 549 | let shareTokenLocked = getTotalShareTokenLocked(pool) | |
546 | - | let $ | |
547 | - | let lastInterestHeight = $ | |
548 | - | let lastInterest = $ | |
549 | - | let $ | |
550 | - | let currentRewardPerBlock = $ | |
551 | - | let rewardUpdateHeight = $ | |
552 | - | let previousRewardPerBlock = $ | |
553 | - | let poolRewardUpdateHeight = $ | |
554 | - | let $ | |
555 | - | let userNewInterest = $ | |
556 | - | let currentInterest = $ | |
557 | - | let claimAmount = $ | |
558 | - | let userShareTokensAmount = $ | |
550 | + | let $t02420924274 = getLastInterestInfo(pool) | |
551 | + | let lastInterestHeight = $t02420924274._1 | |
552 | + | let lastInterest = $t02420924274._2 | |
553 | + | let $t02427924391 = rewardInfo(pool) | |
554 | + | let currentRewardPerBlock = $t02427924391._1 | |
555 | + | let rewardUpdateHeight = $t02427924391._2 | |
556 | + | let previousRewardPerBlock = $t02427924391._3 | |
557 | + | let poolRewardUpdateHeight = $t02427924391._4 | |
558 | + | let $t02439624496 = claimCalc(pool, i.caller, 1) | |
559 | + | let userNewInterest = $t02439624496._1 | |
560 | + | let currentInterest = $t02439624496._2 | |
561 | + | let claimAmount = $t02439624496._3 | |
562 | + | let userShareTokensAmount = $t02439624496._4 | |
559 | 563 | let availableFund = (userAvailableSWOP(pool, i.caller) + claimAmount) | |
560 | 564 | let userClaimedAmount = getUserSWOPClaimedAmount(pool, i.caller) | |
561 | 565 | let userClaimedAmountNew = (userClaimedAmount + claimAmount) | |
562 | 566 | if ((availableFund == 0)) | |
563 | 567 | then throw("You have 0 available SWOP") | |
564 | 568 | else if ((fraction(99, accountBalance(shareTokensId), 100) > shareTokenLocked)) | |
565 | 569 | then throw("Balance of share-token is greater than totalAmount") | |
566 | 570 | 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)] | |
567 | 571 | } | |
568 | 572 | ||
569 | 573 | ||
570 | 574 | @Verifier(tx) | |
571 | 575 | func verify () = match tx { | |
572 | 576 | case _ => | |
573 | 577 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
574 | 578 | } | |
575 | 579 |
github/deemru/w8io/026f985 117.23 ms ◑