tx · HVd3EkU4EtN3uSgoEeaoGs9jwfyGoPzhTsBR5cR96Bf8 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz: -0.03000000 Waves 2022.07.01 13:52 [2120487] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves
{ "type": 13, "id": "HVd3EkU4EtN3uSgoEeaoGs9jwfyGoPzhTsBR5cR96Bf8", "fee": 3000000, "feeAssetId": null, "timestamp": 1656672826050, "version": 1, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "4R49yFNDSzGfUgLvVRE7TNT4NCsKRyYv2oPDDnEaqctRaYJe96MmWoPdfPq2EQs9GeoR6qFzRvfiUgNwVcRwK723" ], "script": "base64:BgI8CAISAwoBCBIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBAoCCAgSAwoBCBIECgIICBIDCgEIXgAGU0NBTEU4AAgABU1VTFQ4AIDC1y8AB1NDQUxFMTgAEgAGTVVMVDE4CQC2AgEAgICQu7rWrfANAANTRVACAl9fAA5QT09MV0VJR0hUTVVMVAUFTVVMVDgACnplcm9CaWdJbnQJALYCAQAAAAlvbmVCaWdJbnQJALYCAQABAAtrZXlNaWdyYXRvcgIIbWlncmF0b3IBCWFzQW55TGlzdAEDdmFsBAckbWF0Y2gwBQN2YWwDCQABAgUHJG1hdGNoMAIJTGlzdFtBbnldBAp2YWxBbnlMeXN0BQckbWF0Y2gwBQp2YWxBbnlMeXN0CQACAQIbZmFpbCB0byBjYXN0IGludG8gTGlzdFtBbnldAQVhc0ludAEDdmFsBAckbWF0Y2gwBQN2YWwDCQABAgUHJG1hdGNoMAIDSW50BAZ2YWxJbnQFByRtYXRjaDAFBnZhbEludAkAAgECFWZhaWwgdG8gY2FzdCBpbnRvIEludAEIYXNTdHJpbmcBA3ZhbAQH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PdGFyZ2V0UHVibGljS2V5BgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAkBEUBleHRyTmF0aXZlKDEwNTIpAgUEdGhpcwULa2V5TWlncmF0b3Iv7tyB", "chainId": 84, "height": 2120487, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DuWdfqjBS2tWNXpTxnWLgVgaQZigUFUZZszydiTzAcTm Next: 7sPC7WGKDVesY1h9B7tEHeV5qT3UBWHx8kyCvNanpTE4 Diff:
Old | New | Differences | |
---|---|---|---|
16 | 16 | let zeroBigInt = toBigInt(0) | |
17 | 17 | ||
18 | 18 | let oneBigInt = toBigInt(1) | |
19 | + | ||
20 | + | let keyMigrator = "migrator" | |
19 | 21 | ||
20 | 22 | func asAnyList (val) = match val { | |
21 | 23 | case valAnyLyst: List[Any] => | |
346 | 348 | ||
347 | 349 | ||
348 | 350 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
349 | - | let $ | |
350 | - | let wxPerLpIntegralNew = $ | |
351 | - | let poolIntegralSTATE = $ | |
352 | - | let poolDEBUG = $ | |
351 | + | let $t01424614368 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
352 | + | let wxPerLpIntegralNew = $t01424614368._1 | |
353 | + | let poolIntegralSTATE = $t01424614368._2 | |
354 | + | let poolDEBUG = $t01424614368._3 | |
353 | 355 | let MULT3 = 1000 | |
354 | 356 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
355 | 357 | let stakedByUser = readStaked(stakedByUserKEY) | |
467 | 469 | ||
468 | 470 | ||
469 | 471 | @Callable(i) | |
470 | - | func stake () = if ((size(i.payments) != 1)) | |
471 | - | then throw("invalid payment - exact one payment must be attached") | |
472 | - | else { | |
473 | - | let pmt = i.payments[0] | |
474 | - | let lpAssetId = value(pmt.assetId) | |
475 | - | let lpAssetIdStr = toBase58String(lpAssetId) | |
476 | - | let amount = pmt.amount | |
477 | - | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
478 | - | let callerStr = toString(i.caller) | |
479 | - | let userAddressStr = if ((callerStr == poolAddressStr)) | |
480 | - | then toString(i.originCaller) | |
481 | - | else callerStr | |
482 | - | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
483 | - | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
484 | - | let stakedByUser = readStaked(stakedByUserKEY) | |
485 | - | let stakedTotal = readStaked(stakedTotalKEY) | |
486 | - | let $t01877518892 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
487 | - | let wxToClaimUserNew = $t01877518892._1 | |
488 | - | let integralSTATE = $t01877518892._2 | |
489 | - | let debug = $t01877518892._3 | |
490 | - | let listName = getUsersListName(lpAssetIdStr) | |
491 | - | let listActions = if (containsNode(listName, userAddressStr)) | |
492 | - | then nil | |
493 | - | else insertNodeActions(listName, userAddressStr) | |
494 | - | (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
495 | - | } | |
472 | + | func stake () = { | |
473 | + | let migration = if ((getBinary(this, keyMigrator) != unit)) | |
474 | + | then throw("maintenance") | |
475 | + | else unit | |
476 | + | if ((migration == migration)) | |
477 | + | then if ((size(i.payments) != 1)) | |
478 | + | then throw("invalid payment - exact one payment must be attached") | |
479 | + | else { | |
480 | + | let pmt = i.payments[0] | |
481 | + | let lpAssetId = value(pmt.assetId) | |
482 | + | let lpAssetIdStr = toBase58String(lpAssetId) | |
483 | + | let amount = pmt.amount | |
484 | + | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
485 | + | let callerStr = toString(i.caller) | |
486 | + | let userAddressStr = if ((callerStr == poolAddressStr)) | |
487 | + | then toString(i.originCaller) | |
488 | + | else callerStr | |
489 | + | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
490 | + | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
491 | + | let stakedByUser = readStaked(stakedByUserKEY) | |
492 | + | let stakedTotal = readStaked(stakedTotalKEY) | |
493 | + | let $t01893619053 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
494 | + | let wxToClaimUserNew = $t01893619053._1 | |
495 | + | let integralSTATE = $t01893619053._2 | |
496 | + | let debug = $t01893619053._3 | |
497 | + | let listName = getUsersListName(lpAssetIdStr) | |
498 | + | let listActions = if (containsNode(listName, userAddressStr)) | |
499 | + | then nil | |
500 | + | else insertNodeActions(listName, userAddressStr) | |
501 | + | (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
502 | + | } | |
503 | + | else throw("Strict value is not equal to itself.") | |
504 | + | } | |
496 | 505 | ||
497 | 506 | ||
498 | 507 | ||
499 | 508 | @Callable(i) | |
500 | 509 | func unstake (lpAssetIdStr,amount) = { | |
501 | - | let lpAssetId = fromBase58String(lpAssetIdStr) | |
502 | - | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
503 | - | let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr) | |
504 | - | let callerStr = toString(i.caller) | |
505 | - | let userAddressStr = if (if ((callerStr == poolAddressStr)) | |
506 | - | then true | |
507 | - | else (callerStr == poolAddon)) | |
508 | - | then toString(i.originCaller) | |
509 | - | else callerStr | |
510 | - | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
511 | - | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
512 | - | let stakedByUser = readStaked(stakedByUserKEY) | |
513 | - | let stakedTotal = readStaked(stakedTotalKEY) | |
514 | - | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
515 | - | let listName = getUsersListName(lpAssetIdStr) | |
516 | - | let listActions = if (if (containsNode(listName, userAddressStr)) | |
517 | - | then (amount == stakedByUser) | |
518 | - | else false) | |
519 | - | then deleteNodeActions(listName, userAddressStr) | |
520 | - | else nil | |
521 | - | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
522 | - | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
523 | - | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
524 | - | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
525 | - | let r = if ((availableToClaim > zeroBigInt)) | |
526 | - | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
510 | + | let migration = if ((getBinary(this, keyMigrator) != unit)) | |
511 | + | then throw("maintenance") | |
527 | 512 | else unit | |
528 | - | if ((r == r)) | |
529 | - | then if ((amount > stakedByUser)) | |
530 | - | then throw("passed amount is less then available") | |
531 | - | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
513 | + | if ((migration == migration)) | |
514 | + | then { | |
515 | + | let lpAssetId = fromBase58String(lpAssetIdStr) | |
516 | + | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
517 | + | let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr) | |
518 | + | let callerStr = toString(i.caller) | |
519 | + | let userAddressStr = if (if ((callerStr == poolAddressStr)) | |
520 | + | then true | |
521 | + | else (callerStr == poolAddon)) | |
522 | + | then toString(i.originCaller) | |
523 | + | else callerStr | |
524 | + | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
525 | + | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
526 | + | let stakedByUser = readStaked(stakedByUserKEY) | |
527 | + | let stakedTotal = readStaked(stakedTotalKEY) | |
528 | + | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
529 | + | let listName = getUsersListName(lpAssetIdStr) | |
530 | + | let listActions = if (if (containsNode(listName, userAddressStr)) | |
531 | + | then (amount == stakedByUser) | |
532 | + | else false) | |
533 | + | then deleteNodeActions(listName, userAddressStr) | |
534 | + | else nil | |
535 | + | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
536 | + | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
537 | + | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
538 | + | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
539 | + | let r = if ((availableToClaim > zeroBigInt)) | |
540 | + | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
541 | + | else unit | |
542 | + | if ((r == r)) | |
543 | + | then if ((amount > stakedByUser)) | |
544 | + | then throw("passed amount is less then available") | |
545 | + | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
546 | + | else throw("Strict value is not equal to itself.") | |
547 | + | } | |
532 | 548 | else throw("Strict value is not equal to itself.") | |
533 | 549 | } | |
534 | 550 | ||
558 | 574 | let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY) | |
559 | 575 | let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY) | |
560 | 576 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
561 | - | let $ | |
562 | - | let wxToClaimUserNew = $ | |
563 | - | let integralSTATE = $ | |
564 | - | let debug = $ | |
577 | + | let $t02288322995 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
578 | + | let wxToClaimUserNew = $t02288322995._1 | |
579 | + | let integralSTATE = $t02288322995._2 | |
580 | + | let debug = $t02288322995._3 | |
565 | 581 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
566 | 582 | if ((zeroBigInt >= availableToClaim)) | |
567 | 583 | then throw("nothing to claim") | |
604 | 620 | else (height - emissionStartBlock) | |
605 | 621 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
606 | 622 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
607 | - | let $ | |
608 | - | let wxToClaimUserNew = $ | |
609 | - | let integralSTATE = $ | |
610 | - | let debug = $ | |
623 | + | let $t02563725749 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
624 | + | let wxToClaimUserNew = $t02563725749._1 | |
625 | + | let integralSTATE = $t02563725749._2 | |
626 | + | let debug = $t02563725749._3 | |
611 | 627 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
612 | 628 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
613 | 629 | let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0]) | |
674 | 690 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
675 | 691 | then throw("permissions denied") | |
676 | 692 | else { | |
677 | - | let $ | |
678 | - | let wxPerLpIntegralNew = $ | |
679 | - | let poolIntegralSTATE = $ | |
680 | - | let poolDEBUG = $ | |
693 | + | let $t02810028210 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
694 | + | let wxPerLpIntegralNew = $t02810028210._1 | |
695 | + | let poolIntegralSTATE = $t02810028210._2 | |
696 | + | let poolDEBUG = $t02810028210._3 | |
681 | 697 | poolIntegralSTATE | |
682 | 698 | } | |
699 | + | ||
700 | + | ||
701 | + | ||
702 | + | @Callable(i) | |
703 | + | func setMigrator (pk) = if ((pk == "")) | |
704 | + | then [DeleteEntry(keyMigrator)] | |
705 | + | else [BinaryEntry(keyMigrator, fromBase58String(pk))] | |
683 | 706 | ||
684 | 707 | ||
685 | 708 | @Verifier(tx) | |
692 | 715 | case _ => | |
693 | 716 | throw("Match error") | |
694 | 717 | } | |
695 | - | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
718 | + | if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)) | |
719 | + | then true | |
720 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], getBinaryValue(this, keyMigrator)) | |
696 | 721 | } | |
697 | 722 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 8 | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | let SCALE18 = 18 | |
9 | 9 | ||
10 | 10 | let MULT18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let SEP = "__" | |
13 | 13 | ||
14 | 14 | let POOLWEIGHTMULT = MULT8 | |
15 | 15 | ||
16 | 16 | let zeroBigInt = toBigInt(0) | |
17 | 17 | ||
18 | 18 | let oneBigInt = toBigInt(1) | |
19 | + | ||
20 | + | let keyMigrator = "migrator" | |
19 | 21 | ||
20 | 22 | func asAnyList (val) = match val { | |
21 | 23 | case valAnyLyst: List[Any] => | |
22 | 24 | valAnyLyst | |
23 | 25 | case _ => | |
24 | 26 | throw("fail to cast into List[Any]") | |
25 | 27 | } | |
26 | 28 | ||
27 | 29 | ||
28 | 30 | func asInt (val) = match val { | |
29 | 31 | case valInt: Int => | |
30 | 32 | valInt | |
31 | 33 | case _ => | |
32 | 34 | throw("fail to cast into Int") | |
33 | 35 | } | |
34 | 36 | ||
35 | 37 | ||
36 | 38 | func asString (val) = match val { | |
37 | 39 | case valStr: String => | |
38 | 40 | valStr | |
39 | 41 | case _ => | |
40 | 42 | throw("fail to cast into Int") | |
41 | 43 | } | |
42 | 44 | ||
43 | 45 | ||
44 | 46 | func asByteVector (val) = match val { | |
45 | 47 | case valBin: ByteVector => | |
46 | 48 | valBin | |
47 | 49 | case _ => | |
48 | 50 | throw("fail to cast into Int") | |
49 | 51 | } | |
50 | 52 | ||
51 | 53 | ||
52 | 54 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
53 | 55 | ||
54 | 56 | ||
55 | 57 | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
56 | 58 | ||
57 | 59 | ||
58 | 60 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
59 | 61 | ||
60 | 62 | ||
61 | 63 | func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
62 | 64 | ||
63 | 65 | ||
64 | 66 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
65 | 67 | ||
66 | 68 | ||
67 | 69 | func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0"))) | |
68 | 70 | ||
69 | 71 | ||
70 | 72 | func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) { | |
71 | 73 | case s: String => | |
72 | 74 | value(parseBigInt(s)) | |
73 | 75 | case _: Unit => | |
74 | 76 | defaultVal | |
75 | 77 | case _ => | |
76 | 78 | throw("Match error") | |
77 | 79 | } | |
78 | 80 | ||
79 | 81 | ||
80 | 82 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult)) | |
81 | 83 | ||
82 | 84 | ||
83 | 85 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18)) | |
84 | 86 | ||
85 | 87 | ||
86 | 88 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
87 | 89 | ||
88 | 90 | ||
89 | 91 | func keyVotingEmissionContract () = "%s__votingEmissionContract" | |
90 | 92 | ||
91 | 93 | ||
92 | 94 | let IdxFactoryCfgStakingDapp = 1 | |
93 | 95 | ||
94 | 96 | let IdxFactoryCfgBoostingDapp = 2 | |
95 | 97 | ||
96 | 98 | let IdxFactoryCfgIdoDapp = 3 | |
97 | 99 | ||
98 | 100 | let IdxFactoryCfgTeamDapp = 4 | |
99 | 101 | ||
100 | 102 | let IdxFactoryCfgEmissionDapp = 5 | |
101 | 103 | ||
102 | 104 | let IdxFactoryCfgRestDapp = 6 | |
103 | 105 | ||
104 | 106 | let IdxFactoryCfgSlippageDapp = 7 | |
105 | 107 | ||
106 | 108 | func keyFactoryCfg () = "%s__factoryConfig" | |
107 | 109 | ||
108 | 110 | ||
109 | 111 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
110 | 112 | ||
111 | 113 | ||
112 | 114 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
113 | 115 | ||
114 | 116 | ||
115 | 117 | func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr" | |
116 | 118 | ||
117 | 119 | ||
118 | 120 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
119 | 121 | ||
120 | 122 | ||
121 | 123 | func keyFactoryLpList () = "%s__lpTokensList" | |
122 | 124 | ||
123 | 125 | ||
124 | 126 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
125 | 127 | ||
126 | 128 | ||
127 | 129 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
128 | 130 | ||
129 | 131 | ||
130 | 132 | func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP) | |
131 | 133 | ||
132 | 134 | ||
133 | 135 | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
134 | 136 | ||
135 | 137 | ||
136 | 138 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
137 | 139 | ||
138 | 140 | ||
139 | 141 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
140 | 142 | ||
141 | 143 | ||
142 | 144 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
143 | 145 | ||
144 | 146 | ||
145 | 147 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
146 | 148 | ||
147 | 149 | ||
148 | 150 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
149 | 151 | ||
150 | 152 | ||
151 | 153 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
152 | 154 | ||
153 | 155 | ||
154 | 156 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
155 | 157 | ||
156 | 158 | ||
157 | 159 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
158 | 160 | ||
159 | 161 | ||
160 | 162 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
161 | 163 | ||
162 | 164 | ||
163 | 165 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
164 | 166 | ||
165 | 167 | ||
166 | 168 | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
167 | 169 | ||
168 | 170 | ||
169 | 171 | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
170 | 172 | ||
171 | 173 | ||
172 | 174 | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
173 | 175 | ||
174 | 176 | ||
175 | 177 | func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed__total", lpAssetIdStr], SEP) | |
176 | 178 | ||
177 | 179 | ||
178 | 180 | func readStaked (key) = valueOrElse(getInteger(this, key), 0) | |
179 | 181 | ||
180 | 182 | ||
181 | 183 | func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP) | |
182 | 184 | ||
183 | 185 | ||
184 | 186 | func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP) | |
185 | 187 | ||
186 | 188 | ||
187 | 189 | func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP) | |
188 | 190 | ||
189 | 191 | ||
190 | 192 | func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP) | |
191 | 193 | ||
192 | 194 | ||
193 | 195 | func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP) | |
194 | 196 | ||
195 | 197 | ||
196 | 198 | func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP) | |
197 | 199 | ||
198 | 200 | ||
199 | 201 | func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP) | |
200 | 202 | ||
201 | 203 | ||
202 | 204 | func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP) | |
203 | 205 | ||
204 | 206 | ||
205 | 207 | func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP) | |
206 | 208 | ||
207 | 209 | ||
208 | 210 | func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP) | |
209 | 211 | ||
210 | 212 | ||
211 | 213 | func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP) | |
212 | 214 | ||
213 | 215 | ||
214 | 216 | func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP) | |
215 | 217 | ||
216 | 218 | ||
217 | 219 | func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP) | |
218 | 220 | ||
219 | 221 | ||
220 | 222 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
221 | 223 | ||
222 | 224 | ||
223 | 225 | func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
224 | 226 | ||
225 | 227 | ||
226 | 228 | func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount)) | |
227 | 229 | ||
228 | 230 | ||
229 | 231 | let factoryAddress = getStringOrFail(this, keyFactoryAddress()) | |
230 | 232 | ||
231 | 233 | let factoryContract = addressFromStringValue(factoryAddress) | |
232 | 234 | ||
233 | 235 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
234 | 236 | ||
235 | 237 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
236 | 238 | ||
237 | 239 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
238 | 240 | ||
239 | 241 | func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP) | |
240 | 242 | ||
241 | 243 | ||
242 | 244 | func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP) | |
243 | 245 | ||
244 | 246 | ||
245 | 247 | func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP) | |
246 | 248 | ||
247 | 249 | ||
248 | 250 | func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP) | |
249 | 251 | ||
250 | 252 | ||
251 | 253 | func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP) | |
252 | 254 | ||
253 | 255 | ||
254 | 256 | func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP) | |
255 | 257 | ||
256 | 258 | ||
257 | 259 | func containsNode (listName,id) = { | |
258 | 260 | let headOrUnit = getString(this, keyListHead(listName)) | |
259 | 261 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
260 | 262 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
261 | 263 | if (if ((id == valueOrElse(headOrUnit, ""))) | |
262 | 264 | then true | |
263 | 265 | else (prevOrUnit != unit)) | |
264 | 266 | then true | |
265 | 267 | else (nextOrUnit != unit) | |
266 | 268 | } | |
267 | 269 | ||
268 | 270 | ||
269 | 271 | func insertNodeActions (listName,id) = { | |
270 | 272 | let headOrUnit = getString(this, keyListHead(listName)) | |
271 | 273 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
272 | 274 | let checkNode = if (!(containsNode(listName, id))) | |
273 | 275 | then true | |
274 | 276 | else throw("Node exists") | |
275 | 277 | if ((checkNode == checkNode)) | |
276 | 278 | then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit)) | |
277 | 279 | then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)] | |
278 | 280 | else nil)) ++ [StringEntry(keyListHead(listName), id)]) | |
279 | 281 | else throw("Strict value is not equal to itself.") | |
280 | 282 | } | |
281 | 283 | ||
282 | 284 | ||
283 | 285 | func deleteNodeActions (listName,id) = { | |
284 | 286 | let headOrUnit = getString(this, keyListHead(listName)) | |
285 | 287 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
286 | 288 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
287 | 289 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
288 | 290 | ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit)) | |
289 | 291 | then (nextOrUnit != unit) | |
290 | 292 | else false) | |
291 | 293 | then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))] | |
292 | 294 | else if ((nextOrUnit != unit)) | |
293 | 295 | then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))] | |
294 | 296 | else if ((prevOrUnit != unit)) | |
295 | 297 | then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))] | |
296 | 298 | else if ((id == valueOrElse(headOrUnit, ""))) | |
297 | 299 | then [DeleteEntry(keyListHead(listName))] | |
298 | 300 | else throw(((("invalid node: " + listName) + ".") + id)))) | |
299 | 301 | } | |
300 | 302 | ||
301 | 303 | ||
302 | 304 | func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt)) | |
303 | 305 | then (stakedByUser > zeroBigInt) | |
304 | 306 | else false) | |
305 | 307 | then zeroBigInt | |
306 | 308 | else if ((stakedByUser == zeroBigInt)) | |
307 | 309 | then wxPerLpIntegralNew | |
308 | 310 | else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt)) | |
309 | 311 | then (stakedByUser > zeroBigInt) | |
310 | 312 | else false) | |
311 | 313 | then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY))) | |
312 | 314 | else throw("calcWxPerLpIntegralUserLast: unexpected state") | |
313 | 315 | ||
314 | 316 | ||
315 | 317 | func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = { | |
316 | 318 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
317 | 319 | let stakedTotal = toBigInt(readStaked(stakedTotalKEY)) | |
318 | 320 | let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt)) | |
319 | 321 | then oneBigInt | |
320 | 322 | else stakedTotal | |
321 | 323 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
322 | 324 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
323 | 325 | let MULT3 = 1000 | |
324 | 326 | let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3) | |
325 | 327 | let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3)) | |
326 | 328 | let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr) | |
327 | 329 | let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr) | |
328 | 330 | let wxPerLpKEY = keyWxPerLp(lpAssetIdStr) | |
329 | 331 | let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock) | |
330 | 332 | let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY) | |
331 | 333 | let wxPerLpOrZeroX3 = 0 | |
332 | 334 | let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0]) | |
333 | 335 | let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0)) | |
334 | 336 | then toBigInt(wxPerLpOrZeroX3) | |
335 | 337 | else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal) | |
336 | 338 | let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount)) | |
337 | 339 | let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt)) | |
338 | 340 | then oneBigInt | |
339 | 341 | else stakedTotalNew | |
340 | 342 | let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh))) | |
341 | 343 | let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew) | |
342 | 344 | let wxPerLpIntegralLastUpdHeightNew = height | |
343 | 345 | let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::") | |
344 | 346 | $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug) | |
345 | 347 | } | |
346 | 348 | ||
347 | 349 | ||
348 | 350 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
349 | - | let $ | |
350 | - | let wxPerLpIntegralNew = $ | |
351 | - | let poolIntegralSTATE = $ | |
352 | - | let poolDEBUG = $ | |
351 | + | let $t01424614368 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount) | |
352 | + | let wxPerLpIntegralNew = $t01424614368._1 | |
353 | + | let poolIntegralSTATE = $t01424614368._2 | |
354 | + | let poolDEBUG = $t01424614368._3 | |
353 | 355 | let MULT3 = 1000 | |
354 | 356 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
355 | 357 | let stakedByUser = readStaked(stakedByUserKEY) | |
356 | 358 | let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr) | |
357 | 359 | let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr) | |
358 | 360 | let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr) | |
359 | 361 | let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY) | |
360 | 362 | let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY) | |
361 | 363 | let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY) | |
362 | 364 | let MULT11 = (MULT8 * MULT3) | |
363 | 365 | let wxToClaimUserNew = max([(wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))), zeroBigInt]) | |
364 | 366 | let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew | |
365 | 367 | let wxPerLpIntegralUserLastUpdHeightNew = height | |
366 | 368 | let debug = makeString([toString(wxToClaimUser), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::") | |
367 | 369 | $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug) | |
368 | 370 | } | |
369 | 371 | ||
370 | 372 | ||
371 | 373 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
372 | 374 | case s: String => | |
373 | 375 | fromBase58String(s) | |
374 | 376 | case _: Unit => | |
375 | 377 | unit | |
376 | 378 | case _ => | |
377 | 379 | throw("Match error") | |
378 | 380 | } | |
379 | 381 | ||
380 | 382 | ||
381 | 383 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
382 | 384 | case s: String => | |
383 | 385 | fromBase58String(s) | |
384 | 386 | case _: Unit => | |
385 | 387 | unit | |
386 | 388 | case _ => | |
387 | 389 | throw("Match error") | |
388 | 390 | } | |
389 | 391 | ||
390 | 392 | ||
391 | 393 | let permissionDeniedError = throw("Permission denied") | |
392 | 394 | ||
393 | 395 | func mustThis (i) = if ((i.caller == this)) | |
394 | 396 | then true | |
395 | 397 | else permissionDeniedError | |
396 | 398 | ||
397 | 399 | ||
398 | 400 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
399 | 401 | case pk: ByteVector => | |
400 | 402 | if ((i.callerPublicKey == pk)) | |
401 | 403 | then true | |
402 | 404 | else permissionDeniedError | |
403 | 405 | case _: Unit => | |
404 | 406 | if ((i.caller == this)) | |
405 | 407 | then true | |
406 | 408 | else permissionDeniedError | |
407 | 409 | case _ => | |
408 | 410 | throw("Match error") | |
409 | 411 | } | |
410 | 412 | ||
411 | 413 | ||
412 | 414 | @Callable(i) | |
413 | 415 | func constructor (factoryAddressStr) = { | |
414 | 416 | let checkCaller = mustManager(i) | |
415 | 417 | if ((checkCaller == checkCaller)) | |
416 | 418 | then [StringEntry(keyFactoryAddress(), factoryAddressStr)] | |
417 | 419 | else throw("Strict value is not equal to itself.") | |
418 | 420 | } | |
419 | 421 | ||
420 | 422 | ||
421 | 423 | ||
422 | 424 | @Callable(i) | |
423 | 425 | func constructorV2 (votingEmissionContract) = { | |
424 | 426 | let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit)) | |
425 | 427 | then true | |
426 | 428 | else "invalid voting emission contract address"] | |
427 | 429 | if ((cheks == cheks)) | |
428 | 430 | then [StringEntry(keyVotingEmissionContract(), votingEmissionContract)] | |
429 | 431 | else throw("Strict value is not equal to itself.") | |
430 | 432 | } | |
431 | 433 | ||
432 | 434 | ||
433 | 435 | ||
434 | 436 | @Callable(i) | |
435 | 437 | func setManager (pendingManagerPublicKey) = { | |
436 | 438 | let checkCaller = mustManager(i) | |
437 | 439 | if ((checkCaller == checkCaller)) | |
438 | 440 | then { | |
439 | 441 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
440 | 442 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
441 | 443 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
442 | 444 | else throw("Strict value is not equal to itself.") | |
443 | 445 | } | |
444 | 446 | else throw("Strict value is not equal to itself.") | |
445 | 447 | } | |
446 | 448 | ||
447 | 449 | ||
448 | 450 | ||
449 | 451 | @Callable(i) | |
450 | 452 | func confirmManager () = { | |
451 | 453 | let pm = pendingManagerPublicKeyOrUnit() | |
452 | 454 | let hasPM = if (isDefined(pm)) | |
453 | 455 | then true | |
454 | 456 | else throw("No pending manager") | |
455 | 457 | if ((hasPM == hasPM)) | |
456 | 458 | then { | |
457 | 459 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
458 | 460 | then true | |
459 | 461 | else throw("You are not pending manager") | |
460 | 462 | if ((checkPM == checkPM)) | |
461 | 463 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
462 | 464 | else throw("Strict value is not equal to itself.") | |
463 | 465 | } | |
464 | 466 | else throw("Strict value is not equal to itself.") | |
465 | 467 | } | |
466 | 468 | ||
467 | 469 | ||
468 | 470 | ||
469 | 471 | @Callable(i) | |
470 | - | func stake () = if ((size(i.payments) != 1)) | |
471 | - | then throw("invalid payment - exact one payment must be attached") | |
472 | - | else { | |
473 | - | let pmt = i.payments[0] | |
474 | - | let lpAssetId = value(pmt.assetId) | |
475 | - | let lpAssetIdStr = toBase58String(lpAssetId) | |
476 | - | let amount = pmt.amount | |
477 | - | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
478 | - | let callerStr = toString(i.caller) | |
479 | - | let userAddressStr = if ((callerStr == poolAddressStr)) | |
480 | - | then toString(i.originCaller) | |
481 | - | else callerStr | |
482 | - | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
483 | - | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
484 | - | let stakedByUser = readStaked(stakedByUserKEY) | |
485 | - | let stakedTotal = readStaked(stakedTotalKEY) | |
486 | - | let $t01877518892 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
487 | - | let wxToClaimUserNew = $t01877518892._1 | |
488 | - | let integralSTATE = $t01877518892._2 | |
489 | - | let debug = $t01877518892._3 | |
490 | - | let listName = getUsersListName(lpAssetIdStr) | |
491 | - | let listActions = if (containsNode(listName, userAddressStr)) | |
492 | - | then nil | |
493 | - | else insertNodeActions(listName, userAddressStr) | |
494 | - | (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
495 | - | } | |
472 | + | func stake () = { | |
473 | + | let migration = if ((getBinary(this, keyMigrator) != unit)) | |
474 | + | then throw("maintenance") | |
475 | + | else unit | |
476 | + | if ((migration == migration)) | |
477 | + | then if ((size(i.payments) != 1)) | |
478 | + | then throw("invalid payment - exact one payment must be attached") | |
479 | + | else { | |
480 | + | let pmt = i.payments[0] | |
481 | + | let lpAssetId = value(pmt.assetId) | |
482 | + | let lpAssetIdStr = toBase58String(lpAssetId) | |
483 | + | let amount = pmt.amount | |
484 | + | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
485 | + | let callerStr = toString(i.caller) | |
486 | + | let userAddressStr = if ((callerStr == poolAddressStr)) | |
487 | + | then toString(i.originCaller) | |
488 | + | else callerStr | |
489 | + | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
490 | + | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
491 | + | let stakedByUser = readStaked(stakedByUserKEY) | |
492 | + | let stakedTotal = readStaked(stakedTotalKEY) | |
493 | + | let $t01893619053 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
494 | + | let wxToClaimUserNew = $t01893619053._1 | |
495 | + | let integralSTATE = $t01893619053._2 | |
496 | + | let debug = $t01893619053._3 | |
497 | + | let listName = getUsersListName(lpAssetIdStr) | |
498 | + | let listActions = if (containsNode(listName, userAddressStr)) | |
499 | + | then nil | |
500 | + | else insertNodeActions(listName, userAddressStr) | |
501 | + | (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
502 | + | } | |
503 | + | else throw("Strict value is not equal to itself.") | |
504 | + | } | |
496 | 505 | ||
497 | 506 | ||
498 | 507 | ||
499 | 508 | @Callable(i) | |
500 | 509 | func unstake (lpAssetIdStr,amount) = { | |
501 | - | let lpAssetId = fromBase58String(lpAssetIdStr) | |
502 | - | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
503 | - | let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr) | |
504 | - | let callerStr = toString(i.caller) | |
505 | - | let userAddressStr = if (if ((callerStr == poolAddressStr)) | |
506 | - | then true | |
507 | - | else (callerStr == poolAddon)) | |
508 | - | then toString(i.originCaller) | |
509 | - | else callerStr | |
510 | - | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
511 | - | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
512 | - | let stakedByUser = readStaked(stakedByUserKEY) | |
513 | - | let stakedTotal = readStaked(stakedTotalKEY) | |
514 | - | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
515 | - | let listName = getUsersListName(lpAssetIdStr) | |
516 | - | let listActions = if (if (containsNode(listName, userAddressStr)) | |
517 | - | then (amount == stakedByUser) | |
518 | - | else false) | |
519 | - | then deleteNodeActions(listName, userAddressStr) | |
520 | - | else nil | |
521 | - | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
522 | - | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
523 | - | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
524 | - | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
525 | - | let r = if ((availableToClaim > zeroBigInt)) | |
526 | - | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
510 | + | let migration = if ((getBinary(this, keyMigrator) != unit)) | |
511 | + | then throw("maintenance") | |
527 | 512 | else unit | |
528 | - | if ((r == r)) | |
529 | - | then if ((amount > stakedByUser)) | |
530 | - | then throw("passed amount is less then available") | |
531 | - | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
513 | + | if ((migration == migration)) | |
514 | + | then { | |
515 | + | let lpAssetId = fromBase58String(lpAssetIdStr) | |
516 | + | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
517 | + | let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr) | |
518 | + | let callerStr = toString(i.caller) | |
519 | + | let userAddressStr = if (if ((callerStr == poolAddressStr)) | |
520 | + | then true | |
521 | + | else (callerStr == poolAddon)) | |
522 | + | then toString(i.originCaller) | |
523 | + | else callerStr | |
524 | + | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
525 | + | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
526 | + | let stakedByUser = readStaked(stakedByUserKEY) | |
527 | + | let stakedTotal = readStaked(stakedTotalKEY) | |
528 | + | let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2 | |
529 | + | let listName = getUsersListName(lpAssetIdStr) | |
530 | + | let listActions = if (if (containsNode(listName, userAddressStr)) | |
531 | + | then (amount == stakedByUser) | |
532 | + | else false) | |
533 | + | then deleteNodeActions(listName, userAddressStr) | |
534 | + | else nil | |
535 | + | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr)) | |
536 | + | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
537 | + | let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1 | |
538 | + | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
539 | + | let r = if ((availableToClaim > zeroBigInt)) | |
540 | + | then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
541 | + | else unit | |
542 | + | if ((r == r)) | |
543 | + | then if ((amount > stakedByUser)) | |
544 | + | then throw("passed amount is less then available") | |
545 | + | else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions) | |
546 | + | else throw("Strict value is not equal to itself.") | |
547 | + | } | |
532 | 548 | else throw("Strict value is not equal to itself.") | |
533 | 549 | } | |
534 | 550 | ||
535 | 551 | ||
536 | 552 | ||
537 | 553 | @Callable(i) | |
538 | 554 | func claimWx (lpAssetIdStr) = { | |
539 | 555 | let userAddressStr = toString(i.caller) | |
540 | 556 | let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil) | |
541 | 557 | $Tuple2(nil, result) | |
542 | 558 | } | |
543 | 559 | ||
544 | 560 | ||
545 | 561 | ||
546 | 562 | @Callable(i) | |
547 | 563 | func claimWxINTERNAL (lpAssetIdStr,userAddressStr) = { | |
548 | 564 | let checkCaller = mustThis(i) | |
549 | 565 | if ((checkCaller == checkCaller)) | |
550 | 566 | then { | |
551 | 567 | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address") | |
552 | 568 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
553 | 569 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
554 | 570 | let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr) | |
555 | 571 | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr) | |
556 | 572 | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr) | |
557 | 573 | let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY) | |
558 | 574 | let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY) | |
559 | 575 | let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY) | |
560 | 576 | let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY) | |
561 | - | let $ | |
562 | - | let wxToClaimUserNew = $ | |
563 | - | let integralSTATE = $ | |
564 | - | let debug = $ | |
577 | + | let $t02288322995 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
578 | + | let wxToClaimUserNew = $t02288322995._1 | |
579 | + | let integralSTATE = $t02288322995._2 | |
580 | + | let debug = $t02288322995._3 | |
565 | 581 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
566 | 582 | if ((zeroBigInt >= availableToClaim)) | |
567 | 583 | then throw("nothing to claim") | |
568 | 584 | else { | |
569 | 585 | let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0]) | |
570 | 586 | let minRewardPart = availableToClaim | |
571 | 587 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
572 | 588 | let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0]) | |
573 | 589 | let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil)) | |
574 | 590 | if ((emitBoost == emitBoost)) | |
575 | 591 | then { | |
576 | 592 | let claimedByUserValue = (claimedByUser + availableToClaim) | |
577 | 593 | let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart) | |
578 | 594 | let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart) | |
579 | 595 | let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart) | |
580 | 596 | [StringEntry(claimedByUserKEY, toString(claimedByUserValue)), StringEntry(claimedByUserMinRewardKEY, toString(claimedByUserMinRewardPlusPart)), StringEntry(claimedByUserBoostRewardKEY, toString(claimedByUserBoostRewardPlusBoostRewardPart)), StringEntry(claimedTotalKEY, toString(claimedTotalPlusAvailableToClaim)), ScriptTransfer(userAddress, toInt(minRewardPart), wxAssetId), ScriptTransfer(userAddress, toInt(boostRewardPart), wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, toInt(availableToClaim), i.transactionId)] | |
581 | 597 | } | |
582 | 598 | else throw("Strict value is not equal to itself.") | |
583 | 599 | } | |
584 | 600 | } | |
585 | 601 | else throw("Strict value is not equal to itself.") | |
586 | 602 | } | |
587 | 603 | ||
588 | 604 | ||
589 | 605 | ||
590 | 606 | @Callable(i) | |
591 | 607 | func claimWxREADONLY (lpAssetIdStr,userAddressStr) = { | |
592 | 608 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
593 | 609 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
594 | 610 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
595 | 611 | let stakedByUser = readStaked(stakedByUserKEY) | |
596 | 612 | let stakedTotal = readStaked(stakedTotalKEY) | |
597 | 613 | let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY) | |
598 | 614 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
599 | 615 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
600 | 616 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
601 | 617 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
602 | 618 | let passedBlocks = if ((emissionStartBlock > height)) | |
603 | 619 | then 0 | |
604 | 620 | else (height - emissionStartBlock) | |
605 | 621 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT) | |
606 | 622 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
607 | - | let $ | |
608 | - | let wxToClaimUserNew = $ | |
609 | - | let integralSTATE = $ | |
610 | - | let debug = $ | |
623 | + | let $t02563725749 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
624 | + | let wxToClaimUserNew = $t02563725749._1 | |
625 | + | let integralSTATE = $t02563725749._2 | |
626 | + | let debug = $t02563725749._3 | |
611 | 627 | let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt]) | |
612 | 628 | let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil)) | |
613 | 629 | let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0]) | |
614 | 630 | let boostDebug = asString(boostInvResult[1]) | |
615 | 631 | let minRewardPart = availableToClaim | |
616 | 632 | let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)]) | |
617 | 633 | let totalReward = (minRewardPart + boostRewardPart) | |
618 | 634 | $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOST::") + boostDebug)], SEP)) | |
619 | 635 | } | |
620 | 636 | ||
621 | 637 | ||
622 | 638 | ||
623 | 639 | @Callable(i) | |
624 | 640 | func usersListTraversal (lpAssetId) = { | |
625 | 641 | let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), ""))) | |
626 | 642 | then true | |
627 | 643 | else mustManager(i) | |
628 | 644 | if ((checkCaller == checkCaller)) | |
629 | 645 | then { | |
630 | 646 | let listName = getUsersListName(lpAssetId) | |
631 | 647 | let userOrUnit = getString(keyNextUser(lpAssetId)) | |
632 | 648 | let headOrUnit = getString(keyListHead(listName)) | |
633 | 649 | match userOrUnit { | |
634 | 650 | case _: Unit => | |
635 | 651 | match headOrUnit { | |
636 | 652 | case _: Unit => | |
637 | 653 | $Tuple2(nil, false) | |
638 | 654 | case head: String => | |
639 | 655 | $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true) | |
640 | 656 | case _ => | |
641 | 657 | throw("Match error") | |
642 | 658 | } | |
643 | 659 | case userAddress: String => | |
644 | 660 | let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetId, userAddress)) | |
645 | 661 | let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
646 | 662 | let wxToClaimUserNew = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)._1 | |
647 | 663 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
648 | 664 | let r = if ((availableToClaim > zeroBigInt)) | |
649 | 665 | then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil) | |
650 | 666 | else unit | |
651 | 667 | if ((r == r)) | |
652 | 668 | then { | |
653 | 669 | let nextUserOrUnit = getString(keyListNext(listName, userAddress)) | |
654 | 670 | match nextUserOrUnit { | |
655 | 671 | case _: Unit => | |
656 | 672 | $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false) | |
657 | 673 | case nextUser: String => | |
658 | 674 | $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true) | |
659 | 675 | case _ => | |
660 | 676 | throw("Match error") | |
661 | 677 | } | |
662 | 678 | } | |
663 | 679 | else throw("Strict value is not equal to itself.") | |
664 | 680 | case _ => | |
665 | 681 | throw("Match error") | |
666 | 682 | } | |
667 | 683 | } | |
668 | 684 | else throw("Strict value is not equal to itself.") | |
669 | 685 | } | |
670 | 686 | ||
671 | 687 | ||
672 | 688 | ||
673 | 689 | @Callable(i) | |
674 | 690 | func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract)) | |
675 | 691 | then throw("permissions denied") | |
676 | 692 | else { | |
677 | - | let $ | |
678 | - | let wxPerLpIntegralNew = $ | |
679 | - | let poolIntegralSTATE = $ | |
680 | - | let poolDEBUG = $ | |
693 | + | let $t02810028210 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0) | |
694 | + | let wxPerLpIntegralNew = $t02810028210._1 | |
695 | + | let poolIntegralSTATE = $t02810028210._2 | |
696 | + | let poolDEBUG = $t02810028210._3 | |
681 | 697 | poolIntegralSTATE | |
682 | 698 | } | |
699 | + | ||
700 | + | ||
701 | + | ||
702 | + | @Callable(i) | |
703 | + | func setMigrator (pk) = if ((pk == "")) | |
704 | + | then [DeleteEntry(keyMigrator)] | |
705 | + | else [BinaryEntry(keyMigrator, fromBase58String(pk))] | |
683 | 706 | ||
684 | 707 | ||
685 | 708 | @Verifier(tx) | |
686 | 709 | func verify () = { | |
687 | 710 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
688 | 711 | case pk: ByteVector => | |
689 | 712 | pk | |
690 | 713 | case _: Unit => | |
691 | 714 | tx.senderPublicKey | |
692 | 715 | case _ => | |
693 | 716 | throw("Match error") | |
694 | 717 | } | |
695 | - | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
718 | + | if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)) | |
719 | + | then true | |
720 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], getBinaryValue(this, keyMigrator)) | |
696 | 721 | } | |
697 | 722 |
github/deemru/w8io/fabc49c 75.13 ms ◑