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