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