tx · Fq21Dc1UWRuRmNLFV31UG2f1UgySFJT7XNLqdAPusrYS

3Msi5oqcsWCbxBx3fiNLJ1Wjf4bp6pZ2gZK:  -0.07500000 Waves

2022.12.16 16:03 [2362899] smart account 3Msi5oqcsWCbxBx3fiNLJ1Wjf4bp6pZ2gZK > SELF 0.00000000 Waves

{ "type": 13, "id": "Fq21Dc1UWRuRmNLFV31UG2f1UgySFJT7XNLqdAPusrYS", "fee": 7500000, "feeAssetId": null, "timestamp": 1671195838312, "version": 2, "chainId": 84, "sender": "3Msi5oqcsWCbxBx3fiNLJ1Wjf4bp6pZ2gZK", "senderPublicKey": "5QxdquaDR6y7rkWHRNwqPg46Jm4w7LZEwq6ks4dTfjFy", "proofs": [ "5LdeoY4Ww5Sok8sqsJURjg8SH3ey8tziZy4aX8RYbg4hYLr7smEedBhThbQRBuF4SpA9fMDNKfU2va8uoiQrft8c" ], "script": "base64:BgJ6CAISABIAEgASABIDCgEBEgMKAQESDgoMAQEBAQEBAQEBAQEBEhQKEgEBAQEBAQEICAgIAQEBAQEBARIFCgMBAQESBgoEAQEBCBIAEgMKAQESBAoCAQESAwoBCBIAEgASAwoBCBIDCgEBEgASABIDCgEIEgASBAoCCAjBAQAJa19vcmFfa2V5AglrX29yYV9rZXkAD2tfb3JhX2Jsb2NrX2tleQIPa19vcmFfYmxvY2tfa2V5AAVrX29yYQIFa19vcmEACWtfYmFsYW5jZQIJa19iYWxhbmNlAAprX3NlcXVlbmNlAgprX3NlcXVlbmNlAA5rX3Bvc2l0aW9uU2l6ZQIOa19wb3NpdGlvblNpemUAEGtfcG9zaXRpb25NYXJnaW4CEGtfcG9zaXRpb25NYXJnaW4AFmtfcG9zaXRpb25PcGVuTm90aW9uYWwCFmtfcG9zaXRpb25PcGVuTm90aW9uYWwALmtfcG9zaXRpb25MYXN0VXBkYXRlZEN1bXVsYXRpdmVQcmVtaXVtRnJhY3Rpb24CEmtfcG9zaXRpb25GcmFjdGlvbgASa19wb3NpdGlvblNlcXV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cnJvd2VkQnlUcmFkZXIBB190cmFkZXIEDSR0MDg0Njg5ODQ3NDMJARNnZXRCb3Jyb3dlZEJ5VHJhZGVyAQUHX3RyYWRlcgQIYm9ycm93ZWQIBQ0kdDA4NDY4OTg0NzQzAl8xBAdhc3NldElkCAUNJHQwODQ2ODk4NDc0MwJfMgkAAgEJAKwCAgkBAXMBBQhib3Jyb3dlZAUHYXNzZXRJZAFpARBjb21wdXRlU3BvdFByaWNlAAQGcmVzdWx0CQEMZ2V0U3BvdFByaWNlAAkAlAoCBQNuaWwFBnJlc3VsdAFpAR9jb21wdXRlRmVlRm9yVHJhZGVyV2l0aEFydGlmYWN0AgdfdHJhZGVyC19hcnRpZmFjdElkBAZyZXN1bHQJARhnZXRGb3JUcmFkZXJXaXRoQXJ0aWZhY3QCBQdfdHJhZGVyBQtfYXJ0aWZhY3RJZAkAlAoCBQNuaWwFBnJlc3VsdAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJAQ5hZG1pblB1YmxpY0tleQDCYRmU", "height": 2362899, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9ooVtddK9eVYn2VJz2SSEcyeBpKApkXzmNb1JpFu5rT8 Next: FXfVDJaugFipLVpq8DXhnHxMuYn8oLKebyaiACUmpQyg Diff:
OldNewDifferences
553553 }
554554
555555
556+func absPriceDiff (_oraclePrice,_quoteAssetReserve,_baseAssetReserve,_qtAstW,_bsAstW) = {
557+ let priceAfter = divd(muld(_quoteAssetReserve, _qtAstW), muld(_baseAssetReserve, _bsAstW))
558+ let averagePrice = divd((_oraclePrice + priceAfter), (2 * DECIMAL_UNIT))
559+ let absPriceDiff = divd(abs((_oraclePrice - priceAfter)), averagePrice)
560+ absPriceDiff
561+ }
562+
563+
556564 func requireNotOverSpreadLimit (_quoteAssetReserve,_baseAssetReserve) = {
557565 let oraclePrice = getOracleTwapPrice()
558566 let _qtAstW = qtAstW()
559567 let _bsAstW = bsAstW()
560- let priceAfter = divd(muld(_quoteAssetReserve, _qtAstW), muld(_baseAssetReserve, _bsAstW))
561- let averagePrice = divd((oraclePrice + priceAfter), (2 * DECIMAL_UNIT))
562- let absPriceDiff = divd(abs((oraclePrice - priceAfter)), averagePrice)
563- if ((absPriceDiff > maxPriceSpread()))
564- then throw(((("Price spread " + toString(absPriceDiff)) + " > max price spread ") + toString(maxPriceSpread())))
568+ let absPriceDiffBefore = absPriceDiff(oraclePrice, qtAstR(), bsAstR(), _qtAstW, _bsAstW)
569+ let absPriceDiffAfter = absPriceDiff(oraclePrice, _quoteAssetReserve, _baseAssetReserve, _qtAstW, _bsAstW)
570+ if (if ((absPriceDiffAfter > maxPriceSpread()))
571+ then (absPriceDiffAfter > absPriceDiffBefore)
572+ else false)
573+ then throw(((("Price spread " + toString(absPriceDiffAfter)) + " > max price spread ") + toString(maxPriceSpread())))
565574 else true
566575 }
567576
597606 let isShort = (0 > _positionSize)
598607 let positionNotional = if ((_option == PNL_OPTION_SPOT))
599608 then {
600- let $t02423124451 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _quoteAssetWeight, _baseAssetReserve, _baseAssetWeight)
601- let outPositionNotional = $t02423124451._1
602- let x1 = $t02423124451._2
603- let x2 = $t02423124451._3
604- let x3 = $t02423124451._4
609+ let $t02463524855 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _quoteAssetWeight, _baseAssetReserve, _baseAssetWeight)
610+ let outPositionNotional = $t02463524855._1
611+ let x1 = $t02463524855._2
612+ let x2 = $t02463524855._3
613+ let x3 = $t02463524855._4
605614 outPositionNotional
606615 }
607616 else muld(positionSizeAbs, getOracleTwapPrice())
622631
623632
624633 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
625- let $t02587626004 = getPosition(_trader)
626- let positionSize = $t02587626004._1
627- let positionMargin = $t02587626004._2
628- let positionOpenNotional = $t02587626004._3
629- let positionLstUpdCPF = $t02587626004._4
634+ let $t02628026408 = getPosition(_trader)
635+ let positionSize = $t02628026408._1
636+ let positionMargin = $t02628026408._2
637+ let positionOpenNotional = $t02628026408._3
638+ let positionLstUpdCPF = $t02628026408._4
630639 getPositionNotionalAndUnrealizedPnlByValues(positionSize, positionOpenNotional, qtAstR(), qtAstW(), bsAstR(), bsAstW(), _option)
631640 }
632641
635644
636645
637646 func getMarginRatioByOption (_trader,_option) = {
638- let $t02651726628 = getPosition(_trader)
639- let positionSize = $t02651726628._1
640- let positionMargin = $t02651726628._2
641- let pon = $t02651726628._3
642- let positionLstUpdCPF = $t02651726628._4
643- let $t02663426727 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
644- let positionNotional = $t02663426727._1
645- let unrealizedPnl = $t02663426727._2
646- let $t02673226898 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
647- let remainMargin = $t02673226898._1
648- let badDebt = $t02673226898._2
647+ let $t02692127032 = getPosition(_trader)
648+ let positionSize = $t02692127032._1
649+ let positionMargin = $t02692127032._2
650+ let pon = $t02692127032._3
651+ let positionLstUpdCPF = $t02692127032._4
652+ let $t02703827131 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
653+ let positionNotional = $t02703827131._1
654+ let unrealizedPnl = $t02703827131._2
655+ let $t02713627302 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
656+ let remainMargin = $t02713627302._1
657+ let badDebt = $t02713627302._2
649658 calcMarginRatio(remainMargin, badDebt, positionNotional)
650659 }
651660
670679
671680
672681 func internalClosePosition (_trader,_checkMaxPriceImpact) = {
673- let $t02813828266 = getPosition(_trader)
674- let positionSize = $t02813828266._1
675- let positionMargin = $t02813828266._2
676- let positionOpenNotional = $t02813828266._3
677- let positionLstUpdCPF = $t02813828266._4
682+ let $t02854228670 = getPosition(_trader)
683+ let positionSize = $t02854228670._1
684+ let positionMargin = $t02854228670._2
685+ let positionOpenNotional = $t02854228670._3
686+ let positionLstUpdCPF = $t02854228670._4
678687 let unrealizedPnl = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)._2
679- let $t02836128529 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
680- let remainMargin = $t02836128529._1
681- let badDebt = $t02836128529._2
688+ let $t02876528933 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
689+ let remainMargin = $t02876528933._1
690+ let badDebt = $t02876528933._2
682691 let exchangedPositionSize = -(positionSize)
683692 let realizedPnl = unrealizedPnl
684693 let marginToVault = -(remainMargin)
685- let $t02865628930 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
686- let exchangedQuoteAssetAmount = $t02865628930._1
687- let quoteAssetReserveAfter = $t02865628930._2
688- let baseAssetReserveAfter = $t02865628930._3
689- let totalPositionSizeAfter = $t02865628930._4
690- let totalLongAfter = $t02865628930._5
691- let totalShortAfter = $t02865628930._6
694+ let $t02906029334 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
695+ let exchangedQuoteAssetAmount = $t02906029334._1
696+ let quoteAssetReserveAfter = $t02906029334._2
697+ let baseAssetReserveAfter = $t02906029334._3
698+ let totalPositionSizeAfter = $t02906029334._4
699+ let totalLongAfter = $t02906029334._5
700+ let totalShortAfter = $t02906029334._6
692701 let openInterestNotionalAfter = (openInterestNotional() - positionOpenNotional)
693702 $Tuple13(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter, (openInterestLong() - (if ((positionSize > 0))
694703 then positionOpenNotional
741750 then $Tuple2(qtAstR(), bsAstR())
742751 else {
743752 let direction = (_positionSize > 0)
744- let $t03105331232 = swapOutput(direction, abs(_positionSize), false)
745- let currentNetMarketValue = $t03105331232._1
746- let terminalQuoteAssetReserve = $t03105331232._2
747- let terminalBaseAssetReserve = $t03105331232._3
753+ let $t03145731636 = swapOutput(direction, abs(_positionSize), false)
754+ let currentNetMarketValue = $t03145731636._1
755+ let terminalQuoteAssetReserve = $t03145731636._2
756+ let terminalBaseAssetReserve = $t03145731636._3
748757 $Tuple2(terminalQuoteAssetReserve, terminalBaseAssetReserve)
749758 }
750759 }
768777 }
769778
770779
771-func getSyncTerminalPrice (_terminalPrice) = {
780+func getSyncTerminalPrice (_terminalPrice,_qtAstR,_bsAstR) = {
772781 let _positionSize = totalPositionSize()
773782 if ((_positionSize == 0))
774783 then {
775- let _qtAstR = qtAstR()
776- let _bsAstR = bsAstR()
777784 let newQtAstW = divd(muld(_terminalPrice, _bsAstR), _qtAstR)
778785 $Tuple3(newQtAstW, DECIMAL_UNIT, 0)
779786 }
780787 else {
781788 let direction = (_positionSize > 0)
782789 let currentNetMarketValue = swapOutput(direction, abs(_positionSize), false)._1
783- let _qtAstR = qtAstR()
784- let _bsAstR = bsAstR()
785790 let newQtAstW = getQuoteAssetWeight(_bsAstR, _positionSize, _qtAstR, _terminalPrice)
786791 let newBsAstW = DECIMAL_UNIT
787792 let marginToVault = getPositionNotionalAndUnrealizedPnlByValues(_positionSize, currentNetMarketValue, _qtAstR, newQtAstW, _bsAstR, newBsAstW, PNL_OPTION_SPOT)._2
815820 func getAdjustedFee (_artifactId,_baseFeeDiscount) = {
816821 let baseFeeRaw = fee()
817822 let baseFee = muld(baseFeeRaw, _baseFeeDiscount)
818- let $t03433134826 = if ((_artifactId != ""))
823+ let $t03465535150 = if ((_artifactId != ""))
819824 then {
820825 let artifactKind = strA(nftManagerAddress(), toCompositeKey(k_token_type, _artifactId))
821826 if ((artifactKind == FEE_REDUCTION_TOKEN_TYPE))
827832 else throw("Invalid attached artifact")
828833 }
829834 else $Tuple2(baseFee, false)
830- let adjustedFee = $t03433134826._1
831- let burnArtifact = $t03433134826._2
835+ let adjustedFee = $t03465535150._1
836+ let burnArtifact = $t03465535150._2
832837 $Tuple2(adjustedFee, burnArtifact)
833838 }
834839
869874 case _ =>
870875 throw("Invalid computeFeeDiscount result")
871876 }
872- let $t03605736131 = getAdjustedFee(_artifactId, feeDiscount)
873- let adjustedFee = $t03605736131._1
874- let burnArtifact = $t03605736131._2
877+ let $t03638136455 = getAdjustedFee(_artifactId, feeDiscount)
878+ let adjustedFee = $t03638136455._1
879+ let burnArtifact = $t03638136455._2
875880 $Tuple2(adjustedFee, burnArtifact)
876881 }
877882 else throw("Strict value is not equal to itself.")
10191024 let _qtAstW = qtAstW()
10201025 let _bsAstW = bsAstW()
10211026 let price = divd(muld(_qtAstR, _qtAstW), muld(_bsAstR, _bsAstW))
1022- let baseAssetAmountToAdd = divd(_quoteAssetAmount, price)
10231027 let qtAstRAfter = (_qtAstR + _quoteAssetAmount)
1028+ let baseAssetAmountToAdd = (divd(muld(qtAstRAfter, _qtAstW), price) - _bsAstR)
10241029 let bsAstRAfter = (_bsAstR + baseAssetAmountToAdd)
1025- updateAmmReserves(qtAstRAfter, bsAstRAfter)
1030+ let $t04547745632 = getSyncTerminalPrice(getOracleTwapPrice(), qtAstRAfter, bsAstRAfter)
1031+ let newQuoteAssetWeight = $t04547745632._1
1032+ let newBaseAssetWeight = $t04547745632._2
1033+ let marginToVault = $t04547745632._3
1034+ let doExchangePnL = if ((marginToVault != 0))
1035+ then {
1036+ let doExchangePnL = invoke(vaultAddress(), "exchangeFreeAndLocked", [marginToVault], nil)
1037+ if ((doExchangePnL == doExchangePnL))
1038+ then nil
1039+ else throw("Strict value is not equal to itself.")
1040+ }
1041+ else nil
1042+ if ((doExchangePnL == doExchangePnL))
1043+ then (updateAmmReserves(qtAstRAfter, bsAstRAfter) ++ updateAmmWeights(newQuoteAssetWeight, newBaseAssetWeight))
1044+ else throw("Strict value is not equal to itself.")
10261045 }
10271046
10281047
11071126 else paused())
11081127 then throw("Invalid decreasePosition parameters")
11091128 else {
1110- let $t04867048810 = getPosition(_trader)
1111- let oldPositionSize = $t04867048810._1
1112- let oldPositionMargin = $t04867048810._2
1113- let oldPositionOpenNotional = $t04867048810._3
1114- let oldPositionLstUpdCPF = $t04867048810._4
1129+ let $t04947549615 = getPosition(_trader)
1130+ let oldPositionSize = $t04947549615._1
1131+ let oldPositionMargin = $t04947549615._2
1132+ let oldPositionOpenNotional = $t04947549615._3
1133+ let oldPositionLstUpdCPF = $t04947549615._4
11151134 let _direction = if ((oldPositionSize > 0))
11161135 then DIR_SHORT
11171136 else DIR_LONG
11181137 let isAdd = (_direction == DIR_LONG)
11191138 let openNotional = muld(_amount, _leverage)
1120- let $t04898349087 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1121- let oldPositionNotional = $t04898349087._1
1122- let unrealizedPnl = $t04898349087._2
1123- let $t04909351751 = if ((oldPositionNotional > openNotional))
1139+ let $t04978849892 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1140+ let oldPositionNotional = $t04978849892._1
1141+ let unrealizedPnl = $t04978849892._2
1142+ let $t04989852556 = if ((oldPositionNotional > openNotional))
11241143 then {
1125- let $t04950849692 = swapInput(isAdd, openNotional)
1126- let exchangedPositionSize = $t04950849692._1
1127- let quoteAssetReserveAfter = $t04950849692._2
1128- let baseAssetReserveAfter = $t04950849692._3
1129- let totalPositionSizeAfter = $t04950849692._4
1144+ let $t05031350497 = swapInput(isAdd, openNotional)
1145+ let exchangedPositionSize = $t05031350497._1
1146+ let quoteAssetReserveAfter = $t05031350497._2
1147+ let baseAssetReserveAfter = $t05031350497._3
1148+ let totalPositionSizeAfter = $t05031350497._4
11301149 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
11311150 if (if ((_minBaseAssetAmount != 0))
11321151 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
11341153 then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
11351154 else {
11361155 let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), abs(oldPositionSize))
1137- let $t05012950374 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1138- let remainMargin = $t05012950374._1
1139- let badDebt = $t05012950374._2
1140- let fundingPayment = $t05012950374._3
1156+ let $t05093451179 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1157+ let remainMargin = $t05093451179._1
1158+ let badDebt = $t05093451179._2
1159+ let fundingPayment = $t05093451179._3
11411160 let exchangedQuoteAssetAmount = openNotional
11421161 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
11431162 let remainOpenNotional = if ((oldPositionSize > 0))
11561175 }
11571176 }
11581177 else throw("Close position first")
1159- let newPositionSize = $t04909351751._1
1160- let newPositionRemainMargin = $t04909351751._2
1161- let newPositionOpenNotional = $t04909351751._3
1162- let newPositionLatestCPF = $t04909351751._4
1163- let baseAssetReserveAfter = $t04909351751._5
1164- let quoteAssetReserveAfter = $t04909351751._6
1165- let totalPositionSizeAfter = $t04909351751._7
1166- let openInterestNotionalAfter = $t04909351751._8
1167- let totalLongAfter = $t04909351751._9
1168- let totalShortAfter = $t04909351751._10
1169- let totalLongOpenInterestAfter = $t04909351751._11
1170- let totalShortOpenInterestAfter = $t04909351751._12
1178+ let newPositionSize = $t04989852556._1
1179+ let newPositionRemainMargin = $t04989852556._2
1180+ let newPositionOpenNotional = $t04989852556._3
1181+ let newPositionLatestCPF = $t04989852556._4
1182+ let baseAssetReserveAfter = $t04989852556._5
1183+ let quoteAssetReserveAfter = $t04989852556._6
1184+ let totalPositionSizeAfter = $t04989852556._7
1185+ let openInterestNotionalAfter = $t04989852556._8
1186+ let totalLongAfter = $t04989852556._9
1187+ let totalShortAfter = $t04989852556._10
1188+ let totalLongOpenInterestAfter = $t04989852556._11
1189+ let totalShortOpenInterestAfter = $t04989852556._12
11711190 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, newPositionOpenNotional], nil)
11721191 if ((notifyNotional == notifyNotional))
11731192 then (updatePosition(_trader, newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter, totalLongOpenInterestAfter, totalShortOpenInterestAfter))
12111230 else closeOnly())
12121231 then throw("Invalid increasePosition parameters")
12131232 else {
1214- let $t05318953274 = getForTraderWithArtifact(_trader, getArtifactId(i))
1215- let adjustedFee = $t05318953274._1
1216- let burnArtifact = $t05318953274._2
1233+ let $t05399454079 = getForTraderWithArtifact(_trader, getArtifactId(i))
1234+ let adjustedFee = $t05399454079._1
1235+ let burnArtifact = $t05399454079._2
12171236 let rawFeeAmount = muld(_rawAmount, adjustedFee)
12181237 let _amount = (_rawAmount - rawFeeAmount)
12191238 let distributeFeeAmount = if (isCollateralAsset)
12561275 throw("Invalid referrerFee")
12571276 }
12581277 let feeAmount = (distributeFeeAmount - referrerFee)
1259- let $t05459054730 = getPosition(_trader)
1260- let oldPositionSize = $t05459054730._1
1261- let oldPositionMargin = $t05459054730._2
1262- let oldPositionOpenNotional = $t05459054730._3
1263- let oldPositionLstUpdCPF = $t05459054730._4
1278+ let $t05539555535 = getPosition(_trader)
1279+ let oldPositionSize = $t05539555535._1
1280+ let oldPositionMargin = $t05539555535._2
1281+ let oldPositionOpenNotional = $t05539555535._3
1282+ let oldPositionLstUpdCPF = $t05539555535._4
12641283 let isNewPosition = (oldPositionSize == 0)
12651284 let isSameDirection = if ((oldPositionSize > 0))
12661285 then (_direction == DIR_LONG)
12691288 then isSameDirection
12701289 else false
12711290 let isAdd = (_direction == DIR_LONG)
1272- let $t05501958060 = if (if (isNewPosition)
1291+ let $t05582458865 = if (if (isNewPosition)
12731292 then true
12741293 else expandExisting)
12751294 then {
12761295 let openNotional = muld(_amount, _leverage)
1277- let $t05548155654 = swapInput(isAdd, openNotional)
1278- let amountBaseAssetBought = $t05548155654._1
1279- let quoteAssetReserveAfter = $t05548155654._2
1280- let baseAssetReserveAfter = $t05548155654._3
1281- let totalPositionSizeAfter = $t05548155654._4
1296+ let $t05628656459 = swapInput(isAdd, openNotional)
1297+ let amountBaseAssetBought = $t05628656459._1
1298+ let quoteAssetReserveAfter = $t05628656459._2
1299+ let baseAssetReserveAfter = $t05628656459._3
1300+ let totalPositionSizeAfter = $t05628656459._4
12821301 if (if ((_minBaseAssetAmount != 0))
12831302 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
12841303 else false)
12921311 then openNotional
12931312 else 0))
12941313 let increaseMarginRequirement = divd(openNotional, _leverage)
1295- let $t05626256501 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
1296- let remainMargin = $t05626256501._1
1297- let x1 = $t05626256501._2
1298- let x2 = $t05626256501._3
1314+ let $t05706757306 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
1315+ let remainMargin = $t05706757306._1
1316+ let x1 = $t05706757306._2
1317+ let x2 = $t05706757306._3
12991318 if (!(requireNotOverSpreadLimit(quoteAssetReserveAfter, baseAssetReserveAfter)))
13001319 then throw("Over max spread limit")
13011320 else if (!(requireNotOverMaxOpenNotional(totalLongOpenInterestAfter, totalShortOpenInterestAfter)))
13091328 }
13101329 else {
13111330 let openNotional = muld(_amount, _leverage)
1312- let $t05776057876 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
1313- let oldPositionNotional = $t05776057876._1
1314- let unrealizedPnl = $t05776057876._2
1331+ let $t05856558681 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
1332+ let oldPositionNotional = $t05856558681._1
1333+ let unrealizedPnl = $t05856558681._2
13151334 if ((oldPositionNotional > openNotional))
13161335 then throw("Use decreasePosition to decrease position size")
13171336 else throw("Close position first")
13181337 }
1319- let newPositionSize = $t05501958060._1
1320- let newPositionRemainMargin = $t05501958060._2
1321- let newPositionOpenNotional = $t05501958060._3
1322- let newPositionLatestCPF = $t05501958060._4
1323- let baseAssetReserveAfter = $t05501958060._5
1324- let quoteAssetReserveAfter = $t05501958060._6
1325- let totalPositionSizeAfter = $t05501958060._7
1326- let openInterestNotionalAfter = $t05501958060._8
1327- let totalLongAfter = $t05501958060._9
1328- let totalShortAfter = $t05501958060._10
1329- let totalLongOpenInterestAfter = $t05501958060._11
1330- let totalShortOpenInterestAfter = $t05501958060._12
1331- let $t05806658123 = distributeFee(feeAmount)
1332- let feeToStakers = $t05806658123._1
1333- let feeToVault = $t05806658123._2
1338+ let newPositionSize = $t05582458865._1
1339+ let newPositionRemainMargin = $t05582458865._2
1340+ let newPositionOpenNotional = $t05582458865._3
1341+ let newPositionLatestCPF = $t05582458865._4
1342+ let baseAssetReserveAfter = $t05582458865._5
1343+ let quoteAssetReserveAfter = $t05582458865._6
1344+ let totalPositionSizeAfter = $t05582458865._7
1345+ let openInterestNotionalAfter = $t05582458865._8
1346+ let totalLongAfter = $t05582458865._9
1347+ let totalShortAfter = $t05582458865._10
1348+ let totalLongOpenInterestAfter = $t05582458865._11
1349+ let totalShortOpenInterestAfter = $t05582458865._12
1350+ let $t05887158928 = distributeFee(feeAmount)
1351+ let feeToStakers = $t05887158928._1
1352+ let feeToVault = $t05887158928._2
13341353 let stake = if (isQuoteAsset)
13351354 then {
13361355 let stake = invoke(vaultAddress(), "addLocked", [false], [AttachedPayment(quoteAsset(), _amount)])
13941413 else closeOnly())
13951414 then throw("Invalid addMargin parameters")
13961415 else {
1397- let $t06007160156 = getForTraderWithArtifact(_trader, getArtifactId(i))
1398- let adjustedFee = $t06007160156._1
1399- let burnArtifact = $t06007160156._2
1416+ let $t06087660961 = getForTraderWithArtifact(_trader, getArtifactId(i))
1417+ let adjustedFee = $t06087660961._1
1418+ let burnArtifact = $t06087660961._2
14001419 let rawFeeAmount = muld(_rawAmount, adjustedFee)
14011420 let _amount = (_rawAmount - rawFeeAmount)
14021421 let distributeFeeAmount = if (isCollateralAsset)
14391458 throw("Invalid referrerFee")
14401459 }
14411460 let feeAmount = (distributeFeeAmount - referrerFee)
1442- let $t06145561595 = getPosition(_trader)
1443- let oldPositionSize = $t06145561595._1
1444- let oldPositionMargin = $t06145561595._2
1445- let oldPositionOpenNotional = $t06145561595._3
1446- let oldPositionLstUpdCPF = $t06145561595._4
1447- let $t06160161658 = distributeFee(feeAmount)
1448- let feeToStakers = $t06160161658._1
1449- let feeToVault = $t06160161658._2
1461+ let $t06226062400 = getPosition(_trader)
1462+ let oldPositionSize = $t06226062400._1
1463+ let oldPositionMargin = $t06226062400._2
1464+ let oldPositionOpenNotional = $t06226062400._3
1465+ let oldPositionLstUpdCPF = $t06226062400._4
1466+ let $t06240662463 = distributeFee(feeAmount)
1467+ let feeToStakers = $t06240662463._1
1468+ let feeToVault = $t06240662463._2
14501469 let stake = if (isQuoteAsset)
14511470 then {
14521471 let stake = invoke(vaultAddress(), "addLocked", [false], [AttachedPayment(quoteAsset(), _amount)])
14941513 else paused())
14951514 then throw("Invalid removeMargin parameters")
14961515 else {
1497- let $t06277062910 = getPosition(_trader)
1498- let oldPositionSize = $t06277062910._1
1499- let oldPositionMargin = $t06277062910._2
1500- let oldPositionOpenNotional = $t06277062910._3
1501- let oldPositionLstUpdCPF = $t06277062910._4
1516+ let $t06357563715 = getPosition(_trader)
1517+ let oldPositionSize = $t06357563715._1
1518+ let oldPositionMargin = $t06357563715._2
1519+ let oldPositionOpenNotional = $t06357563715._3
1520+ let oldPositionLstUpdCPF = $t06357563715._4
15021521 let marginDelta = -(_amount)
1503- let $t06294763126 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1504- let remainMargin = $t06294763126._1
1505- let badDebt = $t06294763126._2
1522+ let $t06375263931 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1523+ let remainMargin = $t06375263931._1
1524+ let badDebt = $t06375263931._2
15061525 if ((badDebt != 0))
15071526 then throw("Invalid removed margin amount")
15081527 else {
15111530 then throw(((("Too much margin removed: " + toString(marginRatio)) + " < ") + toString(initMarginRatio())))
15121531 else {
15131532 let quoteAssetStr = toBase58String(quoteAsset())
1514- let $t06357063624 = getBorrowedByTrader(_trader)
1515- let borrowed = $t06357063624._1
1516- let assetId = $t06357063624._2
1533+ let $t06437564429 = getBorrowedByTrader(_trader)
1534+ let borrowed = $t06437564429._1
1535+ let assetId = $t06437564429._2
15171536 let toRepay = if ((_amount > borrowed))
15181537 then borrowed
15191538 else _amount
15831602 else (0 > _minQuoteAssetAmount))
15841603 then throw("Invalid closePosition parameters")
15851604 else {
1586- let $t06578265922 = getPosition(_trader)
1587- let oldPositionSize = $t06578265922._1
1588- let oldPositionMargin = $t06578265922._2
1589- let oldPositionOpenNotional = $t06578265922._3
1590- let oldPositionLstUpdCPF = $t06578265922._4
1591- let $t06592870365 = if ((abs(oldPositionSize) > _size))
1605+ let $t06658766727 = getPosition(_trader)
1606+ let oldPositionSize = $t06658766727._1
1607+ let oldPositionMargin = $t06658766727._2
1608+ let oldPositionOpenNotional = $t06658766727._3
1609+ let oldPositionLstUpdCPF = $t06658766727._4
1610+ let $t06673371170 = if ((abs(oldPositionSize) > _size))
15921611 then {
15931612 let _direction = if ((oldPositionSize > 0))
15941613 then DIR_SHORT
15951614 else DIR_LONG
15961615 let isAdd = (_direction == DIR_LONG)
1597- let $t06651966741 = swapOutput((oldPositionSize > 0), _size, true)
1598- let exchangedQuoteAssetAmount = $t06651966741._1
1599- let quoteAssetReserveAfter = $t06651966741._2
1600- let baseAssetReserveAfter = $t06651966741._3
1601- let totalPositionSizeAfter = $t06651966741._4
1616+ let $t06732467546 = swapOutput((oldPositionSize > 0), _size, true)
1617+ let exchangedQuoteAssetAmount = $t06732467546._1
1618+ let quoteAssetReserveAfter = $t06732467546._2
1619+ let baseAssetReserveAfter = $t06732467546._3
1620+ let totalPositionSizeAfter = $t06732467546._4
16021621 let exchangedPositionSize = if ((oldPositionSize > 0))
16031622 then -(_size)
16041623 else _size
1605- let $t06683266986 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1606- let oldPositionNotional = $t06683266986._1
1607- let unrealizedPnl = $t06683266986._2
1624+ let $t06763767791 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1625+ let oldPositionNotional = $t06763767791._1
1626+ let unrealizedPnl = $t06763767791._2
16081627 let mr = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
16091628 let realizedRatio = divd(abs(exchangedPositionSize), abs(oldPositionSize))
16101629 let realizedPnl = muld(unrealizedPnl, realizedRatio)
1611- let $t06726567503 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1612- let remainMargin = $t06726567503._1
1613- let positionBadDebt = $t06726567503._2
1614- let fundingPayment = $t06726567503._3
1630+ let $t06807068308 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1631+ let remainMargin = $t06807068308._1
1632+ let positionBadDebt = $t06807068308._2
1633+ let fundingPayment = $t06807068308._3
16151634 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
16161635 let remainOpenNotional = if ((oldPositionSize > 0))
16171636 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
16381657 else if ((_size > abs(oldPositionSize)))
16391658 then throw("Invalid closePosition parameters")
16401659 else {
1641- let $t06930669725 = internalClosePosition(_trader, true)
1642- let exchangedQuoteAssetAmount = $t06930669725._1
1643- let positionBadDebt = $t06930669725._2
1644- let realizedPnl = $t06930669725._3
1645- let marginToVault = $t06930669725._4
1646- let quoteAssetReserveAfter = $t06930669725._5
1647- let baseAssetReserveAfter = $t06930669725._6
1648- let totalPositionSizeAfter = $t06930669725._7
1649- let openInterestNotionalAfter = $t06930669725._8
1650- let x2 = $t06930669725._9
1651- let totalLongAfter = $t06930669725._10
1652- let totalShortAfter = $t06930669725._11
1653- let totalLongOpenInterestAfter = $t06930669725._12
1654- let totalShortOpenInterestAfter = $t06930669725._13
1660+ let $t07011170530 = internalClosePosition(_trader, true)
1661+ let exchangedQuoteAssetAmount = $t07011170530._1
1662+ let positionBadDebt = $t07011170530._2
1663+ let realizedPnl = $t07011170530._3
1664+ let marginToVault = $t07011170530._4
1665+ let quoteAssetReserveAfter = $t07011170530._5
1666+ let baseAssetReserveAfter = $t07011170530._6
1667+ let totalPositionSizeAfter = $t07011170530._7
1668+ let openInterestNotionalAfter = $t07011170530._8
1669+ let x2 = $t07011170530._9
1670+ let totalLongAfter = $t07011170530._10
1671+ let totalShortAfter = $t07011170530._11
1672+ let totalLongOpenInterestAfter = $t07011170530._12
1673+ let totalShortOpenInterestAfter = $t07011170530._13
16551674 if (if ((_minQuoteAssetAmount != 0))
16561675 then (_minQuoteAssetAmount > exchangedQuoteAssetAmount)
16571676 else false)
16581677 then throw(((("Limit error: " + toString(exchangedQuoteAssetAmount)) + " < ") + toString(_minQuoteAssetAmount)))
16591678 else $Tuple15(0, 0, 0, 0, positionBadDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter, totalLongOpenInterestAfter, totalShortOpenInterestAfter)
16601679 }
1661- let newPositionSize = $t06592870365._1
1662- let newPositionMargin = $t06592870365._2
1663- let newPositionOpenNotional = $t06592870365._3
1664- let newPositionLstUpdCPF = $t06592870365._4
1665- let positionBadDebt = $t06592870365._5
1666- let realizedPnl = $t06592870365._6
1667- let marginToVault = $t06592870365._7
1668- let quoteAssetReserveAfter = $t06592870365._8
1669- let baseAssetReserveAfter = $t06592870365._9
1670- let totalPositionSizeAfter = $t06592870365._10
1671- let openInterestNotionalAfter = $t06592870365._11
1672- let totalLongAfter = $t06592870365._12
1673- let totalShortAfter = $t06592870365._13
1674- let totalLongOpenInterestAfter = $t06592870365._14
1675- let totalShortOpenInterestAfter = $t06592870365._15
1680+ let newPositionSize = $t06673371170._1
1681+ let newPositionMargin = $t06673371170._2
1682+ let newPositionOpenNotional = $t06673371170._3
1683+ let newPositionLstUpdCPF = $t06673371170._4
1684+ let positionBadDebt = $t06673371170._5
1685+ let realizedPnl = $t06673371170._6
1686+ let marginToVault = $t06673371170._7
1687+ let quoteAssetReserveAfter = $t06673371170._8
1688+ let baseAssetReserveAfter = $t06673371170._9
1689+ let totalPositionSizeAfter = $t06673371170._10
1690+ let openInterestNotionalAfter = $t06673371170._11
1691+ let totalLongAfter = $t06673371170._12
1692+ let totalShortAfter = $t06673371170._13
1693+ let totalLongOpenInterestAfter = $t06673371170._14
1694+ let totalShortOpenInterestAfter = $t06673371170._15
16761695 if ((positionBadDebt > 0))
16771696 then throw("Unable to close position with bad debt")
16781697 else {
16791698 let withdrawAmount = abs(marginToVault)
16801699 let ammBalance = (cbalance() - withdrawAmount)
1681- let $t07057470781 = if ((0 > ammBalance))
1700+ let $t07137971586 = if ((0 > ammBalance))
16821701 then $Tuple2(0, abs(ammBalance))
16831702 else $Tuple2(ammBalance, 0)
1684- let ammNewBalance = $t07057470781._1
1685- let x11 = $t07057470781._2
1686- let $t07078870842 = getBorrowedByTrader(_trader)
1687- let borrowed = $t07078870842._1
1688- let assetId = $t07078870842._2
1689- let $t07085771716 = if ((borrowed > 0))
1703+ let ammNewBalance = $t07137971586._1
1704+ let x11 = $t07137971586._2
1705+ let $t07159371647 = getBorrowedByTrader(_trader)
1706+ let borrowed = $t07159371647._1
1707+ let assetId = $t07159371647._2
1708+ let $t07166272521 = if ((borrowed > 0))
16901709 then if ((withdrawAmount >= borrowed))
16911710 then {
16921711 let doRepay = invoke(collateralAddress(), "repay", [_trader, borrowed, assetId], nil)
17011720 else throw("Strict value is not equal to itself.")
17021721 }
17031722 else $Tuple2(nil, withdrawAmount)
1704- if (($t07085771716 == $t07085771716))
1723+ if (($t07166272521 == $t07166272521))
17051724 then {
1706- let quoteWithdrawAmount = $t07085771716._2
1707- let sendCollateralAction = $t07085771716._1
1725+ let quoteWithdrawAmount = $t07166272521._2
1726+ let sendCollateralAction = $t07166272521._1
17081727 let unstake = if ((quoteWithdrawAmount > 0))
17091728 then {
17101729 let unstake = invoke(vaultAddress(), "withdrawLocked", [quoteWithdrawAmount], nil)
17611780 then (DECIMAL_UNIT > partialLiquidationRatio())
17621781 else false)
17631782 then {
1764- let $t07401374163 = getPosition(_trader)
1765- let oldPositionSize = $t07401374163._1
1766- let oldPositionMargin = $t07401374163._2
1767- let oldPositionOpenNotional = $t07401374163._3
1768- let oldPositionLstUpdCPF = $t07401374163._4
1783+ let $t07481874968 = getPosition(_trader)
1784+ let oldPositionSize = $t07481874968._1
1785+ let oldPositionMargin = $t07481874968._2
1786+ let oldPositionOpenNotional = $t07481874968._3
1787+ let oldPositionLstUpdCPF = $t07481874968._4
17691788 let _direction = if ((oldPositionSize > 0))
17701789 then DIR_SHORT
17711790 else DIR_LONG
17721791 let isAdd = (_direction == DIR_LONG)
17731792 let exchangedQuoteAssetAmount = getPartialLiquidationAmount(_trader, oldPositionSize)
1774- let $t07438874492 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1775- let oldPositionNotional = $t07438874492._1
1776- let unrealizedPnl = $t07438874492._2
1777- let $t07450074687 = swapInput(isAdd, exchangedQuoteAssetAmount)
1778- let exchangedPositionSize = $t07450074687._1
1779- let quoteAssetReserveAfter = $t07450074687._2
1780- let baseAssetReserveAfter = $t07450074687._3
1781- let totalPositionSizeAfter = $t07450074687._4
1793+ let $t07519375297 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1794+ let oldPositionNotional = $t07519375297._1
1795+ let unrealizedPnl = $t07519375297._2
1796+ let $t07530575492 = swapInput(isAdd, exchangedQuoteAssetAmount)
1797+ let exchangedPositionSize = $t07530575492._1
1798+ let quoteAssetReserveAfter = $t07530575492._2
1799+ let baseAssetReserveAfter = $t07530575492._3
1800+ let totalPositionSizeAfter = $t07530575492._4
17821801 let liquidationRatio = divd(abs(exchangedPositionSize), abs(oldPositionSize))
17831802 let realizedPnl = muld(unrealizedPnl, liquidationRatio)
1784- let $t07497675209 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1785- let remainMargin = $t07497675209._1
1786- let badDebt = $t07497675209._2
1787- let fundingPayment = $t07497675209._3
1803+ let $t07578176014 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1804+ let remainMargin = $t07578176014._1
1805+ let badDebt = $t07578176014._2
1806+ let fundingPayment = $t07578176014._3
17881807 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
17891808 let remainOpenNotional = if ((oldPositionSize > 0))
17901809 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
17981817 let newPositionLstUpdCPF = latestCumulativePremiumFraction(newPositionSize)
17991818 let openInterestNotionalAfter = (openInterestNotional() - exchangedQuoteAssetAmount)
18001819 let ammBalance = (cbalance() - liquidationPenalty)
1801- let $t07637876507 = if ((0 > ammBalance))
1820+ let $t07718377312 = if ((0 > ammBalance))
18021821 then $Tuple2(0, abs(ammBalance))
18031822 else $Tuple2(ammBalance, 0)
1804- let newAmmBalance = $t07637876507._1
1805- let x11 = $t07637876507._2
1806- let $t07651576569 = getBorrowedByTrader(_trader)
1807- let borrowed = $t07651576569._1
1808- let assetId = $t07651576569._2
1823+ let newAmmBalance = $t07718377312._1
1824+ let x11 = $t07718377312._2
1825+ let $t07732077374 = getBorrowedByTrader(_trader)
1826+ let borrowed = $t07732077374._1
1827+ let assetId = $t07732077374._2
18091828 let doLiquidateCollateral = if ((borrowed > 0))
18101829 then {
18111830 let collateralToSell = muld(borrowed, liquidationRatio)
18431862 else throw("Strict value is not equal to itself.")
18441863 }
18451864 else {
1846- let $t07826478759 = internalClosePosition(_trader, false)
1847- let x1 = $t07826478759._1
1848- let badDebt = $t07826478759._2
1849- let x2 = $t07826478759._3
1850- let x3 = $t07826478759._4
1851- let quoteAssetReserveAfter = $t07826478759._5
1852- let baseAssetReserveAfter = $t07826478759._6
1853- let totalPositionSizeAfter = $t07826478759._7
1854- let openInterestNotionalAfter = $t07826478759._8
1855- let exchangedQuoteAssetAmount = $t07826478759._9
1856- let totalLongAfter = $t07826478759._10
1857- let totalShortAfter = $t07826478759._11
1858- let totalLongOpenInterestAfter = $t07826478759._12
1859- let totalShortOpenInterestAfter = $t07826478759._13
1865+ let $t07906979564 = internalClosePosition(_trader, false)
1866+ let x1 = $t07906979564._1
1867+ let badDebt = $t07906979564._2
1868+ let x2 = $t07906979564._3
1869+ let x3 = $t07906979564._4
1870+ let quoteAssetReserveAfter = $t07906979564._5
1871+ let baseAssetReserveAfter = $t07906979564._6
1872+ let totalPositionSizeAfter = $t07906979564._7
1873+ let openInterestNotionalAfter = $t07906979564._8
1874+ let exchangedQuoteAssetAmount = $t07906979564._9
1875+ let totalLongAfter = $t07906979564._10
1876+ let totalShortAfter = $t07906979564._11
1877+ let totalLongOpenInterestAfter = $t07906979564._12
1878+ let totalShortOpenInterestAfter = $t07906979564._13
18601879 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
18611880 let feeToLiquidator = (liquidationPenalty / 2)
18621881 let feeToVault = (liquidationPenalty - feeToLiquidator)
18631882 let ammBalance = (cbalance() - liquidationPenalty)
1864- let $t07916779296 = if ((0 > ammBalance))
1883+ let $t07997280101 = if ((0 > ammBalance))
18651884 then $Tuple2(0, abs(ammBalance))
18661885 else $Tuple2(ammBalance, 0)
1867- let newAmmBalance = $t07916779296._1
1868- let x11 = $t07916779296._2
1869- let $t07930479358 = getBorrowedByTrader(_trader)
1870- let borrowed = $t07930479358._1
1871- let assetId = $t07930479358._2
1886+ let newAmmBalance = $t07997280101._1
1887+ let x11 = $t07997280101._2
1888+ let $t08010980163 = getBorrowedByTrader(_trader)
1889+ let borrowed = $t08010980163._1
1890+ let assetId = $t08010980163._2
18721891 let doLiquidateCollateral = if ((borrowed > 0))
18731892 then {
18741893 let realizeAndClose = invoke(collateralAddress(), "realizePartiallyAndClose", [_trader, 0, assetId], nil)
19281947 then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp)))
19291948 else {
19301949 let underlyingPrice = getOracleTwapPrice()
1931- let $t08123481296 = getFunding()
1932- let shortPremiumFraction = $t08123481296._1
1933- let longPremiumFraction = $t08123481296._2
1950+ let $t08203982101 = getFunding()
1951+ let shortPremiumFraction = $t08203982101._1
1952+ let longPremiumFraction = $t08203982101._2
19341953 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
19351954 }
19361955 }
19411960
19421961 @Callable(i)
19431962 func syncTerminalPriceToOracle () = {
1944- let $t08167881799 = getSyncTerminalPrice(getOracleTwapPrice())
1945- let newQuoteAssetWeight = $t08167881799._1
1946- let newBaseAssetWeight = $t08167881799._2
1947- let marginToVault = $t08167881799._3
1963+ let _qtAstR = qtAstR()
1964+ let _bsAstR = bsAstR()
1965+ let $t08253382672 = getSyncTerminalPrice(getOracleTwapPrice(), _qtAstR, _bsAstR)
1966+ let newQuoteAssetWeight = $t08253382672._1
1967+ let newBaseAssetWeight = $t08253382672._2
1968+ let marginToVault = $t08253382672._3
19481969 let doExchangePnL = if ((marginToVault != 0))
19491970 then {
19501971 let doExchangePnL = invoke(vaultAddress(), "exchangeFreeAndLocked", [marginToVault], nil)
19541975 }
19551976 else nil
19561977 if ((doExchangePnL == doExchangePnL))
1957- then {
1958- let _qtAstR = qtAstR()
1959- let _bsAstR = bsAstR()
1960- (updateAmmWeights(newQuoteAssetWeight, newBaseAssetWeight) ++ appendTwap(divd(muld(_qtAstR, newQuoteAssetWeight), muld(_bsAstR, newBaseAssetWeight))))
1961- }
1978+ then (updateAmmWeights(newQuoteAssetWeight, newBaseAssetWeight) ++ appendTwap(divd(muld(_qtAstR, newQuoteAssetWeight), muld(_bsAstR, newBaseAssetWeight))))
19621979 else throw("Strict value is not equal to itself.")
19631980 }
19641981
19691986 let sync = invoke(this, "syncTerminalPriceToOracle", nil, nil)
19701987 if ((sync == sync))
19711988 then {
1972- let $t08241982520 = getPosition(_trader)
1973- let positionSize = $t08241982520._1
1974- let positionMargin = $t08241982520._2
1975- let pon = $t08241982520._3
1976- let positionLstUpdCPF = $t08241982520._4
1977- let $t08252382624 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1978- let positionNotional = $t08252382624._1
1979- let unrealizedPnl = $t08252382624._2
1980- let $t08262782799 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1981- let remainMargin = $t08262782799._1
1982- let badDebt = $t08262782799._2
1983- let fundingPayment = $t08262782799._3
1989+ let $t08324183342 = getPosition(_trader)
1990+ let positionSize = $t08324183342._1
1991+ let positionMargin = $t08324183342._2
1992+ let pon = $t08324183342._3
1993+ let positionLstUpdCPF = $t08324183342._4
1994+ let $t08334583446 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1995+ let positionNotional = $t08334583446._1
1996+ let unrealizedPnl = $t08334583446._2
1997+ let $t08344983621 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1998+ let remainMargin = $t08344983621._1
1999+ let badDebt = $t08344983621._2
2000+ let fundingPayment = $t08344983621._3
19842001 throw((((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)) + s(badDebt)) + s(positionNotional)))
19852002 }
19862003 else throw("Strict value is not equal to itself.")
19902007
19912008 @Callable(i)
19922009 func view_getPegAdjustCost (_price) = {
1993- let result = getSyncTerminalPrice(_price)
2010+ let _qtAstR = qtAstR()
2011+ let _bsAstR = bsAstR()
2012+ let result = getSyncTerminalPrice(_price, _qtAstR, _bsAstR)
19942013 throw(toString(result._3))
19952014 }
19962015
19982017
19992018 @Callable(i)
20002019 func view_getTerminalAmmPrice () = {
2001- let $t08314683227 = getTerminalAmmState()
2002- let terminalQuoteAssetReserve = $t08314683227._1
2003- let terminalBaseAssetReserve = $t08314683227._2
2020+ let $t08403784118 = getTerminalAmmState()
2021+ let terminalQuoteAssetReserve = $t08403784118._1
2022+ let terminalBaseAssetReserve = $t08403784118._2
20042023 let price = divd(muld(terminalQuoteAssetReserve, qtAstW()), muld(terminalBaseAssetReserve, bsAstW()))
20052024 throw(toString(price))
20062025 }
20102029 @Callable(i)
20112030 func view_getFunding () = {
20122031 let underlyingPrice = getOracleTwapPrice()
2013- let $t08344683508 = getFunding()
2014- let shortPremiumFraction = $t08344683508._1
2015- let longPremiumFraction = $t08344683508._2
2032+ let $t08433784399 = getFunding()
2033+ let shortPremiumFraction = $t08433784399._1
2034+ let longPremiumFraction = $t08433784399._2
20162035 let longFunding = divd(longPremiumFraction, underlyingPrice)
20172036 let shortFunding = divd(shortPremiumFraction, underlyingPrice)
20182037 throw((((s(longFunding) + s(shortFunding)) + s(getTwapSpotPrice())) + s(getOracleTwapPrice())))
20222041
20232042 @Callable(i)
20242043 func view_getBorrowedByTrader (_trader) = {
2025- let $t08379883852 = getBorrowedByTrader(_trader)
2026- let borrowed = $t08379883852._1
2027- let assetId = $t08379883852._2
2044+ let $t08468984743 = getBorrowedByTrader(_trader)
2045+ let borrowed = $t08468984743._1
2046+ let assetId = $t08468984743._2
20282047 throw((s(borrowed) + assetId))
20292048 }
20302049
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let k_ora_key = "k_ora_key"
55
66 let k_ora_block_key = "k_ora_block_key"
77
88 let k_ora = "k_ora"
99
1010 let k_balance = "k_balance"
1111
1212 let k_sequence = "k_sequence"
1313
1414 let k_positionSize = "k_positionSize"
1515
1616 let k_positionMargin = "k_positionMargin"
1717
1818 let k_positionOpenNotional = "k_positionOpenNotional"
1919
2020 let k_positionLastUpdatedCumulativePremiumFraction = "k_positionFraction"
2121
2222 let k_positionSequence = "k_positionSequence"
2323
2424 let k_positionAsset = "k_positionAsset"
2525
2626 let k_initialized = "k_initialized"
2727
2828 let k_paused = "k_paused"
2929
3030 let k_closeOnly = "k_closeOnly"
3131
3232 let k_fee = "k_fee"
3333
3434 let k_fundingPeriod = "k_fundingPeriod"
3535
3636 let k_initMarginRatio = "k_initMarginRatio"
3737
3838 let k_maintenanceMarginRatio = "k_mmr"
3939
4040 let k_liquidationFeeRatio = "k_liquidationFeeRatio"
4141
4242 let k_partialLiquidationRatio = "k_partLiquidationRatio"
4343
4444 let k_spreadLimit = "k_spreadLimit"
4545
4646 let k_maxPriceImpact = "k_maxPriceImpact"
4747
4848 let k_maxPriceSpread = "k_maxPriceSpread"
4949
5050 let k_maxOpenNotional = "k_maxOpenNotional"
5151
5252 let k_feeToStakersPercent = "k_feeToStakersPercent"
5353
5454 let k_maxOracleDelay = "k_maxOracleDelay"
5555
5656 let k_lastDataStr = "k_lastDataStr"
5757
5858 let k_lastMinuteId = "k_lastMinuteId"
5959
6060 let k_twapDataLastCumulativePrice = "k_twapDataLastCumulativePrice"
6161
6262 let k_twapDataLastPrice = "k_twapDataLastPrice"
6363
6464 let k_twapDataPreviousMinuteId = "k_twapDataPreviousMinuteId"
6565
6666 let k_latestLongCumulativePremiumFraction = "k_latestLongPremiumFraction"
6767
6868 let k_latestShortCumulativePremiumFraction = "k_latestShortPremiumFraction"
6969
7070 let k_nextFundingBlock = "k_nextFundingBlockMinTimestamp"
7171
7272 let k_longFundingRate = "k_longFundingRate"
7373
7474 let k_shortFundingRate = "k_shortFundingRate"
7575
7676 let k_quoteAssetReserve = "k_qtAstR"
7777
7878 let k_baseAssetReserve = "k_bsAstR"
7979
8080 let k_quoteAssetWeight = "k_qtAstW"
8181
8282 let k_baseAssetWeight = "k_bsAstW"
8383
8484 let k_totalPositionSize = "k_totalPositionSize"
8585
8686 let k_totalLongPositionSize = "k_totalLongPositionSize"
8787
8888 let k_totalShortPositionSize = "k_totalShortPositionSize"
8989
9090 let k_openInterestNotional = "k_openInterestNotional"
9191
9292 let k_openInterestShort = "k_openInterestShort"
9393
9494 let k_openInterestLong = "k_openInterestLong"
9595
9696 let k_coordinatorAddress = "k_coordinatorAddress"
9797
9898 let k_vault_address = "k_vault_address"
9999
100100 let k_admin_address = "k_admin_address"
101101
102102 let k_admin_public_key = "k_admin_public_key"
103103
104104 let k_quote_asset = "k_quote_asset"
105105
106106 let k_quote_staking = "k_quote_staking"
107107
108108 let k_staking_address = "k_staking_address"
109109
110110 let k_miner_address = "k_miner_address"
111111
112112 let k_orders_address = "k_orders_address"
113113
114114 let k_referral_address = "k_referral_address"
115115
116116 let k_collateral_address = "k_collateral_address"
117117
118118 let k_exchange_address = "k_exchange_address"
119119
120120 let k_nft_manager_address = "k_nft_manager_address"
121121
122122 let k_trader_market_asset_collateral = "k_trader_market_asset_collateral"
123123
124124 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
125125
126126
127127 func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set")
128128
129129
130130 func adminAddress () = addressFromString(getStringValue(coordinator(), k_admin_address))
131131
132132
133133 func adminPublicKey () = fromBase58String(getStringValue(coordinator(), k_admin_public_key))
134134
135135
136136 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
137137
138138
139139 func quoteAssetStaking () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_quote_staking)), "Quote asset staking not set")
140140
141141
142142 func stakingAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_staking_address)), "Staking not set")
143143
144144
145145 func vaultAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_vault_address)), "Vault not set")
146146
147147
148148 func minerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_miner_address)), "Miner not set")
149149
150150
151151 func ordersAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_orders_address)), "Orders not set")
152152
153153
154154 func referralAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_referral_address)), "Referral not set")
155155
156156
157157 func nftManagerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_nft_manager_address)), "NFT Manager not set")
158158
159159
160160 func collateralAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_collateral_address)), "Collateral Manager not set")
161161
162162
163163 func swapAddress () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(coordinator(), k_exchange_address), "No swap address")), "Invalid swap address")
164164
165165
166166 let k_whitelist_asset = "k_whitelist_asset"
167167
168168 func isWhitelistAsset (_assetId) = valueOrElse(getBoolean(collateralAddress(), toCompositeKey(k_whitelist_asset, _assetId)), false)
169169
170170
171171 let k_token_param = "k_token_param"
172172
173173 let k_token_type = "k_token_type"
174174
175175 let FEE_REDUCTION_TOKEN_TYPE = "fee_reduction"
176176
177177 let DIR_LONG = 1
178178
179179 let DIR_SHORT = 2
180180
181181 let TWAP_INTERVAL = 15
182182
183183 let ORACLE_INTERVAL = 15
184184
185185 let SECONDS = 1000
186186
187187 let DECIMAL_NUMBERS = 6
188188
189189 let DECIMAL_UNIT = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
190190
191191 let ONE_DAY = (86400 * DECIMAL_UNIT)
192192
193193 let ALL_FEES = 100
194194
195195 let PNL_OPTION_SPOT = 1
196196
197197 let PNL_OPTION_ORACLE = 2
198198
199199 func s (_x) = (toString(_x) + ",")
200200
201201
202202 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
203203
204204
205205 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
206206
207207
208208 func sqrtd (_x) = sqrt(_x, DECIMAL_NUMBERS, DECIMAL_NUMBERS, HALFEVEN)
209209
210210
211211 func powd (_x,_y) = pow(_x, DECIMAL_NUMBERS, _y, DECIMAL_NUMBERS, DECIMAL_NUMBERS, HALFEVEN)
212212
213213
214214 func bdivd (_x,_y) = fraction(_x, toBigInt(DECIMAL_UNIT), _y, HALFEVEN)
215215
216216
217217 func bmuld (_x,_y) = fraction(_x, _y, toBigInt(DECIMAL_UNIT), HALFEVEN)
218218
219219
220220 func bsqrtd (_x) = sqrtBigInt(_x, DECIMAL_NUMBERS, DECIMAL_NUMBERS, HALFEVEN)
221221
222222
223223 func bpowd (_x,_y) = pow(_x, DECIMAL_NUMBERS, _y, DECIMAL_NUMBERS, DECIMAL_NUMBERS, HALFEVEN)
224224
225225
226226 func abs (_x) = if ((_x > 0))
227227 then _x
228228 else -(_x)
229229
230230
231231 func vmax (_x,_y) = if ((_x >= _y))
232232 then _x
233233 else _y
234234
235235
236236 func listToStr (_list) = {
237237 func _join (accumulator,val) = ((accumulator + val) + ",")
238238
239239 let newListStr = {
240240 let $l = _list
241241 let $s = size($l)
242242 let $acc0 = ""
243243 func $f0_1 ($a,$i) = if (($i >= $s))
244244 then $a
245245 else _join($a, $l[$i])
246246
247247 func $f0_2 ($a,$i) = if (($i >= $s))
248248 then $a
249249 else throw("List size exceeds 20")
250250
251251 $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)
252252 }
253253 let newListStrU = dropRight(newListStr, 1)
254254 let newListStrR = if ((take(newListStrU, 1) == ","))
255255 then drop(newListStrU, 1)
256256 else newListStrU
257257 newListStrR
258258 }
259259
260260
261261 func strToList (_str) = split(_str, ",")
262262
263263
264264 func pushToQueue (_list,_maxSize,_value) = if ((size(_list) > _maxSize))
265265 then (removeByIndex(_list, 0) :+ _value)
266266 else (_list :+ _value)
267267
268268
269269 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
270270
271271
272272 func intOr (k,def) = valueOrElse(getInteger(this, k), def)
273273
274274
275275 func strA (_address,_key) = {
276276 let val = valueOrErrorMessage(getString(_address, _key), ("No value for key " + _key))
277277 val
278278 }
279279
280280
281281 func intA (_address,_key) = {
282282 let val = valueOrErrorMessage(getInteger(_address, _key), ("No value for key " + _key))
283283 val
284284 }
285285
286286
287287 func cbalance () = int(k_balance)
288288
289289
290290 func fee () = int(k_fee)
291291
292292
293293 func initMarginRatio () = int(k_initMarginRatio)
294294
295295
296296 func qtAstR () = int(k_quoteAssetReserve)
297297
298298
299299 func bsAstR () = int(k_baseAssetReserve)
300300
301301
302302 func qtAstW () = intOr(k_quoteAssetWeight, DECIMAL_UNIT)
303303
304304
305305 func bsAstW () = intOr(k_baseAssetWeight, DECIMAL_UNIT)
306306
307307
308308 func totalPositionSize () = int(k_totalPositionSize)
309309
310310
311311 func openInterestNotional () = int(k_openInterestNotional)
312312
313313
314314 func openInterestShort () = int(k_openInterestShort)
315315
316316
317317 func openInterestLong () = int(k_openInterestLong)
318318
319319
320320 func nextFundingBlockTimestamp () = int(k_nextFundingBlock)
321321
322322
323323 func fundingPeriodRaw () = int(k_fundingPeriod)
324324
325325
326326 func fundingPeriodDecimal () = (fundingPeriodRaw() * DECIMAL_UNIT)
327327
328328
329329 func fundingPeriodSeconds () = (fundingPeriodRaw() * SECONDS)
330330
331331
332332 func maintenanceMarginRatio () = int(k_maintenanceMarginRatio)
333333
334334
335335 func liquidationFeeRatio () = int(k_liquidationFeeRatio)
336336
337337
338338 func partialLiquidationRatio () = int(k_partialLiquidationRatio)
339339
340340
341341 func spreadLimit () = int(k_spreadLimit)
342342
343343
344344 func maxPriceImpact () = int(k_maxPriceImpact)
345345
346346
347347 func maxPriceSpread () = int(k_maxPriceSpread)
348348
349349
350350 func maxOpenNotional () = int(k_maxOpenNotional)
351351
352352
353353 func latestLongCumulativePremiumFraction () = int(k_latestLongCumulativePremiumFraction)
354354
355355
356356 func latestShortCumulativePremiumFraction () = int(k_latestShortCumulativePremiumFraction)
357357
358358
359359 func totalShortPositionSize () = int(k_totalShortPositionSize)
360360
361361
362362 func totalLongPositionSize () = int(k_totalLongPositionSize)
363363
364364
365365 func lastSequence () = intOr(k_sequence, 0)
366366
367367
368368 func feeToStakersPercent () = int(k_feeToStakersPercent)
369369
370370
371371 func maxOracleDelay () = int(k_maxOracleDelay)
372372
373373
374374 func getActualCaller (i) = valueOrElse(getString(ordersAddress(), "k_sender"), toString(i.caller))
375375
376376
377377 func requireMoreMarginRatio (_marginRatio,_baseMarginRatio,_largerThanOrEqualTo) = {
378378 let remainingMarginRatio = (_marginRatio - _baseMarginRatio)
379379 if (if (_largerThanOrEqualTo)
380380 then (0 > remainingMarginRatio)
381381 else false)
382382 then throw("Invalid margin")
383383 else if (if (!(_largerThanOrEqualTo))
384384 then (remainingMarginRatio >= 0)
385385 else false)
386386 then throw("Invalid margin")
387387 else true
388388 }
389389
390390
391391 func latestCumulativePremiumFraction (_positionSize) = if ((_positionSize == 0))
392392 then throw("Should not be called with _positionSize == 0")
393393 else if ((_positionSize > 0))
394394 then latestLongCumulativePremiumFraction()
395395 else latestShortCumulativePremiumFraction()
396396
397397
398398 func getPosition (_trader) = {
399399 let positionSizeOpt = getInteger(this, toCompositeKey(k_positionSize, _trader))
400400 match positionSizeOpt {
401401 case positionSize: Int =>
402402 $Tuple4(positionSize, getIntegerValue(this, toCompositeKey(k_positionMargin, _trader)), getIntegerValue(this, toCompositeKey(k_positionOpenNotional, _trader)), getIntegerValue(this, toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _trader)))
403403 case _ =>
404404 $Tuple4(0, 0, 0, 0)
405405 }
406406 }
407407
408408
409409 func getPositionAsset (_trader) = {
410410 let positionAssetOpt = getString(this, toCompositeKey(k_positionAsset, _trader))
411411 match positionAssetOpt {
412412 case positionAsset: String =>
413413 positionAsset
414414 case _ =>
415415 toBase58String(quoteAsset())
416416 }
417417 }
418418
419419
420420 func requireOpenPosition (_trader) = if ((getPosition(_trader)._1 == 0))
421421 then throw("No open position")
422422 else true
423423
424424
425425 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
426426
427427
428428 func paused () = valueOrElse(getBoolean(this, k_paused), false)
429429
430430
431431 func closeOnly () = valueOrElse(getBoolean(this, k_closeOnly), false)
432432
433433
434434 func updateReserve (_isAdd,_quoteAssetAmount,_baseAssetAmount) = if (_isAdd)
435435 then {
436436 let newBase = (bsAstR() - _baseAssetAmount)
437437 if ((0 >= newBase))
438438 then throw("Tx lead to base asset reserve <= 0, revert")
439439 else $Tuple3((qtAstR() + _quoteAssetAmount), newBase, (totalPositionSize() + _baseAssetAmount))
440440 }
441441 else {
442442 let newQuote = (qtAstR() - _quoteAssetAmount)
443443 if ((0 >= newQuote))
444444 then throw("Tx lead to base quote reserve <= 0, revert")
445445 else $Tuple3(newQuote, (bsAstR() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount))
446446 }
447447
448448
449449 func calcInvariant (_qtAstR,_qtAstW,_bsAstR,_bsAstW) = {
450450 let bqtAstR = toBigInt(_qtAstR)
451451 let bqtAstW = toBigInt(_qtAstW)
452452 let bbsAstR = toBigInt(_bsAstR)
453453 let bbsAstW = toBigInt(_bsAstW)
454454 bmuld(bmuld(bqtAstR, bqtAstW), bmuld(bbsAstR, bbsAstW))
455455 }
456456
457457
458458 func swapInput (_isAdd,_quoteAssetAmount) = {
459459 let _qtAstR = qtAstR()
460460 let _bsAstR = bsAstR()
461461 let _qtAstW = qtAstW()
462462 let _bsAstW = bsAstW()
463463 let k = calcInvariant(_qtAstR, _qtAstW, _bsAstR, _bsAstW)
464464 let quoteAssetReserveAfter = if (_isAdd)
465465 then (_qtAstR + _quoteAssetAmount)
466466 else (_qtAstR - _quoteAssetAmount)
467467 let baseAssetReserveAfter = toInt(bdivd(k, toBigInt(muld(quoteAssetReserveAfter, _qtAstW))))
468468 let amountBaseAssetBoughtAbs = divd(abs((baseAssetReserveAfter - _bsAstR)), _qtAstW)
469469 let amountBaseAssetBought = if (_isAdd)
470470 then amountBaseAssetBoughtAbs
471471 else -(amountBaseAssetBoughtAbs)
472472 let $t01694617109 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
473473 let quoteAssetReserveAfter1 = $t01694617109._1
474474 let baseAssetReserveAfter1 = $t01694617109._2
475475 let totalPositionSizeAfter1 = $t01694617109._3
476476 let priceBefore = divd(muld(_qtAstR, _qtAstW), muld(_bsAstR, _bsAstW))
477477 let marketPrice = divd(_quoteAssetAmount, amountBaseAssetBoughtAbs)
478478 let priceDiff = abs((priceBefore - marketPrice))
479479 let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
480480 let maxPriceImpactValue = maxPriceImpact()
481481 if ((priceImpact > maxPriceImpactValue))
482482 then throw(((((((((((((("Price impact " + toString(priceImpact)) + " > max price impact ") + toString(maxPriceImpactValue)) + " before quote asset: ") + toString(_qtAstR)) + " before base asset: ") + toString(_bsAstR)) + " quote asset amount to exchange: ") + toString(_quoteAssetAmount)) + " price before: ") + toString(priceBefore)) + " marketPrice: ") + toString(marketPrice)))
483483 else $Tuple4(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1)
484484 }
485485
486486
487487 func calcRemainMarginWithFundingPayment (_oldPositionSize,_oldPositionMargin,_oldPositionCumulativePremiumFraction,_marginDelta) = {
488488 let fundingPayment = if ((_oldPositionSize != 0))
489489 then {
490490 let _latestCumulativePremiumFraction = latestCumulativePremiumFraction(_oldPositionSize)
491491 muld((_latestCumulativePremiumFraction - _oldPositionCumulativePremiumFraction), _oldPositionSize)
492492 }
493493 else 0
494494 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
495495 let $t01859618723 = if ((0 > signedMargin))
496496 then $Tuple2(0, abs(signedMargin))
497497 else $Tuple2(abs(signedMargin), 0)
498498 let remainMargin = $t01859618723._1
499499 let badDebt = $t01859618723._2
500500 $Tuple3(remainMargin, badDebt, fundingPayment)
501501 }
502502
503503
504504 func swapOutputWithReserves (_isAdd,_baseAssetAmount,_checkMaxPriceImpact,_quoteAssetReserve,_quoteAssetWeight,_baseAssetReserve,_baseAssetWeight) = {
505505 let priceBefore = divd(muld(_quoteAssetReserve, _quoteAssetWeight), muld(_baseAssetReserve, _baseAssetWeight))
506506 if ((_baseAssetAmount == 0))
507507 then throw("Invalid base asset amount")
508508 else {
509509 let k = calcInvariant(_quoteAssetReserve, _quoteAssetWeight, _baseAssetReserve, _baseAssetWeight)
510510 let baseAssetPoolAmountAfter = if (_isAdd)
511511 then (_baseAssetReserve + _baseAssetAmount)
512512 else (_baseAssetReserve - _baseAssetAmount)
513513 let quoteAssetAfter = toInt(bdivd(k, toBigInt(muld(baseAssetPoolAmountAfter, _baseAssetWeight))))
514514 let quoteAssetSold = abs((quoteAssetAfter - muld(_quoteAssetReserve, _quoteAssetWeight)))
515515 let maxPriceImpactValue = maxPriceImpact()
516516 let $t01991120072 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
517517 let quoteAssetReserveAfter1 = $t01991120072._1
518518 let baseAssetReserveAfter1 = $t01991120072._2
519519 let totalPositionSizeAfter1 = $t01991120072._3
520520 let marketPrice = divd(quoteAssetSold, _baseAssetAmount)
521521 let priceDiff = abs((priceBefore - marketPrice))
522522 let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
523523 if (if ((priceImpact > maxPriceImpactValue))
524524 then _checkMaxPriceImpact
525525 else false)
526526 then throw(((((((((((((("Price impact " + toString(priceImpact)) + " > max price impact ") + toString(maxPriceImpactValue)) + " before quote asset: ") + toString(_quoteAssetReserve)) + " before base asset: ") + toString(_baseAssetReserve)) + " base asset amount to exchange: ") + toString(_baseAssetAmount)) + " price before: ") + toString(priceBefore)) + " market price: ") + toString(marketPrice)))
527527 else $Tuple7(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, (totalLongPositionSize() - (if (_isAdd)
528528 then abs(_baseAssetAmount)
529529 else 0)), (totalShortPositionSize() - (if (!(_isAdd))
530530 then abs(_baseAssetAmount)
531531 else 0)), priceImpact)
532532 }
533533 }
534534
535535
536536 func swapOutput (_isAdd,_baseAssetAmount,_checkMaxPriceImpact) = swapOutputWithReserves(_isAdd, _baseAssetAmount, _checkMaxPriceImpact, qtAstR(), qtAstW(), bsAstR(), bsAstW())
537537
538538
539539 func getOracleTwapPrice () = {
540540 let oracle = valueOrErrorMessage(addressFromString(getStringValue(this, k_ora)), "")
541541 let priceKey = getStringValue(this, k_ora_key)
542542 let lastValue = valueOrErrorMessage(getInteger(oracle, priceKey), ((("Can not get oracle price. Oracle: " + toString(oracle)) + " key: ") + priceKey))
543543 let blockKey = valueOrElse(getString(this, k_ora_block_key), "")
544544 if ((blockKey != ""))
545545 then {
546546 let currentBlock = lastBlock.height
547547 let lastOracleBlock = valueOrErrorMessage(getInteger(oracle, blockKey), ((("Can not get oracle block. Oracle: " + toString(oracle)) + " key: ") + blockKey))
548548 if (((currentBlock - lastOracleBlock) > maxOracleDelay()))
549549 then throw(((("Oracle stale data. Last oracle block: " + toString(lastOracleBlock)) + " current block: ") + toString(currentBlock)))
550550 else lastValue
551551 }
552552 else lastValue
553553 }
554554
555555
556+func absPriceDiff (_oraclePrice,_quoteAssetReserve,_baseAssetReserve,_qtAstW,_bsAstW) = {
557+ let priceAfter = divd(muld(_quoteAssetReserve, _qtAstW), muld(_baseAssetReserve, _bsAstW))
558+ let averagePrice = divd((_oraclePrice + priceAfter), (2 * DECIMAL_UNIT))
559+ let absPriceDiff = divd(abs((_oraclePrice - priceAfter)), averagePrice)
560+ absPriceDiff
561+ }
562+
563+
556564 func requireNotOverSpreadLimit (_quoteAssetReserve,_baseAssetReserve) = {
557565 let oraclePrice = getOracleTwapPrice()
558566 let _qtAstW = qtAstW()
559567 let _bsAstW = bsAstW()
560- let priceAfter = divd(muld(_quoteAssetReserve, _qtAstW), muld(_baseAssetReserve, _bsAstW))
561- let averagePrice = divd((oraclePrice + priceAfter), (2 * DECIMAL_UNIT))
562- let absPriceDiff = divd(abs((oraclePrice - priceAfter)), averagePrice)
563- if ((absPriceDiff > maxPriceSpread()))
564- then throw(((("Price spread " + toString(absPriceDiff)) + " > max price spread ") + toString(maxPriceSpread())))
568+ let absPriceDiffBefore = absPriceDiff(oraclePrice, qtAstR(), bsAstR(), _qtAstW, _bsAstW)
569+ let absPriceDiffAfter = absPriceDiff(oraclePrice, _quoteAssetReserve, _baseAssetReserve, _qtAstW, _bsAstW)
570+ if (if ((absPriceDiffAfter > maxPriceSpread()))
571+ then (absPriceDiffAfter > absPriceDiffBefore)
572+ else false)
573+ then throw(((("Price spread " + toString(absPriceDiffAfter)) + " > max price spread ") + toString(maxPriceSpread())))
565574 else true
566575 }
567576
568577
569578 func requireNotOverMaxOpenNotional (_longOpenNotional,_shortOpenNotional) = {
570579 let _maxOpenNotional = maxOpenNotional()
571580 if ((_longOpenNotional > _maxOpenNotional))
572581 then throw(((("Long open notional " + toString(_longOpenNotional)) + " > max open notional ") + toString(_maxOpenNotional)))
573582 else if ((_shortOpenNotional > _maxOpenNotional))
574583 then throw(((("Short open notional " + toString(_shortOpenNotional)) + " > max open notional ") + toString(_maxOpenNotional)))
575584 else true
576585 }
577586
578587
579588 func getSpotPrice () = {
580589 let _quoteAssetReserve = qtAstR()
581590 let _baseAssetReserve = bsAstR()
582591 let _qtAstW = qtAstW()
583592 let _bsAstW = bsAstW()
584593 divd(muld(_quoteAssetReserve, _qtAstW), muld(_baseAssetReserve, _bsAstW))
585594 }
586595
587596
588597 func isOverFluctuationLimit () = {
589598 let oraclePrice = getOracleTwapPrice()
590599 let currentPrice = getSpotPrice()
591600 (divd(abs((oraclePrice - currentPrice)), oraclePrice) > spreadLimit())
592601 }
593602
594603
595604 func getPositionAdjustedOpenNotional (_positionSize,_option,_quoteAssetReserve,_quoteAssetWeight,_baseAssetReserve,_baseAssetWeight) = {
596605 let positionSizeAbs = abs(_positionSize)
597606 let isShort = (0 > _positionSize)
598607 let positionNotional = if ((_option == PNL_OPTION_SPOT))
599608 then {
600- let $t02423124451 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _quoteAssetWeight, _baseAssetReserve, _baseAssetWeight)
601- let outPositionNotional = $t02423124451._1
602- let x1 = $t02423124451._2
603- let x2 = $t02423124451._3
604- let x3 = $t02423124451._4
609+ let $t02463524855 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _quoteAssetWeight, _baseAssetReserve, _baseAssetWeight)
610+ let outPositionNotional = $t02463524855._1
611+ let x1 = $t02463524855._2
612+ let x2 = $t02463524855._3
613+ let x3 = $t02463524855._4
605614 outPositionNotional
606615 }
607616 else muld(positionSizeAbs, getOracleTwapPrice())
608617 positionNotional
609618 }
610619
611620
612621 func getPositionNotionalAndUnrealizedPnlByValues (_positionSize,_positionOpenNotional,_quoteAssetReserve,_quoteAssetWeight,_baseAssetReserve,_baseAssetWeight,_option) = if ((_positionSize == 0))
613622 then throw("Invalid position size")
614623 else {
615624 let isShort = (0 > _positionSize)
616625 let positionNotional = getPositionAdjustedOpenNotional(_positionSize, _option, _quoteAssetReserve, _quoteAssetWeight, _baseAssetReserve, _baseAssetWeight)
617626 let unrealizedPnl = if (isShort)
618627 then (_positionOpenNotional - positionNotional)
619628 else (positionNotional - _positionOpenNotional)
620629 $Tuple2(positionNotional, unrealizedPnl)
621630 }
622631
623632
624633 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
625- let $t02587626004 = getPosition(_trader)
626- let positionSize = $t02587626004._1
627- let positionMargin = $t02587626004._2
628- let positionOpenNotional = $t02587626004._3
629- let positionLstUpdCPF = $t02587626004._4
634+ let $t02628026408 = getPosition(_trader)
635+ let positionSize = $t02628026408._1
636+ let positionMargin = $t02628026408._2
637+ let positionOpenNotional = $t02628026408._3
638+ let positionLstUpdCPF = $t02628026408._4
630639 getPositionNotionalAndUnrealizedPnlByValues(positionSize, positionOpenNotional, qtAstR(), qtAstW(), bsAstR(), bsAstW(), _option)
631640 }
632641
633642
634643 func calcMarginRatio (_remainMargin,_badDebt,_positionNotional) = divd((_remainMargin - _badDebt), _positionNotional)
635644
636645
637646 func getMarginRatioByOption (_trader,_option) = {
638- let $t02651726628 = getPosition(_trader)
639- let positionSize = $t02651726628._1
640- let positionMargin = $t02651726628._2
641- let pon = $t02651726628._3
642- let positionLstUpdCPF = $t02651726628._4
643- let $t02663426727 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
644- let positionNotional = $t02663426727._1
645- let unrealizedPnl = $t02663426727._2
646- let $t02673226898 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
647- let remainMargin = $t02673226898._1
648- let badDebt = $t02673226898._2
647+ let $t02692127032 = getPosition(_trader)
648+ let positionSize = $t02692127032._1
649+ let positionMargin = $t02692127032._2
650+ let pon = $t02692127032._3
651+ let positionLstUpdCPF = $t02692127032._4
652+ let $t02703827131 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
653+ let positionNotional = $t02703827131._1
654+ let unrealizedPnl = $t02703827131._2
655+ let $t02713627302 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
656+ let remainMargin = $t02713627302._1
657+ let badDebt = $t02713627302._2
649658 calcMarginRatio(remainMargin, badDebt, positionNotional)
650659 }
651660
652661
653662 func getMarginRatio (_trader) = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
654663
655664
656665 func getPartialLiquidationAmount (_trader,_positionSize) = {
657666 let maximumRatio = vmax(partialLiquidationRatio(), (DECIMAL_UNIT - divd(getMarginRatio(_trader), maintenanceMarginRatio())))
658667 let maxExchangedPositionSize = muld(abs(_positionSize), maximumRatio)
659668 let swapResult = swapOutput((_positionSize > 0), maxExchangedPositionSize, false)
660669 let maxExchangedQuoteAssetAmount = swapResult._1
661670 let priceImpact = swapResult._7
662671 if ((maxPriceImpact() > priceImpact))
663672 then maxExchangedQuoteAssetAmount
664673 else {
665674 let exchangedPositionSize = muld(abs(_positionSize), partialLiquidationRatio())
666675 let exchangedQuoteAssetAmount = swapOutput((_positionSize > 0), exchangedPositionSize, false)._1
667676 exchangedQuoteAssetAmount
668677 }
669678 }
670679
671680
672681 func internalClosePosition (_trader,_checkMaxPriceImpact) = {
673- let $t02813828266 = getPosition(_trader)
674- let positionSize = $t02813828266._1
675- let positionMargin = $t02813828266._2
676- let positionOpenNotional = $t02813828266._3
677- let positionLstUpdCPF = $t02813828266._4
682+ let $t02854228670 = getPosition(_trader)
683+ let positionSize = $t02854228670._1
684+ let positionMargin = $t02854228670._2
685+ let positionOpenNotional = $t02854228670._3
686+ let positionLstUpdCPF = $t02854228670._4
678687 let unrealizedPnl = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)._2
679- let $t02836128529 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
680- let remainMargin = $t02836128529._1
681- let badDebt = $t02836128529._2
688+ let $t02876528933 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
689+ let remainMargin = $t02876528933._1
690+ let badDebt = $t02876528933._2
682691 let exchangedPositionSize = -(positionSize)
683692 let realizedPnl = unrealizedPnl
684693 let marginToVault = -(remainMargin)
685- let $t02865628930 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
686- let exchangedQuoteAssetAmount = $t02865628930._1
687- let quoteAssetReserveAfter = $t02865628930._2
688- let baseAssetReserveAfter = $t02865628930._3
689- let totalPositionSizeAfter = $t02865628930._4
690- let totalLongAfter = $t02865628930._5
691- let totalShortAfter = $t02865628930._6
694+ let $t02906029334 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
695+ let exchangedQuoteAssetAmount = $t02906029334._1
696+ let quoteAssetReserveAfter = $t02906029334._2
697+ let baseAssetReserveAfter = $t02906029334._3
698+ let totalPositionSizeAfter = $t02906029334._4
699+ let totalLongAfter = $t02906029334._5
700+ let totalShortAfter = $t02906029334._6
692701 let openInterestNotionalAfter = (openInterestNotional() - positionOpenNotional)
693702 $Tuple13(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter, (openInterestLong() - (if ((positionSize > 0))
694703 then positionOpenNotional
695704 else 0)), (openInterestShort() - (if ((0 > positionSize))
696705 then positionOpenNotional
697706 else 0)))
698707 }
699708
700709
701710 func getTwapSpotPrice () = {
702711 let minuteId = ((lastBlock.timestamp / 1000) / 60)
703712 let startMinuteId = (minuteId - TWAP_INTERVAL)
704713 let listStr = valueOrElse(getString(this, k_lastDataStr), "")
705714 let list = split(listStr, ",")
706715 func filterFn (accumulator,next) = if ((startMinuteId >= parseIntValue(next)))
707716 then (accumulator :+ parseIntValue(next))
708717 else accumulator
709718
710719 let listF = {
711720 let $l = list
712721 let $s = size($l)
713722 let $acc0 = nil
714723 func $f0_1 ($a,$i) = if (($i >= $s))
715724 then $a
716725 else filterFn($a, $l[$i])
717726
718727 func $f0_2 ($a,$i) = if (($i >= $s))
719728 then $a
720729 else throw("List size exceeds 20")
721730
722731 $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)
723732 }
724733 let maxIndex = if ((size(listF) > 0))
725734 then max(listF)
726735 else parseIntValue(list[0])
727736 let lastMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
728737 let endLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(lastMinuteId))), 0)
729738 let endLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(lastMinuteId))), 0)
730739 let nowCumulativePrice = (endLastCumulativePrice + ((minuteId - lastMinuteId) * endLastPrice))
731740 let startLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(maxIndex))), 0)
732741 let startLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(maxIndex))), 0)
733742 let startCumulativePrice = (startLastCumulativePrice + ((startMinuteId - maxIndex) * startLastPrice))
734743 ((nowCumulativePrice - startCumulativePrice) / TWAP_INTERVAL)
735744 }
736745
737746
738747 func getTerminalAmmState () = {
739748 let _positionSize = totalPositionSize()
740749 if ((_positionSize == 0))
741750 then $Tuple2(qtAstR(), bsAstR())
742751 else {
743752 let direction = (_positionSize > 0)
744- let $t03105331232 = swapOutput(direction, abs(_positionSize), false)
745- let currentNetMarketValue = $t03105331232._1
746- let terminalQuoteAssetReserve = $t03105331232._2
747- let terminalBaseAssetReserve = $t03105331232._3
753+ let $t03145731636 = swapOutput(direction, abs(_positionSize), false)
754+ let currentNetMarketValue = $t03145731636._1
755+ let terminalQuoteAssetReserve = $t03145731636._2
756+ let terminalBaseAssetReserve = $t03145731636._3
748757 $Tuple2(terminalQuoteAssetReserve, terminalBaseAssetReserve)
749758 }
750759 }
751760
752761
753762 func getQuoteAssetWeight (baseAssetReserve,totalPositionSize,quoteAssetReserve,targetPrice) = {
754763 let b = toBigInt(baseAssetReserve)
755764 let sz = toBigInt(totalPositionSize)
756765 let q = toBigInt(quoteAssetReserve)
757766 let p = toBigInt(targetPrice)
758767 let bs2 = bpowd((b + sz), toBigInt((2 * DECIMAL_UNIT)))
759768 let qbs2 = bmuld(q, bs2)
760769 let ps4 = (toBigInt(4) * bmuld(p, sz))
761770 let sqr = bsqrtd(bmuld(qbs2, (q - ps4)))
762771 let bq = bmuld(b, q)
763772 let qs = bmuld(q, sz)
764773 let top = ((-(sqr) + bq) + qs)
765774 let bot = (toBigInt(2) * bmuld(q, sz))
766775 let result = bdivd(top, bot)
767776 toInt(result)
768777 }
769778
770779
771-func getSyncTerminalPrice (_terminalPrice) = {
780+func getSyncTerminalPrice (_terminalPrice,_qtAstR,_bsAstR) = {
772781 let _positionSize = totalPositionSize()
773782 if ((_positionSize == 0))
774783 then {
775- let _qtAstR = qtAstR()
776- let _bsAstR = bsAstR()
777784 let newQtAstW = divd(muld(_terminalPrice, _bsAstR), _qtAstR)
778785 $Tuple3(newQtAstW, DECIMAL_UNIT, 0)
779786 }
780787 else {
781788 let direction = (_positionSize > 0)
782789 let currentNetMarketValue = swapOutput(direction, abs(_positionSize), false)._1
783- let _qtAstR = qtAstR()
784- let _bsAstR = bsAstR()
785790 let newQtAstW = getQuoteAssetWeight(_bsAstR, _positionSize, _qtAstR, _terminalPrice)
786791 let newBsAstW = DECIMAL_UNIT
787792 let marginToVault = getPositionNotionalAndUnrealizedPnlByValues(_positionSize, currentNetMarketValue, _qtAstR, newQtAstW, _bsAstR, newBsAstW, PNL_OPTION_SPOT)._2
788793 $Tuple3(newQtAstW, newBsAstW, marginToVault)
789794 }
790795 }
791796
792797
793798 func getFunding () = {
794799 let underlyingPrice = getOracleTwapPrice()
795800 let spotTwapPrice = getTwapSpotPrice()
796801 let premium = (spotTwapPrice - underlyingPrice)
797802 if (if ((totalShortPositionSize() == 0))
798803 then true
799804 else (totalLongPositionSize() == 0))
800805 then $Tuple2(0, 0)
801806 else if ((0 > premium))
802807 then {
803808 let shortPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
804809 let longPremiumFraction = divd(muld(shortPremiumFraction, totalShortPositionSize()), totalLongPositionSize())
805810 $Tuple2(shortPremiumFraction, longPremiumFraction)
806811 }
807812 else {
808813 let longPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
809814 let shortPremiumFraction = divd(muld(longPremiumFraction, totalLongPositionSize()), totalShortPositionSize())
810815 $Tuple2(shortPremiumFraction, longPremiumFraction)
811816 }
812817 }
813818
814819
815820 func getAdjustedFee (_artifactId,_baseFeeDiscount) = {
816821 let baseFeeRaw = fee()
817822 let baseFee = muld(baseFeeRaw, _baseFeeDiscount)
818- let $t03433134826 = if ((_artifactId != ""))
823+ let $t03465535150 = if ((_artifactId != ""))
819824 then {
820825 let artifactKind = strA(nftManagerAddress(), toCompositeKey(k_token_type, _artifactId))
821826 if ((artifactKind == FEE_REDUCTION_TOKEN_TYPE))
822827 then {
823828 let reduction = intA(nftManagerAddress(), toCompositeKey(k_token_param, _artifactId))
824829 let adjustedFee = muld(baseFee, reduction)
825830 $Tuple2(adjustedFee, true)
826831 }
827832 else throw("Invalid attached artifact")
828833 }
829834 else $Tuple2(baseFee, false)
830- let adjustedFee = $t03433134826._1
831- let burnArtifact = $t03433134826._2
835+ let adjustedFee = $t03465535150._1
836+ let burnArtifact = $t03465535150._2
832837 $Tuple2(adjustedFee, burnArtifact)
833838 }
834839
835840
836841 func isSameAssetOrNoPosition (_trader,_assetId) = {
837842 let oldPositionSize = getPosition(_trader)._1
838843 if ((oldPositionSize == 0))
839844 then true
840845 else (getPositionAsset(_trader) == _assetId)
841846 }
842847
843848
844849 func isSameAsset (_trader,_assetId) = (getPositionAsset(_trader) == _assetId)
845850
846851
847852 func getBorrowedByTraderInMarketKey (_amm,_assetId,_trader) = ((((((k_trader_market_asset_collateral + "_") + _amm) + "_") + _assetId) + "_") + _trader)
848853
849854
850855 func getBorrowedByTrader (_trader) = {
851856 let positionAsset = getPositionAsset(_trader)
852857 if ((positionAsset == toBase58String(quoteAsset())))
853858 then $Tuple2(0, positionAsset)
854859 else {
855860 let key = getBorrowedByTraderInMarketKey(toString(this), positionAsset, _trader)
856861 let borrow = valueOrElse(getInteger(collateralAddress(), key), 0)
857862 $Tuple2(borrow, positionAsset)
858863 }
859864 }
860865
861866
862867 func getForTraderWithArtifact (_trader,_artifactId) = {
863868 let doGetFeeDiscount = invoke(minerAddress(), "computeFeeDiscount", [_trader], nil)
864869 if ((doGetFeeDiscount == doGetFeeDiscount))
865870 then {
866871 let feeDiscount = match doGetFeeDiscount {
867872 case x: Int =>
868873 x
869874 case _ =>
870875 throw("Invalid computeFeeDiscount result")
871876 }
872- let $t03605736131 = getAdjustedFee(_artifactId, feeDiscount)
873- let adjustedFee = $t03605736131._1
874- let burnArtifact = $t03605736131._2
877+ let $t03638136455 = getAdjustedFee(_artifactId, feeDiscount)
878+ let adjustedFee = $t03638136455._1
879+ let burnArtifact = $t03638136455._2
875880 $Tuple2(adjustedFee, burnArtifact)
876881 }
877882 else throw("Strict value is not equal to itself.")
878883 }
879884
880885
881886 func getArtifactId (i) = {
882887 let artifactId = if ((size(i.payments) > 1))
883888 then toBase58String(valueOrErrorMessage(i.payments[1].assetId, "Invalid artifactId"))
884889 else ""
885890 artifactId
886891 }
887892
888893
889894 func distributeFee (_feeAmount) = {
890895 let feeToStakers = muld(_feeAmount, feeToStakersPercent())
891896 let feeToVault = (_feeAmount - feeToStakers)
892897 $Tuple2(feeToStakers, feeToVault)
893898 }
894899
895900
896901 func updateSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact,_partialLiquidationRatio,_maxPriceSpread,_maxOpenNotional,_feeToStakersPercent,_maxOracleDelay) = [IntegerEntry(k_initMarginRatio, _initMarginRatio), IntegerEntry(k_maintenanceMarginRatio, _mmr), IntegerEntry(k_liquidationFeeRatio, _liquidationFeeRatio), IntegerEntry(k_fundingPeriod, _fundingPeriod), IntegerEntry(k_fee, _fee), IntegerEntry(k_spreadLimit, _spreadLimit), IntegerEntry(k_maxPriceImpact, _maxPriceImpact), IntegerEntry(k_partialLiquidationRatio, _partialLiquidationRatio), IntegerEntry(k_maxPriceSpread, _maxPriceSpread), IntegerEntry(k_maxOpenNotional, _maxOpenNotional), IntegerEntry(k_feeToStakersPercent, _feeToStakersPercent), IntegerEntry(k_maxOracleDelay, _feeToStakersPercent)]
897902
898903
899904 func updateFunding (_nextFundingBlock,_latestLongCumulativePremiumFraction,_latestShortCumulativePremiumFraction,_longFundingRate,_shortFundingRate) = [IntegerEntry(k_nextFundingBlock, _nextFundingBlock), IntegerEntry(k_latestLongCumulativePremiumFraction, _latestLongCumulativePremiumFraction), IntegerEntry(k_latestShortCumulativePremiumFraction, _latestShortCumulativePremiumFraction), IntegerEntry(k_longFundingRate, _longFundingRate), IntegerEntry(k_shortFundingRate, _shortFundingRate)]
900905
901906
902907 func updatePositionAsset (_address,_assetId) = [StringEntry(toCompositeKey(k_positionAsset, _address), _assetId)]
903908
904909
905910 func incrementPositionSequenceNumber (isNewPosition,_address) = if (isNewPosition)
906911 then {
907912 let currentSequence = lastSequence()
908913 [IntegerEntry(toCompositeKey(k_positionSequence, _address), (currentSequence + 1)), IntegerEntry(k_sequence, (currentSequence + 1))]
909914 }
910915 else nil
911916
912917
913918 func updatePosition (_address,_size,_margin,_openNotional,_latestCumulativePremiumFraction) = [IntegerEntry(toCompositeKey(k_positionSize, _address), _size), IntegerEntry(toCompositeKey(k_positionMargin, _address), _margin), IntegerEntry(toCompositeKey(k_positionOpenNotional, _address), _openNotional), IntegerEntry(toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _address), _latestCumulativePremiumFraction)]
914919
915920
916921 func appendTwap (_price) = {
917922 let minuteId = ((lastBlock.timestamp / 1000) / 60)
918923 let previousMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
919924 if ((previousMinuteId > minuteId))
920925 then throw("TWAP out-of-order")
921926 else {
922927 let lastMinuteId = if ((previousMinuteId == 0))
923928 then minuteId
924929 else previousMinuteId
925930 if ((minuteId > previousMinuteId))
926931 then {
927932 let prevCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(previousMinuteId))), 0)
928933 let prevPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(previousMinuteId))), _price)
929934 let lastCumulativePrice = (prevCumulativePrice + ((minuteId - lastMinuteId) * prevPrice))
930935 let list = pushToQueue(strToList(valueOrElse(getString(this, k_lastDataStr), "")), TWAP_INTERVAL, toString(minuteId))
931936 [IntegerEntry(toCompositeKey(k_twapDataLastCumulativePrice, toString(minuteId)), lastCumulativePrice), IntegerEntry(toCompositeKey(k_twapDataLastPrice, toString(minuteId)), _price), IntegerEntry(toCompositeKey(k_twapDataPreviousMinuteId, toString(minuteId)), previousMinuteId), IntegerEntry(k_lastMinuteId, minuteId), StringEntry(k_lastDataStr, listToStr(list))]
932937 }
933938 else {
934939 let twapDataPreviousMinuteId = valueOrElse(getInteger(this, toCompositeKey(k_twapDataPreviousMinuteId, toString(minuteId))), 0)
935940 let prevCumulativePrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastCumulativePrice, toString(twapDataPreviousMinuteId))), 0)
936941 let prevPrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastPrice, toString(twapDataPreviousMinuteId))), _price)
937942 let lastCumulativePrice = (prevCumulativePrice + ((minuteId - twapDataPreviousMinuteId) * prevPrice))
938943 [IntegerEntry(toCompositeKey(k_twapDataLastCumulativePrice, toString(minuteId)), lastCumulativePrice), IntegerEntry(toCompositeKey(k_twapDataLastPrice, toString(minuteId)), _price)]
939944 }
940945 }
941946 }
942947
943948
944949 func updateAmmReserves (_qtAstR,_bsAstR) = [IntegerEntry(k_quoteAssetReserve, _qtAstR), IntegerEntry(k_baseAssetReserve, _bsAstR)]
945950
946951
947952 func updateAmmWeights (_qtAstW,_bsAstW) = [IntegerEntry(k_quoteAssetWeight, _qtAstW), IntegerEntry(k_baseAssetWeight, _bsAstW)]
948953
949954
950955 func updateAmm (_qtAstR,_bsAstR,_totalPositionSizeAfter,_openInterestNotional,_totalLongPositionSize,_totalShortPositionSize,_totalLongOpenNotional,_totalShortOpenNotional) = {
951956 let _qtAstW = qtAstW()
952957 let _bsAstW = bsAstW()
953958 if (((_totalLongPositionSize - _totalShortPositionSize) != _totalPositionSizeAfter))
954959 then throw(((((("Invalid AMM state data: " + toString(_totalLongPositionSize)) + " + ") + toString(_totalShortPositionSize)) + " != ") + toString(_totalPositionSizeAfter)))
955960 else ((updateAmmReserves(_qtAstR, _bsAstR) ++ [IntegerEntry(k_totalPositionSize, _totalPositionSizeAfter), IntegerEntry(k_openInterestNotional, _openInterestNotional), IntegerEntry(k_totalLongPositionSize, _totalLongPositionSize), IntegerEntry(k_totalShortPositionSize, _totalShortPositionSize), IntegerEntry(k_openInterestLong, _totalLongOpenNotional), IntegerEntry(k_openInterestShort, _totalShortOpenNotional)]) ++ appendTwap(divd(muld(_qtAstR, _qtAstW), muld(_bsAstR, _bsAstW))))
956961 }
957962
958963
959964 func deletePosition (_address) = [DeleteEntry(toCompositeKey(k_positionSize, _address)), DeleteEntry(toCompositeKey(k_positionMargin, _address)), DeleteEntry(toCompositeKey(k_positionOpenNotional, _address)), DeleteEntry(toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _address)), DeleteEntry(toCompositeKey(k_positionAsset, _address))]
960965
961966
962967 func withdraw (_address,_amount) = {
963968 let balance = assetBalance(this, quoteAsset())
964969 if ((_amount > balance))
965970 then throw(((("Unable to withdraw " + toString(_amount)) + " from contract balance ") + toString(balance)))
966971 else [ScriptTransfer(_address, _amount, quoteAsset())]
967972 }
968973
969974
970975 func updateBalance (i) = if ((0 > i))
971976 then throw("Balance")
972977 else [IntegerEntry(k_balance, i)]
973978
974979
975980 func transferFee (i) = [ScriptTransfer(stakingAddress(), i, quoteAsset())]
976981
977982
978983 func doBurnArtifact (_burnArtifact,i) = if (_burnArtifact)
979984 then [Burn(valueOrErrorMessage(i.payments[1].assetId, "Invalid artifact"), 1)]
980985 else nil
981986
982987
983988 @Callable(i)
984989 func pause () = if ((i.caller != adminAddress()))
985990 then throw("Invalid pause params")
986991 else [BooleanEntry(k_paused, true)]
987992
988993
989994
990995 @Callable(i)
991996 func unpause () = if ((i.caller != adminAddress()))
992997 then throw("Invalid unpause params")
993998 else [BooleanEntry(k_paused, false)]
994999
9951000
9961001
9971002 @Callable(i)
9981003 func setCloseOnly () = if ((i.caller != adminAddress()))
9991004 then throw("Invalid setCloseOnly params")
10001005 else [BooleanEntry(k_closeOnly, true)]
10011006
10021007
10031008
10041009 @Callable(i)
10051010 func unsetCloseOnly () = if ((i.caller != adminAddress()))
10061011 then throw("Invalid unsetCloseOnly params")
10071012 else [BooleanEntry(k_closeOnly, false)]
10081013
10091014
10101015
10111016 @Callable(i)
10121017 func addLiquidity (_quoteAssetAmount) = if (if ((i.caller != adminAddress()))
10131018 then true
10141019 else (0 >= _quoteAssetAmount))
10151020 then throw("Invalid addLiquidity params")
10161021 else {
10171022 let _qtAstR = qtAstR()
10181023 let _bsAstR = bsAstR()
10191024 let _qtAstW = qtAstW()
10201025 let _bsAstW = bsAstW()
10211026 let price = divd(muld(_qtAstR, _qtAstW), muld(_bsAstR, _bsAstW))
1022- let baseAssetAmountToAdd = divd(_quoteAssetAmount, price)
10231027 let qtAstRAfter = (_qtAstR + _quoteAssetAmount)
1028+ let baseAssetAmountToAdd = (divd(muld(qtAstRAfter, _qtAstW), price) - _bsAstR)
10241029 let bsAstRAfter = (_bsAstR + baseAssetAmountToAdd)
1025- updateAmmReserves(qtAstRAfter, bsAstRAfter)
1030+ let $t04547745632 = getSyncTerminalPrice(getOracleTwapPrice(), qtAstRAfter, bsAstRAfter)
1031+ let newQuoteAssetWeight = $t04547745632._1
1032+ let newBaseAssetWeight = $t04547745632._2
1033+ let marginToVault = $t04547745632._3
1034+ let doExchangePnL = if ((marginToVault != 0))
1035+ then {
1036+ let doExchangePnL = invoke(vaultAddress(), "exchangeFreeAndLocked", [marginToVault], nil)
1037+ if ((doExchangePnL == doExchangePnL))
1038+ then nil
1039+ else throw("Strict value is not equal to itself.")
1040+ }
1041+ else nil
1042+ if ((doExchangePnL == doExchangePnL))
1043+ then (updateAmmReserves(qtAstRAfter, bsAstRAfter) ++ updateAmmWeights(newQuoteAssetWeight, newBaseAssetWeight))
1044+ else throw("Strict value is not equal to itself.")
10261045 }
10271046
10281047
10291048
10301049 @Callable(i)
10311050 func removeLiquidity (_quoteAssetAmount) = if (if ((i.caller != adminAddress()))
10321051 then true
10331052 else (0 >= _quoteAssetAmount))
10341053 then throw("Invalid removeLiquidity params")
10351054 else {
10361055 let _qtAstR = qtAstR()
10371056 let _bsAstR = bsAstR()
10381057 let _qtAstW = qtAstW()
10391058 let _bsAstW = bsAstW()
10401059 let price = divd(muld(_qtAstR, _qtAstW), muld(_bsAstR, _bsAstW))
10411060 let baseAssetAmountToRemove = divd(_quoteAssetAmount, price)
10421061 let qtAstRAfter = (_qtAstR - _quoteAssetAmount)
10431062 let bsAstRAfter = (_bsAstR - baseAssetAmountToRemove)
10441063 updateAmmReserves(qtAstRAfter, bsAstRAfter)
10451064 }
10461065
10471066
10481067
10491068 @Callable(i)
10501069 func changeSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact,_partialLiquidationRatio,_maxPriceSpread,_maxOpenNotional,_feeToStakersPercent,_maxOracleDelay) = if ((i.caller != adminAddress()))
10511070 then throw("Invalid changeSettings params")
10521071 else updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact, _partialLiquidationRatio, _maxPriceSpread, _maxOpenNotional, _feeToStakersPercent, _maxOracleDelay)
10531072
10541073
10551074
10561075 @Callable(i)
10571076 func initialize (_qtAstR,_bsAstR,_fundingPeriod,_initMarginRatio,_mmr,_liquidationFeeRatio,_fee,_oracle,_oracleKey,_oracleBlockKey,_coordinator,_spreadLimit,_maxPriceImpact,_partialLiquidationRatio,_maxPriceSpread,_maxOpenNotional,_feeToStakersPercent,_maxOracleDelay) = if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((0 >= _qtAstR))
10581077 then true
10591078 else (0 >= _bsAstR))
10601079 then true
10611080 else (0 >= _fundingPeriod))
10621081 then true
10631082 else (0 >= _initMarginRatio))
10641083 then true
10651084 else (0 >= _mmr))
10661085 then true
10671086 else (0 >= _liquidationFeeRatio))
10681087 then true
10691088 else (0 >= _fee))
10701089 then true
10711090 else (0 >= _spreadLimit))
10721091 then true
10731092 else (0 >= _maxPriceImpact))
10741093 then true
10751094 else (0 >= _partialLiquidationRatio))
10761095 then true
10771096 else (0 >= _maxPriceSpread))
10781097 then true
10791098 else (0 >= _maxOpenNotional))
10801099 then true
10811100 else (0 >= _feeToStakersPercent))
10821101 then true
10831102 else (_feeToStakersPercent > DECIMAL_UNIT))
10841103 then true
10851104 else (0 >= _maxOracleDelay))
10861105 then true
10871106 else initialized())
10881107 then throw("Invalid initialize parameters")
10891108 else ((((updateAmm(_qtAstR, _bsAstR, 0, 0, 0, 0, 0, 0) ++ updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact, _partialLiquidationRatio, _maxPriceSpread, _maxOpenNotional, _feeToStakersPercent, _maxOracleDelay)) ++ updateFunding((lastBlock.timestamp + _fundingPeriod), 0, 0, 0, 0)) ++ updateBalance(0)) ++ [BooleanEntry(k_initialized, true), StringEntry(k_ora, _oracle), StringEntry(k_ora_key, _oracleKey), StringEntry(k_ora_block_key, _oracleBlockKey), StringEntry(k_coordinatorAddress, _coordinator)])
10901109
10911110
10921111
10931112 @Callable(i)
10941113 func decreasePosition (_amount,_leverage,_minBaseAssetAmount) = {
10951114 let sync = invoke(this, "syncTerminalPriceToOracle", nil, nil)
10961115 if ((sync == sync))
10971116 then {
10981117 let _trader = getActualCaller(i)
10991118 if (if (if (if (if ((0 >= _amount))
11001119 then true
11011120 else !(initialized()))
11021121 then true
11031122 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
11041123 then true
11051124 else !(requireOpenPosition(_trader)))
11061125 then true
11071126 else paused())
11081127 then throw("Invalid decreasePosition parameters")
11091128 else {
1110- let $t04867048810 = getPosition(_trader)
1111- let oldPositionSize = $t04867048810._1
1112- let oldPositionMargin = $t04867048810._2
1113- let oldPositionOpenNotional = $t04867048810._3
1114- let oldPositionLstUpdCPF = $t04867048810._4
1129+ let $t04947549615 = getPosition(_trader)
1130+ let oldPositionSize = $t04947549615._1
1131+ let oldPositionMargin = $t04947549615._2
1132+ let oldPositionOpenNotional = $t04947549615._3
1133+ let oldPositionLstUpdCPF = $t04947549615._4
11151134 let _direction = if ((oldPositionSize > 0))
11161135 then DIR_SHORT
11171136 else DIR_LONG
11181137 let isAdd = (_direction == DIR_LONG)
11191138 let openNotional = muld(_amount, _leverage)
1120- let $t04898349087 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1121- let oldPositionNotional = $t04898349087._1
1122- let unrealizedPnl = $t04898349087._2
1123- let $t04909351751 = if ((oldPositionNotional > openNotional))
1139+ let $t04978849892 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1140+ let oldPositionNotional = $t04978849892._1
1141+ let unrealizedPnl = $t04978849892._2
1142+ let $t04989852556 = if ((oldPositionNotional > openNotional))
11241143 then {
1125- let $t04950849692 = swapInput(isAdd, openNotional)
1126- let exchangedPositionSize = $t04950849692._1
1127- let quoteAssetReserveAfter = $t04950849692._2
1128- let baseAssetReserveAfter = $t04950849692._3
1129- let totalPositionSizeAfter = $t04950849692._4
1144+ let $t05031350497 = swapInput(isAdd, openNotional)
1145+ let exchangedPositionSize = $t05031350497._1
1146+ let quoteAssetReserveAfter = $t05031350497._2
1147+ let baseAssetReserveAfter = $t05031350497._3
1148+ let totalPositionSizeAfter = $t05031350497._4
11301149 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
11311150 if (if ((_minBaseAssetAmount != 0))
11321151 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
11331152 else false)
11341153 then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
11351154 else {
11361155 let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), abs(oldPositionSize))
1137- let $t05012950374 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1138- let remainMargin = $t05012950374._1
1139- let badDebt = $t05012950374._2
1140- let fundingPayment = $t05012950374._3
1156+ let $t05093451179 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1157+ let remainMargin = $t05093451179._1
1158+ let badDebt = $t05093451179._2
1159+ let fundingPayment = $t05093451179._3
11411160 let exchangedQuoteAssetAmount = openNotional
11421161 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
11431162 let remainOpenNotional = if ((oldPositionSize > 0))
11441163 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
11451164 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
11461165 let newPositionSize = (oldPositionSize + exchangedPositionSize)
11471166 $Tuple12(newPositionSize, remainMargin, abs(remainOpenNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, (openInterestNotional() - openNotional), (totalLongPositionSize() - (if ((newPositionSize > 0))
11481167 then abs(exchangedPositionSize)
11491168 else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
11501169 then abs(exchangedPositionSize)
11511170 else 0)), (openInterestLong() - (if ((newPositionSize > 0))
11521171 then openNotional
11531172 else 0)), (openInterestShort() - (if ((0 > newPositionSize))
11541173 then openNotional
11551174 else 0)))
11561175 }
11571176 }
11581177 else throw("Close position first")
1159- let newPositionSize = $t04909351751._1
1160- let newPositionRemainMargin = $t04909351751._2
1161- let newPositionOpenNotional = $t04909351751._3
1162- let newPositionLatestCPF = $t04909351751._4
1163- let baseAssetReserveAfter = $t04909351751._5
1164- let quoteAssetReserveAfter = $t04909351751._6
1165- let totalPositionSizeAfter = $t04909351751._7
1166- let openInterestNotionalAfter = $t04909351751._8
1167- let totalLongAfter = $t04909351751._9
1168- let totalShortAfter = $t04909351751._10
1169- let totalLongOpenInterestAfter = $t04909351751._11
1170- let totalShortOpenInterestAfter = $t04909351751._12
1178+ let newPositionSize = $t04989852556._1
1179+ let newPositionRemainMargin = $t04989852556._2
1180+ let newPositionOpenNotional = $t04989852556._3
1181+ let newPositionLatestCPF = $t04989852556._4
1182+ let baseAssetReserveAfter = $t04989852556._5
1183+ let quoteAssetReserveAfter = $t04989852556._6
1184+ let totalPositionSizeAfter = $t04989852556._7
1185+ let openInterestNotionalAfter = $t04989852556._8
1186+ let totalLongAfter = $t04989852556._9
1187+ let totalShortAfter = $t04989852556._10
1188+ let totalLongOpenInterestAfter = $t04989852556._11
1189+ let totalShortOpenInterestAfter = $t04989852556._12
11711190 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, newPositionOpenNotional], nil)
11721191 if ((notifyNotional == notifyNotional))
11731192 then (updatePosition(_trader, newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter, totalLongOpenInterestAfter, totalShortOpenInterestAfter))
11741193 else throw("Strict value is not equal to itself.")
11751194 }
11761195 }
11771196 else throw("Strict value is not equal to itself.")
11781197 }
11791198
11801199
11811200
11821201 @Callable(i)
11831202 func increasePosition (_direction,_leverage,_minBaseAssetAmount,_refLink) = {
11841203 let sync = invoke(this, "syncTerminalPriceToOracle", nil, nil)
11851204 if ((sync == sync))
11861205 then {
11871206 let _trader = getActualCaller(i)
11881207 let _rawAmount = i.payments[0].amount
11891208 let _assetId = i.payments[0].assetId
11901209 let _assetIdStr = toBase58String(value(_assetId))
11911210 let isQuoteAsset = (_assetId == quoteAsset())
11921211 let isCollateralAsset = isWhitelistAsset(_assetIdStr)
11931212 if (if (if (if (if (if (if (if (if ((_direction != DIR_LONG))
11941213 then (_direction != DIR_SHORT)
11951214 else false)
11961215 then true
11971216 else (0 >= _rawAmount))
11981217 then true
11991218 else !(initialized()))
12001219 then true
12011220 else if (!(isQuoteAsset))
12021221 then !(isCollateralAsset)
12031222 else false)
12041223 then true
12051224 else !(isSameAssetOrNoPosition(_trader, _assetIdStr)))
12061225 then true
12071226 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
12081227 then true
12091228 else paused())
12101229 then true
12111230 else closeOnly())
12121231 then throw("Invalid increasePosition parameters")
12131232 else {
1214- let $t05318953274 = getForTraderWithArtifact(_trader, getArtifactId(i))
1215- let adjustedFee = $t05318953274._1
1216- let burnArtifact = $t05318953274._2
1233+ let $t05399454079 = getForTraderWithArtifact(_trader, getArtifactId(i))
1234+ let adjustedFee = $t05399454079._1
1235+ let burnArtifact = $t05399454079._2
12171236 let rawFeeAmount = muld(_rawAmount, adjustedFee)
12181237 let _amount = (_rawAmount - rawFeeAmount)
12191238 let distributeFeeAmount = if (isCollateralAsset)
12201239 then {
12211240 let doBorrow = invoke(collateralAddress(), "borrow", [_trader], [AttachedPayment(_assetId, _amount)])
12221241 if ((doBorrow == doBorrow))
12231242 then {
12241243 let balanceBefore = assetBalance(this, quoteAsset())
12251244 if ((balanceBefore == balanceBefore))
12261245 then {
12271246 let doSwap = invoke(swapAddress(), "swap", [toBase58String(quoteAsset()), 0], [AttachedPayment(_assetId, rawFeeAmount)])
12281247 if ((doSwap == doSwap))
12291248 then {
12301249 let balanceAfter = assetBalance(this, quoteAsset())
12311250 if ((balanceAfter == balanceAfter))
12321251 then {
12331252 let exchangedAmount = (balanceAfter - balanceBefore)
12341253 if ((exchangedAmount == exchangedAmount))
12351254 then exchangedAmount
12361255 else throw("Strict value is not equal to itself.")
12371256 }
12381257 else throw("Strict value is not equal to itself.")
12391258 }
12401259 else throw("Strict value is not equal to itself.")
12411260 }
12421261 else throw("Strict value is not equal to itself.")
12431262 }
12441263 else throw("Strict value is not equal to itself.")
12451264 }
12461265 else rawFeeAmount
12471266 if ((distributeFeeAmount == distributeFeeAmount))
12481267 then {
12491268 let referrerFeeAny = invoke(referralAddress(), "acceptPaymentWithLink", [_trader, _refLink], [AttachedPayment(quoteAsset(), distributeFeeAmount)])
12501269 if ((referrerFeeAny == referrerFeeAny))
12511270 then {
12521271 let referrerFee = match referrerFeeAny {
12531272 case x: Int =>
12541273 x
12551274 case _ =>
12561275 throw("Invalid referrerFee")
12571276 }
12581277 let feeAmount = (distributeFeeAmount - referrerFee)
1259- let $t05459054730 = getPosition(_trader)
1260- let oldPositionSize = $t05459054730._1
1261- let oldPositionMargin = $t05459054730._2
1262- let oldPositionOpenNotional = $t05459054730._3
1263- let oldPositionLstUpdCPF = $t05459054730._4
1278+ let $t05539555535 = getPosition(_trader)
1279+ let oldPositionSize = $t05539555535._1
1280+ let oldPositionMargin = $t05539555535._2
1281+ let oldPositionOpenNotional = $t05539555535._3
1282+ let oldPositionLstUpdCPF = $t05539555535._4
12641283 let isNewPosition = (oldPositionSize == 0)
12651284 let isSameDirection = if ((oldPositionSize > 0))
12661285 then (_direction == DIR_LONG)
12671286 else (_direction == DIR_SHORT)
12681287 let expandExisting = if (!(isNewPosition))
12691288 then isSameDirection
12701289 else false
12711290 let isAdd = (_direction == DIR_LONG)
1272- let $t05501958060 = if (if (isNewPosition)
1291+ let $t05582458865 = if (if (isNewPosition)
12731292 then true
12741293 else expandExisting)
12751294 then {
12761295 let openNotional = muld(_amount, _leverage)
1277- let $t05548155654 = swapInput(isAdd, openNotional)
1278- let amountBaseAssetBought = $t05548155654._1
1279- let quoteAssetReserveAfter = $t05548155654._2
1280- let baseAssetReserveAfter = $t05548155654._3
1281- let totalPositionSizeAfter = $t05548155654._4
1296+ let $t05628656459 = swapInput(isAdd, openNotional)
1297+ let amountBaseAssetBought = $t05628656459._1
1298+ let quoteAssetReserveAfter = $t05628656459._2
1299+ let baseAssetReserveAfter = $t05628656459._3
1300+ let totalPositionSizeAfter = $t05628656459._4
12821301 if (if ((_minBaseAssetAmount != 0))
12831302 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
12841303 else false)
12851304 then throw(((("Limit error: " + toString(abs(amountBaseAssetBought))) + " < ") + toString(_minBaseAssetAmount)))
12861305 else {
12871306 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
12881307 let totalLongOpenInterestAfter = (openInterestLong() + (if ((newPositionSize > 0))
12891308 then openNotional
12901309 else 0))
12911310 let totalShortOpenInterestAfter = (openInterestShort() + (if ((0 > newPositionSize))
12921311 then openNotional
12931312 else 0))
12941313 let increaseMarginRequirement = divd(openNotional, _leverage)
1295- let $t05626256501 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
1296- let remainMargin = $t05626256501._1
1297- let x1 = $t05626256501._2
1298- let x2 = $t05626256501._3
1314+ let $t05706757306 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
1315+ let remainMargin = $t05706757306._1
1316+ let x1 = $t05706757306._2
1317+ let x2 = $t05706757306._3
12991318 if (!(requireNotOverSpreadLimit(quoteAssetReserveAfter, baseAssetReserveAfter)))
13001319 then throw("Over max spread limit")
13011320 else if (!(requireNotOverMaxOpenNotional(totalLongOpenInterestAfter, totalShortOpenInterestAfter)))
13021321 then throw("Over max open notional")
13031322 else $Tuple12(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
13041323 then abs(amountBaseAssetBought)
13051324 else 0)), (totalShortPositionSize() + (if ((0 > newPositionSize))
13061325 then abs(amountBaseAssetBought)
13071326 else 0)), totalLongOpenInterestAfter, totalShortOpenInterestAfter)
13081327 }
13091328 }
13101329 else {
13111330 let openNotional = muld(_amount, _leverage)
1312- let $t05776057876 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
1313- let oldPositionNotional = $t05776057876._1
1314- let unrealizedPnl = $t05776057876._2
1331+ let $t05856558681 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
1332+ let oldPositionNotional = $t05856558681._1
1333+ let unrealizedPnl = $t05856558681._2
13151334 if ((oldPositionNotional > openNotional))
13161335 then throw("Use decreasePosition to decrease position size")
13171336 else throw("Close position first")
13181337 }
1319- let newPositionSize = $t05501958060._1
1320- let newPositionRemainMargin = $t05501958060._2
1321- let newPositionOpenNotional = $t05501958060._3
1322- let newPositionLatestCPF = $t05501958060._4
1323- let baseAssetReserveAfter = $t05501958060._5
1324- let quoteAssetReserveAfter = $t05501958060._6
1325- let totalPositionSizeAfter = $t05501958060._7
1326- let openInterestNotionalAfter = $t05501958060._8
1327- let totalLongAfter = $t05501958060._9
1328- let totalShortAfter = $t05501958060._10
1329- let totalLongOpenInterestAfter = $t05501958060._11
1330- let totalShortOpenInterestAfter = $t05501958060._12
1331- let $t05806658123 = distributeFee(feeAmount)
1332- let feeToStakers = $t05806658123._1
1333- let feeToVault = $t05806658123._2
1338+ let newPositionSize = $t05582458865._1
1339+ let newPositionRemainMargin = $t05582458865._2
1340+ let newPositionOpenNotional = $t05582458865._3
1341+ let newPositionLatestCPF = $t05582458865._4
1342+ let baseAssetReserveAfter = $t05582458865._5
1343+ let quoteAssetReserveAfter = $t05582458865._6
1344+ let totalPositionSizeAfter = $t05582458865._7
1345+ let openInterestNotionalAfter = $t05582458865._8
1346+ let totalLongAfter = $t05582458865._9
1347+ let totalShortAfter = $t05582458865._10
1348+ let totalLongOpenInterestAfter = $t05582458865._11
1349+ let totalShortOpenInterestAfter = $t05582458865._12
1350+ let $t05887158928 = distributeFee(feeAmount)
1351+ let feeToStakers = $t05887158928._1
1352+ let feeToVault = $t05887158928._2
13341353 let stake = if (isQuoteAsset)
13351354 then {
13361355 let stake = invoke(vaultAddress(), "addLocked", [false], [AttachedPayment(quoteAsset(), _amount)])
13371356 if ((stake == stake))
13381357 then nil
13391358 else throw("Strict value is not equal to itself.")
13401359 }
13411360 else nil
13421361 if ((stake == stake))
13431362 then {
13441363 let depositInsurance = invoke(vaultAddress(), "addFree", nil, [AttachedPayment(quoteAsset(), feeToVault)])
13451364 if ((depositInsurance == depositInsurance))
13461365 then {
13471366 let notifyFee = invoke(minerAddress(), "notifyFees", [_trader, feeAmount], nil)
13481367 if ((notifyFee == notifyFee))
13491368 then {
13501369 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, newPositionOpenNotional], nil)
13511370 if ((notifyNotional == notifyNotional))
13521371 then ((((((updatePosition(_trader, newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ incrementPositionSequenceNumber(isNewPosition, _trader)) ++ updatePositionAsset(_trader, _assetIdStr)) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter, totalLongOpenInterestAfter, totalShortOpenInterestAfter)) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount))) ++ doBurnArtifact(burnArtifact, i))
13531372 else throw("Strict value is not equal to itself.")
13541373 }
13551374 else throw("Strict value is not equal to itself.")
13561375 }
13571376 else throw("Strict value is not equal to itself.")
13581377 }
13591378 else throw("Strict value is not equal to itself.")
13601379 }
13611380 else throw("Strict value is not equal to itself.")
13621381 }
13631382 else throw("Strict value is not equal to itself.")
13641383 }
13651384 }
13661385 else throw("Strict value is not equal to itself.")
13671386 }
13681387
13691388
13701389
13711390 @Callable(i)
13721391 func addMargin () = {
13731392 let sync = invoke(this, "syncTerminalPriceToOracle", nil, nil)
13741393 if ((sync == sync))
13751394 then {
13761395 let _trader = toString(i.caller)
13771396 let _rawAmount = i.payments[0].amount
13781397 let _assetId = i.payments[0].assetId
13791398 let _assetIdStr = toBase58String(value(_assetId))
13801399 let isQuoteAsset = (_assetId == quoteAsset())
13811400 let isCollateralAsset = isWhitelistAsset(_assetIdStr)
13821401 if (if (if (if (if (if (if (!(isQuoteAsset))
13831402 then !(isCollateralAsset)
13841403 else false)
13851404 then true
13861405 else !(requireOpenPosition(toString(i.caller))))
13871406 then true
13881407 else !(isSameAsset(_trader, _assetIdStr)))
13891408 then true
13901409 else !(initialized()))
13911410 then true
13921411 else paused())
13931412 then true
13941413 else closeOnly())
13951414 then throw("Invalid addMargin parameters")
13961415 else {
1397- let $t06007160156 = getForTraderWithArtifact(_trader, getArtifactId(i))
1398- let adjustedFee = $t06007160156._1
1399- let burnArtifact = $t06007160156._2
1416+ let $t06087660961 = getForTraderWithArtifact(_trader, getArtifactId(i))
1417+ let adjustedFee = $t06087660961._1
1418+ let burnArtifact = $t06087660961._2
14001419 let rawFeeAmount = muld(_rawAmount, adjustedFee)
14011420 let _amount = (_rawAmount - rawFeeAmount)
14021421 let distributeFeeAmount = if (isCollateralAsset)
14031422 then {
14041423 let doBorrow = invoke(collateralAddress(), "borrow", [_trader], [AttachedPayment(_assetId, _amount)])
14051424 if ((doBorrow == doBorrow))
14061425 then {
14071426 let balanceBefore = assetBalance(this, quoteAsset())
14081427 if ((balanceBefore == balanceBefore))
14091428 then {
14101429 let doSwap = invoke(swapAddress(), "swap", [toBase58String(quoteAsset()), 0], [AttachedPayment(_assetId, rawFeeAmount)])
14111430 if ((doSwap == doSwap))
14121431 then {
14131432 let balanceAfter = assetBalance(this, quoteAsset())
14141433 if ((balanceAfter == balanceAfter))
14151434 then {
14161435 let exchangedAmount = (balanceAfter - balanceBefore)
14171436 if ((exchangedAmount == exchangedAmount))
14181437 then exchangedAmount
14191438 else throw("Strict value is not equal to itself.")
14201439 }
14211440 else throw("Strict value is not equal to itself.")
14221441 }
14231442 else throw("Strict value is not equal to itself.")
14241443 }
14251444 else throw("Strict value is not equal to itself.")
14261445 }
14271446 else throw("Strict value is not equal to itself.")
14281447 }
14291448 else rawFeeAmount
14301449 if ((distributeFeeAmount == distributeFeeAmount))
14311450 then {
14321451 let referrerFeeAny = invoke(referralAddress(), "acceptPayment", [_trader], [AttachedPayment(quoteAsset(), distributeFeeAmount)])
14331452 if ((referrerFeeAny == referrerFeeAny))
14341453 then {
14351454 let referrerFee = match referrerFeeAny {
14361455 case x: Int =>
14371456 x
14381457 case _ =>
14391458 throw("Invalid referrerFee")
14401459 }
14411460 let feeAmount = (distributeFeeAmount - referrerFee)
1442- let $t06145561595 = getPosition(_trader)
1443- let oldPositionSize = $t06145561595._1
1444- let oldPositionMargin = $t06145561595._2
1445- let oldPositionOpenNotional = $t06145561595._3
1446- let oldPositionLstUpdCPF = $t06145561595._4
1447- let $t06160161658 = distributeFee(feeAmount)
1448- let feeToStakers = $t06160161658._1
1449- let feeToVault = $t06160161658._2
1461+ let $t06226062400 = getPosition(_trader)
1462+ let oldPositionSize = $t06226062400._1
1463+ let oldPositionMargin = $t06226062400._2
1464+ let oldPositionOpenNotional = $t06226062400._3
1465+ let oldPositionLstUpdCPF = $t06226062400._4
1466+ let $t06240662463 = distributeFee(feeAmount)
1467+ let feeToStakers = $t06240662463._1
1468+ let feeToVault = $t06240662463._2
14501469 let stake = if (isQuoteAsset)
14511470 then {
14521471 let stake = invoke(vaultAddress(), "addLocked", [false], [AttachedPayment(quoteAsset(), _amount)])
14531472 if ((stake == stake))
14541473 then nil
14551474 else throw("Strict value is not equal to itself.")
14561475 }
14571476 else nil
14581477 if ((stake == stake))
14591478 then {
14601479 let depositInsurance = invoke(vaultAddress(), "addFree", nil, [AttachedPayment(quoteAsset(), feeToVault)])
14611480 if ((depositInsurance == depositInsurance))
14621481 then {
14631482 let notifyFee = invoke(minerAddress(), "notifyFees", [_trader, feeAmount], nil)
14641483 if ((notifyFee == notifyFee))
14651484 then (((updatePosition(_trader, oldPositionSize, (oldPositionMargin + _amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount))) ++ doBurnArtifact(burnArtifact, i))
14661485 else throw("Strict value is not equal to itself.")
14671486 }
14681487 else throw("Strict value is not equal to itself.")
14691488 }
14701489 else throw("Strict value is not equal to itself.")
14711490 }
14721491 else throw("Strict value is not equal to itself.")
14731492 }
14741493 else throw("Strict value is not equal to itself.")
14751494 }
14761495 }
14771496 else throw("Strict value is not equal to itself.")
14781497 }
14791498
14801499
14811500
14821501 @Callable(i)
14831502 func removeMargin (_amount) = {
14841503 let sync = invoke(this, "syncTerminalPriceToOracle", nil, nil)
14851504 if ((sync == sync))
14861505 then {
14871506 let _trader = toString(i.caller)
14881507 if (if (if (if ((0 >= _amount))
14891508 then true
14901509 else !(requireOpenPosition(_trader)))
14911510 then true
14921511 else !(initialized()))
14931512 then true
14941513 else paused())
14951514 then throw("Invalid removeMargin parameters")
14961515 else {
1497- let $t06277062910 = getPosition(_trader)
1498- let oldPositionSize = $t06277062910._1
1499- let oldPositionMargin = $t06277062910._2
1500- let oldPositionOpenNotional = $t06277062910._3
1501- let oldPositionLstUpdCPF = $t06277062910._4
1516+ let $t06357563715 = getPosition(_trader)
1517+ let oldPositionSize = $t06357563715._1
1518+ let oldPositionMargin = $t06357563715._2
1519+ let oldPositionOpenNotional = $t06357563715._3
1520+ let oldPositionLstUpdCPF = $t06357563715._4
15021521 let marginDelta = -(_amount)
1503- let $t06294763126 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1504- let remainMargin = $t06294763126._1
1505- let badDebt = $t06294763126._2
1522+ let $t06375263931 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1523+ let remainMargin = $t06375263931._1
1524+ let badDebt = $t06375263931._2
15061525 if ((badDebt != 0))
15071526 then throw("Invalid removed margin amount")
15081527 else {
15091528 let marginRatio = calcMarginRatio(remainMargin, badDebt, oldPositionOpenNotional)
15101529 if (!(requireMoreMarginRatio(marginRatio, initMarginRatio(), true)))
15111530 then throw(((("Too much margin removed: " + toString(marginRatio)) + " < ") + toString(initMarginRatio())))
15121531 else {
15131532 let quoteAssetStr = toBase58String(quoteAsset())
1514- let $t06357063624 = getBorrowedByTrader(_trader)
1515- let borrowed = $t06357063624._1
1516- let assetId = $t06357063624._2
1533+ let $t06437564429 = getBorrowedByTrader(_trader)
1534+ let borrowed = $t06437564429._1
1535+ let assetId = $t06437564429._2
15171536 let toRepay = if ((_amount > borrowed))
15181537 then borrowed
15191538 else _amount
15201539 let toWithdraw = if ((borrowed > _amount))
15211540 then 0
15221541 else (_amount - borrowed)
15231542 let finalBorrow = (borrowed - toRepay)
15241543 let switchPositionToQuote = if ((finalBorrow > 0))
15251544 then nil
15261545 else updatePositionAsset(_trader, quoteAssetStr)
15271546 let doSanityCheck = if (((toRepay + toWithdraw) != _amount))
15281547 then throw(((((("toRepay=" + toString(toRepay)) + " + toWithdraw=") + toString(toWithdraw)) + " != ") + toString(_amount)))
15291548 else nil
15301549 if ((doSanityCheck == doSanityCheck))
15311550 then {
15321551 let doUnstake = if ((toWithdraw > 0))
15331552 then {
15341553 let doUnstake = invoke(vaultAddress(), "withdrawLocked", [toWithdraw], nil)
15351554 if ((doUnstake == doUnstake))
15361555 then nil
15371556 else throw("Strict value is not equal to itself.")
15381557 }
15391558 else nil
15401559 if ((doUnstake == doUnstake))
15411560 then {
15421561 let returnCollateralAction = if ((toRepay > 0))
15431562 then {
15441563 let doRepay = invoke(collateralAddress(), "repay", [_trader, toRepay, assetId], nil)
15451564 if ((doRepay == doRepay))
15461565 then [ScriptTransfer(i.caller, toRepay, fromBase58String(assetId))]
15471566 else throw("Strict value is not equal to itself.")
15481567 }
15491568 else nil
15501569 if ((returnCollateralAction == returnCollateralAction))
15511570 then ((((updatePosition(_trader, oldPositionSize, remainMargin, oldPositionOpenNotional, latestCumulativePremiumFraction(oldPositionSize)) ++ (if ((toWithdraw > 0))
15521571 then withdraw(i.caller, toWithdraw)
15531572 else nil)) ++ updateBalance((cbalance() - _amount))) ++ switchPositionToQuote) ++ returnCollateralAction)
15541573 else throw("Strict value is not equal to itself.")
15551574 }
15561575 else throw("Strict value is not equal to itself.")
15571576 }
15581577 else throw("Strict value is not equal to itself.")
15591578 }
15601579 }
15611580 }
15621581 }
15631582 else throw("Strict value is not equal to itself.")
15641583 }
15651584
15661585
15671586
15681587 @Callable(i)
15691588 func closePosition (_size,_minQuoteAssetAmount) = {
15701589 let sync = invoke(this, "syncTerminalPriceToOracle", nil, nil)
15711590 if ((sync == sync))
15721591 then {
15731592 let _trader = getActualCaller(i)
15741593 let _traderAddress = valueOrErrorMessage(addressFromString(_trader), "Invalid caller")
15751594 if (if (if (if (if (!(requireOpenPosition(_trader)))
15761595 then true
15771596 else !(initialized()))
15781597 then true
15791598 else paused())
15801599 then true
15811600 else (0 >= _size))
15821601 then true
15831602 else (0 > _minQuoteAssetAmount))
15841603 then throw("Invalid closePosition parameters")
15851604 else {
1586- let $t06578265922 = getPosition(_trader)
1587- let oldPositionSize = $t06578265922._1
1588- let oldPositionMargin = $t06578265922._2
1589- let oldPositionOpenNotional = $t06578265922._3
1590- let oldPositionLstUpdCPF = $t06578265922._4
1591- let $t06592870365 = if ((abs(oldPositionSize) > _size))
1605+ let $t06658766727 = getPosition(_trader)
1606+ let oldPositionSize = $t06658766727._1
1607+ let oldPositionMargin = $t06658766727._2
1608+ let oldPositionOpenNotional = $t06658766727._3
1609+ let oldPositionLstUpdCPF = $t06658766727._4
1610+ let $t06673371170 = if ((abs(oldPositionSize) > _size))
15921611 then {
15931612 let _direction = if ((oldPositionSize > 0))
15941613 then DIR_SHORT
15951614 else DIR_LONG
15961615 let isAdd = (_direction == DIR_LONG)
1597- let $t06651966741 = swapOutput((oldPositionSize > 0), _size, true)
1598- let exchangedQuoteAssetAmount = $t06651966741._1
1599- let quoteAssetReserveAfter = $t06651966741._2
1600- let baseAssetReserveAfter = $t06651966741._3
1601- let totalPositionSizeAfter = $t06651966741._4
1616+ let $t06732467546 = swapOutput((oldPositionSize > 0), _size, true)
1617+ let exchangedQuoteAssetAmount = $t06732467546._1
1618+ let quoteAssetReserveAfter = $t06732467546._2
1619+ let baseAssetReserveAfter = $t06732467546._3
1620+ let totalPositionSizeAfter = $t06732467546._4
16021621 let exchangedPositionSize = if ((oldPositionSize > 0))
16031622 then -(_size)
16041623 else _size
1605- let $t06683266986 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1606- let oldPositionNotional = $t06683266986._1
1607- let unrealizedPnl = $t06683266986._2
1624+ let $t06763767791 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1625+ let oldPositionNotional = $t06763767791._1
1626+ let unrealizedPnl = $t06763767791._2
16081627 let mr = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
16091628 let realizedRatio = divd(abs(exchangedPositionSize), abs(oldPositionSize))
16101629 let realizedPnl = muld(unrealizedPnl, realizedRatio)
1611- let $t06726567503 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1612- let remainMargin = $t06726567503._1
1613- let positionBadDebt = $t06726567503._2
1614- let fundingPayment = $t06726567503._3
1630+ let $t06807068308 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1631+ let remainMargin = $t06807068308._1
1632+ let positionBadDebt = $t06807068308._2
1633+ let fundingPayment = $t06807068308._3
16151634 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
16161635 let remainOpenNotional = if ((oldPositionSize > 0))
16171636 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
16181637 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
16191638 let newPositionOpenNotional = abs(remainOpenNotional)
16201639 let newPositionMargin = muld(newPositionOpenNotional, mr)
16211640 let newPositionSize = (oldPositionSize + exchangedPositionSize)
16221641 let newPositionLstUpdCPF = latestCumulativePremiumFraction(newPositionSize)
16231642 let openInterestNotionalAfter = (openInterestNotional() - exchangedQuoteAssetAmount)
16241643 if (if ((_minQuoteAssetAmount != 0))
16251644 then (_minQuoteAssetAmount > exchangedQuoteAssetAmount)
16261645 else false)
16271646 then throw(((("Limit error: " + toString(exchangedQuoteAssetAmount)) + " < ") + toString(_minQuoteAssetAmount)))
16281647 else $Tuple15(newPositionSize, newPositionMargin, newPositionOpenNotional, newPositionLstUpdCPF, positionBadDebt, realizedPnl, (abs((remainMargin - newPositionMargin)) + realizedPnl), quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, (totalLongPositionSize() - (if ((newPositionSize > 0))
16291648 then abs(exchangedPositionSize)
16301649 else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
16311650 then abs(exchangedPositionSize)
16321651 else 0)), (openInterestLong() - (if ((newPositionSize > 0))
16331652 then exchangedQuoteAssetAmount
16341653 else 0)), (openInterestShort() - (if ((0 > newPositionSize))
16351654 then exchangedQuoteAssetAmount
16361655 else 0)))
16371656 }
16381657 else if ((_size > abs(oldPositionSize)))
16391658 then throw("Invalid closePosition parameters")
16401659 else {
1641- let $t06930669725 = internalClosePosition(_trader, true)
1642- let exchangedQuoteAssetAmount = $t06930669725._1
1643- let positionBadDebt = $t06930669725._2
1644- let realizedPnl = $t06930669725._3
1645- let marginToVault = $t06930669725._4
1646- let quoteAssetReserveAfter = $t06930669725._5
1647- let baseAssetReserveAfter = $t06930669725._6
1648- let totalPositionSizeAfter = $t06930669725._7
1649- let openInterestNotionalAfter = $t06930669725._8
1650- let x2 = $t06930669725._9
1651- let totalLongAfter = $t06930669725._10
1652- let totalShortAfter = $t06930669725._11
1653- let totalLongOpenInterestAfter = $t06930669725._12
1654- let totalShortOpenInterestAfter = $t06930669725._13
1660+ let $t07011170530 = internalClosePosition(_trader, true)
1661+ let exchangedQuoteAssetAmount = $t07011170530._1
1662+ let positionBadDebt = $t07011170530._2
1663+ let realizedPnl = $t07011170530._3
1664+ let marginToVault = $t07011170530._4
1665+ let quoteAssetReserveAfter = $t07011170530._5
1666+ let baseAssetReserveAfter = $t07011170530._6
1667+ let totalPositionSizeAfter = $t07011170530._7
1668+ let openInterestNotionalAfter = $t07011170530._8
1669+ let x2 = $t07011170530._9
1670+ let totalLongAfter = $t07011170530._10
1671+ let totalShortAfter = $t07011170530._11
1672+ let totalLongOpenInterestAfter = $t07011170530._12
1673+ let totalShortOpenInterestAfter = $t07011170530._13
16551674 if (if ((_minQuoteAssetAmount != 0))
16561675 then (_minQuoteAssetAmount > exchangedQuoteAssetAmount)
16571676 else false)
16581677 then throw(((("Limit error: " + toString(exchangedQuoteAssetAmount)) + " < ") + toString(_minQuoteAssetAmount)))
16591678 else $Tuple15(0, 0, 0, 0, positionBadDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter, totalLongOpenInterestAfter, totalShortOpenInterestAfter)
16601679 }
1661- let newPositionSize = $t06592870365._1
1662- let newPositionMargin = $t06592870365._2
1663- let newPositionOpenNotional = $t06592870365._3
1664- let newPositionLstUpdCPF = $t06592870365._4
1665- let positionBadDebt = $t06592870365._5
1666- let realizedPnl = $t06592870365._6
1667- let marginToVault = $t06592870365._7
1668- let quoteAssetReserveAfter = $t06592870365._8
1669- let baseAssetReserveAfter = $t06592870365._9
1670- let totalPositionSizeAfter = $t06592870365._10
1671- let openInterestNotionalAfter = $t06592870365._11
1672- let totalLongAfter = $t06592870365._12
1673- let totalShortAfter = $t06592870365._13
1674- let totalLongOpenInterestAfter = $t06592870365._14
1675- let totalShortOpenInterestAfter = $t06592870365._15
1680+ let newPositionSize = $t06673371170._1
1681+ let newPositionMargin = $t06673371170._2
1682+ let newPositionOpenNotional = $t06673371170._3
1683+ let newPositionLstUpdCPF = $t06673371170._4
1684+ let positionBadDebt = $t06673371170._5
1685+ let realizedPnl = $t06673371170._6
1686+ let marginToVault = $t06673371170._7
1687+ let quoteAssetReserveAfter = $t06673371170._8
1688+ let baseAssetReserveAfter = $t06673371170._9
1689+ let totalPositionSizeAfter = $t06673371170._10
1690+ let openInterestNotionalAfter = $t06673371170._11
1691+ let totalLongAfter = $t06673371170._12
1692+ let totalShortAfter = $t06673371170._13
1693+ let totalLongOpenInterestAfter = $t06673371170._14
1694+ let totalShortOpenInterestAfter = $t06673371170._15
16761695 if ((positionBadDebt > 0))
16771696 then throw("Unable to close position with bad debt")
16781697 else {
16791698 let withdrawAmount = abs(marginToVault)
16801699 let ammBalance = (cbalance() - withdrawAmount)
1681- let $t07057470781 = if ((0 > ammBalance))
1700+ let $t07137971586 = if ((0 > ammBalance))
16821701 then $Tuple2(0, abs(ammBalance))
16831702 else $Tuple2(ammBalance, 0)
1684- let ammNewBalance = $t07057470781._1
1685- let x11 = $t07057470781._2
1686- let $t07078870842 = getBorrowedByTrader(_trader)
1687- let borrowed = $t07078870842._1
1688- let assetId = $t07078870842._2
1689- let $t07085771716 = if ((borrowed > 0))
1703+ let ammNewBalance = $t07137971586._1
1704+ let x11 = $t07137971586._2
1705+ let $t07159371647 = getBorrowedByTrader(_trader)
1706+ let borrowed = $t07159371647._1
1707+ let assetId = $t07159371647._2
1708+ let $t07166272521 = if ((borrowed > 0))
16901709 then if ((withdrawAmount >= borrowed))
16911710 then {
16921711 let doRepay = invoke(collateralAddress(), "repay", [_trader, borrowed, assetId], nil)
16931712 if ((doRepay == doRepay))
16941713 then $Tuple2([ScriptTransfer(_traderAddress, borrowed, fromBase58String(assetId))], (withdrawAmount - borrowed))
16951714 else throw("Strict value is not equal to itself.")
16961715 }
16971716 else {
16981717 let realizeAndClose = invoke(collateralAddress(), "realizePartiallyAndClose", [_trader, withdrawAmount, assetId], nil)
16991718 if ((realizeAndClose == realizeAndClose))
17001719 then $Tuple2([ScriptTransfer(_traderAddress, withdrawAmount, fromBase58String(assetId))], 0)
17011720 else throw("Strict value is not equal to itself.")
17021721 }
17031722 else $Tuple2(nil, withdrawAmount)
1704- if (($t07085771716 == $t07085771716))
1723+ if (($t07166272521 == $t07166272521))
17051724 then {
1706- let quoteWithdrawAmount = $t07085771716._2
1707- let sendCollateralAction = $t07085771716._1
1725+ let quoteWithdrawAmount = $t07166272521._2
1726+ let sendCollateralAction = $t07166272521._1
17081727 let unstake = if ((quoteWithdrawAmount > 0))
17091728 then {
17101729 let unstake = invoke(vaultAddress(), "withdrawLocked", [quoteWithdrawAmount], nil)
17111730 if ((unstake == unstake))
17121731 then nil
17131732 else throw("Strict value is not equal to itself.")
17141733 }
17151734 else nil
17161735 if ((unstake == unstake))
17171736 then {
17181737 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, 0], nil)
17191738 if ((notifyNotional == notifyNotional))
17201739 then (((((if ((newPositionSize == 0))
17211740 then deletePosition(_trader)
17221741 else updatePosition(_trader, newPositionSize, newPositionMargin, newPositionOpenNotional, newPositionLstUpdCPF)) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter, totalLongOpenInterestAfter, totalShortOpenInterestAfter)) ++ (if ((quoteWithdrawAmount > 0))
17231742 then withdraw(_traderAddress, quoteWithdrawAmount)
17241743 else nil)) ++ updateBalance(ammNewBalance)) ++ sendCollateralAction)
17251744 else throw("Strict value is not equal to itself.")
17261745 }
17271746 else throw("Strict value is not equal to itself.")
17281747 }
17291748 else throw("Strict value is not equal to itself.")
17301749 }
17311750 }
17321751 }
17331752 else throw("Strict value is not equal to itself.")
17341753 }
17351754
17361755
17371756
17381757 @Callable(i)
17391758 func liquidate (_trader) = {
17401759 let sync = invoke(this, "syncTerminalPriceToOracle", nil, nil)
17411760 if ((sync == sync))
17421761 then {
17431762 let spotMarginRatio = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
17441763 let marginRatio = if (isOverFluctuationLimit())
17451764 then {
17461765 let oracleMarginRatio = getMarginRatioByOption(_trader, PNL_OPTION_ORACLE)
17471766 vmax(spotMarginRatio, oracleMarginRatio)
17481767 }
17491768 else spotMarginRatio
17501769 if (if (if (if (!(requireMoreMarginRatio(marginRatio, maintenanceMarginRatio(), false)))
17511770 then true
17521771 else !(requireOpenPosition(_trader)))
17531772 then true
17541773 else !(initialized()))
17551774 then true
17561775 else paused())
17571776 then throw("Unable to liquidate")
17581777 else if (if (if ((spotMarginRatio > liquidationFeeRatio()))
17591778 then (partialLiquidationRatio() > 0)
17601779 else false)
17611780 then (DECIMAL_UNIT > partialLiquidationRatio())
17621781 else false)
17631782 then {
1764- let $t07401374163 = getPosition(_trader)
1765- let oldPositionSize = $t07401374163._1
1766- let oldPositionMargin = $t07401374163._2
1767- let oldPositionOpenNotional = $t07401374163._3
1768- let oldPositionLstUpdCPF = $t07401374163._4
1783+ let $t07481874968 = getPosition(_trader)
1784+ let oldPositionSize = $t07481874968._1
1785+ let oldPositionMargin = $t07481874968._2
1786+ let oldPositionOpenNotional = $t07481874968._3
1787+ let oldPositionLstUpdCPF = $t07481874968._4
17691788 let _direction = if ((oldPositionSize > 0))
17701789 then DIR_SHORT
17711790 else DIR_LONG
17721791 let isAdd = (_direction == DIR_LONG)
17731792 let exchangedQuoteAssetAmount = getPartialLiquidationAmount(_trader, oldPositionSize)
1774- let $t07438874492 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1775- let oldPositionNotional = $t07438874492._1
1776- let unrealizedPnl = $t07438874492._2
1777- let $t07450074687 = swapInput(isAdd, exchangedQuoteAssetAmount)
1778- let exchangedPositionSize = $t07450074687._1
1779- let quoteAssetReserveAfter = $t07450074687._2
1780- let baseAssetReserveAfter = $t07450074687._3
1781- let totalPositionSizeAfter = $t07450074687._4
1793+ let $t07519375297 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1794+ let oldPositionNotional = $t07519375297._1
1795+ let unrealizedPnl = $t07519375297._2
1796+ let $t07530575492 = swapInput(isAdd, exchangedQuoteAssetAmount)
1797+ let exchangedPositionSize = $t07530575492._1
1798+ let quoteAssetReserveAfter = $t07530575492._2
1799+ let baseAssetReserveAfter = $t07530575492._3
1800+ let totalPositionSizeAfter = $t07530575492._4
17821801 let liquidationRatio = divd(abs(exchangedPositionSize), abs(oldPositionSize))
17831802 let realizedPnl = muld(unrealizedPnl, liquidationRatio)
1784- let $t07497675209 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1785- let remainMargin = $t07497675209._1
1786- let badDebt = $t07497675209._2
1787- let fundingPayment = $t07497675209._3
1803+ let $t07578176014 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1804+ let remainMargin = $t07578176014._1
1805+ let badDebt = $t07578176014._2
1806+ let fundingPayment = $t07578176014._3
17881807 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
17891808 let remainOpenNotional = if ((oldPositionSize > 0))
17901809 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
17911810 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
17921811 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
17931812 let feeToLiquidator = (liquidationPenalty / 2)
17941813 let feeToVault = (liquidationPenalty - feeToLiquidator)
17951814 let newPositionMargin = (remainMargin - liquidationPenalty)
17961815 let newPositionSize = (oldPositionSize + exchangedPositionSize)
17971816 let newPositionOpenNotional = abs(remainOpenNotional)
17981817 let newPositionLstUpdCPF = latestCumulativePremiumFraction(newPositionSize)
17991818 let openInterestNotionalAfter = (openInterestNotional() - exchangedQuoteAssetAmount)
18001819 let ammBalance = (cbalance() - liquidationPenalty)
1801- let $t07637876507 = if ((0 > ammBalance))
1820+ let $t07718377312 = if ((0 > ammBalance))
18021821 then $Tuple2(0, abs(ammBalance))
18031822 else $Tuple2(ammBalance, 0)
1804- let newAmmBalance = $t07637876507._1
1805- let x11 = $t07637876507._2
1806- let $t07651576569 = getBorrowedByTrader(_trader)
1807- let borrowed = $t07651576569._1
1808- let assetId = $t07651576569._2
1823+ let newAmmBalance = $t07718377312._1
1824+ let x11 = $t07718377312._2
1825+ let $t07732077374 = getBorrowedByTrader(_trader)
1826+ let borrowed = $t07732077374._1
1827+ let assetId = $t07732077374._2
18091828 let doLiquidateCollateral = if ((borrowed > 0))
18101829 then {
18111830 let collateralToSell = muld(borrowed, liquidationRatio)
18121831 let realizeAndClose = invoke(collateralAddress(), "realizePartially", [_trader, assetId, collateralToSell], nil)
18131832 if ((realizeAndClose == realizeAndClose))
18141833 then nil
18151834 else throw("Strict value is not equal to itself.")
18161835 }
18171836 else nil
18181837 if ((doLiquidateCollateral == doLiquidateCollateral))
18191838 then {
18201839 let unstake = invoke(vaultAddress(), "withdrawLocked", [liquidationPenalty], nil)
18211840 if ((unstake == unstake))
18221841 then {
18231842 let depositInsurance = invoke(vaultAddress(), "addFree", nil, [AttachedPayment(quoteAsset(), feeToVault)])
18241843 if ((depositInsurance == depositInsurance))
18251844 then {
18261845 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, newPositionOpenNotional], nil)
18271846 if ((notifyNotional == notifyNotional))
18281847 then (((updatePosition(_trader, newPositionSize, newPositionMargin, newPositionOpenNotional, newPositionLstUpdCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, (totalLongPositionSize() - (if ((newPositionSize > 0))
18291848 then abs(exchangedPositionSize)
18301849 else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
18311850 then abs(exchangedPositionSize)
18321851 else 0)), (openInterestLong() - (if ((newPositionSize > 0))
18331852 then exchangedQuoteAssetAmount
18341853 else 0)), (openInterestShort() - (if ((0 > newPositionSize))
18351854 then exchangedQuoteAssetAmount
18361855 else 0)))) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance))
18371856 else throw("Strict value is not equal to itself.")
18381857 }
18391858 else throw("Strict value is not equal to itself.")
18401859 }
18411860 else throw("Strict value is not equal to itself.")
18421861 }
18431862 else throw("Strict value is not equal to itself.")
18441863 }
18451864 else {
1846- let $t07826478759 = internalClosePosition(_trader, false)
1847- let x1 = $t07826478759._1
1848- let badDebt = $t07826478759._2
1849- let x2 = $t07826478759._3
1850- let x3 = $t07826478759._4
1851- let quoteAssetReserveAfter = $t07826478759._5
1852- let baseAssetReserveAfter = $t07826478759._6
1853- let totalPositionSizeAfter = $t07826478759._7
1854- let openInterestNotionalAfter = $t07826478759._8
1855- let exchangedQuoteAssetAmount = $t07826478759._9
1856- let totalLongAfter = $t07826478759._10
1857- let totalShortAfter = $t07826478759._11
1858- let totalLongOpenInterestAfter = $t07826478759._12
1859- let totalShortOpenInterestAfter = $t07826478759._13
1865+ let $t07906979564 = internalClosePosition(_trader, false)
1866+ let x1 = $t07906979564._1
1867+ let badDebt = $t07906979564._2
1868+ let x2 = $t07906979564._3
1869+ let x3 = $t07906979564._4
1870+ let quoteAssetReserveAfter = $t07906979564._5
1871+ let baseAssetReserveAfter = $t07906979564._6
1872+ let totalPositionSizeAfter = $t07906979564._7
1873+ let openInterestNotionalAfter = $t07906979564._8
1874+ let exchangedQuoteAssetAmount = $t07906979564._9
1875+ let totalLongAfter = $t07906979564._10
1876+ let totalShortAfter = $t07906979564._11
1877+ let totalLongOpenInterestAfter = $t07906979564._12
1878+ let totalShortOpenInterestAfter = $t07906979564._13
18601879 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
18611880 let feeToLiquidator = (liquidationPenalty / 2)
18621881 let feeToVault = (liquidationPenalty - feeToLiquidator)
18631882 let ammBalance = (cbalance() - liquidationPenalty)
1864- let $t07916779296 = if ((0 > ammBalance))
1883+ let $t07997280101 = if ((0 > ammBalance))
18651884 then $Tuple2(0, abs(ammBalance))
18661885 else $Tuple2(ammBalance, 0)
1867- let newAmmBalance = $t07916779296._1
1868- let x11 = $t07916779296._2
1869- let $t07930479358 = getBorrowedByTrader(_trader)
1870- let borrowed = $t07930479358._1
1871- let assetId = $t07930479358._2
1886+ let newAmmBalance = $t07997280101._1
1887+ let x11 = $t07997280101._2
1888+ let $t08010980163 = getBorrowedByTrader(_trader)
1889+ let borrowed = $t08010980163._1
1890+ let assetId = $t08010980163._2
18721891 let doLiquidateCollateral = if ((borrowed > 0))
18731892 then {
18741893 let realizeAndClose = invoke(collateralAddress(), "realizePartiallyAndClose", [_trader, 0, assetId], nil)
18751894 if ((realizeAndClose == realizeAndClose))
18761895 then nil
18771896 else throw("Strict value is not equal to itself.")
18781897 }
18791898 else nil
18801899 if ((doLiquidateCollateral == doLiquidateCollateral))
18811900 then {
18821901 let x = if ((badDebt > 0))
18831902 then {
18841903 let lockBadDebt = invoke(vaultAddress(), "exchangeFreeAndLocked", [badDebt], nil)
18851904 if ((lockBadDebt == lockBadDebt))
18861905 then nil
18871906 else throw("Strict value is not equal to itself.")
18881907 }
18891908 else nil
18901909 if ((x == x))
18911910 then {
18921911 let unstake = invoke(vaultAddress(), "withdrawLocked", [liquidationPenalty], nil)
18931912 if ((unstake == unstake))
18941913 then {
18951914 let depositInsurance = invoke(vaultAddress(), "addFree", nil, [AttachedPayment(quoteAsset(), feeToVault)])
18961915 if ((depositInsurance == depositInsurance))
18971916 then {
18981917 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, 0], nil)
18991918 if ((notifyNotional == notifyNotional))
19001919 then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter, totalLongOpenInterestAfter, totalShortOpenInterestAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance))
19011920 else throw("Strict value is not equal to itself.")
19021921 }
19031922 else throw("Strict value is not equal to itself.")
19041923 }
19051924 else throw("Strict value is not equal to itself.")
19061925 }
19071926 else throw("Strict value is not equal to itself.")
19081927 }
19091928 else throw("Strict value is not equal to itself.")
19101929 }
19111930 }
19121931 else throw("Strict value is not equal to itself.")
19131932 }
19141933
19151934
19161935
19171936 @Callable(i)
19181937 func payFunding () = {
19191938 let sync = invoke(this, "syncTerminalPriceToOracle", nil, nil)
19201939 if ((sync == sync))
19211940 then {
19221941 let fundingBlockTimestamp = nextFundingBlockTimestamp()
19231942 if (if (if ((fundingBlockTimestamp > lastBlock.timestamp))
19241943 then true
19251944 else !(initialized()))
19261945 then true
19271946 else paused())
19281947 then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp)))
19291948 else {
19301949 let underlyingPrice = getOracleTwapPrice()
1931- let $t08123481296 = getFunding()
1932- let shortPremiumFraction = $t08123481296._1
1933- let longPremiumFraction = $t08123481296._2
1950+ let $t08203982101 = getFunding()
1951+ let shortPremiumFraction = $t08203982101._1
1952+ let longPremiumFraction = $t08203982101._2
19341953 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
19351954 }
19361955 }
19371956 else throw("Strict value is not equal to itself.")
19381957 }
19391958
19401959
19411960
19421961 @Callable(i)
19431962 func syncTerminalPriceToOracle () = {
1944- let $t08167881799 = getSyncTerminalPrice(getOracleTwapPrice())
1945- let newQuoteAssetWeight = $t08167881799._1
1946- let newBaseAssetWeight = $t08167881799._2
1947- let marginToVault = $t08167881799._3
1963+ let _qtAstR = qtAstR()
1964+ let _bsAstR = bsAstR()
1965+ let $t08253382672 = getSyncTerminalPrice(getOracleTwapPrice(), _qtAstR, _bsAstR)
1966+ let newQuoteAssetWeight = $t08253382672._1
1967+ let newBaseAssetWeight = $t08253382672._2
1968+ let marginToVault = $t08253382672._3
19481969 let doExchangePnL = if ((marginToVault != 0))
19491970 then {
19501971 let doExchangePnL = invoke(vaultAddress(), "exchangeFreeAndLocked", [marginToVault], nil)
19511972 if ((doExchangePnL == doExchangePnL))
19521973 then nil
19531974 else throw("Strict value is not equal to itself.")
19541975 }
19551976 else nil
19561977 if ((doExchangePnL == doExchangePnL))
1957- then {
1958- let _qtAstR = qtAstR()
1959- let _bsAstR = bsAstR()
1960- (updateAmmWeights(newQuoteAssetWeight, newBaseAssetWeight) ++ appendTwap(divd(muld(_qtAstR, newQuoteAssetWeight), muld(_bsAstR, newBaseAssetWeight))))
1961- }
1978+ then (updateAmmWeights(newQuoteAssetWeight, newBaseAssetWeight) ++ appendTwap(divd(muld(_qtAstR, newQuoteAssetWeight), muld(_bsAstR, newBaseAssetWeight))))
19621979 else throw("Strict value is not equal to itself.")
19631980 }
19641981
19651982
19661983
19671984 @Callable(i)
19681985 func view_calcRemainMarginWithFundingPayment (_trader) = {
19691986 let sync = invoke(this, "syncTerminalPriceToOracle", nil, nil)
19701987 if ((sync == sync))
19711988 then {
1972- let $t08241982520 = getPosition(_trader)
1973- let positionSize = $t08241982520._1
1974- let positionMargin = $t08241982520._2
1975- let pon = $t08241982520._3
1976- let positionLstUpdCPF = $t08241982520._4
1977- let $t08252382624 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1978- let positionNotional = $t08252382624._1
1979- let unrealizedPnl = $t08252382624._2
1980- let $t08262782799 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1981- let remainMargin = $t08262782799._1
1982- let badDebt = $t08262782799._2
1983- let fundingPayment = $t08262782799._3
1989+ let $t08324183342 = getPosition(_trader)
1990+ let positionSize = $t08324183342._1
1991+ let positionMargin = $t08324183342._2
1992+ let pon = $t08324183342._3
1993+ let positionLstUpdCPF = $t08324183342._4
1994+ let $t08334583446 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1995+ let positionNotional = $t08334583446._1
1996+ let unrealizedPnl = $t08334583446._2
1997+ let $t08344983621 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1998+ let remainMargin = $t08344983621._1
1999+ let badDebt = $t08344983621._2
2000+ let fundingPayment = $t08344983621._3
19842001 throw((((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)) + s(badDebt)) + s(positionNotional)))
19852002 }
19862003 else throw("Strict value is not equal to itself.")
19872004 }
19882005
19892006
19902007
19912008 @Callable(i)
19922009 func view_getPegAdjustCost (_price) = {
1993- let result = getSyncTerminalPrice(_price)
2010+ let _qtAstR = qtAstR()
2011+ let _bsAstR = bsAstR()
2012+ let result = getSyncTerminalPrice(_price, _qtAstR, _bsAstR)
19942013 throw(toString(result._3))
19952014 }
19962015
19972016
19982017
19992018 @Callable(i)
20002019 func view_getTerminalAmmPrice () = {
2001- let $t08314683227 = getTerminalAmmState()
2002- let terminalQuoteAssetReserve = $t08314683227._1
2003- let terminalBaseAssetReserve = $t08314683227._2
2020+ let $t08403784118 = getTerminalAmmState()
2021+ let terminalQuoteAssetReserve = $t08403784118._1
2022+ let terminalBaseAssetReserve = $t08403784118._2
20042023 let price = divd(muld(terminalQuoteAssetReserve, qtAstW()), muld(terminalBaseAssetReserve, bsAstW()))
20052024 throw(toString(price))
20062025 }
20072026
20082027
20092028
20102029 @Callable(i)
20112030 func view_getFunding () = {
20122031 let underlyingPrice = getOracleTwapPrice()
2013- let $t08344683508 = getFunding()
2014- let shortPremiumFraction = $t08344683508._1
2015- let longPremiumFraction = $t08344683508._2
2032+ let $t08433784399 = getFunding()
2033+ let shortPremiumFraction = $t08433784399._1
2034+ let longPremiumFraction = $t08433784399._2
20162035 let longFunding = divd(longPremiumFraction, underlyingPrice)
20172036 let shortFunding = divd(shortPremiumFraction, underlyingPrice)
20182037 throw((((s(longFunding) + s(shortFunding)) + s(getTwapSpotPrice())) + s(getOracleTwapPrice())))
20192038 }
20202039
20212040
20222041
20232042 @Callable(i)
20242043 func view_getBorrowedByTrader (_trader) = {
2025- let $t08379883852 = getBorrowedByTrader(_trader)
2026- let borrowed = $t08379883852._1
2027- let assetId = $t08379883852._2
2044+ let $t08468984743 = getBorrowedByTrader(_trader)
2045+ let borrowed = $t08468984743._1
2046+ let assetId = $t08468984743._2
20282047 throw((s(borrowed) + assetId))
20292048 }
20302049
20312050
20322051
20332052 @Callable(i)
20342053 func computeSpotPrice () = {
20352054 let result = getSpotPrice()
20362055 $Tuple2(nil, result)
20372056 }
20382057
20392058
20402059
20412060 @Callable(i)
20422061 func computeFeeForTraderWithArtifact (_trader,_artifactId) = {
20432062 let result = getForTraderWithArtifact(_trader, _artifactId)
20442063 $Tuple2(nil, result)
20452064 }
20462065
20472066
20482067 @Verifier(tx)
20492068 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], adminPublicKey())
20502069

github/deemru/w8io/026f985 
265.55 ms