tx · 6pFs9KvsXyVLXmfK7N3Bau6hWrRcxeq61qXApLprsThV

3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq:  -0.02000000 Waves

2023.07.21 15:55 [2675643] smart account 3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq > SELF 0.00000000 Waves

{ "type": 13, "id": "6pFs9KvsXyVLXmfK7N3Bau6hWrRcxeq61qXApLprsThV", "fee": 2000000, "feeAssetId": null, "timestamp": 1689944189016, "version": 2, "chainId": 84, "sender": "3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq", "senderPublicKey": "57SkjQUEwC1ayCqLbXLuzBqifK6B6SR6rfxtGsbAo3zW", "proofs": [ "2XAK9j63ZnAtUajG3GbUMiNYZvZ3kx4skycbkCvH2DbrpBfPVb2whEXUskuDPtE9TDCnRyPGXAiPu7QNMg7gNusf" ], "script": "base64:BgIfCAISAwoBARIAEgMKAQgSAwoBARIDCgEIEgASAwoBCC8ADGNvbnRyYWN0RmlsZQIQbXB0X3N0YWtpbmcucmlkZQADU0VQAgJfXwAGc2NhbGU4AIDC1y8AEkFERFJFU1NfQllURVNfU0laRQAaAA1CTE9DS1NfSU5fREFZAKALAQh0aHJvd0VycgEDbXNnCQACAQkArAICCQCsAgIFDGNvbnRyYWN0RmlsZQICOiAFA21zZwAKa2V5QXNzZXRJZAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SWQFA25pbAUDU0VQABNrZXlFbWlzc2lvblBlckJsb2NrCQC5CQIJAMwIAgICJXMJAMwIAgIQZW1pc3Npb25QZXJCbG9jawUDbmlsBQNTRVAAGWtleUVtaXNzaW9uUGVyaW9kSW5CbG9ja3MJALkJAgkAzAgCAgIlcwkAzAgCAhZlbWlzc2lvblBlcmlvZEluQmxvY2tzBQNuaWwFA1NFUAANa2V5U3RhcnRCbG9jawkAuQkCCQDMCAICAiVzCQDMCAICCnN0YXJ0QmxvY2sFA25pbAUDU0VQABBrZXlUb3RhbExwQW1vdW50CQC5CQ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1ZQEFEWFsbG93ZWRUeElkT3B0aW9uBQR0eElkBgkBCHRocm93RXJyAQkArAICBQR0eElkAhMgaXMgYWxyZWFkeSBhbGxvd2VkBQNuaWwDCQAAAgUDZXJyBQNlcnIJAQx2b3RlSU5URVJOQUwEBRNjYWxsZXJBZGRyZXNzU3RyaW5nBQlrZXlQcmVmaXgFBlFVT1JVTQUGcmVzdWx0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQIYnlBZG1pbnMJAAACCAUCdHgCaWQJANkEAQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQR0aGlzCQEOa2V5QWxsb3dlZFR4SWQAAgAEB2J5T3duZXIDCQBnAgkAkAMBCQENZ2V0QWRtaW5zTGlzdAAFBlFVT1JVTQcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkDBQhieUFkbWlucwYFB2J5T3duZXKK0ZJV", "height": 2675643, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hsg6jYUKLzTPdprb9HQy6se7vceLiAAMjJvCzGbJePSW Next: GNgVpsstBv7bavKTgTETGZYsy6cQaeSpTNXBXTYkAZgf Diff:
OldNewDifferences
186186 }
187187
188188
189-func debugDays () = {
189+func debugPeriod () = {
190190 let startBlock = valueOrElse(getInteger(this, keyStartBlock), 0)
191191 let startPeriod = fraction(startBlock, 1, emissionPeriodInBlocks)
192192 let elapsedPeriods = (heightInPeriods - startPeriod)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFile = "mpt_staking.ride"
55
66 let SEP = "__"
77
88 let scale8 = 100000000
99
1010 let ADDRESS_BYTES_SIZE = 26
1111
1212 let BLOCKS_IN_DAY = 1440
1313
1414 func throwErr (msg) = throw(((contractFile + ": ") + msg))
1515
1616
1717 let keyAssetId = makeString(["%s", "assetId"], SEP)
1818
1919 let keyEmissionPerBlock = makeString(["%s", "emissionPerBlock"], SEP)
2020
2121 let keyEmissionPeriodInBlocks = makeString(["%s", "emissionPeriodInBlocks"], SEP)
2222
2323 let keyStartBlock = makeString(["%s", "startBlock"], SEP)
2424
2525 let keyTotalLpAmount = makeString(["%s", "totalLpAmount"], SEP)
2626
2727 let keyTotalAssetAmount = makeString(["%s", "totalAssetAmount"], SEP)
2828
2929 func keyUserLpAmount (userAddress) = makeString(["%s%s", "userLpAmount", userAddress], SEP)
3030
3131
3232 func keyUserTotalAssetWithdrawn (userAddress) = makeString(["%s%s", "totalAssetWithdrawn", userAddress], SEP)
3333
3434
3535 func keyUserTotalAssetStaked (userAddress) = makeString(["%s%s", "totalAssetStaked", userAddress], SEP)
3636
3737
3838 let totalLpAmount = valueOrElse(getInteger(this, keyTotalLpAmount), 0)
3939
4040 let totalAssetAmount = valueOrElse(getInteger(this, keyTotalAssetAmount), 0)
4141
4242 let assetIdString = valueOrElse(getString(this, keyAssetId), "WAVES")
4343
4444 let assetIdBytes = if ((assetIdString == "WAVES"))
4545 then unit
4646 else fromBase58String(assetIdString)
4747
4848 let emissionPeriodInBlocks = valueOrElse(getInteger(this, keyEmissionPeriodInBlocks), BLOCKS_IN_DAY)
4949
5050 let emissionPerPeriod = (valueOrElse(getInteger(this, keyEmissionPerBlock), 0) * emissionPeriodInBlocks)
5151
5252 let heightInPeriods = fraction(height, 1, emissionPeriodInBlocks)
5353
5454 let ADMIN_LIST_SIZE = 5
5555
5656 let QUORUM = 3
5757
5858 let TXID_BYTES_LENGTH = 32
5959
6060 func keyAllowedTxIdVotePrefix (txId) = makeString(["%s%s%s", "allowTxId", txId], SEP)
6161
6262
6363 func keyFullAdminVote (prefix,adminAddress) = makeString([prefix, adminAddress], SEP)
6464
6565
6666 func keyAdminAddressList () = makeString(["%s", "adminAddressList"], SEP)
6767
6868
6969 func keyAllowedTxId () = makeString(["%s", "txId"], SEP)
7070
7171
7272 func getAdminVote (prefix,admin) = {
7373 let voteKey = keyFullAdminVote(prefix, admin)
7474 valueOrElse(getInteger(voteKey), 0)
7575 }
7676
7777
7878 func getAdminsList () = match getString(this, keyAdminAddressList()) {
7979 case s: String =>
8080 split(s, SEP)
8181 case _ =>
8282 nil
8383 }
8484
8585
8686 func isInAdminList (address) = containsElement(getAdminsList(), address)
8787
8888
8989 func genVotesKeysHelper (a,adminAddress) = {
9090 let $t026382662 = a
9191 let result = $t026382662._1
9292 let prefix = $t026382662._2
9393 $Tuple2((result :+ keyFullAdminVote(prefix, adminAddress)), prefix)
9494 }
9595
9696
9797 func genVotesKeys (keyPrefix) = {
9898 let adminList = keyAdminAddressList()
9999 let $t028092893 = {
100100 let $l = getAdminsList()
101101 let $s = size($l)
102102 let $acc0 = $Tuple2(nil, keyPrefix)
103103 func $f0_1 ($a,$i) = if (($i >= $s))
104104 then $a
105105 else genVotesKeysHelper($a, $l[$i])
106106
107107 func $f0_2 ($a,$i) = if (($i >= $s))
108108 then $a
109109 else throw("List size exceeds 5")
110110
111111 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
112112 }
113113 let result = $t028092893._1
114114 let prefix = $t028092893._2
115115 result
116116 }
117117
118118
119119 func countVotesHelper (result,voteKey) = (result + valueOrElse(getInteger(voteKey), 0))
120120
121121
122122 func countVotes (prefix) = {
123123 let votes = genVotesKeys(prefix)
124124 let $l = votes
125125 let $s = size($l)
126126 let $acc0 = 0
127127 func $f0_1 ($a,$i) = if (($i >= $s))
128128 then $a
129129 else countVotesHelper($a, $l[$i])
130130
131131 func $f0_2 ($a,$i) = if (($i >= $s))
132132 then $a
133133 else throw("List size exceeds 5")
134134
135135 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
136136 }
137137
138138
139139 func clearVotesHelper (result,key) = (result :+ DeleteEntry(key))
140140
141141
142142 func getClearVoteEntries (prefix) = {
143143 let votes = genVotesKeys(prefix)
144144 let $l = votes
145145 let $s = size($l)
146146 let $acc0 = nil
147147 func $f0_1 ($a,$i) = if (($i >= $s))
148148 then $a
149149 else clearVotesHelper($a, $l[$i])
150150
151151 func $f0_2 ($a,$i) = if (($i >= $s))
152152 then $a
153153 else throw("List size exceeds 5")
154154
155155 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
156156 }
157157
158158
159159 func voteINTERNAL (callerAddressString,keyPrefix,minVotes,voteResult) = {
160160 let voteKey = keyFullAdminVote(keyPrefix, callerAddressString)
161161 let adminCurrentVote = getAdminVote(keyPrefix, callerAddressString)
162162 let err = if (!(isInAdminList(callerAddressString)))
163163 then throwErr((("Address: " + callerAddressString) + " not in Admin list"))
164164 else if ((adminCurrentVote == 1))
165165 then throwErr((voteKey + " you already voted"))
166166 else unit
167167 if ((err == err))
168168 then {
169169 let votes = countVotes(keyPrefix)
170170 if (((votes + 1) >= minVotes))
171171 then {
172172 let clearVoteEntries = getClearVoteEntries(keyPrefix)
173173 (clearVoteEntries ++ voteResult)
174174 }
175175 else [IntegerEntry(voteKey, 1)]
176176 }
177177 else throw("Strict value is not equal to itself.")
178178 }
179179
180180
181181 func calcTotalProfit () = {
182182 let startBlock = valueOrElse(getInteger(this, keyStartBlock), 0)
183183 let startPeriod = fraction(startBlock, 1, emissionPeriodInBlocks)
184184 let elapsedPeriods = (heightInPeriods - startPeriod)
185185 max([0, (emissionPerPeriod * elapsedPeriods)])
186186 }
187187
188188
189-func debugDays () = {
189+func debugPeriod () = {
190190 let startBlock = valueOrElse(getInteger(this, keyStartBlock), 0)
191191 let startPeriod = fraction(startBlock, 1, emissionPeriodInBlocks)
192192 let elapsedPeriods = (heightInPeriods - startPeriod)
193193 $Tuple5(startPeriod, heightInPeriods, elapsedPeriods, startBlock, height)
194194 }
195195
196196
197197 func getTotalAssetAmountWithProfitOrMaxAvailable () = {
198198 let totalAssetAmountWithProfit = (totalAssetAmount + calcTotalProfit())
199199 let totalAmount = match assetIdBytes {
200200 case u: Unit =>
201201 min([totalAssetAmountWithProfit, wavesBalance(this).available])
202202 case b: ByteVector =>
203203 min([totalAssetAmountWithProfit, assetBalance(this, b)])
204204 case _ =>
205205 throw("Match error")
206206 }
207207 if ((totalLpAmount == 0))
208208 then 0
209209 else totalAmount
210210 }
211211
212212
213213 func getCurrentPrice () = if ((totalLpAmount != 0))
214214 then fraction(getTotalAssetAmountWithProfitOrMaxAvailable(), scale8, totalLpAmount)
215215 else (1 * scale8)
216216
217217
218218 func getUserLpAmount (userAddress) = valueOrElse(getInteger(this, keyUserLpAmount(userAddress)), 0)
219219
220220
221221 func getUserAvailableAssetsToWithdraw (userAddress) = {
222222 let userLpAmount = getUserLpAmount(userAddress)
223223 let userAvailableAssetToWithdraw = fraction(userLpAmount, getCurrentPrice(), scale8)
224224 if ((getCurrentPrice() > (userAvailableAssetToWithdraw * scale8)))
225225 then 0
226226 else userAvailableAssetToWithdraw
227227 }
228228
229229
230230 func getStakeActions (i,userAddress) = {
231231 let checks = [if ((size(i.payments) == 1))
232232 then true
233233 else throwErr("should include 1 payment"), if ((i.payments[0].assetId == assetIdBytes))
234234 then true
235235 else throwErr(("payment should be in " + assetIdString)), if ((i.payments[0].amount > 0))
236236 then true
237237 else "payment amount should be greater than 0"]
238238 if ((checks == checks))
239239 then {
240240 let paymentAmount = i.payments[0].amount
241241 let paymentLpAmount = fraction(paymentAmount, scale8, getCurrentPrice())
242242 let userLpAmount = getUserLpAmount(userAddress)
243243 let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0)
244244 let newTotalLpAmount = (totalLpAmount + paymentLpAmount)
245245 let newTotalAssetAmount = (totalAssetAmount + paymentAmount)
246246 let newUserLpAmount = (userLpAmount + paymentLpAmount)
247247 let newUserTotalStakedAmount = (userTotalStakedAmount + paymentAmount)
248248 let updateStartHeightAction = if ((totalLpAmount == 0))
249249 then [IntegerEntry(keyStartBlock, height)]
250250 else nil
251251 ([IntegerEntry(keyTotalLpAmount, newTotalLpAmount), IntegerEntry(keyTotalAssetAmount, newTotalAssetAmount), IntegerEntry(keyUserLpAmount(userAddress), newUserLpAmount), IntegerEntry(keyUserTotalAssetStaked(userAddress), newUserTotalStakedAmount)] ++ updateStartHeightAction)
252252 }
253253 else throw("Strict value is not equal to itself.")
254254 }
255255
256256
257257 func getWithdrawActions (i,lpAssetWithdrawAmount) = {
258258 let userAddress = toString(i.caller)
259259 let userLpAmount = getUserLpAmount(userAddress)
260260 let check = [if ((lpAssetWithdrawAmount > 0))
261261 then true
262262 else throwErr("LP amount should be more than 0"), if ((userLpAmount >= lpAssetWithdrawAmount))
263263 then true
264264 else throwErr((("cannot withdraw more than available LP (" + toString(userLpAmount)) + ")"))]
265265 if ((check == check))
266266 then {
267267 let newUserLpAmount = (userLpAmount - lpAssetWithdrawAmount)
268268 let withdrawAssetAmount = fraction(lpAssetWithdrawAmount, getCurrentPrice(), scale8)
269269 let newTotalLpAmount = (totalLpAmount - lpAssetWithdrawAmount)
270270 let newTotalAssetAmount = fraction(newTotalLpAmount, getCurrentPrice(), scale8)
271271 let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0)
272272 let newUserTotalAssetWithdrawn = (userTotalAssetWithdrawn + withdrawAssetAmount)
273273 [IntegerEntry(keyTotalLpAmount, newTotalLpAmount), IntegerEntry(keyTotalAssetAmount, newTotalAssetAmount), IntegerEntry(keyUserLpAmount(userAddress), newUserLpAmount), IntegerEntry(keyUserTotalAssetWithdrawn(userAddress), newUserTotalAssetWithdrawn), IntegerEntry(keyStartBlock, height), ScriptTransfer(i.caller, withdrawAssetAmount, assetIdBytes)]
274274 }
275275 else throw("Strict value is not equal to itself.")
276276 }
277277
278278
279279 @Callable(i)
280280 func setEmissionPerBlock (emissionPerBlock) = {
281281 let check = [if ((i.caller == this))
282282 then true
283283 else throwErr("permission denied")]
284284 if ((check == check))
285285 then [IntegerEntry(keyTotalAssetAmount, getTotalAssetAmountWithProfitOrMaxAvailable()), IntegerEntry(keyStartBlock, height), IntegerEntry(keyEmissionPerBlock, max([0, emissionPerBlock]))]
286286 else throw("Strict value is not equal to itself.")
287287 }
288288
289289
290290
291291 @Callable(i)
292292 func stake () = getStakeActions(i, toString(i.caller))
293293
294294
295295
296296 @Callable(i)
297297 func stakeFor (userAddress) = {
298298 let check = [if ((size(fromBase58String(userAddress)) == ADDRESS_BYTES_SIZE))
299299 then true
300300 else throwErr("address is not valid")]
301301 if ((check == check))
302302 then getStakeActions(i, userAddress)
303303 else throw("Strict value is not equal to itself.")
304304 }
305305
306306
307307
308308 @Callable(i)
309309 func withdraw (withdrawAssetAmount) = {
310310 let userAddress = toString(i.caller)
311311 let userLpAmount = getUserLpAmount(userAddress)
312312 let lpAmountToWithdraw = fraction(withdrawAssetAmount, scale8, getCurrentPrice())
313313 let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress)
314314 let check = [if ((withdrawAssetAmount > 0))
315315 then true
316316 else throwErr("withdraw amount should be more than 0"), if ((userAvailableAssetToWithdraw >= withdrawAssetAmount))
317317 then true
318318 else throwErr((("cannot withdraw more than available (" + toString(userAvailableAssetToWithdraw)) + ")"))]
319319 if ((check == check))
320320 then getWithdrawActions(i, lpAmountToWithdraw)
321321 else throw("Strict value is not equal to itself.")
322322 }
323323
324324
325325
326326 @Callable(i)
327327 func getUserAssetsREADONLY (userAddress) = {
328328 let userLpAmount = getUserLpAmount(userAddress)
329329 let userAvailableAssetToWithdraw = getUserAvailableAssetsToWithdraw(userAddress)
330330 let userTotalStakedAmount = valueOrElse(getInteger(this, keyUserTotalAssetStaked(userAddress)), 0)
331331 let userTotalAssetWithdrawn = valueOrElse(getInteger(this, keyUserTotalAssetWithdrawn(userAddress)), 0)
332332 $Tuple2(nil, $Tuple5(userLpAmount, userAvailableAssetToWithdraw, getCurrentPrice(), userTotalStakedAmount, userTotalAssetWithdrawn))
333333 }
334334
335335
336336
337337 @Callable(i)
338338 func getTotalAssetsREADONLY () = $Tuple2(nil, $Tuple3(totalLpAmount, getTotalAssetAmountWithProfitOrMaxAvailable(), getCurrentPrice()))
339339
340340
341341
342342 @Callable(i)
343343 func voteForTxId (txId) = {
344344 let callerAddressString = toBase58String(i.caller.bytes)
345345 let keyPrefix = keyAllowedTxIdVotePrefix(txId)
346346 let result = [StringEntry(keyAllowedTxId(), txId)]
347347 let allowedTxIdOption = getString(this, keyAllowedTxId())
348348 let err = [if ((size(fromBase58String(txId)) == TXID_BYTES_LENGTH))
349349 then true
350350 else throwErr((txId + " is not valid txId")), if (if ((allowedTxIdOption == unit))
351351 then true
352352 else (value(allowedTxIdOption) != txId))
353353 then true
354354 else throwErr((txId + " is already allowed"))]
355355 if ((err == err))
356356 then voteINTERNAL(callerAddressString, keyPrefix, QUORUM, result)
357357 else throw("Strict value is not equal to itself.")
358358 }
359359
360360
361361 @Verifier(tx)
362362 func verify () = {
363363 let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(this, keyAllowedTxId()), "")))
364364 let byOwner = if ((size(getAdminsList()) >= QUORUM))
365365 then false
366366 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
367367 if (byAdmins)
368368 then true
369369 else byOwner
370370 }
371371

github/deemru/w8io/169f3d6 
41.82 ms