tx · 9LcQaLNXkXYqtYStNyvvREGvA84mY4gSubqhHMwgY85V

3MzGPAZokuNfqjMuP7yDXFATZjhjtEP5UCa:  -0.03700000 Waves

2023.03.23 21:29 [2503003] smart account 3MzGPAZokuNfqjMuP7yDXFATZjhjtEP5UCa > SELF 0.00000000 Waves

{ "type": 13, "id": "9LcQaLNXkXYqtYStNyvvREGvA84mY4gSubqhHMwgY85V", "fee": 3700000, "feeAssetId": null, "timestamp": 1679596205081, "version": 2, "chainId": 84, "sender": "3MzGPAZokuNfqjMuP7yDXFATZjhjtEP5UCa", "senderPublicKey": "4EBKd2zSCvpiSLeyovT5FUuMvGpi6oxdBAbvQybSYi6p", "proofs": [ "3rQZFkvsTM34TshY89Sion6DnnqAkxstgMUKBAamMXxTZ2dHADMmxc2gXmPfKeJviuXPMd3MdA918Hd7GrjKYbHo" ], "script": "base64:BgJgCAISBAoCCAgSAwoBCBIAEgMKAQgSDgoMCAEBAQEBAQgBAQEBEgsKCQgBAQEIAQEBARIFCgMICAESCAoGCAgBAQEBEg0KCwgIAQEBAQEBCAgBEgMKAQESAwoBARIDCgEBQgAUa19jb29yZGluYXRvckFkZHJlc3MCFGtfY29vcmRpbmF0b3JBZGRyZXNzAA9rX2FkbWluX2FkZHJlc3MCD2tfYWRtaW5fYWRkcmVzcwANa19xdW90ZV9hc3NldAINa19xdW90ZV9hc3NldAAFa19hbW0CBWtfYW1tABFrX21hbmFnZXJfYWRkcmVzcwIRa19tYW5hZ2VyX2FkZHJlc3MAEmtfcG9zaXRpb25TZXF1ZW5jZQISa19wb3NpdGlvblNlcXVlbmNlAA5rX3Bvc2l0aW9uU2l6ZQIOa19wb3NpdGlvblNpemUAEGtfZXhlY3V0ZWRPcmRlcnMCEGtfZXhlY3V0ZWRPcmRlcnMAEGtfY2FuY2VsZWRPcmRlcnMCEGtfY2FuY2VsZWRPcmRlcnMAB2tfb3JkZXICB2tfb3JkZXIADmtfb3JkZXJSZXF1ZXN0AgprX29yZGVyUmVxAA1r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2VzcwkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAEDmNvb3JkaW5hdG9yU3RyCQCdCAIFBHRoaXMFFGtfY29vcmRpbmF0b3JBZGRyZXNzAwkBCWlzRGVmaW5lZAEFDmNvb3JkaW5hdG9yU3RyBAVhZG1pbgkAnQgCCQERQGV4dHJOYXRpdmUoMTA2MikBCQEFdmFsdWUBBQ5jb29yZGluYXRvclN0cgUPa19hZG1pbl9hZGRyZXNzAwkBCWlzRGVmaW5lZAEFBWFkbWluCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEJAQV2YWx1ZQEFBWFkbWluCQCsAgIJAKwCAgkArAICAgdzdGF0dXNfCQClCAEFBHRoaXMCAV8JANgEAQgFAnR4AmlkBwkAAgECLnVuYWJsZSB0byB2ZXJpZnk6IGFkbWluIG5vdCBzZXQgaW4gY29vcmRpbmF0b3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXk4/OYT", "height": 2503003, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: ED8H92iHUuNVXbc1JqPsV7FJVe87wKAUMxhtLrbD1XXU Next: 8BvDNGLK6j3Up8oKjGFsGXPwf8869XzRh48XkMdCuD2Z Diff:
OldNewDifferences
514514
515515
516516 @Callable(i)
517-func internalCreateOrder (_trader,_amm,_type,_triggerPrice,_limitPrice,_amountIn,_leverage,_side,_refLink,_paymentAssetId,_paymentAmount) = if (if (if (if (if (if (if (if (if (!(initialized()))
518- then true
519- else !(isWhitelist(_amm)))
520- then true
521- else (0 >= _triggerPrice))
522- then true
523- else (0 > _limitPrice))
524- then true
525- else (0 >= _amountIn))
526- then true
527- else (0 > _leverage))
528- then true
529- else !(if ((_side == LONG))
517+func internalCreateOrder (_trader,_amm,_type,_triggerPrice,_limitPrice,_amountIn,_leverage,_side,_refLink,_paymentAssetId,_paymentAmount) = {
518+ let x1 = toString(!(initialized()))
519+ let x2 = toString(!(isWhitelist(_amm)))
520+ let x3 = toString((0 >= _triggerPrice))
521+ let x4 = toString((0 > _limitPrice))
522+ let x5 = toString((0 >= _amountIn))
523+ let x6 = toString((0 > _leverage))
524+ let x7 = toString(!(if ((_side == LONG))
530525 then true
531526 else (_side == SHORT)))
532- then true
533- else !(if (if ((_type == STOP))
527+ let x8 = toString(!(if (if ((_type == STOP))
534528 then true
535529 else (_type == TAKE))
536530 then true
537531 else (_type == LIMIT)))
538- then true
539- else !((i.caller == this)))
540- then throw("Invalid internalCreateOrder parameters")
541- else {
542- let orderId = (currentOrderId() + 1)
543- let positionDirection = getPositionDirection(_side, _type)
544- let newTraderOrderCount = (getTraderOrderCount(_amm, _trader) + 1)
545- let positionSize = getPositionSize(_amm, _trader, positionDirection)
546- let _direction = if (if (if ((positionSize == 0))
532+ let x9 = toString(!((i.caller == this)))
533+ let all = makeString([x1, x2, x3, x4, x5, x6, x7, x8, x9], ",")
534+ if (if (if (if (if (if (if (if (if (!(initialized()))
535+ then true
536+ else !(isWhitelist(_amm)))
537+ then true
538+ else (0 >= _triggerPrice))
539+ then true
540+ else (0 > _limitPrice))
541+ then true
542+ else (0 >= _amountIn))
543+ then true
544+ else (0 > _leverage))
545+ then true
546+ else !(if ((_side == LONG))
547547 then true
548- else if ((positionSize > 0))
549- then (_side == LONG)
548+ else (_side == SHORT)))
549+ then true
550+ else !(if (if ((_type == STOP))
551+ then true
552+ else (_type == TAKE))
553+ then true
554+ else (_type == LIMIT)))
555+ then true
556+ else !((i.caller == this)))
557+ then throw(("Invalid internalCreateOrder parameters " + all))
558+ else {
559+ let orderId = (currentOrderId() + 1)
560+ let positionDirection = getPositionDirection(_side, _type)
561+ let newTraderOrderCount = (getTraderOrderCount(_amm, _trader) + 1)
562+ let positionSize = getPositionSize(_amm, _trader, positionDirection)
563+ let _direction = if (if (if ((positionSize == 0))
564+ then true
565+ else if ((positionSize > 0))
566+ then (_side == LONG)
567+ else false)
568+ then true
569+ else if ((0 > positionSize))
570+ then (_side == SHORT)
571+ else false)
572+ then INCREASE
573+ else DECREASE
574+ if (if ((positionSize == 0))
575+ then if ((_type == STOP))
576+ then true
577+ else (_type == TAKE)
550578 else false)
551- then true
552- else if ((0 > positionSize))
553- then (_side == SHORT)
554- else false)
555- then INCREASE
556- else DECREASE
557- if (if ((positionSize == 0))
558- then if ((_type == STOP))
559- then true
560- else (_type == TAKE)
561- else false)
562- then throw("Can not create STOP/TAKE order: no position")
563- else {
564- let usdnPayment = if ((_direction == INCREASE))
565- then if (if ((_paymentAssetId != toBase58String(quoteAsset())))
566- then true
567- else (_paymentAmount != _amountIn))
568- then throw("Invalid createLimitOrder parameters: invalid payment")
569- else {
570- let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _paymentAmount)])
571- if ((stake == stake))
572- then _paymentAmount
573- else throw("Strict value is not equal to itself.")
579+ then throw("Can not create STOP/TAKE order: no position")
580+ else {
581+ let usdnPayment = if ((_direction == INCREASE))
582+ then if (if ((_paymentAssetId != toBase58String(quoteAsset())))
583+ then true
584+ else (_paymentAmount != _amountIn))
585+ then throw("Invalid createLimitOrder parameters: invalid payment")
586+ else {
587+ let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _paymentAmount)])
588+ if ((stake == stake))
589+ then _paymentAmount
590+ else throw("Strict value is not equal to itself.")
591+ }
592+ else 0
593+ if ((usdnPayment == usdnPayment))
594+ then {
595+ let positionId = if ((positionSize != 0))
596+ then getPositionId(_amm, _trader, positionDirection)
597+ else 0
598+ if (if (if ((_type == STOP))
599+ then true
600+ else (_type == TAKE))
601+ then (positionId == 0)
602+ else false)
603+ then throw("STOP and TAKE order should be assigned to position with id != 0")
604+ else if ((newTraderOrderCount > MAX_TRADER_ORDERS_PER_AMM))
605+ then throw("Invalid createLimitOrder parameters: order count")
606+ else {
607+ let changeSet = (((saveOrder(orderId, _amm, _trader, _amountIn, _leverage, _type, _triggerPrice, usdnPayment, _side, _refLink, positionId, _limitPrice) ++ addRemoveOrderId(orderId, _amm, _trader, true)) ++ updateTraderOrderCount(_amm, _trader, newTraderOrderCount)) ++ updateLastOrderId(orderId))
608+ $Tuple2(changeSet, orderId)
609+ }
574610 }
575- else 0
576- if ((usdnPayment == usdnPayment))
577- then {
578- let positionId = if ((positionSize != 0))
579- then getPositionId(_amm, _trader, positionDirection)
580- else 0
581- if (if (if ((_type == STOP))
582- then true
583- else (_type == TAKE))
584- then (positionId == 0)
585- else false)
586- then throw("STOP and TAKE order should be assigned to position with id != 0")
587- else if ((newTraderOrderCount > MAX_TRADER_ORDERS_PER_AMM))
588- then throw("Invalid createLimitOrder parameters: order count")
589- else {
590- let changeSet = (((saveOrder(orderId, _amm, _trader, _amountIn, _leverage, _type, _triggerPrice, usdnPayment, _side, _refLink, positionId, _limitPrice) ++ addRemoveOrderId(orderId, _amm, _trader, true)) ++ updateTraderOrderCount(_amm, _trader, newTraderOrderCount)) ++ updateLastOrderId(orderId))
591- $Tuple2(changeSet, orderId)
592- }
593- }
594- else throw("Strict value is not equal to itself.")
595- }
596- }
611+ else throw("Strict value is not equal to itself.")
612+ }
613+ }
614+ }
597615
598616
599617
600618 @Callable(i)
601619 func cancelOrder (_orderId) = {
602- let $t02327123490 = getOrder(_orderId)
603- let _amm = $t02327123490._1
604- let _trader = $t02327123490._2
605- let _amountIn = $t02327123490._3
606- let _leverage = $t02327123490._4
607- let _type = $t02327123490._5
608- let _triggerPrice = $t02327123490._6
609- let _amountUsdn = $t02327123490._7
610- let _side = $t02327123490._8
611- let _refLink = $t02327123490._9
612- let _positionId = $t02327123490._10
613- let _limitPrice = $t02327123490._11
620+ let $t02378624005 = getOrder(_orderId)
621+ let _amm = $t02378624005._1
622+ let _trader = $t02378624005._2
623+ let _amountIn = $t02378624005._3
624+ let _leverage = $t02378624005._4
625+ let _type = $t02378624005._5
626+ let _triggerPrice = $t02378624005._6
627+ let _amountUsdn = $t02378624005._7
628+ let _side = $t02378624005._8
629+ let _refLink = $t02378624005._9
630+ let _positionId = $t02378624005._10
631+ let _limitPrice = $t02378624005._11
614632 if (if (if (!(initialized()))
615633 then true
616634 else !(isValid(_orderId)))
644662
645663 @Callable(i)
646664 func executeOrder (_orderId) = {
647- let $t02468824907 = getOrder(_orderId)
648- let _amm = $t02468824907._1
649- let _trader = $t02468824907._2
650- let _amountIn = $t02468824907._3
651- let _leverage = $t02468824907._4
652- let _type = $t02468824907._5
653- let _triggerPrice = $t02468824907._6
654- let _amountUsdn = $t02468824907._7
655- let _side = $t02468824907._8
656- let _refLink = $t02468824907._9
657- let _positionId = $t02468824907._10
658- let _limitPrice = $t02468824907._11
665+ let $t02520325422 = getOrder(_orderId)
666+ let _amm = $t02520325422._1
667+ let _trader = $t02520325422._2
668+ let _amountIn = $t02520325422._3
669+ let _leverage = $t02520325422._4
670+ let _type = $t02520325422._5
671+ let _triggerPrice = $t02520325422._6
672+ let _amountUsdn = $t02520325422._7
673+ let _side = $t02520325422._8
674+ let _refLink = $t02520325422._9
675+ let _positionId = $t02520325422._10
676+ let _limitPrice = $t02520325422._11
659677 let cleanUp = invoke(this, "cleanUpStaleOrders", [_amm, _trader], nil)
660678 if ((cleanUp == cleanUp))
661679 then {
671689 let currentPositionId = if ((positionSize != 0))
672690 then getPositionId(_amm, _trader, positionDirection)
673691 else 0
674- let $t02541428792 = if ((_type == STOP))
692+ let $t02592929307 = if ((_type == STOP))
675693 then {
676694 let _positionDirection = if ((positionSize > 0))
677695 then LONG
728746 else throw("Can not execute LIMIT order: triggerPrice mismatch")
729747 }
730748 else throw(("Invalid order type: " + toString(_type)))
731- let method = $t02541428792._1
732- let args = $t02541428792._2
733- let payments = $t02541428792._3
749+ let method = $t02592929307._1
750+ let args = $t02592929307._2
751+ let payments = $t02592929307._3
734752 let withdraw = if ((size(payments) == 1))
735753 then {
736754 let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), payments[0].amount], nil)
764782 else LONG
765783 let makeTakeOrder = if (haveOrderRequest(_orderId, TAKE))
766784 then {
767- let $t02975429953 = getOrderRequest(_orderId, TAKE)
768- let newOrderId = $t02975429953._1
769- let newAmm = $t02975429953._2
770- let newTrader = $t02975429953._3
771- let newType = $t02975429953._4
772- let newTriggerPrice = $t02975429953._5
773- let newLimitPrice = $t02975429953._6
785+ let $t03026930468 = getOrderRequest(_orderId, TAKE)
786+ let newOrderId = $t03026930468._1
787+ let newAmm = $t03026930468._2
788+ let newTrader = $t03026930468._3
789+ let newType = $t03026930468._4
790+ let newTriggerPrice = $t03026930468._5
791+ let newLimitPrice = $t03026930468._6
774792 let doCall = invoke(this, "internalCreateOrder", [newTrader, newAmm, newType, newTriggerPrice, newLimitPrice, positionSizeDelta, 0, closeOrderSide, "", "", 0], nil)
775793 if ((doCall == doCall))
776794 then nil
781799 then {
782800 let makeStopOrder = if (haveOrderRequest(_orderId, STOP))
783801 then {
784- let $t03050930708 = getOrderRequest(_orderId, STOP)
785- let newOrderId = $t03050930708._1
786- let newAmm = $t03050930708._2
787- let newTrader = $t03050930708._3
788- let newType = $t03050930708._4
789- let newTriggerPrice = $t03050930708._5
790- let newLimitPrice = $t03050930708._6
802+ let $t03102431223 = getOrderRequest(_orderId, STOP)
803+ let newOrderId = $t03102431223._1
804+ let newAmm = $t03102431223._2
805+ let newTrader = $t03102431223._3
806+ let newType = $t03102431223._4
807+ let newTriggerPrice = $t03102431223._5
808+ let newLimitPrice = $t03102431223._6
791809 let doCall = invoke(this, "internalCreateOrder", [newTrader, newAmm, newType, newTriggerPrice, newLimitPrice, positionSizeDelta, 0, closeOrderSide, "", "", 0], nil)
792810 if ((doCall == doCall))
793811 then nil
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let k_coordinatorAddress = "k_coordinatorAddress"
55
66 let k_admin_address = "k_admin_address"
77
88 let k_quote_asset = "k_quote_asset"
99
1010 let k_amm = "k_amm"
1111
1212 let k_manager_address = "k_manager_address"
1313
1414 let k_positionSequence = "k_positionSequence"
1515
1616 let k_positionSize = "k_positionSize"
1717
1818 let k_executedOrders = "k_executedOrders"
1919
2020 let k_canceledOrders = "k_canceledOrders"
2121
2222 let k_order = "k_order"
2323
2424 let k_orderRequest = "k_orderReq"
2525
2626 let k_lastOrderId = "k_lastOrderId"
2727
2828 let k_traderOrderCnt = "k_traderOrderCnt"
2929
3030 let k_traderOrderIds = "k_traderOrderIds"
3131
3232 let k_sender = "k_sender"
3333
3434 let k_initialized = "k_initialized"
3535
3636 let STOP = 1
3737
3838 let TAKE = 2
3939
4040 let LIMIT = 3
4141
4242 let LONG = 1
4343
4444 let SHORT = 2
4545
4646 let INCREASE = 1
4747
4848 let DECREASE = 2
4949
5050 let MAX_TRADER_ORDERS_PER_AMM = 10
5151
5252 let TIME = lastBlock.timestamp
5353
5454 let DECIMAL_UNIT = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
5555
5656 let SPREAD_LIMIT = (DECIMAL_UNIT / 200)
5757
5858 func abs (_x) = if ((_x > 0))
5959 then _x
6060 else -(_x)
6161
6262
6363 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
6464
6565
6666 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
6767
6868
6969 func minv (_x,_y) = if ((_x > _y))
7070 then _y
7171 else _x
7272
7373
7474 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
7575
7676
7777 func executedOrderKey (_orderId) = ((k_executedOrders + "_") + toString(_orderId))
7878
7979
8080 func canceledOrderKey (_orderId) = ((k_canceledOrders + "_") + toString(_orderId))
8181
8282
8383 func orderKey (_orderId) = toCompositeKey(k_order, toString(_orderId))
8484
8585
8686 func orderRequestKey (_orderId,_type) = ((((k_orderRequest + "_") + toString(_orderId)) + "_") + toString(_type))
8787
8888
8989 func traderOrderCountKey (_amm,_trader) = ((((k_traderOrderCnt + "_") + _amm) + "_") + _trader)
9090
9191
9292 func traderOrderIdsKey (_amm,_trader) = ((((k_traderOrderIds + "_") + _amm) + "_") + _trader)
9393
9494
9595 func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set")
9696
9797
9898 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
9999
100100
101101 func managerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_manager_address)), "Manager not set")
102102
103103
104104 func isWhitelist (_address) = valueOrElse(getBoolean(coordinator(), toCompositeKey(k_amm, _address)), false)
105105
106106
107107 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
108108
109109
110110 func isValid (_orderId) = if (valueOrElse(getBoolean(this, executedOrderKey(_orderId)), false))
111111 then throw(("Order already executed: " + toString(_orderId)))
112112 else if (valueOrElse(getBoolean(this, canceledOrderKey(_orderId)), false))
113113 then throw(("Order already cancelled: " + toString(_orderId)))
114114 else true
115115
116116
117117 func currentOrderId () = valueOrElse(getInteger(this, k_lastOrderId), 0)
118118
119119
120120 func getTraderOrderCount (_amm,_trader) = {
121121 let key = traderOrderCountKey(_amm, _trader)
122122 valueOrElse(getInteger(this, key), 0)
123123 }
124124
125125
126126 func traderAmmOrdersIds (_amm,_trader) = {
127127 let key = traderOrderIdsKey(_amm, _trader)
128128 let val = valueOrElse(getString(this, key), "")
129129 if ((val == ""))
130130 then nil
131131 else split(val, ",")
132132 }
133133
134134
135135 func haveOrderRequest (_orderId,_type) = {
136136 let key = orderRequestKey(_orderId, _type)
137137 isDefined(getString(this, key))
138138 }
139139
140140
141141 func getOrderRequest (_orderId,_type) = {
142142 let key = orderRequestKey(_orderId, _type)
143143 let orderRequestStr = valueOrErrorMessage(getString(this, key), ("Not order request for key: " + key))
144144 let orderRequestPartList = split(orderRequestStr, ",")
145145 let orderId = valueOrErrorMessage(parseInt(orderRequestPartList[0]), "Invalid orderId")
146146 let amm = orderRequestPartList[1]
147147 let trader = orderRequestPartList[2]
148148 let type = valueOrErrorMessage(parseInt(orderRequestPartList[3]), "Invalid type")
149149 let triggerPrice = valueOrErrorMessage(parseInt(orderRequestPartList[4]), "Invalid triggerPrice")
150150 let limitPrice = valueOrErrorMessage(parseInt(orderRequestPartList[5]), "Invalid limitPrice")
151151 $Tuple6(orderId, amm, trader, type, triggerPrice, limitPrice)
152152 }
153153
154154
155155 func getOrder (_orderId) = {
156156 let orderStr = valueOrErrorMessage(getString(this, orderKey(_orderId)), ("Invalid order id: " + toString(_orderId)))
157157 let orderPartList = split(orderStr, ",")
158158 let amm = orderPartList[0]
159159 let trader = orderPartList[1]
160160 let amountIn = valueOrErrorMessage(parseInt(orderPartList[2]), "Invalid amountIn")
161161 let leverage = valueOrErrorMessage(parseInt(orderPartList[3]), "Invalid leverage")
162162 let type = valueOrErrorMessage(parseInt(orderPartList[4]), "Invalid type")
163163 let triggerPrice = valueOrErrorMessage(parseInt(orderPartList[5]), "Invalid triggerPrice")
164164 let paymentUsdn = valueOrErrorMessage(parseInt(orderPartList[6]), "Invalid paymentUsdn")
165165 let side = valueOrErrorMessage(parseInt(orderPartList[7]), "Invalid side")
166166 let refLink = orderPartList[8]
167167 let positionId = valueOrErrorMessage(parseInt(orderPartList[9]), "Invalid positionId")
168168 let limitPrice = valueOrErrorMessage(parseInt(orderPartList[10]), "Invalid limitPrice")
169169 $Tuple11(amm, trader, amountIn, leverage, type, triggerPrice, paymentUsdn, side, refLink, positionId, limitPrice)
170170 }
171171
172172
173173 func getMarketPrice (_amm) = {
174174 let s = invoke(addressFromStringValue(_amm), "computeSpotPrice", nil, nil)
175175 if ((s == s))
176176 then {
177177 let res = match s {
178178 case t: Int =>
179179 t
180180 case _ =>
181181 throw("Invalid computeSpotPrice result")
182182 }
183183 value(res)
184184 }
185185 else throw("Strict value is not equal to itself.")
186186 }
187187
188188
189189 func getFee (_amm,_trader) = {
190190 let s = invoke(addressFromStringValue(_amm), "computeFeeForTraderWithArtifact", [_trader, ""], nil)
191191 if ((s == s))
192192 then {
193193 let res = match s {
194194 case t: (Int, Boolean) =>
195195 t._1
196196 case _ =>
197197 throw("Invalid computeFeeForTraderWithArtifact result")
198198 }
199199 value(res)
200200 }
201201 else throw("Strict value is not equal to itself.")
202202 }
203203
204204
205205 func getPositionDirection (_orderSide,_orderType) = if (if ((_orderType == TAKE))
206206 then true
207207 else (_orderType == STOP))
208208 then if ((_orderSide == LONG))
209209 then SHORT
210210 else LONG
211211 else _orderSide
212212
213213
214214 func getPositionSize (_amm,_trader,_direction) = {
215215 let amm = addressFromStringValue(_amm)
216216 let positionKey = ((_trader + "_") + toString(_direction))
217217 let sizeKey = toCompositeKey(k_positionSize, positionKey)
218218 valueOrElse(getInteger(amm, sizeKey), 0)
219219 }
220220
221221
222222 func getPositionId (_amm,_trader,_direction) = {
223223 let amm = addressFromStringValue(_amm)
224224 let positionKey = ((_trader + "_") + toString(_direction))
225225 let seqKey = toCompositeKey(k_positionSequence, positionKey)
226226 valueOrElse(getInteger(amm, seqKey), 0)
227227 }
228228
229229
230230 func getSpread (_price) = muld(_price, SPREAD_LIMIT)
231231
232232
233233 func saveOrder (_orderId,_amm,_trader,_amountIn,_leverage,_type,_triggerPrice,_paymentUsdn,_side,_refLink,_positionId,_limitPrice) = {
234234 let orderStr = makeString([_amm, _trader, toString(_amountIn), toString(_leverage), toString(_type), toString(_triggerPrice), toString(_paymentUsdn), toString(_side), _refLink, toString(_positionId), toString(_limitPrice)], ",")
235235 [StringEntry(orderKey(_orderId), orderStr)]
236236 }
237237
238238
239239 func saveOrderRequest (_orderId,_amm,_trader,_type,_triggerPrice,_limitPrice) = {
240240 let orderReqStr = makeString([toString(_orderId), _amm, _trader, toString(_type), toString(_triggerPrice), toString(_limitPrice)], ",")
241241 [StringEntry(orderRequestKey(_orderId, _type), orderReqStr)]
242242 }
243243
244244
245245 func updateOrderIdStr (_orderIdsNewStr,_amm,_trader) = [StringEntry(traderOrderIdsKey(_amm, _trader), _orderIdsNewStr)]
246246
247247
248248 func addRemoveOrderIdList (_orderIds,_orderId,_amm,_trader,_add) = {
249249 let orderIdsNew = if (_add)
250250 then (_orderIds :+ toString(_orderId))
251251 else removeByIndex(_orderIds, valueOrErrorMessage(indexOf(_orderIds, toString(_orderId)), ("No order with id: " + toString(_orderId))))
252252 orderIdsNew
253253 }
254254
255255
256256 func addRemoveOrderId (_orderId,_amm,_trader,_add) = {
257257 let orderIds = traderAmmOrdersIds(_amm, _trader)
258258 let orderIdsNew = addRemoveOrderIdList(orderIds, _orderId, _amm, _trader, _add)
259259 let orderIdsNewStr = makeString(orderIdsNew, ",")
260260 updateOrderIdStr(orderIdsNewStr, _amm, _trader)
261261 }
262262
263263
264264 func updateTraderOrderCount (_amm,_trader,_count) = if ((0 > _count))
265265 then throw(("Invalid order count: " + toString(_count)))
266266 else [IntegerEntry(traderOrderCountKey(_amm, _trader), _count)]
267267
268268
269269 func updateLastOrderId (_lastOrderId) = [IntegerEntry(k_lastOrderId, _lastOrderId)]
270270
271271
272272 func markExecuteOrder (_orderId) = [BooleanEntry(toCompositeKey(k_executedOrders, toString(_orderId)), true)]
273273
274274
275275 func markCancelOrder (_orderId) = [BooleanEntry(toCompositeKey(k_canceledOrders, toString(_orderId)), true)]
276276
277277
278278 func getPositionIds (_amm,_trader) = {
279279 let longPositionSize = getPositionSize(_amm, _trader, LONG)
280280 let currentLongPositionId = if ((longPositionSize != 0))
281281 then getPositionId(_amm, _trader, LONG)
282282 else 0
283283 let shortPositionSize = getPositionSize(_amm, _trader, SHORT)
284284 let currentShortPositionId = if ((shortPositionSize != 0))
285285 then getPositionId(_amm, _trader, SHORT)
286286 else 0
287287 [currentLongPositionId, currentShortPositionId]
288288 }
289289
290290
291291 @Callable(i)
292292 func cleanUpStaleOrders (_amm,_trader) = {
293293 let orders = traderAmmOrdersIds(_amm, _trader)
294294 let positionIds = getPositionIds(_amm, _trader)
295295 func cleanUpOne (_acc,_orderId) = {
296296 let orderIdInt = valueOrErrorMessage(parseInt(_orderId), "Invalid order id")
297297 let $t01115611351 = getOrder(orderIdInt)
298298 let _x1 = $t01115611351._1
299299 let _x2 = $t01115611351._2
300300 let _x3 = $t01115611351._3
301301 let _x4 = $t01115611351._4
302302 let _type = $t01115611351._5
303303 let _x5 = $t01115611351._6
304304 let _x6 = $t01115611351._7
305305 let _x7 = $t01115611351._8
306306 let _x8 = $t01115611351._9
307307 let _positionId = $t01115611351._10
308308 let _x9 = $t01115611351._11
309309 if (if (if (if ((_type == STOP))
310310 then true
311311 else (_type == TAKE))
312312 then (positionIds[0] != _positionId)
313313 else false)
314314 then (positionIds[1] != _positionId)
315315 else false)
316316 then {
317317 let change = markCancelOrder(orderIdInt)
318318 let newOrderList = addRemoveOrderIdList(_acc._1, orderIdInt, _amm, _trader, false)
319319 $Tuple2(newOrderList, (_acc._2 ++ change))
320320 }
321321 else _acc
322322 }
323323
324324 let $t01170411779 = {
325325 let $l = orders
326326 let $s = size($l)
327327 let $acc0 = $Tuple2(orders, nil)
328328 func $f0_1 ($a,$i) = if (($i >= $s))
329329 then $a
330330 else cleanUpOne($a, $l[$i])
331331
332332 func $f0_2 ($a,$i) = if (($i >= $s))
333333 then $a
334334 else throw("List size exceeds 10")
335335
336336 $f0_2($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)
337337 }
338338 let newOrders = $t01170411779._1
339339 let cancelActions = $t01170411779._2
340340 ((cancelActions ++ updateTraderOrderCount(_amm, _trader, size(newOrders))) ++ updateOrderIdStr(makeString(newOrders, ","), _amm, _trader))
341341 }
342342
343343
344344
345345 @Callable(i)
346346 func setContext (_sender) = if ((i.caller != this))
347347 then throw("Only self-call")
348348 else [StringEntry(k_sender, _sender)]
349349
350350
351351
352352 @Callable(i)
353353 func resetContext () = if ((i.caller != this))
354354 then throw("Only self-call")
355355 else [DeleteEntry(k_sender)]
356356
357357
358358
359359 @Callable(i)
360360 func initialize (_coordinator) = if (if (initialized())
361361 then true
362362 else (i.caller != this))
363363 then throw("Unable to initialize")
364364 else [StringEntry(k_coordinatorAddress, toString(addressFromStringValue(_coordinator))), BooleanEntry(k_initialized, true)]
365365
366366
367367
368368 @Callable(i)
369369 func createOrder (_amm,_type,_triggerPrice,_limitPrice,_amountIn,_leverage,_side,_refLink,_stopTriggerPrice,_stopLimitPrice,_takeTriggerPrice,_takeLimitPrice) = {
370370 let _trader = toString(i.caller)
371371 let cleanUp = invoke(this, "cleanUpStaleOrders", [_amm, _trader], nil)
372372 if ((cleanUp == cleanUp))
373373 then if ((size(i.payments) > 1))
374374 then throw("Invalid createOrder parameters: invalid payment count")
375375 else {
376376 let $t01427514527 = if ((size(i.payments) == 1))
377377 then $Tuple2(toBase58String(valueOrErrorMessage(i.payments[0].assetId, "Invalid asset id")), i.payments[0].amount)
378378 else $Tuple2("", 0)
379379 let paymentAssetId = $t01427514527._1
380380 let paymentAmount = $t01427514527._2
381381 let doCall = invoke(this, "internalCreateOrder", [_trader, _amm, _type, _triggerPrice, _limitPrice, _amountIn, _leverage, _side, _refLink, paymentAssetId, paymentAmount], nil)
382382 if ((doCall == doCall))
383383 then {
384384 let orderId = match doCall {
385385 case t: Int =>
386386 t
387387 case _ =>
388388 throw("Invalid ID of created order")
389389 }
390390 if ((_type == LIMIT))
391391 then {
392392 let makeStop = if ((_stopTriggerPrice > 0))
393393 then {
394394 let doMakeStop = invoke(this, "internalCreateOrderRequest", [_trader, _amm, orderId, STOP, _stopTriggerPrice, _stopLimitPrice], nil)
395395 if ((doMakeStop == doMakeStop))
396396 then nil
397397 else throw("Strict value is not equal to itself.")
398398 }
399399 else nil
400400 let makeTake = if ((_takeTriggerPrice > 0))
401401 then {
402402 let doMakeTake = invoke(this, "internalCreateOrderRequest", [_trader, _amm, orderId, TAKE, _takeTriggerPrice, _takeLimitPrice], nil)
403403 if ((doMakeTake == doMakeTake))
404404 then nil
405405 else throw("Strict value is not equal to itself.")
406406 }
407407 else nil
408408 (makeStop ++ makeTake)
409409 }
410410 else nil
411411 }
412412 else throw("Strict value is not equal to itself.")
413413 }
414414 else throw("Strict value is not equal to itself.")
415415 }
416416
417417
418418
419419 @Callable(i)
420420 func increasePositionWithStopLoss (_amm,_direction,_leverage,_minBaseAssetAmount,_refLink,_stopTriggerPrice,_stopLimitPrice,_takeTriggerPrice,_takeLimitPrice) = {
421421 let _trader = toString(i.caller)
422422 let cleanUp = invoke(this, "cleanUpStaleOrders", [_amm, _trader], nil)
423423 if ((cleanUp == cleanUp))
424424 then if (if (!(initialized()))
425425 then true
426426 else !(isWhitelist(_amm)))
427427 then throw("Invalid increasePositionWithStopLoss parameters")
428428 else {
429429 let positionSize = getPositionSize(_amm, _trader, _direction)
430430 if ((positionSize != 0))
431431 then throw("Invalid increasePositionWithStopLoss parameters: only new position")
432432 else {
433433 let doSetContext = invoke(this, "setContext", [_trader], nil)
434434 if ((doSetContext == doSetContext))
435435 then {
436436 let doClosePosition = invoke(addressFromStringValue(_amm), "increasePosition", [_direction, _leverage, _minBaseAssetAmount, _refLink], i.payments)
437437 if ((doClosePosition == doClosePosition))
438438 then {
439439 let doResetContext = invoke(this, "resetContext", nil, nil)
440440 if ((doResetContext == doResetContext))
441441 then {
442442 let openedPositionSize = getPositionSize(_amm, _trader, _direction)
443443 if ((openedPositionSize == openedPositionSize))
444444 then {
445445 let amountIn = abs(openedPositionSize)
446446 let stopLossSide = if ((0 > openedPositionSize))
447447 then LONG
448448 else SHORT
449449 let doCreateStopOrder = if ((_stopTriggerPrice > 0))
450450 then {
451451 let doCreateStopOrder = invoke(this, "internalCreateOrder", [_trader, _amm, STOP, _stopTriggerPrice, _stopLimitPrice, amountIn, 0, stopLossSide, _refLink, "", 0], nil)
452452 if ((doCreateStopOrder == doCreateStopOrder))
453453 then nil
454454 else throw("Strict value is not equal to itself.")
455455 }
456456 else nil
457457 if ((doCreateStopOrder == doCreateStopOrder))
458458 then {
459459 let doCreateTakeOrder = if ((_takeTriggerPrice > 0))
460460 then {
461461 let doCreateTakeOrder = invoke(this, "internalCreateOrder", [_trader, _amm, TAKE, _takeTriggerPrice, _takeLimitPrice, amountIn, 0, stopLossSide, _refLink, "", 0], nil)
462462 if ((doCreateTakeOrder == doCreateTakeOrder))
463463 then nil
464464 else throw("Strict value is not equal to itself.")
465465 }
466466 else nil
467467 if ((doCreateTakeOrder == doCreateTakeOrder))
468468 then nil
469469 else throw("Strict value is not equal to itself.")
470470 }
471471 else throw("Strict value is not equal to itself.")
472472 }
473473 else throw("Strict value is not equal to itself.")
474474 }
475475 else throw("Strict value is not equal to itself.")
476476 }
477477 else throw("Strict value is not equal to itself.")
478478 }
479479 else throw("Strict value is not equal to itself.")
480480 }
481481 }
482482 else throw("Strict value is not equal to itself.")
483483 }
484484
485485
486486
487487 @Callable(i)
488488 func internalMarkOrderExecuted (_amm,_trader,_orderId) = if (if (if (!(initialized()))
489489 then true
490490 else !(isWhitelist(_amm)))
491491 then true
492492 else !((i.caller == this)))
493493 then throw("Invalid internalMarkOrderExecuted parameters")
494494 else {
495495 let newTraderOrderCount = (getTraderOrderCount(_amm, _trader) - 1)
496496 ((updateTraderOrderCount(_amm, _trader, newTraderOrderCount) ++ addRemoveOrderId(_orderId, _amm, _trader, false)) ++ markExecuteOrder(_orderId))
497497 }
498498
499499
500500
501501 @Callable(i)
502502 func internalCreateOrderRequest (_trader,_amm,_orderId,_type,_triggerPrice,_limitPrice) = if (if (if (if (if (!(initialized()))
503503 then true
504504 else !(isWhitelist(_amm)))
505505 then true
506506 else (0 >= _triggerPrice))
507507 then true
508508 else (0 > _limitPrice))
509509 then true
510510 else !((i.caller == this)))
511511 then throw("Invalid internalCreateOrderRequest parameters")
512512 else saveOrderRequest(_orderId, _amm, _trader, _type, _triggerPrice, _limitPrice)
513513
514514
515515
516516 @Callable(i)
517-func internalCreateOrder (_trader,_amm,_type,_triggerPrice,_limitPrice,_amountIn,_leverage,_side,_refLink,_paymentAssetId,_paymentAmount) = if (if (if (if (if (if (if (if (if (!(initialized()))
518- then true
519- else !(isWhitelist(_amm)))
520- then true
521- else (0 >= _triggerPrice))
522- then true
523- else (0 > _limitPrice))
524- then true
525- else (0 >= _amountIn))
526- then true
527- else (0 > _leverage))
528- then true
529- else !(if ((_side == LONG))
517+func internalCreateOrder (_trader,_amm,_type,_triggerPrice,_limitPrice,_amountIn,_leverage,_side,_refLink,_paymentAssetId,_paymentAmount) = {
518+ let x1 = toString(!(initialized()))
519+ let x2 = toString(!(isWhitelist(_amm)))
520+ let x3 = toString((0 >= _triggerPrice))
521+ let x4 = toString((0 > _limitPrice))
522+ let x5 = toString((0 >= _amountIn))
523+ let x6 = toString((0 > _leverage))
524+ let x7 = toString(!(if ((_side == LONG))
530525 then true
531526 else (_side == SHORT)))
532- then true
533- else !(if (if ((_type == STOP))
527+ let x8 = toString(!(if (if ((_type == STOP))
534528 then true
535529 else (_type == TAKE))
536530 then true
537531 else (_type == LIMIT)))
538- then true
539- else !((i.caller == this)))
540- then throw("Invalid internalCreateOrder parameters")
541- else {
542- let orderId = (currentOrderId() + 1)
543- let positionDirection = getPositionDirection(_side, _type)
544- let newTraderOrderCount = (getTraderOrderCount(_amm, _trader) + 1)
545- let positionSize = getPositionSize(_amm, _trader, positionDirection)
546- let _direction = if (if (if ((positionSize == 0))
532+ let x9 = toString(!((i.caller == this)))
533+ let all = makeString([x1, x2, x3, x4, x5, x6, x7, x8, x9], ",")
534+ if (if (if (if (if (if (if (if (if (!(initialized()))
535+ then true
536+ else !(isWhitelist(_amm)))
537+ then true
538+ else (0 >= _triggerPrice))
539+ then true
540+ else (0 > _limitPrice))
541+ then true
542+ else (0 >= _amountIn))
543+ then true
544+ else (0 > _leverage))
545+ then true
546+ else !(if ((_side == LONG))
547547 then true
548- else if ((positionSize > 0))
549- then (_side == LONG)
548+ else (_side == SHORT)))
549+ then true
550+ else !(if (if ((_type == STOP))
551+ then true
552+ else (_type == TAKE))
553+ then true
554+ else (_type == LIMIT)))
555+ then true
556+ else !((i.caller == this)))
557+ then throw(("Invalid internalCreateOrder parameters " + all))
558+ else {
559+ let orderId = (currentOrderId() + 1)
560+ let positionDirection = getPositionDirection(_side, _type)
561+ let newTraderOrderCount = (getTraderOrderCount(_amm, _trader) + 1)
562+ let positionSize = getPositionSize(_amm, _trader, positionDirection)
563+ let _direction = if (if (if ((positionSize == 0))
564+ then true
565+ else if ((positionSize > 0))
566+ then (_side == LONG)
567+ else false)
568+ then true
569+ else if ((0 > positionSize))
570+ then (_side == SHORT)
571+ else false)
572+ then INCREASE
573+ else DECREASE
574+ if (if ((positionSize == 0))
575+ then if ((_type == STOP))
576+ then true
577+ else (_type == TAKE)
550578 else false)
551- then true
552- else if ((0 > positionSize))
553- then (_side == SHORT)
554- else false)
555- then INCREASE
556- else DECREASE
557- if (if ((positionSize == 0))
558- then if ((_type == STOP))
559- then true
560- else (_type == TAKE)
561- else false)
562- then throw("Can not create STOP/TAKE order: no position")
563- else {
564- let usdnPayment = if ((_direction == INCREASE))
565- then if (if ((_paymentAssetId != toBase58String(quoteAsset())))
566- then true
567- else (_paymentAmount != _amountIn))
568- then throw("Invalid createLimitOrder parameters: invalid payment")
569- else {
570- let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _paymentAmount)])
571- if ((stake == stake))
572- then _paymentAmount
573- else throw("Strict value is not equal to itself.")
579+ then throw("Can not create STOP/TAKE order: no position")
580+ else {
581+ let usdnPayment = if ((_direction == INCREASE))
582+ then if (if ((_paymentAssetId != toBase58String(quoteAsset())))
583+ then true
584+ else (_paymentAmount != _amountIn))
585+ then throw("Invalid createLimitOrder parameters: invalid payment")
586+ else {
587+ let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _paymentAmount)])
588+ if ((stake == stake))
589+ then _paymentAmount
590+ else throw("Strict value is not equal to itself.")
591+ }
592+ else 0
593+ if ((usdnPayment == usdnPayment))
594+ then {
595+ let positionId = if ((positionSize != 0))
596+ then getPositionId(_amm, _trader, positionDirection)
597+ else 0
598+ if (if (if ((_type == STOP))
599+ then true
600+ else (_type == TAKE))
601+ then (positionId == 0)
602+ else false)
603+ then throw("STOP and TAKE order should be assigned to position with id != 0")
604+ else if ((newTraderOrderCount > MAX_TRADER_ORDERS_PER_AMM))
605+ then throw("Invalid createLimitOrder parameters: order count")
606+ else {
607+ let changeSet = (((saveOrder(orderId, _amm, _trader, _amountIn, _leverage, _type, _triggerPrice, usdnPayment, _side, _refLink, positionId, _limitPrice) ++ addRemoveOrderId(orderId, _amm, _trader, true)) ++ updateTraderOrderCount(_amm, _trader, newTraderOrderCount)) ++ updateLastOrderId(orderId))
608+ $Tuple2(changeSet, orderId)
609+ }
574610 }
575- else 0
576- if ((usdnPayment == usdnPayment))
577- then {
578- let positionId = if ((positionSize != 0))
579- then getPositionId(_amm, _trader, positionDirection)
580- else 0
581- if (if (if ((_type == STOP))
582- then true
583- else (_type == TAKE))
584- then (positionId == 0)
585- else false)
586- then throw("STOP and TAKE order should be assigned to position with id != 0")
587- else if ((newTraderOrderCount > MAX_TRADER_ORDERS_PER_AMM))
588- then throw("Invalid createLimitOrder parameters: order count")
589- else {
590- let changeSet = (((saveOrder(orderId, _amm, _trader, _amountIn, _leverage, _type, _triggerPrice, usdnPayment, _side, _refLink, positionId, _limitPrice) ++ addRemoveOrderId(orderId, _amm, _trader, true)) ++ updateTraderOrderCount(_amm, _trader, newTraderOrderCount)) ++ updateLastOrderId(orderId))
591- $Tuple2(changeSet, orderId)
592- }
593- }
594- else throw("Strict value is not equal to itself.")
595- }
596- }
611+ else throw("Strict value is not equal to itself.")
612+ }
613+ }
614+ }
597615
598616
599617
600618 @Callable(i)
601619 func cancelOrder (_orderId) = {
602- let $t02327123490 = getOrder(_orderId)
603- let _amm = $t02327123490._1
604- let _trader = $t02327123490._2
605- let _amountIn = $t02327123490._3
606- let _leverage = $t02327123490._4
607- let _type = $t02327123490._5
608- let _triggerPrice = $t02327123490._6
609- let _amountUsdn = $t02327123490._7
610- let _side = $t02327123490._8
611- let _refLink = $t02327123490._9
612- let _positionId = $t02327123490._10
613- let _limitPrice = $t02327123490._11
620+ let $t02378624005 = getOrder(_orderId)
621+ let _amm = $t02378624005._1
622+ let _trader = $t02378624005._2
623+ let _amountIn = $t02378624005._3
624+ let _leverage = $t02378624005._4
625+ let _type = $t02378624005._5
626+ let _triggerPrice = $t02378624005._6
627+ let _amountUsdn = $t02378624005._7
628+ let _side = $t02378624005._8
629+ let _refLink = $t02378624005._9
630+ let _positionId = $t02378624005._10
631+ let _limitPrice = $t02378624005._11
614632 if (if (if (!(initialized()))
615633 then true
616634 else !(isValid(_orderId)))
617635 then true
618636 else !((toString(i.caller) == _trader)))
619637 then throw("Invalid cancelOrder parameters")
620638 else {
621639 let cleanUp = invoke(this, "cleanUpStaleOrders", [_amm, _trader], nil)
622640 if ((cleanUp == cleanUp))
623641 then {
624642 let newTraderOrderCount = (getTraderOrderCount(_amm, _trader) - 1)
625643 let withdraw = if ((_amountUsdn > 0))
626644 then {
627645 let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), _amountUsdn], nil)
628646 if ((unstake == unstake))
629647 then nil
630648 else throw("Strict value is not equal to itself.")
631649 }
632650 else nil
633651 if ((withdraw == withdraw))
634652 then (((markCancelOrder(_orderId) ++ addRemoveOrderId(_orderId, _amm, _trader, false)) ++ updateTraderOrderCount(_amm, _trader, newTraderOrderCount)) ++ (if ((_amountUsdn > 0))
635653 then [ScriptTransfer(i.caller, _amountUsdn, quoteAsset())]
636654 else nil))
637655 else throw("Strict value is not equal to itself.")
638656 }
639657 else throw("Strict value is not equal to itself.")
640658 }
641659 }
642660
643661
644662
645663 @Callable(i)
646664 func executeOrder (_orderId) = {
647- let $t02468824907 = getOrder(_orderId)
648- let _amm = $t02468824907._1
649- let _trader = $t02468824907._2
650- let _amountIn = $t02468824907._3
651- let _leverage = $t02468824907._4
652- let _type = $t02468824907._5
653- let _triggerPrice = $t02468824907._6
654- let _amountUsdn = $t02468824907._7
655- let _side = $t02468824907._8
656- let _refLink = $t02468824907._9
657- let _positionId = $t02468824907._10
658- let _limitPrice = $t02468824907._11
665+ let $t02520325422 = getOrder(_orderId)
666+ let _amm = $t02520325422._1
667+ let _trader = $t02520325422._2
668+ let _amountIn = $t02520325422._3
669+ let _leverage = $t02520325422._4
670+ let _type = $t02520325422._5
671+ let _triggerPrice = $t02520325422._6
672+ let _amountUsdn = $t02520325422._7
673+ let _side = $t02520325422._8
674+ let _refLink = $t02520325422._9
675+ let _positionId = $t02520325422._10
676+ let _limitPrice = $t02520325422._11
659677 let cleanUp = invoke(this, "cleanUpStaleOrders", [_amm, _trader], nil)
660678 if ((cleanUp == cleanUp))
661679 then {
662680 let positionDirection = getPositionDirection(_side, _type)
663681 if (if (!(initialized()))
664682 then true
665683 else !(isValid(_orderId)))
666684 then throw("Invalid executeOrder parameters")
667685 else {
668686 let positionSize = getPositionSize(_amm, _trader, positionDirection)
669687 if ((positionSize == positionSize))
670688 then {
671689 let currentPositionId = if ((positionSize != 0))
672690 then getPositionId(_amm, _trader, positionDirection)
673691 else 0
674- let $t02541428792 = if ((_type == STOP))
692+ let $t02592929307 = if ((_type == STOP))
675693 then {
676694 let _positionDirection = if ((positionSize > 0))
677695 then LONG
678696 else if ((0 > positionSize))
679697 then SHORT
680698 else throw("Can not execute STOP order: no open position")
681699 let marketPrice = getMarketPrice(_amm)
682700 let isExecutable = if ((_side == _positionDirection))
683701 then throw("Can not execute STOP order: reduce only")
684702 else if ((currentPositionId != _positionId))
685703 then throw("Can not execute STOP order: position closed")
686704 else if ((_positionDirection == LONG))
687705 then (_triggerPrice >= marketPrice)
688706 else (marketPrice >= _triggerPrice)
689707 if (isExecutable)
690708 then $Tuple3("closePosition", [minv(_amountIn, abs(positionSize)), positionDirection, muld(_limitPrice, abs(positionSize)), false], nil)
691709 else throw("Can not execute STOP order: triggerPrice mismatch")
692710 }
693711 else if ((_type == TAKE))
694712 then {
695713 let _positionDirection = if ((positionSize > 0))
696714 then LONG
697715 else if ((0 > positionSize))
698716 then SHORT
699717 else throw("Can not execute STOP order: no open position")
700718 let marketPrice = getMarketPrice(_amm)
701719 let isExecutable = if ((_side == _positionDirection))
702720 then throw("Can not execute TAKE order: reduce only")
703721 else if ((currentPositionId != _positionId))
704722 then throw(((("Can not execute TAKE order: position closed " + toString(currentPositionId)) + "!=") + toString(_positionId)))
705723 else if ((_positionDirection == LONG))
706724 then (marketPrice >= _triggerPrice)
707725 else (_triggerPrice >= marketPrice)
708726 if (isExecutable)
709727 then $Tuple3("closePosition", [minv(_amountIn, abs(positionSize)), positionDirection, muld(_limitPrice, abs(positionSize)), false], nil)
710728 else throw("Can not execute TAKE order: triggerPrice mismatch")
711729 }
712730 else if ((_type == LIMIT))
713731 then {
714732 let marketPrice = getMarketPrice(_amm)
715733 let spread = if ((_limitPrice == 0))
716734 then getSpread(_triggerPrice)
717735 else abs((_triggerPrice - _limitPrice))
718736 let isExecutable = if ((marketPrice >= (_triggerPrice - spread)))
719737 then ((_triggerPrice + spread) >= marketPrice)
720738 else false
721739 if (isExecutable)
722740 then {
723741 let amountInWithFee = (_amountUsdn - muld(_amountUsdn, getFee(_amm, _trader)))
724742 $Tuple3("increasePosition", [_side, _leverage, if ((_limitPrice == 0))
725743 then 0
726744 else divd(amountInWithFee, _limitPrice), _refLink], [AttachedPayment(quoteAsset(), _amountUsdn)])
727745 }
728746 else throw("Can not execute LIMIT order: triggerPrice mismatch")
729747 }
730748 else throw(("Invalid order type: " + toString(_type)))
731- let method = $t02541428792._1
732- let args = $t02541428792._2
733- let payments = $t02541428792._3
749+ let method = $t02592929307._1
750+ let args = $t02592929307._2
751+ let payments = $t02592929307._3
734752 let withdraw = if ((size(payments) == 1))
735753 then {
736754 let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), payments[0].amount], nil)
737755 if ((unstake == unstake))
738756 then nil
739757 else throw("Strict value is not equal to itself.")
740758 }
741759 else nil
742760 if ((withdraw == withdraw))
743761 then {
744762 let doSetContext = invoke(this, "setContext", [_trader], nil)
745763 if ((doSetContext == doSetContext))
746764 then {
747765 let doClosePosition = invoke(addressFromStringValue(_amm), method, args, payments)
748766 if ((doClosePosition == doClosePosition))
749767 then {
750768 let doResetContext = invoke(this, "resetContext", nil, nil)
751769 if ((doResetContext == doResetContext))
752770 then {
753771 let executeOrderRequest = if ((_type == LIMIT))
754772 then {
755773 let newPositionSize = getPositionSize(_amm, _trader, positionDirection)
756774 if ((newPositionSize == newPositionSize))
757775 then {
758776 let newPositionId = getPositionId(_amm, _trader, positionDirection)
759777 if ((newPositionId == newPositionId))
760778 then {
761779 let positionSizeDelta = (newPositionSize - positionSize)
762780 let closeOrderSide = if ((newPositionSize > 0))
763781 then SHORT
764782 else LONG
765783 let makeTakeOrder = if (haveOrderRequest(_orderId, TAKE))
766784 then {
767- let $t02975429953 = getOrderRequest(_orderId, TAKE)
768- let newOrderId = $t02975429953._1
769- let newAmm = $t02975429953._2
770- let newTrader = $t02975429953._3
771- let newType = $t02975429953._4
772- let newTriggerPrice = $t02975429953._5
773- let newLimitPrice = $t02975429953._6
785+ let $t03026930468 = getOrderRequest(_orderId, TAKE)
786+ let newOrderId = $t03026930468._1
787+ let newAmm = $t03026930468._2
788+ let newTrader = $t03026930468._3
789+ let newType = $t03026930468._4
790+ let newTriggerPrice = $t03026930468._5
791+ let newLimitPrice = $t03026930468._6
774792 let doCall = invoke(this, "internalCreateOrder", [newTrader, newAmm, newType, newTriggerPrice, newLimitPrice, positionSizeDelta, 0, closeOrderSide, "", "", 0], nil)
775793 if ((doCall == doCall))
776794 then nil
777795 else throw("Strict value is not equal to itself.")
778796 }
779797 else nil
780798 if ((makeTakeOrder == makeTakeOrder))
781799 then {
782800 let makeStopOrder = if (haveOrderRequest(_orderId, STOP))
783801 then {
784- let $t03050930708 = getOrderRequest(_orderId, STOP)
785- let newOrderId = $t03050930708._1
786- let newAmm = $t03050930708._2
787- let newTrader = $t03050930708._3
788- let newType = $t03050930708._4
789- let newTriggerPrice = $t03050930708._5
790- let newLimitPrice = $t03050930708._6
802+ let $t03102431223 = getOrderRequest(_orderId, STOP)
803+ let newOrderId = $t03102431223._1
804+ let newAmm = $t03102431223._2
805+ let newTrader = $t03102431223._3
806+ let newType = $t03102431223._4
807+ let newTriggerPrice = $t03102431223._5
808+ let newLimitPrice = $t03102431223._6
791809 let doCall = invoke(this, "internalCreateOrder", [newTrader, newAmm, newType, newTriggerPrice, newLimitPrice, positionSizeDelta, 0, closeOrderSide, "", "", 0], nil)
792810 if ((doCall == doCall))
793811 then nil
794812 else throw("Strict value is not equal to itself.")
795813 }
796814 else nil
797815 if ((makeStopOrder == makeStopOrder))
798816 then (makeTakeOrder ++ makeStopOrder)
799817 else throw("Strict value is not equal to itself.")
800818 }
801819 else throw("Strict value is not equal to itself.")
802820 }
803821 else throw("Strict value is not equal to itself.")
804822 }
805823 else throw("Strict value is not equal to itself.")
806824 }
807825 else nil
808826 if ((executeOrderRequest == executeOrderRequest))
809827 then {
810828 let doMarkOrderExecuted = invoke(this, "internalMarkOrderExecuted", [_amm, _trader, _orderId], nil)
811829 if ((doMarkOrderExecuted == doMarkOrderExecuted))
812830 then nil
813831 else throw("Strict value is not equal to itself.")
814832 }
815833 else throw("Strict value is not equal to itself.")
816834 }
817835 else throw("Strict value is not equal to itself.")
818836 }
819837 else throw("Strict value is not equal to itself.")
820838 }
821839 else throw("Strict value is not equal to itself.")
822840 }
823841 else throw("Strict value is not equal to itself.")
824842 }
825843 else throw("Strict value is not equal to itself.")
826844 }
827845 }
828846 else throw("Strict value is not equal to itself.")
829847 }
830848
831849
832850
833851 @Callable(i)
834852 func view_canExecuteOrder (_orderId) = {
835853 let s = invoke(this, "executeOrder", [_orderId], nil)
836854 if ((s == s))
837855 then throw("Success")
838856 else throw("Strict value is not equal to itself.")
839857 }
840858
841859
842860 @Verifier(tx)
843861 func verify () = {
844862 let coordinatorStr = getString(this, k_coordinatorAddress)
845863 if (isDefined(coordinatorStr))
846864 then {
847865 let admin = getString(addressFromStringValue(value(coordinatorStr)), k_admin_address)
848866 if (isDefined(admin))
849867 then valueOrElse(getBoolean(addressFromStringValue(value(admin)), ((("status_" + toString(this)) + "_") + toBase58String(tx.id))), false)
850868 else throw("unable to verify: admin not set in coordinator")
851869 }
852870 else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
853871 }
854872

github/deemru/w8io/169f3d6 
117.16 ms