tx · J4Grg3KAFzWz6BRLjFozgvfhG2DzZQtL8uo4HD7zLT8w

3N4yYqBkTUq1mDdHhvAd3St7spCbm84DytS:  -0.02200000 Waves

2023.11.29 12:53 [2864540] smart account 3N4yYqBkTUq1mDdHhvAd3St7spCbm84DytS > SELF 0.00000000 Waves

{ "type": 13, "id": "J4Grg3KAFzWz6BRLjFozgvfhG2DzZQtL8uo4HD7zLT8w", "fee": 2200000, "feeAssetId": null, "timestamp": 1701251617599, "version": 1, "sender": "3N4yYqBkTUq1mDdHhvAd3St7spCbm84DytS", "senderPublicKey": "8h7G4haeVwXKNHXNHsWkC1miUp5CQtk3WmpBKazQPxRh", "proofs": [ "4PgWm7G3nExG68UB2vxMwdEFcqz4PtyDhhtFmpRU893CCTi3CJL87XQUyHhULAQ4wgTq1TbqywV2qXNJe7WveDKJ" ], "script": "base64:BgI0CAISAwoBARIDCgEBEgASAwoBCBIDCgEBEgMKAQgSAwoBCBIECgIYERIDCgEIEgASAwoBCEAADGNvbnRyYWN0RmlsZQIRbDJtcF9zdGFraW5nLnJpZGUAA1NFUAICX18ABnNjYWxlOACAwtcvAAdzY2FsZTE4AICAkLu61q3wDQANc2NhbGUxOEJpZ0ludAkAtgIBBQdzY2FsZTE4ABJBRERSRVNTX0JZVEVTX1NJWkUAGgANQkxPQ0tTX0lOX0RBWQCgCwEIdGhyb3dFcnIBA21zZwkAAgEJAKwCAgkArAICBQxjb250cmFjdEZpbGUCAjogBQNtc2cACmtleUFzc2V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgdhc3NldElkBQNuaWwFA1NFUAATa2V5RW1pc3Npb25QZXJCbG9jawkAuQkCCQDMCAICAiVzCQDMCAICEGVtaXNzaW9uUGVyQmxvY2sFA25pbAUDU0VQABlrZXlFbWlzc2lvblBlcmlvZEluQmxvY2tzCQC5CQIJAMwIAgICJXMJAMwIAgIWZW1pc3Npb25QZXJpb2RJbkJsb2NrcwUDbmlsBQNTRVAADWtleVN0YXJ0QmxvY2sJALk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QHYnlPd25lcgMJAGcCCQCQAwEJAQ1nZXRBZG1pbnNMaXN0AAUGUVVPUlVNBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQMFCGJ5QWRtaW5zBgUHYnlPd25lct3wwDc=", "chainId": 84, "height": 2864540, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: PgAt8ZTB54Va2DyYPDnsX3TuK8ZfCa1xgqVCcgVRfhp Next: C535cxDyehEmG37nqYHoKcV4GDUjkKMxvz6SPyNuZYeX Diff:
OldNewDifferences
302302 if ((checks == checks))
303303 then {
304304 let paymentAmount = i.payments[0].amount
305- let paymentLpAmount = toInt(fraction(toBigInt(paymentAmount), scale18BigInt, getCurrentPrice()))
305+ let paymentLpAmount = calcLpFromAsset(paymentAmount)
306306 let userLpAmount = getUserLpAmount(userAddress)
307307 let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0)
308308 let newTotalLpAmount = (totalLpAmount + paymentLpAmount)
309- let newTotalAssetAmount = toInt(fraction(toBigInt(newTotalLpAmount), getCurrentPrice(), scale18BigInt))
309+ let newTotalAssetAmount = calcAssetFromLp(newTotalLpAmount)
310310 let newUserLpAmount = (userLpAmount + paymentLpAmount)
311311 let newUserTotalStakedAmount = (userTotalStakedAmount + paymentAmount)
312312 [StringEntry(keyHistory("stake", userAddress, i.transactionId), formatHistory(calcTotalProfit(), getCurrentPrice(), totalLpAmount, totalAssetAmount)), IntegerEntry(keyTotalLpAmount, newTotalLpAmount), IntegerEntry(keyTotalAssetAmount, newTotalAssetAmount), IntegerEntry(keyUserLpAmount(userAddress), newUserLpAmount), IntegerEntry(keyUserTotalAssetStaked(userAddress), newUserTotalStakedAmount), IntegerEntry(keyStartBlock, height)]
326326 if ((check == check))
327327 then {
328328 let newUserLpAmount = (userLpAmount - lpAssetWithdrawAmount)
329- let withdrawAssetAmount = toInt(fraction(toBigInt(lpAssetWithdrawAmount), getCurrentPrice(), scale18BigInt))
329+ let withdrawAssetAmount = calcAssetFromLp(lpAssetWithdrawAmount)
330330 let newTotalLpAmount = (totalLpAmount - lpAssetWithdrawAmount)
331- let newTotalAssetAmount = toInt(fraction(toBigInt(newTotalLpAmount), getCurrentPrice(), scale18BigInt))
331+ let newTotalAssetAmount = calcAssetFromLp(newTotalLpAmount)
332332 let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0)
333333 let newUserTotalAssetWithdrawn = (userTotalAssetWithdrawn + withdrawAssetAmount)
334334 [StringEntry(keyHistory("withdraw", userAddress, i.transactionId), formatHistory(calcTotalProfit(), getCurrentPrice(), totalLpAmount, totalAssetAmount)), IntegerEntry(keyTotalLpAmount, newTotalLpAmount), IntegerEntry(keyTotalAssetAmount, newTotalAssetAmount), IntegerEntry(keyUserLpAmount(userAddress), newUserLpAmount), IntegerEntry(keyUserTotalAssetWithdrawn(userAddress), newUserTotalAssetWithdrawn), IntegerEntry(keyStartBlock, height), ScriptTransfer(i.caller, withdrawAssetAmount, assetIdBytes)]
392392 func withdraw (withdrawAssetAmount) = {
393393 let userAddress = toString(i.caller)
394394 let userLpAmount = getUserLpAmount(userAddress)
395- let lpAmountToWithdraw = toInt(fraction(toBigInt(withdrawAssetAmount), scale18BigInt, getCurrentPrice()))
395+ let lpAmountToWithdraw = calcLpFromAsset(withdrawAssetAmount)
396396 let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress)
397397 let minWithdrawAssetAmount = toInt(fraction(getCurrentPrice(), toBigInt(1), scale18BigInt, CEILING))
398398 let check = [if ((withdrawAssetAmount > 0))
457457 if ((check == check))
458458 then {
459459 func getAirdropStateChanges (accum,assetAmount) = {
460- let $t01449114527 = accum
461- let result = $t01449114527._1
462- let index = $t01449114527._2
463- let totalLp = $t01449114527._3
460+ let $t01426114297 = accum
461+ let result = $t01426114297._1
462+ let index = $t01426114297._2
463+ let totalLp = $t01426114297._3
464464 let addedLpAmount = calcLpFromAsset(assetAmount)
465465 let userLockedLpKey = keyUserLockedLpAmount(addressList[index])
466466 let oldLpAmount = valueOrElse(getInteger(this, userLockedLpKey), 0)
467467 $Tuple3((result :+ IntegerEntry(userLockedLpKey, (oldLpAmount + addedLpAmount))), (index + 1), (totalLp + addedLpAmount))
468468 }
469469
470- let $t01485814967 = {
470+ let $t01462814737 = {
471471 let $l = amountList
472472 let $s = size($l)
473473 let $acc0 = $Tuple3(nil, 0, 0)
481481
482482 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90)
483483 }
484- let airdropEntries = $t01485814967._1
485- let _a = $t01485814967._2
486- let addedTotalLockedLpAmount = $t01485814967._3
487- ([IntegerEntry(keyTotalLockedLpAmount, (totalLockedLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalLpAmount, (totalLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalAssetAmount, (totalAssetAmount + amountListSum))] ++ airdropEntries)
484+ let airdropEntries = $t01462814737._1
485+ let _a = $t01462814737._2
486+ let addedTotalLockedLpAmount = $t01462814737._3
487+ let newTotalAsset = calcAssetFromLp((totalLpAmount + addedTotalLockedLpAmount))
488+ ([IntegerEntry(keyTotalLockedLpAmount, (totalLockedLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalLpAmount, (totalLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalAssetAmount, newTotalAsset), IntegerEntry(keyStartBlock, height)] ++ airdropEntries)
488489 }
489490 else throw("Strict value is not equal to itself.")
490491 }
499500 let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress)
500501 let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0)
501502 let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0)
502- let $t01615516247 = getUserStakingNodesData(userAddress)
503- let userStakingNodesList = $t01615516247._1
504- let userStakingNodeSharesList = $t01615516247._2
505- $Tuple2(nil, $Tuple9(userLpAmount, userAvailableAssetToWithdraw, getCurrentPrice(), userTotalStakedAmount, userTotalAssetWithdrawn, userLockedLpAmount, userLockedAssetAmount, userStakingNodesList, userStakingNodeSharesList))
503+ let $t01608716179 = getUserStakingNodesData(userAddress)
504+ let userStakingNodesList = $t01608716179._1
505+ let userStakingNodeSharesList = $t01608716179._2
506+ $Tuple2(nil, $Tuple10(userLpAmount, userAvailableAssetToWithdraw, getCurrentPrice(), userTotalStakedAmount, userTotalAssetWithdrawn, userLockedLpAmount, userLockedAssetAmount, userStakingNodesList, userStakingNodeSharesList, getRemainingBlocks()))
506507 }
507508
508509
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFile = "l2mp_staking.ride"
55
66 let SEP = "__"
77
88 let scale8 = 100000000
99
1010 let scale18 = 1000000000000000000
1111
1212 let scale18BigInt = toBigInt(scale18)
1313
1414 let ADDRESS_BYTES_SIZE = 26
1515
1616 let BLOCKS_IN_DAY = 1440
1717
1818 func throwErr (msg) = throw(((contractFile + ": ") + msg))
1919
2020
2121 let keyAssetId = makeString(["%s", "assetId"], SEP)
2222
2323 let keyEmissionPerBlock = makeString(["%s", "emissionPerBlock"], SEP)
2424
2525 let keyEmissionPeriodInBlocks = makeString(["%s", "emissionPeriodInBlocks"], SEP)
2626
2727 let keyStartBlock = makeString(["%s", "startBlock"], SEP)
2828
2929 let keyTotalLpAmount = makeString(["%s", "totalLpAmount"], SEP)
3030
3131 let keyTotalAssetAmount = makeString(["%s", "totalAssetAmount"], SEP)
3232
3333 let keyTotalLockedLpAmount = makeString(["%s", "totalLockedLpAmount"], SEP)
3434
3535 func keyUserLpAmount (userAddress) = makeString(["%s%s", "userLpAmount", userAddress], SEP)
3636
3737
3838 func keyUserLockedLpAmount (userAddress) = makeString(["%s%s", "userLockedLpAmount", userAddress], SEP)
3939
4040
4141 func keyUserStakingNodes (userAddress) = makeString(["%s%s", "userStakingNodes", userAddress], SEP)
4242
4343
4444 func keyUserStakingNodesShares (userAddress) = makeString(["%s%s", "userStakingNodesShares", userAddress], SEP)
4545
4646
4747 func keyUserTotalAssetWithdrawn (userAddress) = makeString(["%s%s", "totalAssetWithdrawn", userAddress], SEP)
4848
4949
5050 func keyUserTotalAssetStaked (userAddress) = makeString(["%s%s", "totalAssetStaked", userAddress], SEP)
5151
5252
5353 func keyHistory (type,userAddress,txId) = makeString(["%s%s%s", type, userAddress, toBase58String(txId)], SEP)
5454
5555
5656 func formatHistory (totalProfit,price,totalAssetAmount,totalLpAmount) = makeString(["%d%d%d%d", toString(totalProfit), toString(price), toString(totalAssetAmount), toString(totalLpAmount)], SEP)
5757
5858
5959 let totalLpAmount = valueOrElse(getInteger(this, keyTotalLpAmount), 0)
6060
6161 let totalAssetAmount = valueOrElse(getInteger(this, keyTotalAssetAmount), 0)
6262
6363 let totalLockedLpAmount = valueOrElse(getInteger(this, keyTotalLockedLpAmount), 0)
6464
6565 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
6666
6767 let assetIdBytes = if ((assetIdString == "WAVES"))
6868 then unit
6969 else fromBase58String(assetIdString)
7070
7171 let emissionPeriodInBlocks = valueOrElse(getInteger(this, keyEmissionPeriodInBlocks), BLOCKS_IN_DAY)
7272
7373 let emissionPerBlock = valueOrElse(getInteger(this, keyEmissionPerBlock), 0)
7474
7575 let emissionPerPeriod = (emissionPerBlock * emissionPeriodInBlocks)
7676
7777 let ADMIN_LIST_SIZE = 5
7878
7979 let QUORUM = 3
8080
8181 let TXID_BYTES_LENGTH = 32
8282
8383 func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP)
8484
8585
8686 func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP)
8787
8888
8989 func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP)
9090
9191
9292 func keyAllowedTxId () = makeString(["%s", "txId"], SEP)
9393
9494
9595 func getAdminVote (prefix,admin) = {
9696 let voteKey = keyFullAdminVote(prefix, admin)
9797 valueOrElse(getInteger(voteKey), 0)
9898 }
9999
100100
101101 func getAdminsList () = match getString(this, keyAdminAddressList()) {
102102 case s: String =>
103103 split(s, SEP)
104104 case _ =>
105105 nil
106106 }
107107
108108
109109 func isInAdminList (address) = containsElement(getAdminsList(), address)
110110
111111
112112 func genVotesKeysHelper (a,adminAddress) = {
113113 let $t035953619 = a
114114 let result = $t035953619._1
115115 let prefix = $t035953619._2
116116 $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
117117 }
118118
119119
120120 func genVotesKeys (keyPrefix) = {
121121 let adminList = keyAdminAddressList()
122122 let $t037663850 = {
123123 let $l = getAdminsList()
124124 let $s = size($l)
125125 let $acc0 = $Tuple2(nil, keyPrefix)
126126 func $f0_1 ($a,$i) = if (($i >= $s))
127127 then $a
128128 else genVotesKeysHelper($a, $l[$i])
129129
130130 func $f0_2 ($a,$i) = if (($i >= $s))
131131 then $a
132132 else throw("List size exceeds 5")
133133
134134 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
135135 }
136136 let result = $t037663850._1
137137 let prefix = $t037663850._2
138138 result
139139 }
140140
141141
142142 func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0))
143143
144144
145145 func countVotes (prefix) = {
146146 let votes = genVotesKeys(prefix)
147147 let $l = votes
148148 let $s = size($l)
149149 let $acc0 = 0
150150 func $f0_1 ($a,$i) = if (($i >= $s))
151151 then $a
152152 else countVotesHelper($a, $l[$i])
153153
154154 func $f0_2 ($a,$i) = if (($i >= $s))
155155 then $a
156156 else throw("List size exceeds 5")
157157
158158 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
159159 }
160160
161161
162162 func clearVotesHelper (result,key) = (result :+ DeleteEntry(key))
163163
164164
165165 func getClearVoteEntries (prefix) = {
166166 let votes = genVotesKeys(prefix)
167167 let $l = votes
168168 let $s = size($l)
169169 let $acc0 = nil
170170 func $f0_1 ($a,$i) = if (($i >= $s))
171171 then $a
172172 else clearVotesHelper($a, $l[$i])
173173
174174 func $f0_2 ($a,$i) = if (($i >= $s))
175175 then $a
176176 else throw("List size exceeds 5")
177177
178178 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
179179 }
180180
181181
182182 func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = {
183183 let voteKey = keyFullAdminVote(keyPrefix, callerAddressString)
184184 let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString)
185185 let err = if (!(isInAdminList(callerAddressString)))
186186 then throwErr((("Address: " + callerAddressString) + " not in Admin list"))
187187 else if ((adminCurrentVote == 1))
188188 then throwErr((voteKey + " you already voted"))
189189 else unit
190190 if ((err == err))
191191 then {
192192 let votes = countVotes(keyPrefix)
193193 if (((votes + 1) >= minVotes))
194194 then {
195195 let clearVoteEntries = getClearVoteEntries(keyPrefix)
196196 (clearVoteEntries ++ voteResult)
197197 }
198198 else [IntegerEntry(voteKey, 1)]
199199 }
200200 else throw("Strict value is not equal to itself.")
201201 }
202202
203203
204204 func stringListToIntListHelper (acc,value) = (acc :+ parseIntValue(value))
205205
206206
207207 func calcTotalProfitForHeight (h) = {
208208 let startBlock = valueOrElse(getInteger(this, keyStartBlock), height)
209209 let startPeriod = fraction(startBlock, 1, emissionPeriodInBlocks)
210210 let elapsedPeriods = ((h / emissionPeriodInBlocks) - startPeriod)
211211 max([0, (emissionPerPeriod * elapsedPeriods)])
212212 }
213213
214214
215215 func calcTotalProfit () = calcTotalProfitForHeight(height)
216216
217217
218218 func getMaxAssetAvailable () = match assetIdBytes {
219219 case u: Unit =>
220220 wavesBalance(this).available
221221 case b: ByteVector =>
222222 assetBalance(this, b)
223223 case _ =>
224224 throw("Match error")
225225 }
226226
227227
228228 func getTotalAssetAmountWithProfitOrMaxAvailable () = {
229229 let totalAssetAmountWithProfit = (totalAssetAmount + calcTotalProfit())
230230 let totalAmount = min([totalAssetAmountWithProfit, getMaxAssetAvailable()])
231231 if ((totalLpAmount == 0))
232232 then 0
233233 else totalAmount
234234 }
235235
236236
237237 func getCurrentPrice () = if ((totalLpAmount != 0))
238238 then fraction(toBigInt(getTotalAssetAmountWithProfitOrMaxAvailable()), scale18BigInt, toBigInt(totalLpAmount))
239239 else scale18BigInt
240240
241241
242242 func getRemainingBlocks () = if ((emissionPerBlock == 0))
243243 then 0
244244 else fraction((getMaxAssetAvailable() - getTotalAssetAmountWithProfitOrMaxAvailable()), 1, emissionPerBlock)
245245
246246
247247 func getUserStakingNodesData (userAddress) = {
248248 let nodesRaw = valueOrElse(getString(this, keyUserStakingNodes(userAddress)), "")
249249 let sharesRaw = valueOrElse(getString(this, keyUserStakingNodesShares(userAddress)), "")
250250 let nodesList = if ((nodesRaw == ""))
251251 then nil
252252 else split(nodesRaw, SEP)
253253 let sharesStringList = if ((sharesRaw == ""))
254254 then nil
255255 else split(sharesRaw, SEP)
256256 let sharesList = {
257257 let $l = sharesStringList
258258 let $s = size($l)
259259 let $acc0 = nil
260260 func $f0_1 ($a,$i) = if (($i >= $s))
261261 then $a
262262 else stringListToIntListHelper($a, $l[$i])
263263
264264 func $f0_2 ($a,$i) = if (($i >= $s))
265265 then $a
266266 else throw("List size exceeds 20")
267267
268268 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
269269 }
270270 $Tuple2(nodesList, sharesList)
271271 }
272272
273273
274274 func calcAssetFromLp (lpAmount) = max([0, toInt(fraction(toBigInt(lpAmount), getCurrentPrice(), scale18BigInt))])
275275
276276
277277 func calcLpFromAsset (assetAmount) = max([0, toInt(fraction(toBigInt(assetAmount), scale18BigInt, getCurrentPrice()))])
278278
279279
280280 func getUserLpAmount (userAddress) = valueOrElse(getInteger(this, keyUserLpAmount(userAddress)), 0)
281281
282282
283283 func getUserLockedLpAmount (userAddress) = valueOrElse(getInteger(this, keyUserLockedLpAmount(userAddress)), 0)
284284
285285
286286 func getUserAvailableAssetsToWithdraw (userAddress) = {
287287 let userLpAmount = getUserLpAmount(userAddress)
288288 calcAssetFromLp(userLpAmount)
289289 }
290290
291291
292292 func getStakeActions (i,userAddress) = {
293293 let checks = [if ((size(i.payments) == 1))
294294 then true
295295 else throwErr("should include 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
296296 then true
297297 else throwErr(("payment should be in " + assetIdString)), if ((i.payments[0].amount > 0))
298298 then true
299299 else "payment amount should be greater than 0", if ((size(fromBase58String(userAddress)) == ADDRESS_BYTES_SIZE))
300300 then true
301301 else throwErr("user address is not valid")]
302302 if ((checks == checks))
303303 then {
304304 let paymentAmount = i.payments[0].amount
305- let paymentLpAmount = toInt(fraction(toBigInt(paymentAmount), scale18BigInt, getCurrentPrice()))
305+ let paymentLpAmount = calcLpFromAsset(paymentAmount)
306306 let userLpAmount = getUserLpAmount(userAddress)
307307 let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0)
308308 let newTotalLpAmount = (totalLpAmount + paymentLpAmount)
309- let newTotalAssetAmount = toInt(fraction(toBigInt(newTotalLpAmount), getCurrentPrice(), scale18BigInt))
309+ let newTotalAssetAmount = calcAssetFromLp(newTotalLpAmount)
310310 let newUserLpAmount = (userLpAmount + paymentLpAmount)
311311 let newUserTotalStakedAmount = (userTotalStakedAmount + paymentAmount)
312312 [StringEntry(keyHistory("stake", userAddress, i.transactionId), formatHistory(calcTotalProfit(), getCurrentPrice(), totalLpAmount, totalAssetAmount)), IntegerEntry(keyTotalLpAmount, newTotalLpAmount), IntegerEntry(keyTotalAssetAmount, newTotalAssetAmount), IntegerEntry(keyUserLpAmount(userAddress), newUserLpAmount), IntegerEntry(keyUserTotalAssetStaked(userAddress), newUserTotalStakedAmount), IntegerEntry(keyStartBlock, height)]
313313 }
314314 else throw("Strict value is not equal to itself.")
315315 }
316316
317317
318318 func getWithdrawActions (i,lpAssetWithdrawAmount) = {
319319 let userAddress = toString(i.caller)
320320 let userLpAmount = getUserLpAmount(userAddress)
321321 let check = [if ((lpAssetWithdrawAmount > 0))
322322 then true
323323 else throwErr("LP amount should be more than 0"), if ((userLpAmount >= lpAssetWithdrawAmount))
324324 then true
325325 else throwErr((("cannot withdraw more than available LP (" + toString(userLpAmount)) + ")"))]
326326 if ((check == check))
327327 then {
328328 let newUserLpAmount = (userLpAmount - lpAssetWithdrawAmount)
329- let withdrawAssetAmount = toInt(fraction(toBigInt(lpAssetWithdrawAmount), getCurrentPrice(), scale18BigInt))
329+ let withdrawAssetAmount = calcAssetFromLp(lpAssetWithdrawAmount)
330330 let newTotalLpAmount = (totalLpAmount - lpAssetWithdrawAmount)
331- let newTotalAssetAmount = toInt(fraction(toBigInt(newTotalLpAmount), getCurrentPrice(), scale18BigInt))
331+ let newTotalAssetAmount = calcAssetFromLp(newTotalLpAmount)
332332 let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0)
333333 let newUserTotalAssetWithdrawn = (userTotalAssetWithdrawn + withdrawAssetAmount)
334334 [StringEntry(keyHistory("withdraw", userAddress, i.transactionId), formatHistory(calcTotalProfit(), getCurrentPrice(), totalLpAmount, totalAssetAmount)), IntegerEntry(keyTotalLpAmount, newTotalLpAmount), IntegerEntry(keyTotalAssetAmount, newTotalAssetAmount), IntegerEntry(keyUserLpAmount(userAddress), newUserLpAmount), IntegerEntry(keyUserTotalAssetWithdrawn(userAddress), newUserTotalAssetWithdrawn), IntegerEntry(keyStartBlock, height), ScriptTransfer(i.caller, withdrawAssetAmount, assetIdBytes)]
335335 }
336336 else throw("Strict value is not equal to itself.")
337337 }
338338
339339
340340 func getSetStakingNodeActions (userAddress,nodeAddress,nodeShare) = {
341341 let check = [if ((size(fromBase58String(userAddress)) == ADDRESS_BYTES_SIZE))
342342 then true
343343 else throwErr("user address is not valid"), if ((size(fromBase58String(nodeAddress)) == ADDRESS_BYTES_SIZE))
344344 then true
345345 else throwErr("node address is not valid")]
346346 if ((check == check))
347347 then [StringEntry(keyUserStakingNodes(userAddress), nodeAddress), StringEntry(keyUserStakingNodesShares(userAddress), toString(nodeShare))]
348348 else throw("Strict value is not equal to itself.")
349349 }
350350
351351
352352 @Callable(i)
353353 func setEmissionPerBlock (emissionPerBlock) = {
354354 let check = [if ((i.caller == this))
355355 then true
356356 else throwErr("permission denied")]
357357 if ((check == check))
358358 then [IntegerEntry(keyTotalAssetAmount, getTotalAssetAmountWithProfitOrMaxAvailable()), IntegerEntry(keyStartBlock, height), IntegerEntry(keyEmissionPerBlock, max([0, emissionPerBlock]))]
359359 else throw("Strict value is not equal to itself.")
360360 }
361361
362362
363363
364364 @Callable(i)
365365 func setEmissionPeriodInBlocks (p) = {
366366 let check = [if ((p > 0))
367367 then true
368368 else throwErr("emission period should be greater than 0"), if ((i.caller == this))
369369 then true
370370 else throwErr("permission denied")]
371371 if ((check == check))
372372 then [IntegerEntry(keyTotalAssetAmount, getTotalAssetAmountWithProfitOrMaxAvailable()), IntegerEntry(keyStartBlock, height), IntegerEntry(keyEmissionPeriodInBlocks, p)]
373373 else throw("Strict value is not equal to itself.")
374374 }
375375
376376
377377
378378 @Callable(i)
379379 func stake () = {
380380 let userAddress = toString(i.caller)
381381 getStakeActions(i, userAddress)
382382 }
383383
384384
385385
386386 @Callable(i)
387387 func stakeFor (userAddress) = getStakeActions(i, userAddress)
388388
389389
390390
391391 @Callable(i)
392392 func withdraw (withdrawAssetAmount) = {
393393 let userAddress = toString(i.caller)
394394 let userLpAmount = getUserLpAmount(userAddress)
395- let lpAmountToWithdraw = toInt(fraction(toBigInt(withdrawAssetAmount), scale18BigInt, getCurrentPrice()))
395+ let lpAmountToWithdraw = calcLpFromAsset(withdrawAssetAmount)
396396 let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress)
397397 let minWithdrawAssetAmount = toInt(fraction(getCurrentPrice(), toBigInt(1), scale18BigInt, CEILING))
398398 let check = [if ((withdrawAssetAmount > 0))
399399 then true
400400 else throwErr("withdraw amount should be more than 0"), if ((userAvailableAssetToWithdraw >= withdrawAssetAmount))
401401 then true
402402 else throwErr((("cannot withdraw more than available (" + toString(userAvailableAssetToWithdraw)) + ")")), if ((withdrawAssetAmount >= minWithdrawAssetAmount))
403403 then true
404404 else throwErr((("withdraw amount is too small. Min: (" + toString(minWithdrawAssetAmount)) + ")"))]
405405 if ((check == check))
406406 then getWithdrawActions(i, min([userLpAmount, (lpAmountToWithdraw + 1)]))
407407 else throw("Strict value is not equal to itself.")
408408 }
409409
410410
411411
412412 @Callable(i)
413413 func setStakingNode (nodeAddress) = {
414414 let userAddress = toString(i.caller)
415415 getSetStakingNodeActions(userAddress, nodeAddress, 100)
416416 }
417417
418418
419419
420420 @Callable(i)
421421 func stakeAndSetStakingNode (nodeAddress) = {
422422 let userAddress = toString(i.caller)
423423 (getStakeActions(i, userAddress) ++ getSetStakingNodeActions(userAddress, nodeAddress, 100))
424424 }
425425
426426
427427
428428 @Callable(i)
429429 func airdrop (addressList,amountList) = {
430430 func sum (accum,next) = (accum + next)
431431
432432 let amountListSum = {
433433 let $l = amountList
434434 let $s = size($l)
435435 let $acc0 = 0
436436 func $f0_1 ($a,$i) = if (($i >= $s))
437437 then $a
438438 else sum($a, $l[$i])
439439
440440 func $f0_2 ($a,$i) = if (($i >= $s))
441441 then $a
442442 else throw("List size exceeds 90")
443443
444444 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90)
445445 }
446446 let check = [if ((size(i.payments) == 1))
447447 then true
448448 else throwErr("should include 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
449449 then true
450450 else throwErr(("payment should be in " + assetIdString)), if ((i.payments[0].amount > 0))
451451 then true
452452 else "payment amount should be greater than 0", if ((size(addressList) == size(amountList)))
453453 then true
454454 else throwErr("addressList should be same size as amountList"), if ((i.payments[0].amount >= amountListSum))
455455 then true
456456 else throwErr("payment amount is less than sum of amountList")]
457457 if ((check == check))
458458 then {
459459 func getAirdropStateChanges (accum,assetAmount) = {
460- let $t01449114527 = accum
461- let result = $t01449114527._1
462- let index = $t01449114527._2
463- let totalLp = $t01449114527._3
460+ let $t01426114297 = accum
461+ let result = $t01426114297._1
462+ let index = $t01426114297._2
463+ let totalLp = $t01426114297._3
464464 let addedLpAmount = calcLpFromAsset(assetAmount)
465465 let userLockedLpKey = keyUserLockedLpAmount(addressList[index])
466466 let oldLpAmount = valueOrElse(getInteger(this, userLockedLpKey), 0)
467467 $Tuple3((result :+ IntegerEntry(userLockedLpKey, (oldLpAmount + addedLpAmount))), (index + 1), (totalLp + addedLpAmount))
468468 }
469469
470- let $t01485814967 = {
470+ let $t01462814737 = {
471471 let $l = amountList
472472 let $s = size($l)
473473 let $acc0 = $Tuple3(nil, 0, 0)
474474 func $f1_1 ($a,$i) = if (($i >= $s))
475475 then $a
476476 else getAirdropStateChanges($a, $l[$i])
477477
478478 func $f1_2 ($a,$i) = if (($i >= $s))
479479 then $a
480480 else throw("List size exceeds 90")
481481
482482 $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90)
483483 }
484- let airdropEntries = $t01485814967._1
485- let _a = $t01485814967._2
486- let addedTotalLockedLpAmount = $t01485814967._3
487- ([IntegerEntry(keyTotalLockedLpAmount, (totalLockedLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalLpAmount, (totalLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalAssetAmount, (totalAssetAmount + amountListSum))] ++ airdropEntries)
484+ let airdropEntries = $t01462814737._1
485+ let _a = $t01462814737._2
486+ let addedTotalLockedLpAmount = $t01462814737._3
487+ let newTotalAsset = calcAssetFromLp((totalLpAmount + addedTotalLockedLpAmount))
488+ ([IntegerEntry(keyTotalLockedLpAmount, (totalLockedLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalLpAmount, (totalLpAmount + addedTotalLockedLpAmount)), IntegerEntry(keyTotalAssetAmount, newTotalAsset), IntegerEntry(keyStartBlock, height)] ++ airdropEntries)
488489 }
489490 else throw("Strict value is not equal to itself.")
490491 }
491492
492493
493494
494495 @Callable(i)
495496 func getUserAssetsREADONLY (userAddress) = {
496497 let userLpAmount = getUserLpAmount(userAddress)
497498 let userLockedLpAmount = getUserLockedLpAmount(userAddress)
498499 let userLockedAssetAmount = calcAssetFromLp(userLockedLpAmount)
499500 let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress)
500501 let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0)
501502 let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0)
502- let $t01615516247 = getUserStakingNodesData(userAddress)
503- let userStakingNodesList = $t01615516247._1
504- let userStakingNodeSharesList = $t01615516247._2
505- $Tuple2(nil, $Tuple9(userLpAmount, userAvailableAssetToWithdraw, getCurrentPrice(), userTotalStakedAmount, userTotalAssetWithdrawn, userLockedLpAmount, userLockedAssetAmount, userStakingNodesList, userStakingNodeSharesList))
503+ let $t01608716179 = getUserStakingNodesData(userAddress)
504+ let userStakingNodesList = $t01608716179._1
505+ let userStakingNodeSharesList = $t01608716179._2
506+ $Tuple2(nil, $Tuple10(userLpAmount, userAvailableAssetToWithdraw, getCurrentPrice(), userTotalStakedAmount, userTotalAssetWithdrawn, userLockedLpAmount, userLockedAssetAmount, userStakingNodesList, userStakingNodeSharesList, getRemainingBlocks()))
506507 }
507508
508509
509510
510511 @Callable(i)
511512 func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple6(totalLpAmount, getTotalAssetAmountWithProfitOrMaxAvailable(), getCurrentPrice(), totalLockedLpAmount, calcAssetFromLp(totalLockedLpAmount), getRemainingBlocks()))
512513
513514
514515
515516 @Callable(i)
516517 func voteForTxId (txId) = {
517518 let callerAddressString = toBase58String(i.caller.bytes)
518519 let keyPrefix = keyAllowedTxIdVotePrefix(txId)
519520 let result = [StringEntry(keyAllowedTxId(), txId)]
520521 let allowedTxIdOption = getString(this, keyAllowedTxId())
521522 let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH))
522523 then true
523524 else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit))
524525 then true
525526 else (value(allowedTxIdOption) != txId))
526527 then true
527528 else throwErr((txId + " is already allowed"))]
528529 if ((err == err))
529530 then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result)
530531 else throw("Strict value is not equal to itself.")
531532 }
532533
533534
534535 @Verifier(tx)
535536 func verify () = {
536537 let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), "")))
537538 let byOwner = if ((size(getAdminsList()) >= QUORUM))
538539 then false
539540 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
540541 if (byAdmins)
541542 then true
542543 else byOwner
543544 }
544545

github/deemru/w8io/026f985 
68.82 ms