tx · 6auGTk5f4t2Myj441krVN4Mawg77PdAwxYxsBHnTd3MK 3NCvy36v15qPRFBCRHJ2HP16bW89fA8Pi3g: -0.02300000 Waves 2022.12.20 11:37 [2368383] smart account 3NCvy36v15qPRFBCRHJ2HP16bW89fA8Pi3g > SELF 0.00000000 Waves
{ "type": 13, "id": "6auGTk5f4t2Myj441krVN4Mawg77PdAwxYxsBHnTd3MK", "fee": 2300000, "feeAssetId": null, "timestamp": 1671525501459, "version": 2, "chainId": 84, "sender": "3NCvy36v15qPRFBCRHJ2HP16bW89fA8Pi3g", "senderPublicKey": "6NPfSkwsgVtaEmVfxeaDmxsJnTVE93AxPZeNHfraGvrX", "proofs": [ "j73J3D6S2zksmottD2aJ2fUfixEH1zXnWiYcywXYaQTE1hQ3X2yCZ8BqxmgwvaedrvhJviDjrVUBrGt8zNof6KD" ], "script": "base64:BgI+CAISBQoDAQgIEgMKAQgSABIAEgMKAQESABIAEgASAwoBCBIECgIIARIAEgQKAggBEgASBAoCAQgSBAoCAQhoAAtyZXZpc2lvbk51bQIAAANTRVACAl9fAAVNVUxUNgDAhD0ABU1VTFQ4AIDC1y8ABk1VTFRYNgkAtgIBBQVNVUxUNgAGTVVMVFg4CQC2AgEFBU1VTFQ4AAdNVUxUWDE4CQC2AgEAgICQu7rWrfANAApXQVZFU0lEU1RSAgVXQVZFUwAHV0FWRVNJRAkA2QQBBQpXQVZFU0lEU1RSAAlEQVlNSUxMSVMAgLiZKQAZSWR4Q29udHJvbENmZ05ldXRyaW5vRGFwcAABABhJZHhDb250cm9sQ2ZnQXVjdGlvbkRhcHAAAgAUSWR4Q29udHJvbENmZ1JwZERhcHAAAwAVSWR4Q29udHJvbENmZ01hdGhEYXBwAAQAHElkeENvbnRyb2xDZmdMaXF1aWRhdGlvbkRhcHAABQAVSWR4Q29udHJvbENmZ1Jlc3REYXBwAAYAHUlkeENvbnRyb2xDZmdOb2RlUmVnaXN0cnlEYXBwAAcAHElkeENvbnRyb2xDZmdOc2J0U3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AUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgkA2QQBCQCRAwIFEHB1YktleUFkbWluc0xpc3QAAgABAAADCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwADCQDZBAEJAJEDAgUQcHViS2V5QWRtaW5zTGlzdAADAAIAAAkAZwIFBWNvdW50AAPDi8tp", "height": 2368383, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let revisionNum = "" | |
5 | + | ||
6 | + | let SEP = "__" | |
7 | + | ||
8 | + | let MULT6 = 1000000 | |
9 | + | ||
10 | + | let MULT8 = 100000000 | |
11 | + | ||
12 | + | let MULTX6 = toBigInt(MULT6) | |
13 | + | ||
14 | + | let MULTX8 = toBigInt(MULT8) | |
15 | + | ||
16 | + | let MULTX18 = toBigInt(1000000000000000000) | |
17 | + | ||
18 | + | let WAVESIDSTR = "WAVES" | |
19 | + | ||
20 | + | let WAVESID = fromBase58String(WAVESIDSTR) | |
21 | + | ||
22 | + | let DAYMILLIS = 86400000 | |
23 | + | ||
24 | + | let IdxControlCfgNeutrinoDapp = 1 | |
25 | + | ||
26 | + | let IdxControlCfgAuctionDapp = 2 | |
27 | + | ||
28 | + | let IdxControlCfgRpdDapp = 3 | |
29 | + | ||
30 | + | let IdxControlCfgMathDapp = 4 | |
31 | + | ||
32 | + | let IdxControlCfgLiquidationDapp = 5 | |
33 | + | ||
34 | + | let IdxControlCfgRestDapp = 6 | |
35 | + | ||
36 | + | let IdxControlCfgNodeRegistryDapp = 7 | |
37 | + | ||
38 | + | let IdxControlCfgNsbtStakingDapp = 8 | |
39 | + | ||
40 | + | let IdxControlCfgMediatorDapp = 9 | |
41 | + | ||
42 | + | let IdxControlCfgSurfStakingDapp = 10 | |
43 | + | ||
44 | + | let IdxControlCfgGnsbtControllerDapp = 11 | |
45 | + | ||
46 | + | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
47 | + | ||
48 | + | ||
49 | + | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (("Mandatory this." + key) + " is not defined")) | |
50 | + | ||
51 | + | ||
52 | + | func getStrOrElse (key,defaultVal) = valueOrElse(getString(this, key), defaultVal) | |
53 | + | ||
54 | + | ||
55 | + | func keyMinLockAmount () = "%s__minLockAmount" | |
56 | + | ||
57 | + | ||
58 | + | func keyStakedAssetId () = "%s__stakedAssetId" | |
59 | + | ||
60 | + | ||
61 | + | func keyControlAddress () = "%s%s__config__controlAddress" | |
62 | + | ||
63 | + | ||
64 | + | func keyControlCfg () = "%s__controlConfig" | |
65 | + | ||
66 | + | ||
67 | + | func keySupportedRewardAssets () = "supportedRewardAssets" | |
68 | + | ||
69 | + | ||
70 | + | func readControlCfgOrFail (control) = split_4C(getStringOrFail(control, keyControlCfg()), SEP) | |
71 | + | ||
72 | + | ||
73 | + | func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx))) | |
74 | + | ||
75 | + | ||
76 | + | let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3P5Bfd58PPfNvBM2Hy8QfbcDqMeNtzg7KfP")) | |
77 | + | ||
78 | + | let controlCfg = readControlCfgOrFail(controlContract) | |
79 | + | ||
80 | + | let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp) | |
81 | + | ||
82 | + | let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp) | |
83 | + | ||
84 | + | let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp) | |
85 | + | ||
86 | + | let stakedAssetIdStr = getStringOrFail(this, keyStakedAssetId()) | |
87 | + | ||
88 | + | let stakedAssetId = fromBase58String(stakedAssetIdStr) | |
89 | + | ||
90 | + | let minLockAmount = getIntOrFail(keyMinLockAmount()) | |
91 | + | ||
92 | + | let supportedAssetsStr = getStrOrElse(keySupportedRewardAssets(), "") | |
93 | + | ||
94 | + | let supportedAssetsList = split(supportedAssetsStr, "_") | |
95 | + | ||
96 | + | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP) | |
97 | + | ||
98 | + | ||
99 | + | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP) | |
100 | + | ||
101 | + | ||
102 | + | func keyHistoryRecord (type,userAddress,txId) = makeString(["%s%s%s%s", "history", type, userAddress, toBase58String(txId)], SEP) | |
103 | + | ||
104 | + | ||
105 | + | func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP) | |
106 | + | ||
107 | + | ||
108 | + | func keyStatsLocksCount () = makeString(["%s%s", "stats", "locksCount"], SEP) | |
109 | + | ||
110 | + | ||
111 | + | func keyStatsUsersCount () = makeString(["%s%s", "stats", "activeUsersCount"], SEP) | |
112 | + | ||
113 | + | ||
114 | + | func keyStatsDepositAmtByDay (timestamp) = makeString(["%s%s%d", "stats", "depositAmtByDay", toString(timestamp)], SEP) | |
115 | + | ||
116 | + | ||
117 | + | func keyStatsDepositAmtTotals () = makeString(["%s%s%d", "stats", "depositAmtTotals"], SEP) | |
118 | + | ||
119 | + | ||
120 | + | func keyNextPeriod () = "%s__nextPeriod" | |
121 | + | ||
122 | + | ||
123 | + | func keyDepositNumLast () = makeString(["%s%s%s", "dep", "lastNum"], SEP) | |
124 | + | ||
125 | + | ||
126 | + | func keyUserRewardFromDepositNum (userAddress) = makeString(["%s%s%s", "userRwdFromDepNum", userAddress], SEP) | |
127 | + | ||
128 | + | ||
129 | + | func keyRewardPerNsbtSumAt (depositNum,tkn) = makeString(["%s%d", "rwdPerNsbtSumByDepNum", toString(depositNum), tkn], SEP) | |
130 | + | ||
131 | + | ||
132 | + | func keyReward (userAddress,tkn) = makeString(["%s%s%s", "rwd", userAddress, tkn], SEP) | |
133 | + | ||
134 | + | ||
135 | + | func keyClaimed (userAddress,tkn) = makeString(["%s%s%s", "clm", userAddress, tkn], SEP) | |
136 | + | ||
137 | + | ||
138 | + | func keyNotDistributedReward (tkn) = makeString(["%s%s", "notDistributed", tkn], SEP) | |
139 | + | ||
140 | + | ||
141 | + | func keyLegacyUserBalance (userAddr,tkn) = makeString(["rpd_balance", tkn, userAddr], "_") | |
142 | + | ||
143 | + | ||
144 | + | func keyLegacyTotalBalance (tkn) = makeString(["rpd_balance", tkn], "_") | |
145 | + | ||
146 | + | ||
147 | + | func toX18 (origVal,origMult) = fraction(toBigInt(origVal), MULTX18, origMult) | |
148 | + | ||
149 | + | ||
150 | + | func getIntOrZero (key) = valueOrElse(getInteger(this, key), 0) | |
151 | + | ||
152 | + | ||
153 | + | func getIntOrElse (key,defaultVal) = valueOrElse(getInteger(this, key), defaultVal) | |
154 | + | ||
155 | + | ||
156 | + | func toAddressOrFail (addressStr) = valueOrErrorMessage(addressFromString(addressStr), ("couldn't parse passed addressStr=" + addressStr)) | |
157 | + | ||
158 | + | ||
159 | + | func toAssetVect (assetStr) = if ((assetStr == WAVESIDSTR)) | |
160 | + | then unit | |
161 | + | else fromBase58String(assetStr) | |
162 | + | ||
163 | + | ||
164 | + | func asInt (val) = match val { | |
165 | + | case valInt: Int => | |
166 | + | valInt | |
167 | + | case _ => | |
168 | + | throw("fail to cast into Int") | |
169 | + | } | |
170 | + | ||
171 | + | ||
172 | + | func asSwapParamsSTRUCT (v) = match v { | |
173 | + | case struct: (Int, Int, Int, Int, Int, Int, Int) => | |
174 | + | struct | |
175 | + | case _ => | |
176 | + | throw("fail to cast into Int") | |
177 | + | } | |
178 | + | ||
179 | + | ||
180 | + | func formatHistoryRecord (userAddress,oldAmount,newAmount) = makeString(["%s%d%d%d%d", userAddress, toString(lastBlock.height), toString(lastBlock.timestamp), toString(oldAmount), toString(newAmount)], SEP) | |
181 | + | ||
182 | + | ||
183 | + | func formatClaimHistoryRecord (userAddress,claimedRewards) = makeString(["%s%d%d%s", userAddress, toString(lastBlock.height), toString(lastBlock.timestamp), claimedRewards], SEP) | |
184 | + | ||
185 | + | ||
186 | + | func HistoryRecordEntry (type,userAddress,txId,oldAmount,newAmount) = StringEntry(keyHistoryRecord(type, userAddress, txId), formatHistoryRecord(userAddress, oldAmount, newAmount)) | |
187 | + | ||
188 | + | ||
189 | + | func ClaimHistoryEntry (userAddress,txId,claimedRewards) = StringEntry(keyHistoryRecord("claim", userAddress, txId), formatClaimHistoryRecord(userAddress, claimedRewards)) | |
190 | + | ||
191 | + | ||
192 | + | func StatsResult (totalLockedInc,lockCountInc,usersCountInc,isMigration) = { | |
193 | + | let locksCount = getIntOrZero(keyStatsLocksCount()) | |
194 | + | let usersCount = getIntOrZero(keyStatsUsersCount()) | |
195 | + | let totalAmount = getIntOrZero(keyLockParamTotalAmount()) | |
196 | + | let totalAmountNew = (totalAmount + totalLockedInc) | |
197 | + | $Tuple3(([IntegerEntry(keyStatsLocksCount(), (locksCount + lockCountInc)), IntegerEntry(keyStatsUsersCount(), (usersCount + usersCountInc)), IntegerEntry(keyLockParamTotalAmount(), totalAmountNew)] ++ (if (isMigration) | |
198 | + | then nil | |
199 | + | else [IntegerEntry(keyLegacyTotalBalance(stakedAssetIdStr), totalAmountNew)])), totalAmount, totalAmountNew) | |
200 | + | } | |
201 | + | ||
202 | + | ||
203 | + | func LockParamsEntry (userAddress,amount,stakingStartHeight,isMigration) = ([IntegerEntry(keyLockParamUserAmount(userAddress), amount), IntegerEntry(keyLockParamStartBlock(userAddress), stakingStartHeight)] ++ (if (isMigration) | |
204 | + | then nil | |
205 | + | else [IntegerEntry(keyLegacyUserBalance(userAddress, stakedAssetIdStr), amount)])) | |
206 | + | ||
207 | + | ||
208 | + | func getParamsOrFail () = $Tuple2(fromBase58String(getStringOrFail(this, keyStakedAssetId())), getIntOrFail(keyMinLockAmount())) | |
209 | + | ||
210 | + | ||
211 | + | func isActiveUser (userAddress) = (getIntOrElse(keyLockParamUserAmount(userAddress), 0) > 0) | |
212 | + | ||
213 | + | ||
214 | + | func getUserParamsOrUnit (userAddress) = if (isActiveUser(userAddress)) | |
215 | + | then $Tuple3(false, getIntOrFail(keyLockParamUserAmount(userAddress)), getIntOrFail(keyLockParamStartBlock(userAddress))) | |
216 | + | else unit | |
217 | + | ||
218 | + | ||
219 | + | func getUserParamsOrFail (userAddress) = valueOrErrorMessage(getUserParamsOrUnit(userAddress), (("User " + userAddress) + " is not defined")) | |
220 | + | ||
221 | + | ||
222 | + | func calcReward (userAddress,assetId,stakedAmountX,depositNumUser,depositNumLast) = { | |
223 | + | let rewardPerNsbtSumLastKEY = keyRewardPerNsbtSumAt(depositNumLast, assetId) | |
224 | + | let sumLastX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, assetId), "0")) | |
225 | + | let sumUserX18 = parseBigIntValue(getStrOrElse(keyRewardPerNsbtSumAt(depositNumUser, assetId), "0")) | |
226 | + | let rewardDynamicPart = toInt(fraction((sumLastX18 - sumUserX18), stakedAmountX, MULTX18)) | |
227 | + | let rewardCachedPartKEY = keyReward(userAddress, assetId) | |
228 | + | let rewardCachedPart = getIntOrElse(rewardCachedPartKEY, 0) | |
229 | + | $Tuple4((rewardCachedPart + rewardDynamicPart), rewardCachedPart, rewardDynamicPart, rewardCachedPartKEY) | |
230 | + | } | |
231 | + | ||
232 | + | ||
233 | + | func toStartOfDay (timestamp) = ((timestamp / DAYMILLIS) * DAYMILLIS) | |
234 | + | ||
235 | + | ||
236 | + | func findElementPosition (src,element,sep) = { | |
237 | + | let elementStart = valueOrErrorMessage(indexOf(src, element), ((("there is no substring " + element) + " in ") + src)) | |
238 | + | if ((elementStart == 0)) | |
239 | + | then 0 | |
240 | + | else { | |
241 | + | let left = take(src, elementStart) | |
242 | + | (size(split(left, sep)) - 1) | |
243 | + | } | |
244 | + | } | |
245 | + | ||
246 | + | ||
247 | + | let DepositTotalsPREFIX = "%d%d" | |
248 | + | ||
249 | + | func updateDepositTotals (currVal,idxToUpdate,deltaAmt) = { | |
250 | + | let currArr = split(currVal, SEP) | |
251 | + | func updDepTotByIdx (idx) = if ((idx != idxToUpdate)) | |
252 | + | then currArr[idx] | |
253 | + | else toString((parseIntValue(currArr[idx]) + deltaAmt)) | |
254 | + | ||
255 | + | makeString([DepositTotalsPREFIX, updDepTotByIdx(1), updDepTotByIdx(2)], SEP) | |
256 | + | } | |
257 | + | ||
258 | + | ||
259 | + | func DepositsTotalsEntries (depositAmount,assetIdStr) = { | |
260 | + | let startOfDay = toStartOfDay(lastBlock.timestamp) | |
261 | + | let byDayKEY = keyStatsDepositAmtByDay(startOfDay) | |
262 | + | let totalsKEY = keyStatsDepositAmtTotals() | |
263 | + | let position = findElementPosition(supportedAssetsStr, assetIdStr, "_") | |
264 | + | let defaultDATA = (DepositTotalsPREFIX + "__0__0") | |
265 | + | let currTotalsDATA = valueOrElse(getString(this, totalsKEY), defaultDATA) | |
266 | + | let newTotalsDATA = updateDepositTotals(currTotalsDATA, (position + 1), depositAmount) | |
267 | + | [StringEntry(totalsKEY, newTotalsDATA), StringEntry(byDayKEY, newTotalsDATA)] | |
268 | + | } | |
269 | + | ||
270 | + | ||
271 | + | func RewardEntries (isNewUser,userAddress,stakedAmount) = { | |
272 | + | let stakedAmountX = toBigInt(stakedAmount) | |
273 | + | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddress) | |
274 | + | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
275 | + | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
276 | + | func forEachAssetCacheUserReward (accum,asset) = { | |
277 | + | let $t01072510860 = calcReward(userAddress, asset, stakedAmountX, depositNumUser, depositNumLast) | |
278 | + | let rewardTotal = $t01072510860._1 | |
279 | + | let cached = $t01072510860._2 | |
280 | + | let dynamic = $t01072510860._3 | |
281 | + | let rewardCachedPartKEY = $t01072510860._4 | |
282 | + | (accum :+ IntegerEntry(rewardCachedPartKEY, rewardTotal)) | |
283 | + | } | |
284 | + | ||
285 | + | if (if ((depositNumLast == -1)) | |
286 | + | then (depositNumUser == -1) | |
287 | + | else false) | |
288 | + | then nil | |
289 | + | else if (if ((depositNumLast == -1)) | |
290 | + | then (depositNumUser > -1) | |
291 | + | else false) | |
292 | + | then throw("invalid depositNumLast and depositNumUser state") | |
293 | + | else if (if ((depositNumLast > -1)) | |
294 | + | then (depositNumUser >= -1) | |
295 | + | else false) | |
296 | + | then if (isNewUser) | |
297 | + | then [IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)] | |
298 | + | else ({ | |
299 | + | let $l = supportedAssetsList | |
300 | + | let $s = size($l) | |
301 | + | let $acc0 = nil | |
302 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
303 | + | then $a | |
304 | + | else forEachAssetCacheUserReward($a, $l[$i]) | |
305 | + | ||
306 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
307 | + | then $a | |
308 | + | else throw("List size exceeds 2") | |
309 | + | ||
310 | + | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) | |
311 | + | } :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) | |
312 | + | else throw(((("uncovered condition: depositNumLast=" + toString(depositNumLast)) + " depositNumUser=") + toString(depositNumUser))) | |
313 | + | } | |
314 | + | ||
315 | + | ||
316 | + | func IncrementNotDistributedRewardEntry (tkn,amountInc) = { | |
317 | + | let notDistributedRewardKEY = keyNotDistributedReward(tkn) | |
318 | + | let notDistributedReward = getIntOrElse(notDistributedRewardKEY, 0) | |
319 | + | [IntegerEntry(notDistributedRewardKEY, (notDistributedReward + amountInc))] | |
320 | + | } | |
321 | + | ||
322 | + | ||
323 | + | func mergeStake (userAddress,amountToAdd) = { | |
324 | + | let $t01368413800 = valueOrElse(getUserParamsOrUnit(userAddress), $Tuple3(true, 0, height)) | |
325 | + | let isNewUser = $t01368413800._1 | |
326 | + | let stakedAmount = $t01368413800._2 | |
327 | + | let stakingStartHeight = $t01368413800._3 | |
328 | + | let stakedAmountNEW = if (isNewUser) | |
329 | + | then amountToAdd | |
330 | + | else (amountToAdd + stakedAmount) | |
331 | + | $Tuple4(isNewUser, stakedAmount, stakingStartHeight, stakedAmountNEW) | |
332 | + | } | |
333 | + | ||
334 | + | ||
335 | + | func isUsdnStakingMigrationDone () = { | |
336 | + | let legacyTotalBalance = getIntOrElse(keyLegacyTotalBalance(stakedAssetIdStr), 0) | |
337 | + | let totalBalance = getIntOrElse(keyLockParamTotalAmount(), 0) | |
338 | + | (legacyTotalBalance == totalBalance) | |
339 | + | } | |
340 | + | ||
341 | + | ||
342 | + | func failIfUsdnMigrationNotDone () = if (isUsdnStakingMigrationDone()) | |
343 | + | then true | |
344 | + | else throw("USDN staking migration is IN PROGRESS. All operations are temporary suspended.") | |
345 | + | ||
346 | + | ||
347 | + | func commonStake (userAddress,i,isMigration) = { | |
348 | + | let migCheck = if (!(isMigration)) | |
349 | + | then failIfUsdnMigrationNotDone() | |
350 | + | else true | |
351 | + | if ((migCheck == migCheck)) | |
352 | + | then if ((size(i.payments) != 1)) | |
353 | + | then throw("Invalid payments size") | |
354 | + | else { | |
355 | + | let payment = i.payments[0] | |
356 | + | let amount = payment.amount | |
357 | + | let invalidAssetMessage = (("Invalid asset. " + toBase58String(stakedAssetId)) + " is expected") | |
358 | + | let assetId = valueOrErrorMessage(payment.assetId, invalidAssetMessage) | |
359 | + | if ((assetId != stakedAssetId)) | |
360 | + | then throw(invalidAssetMessage) | |
361 | + | else { | |
362 | + | let userAddressStr = toString(userAddress) | |
363 | + | let mergedData = mergeStake(userAddressStr, amount) | |
364 | + | let isNewUser = mergedData._1 | |
365 | + | let stakedAmount = mergedData._2 | |
366 | + | let stakingStartHeight = mergedData._3 | |
367 | + | let stakedAmountNEW = mergedData._4 | |
368 | + | if ((minLockAmount > stakedAmountNEW)) | |
369 | + | then throw(("Min lock amount is " + toString(minLockAmount))) | |
370 | + | else { | |
371 | + | let $t01528315398 = StatsResult(amount, 1, if (isNewUser) | |
372 | + | then 1 | |
373 | + | else 0, isMigration) | |
374 | + | let statsEntries = $t01528315398._1 | |
375 | + | let totalStaked = $t01528315398._2 | |
376 | + | let totalStakedNew = $t01528315398._3 | |
377 | + | ((([HistoryRecordEntry("stake", userAddressStr, i.transactionId, stakedAmount, stakedAmountNEW)] ++ RewardEntries(isNewUser, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddressStr, stakedAmountNEW, stakingStartHeight, isMigration)) ++ statsEntries) | |
378 | + | } | |
379 | + | } | |
380 | + | } | |
381 | + | else throw("Strict value is not equal to itself.") | |
382 | + | } | |
383 | + | ||
384 | + | ||
385 | + | func commonUnstake (amount,i,isMigration) = { | |
386 | + | let migrationCheck = failIfUsdnMigrationNotDone() | |
387 | + | if ((migrationCheck == migrationCheck)) | |
388 | + | then if ((size(i.payments) != 0)) | |
389 | + | then throw("unstake doesn't require any payment") | |
390 | + | else { | |
391 | + | let userAddress = i.caller | |
392 | + | let userAddressStr = toString(userAddress) | |
393 | + | let $t01596316051 = getUserParamsOrFail(userAddressStr) | |
394 | + | let isNewUser = $t01596316051._1 | |
395 | + | let stakedAmount = $t01596316051._2 | |
396 | + | let stakingStartHeight = $t01596316051._3 | |
397 | + | if ((0 >= stakedAmount)) | |
398 | + | then throw("Nothing to unstake") | |
399 | + | else if ((amount > stakedAmount)) | |
400 | + | then throw(((("Requested " + toString(amount)) + ", but staked only ") + toString(stakedAmount))) | |
401 | + | else { | |
402 | + | let stakedAmountNEW = (stakedAmount - amount) | |
403 | + | let $t01629316464 = StatsResult(-(amount), if ((amount == stakedAmount)) | |
404 | + | then -1 | |
405 | + | else 0, if ((amount == stakedAmount)) | |
406 | + | then -1 | |
407 | + | else 0, isMigration) | |
408 | + | let statsEntries = $t01629316464._1 | |
409 | + | let totalStaked = $t01629316464._2 | |
410 | + | let totalStakedNew = $t01629316464._3 | |
411 | + | ((([ScriptTransfer(userAddress, amount, stakedAssetId), HistoryRecordEntry("unstake", userAddressStr, i.transactionId, stakedAmount, stakedAmountNEW)] ++ RewardEntries(false, userAddressStr, stakedAmount)) ++ LockParamsEntry(userAddressStr, stakedAmountNEW, stakingStartHeight, isMigration)) ++ statsEntries) | |
412 | + | } | |
413 | + | } | |
414 | + | else throw("Strict value is not equal to itself.") | |
415 | + | } | |
416 | + | ||
417 | + | ||
418 | + | func commonClaim (userAddress,i) = { | |
419 | + | let migrationCheck = failIfUsdnMigrationNotDone() | |
420 | + | if ((migrationCheck == migrationCheck)) | |
421 | + | then { | |
422 | + | let userAddressStr = toString(userAddress) | |
423 | + | if ((size(i.payments) > 0)) | |
424 | + | then throw("payments are not accepted") | |
425 | + | else { | |
426 | + | let $t01702817136 = valueOrElse(getUserParamsOrUnit(userAddressStr), $Tuple3(true, 0, 0)) | |
427 | + | let isNewUser = $t01702817136._1 | |
428 | + | let stakedAmount = $t01702817136._2 | |
429 | + | let stakingStart = $t01702817136._3 | |
430 | + | let stakedAmountX = toBigInt(stakedAmount) | |
431 | + | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
432 | + | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
433 | + | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
434 | + | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
435 | + | let $t01750717645 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
436 | + | let rewardTotal = $t01750717645._1 | |
437 | + | let cached = $t01750717645._2 | |
438 | + | let dynamic = $t01750717645._3 | |
439 | + | let rewardCachedPartKEY = $t01750717645._4 | |
440 | + | let claimedKEY = keyClaimed(userAddressStr, asset) | |
441 | + | let $t01770517742 = accum | |
442 | + | let data = $t01770517742._1 | |
443 | + | let claimedAmtByAsset = $t01770517742._2 | |
444 | + | let newPart = makeString([asset, toString(rewardTotal)], ":") | |
445 | + | let claimedAmtByAssetNew = makeString([claimedAmtByAsset, newPart], "_") | |
446 | + | if ((0 >= rewardTotal)) | |
447 | + | then $Tuple2(data, claimedAmtByAssetNew) | |
448 | + | else $Tuple2((((data :+ ScriptTransfer(userAddress, rewardTotal, toAssetVect(asset))) :+ IntegerEntry(claimedKEY, (valueOrElse(getInteger(claimedKEY), 0) + rewardTotal))) :+ IntegerEntry(rewardCachedPartKEY, 0)), claimedAmtByAssetNew) | |
449 | + | } | |
450 | + | ||
451 | + | let $t01820218315 = { | |
452 | + | let $l = supportedAssetsList | |
453 | + | let $s = size($l) | |
454 | + | let $acc0 = $Tuple2(nil, "") | |
455 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
456 | + | then $a | |
457 | + | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
458 | + | ||
459 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
460 | + | then $a | |
461 | + | else throw("List size exceeds 2") | |
462 | + | ||
463 | + | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) | |
464 | + | } | |
465 | + | let transfers = $t01820218315._1 | |
466 | + | let claimedAmtByAssetResult = $t01820218315._2 | |
467 | + | if ((0 >= size(transfers))) | |
468 | + | then $Tuple2(nil, 0) | |
469 | + | else $Tuple2(((transfers :+ IntegerEntry(userRewardFromDepositNumKEY, depositNumLast)) :+ ClaimHistoryEntry(userAddressStr, i.transactionId, drop(claimedAmtByAssetResult, 1))), size(transfers)) | |
470 | + | } | |
471 | + | } | |
472 | + | else throw("Strict value is not equal to itself.") | |
473 | + | } | |
474 | + | ||
475 | + | ||
476 | + | let USDNTYPE = "USDN" | |
477 | + | ||
478 | + | let NSBTTYPE = "NSBT" | |
479 | + | ||
480 | + | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
481 | + | ||
482 | + | let NeutrinoContractKey = "neutrino_contract" | |
483 | + | ||
484 | + | let NsbtAssetIdKey = "bond_asset_id" | |
485 | + | ||
486 | + | let BalanceKey = "rpd_balance" | |
487 | + | ||
488 | + | let neutrinoAssetId = fromBase58String(getStringOrFail(neutrinoContract, NeutrinoAssetIdKey)) | |
489 | + | ||
490 | + | let nsbtAssetIdStr = getStringOrFail(neutrinoContract, NsbtAssetIdKey) | |
491 | + | ||
492 | + | let nsbtAssetId = fromBase58String(nsbtAssetIdStr) | |
493 | + | ||
494 | + | func getUserBalanceKey (owner,assetId) = makeString([BalanceKey, assetId, owner], "_") | |
495 | + | ||
496 | + | ||
497 | + | func getContractBalanceKey (assetId) = ((BalanceKey + "_") + assetId) | |
498 | + | ||
499 | + | ||
500 | + | func getContractBalance (assetId) = getIntOrElse(getContractBalanceKey(assetId), 0) | |
501 | + | ||
502 | + | ||
503 | + | func getUserBalance (owner,assetId) = getIntOrElse(getUserBalanceKey(owner, assetId), 0) | |
504 | + | ||
505 | + | ||
506 | + | func getValidStakingAssetOrFail (stakingType,assetId) = if (if ((stakingType == USDNTYPE)) | |
507 | + | then (assetId != neutrinoAssetId) | |
508 | + | else false) | |
509 | + | then throw("can use USDN only") | |
510 | + | else if (if ((stakingType == NSBTTYPE)) | |
511 | + | then (assetId != nsbtAssetId) | |
512 | + | else false) | |
513 | + | then throw("can use NSBT only") | |
514 | + | else if (if ((stakingType != USDNTYPE)) | |
515 | + | then (stakingType != NSBTTYPE) | |
516 | + | else false) | |
517 | + | then throw(("unsupported staking type " + stakingType)) | |
518 | + | else assetId | |
519 | + | ||
520 | + | ||
521 | + | func internalUnlock (stakingType,i,unlockAmount,assetIdParam) = { | |
522 | + | let account = toString(i.caller) | |
523 | + | let assetId = getValidStakingAssetOrFail(stakingType, fromBase58String(assetIdParam)) | |
524 | + | let assetIdString = toBase58String(assetId) | |
525 | + | let balance = (getUserBalance(account, assetIdString) - unlockAmount) | |
526 | + | if ((0 > balance)) | |
527 | + | then throw("invalid amount") | |
528 | + | else $Tuple2([IntegerEntry(getContractBalanceKey(assetIdString), (getContractBalance(assetIdString) - unlockAmount)), IntegerEntry(getUserBalanceKey(account, assetIdString), balance), ScriptTransfer(addressFromStringValue(account), unlockAmount, assetId)], unit) | |
529 | + | } | |
530 | + | ||
531 | + | ||
532 | + | @Callable(i) | |
533 | + | func constructor (minLockAmount,supportedRewardAssets,pStakedAssetId) = if ((i.caller != this)) | |
534 | + | then throw("Permission denied") | |
535 | + | else [IntegerEntry(keyMinLockAmount(), minLockAmount), StringEntry(keySupportedRewardAssets(), supportedRewardAssets), StringEntry(keyStakedAssetId(), pStakedAssetId)] | |
536 | + | ||
537 | + | ||
538 | + | ||
539 | + | @Callable(i) | |
540 | + | func migrateUsdnStaking (userAddressStr) = { | |
541 | + | let mngPubS = valueOrElse(getString("%s%s__cfg__leasingManagerPub"), "7AUMX54ukYMYvPmma7yoFf5NjZhs4Bu5nz3Ez9EV8sur") | |
542 | + | let mngPub = fromBase58String(mngPubS) | |
543 | + | if ((i.callerPublicKey != mngPub)) | |
544 | + | then throw("migrateUsdnStaking not authorized") | |
545 | + | else if (isUsdnStakingMigrationDone()) | |
546 | + | then throw("migration has been done") | |
547 | + | else if ((size(i.payments) != 0)) | |
548 | + | then throw("payments are not allowed") | |
549 | + | else if ((i.feeAssetId != unit)) | |
550 | + | then throw("fee in WAVES is allowed only") | |
551 | + | else if ((i.fee != 500000)) | |
552 | + | then throw("0.005 WAVES fee is allowed only") | |
553 | + | else { | |
554 | + | let legacyUserBalance = getIntOrElse(keyLegacyUserBalance(userAddressStr, stakedAssetIdStr), 0) | |
555 | + | if ((legacyUserBalance == 0)) | |
556 | + | then throw(("no need to migrate user " + userAddressStr)) | |
557 | + | else if (isActiveUser(userAddressStr)) | |
558 | + | then throw(("already migrated user " + userAddressStr)) | |
559 | + | else { | |
560 | + | let userAddress = addressFromStringValue(userAddressStr) | |
561 | + | let emptyVect = fromBase58String("") | |
562 | + | commonStake(userAddress, Invocation([AttachedPayment(stakedAssetId, legacyUserBalance)], userAddress, emptyVect, i.transactionId, 0, unit, userAddress, emptyVect), true) | |
563 | + | } | |
564 | + | } | |
565 | + | } | |
566 | + | ||
567 | + | ||
568 | + | ||
569 | + | @Callable(i) | |
570 | + | func stake () = commonStake(i.caller, i, false) | |
571 | + | ||
572 | + | ||
573 | + | ||
574 | + | @Callable(i) | |
575 | + | func stakeByOriginCaller () = commonStake(i.originCaller, i, false) | |
576 | + | ||
577 | + | ||
578 | + | ||
579 | + | @Callable(i) | |
580 | + | func unstake (amount) = commonUnstake(amount, i, false) | |
581 | + | ||
582 | + | ||
583 | + | ||
584 | + | @Callable(i) | |
585 | + | func deposit () = { | |
586 | + | let migrationCheck = failIfUsdnMigrationNotDone() | |
587 | + | if ((migrationCheck == migrationCheck)) | |
588 | + | then if ((size(i.payments) != 1)) | |
589 | + | then throw("exact 1 payment is allowed only") | |
590 | + | else { | |
591 | + | let pmt = i.payments[0] | |
592 | + | let amount = pmt.amount | |
593 | + | let pmtAssetId = valueOrElse(pmt.assetId, WAVESID) | |
594 | + | let pmtAssetIdStr = toBase58String(pmtAssetId) | |
595 | + | let pmtMultX = if ((pmtAssetId == WAVESID)) | |
596 | + | then MULTX8 | |
597 | + | else MULTX6 | |
598 | + | let amountX = toBigInt(amount) | |
599 | + | let totalStaked = getIntOrElse(keyLockParamTotalAmount(), 0) | |
600 | + | let totalStakedX = toBigInt(totalStaked) | |
601 | + | if ((0 > totalStaked)) | |
602 | + | then throw("TODO: case is not supported") | |
603 | + | else if ((totalStaked == 0)) | |
604 | + | then IncrementNotDistributedRewardEntry(pmtAssetIdStr, amount) | |
605 | + | else { | |
606 | + | let rewardPerNsbtX18 = fraction(amountX, MULTX18, totalStakedX) | |
607 | + | let depositNumLastKEY = keyDepositNumLast() | |
608 | + | let depositNumLast = getIntOrElse(depositNumLastKEY, -1) | |
609 | + | let depositNumNew = (depositNumLast + 1) | |
610 | + | if (!(contains(supportedAssetsStr, pmtAssetIdStr))) | |
611 | + | then throw(((supportedAssetsStr + " doesn't contain ") + pmtAssetIdStr)) | |
612 | + | else { | |
613 | + | func refreshRewardPerNsbtSUM (accum,nextAsset) = { | |
614 | + | let rewardPerNsbtSumNewKEY = keyRewardPerNsbtSumAt(depositNumNew, nextAsset) | |
615 | + | let sumLastStr = getStrOrElse(keyRewardPerNsbtSumAt(depositNumLast, nextAsset), "0") | |
616 | + | (accum :+ (if ((nextAsset == pmtAssetIdStr)) | |
617 | + | then StringEntry(rewardPerNsbtSumNewKEY, toString((parseBigIntValue(sumLastStr) + rewardPerNsbtX18))) | |
618 | + | else StringEntry(rewardPerNsbtSumNewKEY, sumLastStr))) | |
619 | + | } | |
620 | + | ||
621 | + | (({ | |
622 | + | let $l = supportedAssetsList | |
623 | + | let $s = size($l) | |
624 | + | let $acc0 = nil | |
625 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
626 | + | then $a | |
627 | + | else refreshRewardPerNsbtSUM($a, $l[$i]) | |
628 | + | ||
629 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
630 | + | then $a | |
631 | + | else throw("List size exceeds 2") | |
632 | + | ||
633 | + | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) | |
634 | + | } :+ IntegerEntry(depositNumLastKEY, depositNumNew)) ++ DepositsTotalsEntries(amount, pmtAssetIdStr)) | |
635 | + | } | |
636 | + | } | |
637 | + | } | |
638 | + | else throw("Strict value is not equal to itself.") | |
639 | + | } | |
640 | + | ||
641 | + | ||
642 | + | ||
643 | + | @Callable(i) | |
644 | + | func claimRewards () = commonClaim(i.caller, i) | |
645 | + | ||
646 | + | ||
647 | + | ||
648 | + | @Callable(i) | |
649 | + | func claimRewardsByOriginCaller () = commonClaim(i.originCaller, i) | |
650 | + | ||
651 | + | ||
652 | + | ||
653 | + | @Callable(i) | |
654 | + | func unclaimedRewardsREADONLY (userAddressStr) = { | |
655 | + | func forEachAssetZeroReward (accum,asset) = ((accum + makeString([asset, "0", "0"], ":")) + "_") | |
656 | + | ||
657 | + | let unclaimedRewardStr = if ((userAddressStr == "")) | |
658 | + | then { | |
659 | + | let $l = supportedAssetsList | |
660 | + | let $s = size($l) | |
661 | + | let $acc0 = "" | |
662 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
663 | + | then $a | |
664 | + | else forEachAssetZeroReward($a, $l[$i]) | |
665 | + | ||
666 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
667 | + | then $a | |
668 | + | else throw("List size exceeds 2") | |
669 | + | ||
670 | + | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) | |
671 | + | } | |
672 | + | else { | |
673 | + | let userAddress = addressFromStringValue(userAddressStr) | |
674 | + | let $t02464624760 = valueOrElse(getUserParamsOrUnit(userAddressStr), $Tuple3(true, 0, 0)) | |
675 | + | let isNewUser = $t02464624760._1 | |
676 | + | let stakedAmount = $t02464624760._2 | |
677 | + | let stakingStartHeight = $t02464624760._3 | |
678 | + | let stakedAmountX = toBigInt(stakedAmount) | |
679 | + | let userRewardFromDepositNumKEY = keyUserRewardFromDepositNum(userAddressStr) | |
680 | + | let depositNumUser = getIntOrElse(userRewardFromDepositNumKEY, -1) | |
681 | + | let depositNumLast = getIntOrElse(keyDepositNumLast(), -1) | |
682 | + | func forEachAssetCalcUnclaimedReward (accum,asset) = { | |
683 | + | let $t02510625244 = calcReward(userAddressStr, asset, stakedAmountX, depositNumUser, depositNumLast) | |
684 | + | let rewardTotal = $t02510625244._1 | |
685 | + | let cached = $t02510625244._2 | |
686 | + | let dynamic = $t02510625244._3 | |
687 | + | let rewardCachedPartKEY = $t02510625244._4 | |
688 | + | let claimed = valueOrElse(getInteger(keyClaimed(userAddressStr, asset)), 0) | |
689 | + | ((accum + makeString([asset, toString(rewardTotal), toString(claimed)], ":")) + "_") | |
690 | + | } | |
691 | + | ||
692 | + | let $l = supportedAssetsList | |
693 | + | let $s = size($l) | |
694 | + | let $acc0 = "" | |
695 | + | func $f0_1 ($a,$i) = if (($i >= $s)) | |
696 | + | then $a | |
697 | + | else forEachAssetCalcUnclaimedReward($a, $l[$i]) | |
698 | + | ||
699 | + | func $f0_2 ($a,$i) = if (($i >= $s)) | |
700 | + | then $a | |
701 | + | else throw("List size exceeds 2") | |
702 | + | ||
703 | + | $f0_2($f0_1($f0_1($acc0, 0), 1), 2) | |
704 | + | } | |
705 | + | $Tuple2(nil, dropRight(unclaimedRewardStr, 1)) | |
706 | + | } | |
707 | + | ||
708 | + | ||
709 | + | ||
710 | + | @Callable(i) | |
711 | + | func usdnStakingSYSREADONLY (userAddressStrOrEmpty,usdnDiff) = { | |
712 | + | let usdnTotalAmtStaked = getIntOrElse(keyLockParamTotalAmount(), 0) | |
713 | + | if ((userAddressStrOrEmpty == "")) | |
714 | + | then $Tuple2(nil, [0, usdnTotalAmtStaked, 0]) | |
715 | + | else { | |
716 | + | let userAddress = toAddressOrFail(userAddressStrOrEmpty) | |
717 | + | let mergedData = mergeStake(userAddressStrOrEmpty, usdnDiff) | |
718 | + | let isNewUser = mergedData._1 | |
719 | + | let usdnStakedByUser = mergedData._2 | |
720 | + | let stakingStartHeight = mergedData._3 | |
721 | + | let stakedAmountNEW = mergedData._4 | |
722 | + | $Tuple2(nil, [usdnStakedByUser, usdnTotalAmtStaked]) | |
723 | + | } | |
724 | + | } | |
725 | + | ||
726 | + | ||
727 | + | ||
728 | + | @Callable(i) | |
729 | + | func configSYSREADONLY () = { | |
730 | + | let minLockAmt = getIntegerValue(keyMinLockAmount()) | |
731 | + | $Tuple2(nil, [minLockAmt]) | |
732 | + | } | |
733 | + | ||
734 | + | ||
735 | + | ||
736 | + | @Callable(i) | |
737 | + | func lockNeutrinoSP (receiver,share) = commonStake(i.caller, i, false) | |
738 | + | ||
739 | + | ||
740 | + | ||
741 | + | @Callable(i) | |
742 | + | func lockNeutrino () = commonStake(i.caller, i, false) | |
743 | + | ||
744 | + | ||
745 | + | ||
746 | + | @Callable(i) | |
747 | + | func unlockNeutrino (unlockAmount,assetIdString) = commonUnstake(unlockAmount, i, false) | |
748 | + | ||
749 | + | ||
750 | + | ||
751 | + | @Callable(i) | |
752 | + | func unlockNsbt (unlockAmount,assetIdString) = internalUnlock(NSBTTYPE, i, unlockAmount, assetIdString) | |
753 | + | ||
754 | + | ||
755 | + | @Verifier(tx) | |
756 | + | func verify () = { | |
757 | + | let pubKeyAdminsListStr = makeString(["9so3YELTNtXgo1ZXBB9NB9T6ufy6Jt3yUtfPyg11hV1v", "EYwZmURd5KKaQRBjsVa6g8DPisFoS6SovRJtFiL5gMHU", "DtmAfuDdCrHK8spdAeAYzq6MsZegeD9gnsrpuTRkCbVA", "9so3YELTNtXgo1ZXBB9NB9T6ufy6Jt3yUtfPyg11hV1v"], SEP) | |
758 | + | let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP) | |
759 | + | let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0]))) | |
760 | + | then 1 | |
761 | + | else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1]))) | |
762 | + | then 1 | |
763 | + | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2]))) | |
764 | + | then 1 | |
765 | + | else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3]))) | |
766 | + | then 2 | |
767 | + | else 0)) | |
768 | + | (count >= 3) | |
769 | + | } | |
770 | + |
github/deemru/w8io/169f3d6 37.47 ms ◑