tx · 2Nf3iCgG9ABAJCYB6DfZVcUTgkXfHGfM3BuT8GonDx8a

3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37:  -0.02400000 Waves

2024.06.03 16:58 [3134594] smart account 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37 > SELF 0.00000000 Waves

{ "type": 13, "id": "2Nf3iCgG9ABAJCYB6DfZVcUTgkXfHGfM3BuT8GonDx8a", "fee": 2400000, "feeAssetId": null, "timestamp": 1717423201584, "version": 2, "chainId": 84, "sender": "3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37", "senderPublicKey": "vmMXxwQAMUAoisvL193ptPiTtaWQqL5YNu2zs1ouTbY", "proofs": [ "2UGrAnm2Z9U5yaam2KPVJVJqRscvjCoSFCBhCDz9kW3BseMT6r7BWMKB4h7PEtdKKueY8KBAep5hAanDvjreXif4" ], "script": "base64:BwI9CAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGFgACXNlcGFyYXRvcgICX18AB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRXAQFXABBjb250cmFjdEZpbGVuYW1lAhdmdXR1cmVzX2NhbGN1bGF0b3IucmlkZQAFbXVsdDgAgMLXLwAMbXVsdDE4QmlnSW50CQC2AgEAgICQu7rWrfANAA13YXZlc0RlY2ltYWxzAAgADHVzZHREZWNpbWFscwAGAAt3YXZlc1N0cmluZwIFV0FWRVMADXF1ZXVlSXRlbVNpemUAIAAEYmlnMAkAtgIBAAAACWtNdWx0aXNpZwIMJXNfX211bHRpc2lnAQdrU3RhdHVzAgRkYXBwBHR4SWQJALkJAgkAzAgCAgolc19fc3RhdHVzCQDMCAIFBGRhcHAJAMwIAgUEdHhJZAUDbmlsBQlzZXBhcmF0b3IACWtTaHV0ZG93bgIMJXNfX3NodXRkb3duAAtrUHVibGljS2V5cwIOJXNfX3B1YmxpY0tleXMAEWtNYXRjaGVyUHVibG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QcFBnN0YXR1cwcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXk2zLnq", "height": 3134594, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3gheT5Mo9ByFriByEeXCzrD3Z8nQsPWFkoMM6fbbbydC Next: FSXVFXuy72n2upcR5xhsLwmz2rWuNHZwNqY83WBRsLLa Diff:
OldNewDifferences
165165 func kLeverage (accountAddress) = makeString(["%s%s", "leverage", toString(accountAddress)], separator)
166166
167167
168+func kRequestLeverage (requestId) = makeString(["%s%s", "requestLeverage", toBase58String(requestId)], separator)
169+
170+
168171 func kSyntheticAssetId (baseAssetId) = makeString(["%s%s", "syntheticAssetId", assetIdToString(baseAssetId)], separator)
169172
170173
320323 then {
321324 let amountAssetIdStr = args[0]
322325 let priceAssetIdStr = args[1]
326+ let leverage = valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid leverage"))
323327 let userAddress = addressFromPublicKey(callerPublicKey)
324328 let requestId = sha256(((userAddress.bytes + fromBase58String(amountAssetIdStr)) + fromBase58String(priceAssetIdStr)))
325329 let amountAssetId = parseAssetId(amountAssetIdStr)
340344 else throwErr(("accounts limit is " + toString(accountsLimit())))]
341345 if ((checks == checks))
342346 then {
343- let $t01147512831 = if ((size(accountsQueue()) == 0))
344- then $Tuple2([ScriptTransfer(factoryAddress, rewardAmount(), unit)], [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_EMPTY], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), (requestsQueue() + requestId)], nil)])
347+ let $t01172813262 = if ((size(accountsQueue()) == 0))
348+ 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)])
345349 else {
346350 let accountPublicKey = take(accountsQueue(), queueItemSize)
347351 let accountAddress = addressFromPublicKey(accountPublicKey)
348352 let creatorAddress = addressFromPublicKey(valueOrErrorMessage(getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)), wrapErr("invalid creator public key")))
349- $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)])
353+ $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)])
350354 }
351- let actions = $t01147512831._1
352- let factoryActions = $t01147512831._2
355+ let actions = $t01172813262._1
356+ let factoryActions = $t01172813262._2
353357 $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)]))
354358 }
355359 else throw("Strict value is not equal to itself.")
382386 else throwErr("invalid script")]
383387 if ((checks == checks))
384388 then {
385- let $t01408615088 = if ((size(requestsQueue()) == 0))
389+ let $t01451715759 = if ((size(requestsQueue()) == 0))
386390 then $Tuple2(nil, [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), (accountsQueue() + accountPublicKey)], nil)])
387391 else {
388392 let requestId = take(requestsQueue(), queueItemSize)
389- $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)])
393+ let leverage = valueOrErrorMessage(getInteger(factoryAddress, kRequestLeverage(requestId)), wrapErr("request's leverage is undefined"))
394+ $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)])
390395 }
391- let actions = $t01408615088._1
392- let factoryActions = $t01408615088._2
396+ let actions = $t01451715759._1
397+ let factoryActions = $t01451715759._2
393398 $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)]))
394399 }
395400 else throw("Strict value is not equal to itself.")
462467 let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId))
463468 let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, usdtAssetId)), 0), pow10Decimals(usdtAssetId))
464469 let totalCredit = calcTotalCredit(creditA, creditB, currentPrice)
465- let leverageDefault = 3
466- let leverage = toX18(valueOrElse(getInteger(factoryAddress, kLeverage(accountAddress)), leverageDefault), 1)
470+ let leverage = toX18(valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined")), 1)
467471 let creditAvailableUsdt = calcCreditAvailable(deposited, leverage, totalCredit)
468472 let creditAvailable = if ((assetIdRequested == amountAssetId))
469473 then fromX18(fraction(creditAvailableUsdt, mult18BigInt, currentPrice), pow10Decimals(amountAssetId))
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 pow10 (n) = pow(10, 0, n, 0, 0, DOWN)
8181
8282
8383 func pow10Decimals (assetId) = pow10(getAssetDecimalsOrFail(assetId))
8484
8585
8686 let kFactoryAddress = "%s__factoryAddress"
8787
8888 let factoryAddressOption = match getString(this, kFactoryAddress) {
8989 case s: String =>
9090 addressFromString(s)
9191 case _: Unit =>
9292 unit
9393 case _ =>
9494 throw("Match error")
9595 }
9696
9797 let factoryAddress = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address"))
9898
9999 let kUsdtAssetId = "%s__usdtAssetId"
100100
101101 let usdtAssetIdOption = match getString(factoryAddress, kUsdtAssetId) {
102102 case s: String =>
103103 parseAssetId(s)
104104 case _: Unit =>
105105 unit
106106 case _ =>
107107 throw("Match error")
108108 }
109109
110110 let usdtAssetId = valueOrErrorMessage(usdtAssetIdOption, wrapErr("invalid usdt asset id"))
111111
112112 let kPricesAddress = "%s__calculatorAddress"
113113
114114 let shutdown = valueOrElse(getBoolean(factoryAddress, kShutdown), false)
115115
116116 func mustAddress (caller,address) = if ((caller == address))
117117 then true
118118 else throwErr("permission denied")
119119
120120
121121 func mustThis (caller) = mustAddress(caller, this)
122122
123123
124124 func mustFactory (caller) = mustAddress(caller, factoryAddress)
125125
126126
127127 func mustAdmin (callerPublicKey) = {
128128 let multisig = addressFromStringValue(getStringValue(factoryAddress, kMultisig))
129129 let publicKeysList = split(getStringValue(multisig, kPublicKeys), separator)
130130 if (containsElement(publicKeysList, toBase58String(callerPublicKey)))
131131 then true
132132 else throwErr("not allowed")
133133 }
134134
135135
136136 let kAccountScript = "%s__accountScript"
137137
138138 func accountScript () = valueOrErrorMessage(getBinary(factoryAddress, kAccountScript), wrapErr("account script is not set"))
139139
140140
141141 let kRewardAmount = "%s__rewardAmount"
142142
143143 func rewardAmount () = valueOrErrorMessage(getInteger(factoryAddress, kRewardAmount), wrapErr("reward amount is not set"))
144144
145145
146146 let kAccountsLimit = "%s__accountsLimit"
147147
148148 let accountsLimitDefault = 20
149149
150150 func accountsLimit () = valueOrElse(getInteger(factoryAddress, kAccountsLimit), accountsLimitDefault)
151151
152152
153153 func kDeposited (accountAddress) = makeString(["%s%s", "deposited", toString(accountAddress)], separator)
154154
155155
156156 func depositedOption (accountAddress) = getInteger(factoryAddress, kDeposited(accountAddress))
157157
158158
159159 func kCredit (accountAddress,assetId) = makeString(["%s%s%s", "credit", toString(accountAddress), assetIdToString(assetId)], separator)
160160
161161
162162 func creditOption (accountAddress,assetId) = getInteger(factoryAddress, kCredit(accountAddress, assetId))
163163
164164
165165 func kLeverage (accountAddress) = makeString(["%s%s", "leverage", toString(accountAddress)], separator)
166166
167167
168+func kRequestLeverage (requestId) = makeString(["%s%s", "requestLeverage", toBase58String(requestId)], separator)
169+
170+
168171 func kSyntheticAssetId (baseAssetId) = makeString(["%s%s", "syntheticAssetId", assetIdToString(baseAssetId)], separator)
169172
170173
171174 func kBaseAssetId (syntheticAssetId) = makeString(["%s%s", "baseAssetId", assetIdToString(syntheticAssetId)], separator)
172175
173176
174177 let REQUEST_STATUS_EMPTY = 0
175178
176179 let REQUEST_STATUS_READY = 1
177180
178181 func kRequestStatus (requestId) = makeString(["%s%s", toBase58String(requestId), "status"], separator)
179182
180183
181184 func kAccountCreatorPublicKey (accountAddress) = makeString(["%s%s", toString(accountAddress), "creatorPublicKey"], separator)
182185
183186
184187 func kRequestOwnerPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "ownerPublicKey"], separator)
185188
186189
187190 func kRequestAmountAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "amountAssetId"], separator)
188191
189192
190193 func kRequestPriceAssetId (requestId) = makeString(["%s%s", toBase58String(requestId), "priceAssetId"], separator)
191194
192195
193196 func kRequestIdToAccountPublicKey (requestId) = makeString(["%s%s", toBase58String(requestId), "requestIdToAccountPublicKey"], separator)
194197
195198
196199 func kAccountAddressToRequestId (accountAddress) = makeString(["%s%s", toString(accountAddress), "accountAddressToRequestId"], separator)
197200
198201
199202 func kRequestsQueue () = makeString(["%s", "requestsQueue"], separator)
200203
201204
202205 func requestsQueue () = valueOrElse(getBinary(factoryAddress, kRequestsQueue()), base58'')
203206
204207
205208 func kAccountsQueue () = makeString(["%s", "accountsQueue"], separator)
206209
207210
208211 func accountsQueue () = valueOrElse(getBinary(factoryAddress, kAccountsQueue()), base58'')
209212
210213
211214 func kRequestsByOwner (ownerAddress) = makeString(["%s%s", "requests", toString(ownerAddress)], separator)
212215
213216
214217 func requestsByOwner (ownerAddress) = valueOrElse(getBinary(factoryAddress, kRequestsByOwner(ownerAddress)), base58'')
215218
216219
217220 func kPairAllowed (amountAssetId,priceAssetId) = makeString(["%s%s%s", assetIdToString(amountAssetId), assetIdToString(priceAssetId), "pairAllowed"], separator)
218221
219222
220223 func pairAllowed (amountAssetId,priceAssetId) = valueOrElse(getBoolean(factoryAddress, kPairAllowed(amountAssetId, priceAssetId)), false)
221224
222225
223226 func kPrice (assetId) = makeString(["%s", assetIdToString(assetId)], separator)
224227
225228
226229 func getCurrentPrice (assetId) = {
227230 let matcherPublicKey = fromBase58String(valueOrErrorMessage(getString(factoryAddress, kMatcherPublicKey), wrapErr("invalid matcher public key")))
228231 let matcherAddress = addressFromPublicKey(matcherPublicKey)
229232 let price = valueOrErrorMessage(getInteger(matcherAddress, kPrice(assetId)), wrapErr(("invalid price, assetId = " + assetIdToString(assetId))))
230233 price
231234 }
232235
233236
234237 func calcTotalCredit (creditA,creditB,currentPrice) = (fraction(creditA, currentPrice, mult18BigInt) + creditB)
235238
236239
237240 func calcTotalBalance (balanceA,balanceB,currentPrice) = (fraction(balanceA, currentPrice, mult18BigInt) + balanceB)
238241
239242
240243 func calcPnl (totalBalance,totalCredit) = (totalBalance - totalCredit)
241244
242245
243246 func calcCreditAvailable (deposit,leverage,totalCredit) = (fraction(deposit, leverage, mult18BigInt) - totalCredit)
244247
245248
246249 func calcRealInCredit (credit,balance) = if ((credit > big0))
247250 then (credit - balance)
248251 else big0
249252
250253
251254 func calcFree (credit,balance) = if ((credit > big0))
252255 then (balance - credit)
253256 else big0
254257
255258
256259 func calcShortPrice (free,realInCredit) = if ((realInCredit > big0))
257260 then max([big0, fraction(free, mult18BigInt, realInCredit)])
258261 else big0
259262
260263
261264 func calcLongPrice (free,realInCredit) = if ((realInCredit > big0))
262265 then max([big0, fraction(realInCredit, mult18BigInt, free)])
263266 else big0
264267
265268
266269 func calcStartMargin (realInCreditA,realInCreditB,currentPrice,settingsMargin) = fraction((fraction(realInCreditA, currentPrice, mult18BigInt) + realInCreditB), settingsMargin, mult18BigInt)
267270
268271
269272 func calcMarginSupply (settingsMarginSupply,settingsMargin,startMargin) = fraction(settingsMarginSupply, startMargin, settingsMargin)
270273
271274
272275 func calcLiquidationPrice (deposit,marginSupply,realInCreditA,realInCreditB,shortPrice,longPrice) = {
273276 let liquidationPriceA = if ((realInCreditA > big0))
274277 then (((deposit - marginSupply) / realInCreditA) + shortPrice)
275278 else big0
276279 let liquidationPriceB = if ((realInCreditB > big0))
277280 then (longPrice - ((deposit - marginSupply) / (realInCreditA / longPrice)))
278281 else big0
279282 (liquidationPriceA + liquidationPriceB)
280283 }
281284
282285
283286 func getRequestId (accountAddress) = {
284287 let requestId = fromBase58String(valueOrErrorMessage(getString(factoryAddress, kAccountAddressToRequestId(accountAddress)), wrapErr("invalid account address: request id is undefined")))
285288 requestId
286289 }
287290
288291
289292 func getAccountAssets (accountAddress) = {
290293 let requestId = getRequestId(accountAddress)
291294 let amountAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kRequestAmountAssetId(requestId)), wrapErr("invalid amount asset id")))
292295 let priceAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kRequestPriceAssetId(requestId)), wrapErr("invalid amount price id")))
293296 $Tuple2(amountAssetId, priceAssetId)
294297 }
295298
296299
297300 func getAccountOwnerPublicKey (accountAddress) = {
298301 let requestId = getRequestId(accountAddress)
299302 let requestOwnerPublicKey = valueOrErrorMessage(getBinary(factoryAddress, kRequestOwnerPublicKey(requestId)), wrapErr("invalid amount asset id"))
300303 requestOwnerPublicKey
301304 }
302305
303306
304307 @Callable(i)
305308 func init (factoryAddressStr) = {
306309 let checkCaller = mustThis(i.caller)
307310 if ((checkCaller == checkCaller))
308311 then $Tuple2([StringEntry(kFactoryAddress, factoryAddressStr)], unit)
309312 else throw("Strict value is not equal to itself.")
310313 }
311314
312315
313316
314317 @Callable(i)
315318 func requestAccount (callerPublicKey,args) = {
316319 let ckecks = [if (!(shutdown))
317320 then true
318321 else throwErr("not allowed"), mustFactory(i.caller)]
319322 if ((ckecks == ckecks))
320323 then {
321324 let amountAssetIdStr = args[0]
322325 let priceAssetIdStr = args[1]
326+ let leverage = valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid leverage"))
323327 let userAddress = addressFromPublicKey(callerPublicKey)
324328 let requestId = sha256(((userAddress.bytes + fromBase58String(amountAssetIdStr)) + fromBase58String(priceAssetIdStr)))
325329 let amountAssetId = parseAssetId(amountAssetIdStr)
326330 let priceAssetId = parseAssetId(priceAssetIdStr)
327331 let userRequestsNumber = (size(kRequestsByOwner(userAddress)) / queueItemSize)
328332 let checks = [if ((size(i.payments) == 1))
329333 then true
330334 else throwErr("1 payment is required"), if ((i.payments[0].assetId == unit))
331335 then true
332336 else throwErr("invalid asset"), if ((i.payments[0].amount == rewardAmount()))
333337 then true
334338 else throwErr("invalid amount"), if (pairAllowed(amountAssetId, priceAssetId))
335339 then true
336340 else throwErr("pair is not allowed"), if ((getInteger(factoryAddress, kRequestStatus(requestId)) == unit))
337341 then true
338342 else throwErr("account is already exists"), if ((accountsLimit() > userRequestsNumber))
339343 then true
340344 else throwErr(("accounts limit is " + toString(accountsLimit())))]
341345 if ((checks == checks))
342346 then {
343- let $t01147512831 = if ((size(accountsQueue()) == 0))
344- then $Tuple2([ScriptTransfer(factoryAddress, rewardAmount(), unit)], [invoke(factoryAddress, "integerEntry", [kRequestStatus(requestId), REQUEST_STATUS_EMPTY], nil), invoke(factoryAddress, "binaryEntry", [kRequestsQueue(), (requestsQueue() + requestId)], nil)])
347+ let $t01172813262 = if ((size(accountsQueue()) == 0))
348+ 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)])
345349 else {
346350 let accountPublicKey = take(accountsQueue(), queueItemSize)
347351 let accountAddress = addressFromPublicKey(accountPublicKey)
348352 let creatorAddress = addressFromPublicKey(valueOrErrorMessage(getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)), wrapErr("invalid creator public key")))
349- $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)])
353+ $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)])
350354 }
351- let actions = $t01147512831._1
352- let factoryActions = $t01147512831._2
355+ let actions = $t01172813262._1
356+ let factoryActions = $t01172813262._2
353357 $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)]))
354358 }
355359 else throw("Strict value is not equal to itself.")
356360 }
357361 else throw("Strict value is not equal to itself.")
358362 }
359363
360364
361365
362366 @Callable(i)
363367 func addAccount (callerPublicKey,args) = {
364368 let ckecks = [if (!(shutdown))
365369 then true
366370 else throwErr("not allowed"), mustFactory(i.caller)]
367371 if ((ckecks == ckecks))
368372 then {
369373 let creatorPublicKey = fromBase58String(args[0])
370374 let accountPublicKey = callerPublicKey
371375 let accountAddress = addressFromPublicKey(callerPublicKey)
372376 let creatorAddress = addressFromPublicKey(creatorPublicKey)
373377 let checks = [if ((getBinary(factoryAddress, kAccountCreatorPublicKey(accountAddress)) == unit))
374378 then true
375379 else throwErr("account is already exists"), if ( match scriptHash(accountAddress) {
376380 case b: ByteVector =>
377381 (b == blake2b256_32Kb(accountScript()))
378382 case _ =>
379383 false
380384 })
381385 then true
382386 else throwErr("invalid script")]
383387 if ((checks == checks))
384388 then {
385- let $t01408615088 = if ((size(requestsQueue()) == 0))
389+ let $t01451715759 = if ((size(requestsQueue()) == 0))
386390 then $Tuple2(nil, [invoke(factoryAddress, "binaryEntry", [kAccountsQueue(), (accountsQueue() + accountPublicKey)], nil)])
387391 else {
388392 let requestId = take(requestsQueue(), queueItemSize)
389- $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)])
393+ let leverage = valueOrErrorMessage(getInteger(factoryAddress, kRequestLeverage(requestId)), wrapErr("request's leverage is undefined"))
394+ $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)])
390395 }
391- let actions = $t01408615088._1
392- let factoryActions = $t01408615088._2
396+ let actions = $t01451715759._1
397+ let factoryActions = $t01451715759._2
393398 $Tuple2(actions, (factoryActions ++ [invoke(factoryAddress, "binaryEntry", [kAccountCreatorPublicKey(accountAddress), creatorPublicKey], nil)]))
394399 }
395400 else throw("Strict value is not equal to itself.")
396401 }
397402 else throw("Strict value is not equal to itself.")
398403 }
399404
400405
401406
402407 @Callable(i)
403408 func deposit (callerPublicKey,args) = {
404409 let payment = i.payments[0]
405410 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
406411 let ckecks = [if (!(shutdown))
407412 then true
408413 else throwErr("not allowed"), mustFactory(i.caller), if ((size(i.payments) == 1))
409414 then true
410415 else throwErr("1 payment is required"), if ((payment.assetId == usdtAssetId))
411416 then true
412417 else throwErr("invalid asset"), if ((getInteger(factoryAddress, kRequestStatus(getRequestId(accountAddress))) == REQUEST_STATUS_READY))
413418 then true
414419 else throwErr("account is not ready")]
415420 if ((ckecks == ckecks))
416421 then {
417422 let actions = [ScriptTransfer(accountAddress, payment.amount, payment.assetId)]
418423 let factoryActions = [invoke(factoryAddress, "integerEntry", [kDeposited(accountAddress), (valueOrElse(depositedOption(accountAddress), 0) + payment.amount)], nil)]
419424 $Tuple2(actions, factoryActions)
420425 }
421426 else throw("Strict value is not equal to itself.")
422427 }
423428
424429
425430
426431 @Callable(i)
427432 func withdraw (callerPublicKey,args) = {
428433 let ckecks = [if (!(shutdown))
429434 then true
430435 else throwErr("not allowed"), mustFactory(i.caller)]
431436 if ((ckecks == ckecks))
432437 then {
433438 let userAddress = addressFromPublicKey(callerPublicKey)
434439 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
435440 let amount = valueOrErrorMessage(parseInt(args[1]), wrapErr("invalid amount"))
436441 let assetId = parseAssetId(args[2])
437442 let invocations = [invoke(accountAddress, "transferAsset", [userAddress.bytes, amount, assetId], nil)]
438443 $Tuple2(nil, invocations)
439444 }
440445 else throw("Strict value is not equal to itself.")
441446 }
442447
443448
444449
445450 @Callable(i)
446451 func borrow (callerPublicKey,args) = {
447452 let accountAddress = valueOrErrorMessage(addressFromString(args[0]), wrapErr("invalid account address"))
448453 let assetIdRequested = parseAssetId(args[1])
449454 let amountRequested = ensurePositive(valueOrErrorMessage(parseInt(args[2]), wrapErr("invalid requested amount")), "requested amount")
450455 let accountOwnerPublicKey = getAccountOwnerPublicKey(accountAddress)
451456 let userAddress = addressFromPublicKey(callerPublicKey)
452457 let ckecks = [if (!(shutdown))
453458 then true
454459 else throwErr("not allowed"), mustFactory(i.caller), if ((callerPublicKey == accountOwnerPublicKey))
455460 then true
456461 else throwErr("can be called by account owner only")]
457462 if ((ckecks == ckecks))
458463 then {
459464 let amountAssetId = getAccountAssets(accountAddress)._1
460465 let deposited = toX18(valueOrElse(depositedOption(accountAddress), 0), pow10Decimals(usdtAssetId))
461466 let currentPrice = toX18(getCurrentPrice(amountAssetId), pow10Decimals(usdtAssetId))
462467 let creditA = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, amountAssetId)), 0), pow10Decimals(amountAssetId))
463468 let creditB = toX18(valueOrElse(getInteger(factoryAddress, kCredit(accountAddress, usdtAssetId)), 0), pow10Decimals(usdtAssetId))
464469 let totalCredit = calcTotalCredit(creditA, creditB, currentPrice)
465- let leverageDefault = 3
466- let leverage = toX18(valueOrElse(getInteger(factoryAddress, kLeverage(accountAddress)), leverageDefault), 1)
470+ let leverage = toX18(valueOrErrorMessage(getInteger(factoryAddress, kLeverage(accountAddress)), wrapErr("leverage should be defined")), 1)
467471 let creditAvailableUsdt = calcCreditAvailable(deposited, leverage, totalCredit)
468472 let creditAvailable = if ((assetIdRequested == amountAssetId))
469473 then fromX18(fraction(creditAvailableUsdt, mult18BigInt, currentPrice), pow10Decimals(amountAssetId))
470474 else if ((assetIdRequested == usdtAssetId))
471475 then fromX18(creditAvailableUsdt, pow10Decimals(usdtAssetId))
472476 else throwErr("invalid requested asset id")
473477 let syntheticAssetId = parseAssetId(valueOrErrorMessage(getString(factoryAddress, kSyntheticAssetId(assetIdRequested)), wrapErr("synthetic asset for requested asset is undefined")))
474478 let amountToSend = if ((creditAvailable >= amountRequested))
475479 then amountRequested
476480 else throwErr(("credit available = " + toString(creditAvailable)))
477481 let factoryActions = [invoke(factoryAddress, "integerEntry", [kCredit(accountAddress, assetIdRequested), (valueOrElse(creditOption(accountAddress, assetIdRequested), 0) + amountToSend)], nil), invoke(factoryAddress, "transferAsset", [userAddress.bytes, amountToSend, syntheticAssetId], nil)]
478482 $Tuple2(nil, [factoryActions, creditAvailable])
479483 }
480484 else throw("Strict value is not equal to itself.")
481485 }
482486
483487
484488
485489 @Callable(i)
486490 func repay (callerPublicKey,args) = {
487491 let ckecks = [if (!(shutdown))
488492 then true
489493 else throwErr("not allowed"), mustFactory(i.caller)]
490494 if ((ckecks == ckecks))
491495 then $Tuple2(nil, unit)
492496 else throw("Strict value is not equal to itself.")
493497 }
494498
495499
496500
497501 @Callable(i)
498502 func setPairAllowance (callerPublicKey,args) = {
499503 let ckecks = [if (!(shutdown))
500504 then true
501505 else throwErr("not allowed"), mustFactory(i.caller), mustAdmin(callerPublicKey)]
502506 if ((ckecks == ckecks))
503507 then {
504508 let amountAssetIdStr = args[0]
505509 let priceAssetIdStr = args[1]
506510 let allowStr = args[2]
507511 let amountAssetId = parseAssetId(amountAssetIdStr)
508512 let priceAssetId = parseAssetId(priceAssetIdStr)
509513 let allow = (allowStr == "true")
510514 let invocations = [invoke(factoryAddress, "booleanEntry", [kPairAllowed(amountAssetId, priceAssetId), allow], nil)]
511515 $Tuple2(nil, invocations)
512516 }
513517 else throw("Strict value is not equal to itself.")
514518 }
515519
516520
517521
518522 @Callable(i)
519523 func addSyntheticAsset (callerPublicKey,args) = {
520524 let baseAssetId = parseAssetId(args[0])
521525 let syntheticAssetId = parseAssetId(args[1])
522526 let ckecks = [if (!(shutdown))
523527 then true
524528 else throwErr("not allowed"), mustFactory(i.caller), mustAdmin(callerPublicKey), if ((getString(factoryAddress, kSyntheticAssetId(baseAssetId)) == unit))
525529 then true
526530 else throwErr("invalid base asset"), if ((getString(factoryAddress, kBaseAssetId(syntheticAssetId)) == unit))
527531 then true
528532 else throwErr("invalid synthetic asset")]
529533 if ((ckecks == ckecks))
530534 then {
531535 let invocations = [invoke(factoryAddress, "stringEntry", [kSyntheticAssetId(baseAssetId), assetIdToString(syntheticAssetId)], nil), invoke(factoryAddress, "stringEntry", [kBaseAssetId(syntheticAssetId), assetIdToString(baseAssetId)], nil)]
532536 $Tuple2(nil, invocations)
533537 }
534538 else throw("Strict value is not equal to itself.")
535539 }
536540
537541
538542
539543 @Callable(i)
540544 func doShutdown (callerPublicKey,args) = {
541545 let checks = [mustFactory(i.caller), mustAdmin(callerPublicKey)]
542546 if ((checks == checks))
543547 then {
544548 let invocations = [invoke(factoryAddress, "booleanEntry", [kShutdown, true], nil)]
545549 $Tuple2(nil, invocations)
546550 }
547551 else throw("Strict value is not equal to itself.")
548552 }
549553
550554
551555 @Verifier(tx)
552556 func verify () = if (if (isDefined(factoryAddressOption))
553557 then isDefined(getString(factoryAddress, kMultisig))
554558 else false)
555559 then match getString(factoryAddress, kMultisig) {
556560 case multisig: String =>
557561 let statusKey = kStatus(toString(this), toBase58String(tx.id))
558562 let status = valueOrElse(getBoolean(addressFromStringValue(multisig), statusKey), false)
559563 status
560564 case _ =>
561565 false
562566 }
563567 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
564568

github/deemru/w8io/169f3d6 
70.66 ms