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