tx · FaqpdL2EJLiGZYpGmk2P3pRY1RM622NT9Uzn8Mjp84sM

3MrRa3KaEgRyyjQdMLuU78m5GkJLvP5DZLj:  -0.05000000 Waves

2022.07.05 10:07 [2126054] smart account 3MrRa3KaEgRyyjQdMLuU78m5GkJLvP5DZLj > SELF 0.00000000 Waves

{ "type": 13, "id": "FaqpdL2EJLiGZYpGmk2P3pRY1RM622NT9Uzn8Mjp84sM", "fee": 5000000, "feeAssetId": null, "timestamp": 1657004913530, "version": 2, "chainId": 84, "sender": "3MrRa3KaEgRyyjQdMLuU78m5GkJLvP5DZLj", "senderPublicKey": "AJNTN7EtP9dsAmPzcKRp9bRMvzZL4uwkmVxQuFuar3Qr", "proofs": [ "3gB3s5Gdf5jiEEwc5eYerYBoHZBRVsUCjgtLGP7Jp3QM32udk4LgYiCs4q7S5CwFgyZpoR6NnF6LZsbcDiPCjdrP" ], "script": "base64:AAIFAAAAAAAAAEkIAhIAEgASCQoHAQEBAQEBARIOCgwBAQEBAQEBCAgIAQESBQoDAQEBEgUKAwEBARIAEgMKAQESABIDCgEIEgASAwoBCBIDCgEIAAAAcAAAAAAJa19vcmFfa2V5AgAAAAlrX29yYV9rZXkAAAAAD2tfb3JhX2Jsb2NrX2tleQIAAAAPa19vcmFfYmxvY2tfa2V5AAAAAAVrX29yYQIAAAAFa19vcmEAAAAACWtfYmFsYW5jZQIAAAAJa19iYWxhbmNlAAAAAA5rX3Bvc2l0aW9uU2l6ZQIAAAAOa19wb3NpdGlvblNpemUAAAAAEGtfcG9zaXRpb25NYXJnaW4CAAAAEGtfcG9zaXRpb25NYXJnaW4AAAAAFmtfcG9zaXRpb25PcGVuTm90aW9uYWwCAAAAFmtfcG9zaXRpb25PcGVuTm90aW9uYWwAAAAALmtfcG9zaXRpb25MYXN0VXBkYXRlZEN1bXVsYXRpdmVQcmVtaXVtRnJhY3Rpb24CAAAAEmtfcG9zaXRpb25GcmFjdGlvbgAAAAANa19pbml0aWFsaXplZAIAAAANa19pbml0aW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b3NpdGlvbk5vdGlvbmFsCAUAAAANJHQwNDM2NzY0Mzc3NwAAAAJfMQQAAAANdW5yZWFsaXplZFBubAgFAAAADSR0MDQzNjc2NDM3NzcAAAACXzIEAAAADSR0MDQzNzgyNDM5NjQJAQAAACJjYWxjUmVtYWluTWFyZ2luV2l0aEZ1bmRpbmdQYXltZW50AAAABAUAAAAMcG9zaXRpb25TaXplBQAAAA5wb3NpdGlvbk1hcmdpbgUAAAARcG9zaXRpb25Mc3RVcGRDUEYFAAAADXVucmVhbGl6ZWRQbmwEAAAADHJlbWFpbk1hcmdpbggFAAAADSR0MDQzNzgyNDM5NjQAAAACXzEEAAAAB2JhZERlYnQIBQAAAA0kdDA0Mzc4MjQzOTY0AAAAAl8yBAAAAA5mdW5kaW5nUGF5bWVudAgFAAAADSR0MDQzNzgyNDM5NjQAAAACXzMJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAQAAAAFzAAAAAQUAAAAMcmVtYWluTWFyZ2luCQEAAAABcwAAAAEFAAAADmZ1bmRpbmdQYXltZW50CQEAAAABcwAAAAEJAQAAAA5nZXRNYXJnaW5SYXRpbwAAAAEFAAAAB190cmFkZXIAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAkBAAAADmFkbWluUHVibGljS2V5AAAAAAkU/Es=", "height": 2126054, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2GpCpRmJvT7g7dQpFYsjs11bN2TjSNtoNSCDPddKmANr Next: 4u3Zo3Ju2psFwE8bxFVrJfPUVd5Bo2TR9PWrpvSnZqRa Diff:
OldNewDifferences
594594
595595
596596 @Callable(i)
597-func decreasePosition (_direction,_amount,_leverage,_minBaseAssetAmount) = if (if (if (if (if (if (if (if ((_direction != DIR_LONG))
598- then (_direction != DIR_SHORT)
599- else false)
600- then true
601- else (0 >= _amount))
597+func decreasePosition (_amount,_leverage,_minBaseAssetAmount) = if (if (if (if (if (if ((0 >= _amount))
602598 then true
603599 else if (((1 * DECIMAL_UNIT) > _leverage))
604600 then true
613609 else paused())
614610 then throw("Invalid decreasePosition parameters")
615611 else {
616- let $t02680126953 = getPosition(toString(i.caller))
617- let oldPositionSize = $t02680126953._1
618- let oldPositionMargin = $t02680126953._2
619- let oldPositionOpenNotional = $t02680126953._3
620- let oldPositionLstUpdCPF = $t02680126953._4
621- let expandExisting = if ((oldPositionSize > 0))
622- then (_direction == DIR_LONG)
623- else (_direction == DIR_SHORT)
612+ let $t02672326875 = getPosition(toString(i.caller))
613+ let oldPositionSize = $t02672326875._1
614+ let oldPositionMargin = $t02672326875._2
615+ let oldPositionOpenNotional = $t02672326875._3
616+ let oldPositionLstUpdCPF = $t02672326875._4
617+ let _direction = if ((oldPositionSize > 0))
618+ then DIR_SHORT
619+ else DIR_LONG
624620 let isAdd = (_direction == DIR_LONG)
625- let $t02713730158 = if (expandExisting)
626- then throw("Use increasePosition to open new or increase position")
627- else {
628- let openNotional = muld(_amount, _leverage)
629- let $t02762627742 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
630- let oldPositionNotional = $t02762627742._1
631- let unrealizedPnl = $t02762627742._2
632- if ((oldPositionNotional > openNotional))
633- then {
634- let $t02780428034 = swapInput(isAdd, openNotional)
635- let exchangedPositionSize = $t02780428034._1
636- let quoteAssetReserveAfter = $t02780428034._2
637- let baseAssetReserveAfter = $t02780428034._3
638- let totalPositionSizeAfter = $t02780428034._4
639- let cumulativeNotionalAfter = $t02780428034._5
640- let exchangedPositionSizeAbs = abs(exchangedPositionSize)
641- if (if ((_minBaseAssetAmount != 0))
642- then (_minBaseAssetAmount > exchangedPositionSizeAbs)
643- else false)
644- then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
645- else {
646- let realizedPnl = if ((oldPositionSize != 0))
647- then divd(muld(unrealizedPnl, exchangedPositionSizeAbs), oldPositionSize)
648- else 0
649- let $t02857428831 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
650- let remainMargin = $t02857428831._1
651- let badDebt = $t02857428831._2
652- let fundingPayment = $t02857428831._3
653- let exchangedQuoteAssetAmount = openNotional
654- let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
655- let remainOpenNotional = if ((oldPositionSize > 0))
656- then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
657- else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
658- let newPositionSize = (oldPositionSize + exchangedPositionSize)
659- $Tuple11(newPositionSize, remainMargin, abs(remainOpenNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() - openNotional), (totalLongPositionSize() - (if ((newPositionSize > 0))
660- then abs(exchangedPositionSize)
661- else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
662- then abs(exchangedPositionSize)
663- else 0)))
664- }
621+ let openNotional = muld(_amount, _leverage)
622+ let $t02704827164 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
623+ let oldPositionNotional = $t02704827164._1
624+ let unrealizedPnl = $t02704827164._2
625+ let $t02717029804 = if ((oldPositionNotional > openNotional))
626+ then {
627+ let $t02754727766 = swapInput(isAdd, openNotional)
628+ let exchangedPositionSize = $t02754727766._1
629+ let quoteAssetReserveAfter = $t02754727766._2
630+ let baseAssetReserveAfter = $t02754727766._3
631+ let totalPositionSizeAfter = $t02754727766._4
632+ let cumulativeNotionalAfter = $t02754727766._5
633+ let exchangedPositionSizeAbs = abs(exchangedPositionSize)
634+ if (if ((_minBaseAssetAmount != 0))
635+ then (_minBaseAssetAmount > exchangedPositionSizeAbs)
636+ else false)
637+ then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
638+ else {
639+ let realizedPnl = if ((oldPositionSize != 0))
640+ then divd(muld(unrealizedPnl, exchangedPositionSizeAbs), oldPositionSize)
641+ else 0
642+ let $t02828828533 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
643+ let remainMargin = $t02828828533._1
644+ let badDebt = $t02828828533._2
645+ let fundingPayment = $t02828828533._3
646+ let exchangedQuoteAssetAmount = openNotional
647+ let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
648+ let remainOpenNotional = if ((oldPositionSize > 0))
649+ then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
650+ else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
651+ let newPositionSize = (oldPositionSize + exchangedPositionSize)
652+ $Tuple11(newPositionSize, remainMargin, abs(remainOpenNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() - openNotional), (totalLongPositionSize() - (if ((newPositionSize > 0))
653+ then abs(exchangedPositionSize)
654+ else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
655+ then abs(exchangedPositionSize)
656+ else 0)))
665657 }
666- else throw("Close position first")
667658 }
668- let newPositionSize = $t02713730158._1
669- let newPositionRemainMargin = $t02713730158._2
670- let newPositionOpenNotional = $t02713730158._3
671- let newPositionLatestCPF = $t02713730158._4
672- let baseAssetReserveAfter = $t02713730158._5
673- let quoteAssetReserveAfter = $t02713730158._6
674- let totalPositionSizeAfter = $t02713730158._7
675- let cumulativeNotionalAfter = $t02713730158._8
676- let openInterestNotionalAfter = $t02713730158._9
677- let totalLongAfter = $t02713730158._10
678- let totalShortAfter = $t02713730158._11
659+ else throw("Close position first")
660+ let newPositionSize = $t02717029804._1
661+ let newPositionRemainMargin = $t02717029804._2
662+ let newPositionOpenNotional = $t02717029804._3
663+ let newPositionLatestCPF = $t02717029804._4
664+ let baseAssetReserveAfter = $t02717029804._5
665+ let quoteAssetReserveAfter = $t02717029804._6
666+ let totalPositionSizeAfter = $t02717029804._7
667+ let cumulativeNotionalAfter = $t02717029804._8
668+ let openInterestNotionalAfter = $t02717029804._9
669+ let totalLongAfter = $t02717029804._10
670+ let totalShortAfter = $t02717029804._11
679671 (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter))
680672 }
681673
705697 else {
706698 let feeAmount = muld(_rawAmount, fee())
707699 let _amount = (_rawAmount - feeAmount)
708- let $t03119431318 = getPosition(toString(i.caller))
709- let oldPositionSize = $t03119431318._1
710- let oldPositionMargin = $t03119431318._2
711- let oldPositionOpenNotional = $t03119431318._3
700+ let $t03084030992 = getPosition(toString(i.caller))
701+ let oldPositionSize = $t03084030992._1
702+ let oldPositionMargin = $t03084030992._2
703+ let oldPositionOpenNotional = $t03084030992._3
704+ let oldPositionLstUpdCPF = $t03084030992._4
712705 let isNewPosition = (oldPositionSize == 0)
713706 let isSameDirection = if ((oldPositionSize > 0))
714707 then (_direction == DIR_LONG)
717710 then isSameDirection
718711 else false
719712 let isAdd = (_direction == DIR_LONG)
720- let $t03160734160 = if (if (isNewPosition)
713+ let $t03128133670 = if (if (isNewPosition)
721714 then true
722715 else expandExisting)
723716 then {
724717 let openNotional = muld(_amount, _leverage)
725- let $t03203132237 = swapInput(isAdd, openNotional)
726- let amountBaseAssetBought = $t03203132237._1
727- let quoteAssetReserveAfter = $t03203132237._2
728- let baseAssetReserveAfter = $t03203132237._3
729- let totalPositionSizeAfter = $t03203132237._4
730- let cumulativeNotionalAfter = $t03203132237._5
718+ let $t03170531911 = swapInput(isAdd, openNotional)
719+ let amountBaseAssetBought = $t03170531911._1
720+ let quoteAssetReserveAfter = $t03170531911._2
721+ let baseAssetReserveAfter = $t03170531911._3
722+ let totalPositionSizeAfter = $t03170531911._4
723+ let cumulativeNotionalAfter = $t03170531911._5
731724 if (if ((_minBaseAssetAmount != 0))
732725 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
733726 else false)
734727 then throw(((("Limit error: " + toString(abs(amountBaseAssetBought))) + " < ") + toString(_minBaseAssetAmount)))
735728 else {
736729 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
737- let positionLstUpdCPF = if (isNewPosition)
738- then latestCumulativePremiumFraction(newPositionSize)
739- else getPosition(toString(i.caller))._4
740730 let increaseMarginRequirement = divd(openNotional, _leverage)
741- let $t03278533021 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, positionLstUpdCPF, increaseMarginRequirement)
742- let remainMargin = $t03278533021._1
743- let x1 = $t03278533021._2
744- let x2 = $t03278533021._3
731+ let $t03229232531 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
732+ let remainMargin = $t03229232531._1
733+ let x1 = $t03229232531._2
734+ let x2 = $t03229232531._3
745735 $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
746736 then abs(amountBaseAssetBought)
747737 else 0)), (totalShortPositionSize() + (if ((0 > newPositionSize))
751741 }
752742 else {
753743 let openNotional = muld(_amount, _leverage)
754- let $t03385333969 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
755- let oldPositionNotional = $t03385333969._1
756- let unrealizedPnl = $t03385333969._2
744+ let $t03336333479 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
745+ let oldPositionNotional = $t03336333479._1
746+ let unrealizedPnl = $t03336333479._2
757747 if ((oldPositionNotional > openNotional))
758748 then throw("Use decreasePosition to decrease position size")
759749 else throw("Close position first")
760750 }
761- let newPositionSize = $t03160734160._1
762- let newPositionRemainMargin = $t03160734160._2
763- let newPositionOpenNotional = $t03160734160._3
764- let newPositionLatestCPF = $t03160734160._4
765- let baseAssetReserveAfter = $t03160734160._5
766- let quoteAssetReserveAfter = $t03160734160._6
767- let totalPositionSizeAfter = $t03160734160._7
768- let cumulativeNotionalAfter = $t03160734160._8
769- let openInterestNotionalAfter = $t03160734160._9
770- let totalLongAfter = $t03160734160._10
771- let totalShortAfter = $t03160734160._11
751+ let newPositionSize = $t03128133670._1
752+ let newPositionRemainMargin = $t03128133670._2
753+ let newPositionOpenNotional = $t03128133670._3
754+ let newPositionLatestCPF = $t03128133670._4
755+ let baseAssetReserveAfter = $t03128133670._5
756+ let quoteAssetReserveAfter = $t03128133670._6
757+ let totalPositionSizeAfter = $t03128133670._7
758+ let cumulativeNotionalAfter = $t03128133670._8
759+ let openInterestNotionalAfter = $t03128133670._9
760+ let totalLongAfter = $t03128133670._10
761+ let totalShortAfter = $t03128133670._11
772762 let feeToStakers = (feeAmount / 2)
773763 let feeToInsurance = (feeAmount - feeToStakers)
774764 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
799789 else {
800790 let feeAmount = muld(_rawAmount, fee())
801791 let _amount = (_rawAmount - feeAmount)
802- let $t03543635588 = getPosition(toString(i.caller))
803- let oldPositionSize = $t03543635588._1
804- let oldPositionMargin = $t03543635588._2
805- let oldPositionOpenNotional = $t03543635588._3
806- let oldPositionLstUpdCPF = $t03543635588._4
792+ let $t03494635098 = getPosition(toString(i.caller))
793+ let oldPositionSize = $t03494635098._1
794+ let oldPositionMargin = $t03494635098._2
795+ let oldPositionOpenNotional = $t03494635098._3
796+ let oldPositionLstUpdCPF = $t03494635098._4
807797 let feeToStakers = (feeAmount / 2)
808798 let feeToInsurance = (feeAmount - feeToStakers)
809799 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
830820 else paused())
831821 then throw("Invalid removeMargin parameters")
832822 else {
833- let $t03650836660 = getPosition(toString(i.caller))
834- let oldPositionSize = $t03650836660._1
835- let oldPositionMargin = $t03650836660._2
836- let oldPositionOpenNotional = $t03650836660._3
837- let oldPositionLstUpdCPF = $t03650836660._4
823+ let $t03601836170 = getPosition(toString(i.caller))
824+ let oldPositionSize = $t03601836170._1
825+ let oldPositionMargin = $t03601836170._2
826+ let oldPositionOpenNotional = $t03601836170._3
827+ let oldPositionLstUpdCPF = $t03601836170._4
838828 let marginDelta = -(_amount)
839- let $t03669736876 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
840- let remainMargin = $t03669736876._1
841- let badDebt = $t03669736876._2
829+ let $t03620736386 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
830+ let remainMargin = $t03620736386._1
831+ let badDebt = $t03620736386._2
842832 if ((badDebt != 0))
843833 then throw("Invalid added margin amount")
844834 else {
859849 else paused())
860850 then throw("Invalid closePosition parameters")
861851 else {
862- let $t03763638020 = internalClosePosition(toString(i.caller))
863- let x1 = $t03763638020._1
864- let positionBadDebt = $t03763638020._2
865- let realizedPnl = $t03763638020._3
866- let marginToVault = $t03763638020._4
867- let quoteAssetReserveAfter = $t03763638020._5
868- let baseAssetReserveAfter = $t03763638020._6
869- let totalPositionSizeAfter = $t03763638020._7
870- let cumulativeNotionalAfter = $t03763638020._8
871- let openInterestNotionalAfter = $t03763638020._9
872- let x2 = $t03763638020._10
873- let totalLongAfter = $t03763638020._11
874- let totalShortAfter = $t03763638020._12
852+ let $t03714637530 = internalClosePosition(toString(i.caller))
853+ let x1 = $t03714637530._1
854+ let positionBadDebt = $t03714637530._2
855+ let realizedPnl = $t03714637530._3
856+ let marginToVault = $t03714637530._4
857+ let quoteAssetReserveAfter = $t03714637530._5
858+ let baseAssetReserveAfter = $t03714637530._6
859+ let totalPositionSizeAfter = $t03714637530._7
860+ let cumulativeNotionalAfter = $t03714637530._8
861+ let openInterestNotionalAfter = $t03714637530._9
862+ let x2 = $t03714637530._10
863+ let totalLongAfter = $t03714637530._11
864+ let totalShortAfter = $t03714637530._12
875865 if ((positionBadDebt > 0))
876866 then throw("Unable to close position with bad debt")
877867 else {
878868 let withdrawAmount = abs(marginToVault)
879869 let ammBalance = (cbalance() - withdrawAmount)
880- let $t03822938371 = if ((0 > ammBalance))
870+ let $t03773937881 = if ((0 > ammBalance))
881871 then $Tuple2(0, abs(ammBalance))
882872 else $Tuple2(ammBalance, 0)
883- let ammNewBalance = $t03822938371._1
884- let getFromInsurance = $t03822938371._2
873+ let ammNewBalance = $t03773937881._1
874+ let getFromInsurance = $t03773937881._2
885875 let x = if ((getFromInsurance > 0))
886876 then {
887877 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil)
917907 else paused())
918908 then throw("Unable to liquidate")
919909 else {
920- let $t03981040237 = internalClosePosition(_trader)
921- let x1 = $t03981040237._1
922- let badDebt = $t03981040237._2
923- let x2 = $t03981040237._3
924- let marginToVault = $t03981040237._4
925- let quoteAssetReserveAfter = $t03981040237._5
926- let baseAssetReserveAfter = $t03981040237._6
927- let totalPositionSizeAfter = $t03981040237._7
928- let cumulativeNotionalAfter = $t03981040237._8
929- let openInterestNotionalAfter = $t03981040237._9
930- let exchangedQuoteAssetAmount = $t03981040237._10
931- let totalLongAfter = $t03981040237._11
932- let totalShortAfter = $t03981040237._12
910+ let $t03932039747 = internalClosePosition(_trader)
911+ let x1 = $t03932039747._1
912+ let badDebt = $t03932039747._2
913+ let x2 = $t03932039747._3
914+ let marginToVault = $t03932039747._4
915+ let quoteAssetReserveAfter = $t03932039747._5
916+ let baseAssetReserveAfter = $t03932039747._6
917+ let totalPositionSizeAfter = $t03932039747._7
918+ let cumulativeNotionalAfter = $t03932039747._8
919+ let openInterestNotionalAfter = $t03932039747._9
920+ let exchangedQuoteAssetAmount = $t03932039747._10
921+ let totalLongAfter = $t03932039747._11
922+ let totalShortAfter = $t03932039747._12
933923 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
934924 let feeToLiquidator = (liquidationPenalty / 2)
935925 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
936926 let ammBadDebt = (cbalance() - liquidationPenalty)
937- let $t04063540770 = if ((0 > ammBadDebt))
927+ let $t04014540280 = if ((0 > ammBadDebt))
938928 then $Tuple2(0, abs(ammBadDebt))
939929 else $Tuple2(ammBadDebt, 0)
940- let newAmmBalance = $t04063540770._1
941- let takeFromInsurance = $t04063540770._2
930+ let newAmmBalance = $t04014540280._1
931+ let takeFromInsurance = $t04014540280._2
942932 let x = if ((takeFromInsurance > 0))
943933 then {
944934 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
978968 let underlyingPrice = getOracleTwapPrice()
979969 let spotTwapPrice = getTwapSpotPrice()
980970 let premium = (spotTwapPrice - underlyingPrice)
981- let $t04214043475 = if (if ((totalShortPositionSize() == 0))
971+ let $t04165042985 = if (if ((totalShortPositionSize() == 0))
982972 then true
983973 else (totalLongPositionSize() == 0))
984974 then $Tuple2(0, 0)
993983 let shortPremiumFraction = divd(muld(longPremiumFraction, totalLongPositionSize()), totalShortPositionSize())
994984 $Tuple2(shortPremiumFraction, longPremiumFraction)
995985 }
996- let shortPremiumFraction = $t04214043475._1
997- let longPremiumFraction = $t04214043475._2
986+ let shortPremiumFraction = $t04165042985._1
987+ let longPremiumFraction = $t04165042985._2
998988 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
999989 }
1000990 }
1003993
1004994 @Callable(i)
1005995 func v_get (_trader) = {
1006- let $t04385043903 = internalClosePosition(_trader)
1007- let x1 = $t04385043903._1
1008- let x2 = $t04385043903._2
1009- let x3 = $t04385043903._3
1010- let x4 = $t04385043903._4
996+ let $t04336043413 = internalClosePosition(_trader)
997+ let x1 = $t04336043413._1
998+ let x2 = $t04336043413._2
999+ let x3 = $t04336043413._3
1000+ let x4 = $t04336043413._4
10111001 throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader))))
10121002 }
10131003
10151005
10161006 @Callable(i)
10171007 func view_calcRemainMarginWithFundingPayment (_trader) = {
1018- let $t04405044161 = getPosition(_trader)
1019- let positionSize = $t04405044161._1
1020- let positionMargin = $t04405044161._2
1021- let pon = $t04405044161._3
1022- let positionLstUpdCPF = $t04405044161._4
1023- let $t04416644267 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1024- let positionNotional = $t04416644267._1
1025- let unrealizedPnl = $t04416644267._2
1026- let $t04427244454 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1027- let remainMargin = $t04427244454._1
1028- let badDebt = $t04427244454._2
1029- let fundingPayment = $t04427244454._3
1008+ let $t04356043671 = getPosition(_trader)
1009+ let positionSize = $t04356043671._1
1010+ let positionMargin = $t04356043671._2
1011+ let pon = $t04356043671._3
1012+ let positionLstUpdCPF = $t04356043671._4
1013+ let $t04367643777 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1014+ let positionNotional = $t04367643777._1
1015+ let unrealizedPnl = $t04367643777._2
1016+ let $t04378243964 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1017+ let remainMargin = $t04378243964._1
1018+ let badDebt = $t04378243964._2
1019+ let fundingPayment = $t04378243964._3
10301020 throw(((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))))
10311021 }
10321022
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
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_positionSize = "k_positionSize"
1313
1414 let k_positionMargin = "k_positionMargin"
1515
1616 let k_positionOpenNotional = "k_positionOpenNotional"
1717
1818 let k_positionLastUpdatedCumulativePremiumFraction = "k_positionFraction"
1919
2020 let k_initialized = "k_initialized"
2121
2222 let k_paused = "k_paused"
2323
2424 let k_fee = "k_fee"
2525
2626 let k_fundingPeriod = "k_fundingPeriod"
2727
2828 let k_initMarginRatio = "k_initMarginRatio"
2929
3030 let k_maintenanceMarginRatio = "k_mmr"
3131
3232 let k_liquidationFeeRatio = "k_liquidationFeeRatio"
3333
3434 let k_spreadLimit = "k_spreadLimit"
3535
3636 let k_maxPriceImpact = "k_maxPriceImpact"
3737
3838 let k_lastDataStr = "k_lastDataStr"
3939
4040 let k_lastMinuteId = "k_lastMinuteId"
4141
4242 let k_twapDataLastCumulativePrice = "k_twapDataLastCumulativePrice"
4343
4444 let k_twapDataLastPrice = "k_twapDataLastPrice"
4545
4646 let k_latestLongCumulativePremiumFraction = "k_latestLongPremiumFraction"
4747
4848 let k_latestShortCumulativePremiumFraction = "k_latestShortPremiumFraction"
4949
5050 let k_nextFundingBlock = "k_nextFundingBlockMinTimestamp"
5151
5252 let k_longFundingRate = "k_longFundingRate"
5353
5454 let k_shortFundingRate = "k_shortFundingRate"
5555
5656 let k_quoteAssetReserve = "k_qtAstR"
5757
5858 let k_baseAssetReserve = "k_bsAstR"
5959
6060 let k_totalPositionSize = "k_totalPositionSize"
6161
6262 let k_totalLongPositionSize = "k_totalLongPositionSize"
6363
6464 let k_totalShortPositionSize = "k_totalShortPositionSize"
6565
6666 let k_cumulativeNotional = "k_cumulativeNotional"
6767
6868 let k_openInterestNotional = "k_openInterestNotional"
6969
7070 let k_coordinatorAddress = "k_coordinatorAddress"
7171
7272 let k_insurance_address = "k_insurance_address"
7373
7474 let k_admin_address = "k_admin_address"
7575
7676 let k_admin_public_key = "k_admin_public_key"
7777
7878 let k_quote_asset = "k_quote_asset"
7979
8080 let k_quote_staking = "k_quote_staking"
8181
8282 let k_staking_address = "k_staking_address"
8383
8484 func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set")
8585
8686
8787 func adminAddress () = addressFromString(getStringValue(coordinator(), k_admin_address))
8888
8989
9090 func adminPublicKey () = fromBase58String(getStringValue(coordinator(), k_admin_public_key))
9191
9292
9393 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
9494
9595
9696 func quoteAssetStaking () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_quote_staking)), "Quote asset staking not set")
9797
9898
9999 func stakingAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_staking_address)), "Insurance not set")
100100
101101
102102 func insuranceAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_insurance_address)), "Insurance not set")
103103
104104
105105 let DIR_LONG = 1
106106
107107 let DIR_SHORT = 2
108108
109109 let FUNDING_BLOCK_INTERVAL = 60
110110
111111 let TWAP_INTERVAL = 15
112112
113113 let ORACLE_INTERVAL = 15
114114
115115 let SECONDS = 1000
116116
117117 let DECIMAL_UNIT = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
118118
119119 let HUNDRED_PERCENT = (100 * DECIMAL_UNIT)
120120
121121 let ONE_DAY = (86400 * DECIMAL_UNIT)
122122
123123 let ALL_FEES = 100
124124
125125 let PNL_OPTION_SPOT = 1
126126
127127 let PNL_OPTION_ORACLE = 2
128128
129129 func s (_x) = (toString(_x) + ",")
130130
131131
132132 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
133133
134134
135135 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
136136
137137
138138 func abs (_x) = if ((_x > 0))
139139 then _x
140140 else -(_x)
141141
142142
143143 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
144144
145145
146146 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
147147
148148
149149 func cbalance () = int(k_balance)
150150
151151
152152 func fee () = int(k_fee)
153153
154154
155155 func initMarginRatio () = int(k_initMarginRatio)
156156
157157
158158 func qtAstR () = int(k_quoteAssetReserve)
159159
160160
161161 func bsAstR () = int(k_baseAssetReserve)
162162
163163
164164 func totalPositionSize () = int(k_totalPositionSize)
165165
166166
167167 func cumulativeNotional () = int(k_cumulativeNotional)
168168
169169
170170 func openInterestNotional () = int(k_openInterestNotional)
171171
172172
173173 func nextFundingBlockTimestamp () = int(k_nextFundingBlock)
174174
175175
176176 func fundingPeriodRaw () = int(k_fundingPeriod)
177177
178178
179179 func fundingPeriodDecimal () = (fundingPeriodRaw() * DECIMAL_UNIT)
180180
181181
182182 func fundingPeriodSeconds () = (fundingPeriodRaw() * SECONDS)
183183
184184
185185 func maintenanceMarginRatio () = int(k_maintenanceMarginRatio)
186186
187187
188188 func liquidationFeeRatio () = int(k_liquidationFeeRatio)
189189
190190
191191 func spreadLimit () = int(k_spreadLimit)
192192
193193
194194 func maxPriceImpact () = int(k_maxPriceImpact)
195195
196196
197197 func latestLongCumulativePremiumFraction () = int(k_latestLongCumulativePremiumFraction)
198198
199199
200200 func latestShortCumulativePremiumFraction () = int(k_latestShortCumulativePremiumFraction)
201201
202202
203203 func totalShortPositionSize () = int(k_totalShortPositionSize)
204204
205205
206206 func totalLongPositionSize () = int(k_totalLongPositionSize)
207207
208208
209209 func requireMoreMarginRatio (_marginRatio,_baseMarginRatio,_largerThanOrEqualTo) = {
210210 let remainingMarginRatio = (_marginRatio - _baseMarginRatio)
211211 if (if (_largerThanOrEqualTo)
212212 then (0 > remainingMarginRatio)
213213 else false)
214214 then throw("Invalid margin")
215215 else if (if (!(_largerThanOrEqualTo))
216216 then (remainingMarginRatio >= 0)
217217 else false)
218218 then throw("Invalid margin")
219219 else true
220220 }
221221
222222
223223 func latestCumulativePremiumFraction (_positionSize) = if ((_positionSize == 0))
224224 then throw("Should not be called with _positionSize == 0")
225225 else if ((_positionSize > 0))
226226 then latestLongCumulativePremiumFraction()
227227 else latestShortCumulativePremiumFraction()
228228
229229
230230 func getPosition (_trader) = {
231231 let positionSizeOpt = getInteger(this, toCompositeKey(k_positionSize, _trader))
232232 match positionSizeOpt {
233233 case positionSize: Int =>
234234 $Tuple4(positionSize, getIntegerValue(this, toCompositeKey(k_positionMargin, _trader)), getIntegerValue(this, toCompositeKey(k_positionOpenNotional, _trader)), getIntegerValue(this, toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _trader)))
235235 case _ =>
236236 $Tuple4(0, 0, 0, 0)
237237 }
238238 }
239239
240240
241241 func requireOpenPosition (_trader) = if ((getPosition(_trader)._1 == 0))
242242 then throw("No open position")
243243 else true
244244
245245
246246 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
247247
248248
249249 func paused () = valueOrElse(getBoolean(this, k_paused), false)
250250
251251
252252 func updateReserve (_isAdd,_quoteAssetAmount,_baseAssetAmount) = if (_isAdd)
253253 then {
254254 let newBase = (bsAstR() - _baseAssetAmount)
255255 if ((0 >= newBase))
256256 then throw("Tx lead to base asset reserve <= 0, revert")
257257 else $Tuple4((qtAstR() + _quoteAssetAmount), newBase, (totalPositionSize() + _baseAssetAmount), (cumulativeNotional() + _quoteAssetAmount))
258258 }
259259 else {
260260 let newQuote = (qtAstR() - _quoteAssetAmount)
261261 if ((0 >= newQuote))
262262 then throw("Tx lead to base quote reserve <= 0, revert")
263263 else $Tuple4(newQuote, (bsAstR() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount), (cumulativeNotional() - _quoteAssetAmount))
264264 }
265265
266266
267267 func swapInput (_isAdd,_quoteAssetAmount) = {
268268 let _qtAstR = qtAstR()
269269 let _bsAstR = bsAstR()
270270 let priceBefore = divd(_qtAstR, _bsAstR)
271271 let amountBaseAssetBoughtWithoutPriceImpact = muld(_quoteAssetAmount, priceBefore)
272272 let k = muld(_qtAstR, _bsAstR)
273273 let quoteAssetReserveAfter = if (_isAdd)
274274 then (_qtAstR + _quoteAssetAmount)
275275 else (_qtAstR - _quoteAssetAmount)
276276 let baseAssetReserveAfter = divd(k, quoteAssetReserveAfter)
277277 let amountBaseAssetBoughtAbs = abs((baseAssetReserveAfter - _bsAstR))
278278 let amountBaseAssetBought = if (_isAdd)
279279 then amountBaseAssetBoughtAbs
280280 else -(amountBaseAssetBoughtAbs)
281281 let priceImpact = ((amountBaseAssetBoughtWithoutPriceImpact - amountBaseAssetBoughtAbs) / amountBaseAssetBoughtWithoutPriceImpact)
282282 let maxPriceImpactValue = maxPriceImpact()
283283 if ((priceImpact > maxPriceImpactValue))
284284 then throw(((("Price impact " + toString(priceImpact)) + " > max price impact ") + toString(maxPriceImpactValue)))
285285 else {
286286 let $t01143211635 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
287287 let quoteAssetReserveAfter1 = $t01143211635._1
288288 let baseAssetReserveAfter1 = $t01143211635._2
289289 let totalPositionSizeAfter1 = $t01143211635._3
290290 let cumulativeNotionalAfter1 = $t01143211635._4
291291 $Tuple5(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
292292 }
293293 }
294294
295295
296296 func calcRemainMarginWithFundingPayment (_oldPositionSize,_oldPositionMargin,_oldPositionCumulativePremiumFraction,_marginDelta) = {
297297 let fundingPayment = if ((_oldPositionSize != 0))
298298 then {
299299 let _latestCumulativePremiumFraction = latestCumulativePremiumFraction(_oldPositionSize)
300300 muld((_latestCumulativePremiumFraction - _oldPositionCumulativePremiumFraction), _oldPositionSize)
301301 }
302302 else 0
303303 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
304304 let $t01238212509 = if ((0 > signedMargin))
305305 then $Tuple2(0, abs(signedMargin))
306306 else $Tuple2(abs(signedMargin), 0)
307307 let remainMargin = $t01238212509._1
308308 let badDebt = $t01238212509._2
309309 $Tuple3(remainMargin, badDebt, fundingPayment)
310310 }
311311
312312
313313 func swapOutput (_isAdd,_baseAssetAmount) = {
314314 let _quoteAssetReserve = qtAstR()
315315 let _baseAssetReserve = bsAstR()
316316 if ((_baseAssetAmount == 0))
317317 then throw("Invalid base asset amount")
318318 else {
319319 let k = muld(_quoteAssetReserve, _baseAssetReserve)
320320 let baseAssetPoolAmountAfter = if (_isAdd)
321321 then (_baseAssetReserve + _baseAssetAmount)
322322 else (_baseAssetReserve - _baseAssetAmount)
323323 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
324324 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetReserve))
325325 let $t01334713540 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
326326 let quoteAssetReserveAfter1 = $t01334713540._1
327327 let baseAssetReserveAfter1 = $t01334713540._2
328328 let totalPositionSizeAfter1 = $t01334713540._3
329329 let cumulativeNotionalAfter1 = $t01334713540._4
330330 $Tuple7(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1, (totalLongPositionSize() - (if (_isAdd)
331331 then abs(_baseAssetAmount)
332332 else 0)), (totalShortPositionSize() - (if (!(_isAdd))
333333 then abs(_baseAssetAmount)
334334 else 0)))
335335 }
336336 }
337337
338338
339339 func getOracleTwapPrice () = {
340340 let oracle = valueOrErrorMessage(addressFromString(getStringValue(this, k_ora)), "")
341341 let priceKey = getStringValue(this, k_ora_key)
342342 let blockKey = getStringValue(this, k_ora_block_key)
343343 let lastValue = getIntegerValue(oracle, priceKey)
344344 lastValue
345345 }
346346
347347
348348 func getSpotPrice () = {
349349 let _quoteAssetReserve = qtAstR()
350350 let _baseAssetReserve = bsAstR()
351351 divd(_quoteAssetReserve, _baseAssetReserve)
352352 }
353353
354354
355355 func isOverFluctuationLimit () = {
356356 let oraclePrice = getOracleTwapPrice()
357357 let currentPrice = getSpotPrice()
358358 (divd(abs((oraclePrice - currentPrice)), oraclePrice) > spreadLimit())
359359 }
360360
361361
362362 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
363363 let $t01517215300 = getPosition(_trader)
364364 let positionSize = $t01517215300._1
365365 let positionMargin = $t01517215300._2
366366 let positionOpenNotional = $t01517215300._3
367367 let positionLstUpdCPF = $t01517215300._4
368368 let positionSizeAbs = abs(positionSize)
369369 if ((positionSizeAbs == 0))
370370 then throw("Invalid position size")
371371 else {
372372 let isShort = (0 > positionSize)
373373 let positionNotional = if ((_option == PNL_OPTION_SPOT))
374374 then {
375375 let $t01554715654 = swapOutput(!(isShort), positionSizeAbs)
376376 let outPositionNotional = $t01554715654._1
377377 let x1 = $t01554715654._2
378378 let x2 = $t01554715654._3
379379 let x3 = $t01554715654._4
380380 outPositionNotional
381381 }
382382 else (positionSizeAbs * getOracleTwapPrice())
383383 let unrealizedPnl = if (isShort)
384384 then (positionOpenNotional - positionNotional)
385385 else (positionNotional - positionOpenNotional)
386386 $Tuple2(positionNotional, unrealizedPnl)
387387 }
388388 }
389389
390390
391391 func getMarginRatioByOption (_trader,_option) = {
392392 let $t01614916260 = getPosition(_trader)
393393 let positionSize = $t01614916260._1
394394 let positionMargin = $t01614916260._2
395395 let pon = $t01614916260._3
396396 let positionLstUpdCPF = $t01614916260._4
397397 let $t01626616359 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
398398 let positionNotional = $t01626616359._1
399399 let unrealizedPnl = $t01626616359._2
400400 let $t01636416530 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
401401 let remainMargin = $t01636416530._1
402402 let badDebt = $t01636416530._2
403403 divd((remainMargin - badDebt), positionNotional)
404404 }
405405
406406
407407 func getMarginRatio (_trader) = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
408408
409409
410410 func internalClosePosition (_trader) = {
411411 let $t01683616947 = getPosition(_trader)
412412 let positionSize = $t01683616947._1
413413 let positionMargin = $t01683616947._2
414414 let pon = $t01683616947._3
415415 let positionLstUpdCPF = $t01683616947._4
416416 let $t01695317040 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
417417 let x1 = $t01695317040._1
418418 let unrealizedPnl = $t01695317040._2
419419 let $t01704517213 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
420420 let remainMargin = $t01704517213._1
421421 let badDebt = $t01704517213._2
422422 let exchangedPositionSize = -(positionSize)
423423 let realizedPnl = unrealizedPnl
424424 let marginToVault = -(remainMargin)
425425 let $t01734017621 = swapOutput((positionSize > 0), abs(positionSize))
426426 let exchangedQuoteAssetAmount = $t01734017621._1
427427 let quoteAssetReserveAfter = $t01734017621._2
428428 let baseAssetReserveAfter = $t01734017621._3
429429 let totalPositionSizeAfter = $t01734017621._4
430430 let cumulativeNotionalAfter = $t01734017621._5
431431 let totalLongAfter = $t01734017621._6
432432 let totalShortAfter = $t01734017621._7
433433 let openInterestNotionalAfter = (openInterestNotional() - pon)
434434 $Tuple12(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter)
435435 }
436436
437437
438438 func getTwapSpotPrice () = {
439439 let minuteId = ((lastBlock.timestamp / 1000) / 60)
440440 let startMinuteId = (minuteId - TWAP_INTERVAL)
441441 let listStr = valueOrElse(getString(this, k_lastDataStr), "")
442442 let list = split(listStr, ",")
443443 func filterFn (accumulator,next) = if ((startMinuteId >= parseIntValue(next)))
444444 then (accumulator :+ parseIntValue(next))
445445 else accumulator
446446
447447 let listF = {
448448 let $l = list
449449 let $s = size($l)
450450 let $acc0 = nil
451451 func $f0_1 ($a,$i) = if (($i >= $s))
452452 then $a
453453 else filterFn($a, $l[$i])
454454
455455 func $f0_2 ($a,$i) = if (($i >= $s))
456456 then $a
457457 else throw("List size exceeds 20")
458458
459459 $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)
460460 }
461461 let maxIndex = if ((size(listF) > 0))
462462 then max(listF)
463463 else parseIntValue(list[0])
464464 let lastMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
465465 let endLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(lastMinuteId))), 0)
466466 let endLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(lastMinuteId))), 0)
467467 let nowCumulativePrice = (endLastCumulativePrice + ((minuteId - lastMinuteId) * endLastPrice))
468468 let startLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(maxIndex))), 0)
469469 let startLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(maxIndex))), 0)
470470 let startCumulativePrice = (startLastCumulativePrice + ((startMinuteId - maxIndex) * startLastPrice))
471471 ((nowCumulativePrice - startCumulativePrice) / TWAP_INTERVAL)
472472 }
473473
474474
475475 func updateSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact) = [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)]
476476
477477
478478 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)]
479479
480480
481481 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)]
482482
483483
484484 func appendTwap (price) = {
485485 let minuteId = ((lastBlock.timestamp / 1000) / 60)
486486 let previousMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
487487 if ((previousMinuteId > minuteId))
488488 then throw("TWAP out-of-order")
489489 else {
490490 let lastMinuteId = if ((previousMinuteId == 0))
491491 then minuteId
492492 else previousMinuteId
493493 let listStr = valueOrElse(getString(this, k_lastDataStr), "")
494494 let oldList = split(listStr, ",")
495495 let list = if ((size(oldList) > TWAP_INTERVAL))
496496 then (removeByIndex(oldList, 0) :+ toString(minuteId))
497497 else (oldList :+ toString(minuteId))
498498 let prevCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(previousMinuteId))), 0)
499499 let prevPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(previousMinuteId))), price)
500500 let lastCumulativePrice = (prevCumulativePrice + ((minuteId - lastMinuteId) * prevPrice))
501501 func join (accumulator,val) = ((accumulator + val) + ",")
502502
503503 let newListStr = {
504504 let $l = list
505505 let $s = size($l)
506506 let $acc0 = ""
507507 func $f0_1 ($a,$i) = if (($i >= $s))
508508 then $a
509509 else join($a, $l[$i])
510510
511511 func $f0_2 ($a,$i) = if (($i >= $s))
512512 then $a
513513 else throw("List size exceeds 20")
514514
515515 $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)
516516 }
517517 let newListStrU = dropRight(newListStr, 1)
518518 let newListStrR = if ((take(newListStrU, 1) == ","))
519519 then drop(newListStrU, 1)
520520 else newListStrU
521521 [IntegerEntry(((k_twapDataLastCumulativePrice + "_") + toString(minuteId)), lastCumulativePrice), IntegerEntry(((k_twapDataLastPrice + "_") + toString(minuteId)), price), IntegerEntry(k_lastMinuteId, minuteId), StringEntry(k_lastDataStr, newListStrR)]
522522 }
523523 }
524524
525525
526526 func updateAmm (_qtAstR,_bsAstR,_totalPositionSizeAfter,_cumulativeNotionalAfter,_openInterestNotional,_totalLongPositionSize,_totalShortPositionSize) = if (((_totalLongPositionSize - _totalShortPositionSize) != _totalPositionSizeAfter))
527527 then throw(((((("Invalid AMM state data: " + toString(_totalLongPositionSize)) + " + ") + toString(_totalShortPositionSize)) + " != ") + toString(_totalPositionSizeAfter)))
528528 else ([IntegerEntry(k_quoteAssetReserve, _qtAstR), IntegerEntry(k_baseAssetReserve, _bsAstR), IntegerEntry(k_totalPositionSize, _totalPositionSizeAfter), IntegerEntry(k_cumulativeNotional, _cumulativeNotionalAfter), IntegerEntry(k_openInterestNotional, _openInterestNotional), IntegerEntry(k_totalLongPositionSize, _totalLongPositionSize), IntegerEntry(k_totalShortPositionSize, _totalShortPositionSize)] ++ appendTwap(divd(_qtAstR, _bsAstR)))
529529
530530
531531 func deletePosition (_address) = [DeleteEntry(toCompositeKey(k_positionSize, _address)), DeleteEntry(toCompositeKey(k_positionMargin, _address)), DeleteEntry(toCompositeKey(k_positionOpenNotional, _address)), DeleteEntry(toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _address))]
532532
533533
534534 func withdraw (_address,_amount) = {
535535 let balance = assetBalance(this, quoteAsset())
536536 if ((_amount > balance))
537537 then throw(((("Unable to withdraw " + toString(_amount)) + " from contract balance ") + toString(balance)))
538538 else [ScriptTransfer(_address, _amount, quoteAsset())]
539539 }
540540
541541
542542 func updateBalance (i) = if ((0 > i))
543543 then throw("Balance")
544544 else [IntegerEntry(k_balance, i)]
545545
546546
547547 func transferFee (i) = [ScriptTransfer(stakingAddress(), i, quoteAsset())]
548548
549549
550550 @Callable(i)
551551 func pause () = if ((i.caller != adminAddress()))
552552 then throw("Invalid togglePause params")
553553 else [BooleanEntry(k_paused, true)]
554554
555555
556556
557557 @Callable(i)
558558 func unpause () = if ((i.caller != adminAddress()))
559559 then throw("Invalid togglePause params")
560560 else [BooleanEntry(k_paused, false)]
561561
562562
563563
564564 @Callable(i)
565565 func changeSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact) = if ((i.caller != adminAddress()))
566566 then throw("Invalid changeSettings params")
567567 else updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact)
568568
569569
570570
571571 @Callable(i)
572572 func initialize (_qtAstR,_bsAstR,_fundingPeriod,_initMarginRatio,_mmr,_liquidationFeeRatio,_fee,_oracle,_oracleKey,_coordinator,_spreadLimit,_maxPriceImpact) = if (if (if (if (if (if (if (if (if (if ((0 >= _qtAstR))
573573 then true
574574 else (0 >= _bsAstR))
575575 then true
576576 else (0 >= _fundingPeriod))
577577 then true
578578 else (0 >= _initMarginRatio))
579579 then true
580580 else (0 >= _mmr))
581581 then true
582582 else (0 >= _liquidationFeeRatio))
583583 then true
584584 else (0 >= _fee))
585585 then true
586586 else (0 >= _spreadLimit))
587587 then true
588588 else (0 >= _maxPriceImpact))
589589 then true
590590 else initialized())
591591 then throw("Invalid initialize parameters")
592592 else ((((updateAmm(_qtAstR, _bsAstR, 0, 0, 0, 0, 0) ++ updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact)) ++ 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_coordinatorAddress, _coordinator)])
593593
594594
595595
596596 @Callable(i)
597-func decreasePosition (_direction,_amount,_leverage,_minBaseAssetAmount) = if (if (if (if (if (if (if (if ((_direction != DIR_LONG))
598- then (_direction != DIR_SHORT)
599- else false)
600- then true
601- else (0 >= _amount))
597+func decreasePosition (_amount,_leverage,_minBaseAssetAmount) = if (if (if (if (if (if ((0 >= _amount))
602598 then true
603599 else if (((1 * DECIMAL_UNIT) > _leverage))
604600 then true
605601 else (_leverage > (3 * DECIMAL_UNIT)))
606602 then true
607603 else !(initialized()))
608604 then true
609605 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
610606 then true
611607 else !(requireOpenPosition(toString(i.caller))))
612608 then true
613609 else paused())
614610 then throw("Invalid decreasePosition parameters")
615611 else {
616- let $t02680126953 = getPosition(toString(i.caller))
617- let oldPositionSize = $t02680126953._1
618- let oldPositionMargin = $t02680126953._2
619- let oldPositionOpenNotional = $t02680126953._3
620- let oldPositionLstUpdCPF = $t02680126953._4
621- let expandExisting = if ((oldPositionSize > 0))
622- then (_direction == DIR_LONG)
623- else (_direction == DIR_SHORT)
612+ let $t02672326875 = getPosition(toString(i.caller))
613+ let oldPositionSize = $t02672326875._1
614+ let oldPositionMargin = $t02672326875._2
615+ let oldPositionOpenNotional = $t02672326875._3
616+ let oldPositionLstUpdCPF = $t02672326875._4
617+ let _direction = if ((oldPositionSize > 0))
618+ then DIR_SHORT
619+ else DIR_LONG
624620 let isAdd = (_direction == DIR_LONG)
625- let $t02713730158 = if (expandExisting)
626- then throw("Use increasePosition to open new or increase position")
627- else {
628- let openNotional = muld(_amount, _leverage)
629- let $t02762627742 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
630- let oldPositionNotional = $t02762627742._1
631- let unrealizedPnl = $t02762627742._2
632- if ((oldPositionNotional > openNotional))
633- then {
634- let $t02780428034 = swapInput(isAdd, openNotional)
635- let exchangedPositionSize = $t02780428034._1
636- let quoteAssetReserveAfter = $t02780428034._2
637- let baseAssetReserveAfter = $t02780428034._3
638- let totalPositionSizeAfter = $t02780428034._4
639- let cumulativeNotionalAfter = $t02780428034._5
640- let exchangedPositionSizeAbs = abs(exchangedPositionSize)
641- if (if ((_minBaseAssetAmount != 0))
642- then (_minBaseAssetAmount > exchangedPositionSizeAbs)
643- else false)
644- then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
645- else {
646- let realizedPnl = if ((oldPositionSize != 0))
647- then divd(muld(unrealizedPnl, exchangedPositionSizeAbs), oldPositionSize)
648- else 0
649- let $t02857428831 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
650- let remainMargin = $t02857428831._1
651- let badDebt = $t02857428831._2
652- let fundingPayment = $t02857428831._3
653- let exchangedQuoteAssetAmount = openNotional
654- let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
655- let remainOpenNotional = if ((oldPositionSize > 0))
656- then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
657- else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
658- let newPositionSize = (oldPositionSize + exchangedPositionSize)
659- $Tuple11(newPositionSize, remainMargin, abs(remainOpenNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() - openNotional), (totalLongPositionSize() - (if ((newPositionSize > 0))
660- then abs(exchangedPositionSize)
661- else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
662- then abs(exchangedPositionSize)
663- else 0)))
664- }
621+ let openNotional = muld(_amount, _leverage)
622+ let $t02704827164 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
623+ let oldPositionNotional = $t02704827164._1
624+ let unrealizedPnl = $t02704827164._2
625+ let $t02717029804 = if ((oldPositionNotional > openNotional))
626+ then {
627+ let $t02754727766 = swapInput(isAdd, openNotional)
628+ let exchangedPositionSize = $t02754727766._1
629+ let quoteAssetReserveAfter = $t02754727766._2
630+ let baseAssetReserveAfter = $t02754727766._3
631+ let totalPositionSizeAfter = $t02754727766._4
632+ let cumulativeNotionalAfter = $t02754727766._5
633+ let exchangedPositionSizeAbs = abs(exchangedPositionSize)
634+ if (if ((_minBaseAssetAmount != 0))
635+ then (_minBaseAssetAmount > exchangedPositionSizeAbs)
636+ else false)
637+ then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
638+ else {
639+ let realizedPnl = if ((oldPositionSize != 0))
640+ then divd(muld(unrealizedPnl, exchangedPositionSizeAbs), oldPositionSize)
641+ else 0
642+ let $t02828828533 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
643+ let remainMargin = $t02828828533._1
644+ let badDebt = $t02828828533._2
645+ let fundingPayment = $t02828828533._3
646+ let exchangedQuoteAssetAmount = openNotional
647+ let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
648+ let remainOpenNotional = if ((oldPositionSize > 0))
649+ then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
650+ else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
651+ let newPositionSize = (oldPositionSize + exchangedPositionSize)
652+ $Tuple11(newPositionSize, remainMargin, abs(remainOpenNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() - openNotional), (totalLongPositionSize() - (if ((newPositionSize > 0))
653+ then abs(exchangedPositionSize)
654+ else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
655+ then abs(exchangedPositionSize)
656+ else 0)))
665657 }
666- else throw("Close position first")
667658 }
668- let newPositionSize = $t02713730158._1
669- let newPositionRemainMargin = $t02713730158._2
670- let newPositionOpenNotional = $t02713730158._3
671- let newPositionLatestCPF = $t02713730158._4
672- let baseAssetReserveAfter = $t02713730158._5
673- let quoteAssetReserveAfter = $t02713730158._6
674- let totalPositionSizeAfter = $t02713730158._7
675- let cumulativeNotionalAfter = $t02713730158._8
676- let openInterestNotionalAfter = $t02713730158._9
677- let totalLongAfter = $t02713730158._10
678- let totalShortAfter = $t02713730158._11
659+ else throw("Close position first")
660+ let newPositionSize = $t02717029804._1
661+ let newPositionRemainMargin = $t02717029804._2
662+ let newPositionOpenNotional = $t02717029804._3
663+ let newPositionLatestCPF = $t02717029804._4
664+ let baseAssetReserveAfter = $t02717029804._5
665+ let quoteAssetReserveAfter = $t02717029804._6
666+ let totalPositionSizeAfter = $t02717029804._7
667+ let cumulativeNotionalAfter = $t02717029804._8
668+ let openInterestNotionalAfter = $t02717029804._9
669+ let totalLongAfter = $t02717029804._10
670+ let totalShortAfter = $t02717029804._11
679671 (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter))
680672 }
681673
682674
683675
684676 @Callable(i)
685677 func increasePosition (_direction,_leverage,_minBaseAssetAmount) = {
686678 let _rawAmount = i.payments[0].amount
687679 if (if (if (if (if (if (if (if ((_direction != DIR_LONG))
688680 then (_direction != DIR_SHORT)
689681 else false)
690682 then true
691683 else (0 >= _rawAmount))
692684 then true
693685 else if (((1 * DECIMAL_UNIT) > _leverage))
694686 then true
695687 else (_leverage > (3 * DECIMAL_UNIT)))
696688 then true
697689 else !(initialized()))
698690 then true
699691 else (i.payments[0].assetId != quoteAsset()))
700692 then true
701693 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
702694 then true
703695 else paused())
704696 then throw("Invalid increasePosition parameters")
705697 else {
706698 let feeAmount = muld(_rawAmount, fee())
707699 let _amount = (_rawAmount - feeAmount)
708- let $t03119431318 = getPosition(toString(i.caller))
709- let oldPositionSize = $t03119431318._1
710- let oldPositionMargin = $t03119431318._2
711- let oldPositionOpenNotional = $t03119431318._3
700+ let $t03084030992 = getPosition(toString(i.caller))
701+ let oldPositionSize = $t03084030992._1
702+ let oldPositionMargin = $t03084030992._2
703+ let oldPositionOpenNotional = $t03084030992._3
704+ let oldPositionLstUpdCPF = $t03084030992._4
712705 let isNewPosition = (oldPositionSize == 0)
713706 let isSameDirection = if ((oldPositionSize > 0))
714707 then (_direction == DIR_LONG)
715708 else (_direction == DIR_SHORT)
716709 let expandExisting = if (!(isNewPosition))
717710 then isSameDirection
718711 else false
719712 let isAdd = (_direction == DIR_LONG)
720- let $t03160734160 = if (if (isNewPosition)
713+ let $t03128133670 = if (if (isNewPosition)
721714 then true
722715 else expandExisting)
723716 then {
724717 let openNotional = muld(_amount, _leverage)
725- let $t03203132237 = swapInput(isAdd, openNotional)
726- let amountBaseAssetBought = $t03203132237._1
727- let quoteAssetReserveAfter = $t03203132237._2
728- let baseAssetReserveAfter = $t03203132237._3
729- let totalPositionSizeAfter = $t03203132237._4
730- let cumulativeNotionalAfter = $t03203132237._5
718+ let $t03170531911 = swapInput(isAdd, openNotional)
719+ let amountBaseAssetBought = $t03170531911._1
720+ let quoteAssetReserveAfter = $t03170531911._2
721+ let baseAssetReserveAfter = $t03170531911._3
722+ let totalPositionSizeAfter = $t03170531911._4
723+ let cumulativeNotionalAfter = $t03170531911._5
731724 if (if ((_minBaseAssetAmount != 0))
732725 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
733726 else false)
734727 then throw(((("Limit error: " + toString(abs(amountBaseAssetBought))) + " < ") + toString(_minBaseAssetAmount)))
735728 else {
736729 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
737- let positionLstUpdCPF = if (isNewPosition)
738- then latestCumulativePremiumFraction(newPositionSize)
739- else getPosition(toString(i.caller))._4
740730 let increaseMarginRequirement = divd(openNotional, _leverage)
741- let $t03278533021 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, positionLstUpdCPF, increaseMarginRequirement)
742- let remainMargin = $t03278533021._1
743- let x1 = $t03278533021._2
744- let x2 = $t03278533021._3
731+ let $t03229232531 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
732+ let remainMargin = $t03229232531._1
733+ let x1 = $t03229232531._2
734+ let x2 = $t03229232531._3
745735 $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
746736 then abs(amountBaseAssetBought)
747737 else 0)), (totalShortPositionSize() + (if ((0 > newPositionSize))
748738 then abs(amountBaseAssetBought)
749739 else 0)))
750740 }
751741 }
752742 else {
753743 let openNotional = muld(_amount, _leverage)
754- let $t03385333969 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
755- let oldPositionNotional = $t03385333969._1
756- let unrealizedPnl = $t03385333969._2
744+ let $t03336333479 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
745+ let oldPositionNotional = $t03336333479._1
746+ let unrealizedPnl = $t03336333479._2
757747 if ((oldPositionNotional > openNotional))
758748 then throw("Use decreasePosition to decrease position size")
759749 else throw("Close position first")
760750 }
761- let newPositionSize = $t03160734160._1
762- let newPositionRemainMargin = $t03160734160._2
763- let newPositionOpenNotional = $t03160734160._3
764- let newPositionLatestCPF = $t03160734160._4
765- let baseAssetReserveAfter = $t03160734160._5
766- let quoteAssetReserveAfter = $t03160734160._6
767- let totalPositionSizeAfter = $t03160734160._7
768- let cumulativeNotionalAfter = $t03160734160._8
769- let openInterestNotionalAfter = $t03160734160._9
770- let totalLongAfter = $t03160734160._10
771- let totalShortAfter = $t03160734160._11
751+ let newPositionSize = $t03128133670._1
752+ let newPositionRemainMargin = $t03128133670._2
753+ let newPositionOpenNotional = $t03128133670._3
754+ let newPositionLatestCPF = $t03128133670._4
755+ let baseAssetReserveAfter = $t03128133670._5
756+ let quoteAssetReserveAfter = $t03128133670._6
757+ let totalPositionSizeAfter = $t03128133670._7
758+ let cumulativeNotionalAfter = $t03128133670._8
759+ let openInterestNotionalAfter = $t03128133670._9
760+ let totalLongAfter = $t03128133670._10
761+ let totalShortAfter = $t03128133670._11
772762 let feeToStakers = (feeAmount / 2)
773763 let feeToInsurance = (feeAmount - feeToStakers)
774764 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
775765 if ((stake == stake))
776766 then {
777767 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
778768 if ((depositInsurance == depositInsurance))
779769 then (((updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
780770 else throw("Strict value is not equal to itself.")
781771 }
782772 else throw("Strict value is not equal to itself.")
783773 }
784774 }
785775
786776
787777
788778 @Callable(i)
789779 func addMargin () = {
790780 let _rawAmount = i.payments[0].amount
791781 if (if (if (if ((i.payments[0].assetId != quoteAsset()))
792782 then true
793783 else !(requireOpenPosition(toString(i.caller))))
794784 then true
795785 else !(initialized()))
796786 then true
797787 else paused())
798788 then throw("Invalid addMargin parameters")
799789 else {
800790 let feeAmount = muld(_rawAmount, fee())
801791 let _amount = (_rawAmount - feeAmount)
802- let $t03543635588 = getPosition(toString(i.caller))
803- let oldPositionSize = $t03543635588._1
804- let oldPositionMargin = $t03543635588._2
805- let oldPositionOpenNotional = $t03543635588._3
806- let oldPositionLstUpdCPF = $t03543635588._4
792+ let $t03494635098 = getPosition(toString(i.caller))
793+ let oldPositionSize = $t03494635098._1
794+ let oldPositionMargin = $t03494635098._2
795+ let oldPositionOpenNotional = $t03494635098._3
796+ let oldPositionLstUpdCPF = $t03494635098._4
807797 let feeToStakers = (feeAmount / 2)
808798 let feeToInsurance = (feeAmount - feeToStakers)
809799 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
810800 if ((stake == stake))
811801 then {
812802 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
813803 if ((depositInsurance == depositInsurance))
814804 then ((updatePosition(toString(i.caller), oldPositionSize, (oldPositionMargin + _amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
815805 else throw("Strict value is not equal to itself.")
816806 }
817807 else throw("Strict value is not equal to itself.")
818808 }
819809 }
820810
821811
822812
823813 @Callable(i)
824814 func removeMargin (_amount) = if (if (if (if ((0 >= _amount))
825815 then true
826816 else !(requireOpenPosition(toString(i.caller))))
827817 then true
828818 else !(initialized()))
829819 then true
830820 else paused())
831821 then throw("Invalid removeMargin parameters")
832822 else {
833- let $t03650836660 = getPosition(toString(i.caller))
834- let oldPositionSize = $t03650836660._1
835- let oldPositionMargin = $t03650836660._2
836- let oldPositionOpenNotional = $t03650836660._3
837- let oldPositionLstUpdCPF = $t03650836660._4
823+ let $t03601836170 = getPosition(toString(i.caller))
824+ let oldPositionSize = $t03601836170._1
825+ let oldPositionMargin = $t03601836170._2
826+ let oldPositionOpenNotional = $t03601836170._3
827+ let oldPositionLstUpdCPF = $t03601836170._4
838828 let marginDelta = -(_amount)
839- let $t03669736876 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
840- let remainMargin = $t03669736876._1
841- let badDebt = $t03669736876._2
829+ let $t03620736386 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
830+ let remainMargin = $t03620736386._1
831+ let badDebt = $t03620736386._2
842832 if ((badDebt != 0))
843833 then throw("Invalid added margin amount")
844834 else {
845835 let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [_amount, toBase58String(quoteAsset())], nil)
846836 if ((unstake == unstake))
847837 then ((updatePosition(toString(i.caller), oldPositionSize, remainMargin, oldPositionOpenNotional, latestCumulativePremiumFraction(oldPositionSize)) ++ withdraw(i.caller, _amount)) ++ updateBalance((cbalance() - _amount)))
848838 else throw("Strict value is not equal to itself.")
849839 }
850840 }
851841
852842
853843
854844 @Callable(i)
855845 func closePosition () = if (if (if (!(requireOpenPosition(toString(i.caller))))
856846 then true
857847 else !(initialized()))
858848 then true
859849 else paused())
860850 then throw("Invalid closePosition parameters")
861851 else {
862- let $t03763638020 = internalClosePosition(toString(i.caller))
863- let x1 = $t03763638020._1
864- let positionBadDebt = $t03763638020._2
865- let realizedPnl = $t03763638020._3
866- let marginToVault = $t03763638020._4
867- let quoteAssetReserveAfter = $t03763638020._5
868- let baseAssetReserveAfter = $t03763638020._6
869- let totalPositionSizeAfter = $t03763638020._7
870- let cumulativeNotionalAfter = $t03763638020._8
871- let openInterestNotionalAfter = $t03763638020._9
872- let x2 = $t03763638020._10
873- let totalLongAfter = $t03763638020._11
874- let totalShortAfter = $t03763638020._12
852+ let $t03714637530 = internalClosePosition(toString(i.caller))
853+ let x1 = $t03714637530._1
854+ let positionBadDebt = $t03714637530._2
855+ let realizedPnl = $t03714637530._3
856+ let marginToVault = $t03714637530._4
857+ let quoteAssetReserveAfter = $t03714637530._5
858+ let baseAssetReserveAfter = $t03714637530._6
859+ let totalPositionSizeAfter = $t03714637530._7
860+ let cumulativeNotionalAfter = $t03714637530._8
861+ let openInterestNotionalAfter = $t03714637530._9
862+ let x2 = $t03714637530._10
863+ let totalLongAfter = $t03714637530._11
864+ let totalShortAfter = $t03714637530._12
875865 if ((positionBadDebt > 0))
876866 then throw("Unable to close position with bad debt")
877867 else {
878868 let withdrawAmount = abs(marginToVault)
879869 let ammBalance = (cbalance() - withdrawAmount)
880- let $t03822938371 = if ((0 > ammBalance))
870+ let $t03773937881 = if ((0 > ammBalance))
881871 then $Tuple2(0, abs(ammBalance))
882872 else $Tuple2(ammBalance, 0)
883- let ammNewBalance = $t03822938371._1
884- let getFromInsurance = $t03822938371._2
873+ let ammNewBalance = $t03773937881._1
874+ let getFromInsurance = $t03773937881._2
885875 let x = if ((getFromInsurance > 0))
886876 then {
887877 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil)
888878 if ((withdrawInsurance == withdrawInsurance))
889879 then nil
890880 else throw("Strict value is not equal to itself.")
891881 }
892882 else nil
893883 if ((x == x))
894884 then {
895885 let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(withdrawAmount - getFromInsurance), toBase58String(quoteAsset())], nil)
896886 if ((unstake == unstake))
897887 then (((deletePosition(toString(i.caller)) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, withdrawAmount)) ++ updateBalance(ammNewBalance))
898888 else throw("Strict value is not equal to itself.")
899889 }
900890 else throw("Strict value is not equal to itself.")
901891 }
902892 }
903893
904894
905895
906896 @Callable(i)
907897 func liquidate (_trader) = {
908898 let marginRatio = if (isOverFluctuationLimit())
909899 then getMarginRatioByOption(_trader, PNL_OPTION_ORACLE)
910900 else getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
911901 if (if (if (if (!(requireMoreMarginRatio(marginRatio, maintenanceMarginRatio(), false)))
912902 then true
913903 else !(requireOpenPosition(_trader)))
914904 then true
915905 else !(initialized()))
916906 then true
917907 else paused())
918908 then throw("Unable to liquidate")
919909 else {
920- let $t03981040237 = internalClosePosition(_trader)
921- let x1 = $t03981040237._1
922- let badDebt = $t03981040237._2
923- let x2 = $t03981040237._3
924- let marginToVault = $t03981040237._4
925- let quoteAssetReserveAfter = $t03981040237._5
926- let baseAssetReserveAfter = $t03981040237._6
927- let totalPositionSizeAfter = $t03981040237._7
928- let cumulativeNotionalAfter = $t03981040237._8
929- let openInterestNotionalAfter = $t03981040237._9
930- let exchangedQuoteAssetAmount = $t03981040237._10
931- let totalLongAfter = $t03981040237._11
932- let totalShortAfter = $t03981040237._12
910+ let $t03932039747 = internalClosePosition(_trader)
911+ let x1 = $t03932039747._1
912+ let badDebt = $t03932039747._2
913+ let x2 = $t03932039747._3
914+ let marginToVault = $t03932039747._4
915+ let quoteAssetReserveAfter = $t03932039747._5
916+ let baseAssetReserveAfter = $t03932039747._6
917+ let totalPositionSizeAfter = $t03932039747._7
918+ let cumulativeNotionalAfter = $t03932039747._8
919+ let openInterestNotionalAfter = $t03932039747._9
920+ let exchangedQuoteAssetAmount = $t03932039747._10
921+ let totalLongAfter = $t03932039747._11
922+ let totalShortAfter = $t03932039747._12
933923 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
934924 let feeToLiquidator = (liquidationPenalty / 2)
935925 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
936926 let ammBadDebt = (cbalance() - liquidationPenalty)
937- let $t04063540770 = if ((0 > ammBadDebt))
927+ let $t04014540280 = if ((0 > ammBadDebt))
938928 then $Tuple2(0, abs(ammBadDebt))
939929 else $Tuple2(ammBadDebt, 0)
940- let newAmmBalance = $t04063540770._1
941- let takeFromInsurance = $t04063540770._2
930+ let newAmmBalance = $t04014540280._1
931+ let takeFromInsurance = $t04014540280._2
942932 let x = if ((takeFromInsurance > 0))
943933 then {
944934 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
945935 if ((withdrawInsurance == withdrawInsurance))
946936 then nil
947937 else throw("Strict value is not equal to itself.")
948938 }
949939 else nil
950940 if ((x == x))
951941 then {
952942 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
953943 if ((depositInsurance == depositInsurance))
954944 then {
955945 let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(feeToLiquidator - takeFromInsurance), toBase58String(quoteAsset())], nil)
956946 if ((unstake == unstake))
957947 then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(ammBadDebt))
958948 else throw("Strict value is not equal to itself.")
959949 }
960950 else throw("Strict value is not equal to itself.")
961951 }
962952 else throw("Strict value is not equal to itself.")
963953 }
964954 }
965955
966956
967957
968958 @Callable(i)
969959 func payFunding () = {
970960 let fundingBlockTimestamp = nextFundingBlockTimestamp()
971961 if (if (if ((fundingBlockTimestamp > lastBlock.timestamp))
972962 then true
973963 else !(initialized()))
974964 then true
975965 else paused())
976966 then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp)))
977967 else {
978968 let underlyingPrice = getOracleTwapPrice()
979969 let spotTwapPrice = getTwapSpotPrice()
980970 let premium = (spotTwapPrice - underlyingPrice)
981- let $t04214043475 = if (if ((totalShortPositionSize() == 0))
971+ let $t04165042985 = if (if ((totalShortPositionSize() == 0))
982972 then true
983973 else (totalLongPositionSize() == 0))
984974 then $Tuple2(0, 0)
985975 else if ((0 > premium))
986976 then {
987977 let shortPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
988978 let longPremiumFraction = divd(muld(shortPremiumFraction, totalShortPositionSize()), totalLongPositionSize())
989979 $Tuple2(shortPremiumFraction, longPremiumFraction)
990980 }
991981 else {
992982 let longPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
993983 let shortPremiumFraction = divd(muld(longPremiumFraction, totalLongPositionSize()), totalShortPositionSize())
994984 $Tuple2(shortPremiumFraction, longPremiumFraction)
995985 }
996- let shortPremiumFraction = $t04214043475._1
997- let longPremiumFraction = $t04214043475._2
986+ let shortPremiumFraction = $t04165042985._1
987+ let longPremiumFraction = $t04165042985._2
998988 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
999989 }
1000990 }
1001991
1002992
1003993
1004994 @Callable(i)
1005995 func v_get (_trader) = {
1006- let $t04385043903 = internalClosePosition(_trader)
1007- let x1 = $t04385043903._1
1008- let x2 = $t04385043903._2
1009- let x3 = $t04385043903._3
1010- let x4 = $t04385043903._4
996+ let $t04336043413 = internalClosePosition(_trader)
997+ let x1 = $t04336043413._1
998+ let x2 = $t04336043413._2
999+ let x3 = $t04336043413._3
1000+ let x4 = $t04336043413._4
10111001 throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader))))
10121002 }
10131003
10141004
10151005
10161006 @Callable(i)
10171007 func view_calcRemainMarginWithFundingPayment (_trader) = {
1018- let $t04405044161 = getPosition(_trader)
1019- let positionSize = $t04405044161._1
1020- let positionMargin = $t04405044161._2
1021- let pon = $t04405044161._3
1022- let positionLstUpdCPF = $t04405044161._4
1023- let $t04416644267 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1024- let positionNotional = $t04416644267._1
1025- let unrealizedPnl = $t04416644267._2
1026- let $t04427244454 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1027- let remainMargin = $t04427244454._1
1028- let badDebt = $t04427244454._2
1029- let fundingPayment = $t04427244454._3
1008+ let $t04356043671 = getPosition(_trader)
1009+ let positionSize = $t04356043671._1
1010+ let positionMargin = $t04356043671._2
1011+ let pon = $t04356043671._3
1012+ let positionLstUpdCPF = $t04356043671._4
1013+ let $t04367643777 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1014+ let positionNotional = $t04367643777._1
1015+ let unrealizedPnl = $t04367643777._2
1016+ let $t04378243964 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1017+ let remainMargin = $t04378243964._1
1018+ let badDebt = $t04378243964._2
1019+ let fundingPayment = $t04378243964._3
10301020 throw(((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))))
10311021 }
10321022
10331023
10341024 @Verifier(tx)
10351025 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], adminPublicKey())
10361026

github/deemru/w8io/026f985 
129.67 ms