tx · GG7U6RU6imnkPjoM189Aw2SLTGFWupFoyuXhvc19ZGVQ 3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy: -0.04000000 Waves 2022.08.01 05:54 [2164864] smart account 3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy > SELF 0.00000000 Waves
{ "type": 13, "id": "GG7U6RU6imnkPjoM189Aw2SLTGFWupFoyuXhvc19ZGVQ", "fee": 4000000, "feeAssetId": null, "timestamp": 1659322512387, "version": 1, "sender": "3N5yarEiTQccnnuerogYT3BxM5Zc5bRgDZy", "senderPublicKey": "FK9j3YFWVChXKESTn33fMZz1JseCNMMqHhfB7smxJo4e", "proofs": [ "5fQY2fFpmUxed3u991mzGKLdgKdMWPJkuCUqT25AZftEyevC1HEtY9dsRGh8Dwd8wE5M1NzY2TjNvFgVtfvmXJGq" ], "script": "base64:BgIiCAISBQoDAQgIEgASABIDCgEBEgASABIDCgEIEgMKAQgSAEkACXNlcGFyYXRvcgICX18AA1NFUAICX18ABU1VTFQ2AMCEPQAFTVVMVDgAgMLXLwAGTVVMVFg2CQC2AgEFBU1VTFQ2AAZNVUxUWDgJALYCAQUFTVVMVDgAB01VTFRYMTgJALYCAQCAgJC7utat8A0ACldBVkVTSURTVFICBVdBVkVTAAdXQVZFU0lECQDZBAEFCldBVkVTSURTVFIAGUlkeENvbnRyb2xDZmdOZXV0cmlub0RhcHAAAQAYSWR4Q29udHJvbENmZ0F1Y3Rpb25EYXBwAAIAFElkeENvbnRyb2xDZmdScGREYXBwAAMAFUlkeENvbnRyb2xDZmdNYXRoRGFwcAAEABxJZHhDb250cm9sQ2ZnTGlxdWlkYXRpb25EYXBwAAUAFUlkeENvbnRyb2xDZmdSZXN0RGFwcAAGAB1JZHhDb250cm9sQ2ZnTm9kZVJlZ2lzdHJ5RGFwcAAHABxJZHhDb250cm9sQ2ZnTnNidFN0YWtpbmdEYXBwAAgAGUlkeENvbnRyb2xDZmdNZWRpYXRvckRhcHAACQAcSWR4Q29udHJvbEN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kJAJQKAgUDbmlsCQDMCAIFCm1pbkxvY2tBbXQJAMwIAgUSZ25zYnRGcm9tU3VyZkNvZWZmCQDMCAIFIHN1cmZWb3RpbmdQb3dlclJlc3RyaWN0aXZlUGVyaW9kCQDMCAIFG2JyVG9TdGFydFN1cmZUcmFuc2Zvcm1hdGlvbgUDbmlsAPTtzSA=", "chainId": 84, "height": 2164864, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HbEZi9QHRCcY3dFJLQYyZ1jyA1xbFjnLkgFuo7rZsgn5 Next: 5QhYwBHtJGPxSwDsWDEUxY7GsRg4Uhbqu794nCFRqNUA Diff:
Old | New | Differences | |
---|---|---|---|
596 | 596 | } | |
597 | 597 | ||
598 | 598 | ||
599 | + | ||
600 | + | @Callable(i) | |
601 | + | func configSYSREADONLY () = { | |
602 | + | let minLockAmt = getIntegerValue(keyMinLockAmount()) | |
603 | + | let gnsbtFromSurfCoeff = (60 * MULT6) | |
604 | + | let surfVotingPowerRestrictivePeriod = (1440 * 14) | |
605 | + | let brToStartSurfTransformation = 1200000 | |
606 | + | $Tuple2(nil, [minLockAmt, gnsbtFromSurfCoeff, surfVotingPowerRestrictivePeriod, brToStartSurfTransformation]) | |
607 | + | } | |
608 | + | ||
609 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let SEP = "__" | |
7 | 7 | ||
8 | 8 | let MULT6 = 1000000 | |
9 | 9 | ||
10 | 10 | let MULT8 = 100000000 | |
11 | 11 | ||
12 | 12 | let MULTX6 = toBigInt(MULT6) | |
13 | 13 | ||
14 | 14 | let MULTX8 = toBigInt(MULT8) | |
15 | 15 | ||
16 | 16 | let MULTX18 = toBigInt(1000000000000000000) | |
17 | 17 | ||
18 | 18 | let WAVESIDSTR = "WAVES" | |
19 | 19 | ||
20 | 20 | let WAVESID = fromBase58String(WAVESIDSTR) | |
21 | 21 | ||
22 | 22 | let IdxControlCfgNeutrinoDapp = 1 | |
23 | 23 | ||
24 | 24 | let IdxControlCfgAuctionDapp = 2 | |
25 | 25 | ||
26 | 26 | let IdxControlCfgRpdDapp = 3 | |
27 | 27 | ||
28 | 28 | let IdxControlCfgMathDapp = 4 | |
29 | 29 | ||
30 | 30 | let IdxControlCfgLiquidationDapp = 5 | |
31 | 31 | ||
32 | 32 | let IdxControlCfgRestDapp = 6 | |
33 | 33 | ||
34 | 34 | let IdxControlCfgNodeRegistryDapp = 7 | |
35 | 35 | ||
36 | 36 | let IdxControlCfgNsbtStakingDapp = 8 | |
37 | 37 | ||
38 | 38 | let IdxControlCfgMediatorDapp = 9 | |
39 | 39 | ||
40 | 40 | let IdxControlCfgSurfStakingDapp = 10 | |
41 | 41 | ||
42 | 42 | let IdxControlCfgGnsbtControllerDapp = 11 | |
43 | 43 | ||
44 | 44 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func keyControlAddress () = "%s%s__config__controlAddress" | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func keyControlCfg () = "%s__controlConfig" | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx")) | |
60 | 60 | ||
61 | 61 | let controlCfg = readControlCfgOrFail(controlContract) | |
62 | 62 | ||
63 | 63 | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
64 | 64 | ||
65 | 65 | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
66 | 66 | ||
67 | 67 | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
68 | 68 | ||
69 | 69 | func keyBondAsset () = "bond_asset_id" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyAuctionContractAddress () = "auction_contract" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyMinLockAmount () = "%s__minLockAmount" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyStakedAssetId () = "%s__stakedAssetId" | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "amount"], separator) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", toString(userAddress), "start"], separator) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, toString(userAddress), toBase58String(txId)], separator) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], separator) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], separator) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], separator) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyNextPeriod () = "%s__nextPeriod" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keySupportedRewardAssets () = "supportedRewardAssets" | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], separator) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], separator) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], separator) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], separator) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], separator) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], separator) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined")) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr)) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR)) | |
142 | 142 | then unit | |
143 | 143 | else fromBase58String(assetStr) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func asInt (val) = match val { | |
147 | 147 | case valInt: Int => | |
148 | 148 | valInt | |
149 | 149 | case _ => | |
150 | 150 | throw("fail to cast into Int") | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func formatHistoryRecord (oldAmount,oldStart,newAmount,newStart) = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(oldAmount), toString(oldStart), toString(newAmount), toString(newStart)], separator) | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func formatClaimHistoryRecord (user,claimedRewards) = makeString(["%s%d%d%s", user, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], separator) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func HistoryRecordEntry (type,userAddress,txId,oldAmount,oldStart,newAmount,newStart) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(oldAmount, oldStart, newAmount, newStart)) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(toString(userAddress), claimedRewards)) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func StatsResult (totalLockedInc,lockCountInc,usersCountInc) = { | |
167 | 167 | let locksCount = getIntOrZero(keyStatsLocksCount()) | |
168 | 168 | let usersCount = getIntOrZero(keyStatsUsersCount()) | |
169 | 169 | let totalAmount = getIntOrZero(keyLockParamTotalAmount()) | |
170 | 170 | let totalAmountNew = (totalAmount + totalLockedInc) | |
171 | 171 | $Tuple3([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)], totalAmount, totalAmountNew) | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func LockParamsEntry (userAddress,amount,start) = [IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), start)] | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func getParamsOrFail () = $Tuple2(fromBase58String(getStringOrFail(this, keyStakedAssetId())), getIntOrFail(keyMinLockAmount())) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress)) | |
185 | 185 | then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress))) | |
186 | 186 | else unit | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + toString(userAddress)) + " is not defined")) | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "") | |
193 | 193 | ||
194 | 194 | let supportedAssetsList = split(supportedAssetsStr, "_") | |
195 | 195 | ||
196 | 196 | func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = { | |
197 | 197 | let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId) | |
198 | 198 | let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0")) | |
199 | 199 | let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0")) | |
200 | 200 | let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18)) | |
201 | 201 | let rewardCachedPartKEY = keyReward(userAddress, assetId) | |
202 | 202 | let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0) | |
203 | 203 | $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY) | |
204 | 204 | } | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func RewardEntries (isNewUser,userAddress,stakedAmount) = { | |
208 | 208 | let stakedAmountX = toBigInt(stakedAmount) | |
209 | 209 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress) | |
210 | 210 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
211 | 211 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
212 | 212 | func forEachAssetCacheUserReward (accum,asset) = { | |
213 | 213 | let $t084368571 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast) | |
214 | 214 | let rewardTotal = $t084368571._1 | |
215 | 215 | let cached = $t084368571._2 | |
216 | 216 | let dynamic = $t084368571._3 | |
217 | 217 | let rewardCachedPartKEY = $t084368571._4 | |
218 | 218 | (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal)) | |
219 | 219 | } | |
220 | 220 | ||
221 | 221 | if (if ((depositNumLast == -1)) | |
222 | 222 | then (depositNumUser == -1) | |
223 | 223 | else false) | |
224 | 224 | then nil | |
225 | 225 | else if (if ((depositNumLast == -1)) | |
226 | 226 | then (depositNumUser > -1) | |
227 | 227 | else false) | |
228 | 228 | then throw("invalid depositNumLast and depositNumUser state") | |
229 | 229 | else if (if ((depositNumLast > -1)) | |
230 | 230 | then (depositNumUser == -1) | |
231 | 231 | else false) | |
232 | 232 | then if (isNewUser) | |
233 | 233 | then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)] | |
234 | 234 | else ({ | |
235 | 235 | let $l = supportedAssetsList | |
236 | 236 | let $s = size($l) | |
237 | 237 | let $acc0 = nil | |
238 | 238 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
239 | 239 | then $a | |
240 | 240 | else forEachAssetCacheUserReward($a, $l[$i]) | |
241 | 241 | ||
242 | 242 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
243 | 243 | then $a | |
244 | 244 | else throw("List size exceeds 10") | |
245 | 245 | ||
246 | 246 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
247 | 247 | } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) | |
248 | 248 | else if (if ((depositNumLast > -1)) | |
249 | 249 | then (depositNumUser > -1) | |
250 | 250 | else false) | |
251 | 251 | then if (isNewUser) | |
252 | 252 | then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)] | |
253 | 253 | else ({ | |
254 | 254 | let $l = supportedAssetsList | |
255 | 255 | let $s = size($l) | |
256 | 256 | let $acc0 = nil | |
257 | 257 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
258 | 258 | then $a | |
259 | 259 | else forEachAssetCacheUserReward($a, $l[$i]) | |
260 | 260 | ||
261 | 261 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
262 | 262 | then $a | |
263 | 263 | else throw("List size exceeds 10") | |
264 | 264 | ||
265 | 265 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
266 | 266 | } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) | |
267 | 267 | else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser))) | |
268 | 268 | } | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | func IncrementNotDistributedRewardEntry (tkn,amountInc) = { | |
272 | 272 | let notDistributedRewardKEY = keyNotDistributedReward(tkn) | |
273 | 273 | let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0) | |
274 | 274 | [IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))] | |
275 | 275 | } | |
276 | 276 | ||
277 | 277 | ||
278 | 278 | func surfToGnsbt (surfAmt) = (surfAmt / 60) | |
279 | 279 | ||
280 | 280 | ||
281 | 281 | let ContolContractKey = "control_contract" | |
282 | 282 | ||
283 | 283 | @Callable(i) | |
284 | 284 | func constructor (minLockAmount,supportedRewardAssets,stakedAssetId) = if ((i.caller != this)) | |
285 | 285 | then throw("Permission denied") | |
286 | 286 | else [IntegerEntry(keyMinLockAmount(), minLockAmount), StringEntry(keySupportedRewardAssets(), supportedRewardAssets), StringEntry(keyStakedAssetId(), stakedAssetId)] | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | ||
290 | 290 | @Callable(i) | |
291 | 291 | func stake () = { | |
292 | 292 | let $t01212012174 = getParamsOrFail() | |
293 | 293 | let stakedAssetId = $t01212012174._1 | |
294 | 294 | let minLockAmount = $t01212012174._2 | |
295 | 295 | if ((size(i.payments) != 1)) | |
296 | 296 | then throw("Invalid payments size") | |
297 | 297 | else { | |
298 | 298 | let payment = i.payments[0] | |
299 | 299 | let amount = payment.amount | |
300 | 300 | let invalidAssetMessage = (("Invalid asset. " + toBase58String(stakedAssetId)) + " is expected") | |
301 | 301 | let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage) | |
302 | 302 | if ((assetId != stakedAssetId)) | |
303 | 303 | then throw(invalidAssetMessage) | |
304 | 304 | else { | |
305 | 305 | let userAddress = i.caller | |
306 | 306 | let userAddressStr = toString(userAddress) | |
307 | 307 | let gnsbtAmtUser = 0 | |
308 | 308 | let gnsbtAmtTotal = 0 | |
309 | 309 | let $t01267212781 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1)) | |
310 | 310 | let isNewUser = $t01267212781._1 | |
311 | 311 | let stakedAmount = $t01267212781._2 | |
312 | 312 | let lockStartHeight = $t01267212781._3 | |
313 | 313 | let stakedAmountNew = if (isNewUser) | |
314 | 314 | then amount | |
315 | 315 | else (amount + stakedAmount) | |
316 | 316 | let mergedStartHeight = if (isNewUser) | |
317 | 317 | then height | |
318 | 318 | else (height + (1440 * 14)) | |
319 | 319 | if ((minLockAmount > stakedAmountNew)) | |
320 | 320 | then throw(("Min lock amount is " + toString(minLockAmount))) | |
321 | 321 | else { | |
322 | 322 | let $t01308413186 = StatsResult(amount, 1, if (isNewUser) | |
323 | 323 | then 1 | |
324 | 324 | else 0) | |
325 | 325 | let statsEntries = $t01308413186._1 | |
326 | 326 | let totalStaked = $t01308413186._2 | |
327 | 327 | let totalStakedNew = $t01308413186._3 | |
328 | 328 | ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, lockStartHeight, stakedAmountNew, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNew, mergedStartHeight)) ++ statsEntries) | |
329 | 329 | } | |
330 | 330 | } | |
331 | 331 | } | |
332 | 332 | } | |
333 | 333 | ||
334 | 334 | ||
335 | 335 | ||
336 | 336 | @Callable(i) | |
337 | 337 | func stakeByOriginCaller () = { | |
338 | 338 | let $t01352213576 = getParamsOrFail() | |
339 | 339 | let stakedAssetId = $t01352213576._1 | |
340 | 340 | let minLockAmount = $t01352213576._2 | |
341 | 341 | if ((size(i.payments) != 1)) | |
342 | 342 | then throw("Invalid payments size") | |
343 | 343 | else { | |
344 | 344 | let payment = i.payments[0] | |
345 | 345 | let amount = payment.amount | |
346 | 346 | let invalidAssetMessage = (("Invalid asset. " + toBase58String(stakedAssetId)) + " is expected") | |
347 | 347 | let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage) | |
348 | 348 | if ((assetId != stakedAssetId)) | |
349 | 349 | then throw(invalidAssetMessage) | |
350 | 350 | else { | |
351 | 351 | let userAddress = i.originCaller | |
352 | 352 | let userAddressStr = toString(userAddress) | |
353 | 353 | let gnsbtAmtUser = 0 | |
354 | 354 | let gnsbtAmtTotal = 0 | |
355 | 355 | let $t01408014189 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, -1)) | |
356 | 356 | let isNewUser = $t01408014189._1 | |
357 | 357 | let stakedAmount = $t01408014189._2 | |
358 | 358 | let lockStartHeight = $t01408014189._3 | |
359 | 359 | let stakedAmountNew = if (isNewUser) | |
360 | 360 | then amount | |
361 | 361 | else (amount + stakedAmount) | |
362 | 362 | let mergedStartHeight = if (isNewUser) | |
363 | 363 | then height | |
364 | 364 | else (height + (1440 * 14)) | |
365 | 365 | if ((minLockAmount > stakedAmountNew)) | |
366 | 366 | then throw(("Min lock amount is " + toString(minLockAmount))) | |
367 | 367 | else { | |
368 | 368 | let $t01449214594 = StatsResult(amount, 1, if (isNewUser) | |
369 | 369 | then 1 | |
370 | 370 | else 0) | |
371 | 371 | let statsEntries = $t01449214594._1 | |
372 | 372 | let totalStaked = $t01449214594._2 | |
373 | 373 | let totalStakedNew = $t01449214594._3 | |
374 | 374 | ((([HistoryRecordEntry("stake", userAddress, i.transactionId, stakedAmount, lockStartHeight, stakedAmountNew, mergedStartHeight)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddress, stakedAmountNew, mergedStartHeight)) ++ statsEntries) | |
375 | 375 | } | |
376 | 376 | } | |
377 | 377 | } | |
378 | 378 | } | |
379 | 379 | ||
380 | 380 | ||
381 | 381 | ||
382 | 382 | @Callable(i) | |
383 | 383 | func unstake (amount) = if ((size(i.payments) != 0)) | |
384 | 384 | then throw("unstake doesn't require any payment") | |
385 | 385 | else { | |
386 | 386 | let userAddress = i.caller | |
387 | 387 | let userAddressStr = toString(userAddress) | |
388 | 388 | let $t01509015144 = getParamsOrFail() | |
389 | 389 | let stakedAssetId = $t01509015144._1 | |
390 | 390 | let minLockAmount = $t01509015144._2 | |
391 | 391 | let $t01514715221 = getUserParamsOrFail(userAddress) | |
392 | 392 | let isNewUser = $t01514715221._1 | |
393 | 393 | let lockAmount = $t01514715221._2 | |
394 | 394 | let lockStart = $t01514715221._3 | |
395 | 395 | if ((0 >= lockAmount)) | |
396 | 396 | then throw("Nothing to unstake") | |
397 | 397 | else if ((amount > lockAmount)) | |
398 | 398 | then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(lockAmount))) | |
399 | 399 | else { | |
400 | 400 | let $t01541115565 = StatsResult(-(amount), if ((amount == lockAmount)) | |
401 | 401 | then -1 | |
402 | 402 | else 0, if ((amount == lockAmount)) | |
403 | 403 | then -1 | |
404 | 404 | else 0) | |
405 | 405 | let statsEntries = $t01541115565._1 | |
406 | 406 | let totalStaked = $t01541115565._2 | |
407 | 407 | let totalStakedNew = $t01541115565._3 | |
408 | 408 | ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddress, i.transactionId, lockAmount, lockStart, (lockAmount - amount), lockStart)] ++ RewardEntries(false, userAddressStr, lockAmount)) ++ LockParamsEntry(userAddress, (lockAmount - amount), lockStart)) ++ statsEntries) | |
409 | 409 | } | |
410 | 410 | } | |
411 | 411 | ||
412 | 412 | ||
413 | 413 | ||
414 | 414 | @Callable(i) | |
415 | 415 | func deposit () = if ((size(i.payments) != 1)) | |
416 | 416 | then throw("exact 1 payment is allowed only") | |
417 | 417 | else { | |
418 | 418 | let pmt = i.payments[0] | |
419 | 419 | let amount = pmt.amount | |
420 | 420 | let pmtAssetId = valueOrElse(pmt.assetId, WAVESID) | |
421 | 421 | let pmtAssetIdStr = toBase58String(pmtAssetId) | |
422 | 422 | let pmtMultX = if ((pmtAssetId == WAVESID)) | |
423 | 423 | then MULTX8 | |
424 | 424 | else MULTX6 | |
425 | 425 | let amountX = toBigInt(amount) | |
426 | 426 | let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0) | |
427 | 427 | let totalStakedX = toBigInt(totalStaked) | |
428 | 428 | if ((0 > totalStaked)) | |
429 | 429 | then throw("TODO: case is not supported") | |
430 | 430 | else if ((totalStaked == 0)) | |
431 | 431 | then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount) | |
432 | 432 | else { | |
433 | 433 | let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX) | |
434 | 434 | let depositNumLastKEY = keyDepositNumLast() | |
435 | 435 | let depositNumLast = getIntOrElse(depositNumLastKEY, -1) | |
436 | 436 | let depositNumNew = (depositNumLast + 1) | |
437 | 437 | if (!(contains(supportedAssetsStr, pmtAssetIdStr))) | |
438 | 438 | then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr)) | |
439 | 439 | else { | |
440 | 440 | func refreshRewardPerNsbtSUM (accum,nextAsset) = { | |
441 | 441 | let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset) | |
442 | 442 | let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0") | |
443 | 443 | (accum :+ (if ((nextAsset == pmtAssetIdStr)) | |
444 | 444 | then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18))) | |
445 | 445 | else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr))) | |
446 | 446 | } | |
447 | 447 | ||
448 | 448 | ({ | |
449 | 449 | let $l = supportedAssetsList | |
450 | 450 | let $s = size($l) | |
451 | 451 | let $acc0 = nil | |
452 | 452 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
453 | 453 | then $a | |
454 | 454 | else refreshRewardPerNsbtSUM($a, $l[$i]) | |
455 | 455 | ||
456 | 456 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
457 | 457 | then $a | |
458 | 458 | else throw("List size exceeds 10") | |
459 | 459 | ||
460 | 460 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
461 | 461 | } :+ IntegerEntry(depositNumLastKEY, depositNumNew)) | |
462 | 462 | } | |
463 | 463 | } | |
464 | 464 | } | |
465 | 465 | ||
466 | 466 | ||
467 | 467 | ||
468 | 468 | @Callable(i) | |
469 | 469 | func claimRewards () = { | |
470 | 470 | let userAddress = i.caller | |
471 | 471 | let userAddressStr = toString(userAddress) | |
472 | 472 | if ((size(i.payments) > 0)) | |
473 | 473 | then throw("payments are not accepted") | |
474 | 474 | else { | |
475 | 475 | let $t01772917834 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
476 | 476 | let isNewUser = $t01772917834._1 | |
477 | 477 | let stakedAmount = $t01772917834._2 | |
478 | 478 | let stakingStart = $t01772917834._3 | |
479 | 479 | let stakedAmountX = toBigInt(stakedAmount) | |
480 | 480 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
481 | 481 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
482 | 482 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
483 | 483 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
484 | 484 | let $t01820518343 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
485 | 485 | let rewardTotal = $t01820518343._1 | |
486 | 486 | let cached = $t01820518343._2 | |
487 | 487 | let dynamic = $t01820518343._3 | |
488 | 488 | let rewardCachedPartKEY = $t01820518343._4 | |
489 | 489 | let claimedKEY = keyClaimed(userAddressStr, asset) | |
490 | 490 | let $t01840318440 = accum | |
491 | 491 | let data = $t01840318440._1 | |
492 | 492 | let claimedAmtByAsset = $t01840318440._2 | |
493 | 493 | let newPart = makeString([asset, toString(rewardTotal)], ":") | |
494 | 494 | let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_") | |
495 | 495 | if ((0 >= rewardTotal)) | |
496 | 496 | then $Tuple2(data, claimedAmtByAssetNew) | |
497 | 497 | else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew) | |
498 | 498 | } | |
499 | 499 | ||
500 | 500 | let $t01890019014 = { | |
501 | 501 | let $l = supportedAssetsList | |
502 | 502 | let $s = size($l) | |
503 | 503 | let $acc0 = $Tuple2(nil, "") | |
504 | 504 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
505 | 505 | then $a | |
506 | 506 | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
507 | 507 | ||
508 | 508 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
509 | 509 | then $a | |
510 | 510 | else throw("List size exceeds 10") | |
511 | 511 | ||
512 | 512 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
513 | 513 | } | |
514 | 514 | let transfers = $t01890019014._1 | |
515 | 515 | let claimedAmtByAssetResult = $t01890019014._2 | |
516 | 516 | if ((0 >= size(transfers))) | |
517 | 517 | then throw("nothing to claim") | |
518 | 518 | else ((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddress, i.transactionId, drop(claimedAmtByAssetResult, 1))) | |
519 | 519 | } | |
520 | 520 | } | |
521 | 521 | ||
522 | 522 | ||
523 | 523 | ||
524 | 524 | @Callable(i) | |
525 | 525 | func unclaimedRewardsREADONLY (userAddressStr) = { | |
526 | 526 | func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_") | |
527 | 527 | ||
528 | 528 | let unclaimedRewardStr = if ((userAddressStr == "")) | |
529 | 529 | then { | |
530 | 530 | let $l = supportedAssetsList | |
531 | 531 | let $s = size($l) | |
532 | 532 | let $acc0 = "" | |
533 | 533 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
534 | 534 | then $a | |
535 | 535 | else forEachAssetZeroReward($a, $l[$i]) | |
536 | 536 | ||
537 | 537 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
538 | 538 | then $a | |
539 | 539 | else throw("List size exceeds 10") | |
540 | 540 | ||
541 | 541 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
542 | 542 | } | |
543 | 543 | else { | |
544 | 544 | let userAddress = addressFromStringValue(userAddressStr) | |
545 | 545 | let $t01967319778 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
546 | 546 | let isNewUser = $t01967319778._1 | |
547 | 547 | let stakedAmount = $t01967319778._2 | |
548 | 548 | let stakingStart = $t01967319778._3 | |
549 | 549 | let stakedAmountX = toBigInt(stakedAmount) | |
550 | 550 | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
551 | 551 | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
552 | 552 | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
553 | 553 | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
554 | 554 | let $t02012420262 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
555 | 555 | let rewardTotal = $t02012420262._1 | |
556 | 556 | let cached = $t02012420262._2 | |
557 | 557 | let dynamic = $t02012420262._3 | |
558 | 558 | let rewardCachedPartKEY = $t02012420262._4 | |
559 | 559 | let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0) | |
560 | 560 | ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_") | |
561 | 561 | } | |
562 | 562 | ||
563 | 563 | let $l = supportedAssetsList | |
564 | 564 | let $s = size($l) | |
565 | 565 | let $acc0 = "" | |
566 | 566 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
567 | 567 | then $a | |
568 | 568 | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
569 | 569 | ||
570 | 570 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
571 | 571 | then $a | |
572 | 572 | else throw("List size exceeds 10") | |
573 | 573 | ||
574 | 574 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
575 | 575 | } | |
576 | 576 | $Tuple2(nil, dropRight(unclaimedRewardStr, 1)) | |
577 | 577 | } | |
578 | 578 | ||
579 | 579 | ||
580 | 580 | ||
581 | 581 | @Callable(i) | |
582 | 582 | func surfStakingSYSREADONLY (userAddressStrOrEmpty) = { | |
583 | 583 | let surfTotal = getIntOrElse(keyLockParamTotalAmount(), 0) | |
584 | 584 | let gnsbtFromSurfTotal = surfToGnsbt(surfTotal) | |
585 | 585 | if ((userAddressStrOrEmpty == "")) | |
586 | 586 | then $Tuple2(nil, [0, surfTotal, 0, gnsbtFromSurfTotal, 0]) | |
587 | 587 | else { | |
588 | 588 | let userAddress = toAddressOrFail(userAddressStrOrEmpty) | |
589 | 589 | let $t02095421055 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, 0)) | |
590 | 590 | let isNewUser = $t02095421055._1 | |
591 | 591 | let surfUser = $t02095421055._2 | |
592 | 592 | let stakingStart = $t02095421055._3 | |
593 | 593 | let gnsbtFromSurfUser = surfToGnsbt(surfUser) | |
594 | 594 | $Tuple2(nil, [surfUser, surfTotal, gnsbtFromSurfUser, gnsbtFromSurfTotal, stakingStart]) | |
595 | 595 | } | |
596 | 596 | } | |
597 | 597 | ||
598 | 598 | ||
599 | + | ||
600 | + | @Callable(i) | |
601 | + | func configSYSREADONLY () = { | |
602 | + | let minLockAmt = getIntegerValue(keyMinLockAmount()) | |
603 | + | let gnsbtFromSurfCoeff = (60 * MULT6) | |
604 | + | let surfVotingPowerRestrictivePeriod = (1440 * 14) | |
605 | + | let brToStartSurfTransformation = 1200000 | |
606 | + | $Tuple2(nil, [minLockAmt, gnsbtFromSurfCoeff, surfVotingPowerRestrictivePeriod, brToStartSurfTransformation]) | |
607 | + | } | |
608 | + | ||
609 | + |
github/deemru/w8io/169f3d6 97.99 ms ◑