tx · 4nXj1QNCDqkbazwVwiK3g7BYJAx814Jmx574L4dBXxa9

3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37:  -0.02700000 Waves

2024.07.09 15:51 [3186503] smart account 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37 > SELF 0.00000000 Waves

{ "type": 13, "id": "4nXj1QNCDqkbazwVwiK3g7BYJAx814Jmx574L4dBXxa9", "fee": 2700000, "feeAssetId": null, "timestamp": 1720529526507, "version": 1, "sender": "3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37", "senderPublicKey": "vmMXxwQAMUAoisvL193ptPiTtaWQqL5YNu2zs1ouTbY", "proofs": [ "27RVpTiAQHs8PuHxU4nKJRp4GR9ATCYBKzUFwMTiHAeeQY6236PpCUNPAMdNBpik6WiqKMZBocQ6GR1sua3BjJJR" ], "script": "base64:BwJJCAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGFoACXNlcGFyYXRvcgICX18AB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRXAQFXABBjb250cmFjdEZpbGVuYW1lAhdmdXR1cmVzX2NhbGN1bGF0b3IucmlkZQAFbXVsdDgAgMLXLwAMbXVsdDE4QmlnSW50CQC2AgEAgICQu7rWrfANAA13YXZlc0RlY2ltYWxzAAgADHVzZHREZWNpbWFscwAGAAt3YXZlc1N0cmluZwIFV0FWRVMADXF1ZXVlSXRlbVNpemUAIAAEYmlnMAkAtgIBAAAACWtNdWx0aXNpZwIMJXNfX211bHRpc2lnAQdrU3RhdHVzAgRkYXBwBHR4SWQJALkJAgkAzAgCAgolc19fc3RhdHVzCQDMCAIFBGRhcHAJAMwIAgUEdHhJZAUDbmlsBQlzZXBhcmF0b3IACWtTaHV0ZG93bgIMJXNfX3NodXRkb3duAAtrUHVibGljS2V5cwIOJXNfX3B1YmxpY0tleXMAEWtNYXRjaGVyUHVibGljS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JAAECBQckbWF0Y2gwAgZTdHJpbmcECG11bHRpc2lnBQckbWF0Y2gwBAlzdGF0dXNLZXkJAQdrU3RhdHVzAgkApQgBBQR0aGlzCQDYBAEIBQJ0eAJpZAQGc3RhdHVzCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCG11bHRpc2lnBQlzdGF0dXNLZXkHBQZzdGF0dXMHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5+sM2KA==", "chainId": 84, "height": 3186503, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HTfawEvDjXoyAAMqobWkMwKdrf1whxkMw35grEAo9vjY Next: BoQFhvXxcDFC6HT6meRxoiq2Mn8VqVAP1UhTGCvLx69w Diff:
OldNewDifferences
321321 let leverage = valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined"))
322322 let requestId = getRequestId(accountAddress)
323323 let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found")
324- let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(priceAssetId))
324+ let deposited = valueOrElse(depositedOption(accountAddress), 0)
325325 let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(priceAssetId))
326- let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId))
327- let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, priceAssetId)), 0), pow10Decimals(priceAssetId))
326+ let creditA = valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0)
327+ let creditB = valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, priceAssetId)), 0)
328328 let status = valueOrErrorMessage(getInteger(factoryAddress, kRequestStatus(requestId)), ("status not found. RequestId = " + toBase58String(requestId)))
329329 $Tuple12(assetIdToString(amountAssetId), assetIdToString(priceAssetId), toString(accountAddress), toBase58String(accountPublicKey), leverage, toBase58String(requestId), deposited, creditA, creditB, getAssetBalance(amountAssetId, accountAddress), getAssetBalance(priceAssetId, accountAddress), status)
330330 }
370370 else throwErr(("accounts limit is " + toString(accountsLimit())))]
371371 if ((checks == checks))
372372 then {
373- let $t01339314926 = if ((size(accountsQueue()) == 0))
373+ let $t01328714820 = if ((size(accountsQueue()) == 0))
374374 then $Tuple2([ScriptTransfer(factoryAddress, rewardAmount(), unit)], [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_EMPTY], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), (requestsQueue() + requestId)], nil), invoke(factoryAddress, "integerEntry", [kRequestLeverage(requestId), leverage], nil)])
375375 else {
376376 let accountPublicKey = take(accountsQueue(), queueItemSize)
378378 let creatorAddress = addressFromPublicKey(valueOrErrorMessage(getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)), wrapErr("invalid creator public key")))
379379 $Tuple2([ScriptTransfer(creatorAddress, rewardAmount(), unit)], [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), drop(accountsQueue(), queueItemSize)], nil), invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_READY], nil), invoke(factoryAddress, "binaryEntry", [kRequestIdToAccountPublicKey(requestId), accountPublicKey], nil), invoke(factoryAddress, "stringEntry", [kAccountAddressToRequestId(accountAddress), toBase58String(requestId)], nil), invoke(factoryAddress, "integerEntry", [kLeverage(accountAddress), leverage], nil)])
380380 }
381- let actions = $t01339314926._1
382- let factoryActions = $t01339314926._2
381+ let actions = $t01328714820._1
382+ let factoryActions = $t01328714820._2
383383 $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kRequestOwnerPublicKey(requestId), callerPublicKey], nil), invoke(factoryAddress, "binaryEntry", [kRequestsByOwner(userAddress), (requestsByOwner(userAddress) + requestId)], nil), invoke(factoryAddress, "stringEntry", [kRequestAmountAssetId(requestId), amountAssetIdStr], nil), invoke(factoryAddress, "stringEntry", [kRequestPriceAssetId(requestId), priceAssetIdStr], nil)]))
384384 }
385385 else throw("Strict value is not equal to itself.")
412412 else throwErr("invalid script")]
413413 if ((checks == checks))
414414 then {
415- let $t01618117422 = if ((size(requestsQueue()) == 0))
415+ let $t01607517316 = if ((size(requestsQueue()) == 0))
416416 then $Tuple2(nil, [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), (accountsQueue() + accountPublicKey)], nil)])
417417 else {
418418 let requestId = take(requestsQueue(), queueItemSize)
419419 let leverage = valueOrErrorMessage(getInteger(factoryAddress, kRequestLeverage(requestId)), wrapErr("request's leverage is undefined"))
420420 $Tuple2(nil, [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_READY], nil), invoke(factoryAddress, "binaryEntry", [kRequestIdToAccountPublicKey(requestId), accountPublicKey], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), drop(requestsQueue(), queueItemSize)], nil), invoke(factoryAddress, "stringEntry", [kAccountAddressToRequestId(accountAddress), toBase58String(requestId)], nil), invoke(factoryAddress, "transferWaves", [creatorAddress.bytes, rewardAmount()], nil), invoke(factoryAddress, "integerEntry", [kLeverage(accountAddress), leverage], nil)])
421421 }
422- let actions = $t01618117422._1
423- let factoryActions = $t01618117422._2
422+ let actions = $t01607517316._1
423+ let factoryActions = $t01607517316._2
424424 $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)]))
425425 }
426426 else throw("Strict value is not equal to itself.")
599599 if ((checks == checks))
600600 then {
601601 let userAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid user address"))
602- let userRequests = valueOrErrorMessage(getBinary(factoryAddress, kRequestsByOwner(userAddress)), "kRequestsByOwner not found")
602+ let userRequests = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(userAddress)), base58'')
603603 let userRequestsNumber = (size(userRequests) / queueItemSize)
604604 let nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
605605 func getAccountsData (acc,count) = {
606- let $t02497125013 = acc
607- let accDataList = $t02497125013._1
608- let rawBytes = $t02497125013._2
609- let maxSize = $t02497125013._3
606+ let $t02483724879 = acc
607+ let accDataList = $t02483724879._1
608+ let rawBytes = $t02483724879._2
609+ let maxSize = $t02483724879._3
610610 if ((maxSize > count))
611611 then {
612612 let requestId = take(rawBytes, queueItemSize)
619619 else acc
620620 }
621621
622- let $t02551725616 = {
622+ let $t02538325482 = {
623623 let $l = nums
624624 let $s = size($l)
625625 let $acc0 = $Tuple3(nil, userRequests, userRequestsNumber)
633633
634634 $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)
635635 }
636- let accDataList = $t02551725616._1
637- let _a = $t02551725616._2
638- let _b = $t02551725616._3
636+ let accDataList = $t02538325482._1
637+ let _a = $t02538325482._2
638+ let _b = $t02538325482._3
639639 $Tuple2(nil, accDataList)
640640 }
641641 else throw("Strict value is not equal to itself.")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let chainId = take(drop(this.bytes, 1), 1)
77
88 let chainIdW = base58'2W'
99
1010 let contractFilename = "futures_calculator.ride"
1111
1212 let mult8 = 100000000
1313
1414 let mult18BigInt = toBigInt(1000000000000000000)
1515
1616 let wavesDecimals = 8
1717
1818 let usdtDecimals = 6
1919
2020 let wavesString = "WAVES"
2121
2222 let queueItemSize = 32
2323
2424 let big0 = toBigInt(0)
2525
2626 let kMultisig = "%s__multisig"
2727
2828 func kStatus (dapp,txId) = makeString(["%s__status", dapp, txId], separator)
2929
3030
3131 let kShutdown = "%s__shutdown"
3232
3333 let kPublicKeys = "%s__publicKeys"
3434
3535 let kMatcherPublicKey = "%s__matcherPublicKey"
3636
3737 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), mult18BigInt, toBigInt(origScaleMult))
3838
3939
4040 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), mult18BigInt))
4141
4242
4343 func validateAddress (address) = isDefined(addressFromString(address))
4444
4545
4646 func wrapErr (s) = ((contractFilename + ": ") + s)
4747
4848
4949 func throwErr (s) = throw(wrapErr(s))
5050
5151
5252 func ensurePositive (v,s) = if ((v >= 0))
5353 then v
5454 else throwErr((s + " value should be positive"))
5555
5656
5757 func parseAssetId (input) = if ((input == wavesString))
5858 then unit
5959 else fromBase58String(input)
6060
6161
6262 func assetIdToString (input) = if ((input == unit))
6363 then wavesString
6464 else toBase58String(value(input))
6565
6666
6767 func getAssetInfoOrFail (assetId) = valueOrErrorMessage(assetInfo(assetId), wrapErr("invalid asset info"))
6868
6969
7070 func getAssetDecimalsOrFail (assetId) = match assetId {
7171 case _: Unit =>
7272 wavesDecimals
7373 case assetId: ByteVector =>
7474 getAssetInfoOrFail(assetId).decimals
7575 case _ =>
7676 throw("Match error")
7777 }
7878
7979
8080 func getAssetBalance (assetId,address) = match assetId {
8181 case _: Unit =>
8282 wavesBalance(address).available
8383 case assetId: ByteVector =>
8484 assetBalance(address, assetId)
8585 case _ =>
8686 throw("Match error")
8787 }
8888
8989
9090 func pow10 (n) = pow(10, 0, n, 0, 0, DOWN)
9191
9292
9393 func pow10Decimals (assetId) = pow10(getAssetDecimalsOrFail(assetId))
9494
9595
9696 let kFactoryAddress = "%s__factoryAddress"
9797
9898 let factoryAddressOption = match getString(this, kFactoryAddress) {
9999 case s: String =>
100100 addressFromString(s)
101101 case _: Unit =>
102102 unit
103103 case _ =>
104104 throw("Match error")
105105 }
106106
107107 let factoryAddress = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address"))
108108
109109 let kUsdtAssetId = "%s__usdtAssetId"
110110
111111 let usdtAssetIdOption = match getString(factoryAddress, kUsdtAssetId) {
112112 case s: String =>
113113 parseAssetId(s)
114114 case _: Unit =>
115115 unit
116116 case _ =>
117117 throw("Match error")
118118 }
119119
120120 let usdtAssetId = valueOrErrorMessage(usdtAssetIdOption, wrapErr("invalid usdt asset id"))
121121
122122 let kPricesAddress = "%s__calculatorAddress"
123123
124124 let shutdown = valueOrElse(getBoolean(factoryAddress, kShutdown), false)
125125
126126 func mustAddress (caller,address) = if ((caller == address))
127127 then true
128128 else throwErr("permission denied")
129129
130130
131131 func mustThis (caller) = mustAddress(caller, this)
132132
133133
134134 func mustFactory (caller) = mustAddress(caller, factoryAddress)
135135
136136
137137 func mustAdmin (callerPublicKey) = {
138138 let multisig = addressFromStringValue(getStringValue(factoryAddress, kMultisig))
139139 let publicKeysList = split(getStringValue(multisig, kPublicKeys), separator)
140140 if (containsElement(publicKeysList, toBase58String(callerPublicKey)))
141141 then true
142142 else throwErr("not allowed")
143143 }
144144
145145
146146 let kAccountScript = "%s__accountScript"
147147
148148 func accountScript () = valueOrErrorMessage(getBinary(factoryAddress, kAccountScript), wrapErr("account script is not set"))
149149
150150
151151 let kRewardAmount = "%s__rewardAmount"
152152
153153 func rewardAmount () = valueOrErrorMessage(getInteger(factoryAddress, kRewardAmount), wrapErr("reward amount is not set"))
154154
155155
156156 let kAccountsLimit = "%s__accountsLimit"
157157
158158 let accountsLimitDefault = 20
159159
160160 func accountsLimit () = valueOrElse(getInteger(factoryAddress, kAccountsLimit), accountsLimitDefault)
161161
162162
163163 func kDeposited (accountAddress) = makeString(["%s%s", "deposited", toString(accountAddress)], separator)
164164
165165
166166 func depositedOption (accountAddress) = getInteger(factoryAddress, kDeposited(accountAddress))
167167
168168
169169 func kCredit (accountAddress,assetId) = makeString(["%s%s%s", "credit", toString(accountAddress), assetIdToString(assetId)], separator)
170170
171171
172172 func creditOption (accountAddress,assetId) = getInteger(factoryAddress, kCredit(accountAddress, assetId))
173173
174174
175175 func kLeverage (accountAddress) = makeString(["%s%s", "leverage", toString(accountAddress)], separator)
176176
177177
178178 func kRequestLeverage (requestId) = makeString(["%s%s", "requestLeverage", toBase58String(requestId)], separator)
179179
180180
181181 func kSyntheticAssetId (baseAssetId) = makeString(["%s%s", "syntheticAssetId", assetIdToString(baseAssetId)], separator)
182182
183183
184184 func kBaseAssetId (syntheticAssetId) = makeString(["%s%s", "baseAssetId", assetIdToString(syntheticAssetId)], separator)
185185
186186
187187 let REQUEST_STATUS_EMPTY = 0
188188
189189 let REQUEST_STATUS_READY = 1
190190
191191 func kRequestStatus (requestId) = makeString(["%s%s", toBase58String(requestId), "status"], separator)
192192
193193
194194 func kAccountCreatorPublicKey (accountAddress) = makeString(["%s%s", toString(accountAddress), "creatorPublicKey"], separator)
195195
196196
197197 func kRequestOwnerPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "ownerPublicKey"], separator)
198198
199199
200200 func kRequestAmountAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "amountAssetId"], separator)
201201
202202
203203 func kRequestPriceAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "priceAssetId"], separator)
204204
205205
206206 func kRequestIdToAccountPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "requestIdToAccountPublicKey"], separator)
207207
208208
209209 func kAccountAddressToRequestId (accountAddress) = makeString(["%s%s", toString(accountAddress), "accountAddressToRequestId"], separator)
210210
211211
212212 func kRequestsQueue () = makeString(["%s", "requestsQueue"], separator)
213213
214214
215215 func requestsQueue () = valueOrElse(getBinary(factoryAddress, kRequestsQueue()), base58'')
216216
217217
218218 func kAccountsQueue () = makeString(["%s", "accountsQueue"], separator)
219219
220220
221221 func accountsQueue () = valueOrElse(getBinary(factoryAddress, kAccountsQueue()), base58'')
222222
223223
224224 func kRequestsByOwner (ownerAddress) = makeString(["%s%s", "requests", toString(ownerAddress)], separator)
225225
226226
227227 func requestsByOwner (ownerAddress) = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(ownerAddress)), base58'')
228228
229229
230230 func kPairAllowed (amountAssetId,priceAssetId) = makeString(["%s%s%s", assetIdToString(amountAssetId), assetIdToString(priceAssetId), "pairAllowed"], separator)
231231
232232
233233 func pairAllowed (amountAssetId,priceAssetId) = valueOrElse(getBoolean(factoryAddress, kPairAllowed(amountAssetId, priceAssetId)), false)
234234
235235
236236 func kPrice (assetId) = makeString(["%s", assetIdToString(assetId)], separator)
237237
238238
239239 func getCurrentPrice (assetId) = {
240240 let matcherPublicKey = fromBase58String(valueOrErrorMessage(getString(factoryAddress, kMatcherPublicKey), wrapErr("invalid matcher public key")))
241241 let matcherAddress = addressFromPublicKey(matcherPublicKey)
242242 let price = valueOrErrorMessage(getInteger(matcherAddress, kPrice(assetId)), wrapErr(("invalid price, assetId = " + assetIdToString(assetId))))
243243 price
244244 }
245245
246246
247247 func calcTotalCredit (creditA,creditB,currentPrice) = (fraction(creditA, currentPrice, mult18BigInt) + creditB)
248248
249249
250250 func calcTotalBalance (balanceA,balanceB,currentPrice) = (fraction(balanceA, currentPrice, mult18BigInt) + balanceB)
251251
252252
253253 func calcPnl (totalBalance,totalCredit) = (totalBalance - totalCredit)
254254
255255
256256 func calcCreditAvailable (deposit,leverage,totalCredit) = (fraction(deposit, leverage, mult18BigInt) - totalCredit)
257257
258258
259259 func calcRealInCredit (credit,balance) = if ((credit > big0))
260260 then (credit - balance)
261261 else big0
262262
263263
264264 func calcFree (credit,balance) = if ((credit > big0))
265265 then (balance - credit)
266266 else big0
267267
268268
269269 func calcShortPrice (free,realInCredit) = if ((realInCredit > big0))
270270 then max([big0, fraction(free, mult18BigInt, realInCredit)])
271271 else big0
272272
273273
274274 func calcLongPrice (free,realInCredit) = if ((realInCredit > big0))
275275 then max([big0, fraction(realInCredit, mult18BigInt, free)])
276276 else big0
277277
278278
279279 func calcStartMargin (realInCreditA,realInCreditB,currentPrice,settingsMargin) = fraction((fraction(realInCreditA, currentPrice, mult18BigInt) + realInCreditB), settingsMargin, mult18BigInt)
280280
281281
282282 func calcMarginSupply (settingsMarginSupply,settingsMargin,startMargin) = fraction(settingsMarginSupply, startMargin, settingsMargin)
283283
284284
285285 func calcLiquidationPrice (deposit,marginSupply,realInCreditA,realInCreditB,shortPrice,longPrice) = {
286286 let liquidationPriceA = if ((realInCreditA > big0))
287287 then (((deposit - marginSupply) / realInCreditA) + shortPrice)
288288 else big0
289289 let liquidationPriceB = if ((realInCreditB > big0))
290290 then (longPrice - ((deposit - marginSupply) / (realInCreditA / longPrice)))
291291 else big0
292292 (liquidationPriceA + liquidationPriceB)
293293 }
294294
295295
296296 func getRequestId (accountAddress) = {
297297 let requestId = fromBase58String(valueOrErrorMessage(getString(factoryAddress, kAccountAddressToRequestId(accountAddress)), wrapErr("invalid account address: request id is undefined")))
298298 requestId
299299 }
300300
301301
302302 func getAccountAssets (accountAddress) = {
303303 let requestId = getRequestId(accountAddress)
304304 let amountAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kRequestAmountAssetId(requestId)), wrapErr("invalid amount asset id")))
305305 let priceAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kRequestPriceAssetId(requestId)), wrapErr("invalid amount price id")))
306306 $Tuple2(amountAssetId, priceAssetId)
307307 }
308308
309309
310310 func getAccountOwnerPublicKey (accountAddress) = {
311311 let requestId = getRequestId(accountAddress)
312312 let requestOwnerPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestOwnerPublicKey(requestId)), wrapErr("invalid amount asset id"))
313313 requestOwnerPublicKey
314314 }
315315
316316
317317 func getAccountInfoInternal (accountAddress) = {
318318 let $t01038510453 = getAccountAssets(accountAddress)
319319 let amountAssetId = $t01038510453._1
320320 let priceAssetId = $t01038510453._2
321321 let leverage = valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined"))
322322 let requestId = getRequestId(accountAddress)
323323 let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found")
324- let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(priceAssetId))
324+ let deposited = valueOrElse(depositedOption(accountAddress), 0)
325325 let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(priceAssetId))
326- let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId))
327- let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, priceAssetId)), 0), pow10Decimals(priceAssetId))
326+ let creditA = valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0)
327+ let creditB = valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, priceAssetId)), 0)
328328 let status = valueOrErrorMessage(getInteger(factoryAddress, kRequestStatus(requestId)), ("status not found. RequestId = " + toBase58String(requestId)))
329329 $Tuple12(assetIdToString(amountAssetId), assetIdToString(priceAssetId), toString(accountAddress), toBase58String(accountPublicKey), leverage, toBase58String(requestId), deposited, creditA, creditB, getAssetBalance(amountAssetId, accountAddress), getAssetBalance(priceAssetId, accountAddress), status)
330330 }
331331
332332
333333 @Callable(i)
334334 func init (factoryAddressStr) = {
335335 let checkCaller = mustThis(i.caller)
336336 if ((checkCaller == checkCaller))
337337 then $Tuple2([StringEntry(kFactoryAddress, factoryAddressStr)], unit)
338338 else throw("Strict value is not equal to itself.")
339339 }
340340
341341
342342
343343 @Callable(i)
344344 func requestAccount (callerPublicKey,args) = {
345345 let ckecks = [if (!(shutdown))
346346 then true
347347 else throwErr("not allowed"), mustFactory(i.caller)]
348348 if ((ckecks == ckecks))
349349 then {
350350 let amountAssetIdStr = args[0]
351351 let priceAssetIdStr = args[1]
352352 let leverage = valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid leverage"))
353353 let userAddress = addressFromPublicKey(callerPublicKey)
354354 let requestId = sha256(((userAddress.bytes + fromBase58String(amountAssetIdStr)) + fromBase58String(priceAssetIdStr)))
355355 let amountAssetId = parseAssetId(amountAssetIdStr)
356356 let priceAssetId = parseAssetId(priceAssetIdStr)
357357 let userRequestsNumber = (size(kRequestsByOwner(userAddress)) / queueItemSize)
358358 let checks = [if ((size(i.payments) == 1))
359359 then true
360360 else throwErr("1 payment is required"), if ((i.payments[0].assetId == unit))
361361 then true
362362 else throwErr("invalid asset"), if ((i.payments[0].amount == rewardAmount()))
363363 then true
364364 else throwErr("invalid amount"), if (pairAllowed(amountAssetId, priceAssetId))
365365 then true
366366 else throwErr("pair is not allowed"), if ((getInteger(factoryAddress, kRequestStatus(requestId)) == unit))
367367 then true
368368 else throwErr("account is already exists"), if ((accountsLimit() > userRequestsNumber))
369369 then true
370370 else throwErr(("accounts limit is " + toString(accountsLimit())))]
371371 if ((checks == checks))
372372 then {
373- let $t01339314926 = if ((size(accountsQueue()) == 0))
373+ let $t01328714820 = if ((size(accountsQueue()) == 0))
374374 then $Tuple2([ScriptTransfer(factoryAddress, rewardAmount(), unit)], [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_EMPTY], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), (requestsQueue() + requestId)], nil), invoke(factoryAddress, "integerEntry", [kRequestLeverage(requestId), leverage], nil)])
375375 else {
376376 let accountPublicKey = take(accountsQueue(), queueItemSize)
377377 let accountAddress = addressFromPublicKey(accountPublicKey)
378378 let creatorAddress = addressFromPublicKey(valueOrErrorMessage(getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)), wrapErr("invalid creator public key")))
379379 $Tuple2([ScriptTransfer(creatorAddress, rewardAmount(), unit)], [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), drop(accountsQueue(), queueItemSize)], nil), invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_READY], nil), invoke(factoryAddress, "binaryEntry", [kRequestIdToAccountPublicKey(requestId), accountPublicKey], nil), invoke(factoryAddress, "stringEntry", [kAccountAddressToRequestId(accountAddress), toBase58String(requestId)], nil), invoke(factoryAddress, "integerEntry", [kLeverage(accountAddress), leverage], nil)])
380380 }
381- let actions = $t01339314926._1
382- let factoryActions = $t01339314926._2
381+ let actions = $t01328714820._1
382+ let factoryActions = $t01328714820._2
383383 $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kRequestOwnerPublicKey(requestId), callerPublicKey], nil), invoke(factoryAddress, "binaryEntry", [kRequestsByOwner(userAddress), (requestsByOwner(userAddress) + requestId)], nil), invoke(factoryAddress, "stringEntry", [kRequestAmountAssetId(requestId), amountAssetIdStr], nil), invoke(factoryAddress, "stringEntry", [kRequestPriceAssetId(requestId), priceAssetIdStr], nil)]))
384384 }
385385 else throw("Strict value is not equal to itself.")
386386 }
387387 else throw("Strict value is not equal to itself.")
388388 }
389389
390390
391391
392392 @Callable(i)
393393 func addAccount (callerPublicKey,args) = {
394394 let ckecks = [if (!(shutdown))
395395 then true
396396 else throwErr("not allowed"), mustFactory(i.caller)]
397397 if ((ckecks == ckecks))
398398 then {
399399 let creatorPublicKey = fromBase58String(args[0])
400400 let accountPublicKey = callerPublicKey
401401 let accountAddress = addressFromPublicKey(callerPublicKey)
402402 let creatorAddress = addressFromPublicKey(creatorPublicKey)
403403 let checks = [if ((getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)) == unit))
404404 then true
405405 else throwErr("account is already exists"), if ( match scriptHash(accountAddress) {
406406 case b: ByteVector =>
407407 (b == blake2b256_32Kb(accountScript()))
408408 case _ =>
409409 false
410410 })
411411 then true
412412 else throwErr("invalid script")]
413413 if ((checks == checks))
414414 then {
415- let $t01618117422 = if ((size(requestsQueue()) == 0))
415+ let $t01607517316 = if ((size(requestsQueue()) == 0))
416416 then $Tuple2(nil, [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), (accountsQueue() + accountPublicKey)], nil)])
417417 else {
418418 let requestId = take(requestsQueue(), queueItemSize)
419419 let leverage = valueOrErrorMessage(getInteger(factoryAddress, kRequestLeverage(requestId)), wrapErr("request's leverage is undefined"))
420420 $Tuple2(nil, [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_READY], nil), invoke(factoryAddress, "binaryEntry", [kRequestIdToAccountPublicKey(requestId), accountPublicKey], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), drop(requestsQueue(), queueItemSize)], nil), invoke(factoryAddress, "stringEntry", [kAccountAddressToRequestId(accountAddress), toBase58String(requestId)], nil), invoke(factoryAddress, "transferWaves", [creatorAddress.bytes, rewardAmount()], nil), invoke(factoryAddress, "integerEntry", [kLeverage(accountAddress), leverage], nil)])
421421 }
422- let actions = $t01618117422._1
423- let factoryActions = $t01618117422._2
422+ let actions = $t01607517316._1
423+ let factoryActions = $t01607517316._2
424424 $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)]))
425425 }
426426 else throw("Strict value is not equal to itself.")
427427 }
428428 else throw("Strict value is not equal to itself.")
429429 }
430430
431431
432432
433433 @Callable(i)
434434 func deposit (callerPublicKey,args) = {
435435 let payment = i.payments[0]
436436 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
437437 let ckecks = [if (!(shutdown))
438438 then true
439439 else throwErr("not allowed"), mustFactory(i.caller), if ((size(i.payments) == 1))
440440 then true
441441 else throwErr("1 payment is required"), if ((payment.assetId == usdtAssetId))
442442 then true
443443 else throwErr("invalid asset"), if ((getInteger(factoryAddress, kRequestStatus(getRequestId(accountAddress))) == REQUEST_STATUS_READY))
444444 then true
445445 else throwErr("account is not ready")]
446446 if ((ckecks == ckecks))
447447 then {
448448 let actions = [ScriptTransfer(accountAddress, payment.amount, payment.assetId)]
449449 let factoryActions = [invoke(factoryAddress, "integerEntry", [kDeposited(accountAddress), (valueOrElse(depositedOption(accountAddress), 0) + payment.amount)], nil)]
450450 $Tuple2(actions, factoryActions)
451451 }
452452 else throw("Strict value is not equal to itself.")
453453 }
454454
455455
456456
457457 @Callable(i)
458458 func withdraw (callerPublicKey,args) = {
459459 let ckecks = [if (!(shutdown))
460460 then true
461461 else throwErr("not allowed"), mustFactory(i.caller)]
462462 if ((ckecks == ckecks))
463463 then {
464464 let userAddress = addressFromPublicKey(callerPublicKey)
465465 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
466466 let amount = valueOrErrorMessage(parseInt(args[1]), wrapErr("invalid amount"))
467467 let assetId = parseAssetId(args[2])
468468 let invocations = [invoke(accountAddress, "transferAsset", [userAddress.bytes, amount, assetId], nil)]
469469 $Tuple2(nil, invocations)
470470 }
471471 else throw("Strict value is not equal to itself.")
472472 }
473473
474474
475475
476476 @Callable(i)
477477 func borrow (callerPublicKey,args) = {
478478 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
479479 let assetIdRequested = parseAssetId(args[1])
480480 let amountRequested = ensurePositive(valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid requested amount")), "requested amount")
481481 let accountOwnerPublicKey = getAccountOwnerPublicKey(accountAddress)
482482 let userAddress = addressFromPublicKey(callerPublicKey)
483483 let ckecks = [if (!(shutdown))
484484 then true
485485 else throwErr("not allowed"), mustFactory(i.caller), if ((callerPublicKey == accountOwnerPublicKey))
486486 then true
487487 else throwErr("can be called by account owner only")]
488488 if ((ckecks == ckecks))
489489 then {
490490 let amountAssetId = getAccountAssets(accountAddress)._1
491491 let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(usdtAssetId))
492492 let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(usdtAssetId))
493493 let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId))
494494 let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, usdtAssetId)), 0), pow10Decimals(usdtAssetId))
495495 let totalCredit = calcTotalCredit(creditA, creditB, currentPrice)
496496 let leverage = toX18(valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined")), 1)
497497 let creditAvailableUsdt = calcCreditAvailable(deposited, leverage, totalCredit)
498498 let creditAvailable = if ((assetIdRequested == amountAssetId))
499499 then fromX18(fraction(creditAvailableUsdt, mult18BigInt, currentPrice), pow10Decimals(amountAssetId))
500500 else if ((assetIdRequested == usdtAssetId))
501501 then fromX18(creditAvailableUsdt, pow10Decimals(usdtAssetId))
502502 else throwErr("invalid requested asset id")
503503 let syntheticAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kSyntheticAssetId(assetIdRequested)), wrapErr("synthetic asset for requested asset is undefined")))
504504 let amountToSend = if ((creditAvailable >= amountRequested))
505505 then amountRequested
506506 else throwErr(("credit available = " + toString(creditAvailable)))
507507 let factoryActions = [invoke(factoryAddress, "integerEntry", [kCredit(accountAddress, assetIdRequested), (valueOrElse(creditOption(accountAddress, assetIdRequested), 0) + amountToSend)], nil), invoke(factoryAddress, "transferAsset", [userAddress.bytes, amountToSend, syntheticAssetId], nil)]
508508 $Tuple2(nil, [factoryActions, creditAvailable])
509509 }
510510 else throw("Strict value is not equal to itself.")
511511 }
512512
513513
514514
515515 @Callable(i)
516516 func repay (callerPublicKey,args) = {
517517 let ckecks = [if (!(shutdown))
518518 then true
519519 else throwErr("not allowed"), mustFactory(i.caller)]
520520 if ((ckecks == ckecks))
521521 then $Tuple2(nil, unit)
522522 else throw("Strict value is not equal to itself.")
523523 }
524524
525525
526526
527527 @Callable(i)
528528 func setPairAllowance (callerPublicKey,args) = {
529529 let ckecks = [if (!(shutdown))
530530 then true
531531 else throwErr("not allowed"), mustFactory(i.caller), mustAdmin(callerPublicKey)]
532532 if ((ckecks == ckecks))
533533 then {
534534 let amountAssetIdStr = args[0]
535535 let priceAssetIdStr = args[1]
536536 let allowStr = args[2]
537537 let amountAssetId = parseAssetId(amountAssetIdStr)
538538 let priceAssetId = parseAssetId(priceAssetIdStr)
539539 let allow = (allowStr == "true")
540540 let invocations = [invoke(factoryAddress, "booleanEntry", [kPairAllowed(amountAssetId, priceAssetId), allow], nil)]
541541 $Tuple2(nil, invocations)
542542 }
543543 else throw("Strict value is not equal to itself.")
544544 }
545545
546546
547547
548548 @Callable(i)
549549 func addSyntheticAsset (callerPublicKey,args) = {
550550 let baseAssetId = parseAssetId(args[0])
551551 let syntheticAssetId = parseAssetId(args[1])
552552 let ckecks = [if (!(shutdown))
553553 then true
554554 else throwErr("not allowed"), mustFactory(i.caller), mustAdmin(callerPublicKey), if ((getString(factoryAddress, kSyntheticAssetId(baseAssetId)) == unit))
555555 then true
556556 else throwErr("invalid base asset"), if ((getString(factoryAddress, kBaseAssetId(syntheticAssetId)) == unit))
557557 then true
558558 else throwErr("invalid synthetic asset")]
559559 if ((ckecks == ckecks))
560560 then {
561561 let invocations = [invoke(factoryAddress, "stringEntry", [kSyntheticAssetId(baseAssetId), assetIdToString(syntheticAssetId)], nil), invoke(factoryAddress, "stringEntry", [kBaseAssetId(syntheticAssetId), assetIdToString(baseAssetId)], nil)]
562562 $Tuple2(nil, invocations)
563563 }
564564 else throw("Strict value is not equal to itself.")
565565 }
566566
567567
568568
569569 @Callable(i)
570570 func doShutdown (callerPublicKey,args) = {
571571 let checks = [mustFactory(i.caller), mustAdmin(callerPublicKey)]
572572 if ((checks == checks))
573573 then {
574574 let invocations = [invoke(factoryAddress, "booleanEntry", [kShutdown, true], nil)]
575575 $Tuple2(nil, invocations)
576576 }
577577 else throw("Strict value is not equal to itself.")
578578 }
579579
580580
581581
582582 @Callable(i)
583583 func getAccountInfoREADONLY (callerPublicKey,args) = {
584584 let checks = [mustFactory(i.caller)]
585585 if ((checks == checks))
586586 then {
587587 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
588588 let data = getAccountInfoInternal(accountAddress)
589589 $Tuple2(nil, data)
590590 }
591591 else throw("Strict value is not equal to itself.")
592592 }
593593
594594
595595
596596 @Callable(i)
597597 func getUserInfoREADONLY (callerPublicKey,args) = {
598598 let checks = [mustFactory(i.caller)]
599599 if ((checks == checks))
600600 then {
601601 let userAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid user address"))
602- let userRequests = valueOrErrorMessage(getBinary(factoryAddress, kRequestsByOwner(userAddress)), "kRequestsByOwner not found")
602+ let userRequests = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(userAddress)), base58'')
603603 let userRequestsNumber = (size(userRequests) / queueItemSize)
604604 let nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
605605 func getAccountsData (acc,count) = {
606- let $t02497125013 = acc
607- let accDataList = $t02497125013._1
608- let rawBytes = $t02497125013._2
609- let maxSize = $t02497125013._3
606+ let $t02483724879 = acc
607+ let accDataList = $t02483724879._1
608+ let rawBytes = $t02483724879._2
609+ let maxSize = $t02483724879._3
610610 if ((maxSize > count))
611611 then {
612612 let requestId = take(rawBytes, queueItemSize)
613613 let newRawBytes = drop(rawBytes, queueItemSize)
614614 let accountPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestIdToAccountPublicKey(requestId)), "kRequestIdToAccountPublicKey not found")
615615 let accountAddress = addressFromPublicKey(accountPublicKey)
616616 let data = getAccountInfoInternal(accountAddress)
617617 $Tuple3((accDataList :+ data), newRawBytes, maxSize)
618618 }
619619 else acc
620620 }
621621
622- let $t02551725616 = {
622+ let $t02538325482 = {
623623 let $l = nums
624624 let $s = size($l)
625625 let $acc0 = $Tuple3(nil, userRequests, userRequestsNumber)
626626 func $f0_1 ($a,$i) = if (($i >= $s))
627627 then $a
628628 else getAccountsData($a, $l[$i])
629629
630630 func $f0_2 ($a,$i) = if (($i >= $s))
631631 then $a
632632 else throw("List size exceeds 20")
633633
634634 $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)
635635 }
636- let accDataList = $t02551725616._1
637- let _a = $t02551725616._2
638- let _b = $t02551725616._3
636+ let accDataList = $t02538325482._1
637+ let _a = $t02538325482._2
638+ let _b = $t02538325482._3
639639 $Tuple2(nil, accDataList)
640640 }
641641 else throw("Strict value is not equal to itself.")
642642 }
643643
644644
645645 @Verifier(tx)
646646 func verify () = if (if (isDefined(factoryAddressOption))
647647 then isDefined(getString(factoryAddress, kMultisig))
648648 else false)
649649 then match getString(factoryAddress, kMultisig) {
650650 case multisig: String =>
651651 let statusKey = kStatus(toString(this), toBase58String(tx.id))
652652 let status = valueOrElse(getBoolean(addressFromStringValue(multisig), statusKey), false)
653653 status
654654 case _ =>
655655 false
656656 }
657657 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
658658

github/deemru/w8io/026f985 
87.56 ms