tx · 4MarxRNPpAjvyt2fnpkfkkBtAGFVk72DFqQezVuHpFoC

3MuCofTkjmv397dEuRXE3pZxTb4zDWa96uo:  -0.06000000 Waves

2022.10.06 10:40 [2260168] smart account 3MuCofTkjmv397dEuRXE3pZxTb4zDWa96uo > SELF 0.00000000 Waves

{ "type": 13, "id": "4MarxRNPpAjvyt2fnpkfkkBtAGFVk72DFqQezVuHpFoC", "fee": 6000000, "feeAssetId": null, "timestamp": 1665042054642, "version": 2, "chainId": 84, "sender": "3MuCofTkjmv397dEuRXE3pZxTb4zDWa96uo", "senderPublicKey": "HGKkqEdKKPVXHMq25FyB6nm1kyvrixu1a8Av6wc9t5CG", "proofs": [ "2J8FLkVAxWVhinFYLCtJnFbMDP6fxsvuV6RYKyZBSmA1gyb4kt81kxBA1miYkYW6B3sNmVHDECLpbM2X4sVLAqp5" ], "script": "base64:BgJxCAISABIAEgMKAQESAwoBARILCgkBAQEBAQEBAQESEAoOAQEBAQEBAQgICAEBAQESAwoBARIFCgMBAQESBgoEAQEBCBIAEgMKAQESABIDCgEIEgASBAoCCAESAwoBARIAEgMKAQgSAwoBCBIDCgEBEgCKAQAJa19vcmFfa2V5AglrX29yYV9rZXkAD2tfb3JhX2Jsb2NrX2tleQIPa19vcmFfYmxvY2tfa2V5AAVrX29yYQIFa19vcmEACWtfYmFsYW5jZQIJa19iYWxhbmNlAA5rX3Bvc2l0aW9uU2l6ZQIOa19wb3NpdGlvblNpemUAEGtfcG9zaXRpb25NYXJnaW4CEGtfcG9zaXRpb25NYXJnaW4AFmtfcG9zaXRpb25PcGVuTm90aW9uYWwCFmtfcG9zaXRpb25PcGVuTm90aW9uYWwALmtfcG9zaXRpb25MYXN0VXBkYXRlZEN1bXVsYXRpdmVQcmVtaXVtRnJhY3Rpb24CEmtfcG9zaXRpb25GcmFjdGlvbgAUa19wb3NpdGlvbkNsb3NlZERhdGUCFGtfcG9zaXRpb25DbG9zZWREYXRlAA1rX2luaXRpYWxpemVkAg1rX2luaXRp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1GcmFjdGlvbgUPdW5kZXJseWluZ1ByaWNlCQACAQkArAICCQCsAgIJAKwCAgkBAXMBBQtsb25nRnVuZGluZwkBAXMBBQxzaG9ydEZ1bmRpbmcJAQFzAQkBEGdldFR3YXBTcG90UHJpY2UACQEBcwEJARJnZXRPcmFjbGVUd2FwUHJpY2UAAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAkBDmFkbWluUHVibGljS2V5ALiUUaw=", "height": 2260168, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7rWVsYp68MHdRkwTSJofPtbk9x3zucckaQywP5rD5kTA Next: Ce4SBkrUZwbiYwPfeJxvdQUbbU2J3DTeMiCyzrTN75qu Diff:
OldNewDifferences
9595
9696 let k_referral_address = "k_referral_address"
9797
98+let k_manager_address = "k_manager_address"
99+
98100 func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set")
99101
100102
123125
124126
125127 func referralAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_referral_address)), "Referral not set")
128+
129+
130+func managerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_manager_address)), "Manager not set")
126131
127132
128133 let DIR_LONG = 1
342347 let amountBaseAssetBought = if (_isAdd)
343348 then amountBaseAssetBoughtAbs
344349 else -(amountBaseAssetBoughtAbs)
345- let $t01281613009 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
346- let quoteAssetReserveAfter1 = $t01281613009._1
347- let baseAssetReserveAfter1 = $t01281613009._2
348- let totalPositionSizeAfter1 = $t01281613009._3
349- let cumulativeNotionalAfter1 = $t01281613009._4
350+ let $t01301913212 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
351+ let quoteAssetReserveAfter1 = $t01301913212._1
352+ let baseAssetReserveAfter1 = $t01301913212._2
353+ let totalPositionSizeAfter1 = $t01301913212._3
354+ let cumulativeNotionalAfter1 = $t01301913212._4
350355 let priceBefore = divd(_qtAstR, _bsAstR)
351356 let marketPrice = divd(_quoteAssetAmount, amountBaseAssetBoughtAbs)
352357 let priceDiff = abs((priceBefore - marketPrice))
366371 }
367372 else 0
368373 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
369- let $t01450014627 = if ((0 > signedMargin))
374+ let $t01470314830 = if ((0 > signedMargin))
370375 then $Tuple2(0, abs(signedMargin))
371376 else $Tuple2(abs(signedMargin), 0)
372- let remainMargin = $t01450014627._1
373- let badDebt = $t01450014627._2
377+ let remainMargin = $t01470314830._1
378+ let badDebt = $t01470314830._2
374379 $Tuple3(remainMargin, badDebt, fundingPayment)
375380 }
376381
387392 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
388393 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetReserve))
389394 let maxPriceImpactValue = maxPriceImpact()
390- let $t01560415797 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
391- let quoteAssetReserveAfter1 = $t01560415797._1
392- let baseAssetReserveAfter1 = $t01560415797._2
393- let totalPositionSizeAfter1 = $t01560415797._3
394- let cumulativeNotionalAfter1 = $t01560415797._4
395+ let $t01580716000 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
396+ let quoteAssetReserveAfter1 = $t01580716000._1
397+ let baseAssetReserveAfter1 = $t01580716000._2
398+ let totalPositionSizeAfter1 = $t01580716000._3
399+ let cumulativeNotionalAfter1 = $t01580716000._4
395400 let marketPrice = divd(quoteAssetSold, _baseAssetAmount)
396401 let priceDiff = abs((priceBefore - marketPrice))
397402 let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
450455 let isShort = (0 > _positionSize)
451456 let positionNotional = if ((_option == PNL_OPTION_SPOT))
452457 then {
453- let $t01901519186 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _baseAssetReserve)
454- let outPositionNotional = $t01901519186._1
455- let x1 = $t01901519186._2
456- let x2 = $t01901519186._3
457- let x3 = $t01901519186._4
458+ let $t01921819389 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _baseAssetReserve)
459+ let outPositionNotional = $t01921819389._1
460+ let x1 = $t01921819389._2
461+ let x2 = $t01921819389._3
462+ let x3 = $t01921819389._4
458463 outPositionNotional
459464 }
460465 else muld(positionSizeAbs, getOracleTwapPrice())
475480
476481
477482 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
478- let $t02050320631 = getPosition(_trader)
479- let positionSize = $t02050320631._1
480- let positionMargin = $t02050320631._2
481- let positionOpenNotional = $t02050320631._3
482- let positionLstUpdCPF = $t02050320631._4
483+ let $t02070620834 = getPosition(_trader)
484+ let positionSize = $t02070620834._1
485+ let positionMargin = $t02070620834._2
486+ let positionOpenNotional = $t02070620834._3
487+ let positionLstUpdCPF = $t02070620834._4
483488 getPositionNotionalAndUnrealizedPnlByValues(positionSize, positionOpenNotional, qtAstR(), bsAstR(), _option)
484489 }
485490
488493
489494
490495 func getMarginRatioByOption (_trader,_option) = {
491- let $t02111221223 = getPosition(_trader)
492- let positionSize = $t02111221223._1
493- let positionMargin = $t02111221223._2
494- let pon = $t02111221223._3
495- let positionLstUpdCPF = $t02111221223._4
496- let $t02122921322 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
497- let positionNotional = $t02122921322._1
498- let unrealizedPnl = $t02122921322._2
499- let $t02132721493 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
500- let remainMargin = $t02132721493._1
501- let badDebt = $t02132721493._2
496+ let $t02131521426 = getPosition(_trader)
497+ let positionSize = $t02131521426._1
498+ let positionMargin = $t02131521426._2
499+ let pon = $t02131521426._3
500+ let positionLstUpdCPF = $t02131521426._4
501+ let $t02143221525 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
502+ let positionNotional = $t02143221525._1
503+ let unrealizedPnl = $t02143221525._2
504+ let $t02153021696 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
505+ let remainMargin = $t02153021696._1
506+ let badDebt = $t02153021696._2
502507 calcMarginRatio(remainMargin, badDebt, positionNotional)
503508 }
504509
523528
524529
525530 func internalClosePosition (_trader,_checkMaxPriceImpact) = {
526- let $t02272622854 = getPosition(_trader)
527- let positionSize = $t02272622854._1
528- let positionMargin = $t02272622854._2
529- let positionOpenNotional = $t02272622854._3
530- let positionLstUpdCPF = $t02272622854._4
531+ let $t02292923057 = getPosition(_trader)
532+ let positionSize = $t02292923057._1
533+ let positionMargin = $t02292923057._2
534+ let positionOpenNotional = $t02292923057._3
535+ let positionLstUpdCPF = $t02292923057._4
531536 let unrealizedPnl = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)._2
532- let $t02294923117 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
533- let remainMargin = $t02294923117._1
534- let badDebt = $t02294923117._2
537+ let $t02315223320 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
538+ let remainMargin = $t02315223320._1
539+ let badDebt = $t02315223320._2
535540 let exchangedPositionSize = -(positionSize)
536541 let realizedPnl = unrealizedPnl
537542 let marginToVault = -(remainMargin)
538- let $t02324423555 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
539- let exchangedQuoteAssetAmount = $t02324423555._1
540- let quoteAssetReserveAfter = $t02324423555._2
541- let baseAssetReserveAfter = $t02324423555._3
542- let totalPositionSizeAfter = $t02324423555._4
543- let cumulativeNotionalAfter = $t02324423555._5
544- let totalLongAfter = $t02324423555._6
545- let totalShortAfter = $t02324423555._7
543+ let $t02344723758 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
544+ let exchangedQuoteAssetAmount = $t02344723758._1
545+ let quoteAssetReserveAfter = $t02344723758._2
546+ let baseAssetReserveAfter = $t02344723758._3
547+ let totalPositionSizeAfter = $t02344723758._4
548+ let cumulativeNotionalAfter = $t02344723758._5
549+ let totalLongAfter = $t02344723758._6
550+ let totalShortAfter = $t02344723758._7
546551 let openInterestNotionalAfter = (openInterestNotional() - positionOpenNotional)
547552 $Tuple12(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter)
548553 }
787792 else paused())
788793 then throw("Invalid decreasePosition parameters")
789794 else {
790- let $t03733137483 = getPosition(toString(i.caller))
791- let oldPositionSize = $t03733137483._1
792- let oldPositionMargin = $t03733137483._2
793- let oldPositionOpenNotional = $t03733137483._3
794- let oldPositionLstUpdCPF = $t03733137483._4
795+ let $t03753437686 = getPosition(toString(i.caller))
796+ let oldPositionSize = $t03753437686._1
797+ let oldPositionMargin = $t03753437686._2
798+ let oldPositionOpenNotional = $t03753437686._3
799+ let oldPositionLstUpdCPF = $t03753437686._4
795800 let _direction = if ((oldPositionSize > 0))
796801 then DIR_SHORT
797802 else DIR_LONG
798803 let isAdd = (_direction == DIR_LONG)
799804 let openNotional = muld(_amount, _leverage)
800- let $t03765637772 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
801- let oldPositionNotional = $t03765637772._1
802- let unrealizedPnl = $t03765637772._2
803- let $t03777840327 = if ((oldPositionNotional > openNotional))
805+ let $t03785937975 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
806+ let oldPositionNotional = $t03785937975._1
807+ let unrealizedPnl = $t03785937975._2
808+ let $t03798140530 = if ((oldPositionNotional > openNotional))
804809 then {
805- let $t03815538374 = swapInput(isAdd, openNotional)
806- let exchangedPositionSize = $t03815538374._1
807- let quoteAssetReserveAfter = $t03815538374._2
808- let baseAssetReserveAfter = $t03815538374._3
809- let totalPositionSizeAfter = $t03815538374._4
810- let cumulativeNotionalAfter = $t03815538374._5
810+ let $t03835838577 = swapInput(isAdd, openNotional)
811+ let exchangedPositionSize = $t03835838577._1
812+ let quoteAssetReserveAfter = $t03835838577._2
813+ let baseAssetReserveAfter = $t03835838577._3
814+ let totalPositionSizeAfter = $t03835838577._4
815+ let cumulativeNotionalAfter = $t03835838577._5
811816 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
812817 if (if ((_minBaseAssetAmount != 0))
813818 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
815820 then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
816821 else {
817822 let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), abs(oldPositionSize))
818- let $t03881139056 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
819- let remainMargin = $t03881139056._1
820- let badDebt = $t03881139056._2
821- let fundingPayment = $t03881139056._3
823+ let $t03901439259 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
824+ let remainMargin = $t03901439259._1
825+ let badDebt = $t03901439259._2
826+ let fundingPayment = $t03901439259._3
822827 let exchangedQuoteAssetAmount = openNotional
823828 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
824829 let remainOpenNotional = if ((oldPositionSize > 0))
833838 }
834839 }
835840 else throw("Close position first")
836- let newPositionSize = $t03777840327._1
837- let newPositionRemainMargin = $t03777840327._2
838- let newPositionOpenNotional = $t03777840327._3
839- let newPositionLatestCPF = $t03777840327._4
840- let baseAssetReserveAfter = $t03777840327._5
841- let quoteAssetReserveAfter = $t03777840327._6
842- let totalPositionSizeAfter = $t03777840327._7
843- let cumulativeNotionalAfter = $t03777840327._8
844- let openInterestNotionalAfter = $t03777840327._9
845- let totalLongAfter = $t03777840327._10
846- let totalShortAfter = $t03777840327._11
841+ let newPositionSize = $t03798140530._1
842+ let newPositionRemainMargin = $t03798140530._2
843+ let newPositionOpenNotional = $t03798140530._3
844+ let newPositionLatestCPF = $t03798140530._4
845+ let baseAssetReserveAfter = $t03798140530._5
846+ let quoteAssetReserveAfter = $t03798140530._6
847+ let totalPositionSizeAfter = $t03798140530._7
848+ let cumulativeNotionalAfter = $t03798140530._8
849+ let openInterestNotionalAfter = $t03798140530._9
850+ let totalLongAfter = $t03798140530._10
851+ let totalShortAfter = $t03798140530._11
847852 let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), newPositionOpenNotional], nil)
848853 if ((notifyNotional == notifyNotional))
849854 then (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter))
883888 }
884889 let _amount = (_rawAmount - rawFeeAmount)
885890 let feeAmount = (rawFeeAmount - referrerFee)
886- let $t04185641996 = getPosition(_trader)
887- let oldPositionSize = $t04185641996._1
888- let oldPositionMargin = $t04185641996._2
889- let oldPositionOpenNotional = $t04185641996._3
890- let oldPositionLstUpdCPF = $t04185641996._4
891+ let $t04205942199 = getPosition(_trader)
892+ let oldPositionSize = $t04205942199._1
893+ let oldPositionMargin = $t04205942199._2
894+ let oldPositionOpenNotional = $t04205942199._3
895+ let oldPositionLstUpdCPF = $t04205942199._4
891896 let isNewPosition = (oldPositionSize == 0)
892897 let isSameDirection = if ((oldPositionSize > 0))
893898 then (_direction == DIR_LONG)
896901 then isSameDirection
897902 else false
898903 let isAdd = (_direction == DIR_LONG)
899- let $t04228544853 = if (if (isNewPosition)
904+ let $t04248845056 = if (if (isNewPosition)
900905 then true
901906 else expandExisting)
902907 then {
903908 let openNotional = muld(_amount, _leverage)
904- let $t04270942915 = swapInput(isAdd, openNotional)
905- let amountBaseAssetBought = $t04270942915._1
906- let quoteAssetReserveAfter = $t04270942915._2
907- let baseAssetReserveAfter = $t04270942915._3
908- let totalPositionSizeAfter = $t04270942915._4
909- let cumulativeNotionalAfter = $t04270942915._5
909+ let $t04291243118 = swapInput(isAdd, openNotional)
910+ let amountBaseAssetBought = $t04291243118._1
911+ let quoteAssetReserveAfter = $t04291243118._2
912+ let baseAssetReserveAfter = $t04291243118._3
913+ let totalPositionSizeAfter = $t04291243118._4
914+ let cumulativeNotionalAfter = $t04291243118._5
910915 if (if ((_minBaseAssetAmount != 0))
911916 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
912917 else false)
914919 else {
915920 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
916921 let increaseMarginRequirement = divd(openNotional, _leverage)
917- let $t04329643535 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
918- let remainMargin = $t04329643535._1
919- let x1 = $t04329643535._2
920- let x2 = $t04329643535._3
922+ let $t04349943738 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
923+ let remainMargin = $t04349943738._1
924+ let x1 = $t04349943738._2
925+ let x2 = $t04349943738._3
921926 if (!(requireNotOverSpreadLimit(quoteAssetReserveAfter, baseAssetReserveAfter)))
922927 then throw("Over max spread limit")
923928 else $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
929934 }
930935 else {
931936 let openNotional = muld(_amount, _leverage)
932- let $t04454644662 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
933- let oldPositionNotional = $t04454644662._1
934- let unrealizedPnl = $t04454644662._2
937+ let $t04474944865 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
938+ let oldPositionNotional = $t04474944865._1
939+ let unrealizedPnl = $t04474944865._2
935940 if ((oldPositionNotional > openNotional))
936941 then throw("Use decreasePosition to decrease position size")
937942 else throw("Close position first")
938943 }
939- let newPositionSize = $t04228544853._1
940- let newPositionRemainMargin = $t04228544853._2
941- let newPositionOpenNotional = $t04228544853._3
942- let newPositionLatestCPF = $t04228544853._4
943- let baseAssetReserveAfter = $t04228544853._5
944- let quoteAssetReserveAfter = $t04228544853._6
945- let totalPositionSizeAfter = $t04228544853._7
946- let cumulativeNotionalAfter = $t04228544853._8
947- let openInterestNotionalAfter = $t04228544853._9
948- let totalLongAfter = $t04228544853._10
949- let totalShortAfter = $t04228544853._11
944+ let newPositionSize = $t04248845056._1
945+ let newPositionRemainMargin = $t04248845056._2
946+ let newPositionOpenNotional = $t04248845056._3
947+ let newPositionLatestCPF = $t04248845056._4
948+ let baseAssetReserveAfter = $t04248845056._5
949+ let quoteAssetReserveAfter = $t04248845056._6
950+ let totalPositionSizeAfter = $t04248845056._7
951+ let cumulativeNotionalAfter = $t04248845056._8
952+ let openInterestNotionalAfter = $t04248845056._9
953+ let totalLongAfter = $t04248845056._10
954+ let totalShortAfter = $t04248845056._11
950955 let feeToStakers = (feeAmount / 2)
951956 let feeToInsurance = (feeAmount - feeToStakers)
952- let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
957+ let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _amount)])
953958 if ((stake == stake))
954959 then {
955960 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
10001005 }
10011006 let feeAmount = (rawFeeAmount - referrerFee)
10021007 let _amount = (_rawAmount - rawFeeAmount)
1003- let $t04674646886 = getPosition(_trader)
1004- let oldPositionSize = $t04674646886._1
1005- let oldPositionMargin = $t04674646886._2
1006- let oldPositionOpenNotional = $t04674646886._3
1007- let oldPositionLstUpdCPF = $t04674646886._4
1008+ let $t04690247042 = getPosition(_trader)
1009+ let oldPositionSize = $t04690247042._1
1010+ let oldPositionMargin = $t04690247042._2
1011+ let oldPositionOpenNotional = $t04690247042._3
1012+ let oldPositionLstUpdCPF = $t04690247042._4
10081013 let feeToStakers = (feeAmount / 2)
10091014 let feeToInsurance = (feeAmount - feeToStakers)
1010- let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
1015+ let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _amount)])
10111016 if ((stake == stake))
10121017 then {
10131018 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
10381043 else paused())
10391044 then throw("Invalid removeMargin parameters")
10401045 else {
1041- let $t04791148063 = getPosition(toString(i.caller))
1042- let oldPositionSize = $t04791148063._1
1043- let oldPositionMargin = $t04791148063._2
1044- let oldPositionOpenNotional = $t04791148063._3
1045- let oldPositionLstUpdCPF = $t04791148063._4
1046+ let $t04801848170 = getPosition(toString(i.caller))
1047+ let oldPositionSize = $t04801848170._1
1048+ let oldPositionMargin = $t04801848170._2
1049+ let oldPositionOpenNotional = $t04801848170._3
1050+ let oldPositionLstUpdCPF = $t04801848170._4
10461051 let marginDelta = -(_amount)
1047- let $t04810048279 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1048- let remainMargin = $t04810048279._1
1049- let badDebt = $t04810048279._2
1052+ let $t04820748386 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1053+ let remainMargin = $t04820748386._1
1054+ let badDebt = $t04820748386._2
10501055 if ((badDebt != 0))
10511056 then throw("Invalid removed margin amount")
10521057 else {
10541059 if (!(requireMoreMarginRatio(marginRatio, initMarginRatio(), true)))
10551060 then throw(((("Too much margin removed: " + toString(marginRatio)) + " < ") + toString(initMarginRatio())))
10561061 else {
1057- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [_amount, toBase58String(quoteAsset())], nil)
1062+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), _amount], nil)
10581063 if ((unstake == unstake))
10591064 then ((updatePosition(toString(i.caller), oldPositionSize, remainMargin, oldPositionOpenNotional, latestCumulativePremiumFraction(oldPositionSize)) ++ withdraw(i.caller, _amount)) ++ updateBalance((cbalance() - _amount)))
10601065 else throw("Strict value is not equal to itself.")
10751080 else paused())
10761081 then throw("Invalid closePosition parameters")
10771082 else {
1078- let $t04948249859 = internalClosePosition(caller, true)
1079- let x1 = $t04948249859._1
1080- let positionBadDebt = $t04948249859._2
1081- let realizedPnl = $t04948249859._3
1082- let marginToVault = $t04948249859._4
1083- let quoteAssetReserveAfter = $t04948249859._5
1084- let baseAssetReserveAfter = $t04948249859._6
1085- let totalPositionSizeAfter = $t04948249859._7
1086- let cumulativeNotionalAfter = $t04948249859._8
1087- let openInterestNotionalAfter = $t04948249859._9
1088- let x2 = $t04948249859._10
1089- let totalLongAfter = $t04948249859._11
1090- let totalShortAfter = $t04948249859._12
1083+ let $t04958049957 = internalClosePosition(caller, true)
1084+ let x1 = $t04958049957._1
1085+ let positionBadDebt = $t04958049957._2
1086+ let realizedPnl = $t04958049957._3
1087+ let marginToVault = $t04958049957._4
1088+ let quoteAssetReserveAfter = $t04958049957._5
1089+ let baseAssetReserveAfter = $t04958049957._6
1090+ let totalPositionSizeAfter = $t04958049957._7
1091+ let cumulativeNotionalAfter = $t04958049957._8
1092+ let openInterestNotionalAfter = $t04958049957._9
1093+ let x2 = $t04958049957._10
1094+ let totalLongAfter = $t04958049957._11
1095+ let totalShortAfter = $t04958049957._12
10911096 if ((positionBadDebt > 0))
10921097 then throw("Unable to close position with bad debt")
10931098 else {
10941099 let withdrawAmount = abs(marginToVault)
10951100 let ammBalance = (cbalance() - withdrawAmount)
1096- let $t05006850210 = if ((0 > ammBalance))
1101+ let $t05016650308 = if ((0 > ammBalance))
10971102 then $Tuple2(0, abs(ammBalance))
10981103 else $Tuple2(ammBalance, 0)
1099- let ammNewBalance = $t05006850210._1
1100- let getFromInsurance = $t05006850210._2
1104+ let ammNewBalance = $t05016650308._1
1105+ let getFromInsurance = $t05016650308._2
11011106 let x = if ((getFromInsurance > 0))
11021107 then {
11031108 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil)
11081113 else nil
11091114 if ((x == x))
11101115 then {
1111- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(withdrawAmount - getFromInsurance), toBase58String(quoteAsset())], nil)
1116+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), (withdrawAmount - getFromInsurance)], nil)
11121117 if ((unstake == unstake))
11131118 then {
11141119 let notifyNotional = invoke(minerAddress(), "notifyNotional", [caller, 0], nil)
11481153 then (DECIMAL_UNIT > partialLiquidationRatio())
11491154 else false)
11501155 then {
1151- let $t05229052440 = getPosition(_trader)
1152- let oldPositionSize = $t05229052440._1
1153- let oldPositionMargin = $t05229052440._2
1154- let oldPositionOpenNotional = $t05229052440._3
1155- let oldPositionLstUpdCPF = $t05229052440._4
1156+ let $t05237952529 = getPosition(_trader)
1157+ let oldPositionSize = $t05237952529._1
1158+ let oldPositionMargin = $t05237952529._2
1159+ let oldPositionOpenNotional = $t05237952529._3
1160+ let oldPositionLstUpdCPF = $t05237952529._4
11561161 let _direction = if ((oldPositionSize > 0))
11571162 then DIR_SHORT
11581163 else DIR_LONG
11591164 let isAdd = (_direction == DIR_LONG)
11601165 let exchangedQuoteAssetAmount = getPartialLiquidationAmount(_trader, oldPositionSize)
1161- let $t05266552769 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1162- let oldPositionNotional = $t05266552769._1
1163- let unrealizedPnl = $t05266552769._2
1164- let $t05277753067 = swapInput(isAdd, exchangedQuoteAssetAmount)
1165- let exchangedPositionSize = $t05277753067._1
1166- let quoteAssetReserveAfter = $t05277753067._2
1167- let baseAssetReserveAfter = $t05277753067._3
1168- let totalPositionSizeAfter = $t05277753067._4
1169- let cumulativeNotionalAfter = $t05277753067._5
1166+ let $t05275452858 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1167+ let oldPositionNotional = $t05275452858._1
1168+ let unrealizedPnl = $t05275452858._2
1169+ let $t05286653156 = swapInput(isAdd, exchangedQuoteAssetAmount)
1170+ let exchangedPositionSize = $t05286653156._1
1171+ let quoteAssetReserveAfter = $t05286653156._2
1172+ let baseAssetReserveAfter = $t05286653156._3
1173+ let totalPositionSizeAfter = $t05286653156._4
1174+ let cumulativeNotionalAfter = $t05286653156._5
11701175 let realizedPnl = divd(muld(unrealizedPnl, abs(exchangedPositionSize)), abs(oldPositionSize))
1171- let $t05317453407 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1172- let remainMargin = $t05317453407._1
1173- let badDebt = $t05317453407._2
1174- let fundingPayment = $t05317453407._3
1176+ let $t05326353496 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1177+ let remainMargin = $t05326353496._1
1178+ let badDebt = $t05326353496._2
1179+ let fundingPayment = $t05326353496._3
11751180 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
11761181 let remainOpenNotional = if ((oldPositionSize > 0))
11771182 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
11851190 let newPositionLstUpdCPF = latestCumulativePremiumFraction(newPositionSize)
11861191 let openInterestNotionalAfter = (openInterestNotional() - exchangedQuoteAssetAmount)
11871192 let ammBalance = (cbalance() - liquidationPenalty)
1188- let $t05458054723 = if ((0 > ammBalance))
1193+ let $t05466954812 = if ((0 > ammBalance))
11891194 then $Tuple2(0, abs(ammBalance))
11901195 else $Tuple2(ammBalance, 0)
1191- let newAmmBalance = $t05458054723._1
1192- let takeFromInsurance = $t05458054723._2
1196+ let newAmmBalance = $t05466954812._1
1197+ let takeFromInsurance = $t05466954812._2
11931198 let x = if ((takeFromInsurance > 0))
11941199 then {
11951200 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
12001205 else nil
12011206 if ((x == x))
12021207 then {
1203- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(liquidationPenalty - takeFromInsurance), toBase58String(quoteAsset())], nil)
1208+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), (liquidationPenalty - takeFromInsurance)], nil)
12041209 if ((unstake == unstake))
12051210 then {
12061211 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
12221227 else throw("Strict value is not equal to itself.")
12231228 }
12241229 else {
1225- let $t05617956634 = internalClosePosition(_trader, false)
1226- let x1 = $t05617956634._1
1227- let badDebt = $t05617956634._2
1228- let x2 = $t05617956634._3
1229- let x3 = $t05617956634._4
1230- let quoteAssetReserveAfter = $t05617956634._5
1231- let baseAssetReserveAfter = $t05617956634._6
1232- let totalPositionSizeAfter = $t05617956634._7
1233- let cumulativeNotionalAfter = $t05617956634._8
1234- let openInterestNotionalAfter = $t05617956634._9
1235- let exchangedQuoteAssetAmount = $t05617956634._10
1236- let totalLongAfter = $t05617956634._11
1237- let totalShortAfter = $t05617956634._12
1230+ let $t05625956714 = internalClosePosition(_trader, false)
1231+ let x1 = $t05625956714._1
1232+ let badDebt = $t05625956714._2
1233+ let x2 = $t05625956714._3
1234+ let x3 = $t05625956714._4
1235+ let quoteAssetReserveAfter = $t05625956714._5
1236+ let baseAssetReserveAfter = $t05625956714._6
1237+ let totalPositionSizeAfter = $t05625956714._7
1238+ let cumulativeNotionalAfter = $t05625956714._8
1239+ let openInterestNotionalAfter = $t05625956714._9
1240+ let exchangedQuoteAssetAmount = $t05625956714._10
1241+ let totalLongAfter = $t05625956714._11
1242+ let totalShortAfter = $t05625956714._12
12381243 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
12391244 let feeToLiquidator = (liquidationPenalty / 2)
12401245 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
12411246 let ammBalance = (cbalance() - liquidationPenalty)
1242- let $t05704657189 = if ((0 > ammBalance))
1247+ let $t05712657269 = if ((0 > ammBalance))
12431248 then $Tuple2(0, abs(ammBalance))
12441249 else $Tuple2(ammBalance, 0)
1245- let newAmmBalance = $t05704657189._1
1246- let takeFromInsurance = $t05704657189._2
1250+ let newAmmBalance = $t05712657269._1
1251+ let takeFromInsurance = $t05712657269._2
12471252 let x = if ((takeFromInsurance > 0))
12481253 then {
12491254 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
12541259 else nil
12551260 if ((x == x))
12561261 then {
1257- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(liquidationPenalty - takeFromInsurance), toBase58String(quoteAsset())], nil)
1262+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), (liquidationPenalty - takeFromInsurance)], nil)
12581263 if ((unstake == unstake))
12591264 then {
12601265 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
12861291 then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp)))
12871292 else {
12881293 let underlyingPrice = getOracleTwapPrice()
1289- let $t05868458746 = getFunding()
1290- let shortPremiumFraction = $t05868458746._1
1291- let longPremiumFraction = $t05868458746._2
1294+ let $t05875558817 = getFunding()
1295+ let shortPremiumFraction = $t05875558817._1
1296+ let longPremiumFraction = $t05875558817._2
12921297 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
12931298 }
12941299 }
13011306 else (0 > _amount))
13021307 then throw("Invalid forceMoveAsset parameters")
13031308 else {
1304- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [_amount, toBase58String(quoteAsset())], nil)
1309+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), _amount], nil)
13051310 if ((unstake == unstake))
13061311 then (withdraw(addressFromStringValue(_trader), _amount) ++ updateBalance((cbalance() - _amount)))
13071312 else throw("Strict value is not equal to itself.")
13151320 else (0 > _price))
13161321 then throw("Invalid adjustPeg parameters")
13171322 else {
1318- let $t05974659832 = getPegAdjustCost(_price)
1319- let newQuoteAssetReserve = $t05974659832._1
1320- let pegChangeCost = $t05974659832._2
1323+ let $t05980859894 = getPegAdjustCost(_price)
1324+ let newQuoteAssetReserve = $t05980859894._1
1325+ let pegChangeCost = $t05980859894._2
13211326 if ((pegChangeCost == 0))
13221327 then throw("Nothing to adjust")
13231328 else if ((pegChangeCost > 0))
1324- then {
1325- let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [pegChangeCost], nil)
1326- if ((withdrawInsurance == withdrawInsurance))
1327- then {
1328- let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), pegChangeCost)])
1329- if ((stake == stake))
1330- then (updateBalance((cbalance() + pegChangeCost)) ++ updateAmmReserves(newQuoteAssetReserve, bsAstR()))
1331- else throw("Strict value is not equal to itself.")
1332- }
1333- else throw("Strict value is not equal to itself.")
1334- }
1329+ then updateAmmReserves(newQuoteAssetReserve, bsAstR())
13351330 else {
1336- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [abs(pegChangeCost), toBase58String(quoteAsset())], nil)
1331+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), abs(pegChangeCost)], nil)
13371332 if ((unstake == unstake))
13381333 then {
13391334 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), abs(pegChangeCost))])
13481343
13491344
13501345 @Callable(i)
1346+func migrateLiquidity () = {
1347+ let amount = cbalance()
1348+ let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [amount, toBase58String(quoteAsset())], nil)
1349+ if ((unstake == unstake))
1350+ then {
1351+ let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), amount)])
1352+ if ((stake == stake))
1353+ then nil
1354+ else throw("Strict value is not equal to itself.")
1355+ }
1356+ else throw("Strict value is not equal to itself.")
1357+ }
1358+
1359+
1360+
1361+@Callable(i)
13511362 func v_get (_trader) = {
1352- let $t06105761117 = internalClosePosition(_trader, false)
1353- let x1 = $t06105761117._1
1354- let x2 = $t06105761117._2
1355- let x3 = $t06105761117._3
1356- let x4 = $t06105761117._4
1363+ let $t06146361523 = internalClosePosition(_trader, false)
1364+ let x1 = $t06146361523._1
1365+ let x2 = $t06146361523._2
1366+ let x3 = $t06146361523._3
1367+ let x4 = $t06146361523._4
13571368 throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader))))
13581369 }
13591370
13611372
13621373 @Callable(i)
13631374 func view_calcRemainMarginWithFundingPayment (_trader) = {
1364- let $t06126461375 = getPosition(_trader)
1365- let positionSize = $t06126461375._1
1366- let positionMargin = $t06126461375._2
1367- let pon = $t06126461375._3
1368- let positionLstUpdCPF = $t06126461375._4
1369- let $t06138061481 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1370- let positionNotional = $t06138061481._1
1371- let unrealizedPnl = $t06138061481._2
1372- let $t06148661668 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1373- let remainMargin = $t06148661668._1
1374- let badDebt = $t06148661668._2
1375- let fundingPayment = $t06148661668._3
1375+ let $t06167061781 = getPosition(_trader)
1376+ let positionSize = $t06167061781._1
1377+ let positionMargin = $t06167061781._2
1378+ let pon = $t06167061781._3
1379+ let positionLstUpdCPF = $t06167061781._4
1380+ let $t06178661887 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1381+ let positionNotional = $t06178661887._1
1382+ let unrealizedPnl = $t06178661887._2
1383+ let $t06189262074 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1384+ let remainMargin = $t06189262074._1
1385+ let badDebt = $t06189262074._2
1386+ let fundingPayment = $t06189262074._3
13761387 throw((((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)) + s(badDebt)) + s(positionNotional)))
13771388 }
13781389
13891400 @Callable(i)
13901401 func view_getFunding () = {
13911402 let underlyingPrice = getOracleTwapPrice()
1392- let $t06205962121 = getFunding()
1393- let shortPremiumFraction = $t06205962121._1
1394- let longPremiumFraction = $t06205962121._2
1403+ let $t06246562527 = getFunding()
1404+ let shortPremiumFraction = $t06246562527._1
1405+ let longPremiumFraction = $t06246562527._2
13951406 let longFunding = divd(longPremiumFraction, underlyingPrice)
13961407 let shortFunding = divd(shortPremiumFraction, underlyingPrice)
13971408 throw((((s(longFunding) + s(shortFunding)) + s(getTwapSpotPrice())) + s(getOracleTwapPrice())))
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_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_positionClosedDate = "k_positionClosedDate"
2121
2222 let k_initialized = "k_initialized"
2323
2424 let k_paused = "k_paused"
2525
2626 let k_fee = "k_fee"
2727
2828 let k_fundingPeriod = "k_fundingPeriod"
2929
3030 let k_initMarginRatio = "k_initMarginRatio"
3131
3232 let k_maintenanceMarginRatio = "k_mmr"
3333
3434 let k_liquidationFeeRatio = "k_liquidationFeeRatio"
3535
3636 let k_partialLiquidationRatio = "k_partLiquidationRatio"
3737
3838 let k_spreadLimit = "k_spreadLimit"
3939
4040 let k_maxPriceImpact = "k_maxPriceImpact"
4141
4242 let k_maxPriceSpread = "k_maxPriceSpread"
4343
4444 let k_lastDataStr = "k_lastDataStr"
4545
4646 let k_lastMinuteId = "k_lastMinuteId"
4747
4848 let k_twapDataLastCumulativePrice = "k_twapDataLastCumulativePrice"
4949
5050 let k_twapDataLastPrice = "k_twapDataLastPrice"
5151
5252 let k_twapDataPreviousMinuteId = "k_twapDataPreviousMinuteId"
5353
5454 let k_latestLongCumulativePremiumFraction = "k_latestLongPremiumFraction"
5555
5656 let k_latestShortCumulativePremiumFraction = "k_latestShortPremiumFraction"
5757
5858 let k_nextFundingBlock = "k_nextFundingBlockMinTimestamp"
5959
6060 let k_longFundingRate = "k_longFundingRate"
6161
6262 let k_shortFundingRate = "k_shortFundingRate"
6363
6464 let k_quoteAssetReserve = "k_qtAstR"
6565
6666 let k_baseAssetReserve = "k_bsAstR"
6767
6868 let k_totalPositionSize = "k_totalPositionSize"
6969
7070 let k_totalLongPositionSize = "k_totalLongPositionSize"
7171
7272 let k_totalShortPositionSize = "k_totalShortPositionSize"
7373
7474 let k_cumulativeNotional = "k_cumulativeNotional"
7575
7676 let k_openInterestNotional = "k_openInterestNotional"
7777
7878 let k_coordinatorAddress = "k_coordinatorAddress"
7979
8080 let k_insurance_address = "k_insurance_address"
8181
8282 let k_admin_address = "k_admin_address"
8383
8484 let k_admin_public_key = "k_admin_public_key"
8585
8686 let k_quote_asset = "k_quote_asset"
8787
8888 let k_quote_staking = "k_quote_staking"
8989
9090 let k_staking_address = "k_staking_address"
9191
9292 let k_miner_address = "k_miner_address"
9393
9494 let k_orders_address = "k_orders_address"
9595
9696 let k_referral_address = "k_referral_address"
9797
98+let k_manager_address = "k_manager_address"
99+
98100 func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set")
99101
100102
101103 func adminAddress () = addressFromString(getStringValue(coordinator(), k_admin_address))
102104
103105
104106 func adminPublicKey () = fromBase58String(getStringValue(coordinator(), k_admin_public_key))
105107
106108
107109 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
108110
109111
110112 func quoteAssetStaking () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_quote_staking)), "Quote asset staking not set")
111113
112114
113115 func stakingAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_staking_address)), "Staking not set")
114116
115117
116118 func insuranceAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_insurance_address)), "Insurance not set")
117119
118120
119121 func minerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_miner_address)), "Miner not set")
120122
121123
122124 func ordersAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_orders_address)), "Orders not set")
123125
124126
125127 func referralAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_referral_address)), "Referral not set")
128+
129+
130+func managerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_manager_address)), "Manager not set")
126131
127132
128133 let DIR_LONG = 1
129134
130135 let DIR_SHORT = 2
131136
132137 let TWAP_INTERVAL = 15
133138
134139 let ORACLE_INTERVAL = 15
135140
136141 let SECONDS = 1000
137142
138143 let DECIMAL_UNIT = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
139144
140145 let ONE_DAY = (86400 * DECIMAL_UNIT)
141146
142147 let ALL_FEES = 100
143148
144149 let PNL_OPTION_SPOT = 1
145150
146151 let PNL_OPTION_ORACLE = 2
147152
148153 func s (_x) = (toString(_x) + ",")
149154
150155
151156 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
152157
153158
154159 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
155160
156161
157162 func abs (_x) = if ((_x > 0))
158163 then _x
159164 else -(_x)
160165
161166
162167 func vmax (_x,_y) = if ((_x >= _y))
163168 then _x
164169 else _y
165170
166171
167172 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
168173
169174
170175 func listToStr (_list) = {
171176 func _join (accumulator,val) = ((accumulator + val) + ",")
172177
173178 let newListStr = {
174179 let $l = _list
175180 let $s = size($l)
176181 let $acc0 = ""
177182 func $f0_1 ($a,$i) = if (($i >= $s))
178183 then $a
179184 else _join($a, $l[$i])
180185
181186 func $f0_2 ($a,$i) = if (($i >= $s))
182187 then $a
183188 else throw("List size exceeds 20")
184189
185190 $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)
186191 }
187192 let newListStrU = dropRight(newListStr, 1)
188193 let newListStrR = if ((take(newListStrU, 1) == ","))
189194 then drop(newListStrU, 1)
190195 else newListStrU
191196 newListStrR
192197 }
193198
194199
195200 func strToList (_str) = split(_str, ",")
196201
197202
198203 func pushToQueue (_list,_maxSize,_value) = if ((size(_list) > _maxSize))
199204 then (removeByIndex(_list, 0) :+ _value)
200205 else (_list :+ _value)
201206
202207
203208 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
204209
205210
206211 func cbalance () = int(k_balance)
207212
208213
209214 func fee () = int(k_fee)
210215
211216
212217 func initMarginRatio () = int(k_initMarginRatio)
213218
214219
215220 func qtAstR () = int(k_quoteAssetReserve)
216221
217222
218223 func bsAstR () = int(k_baseAssetReserve)
219224
220225
221226 func totalPositionSize () = int(k_totalPositionSize)
222227
223228
224229 func cumulativeNotional () = int(k_cumulativeNotional)
225230
226231
227232 func openInterestNotional () = int(k_openInterestNotional)
228233
229234
230235 func nextFundingBlockTimestamp () = int(k_nextFundingBlock)
231236
232237
233238 func fundingPeriodRaw () = int(k_fundingPeriod)
234239
235240
236241 func fundingPeriodDecimal () = (fundingPeriodRaw() * DECIMAL_UNIT)
237242
238243
239244 func fundingPeriodSeconds () = (fundingPeriodRaw() * SECONDS)
240245
241246
242247 func maintenanceMarginRatio () = int(k_maintenanceMarginRatio)
243248
244249
245250 func liquidationFeeRatio () = int(k_liquidationFeeRatio)
246251
247252
248253 func partialLiquidationRatio () = int(k_partialLiquidationRatio)
249254
250255
251256 func spreadLimit () = int(k_spreadLimit)
252257
253258
254259 func maxPriceImpact () = int(k_maxPriceImpact)
255260
256261
257262 func maxPriceSpread () = int(k_maxPriceSpread)
258263
259264
260265 func latestLongCumulativePremiumFraction () = int(k_latestLongCumulativePremiumFraction)
261266
262267
263268 func latestShortCumulativePremiumFraction () = int(k_latestShortCumulativePremiumFraction)
264269
265270
266271 func totalShortPositionSize () = int(k_totalShortPositionSize)
267272
268273
269274 func totalLongPositionSize () = int(k_totalLongPositionSize)
270275
271276
272277 func getActualCaller (i) = valueOrElse(getString(ordersAddress(), "k_sender"), toString(i.caller))
273278
274279
275280 func requireMoreMarginRatio (_marginRatio,_baseMarginRatio,_largerThanOrEqualTo) = {
276281 let remainingMarginRatio = (_marginRatio - _baseMarginRatio)
277282 if (if (_largerThanOrEqualTo)
278283 then (0 > remainingMarginRatio)
279284 else false)
280285 then throw("Invalid margin")
281286 else if (if (!(_largerThanOrEqualTo))
282287 then (remainingMarginRatio >= 0)
283288 else false)
284289 then throw("Invalid margin")
285290 else true
286291 }
287292
288293
289294 func latestCumulativePremiumFraction (_positionSize) = if ((_positionSize == 0))
290295 then throw("Should not be called with _positionSize == 0")
291296 else if ((_positionSize > 0))
292297 then latestLongCumulativePremiumFraction()
293298 else latestShortCumulativePremiumFraction()
294299
295300
296301 func getPosition (_trader) = {
297302 let positionSizeOpt = getInteger(this, toCompositeKey(k_positionSize, _trader))
298303 match positionSizeOpt {
299304 case positionSize: Int =>
300305 $Tuple4(positionSize, getIntegerValue(this, toCompositeKey(k_positionMargin, _trader)), getIntegerValue(this, toCompositeKey(k_positionOpenNotional, _trader)), getIntegerValue(this, toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _trader)))
301306 case _ =>
302307 $Tuple4(0, 0, 0, 0)
303308 }
304309 }
305310
306311
307312 func requireOpenPosition (_trader) = if ((getPosition(_trader)._1 == 0))
308313 then throw("No open position")
309314 else true
310315
311316
312317 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
313318
314319
315320 func paused () = valueOrElse(getBoolean(this, k_paused), false)
316321
317322
318323 func updateReserve (_isAdd,_quoteAssetAmount,_baseAssetAmount) = if (_isAdd)
319324 then {
320325 let newBase = (bsAstR() - _baseAssetAmount)
321326 if ((0 >= newBase))
322327 then throw("Tx lead to base asset reserve <= 0, revert")
323328 else $Tuple4((qtAstR() + _quoteAssetAmount), newBase, (totalPositionSize() + _baseAssetAmount), (cumulativeNotional() + _quoteAssetAmount))
324329 }
325330 else {
326331 let newQuote = (qtAstR() - _quoteAssetAmount)
327332 if ((0 >= newQuote))
328333 then throw("Tx lead to base quote reserve <= 0, revert")
329334 else $Tuple4(newQuote, (bsAstR() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount), (cumulativeNotional() - _quoteAssetAmount))
330335 }
331336
332337
333338 func swapInput (_isAdd,_quoteAssetAmount) = {
334339 let _qtAstR = qtAstR()
335340 let _bsAstR = bsAstR()
336341 let k = muld(_qtAstR, _bsAstR)
337342 let quoteAssetReserveAfter = if (_isAdd)
338343 then (_qtAstR + _quoteAssetAmount)
339344 else (_qtAstR - _quoteAssetAmount)
340345 let baseAssetReserveAfter = divd(k, quoteAssetReserveAfter)
341346 let amountBaseAssetBoughtAbs = abs((baseAssetReserveAfter - _bsAstR))
342347 let amountBaseAssetBought = if (_isAdd)
343348 then amountBaseAssetBoughtAbs
344349 else -(amountBaseAssetBoughtAbs)
345- let $t01281613009 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
346- let quoteAssetReserveAfter1 = $t01281613009._1
347- let baseAssetReserveAfter1 = $t01281613009._2
348- let totalPositionSizeAfter1 = $t01281613009._3
349- let cumulativeNotionalAfter1 = $t01281613009._4
350+ let $t01301913212 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
351+ let quoteAssetReserveAfter1 = $t01301913212._1
352+ let baseAssetReserveAfter1 = $t01301913212._2
353+ let totalPositionSizeAfter1 = $t01301913212._3
354+ let cumulativeNotionalAfter1 = $t01301913212._4
350355 let priceBefore = divd(_qtAstR, _bsAstR)
351356 let marketPrice = divd(_quoteAssetAmount, amountBaseAssetBoughtAbs)
352357 let priceDiff = abs((priceBefore - marketPrice))
353358 let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
354359 let maxPriceImpactValue = maxPriceImpact()
355360 if ((priceImpact > maxPriceImpactValue))
356361 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)))
357362 else $Tuple5(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
358363 }
359364
360365
361366 func calcRemainMarginWithFundingPayment (_oldPositionSize,_oldPositionMargin,_oldPositionCumulativePremiumFraction,_marginDelta) = {
362367 let fundingPayment = if ((_oldPositionSize != 0))
363368 then {
364369 let _latestCumulativePremiumFraction = latestCumulativePremiumFraction(_oldPositionSize)
365370 muld((_latestCumulativePremiumFraction - _oldPositionCumulativePremiumFraction), _oldPositionSize)
366371 }
367372 else 0
368373 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
369- let $t01450014627 = if ((0 > signedMargin))
374+ let $t01470314830 = if ((0 > signedMargin))
370375 then $Tuple2(0, abs(signedMargin))
371376 else $Tuple2(abs(signedMargin), 0)
372- let remainMargin = $t01450014627._1
373- let badDebt = $t01450014627._2
377+ let remainMargin = $t01470314830._1
378+ let badDebt = $t01470314830._2
374379 $Tuple3(remainMargin, badDebt, fundingPayment)
375380 }
376381
377382
378383 func swapOutputWithReserves (_isAdd,_baseAssetAmount,_checkMaxPriceImpact,_quoteAssetReserve,_baseAssetReserve) = {
379384 let priceBefore = divd(_quoteAssetReserve, _baseAssetReserve)
380385 if ((_baseAssetAmount == 0))
381386 then throw("Invalid base asset amount")
382387 else {
383388 let k = muld(_quoteAssetReserve, _baseAssetReserve)
384389 let baseAssetPoolAmountAfter = if (_isAdd)
385390 then (_baseAssetReserve + _baseAssetAmount)
386391 else (_baseAssetReserve - _baseAssetAmount)
387392 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
388393 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetReserve))
389394 let maxPriceImpactValue = maxPriceImpact()
390- let $t01560415797 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
391- let quoteAssetReserveAfter1 = $t01560415797._1
392- let baseAssetReserveAfter1 = $t01560415797._2
393- let totalPositionSizeAfter1 = $t01560415797._3
394- let cumulativeNotionalAfter1 = $t01560415797._4
395+ let $t01580716000 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
396+ let quoteAssetReserveAfter1 = $t01580716000._1
397+ let baseAssetReserveAfter1 = $t01580716000._2
398+ let totalPositionSizeAfter1 = $t01580716000._3
399+ let cumulativeNotionalAfter1 = $t01580716000._4
395400 let marketPrice = divd(quoteAssetSold, _baseAssetAmount)
396401 let priceDiff = abs((priceBefore - marketPrice))
397402 let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
398403 if (if ((priceImpact > maxPriceImpactValue))
399404 then _checkMaxPriceImpact
400405 else false)
401406 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)))
402407 else $Tuple8(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1, (totalLongPositionSize() - (if (_isAdd)
403408 then abs(_baseAssetAmount)
404409 else 0)), (totalShortPositionSize() - (if (!(_isAdd))
405410 then abs(_baseAssetAmount)
406411 else 0)), priceImpact)
407412 }
408413 }
409414
410415
411416 func swapOutput (_isAdd,_baseAssetAmount,_checkMaxPriceImpact) = swapOutputWithReserves(_isAdd, _baseAssetAmount, _checkMaxPriceImpact, qtAstR(), bsAstR())
412417
413418
414419 func getOracleTwapPrice () = {
415420 let oracle = valueOrErrorMessage(addressFromString(getStringValue(this, k_ora)), "")
416421 let priceKey = getStringValue(this, k_ora_key)
417422 let blockKey = getStringValue(this, k_ora_block_key)
418423 let lastValue = valueOrErrorMessage(getInteger(oracle, priceKey), ((("Can not get oracle price. Oracle: " + toString(oracle)) + " key: ") + priceKey))
419424 lastValue
420425 }
421426
422427
423428 func requireNotOverSpreadLimit (_quoteAssetReserve,_baseAssetReserve) = {
424429 let oraclePrice = getOracleTwapPrice()
425430 let priceAfter = divd(_quoteAssetReserve, _baseAssetReserve)
426431 let averagePrice = divd((oraclePrice + priceAfter), (2 * DECIMAL_UNIT))
427432 let absPriceDiff = divd(abs((oraclePrice - priceAfter)), averagePrice)
428433 if ((absPriceDiff > maxPriceSpread()))
429434 then throw(((("Price spread " + toString(absPriceDiff)) + " > max price spread ") + toString(maxPriceSpread())))
430435 else true
431436 }
432437
433438
434439 func getSpotPrice () = {
435440 let _quoteAssetReserve = qtAstR()
436441 let _baseAssetReserve = bsAstR()
437442 divd(_quoteAssetReserve, _baseAssetReserve)
438443 }
439444
440445
441446 func isOverFluctuationLimit () = {
442447 let oraclePrice = getOracleTwapPrice()
443448 let currentPrice = getSpotPrice()
444449 (divd(abs((oraclePrice - currentPrice)), oraclePrice) > spreadLimit())
445450 }
446451
447452
448453 func getPositionAdjustedOpenNotional (_positionSize,_option,_quoteAssetReserve,_baseAssetReserve) = {
449454 let positionSizeAbs = abs(_positionSize)
450455 let isShort = (0 > _positionSize)
451456 let positionNotional = if ((_option == PNL_OPTION_SPOT))
452457 then {
453- let $t01901519186 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _baseAssetReserve)
454- let outPositionNotional = $t01901519186._1
455- let x1 = $t01901519186._2
456- let x2 = $t01901519186._3
457- let x3 = $t01901519186._4
458+ let $t01921819389 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _baseAssetReserve)
459+ let outPositionNotional = $t01921819389._1
460+ let x1 = $t01921819389._2
461+ let x2 = $t01921819389._3
462+ let x3 = $t01921819389._4
458463 outPositionNotional
459464 }
460465 else muld(positionSizeAbs, getOracleTwapPrice())
461466 positionNotional
462467 }
463468
464469
465470 func getPositionNotionalAndUnrealizedPnlByValues (_positionSize,_positionOpenNotional,_quoteAssetReserve,_baseAssetReserve,_option) = if ((_positionSize == 0))
466471 then throw("Invalid position size")
467472 else {
468473 let isShort = (0 > _positionSize)
469474 let positionNotional = getPositionAdjustedOpenNotional(_positionSize, _option, _quoteAssetReserve, _baseAssetReserve)
470475 let unrealizedPnl = if (isShort)
471476 then (_positionOpenNotional - positionNotional)
472477 else (positionNotional - _positionOpenNotional)
473478 $Tuple2(positionNotional, unrealizedPnl)
474479 }
475480
476481
477482 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
478- let $t02050320631 = getPosition(_trader)
479- let positionSize = $t02050320631._1
480- let positionMargin = $t02050320631._2
481- let positionOpenNotional = $t02050320631._3
482- let positionLstUpdCPF = $t02050320631._4
483+ let $t02070620834 = getPosition(_trader)
484+ let positionSize = $t02070620834._1
485+ let positionMargin = $t02070620834._2
486+ let positionOpenNotional = $t02070620834._3
487+ let positionLstUpdCPF = $t02070620834._4
483488 getPositionNotionalAndUnrealizedPnlByValues(positionSize, positionOpenNotional, qtAstR(), bsAstR(), _option)
484489 }
485490
486491
487492 func calcMarginRatio (_remainMargin,_badDebt,_positionNotional) = divd((_remainMargin - _badDebt), _positionNotional)
488493
489494
490495 func getMarginRatioByOption (_trader,_option) = {
491- let $t02111221223 = getPosition(_trader)
492- let positionSize = $t02111221223._1
493- let positionMargin = $t02111221223._2
494- let pon = $t02111221223._3
495- let positionLstUpdCPF = $t02111221223._4
496- let $t02122921322 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
497- let positionNotional = $t02122921322._1
498- let unrealizedPnl = $t02122921322._2
499- let $t02132721493 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
500- let remainMargin = $t02132721493._1
501- let badDebt = $t02132721493._2
496+ let $t02131521426 = getPosition(_trader)
497+ let positionSize = $t02131521426._1
498+ let positionMargin = $t02131521426._2
499+ let pon = $t02131521426._3
500+ let positionLstUpdCPF = $t02131521426._4
501+ let $t02143221525 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
502+ let positionNotional = $t02143221525._1
503+ let unrealizedPnl = $t02143221525._2
504+ let $t02153021696 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
505+ let remainMargin = $t02153021696._1
506+ let badDebt = $t02153021696._2
502507 calcMarginRatio(remainMargin, badDebt, positionNotional)
503508 }
504509
505510
506511 func getMarginRatio (_trader) = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
507512
508513
509514 func getPartialLiquidationAmount (_trader,_positionSize) = {
510515 let maximumRatio = vmax(partialLiquidationRatio(), (DECIMAL_UNIT - divd(getMarginRatio(_trader), maintenanceMarginRatio())))
511516 let maxExchangedPositionSize = muld(abs(_positionSize), maximumRatio)
512517 let swapResult = swapOutput((_positionSize > 0), maxExchangedPositionSize, false)
513518 let maxExchangedQuoteAssetAmount = swapResult._1
514519 let priceImpact = swapResult._8
515520 if ((maxPriceImpact() > priceImpact))
516521 then maxExchangedQuoteAssetAmount
517522 else {
518523 let exchangedPositionSize = muld(abs(_positionSize), partialLiquidationRatio())
519524 let exchangedQuoteAssetAmount = swapOutput((_positionSize > 0), exchangedPositionSize, false)._1
520525 exchangedQuoteAssetAmount
521526 }
522527 }
523528
524529
525530 func internalClosePosition (_trader,_checkMaxPriceImpact) = {
526- let $t02272622854 = getPosition(_trader)
527- let positionSize = $t02272622854._1
528- let positionMargin = $t02272622854._2
529- let positionOpenNotional = $t02272622854._3
530- let positionLstUpdCPF = $t02272622854._4
531+ let $t02292923057 = getPosition(_trader)
532+ let positionSize = $t02292923057._1
533+ let positionMargin = $t02292923057._2
534+ let positionOpenNotional = $t02292923057._3
535+ let positionLstUpdCPF = $t02292923057._4
531536 let unrealizedPnl = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)._2
532- let $t02294923117 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
533- let remainMargin = $t02294923117._1
534- let badDebt = $t02294923117._2
537+ let $t02315223320 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
538+ let remainMargin = $t02315223320._1
539+ let badDebt = $t02315223320._2
535540 let exchangedPositionSize = -(positionSize)
536541 let realizedPnl = unrealizedPnl
537542 let marginToVault = -(remainMargin)
538- let $t02324423555 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
539- let exchangedQuoteAssetAmount = $t02324423555._1
540- let quoteAssetReserveAfter = $t02324423555._2
541- let baseAssetReserveAfter = $t02324423555._3
542- let totalPositionSizeAfter = $t02324423555._4
543- let cumulativeNotionalAfter = $t02324423555._5
544- let totalLongAfter = $t02324423555._6
545- let totalShortAfter = $t02324423555._7
543+ let $t02344723758 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
544+ let exchangedQuoteAssetAmount = $t02344723758._1
545+ let quoteAssetReserveAfter = $t02344723758._2
546+ let baseAssetReserveAfter = $t02344723758._3
547+ let totalPositionSizeAfter = $t02344723758._4
548+ let cumulativeNotionalAfter = $t02344723758._5
549+ let totalLongAfter = $t02344723758._6
550+ let totalShortAfter = $t02344723758._7
546551 let openInterestNotionalAfter = (openInterestNotional() - positionOpenNotional)
547552 $Tuple12(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter)
548553 }
549554
550555
551556 func getTwapSpotPrice () = {
552557 let minuteId = ((lastBlock.timestamp / 1000) / 60)
553558 let startMinuteId = (minuteId - TWAP_INTERVAL)
554559 let listStr = valueOrElse(getString(this, k_lastDataStr), "")
555560 let list = split(listStr, ",")
556561 func filterFn (accumulator,next) = if ((startMinuteId >= parseIntValue(next)))
557562 then (accumulator :+ parseIntValue(next))
558563 else accumulator
559564
560565 let listF = {
561566 let $l = list
562567 let $s = size($l)
563568 let $acc0 = nil
564569 func $f0_1 ($a,$i) = if (($i >= $s))
565570 then $a
566571 else filterFn($a, $l[$i])
567572
568573 func $f0_2 ($a,$i) = if (($i >= $s))
569574 then $a
570575 else throw("List size exceeds 20")
571576
572577 $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)
573578 }
574579 let maxIndex = if ((size(listF) > 0))
575580 then max(listF)
576581 else parseIntValue(list[0])
577582 let lastMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
578583 let endLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(lastMinuteId))), 0)
579584 let endLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(lastMinuteId))), 0)
580585 let nowCumulativePrice = (endLastCumulativePrice + ((minuteId - lastMinuteId) * endLastPrice))
581586 let startLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(maxIndex))), 0)
582587 let startLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(maxIndex))), 0)
583588 let startCumulativePrice = (startLastCumulativePrice + ((startMinuteId - maxIndex) * startLastPrice))
584589 ((nowCumulativePrice - startCumulativePrice) / TWAP_INTERVAL)
585590 }
586591
587592
588593 func getPegAdjustCost (_price) = {
589594 let _positionSize = totalPositionSize()
590595 let direction = (_positionSize > 0)
591596 let currentNetMarketValue = swapOutput(direction, abs(_positionSize), false)._1
592597 let baseAssetReserve = bsAstR()
593598 let newQuoteAssetReserve = muld(baseAssetReserve, _price)
594599 let cost = getPositionNotionalAndUnrealizedPnlByValues(_positionSize, currentNetMarketValue, newQuoteAssetReserve, baseAssetReserve, PNL_OPTION_SPOT)._2
595600 $Tuple2(newQuoteAssetReserve, cost)
596601 }
597602
598603
599604 func getFunding () = {
600605 let underlyingPrice = getOracleTwapPrice()
601606 let spotTwapPrice = getTwapSpotPrice()
602607 let premium = (spotTwapPrice - underlyingPrice)
603608 if (if ((totalShortPositionSize() == 0))
604609 then true
605610 else (totalLongPositionSize() == 0))
606611 then $Tuple2(0, 0)
607612 else if ((0 > premium))
608613 then {
609614 let shortPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
610615 let longPremiumFraction = divd(muld(shortPremiumFraction, totalShortPositionSize()), totalLongPositionSize())
611616 $Tuple2(shortPremiumFraction, longPremiumFraction)
612617 }
613618 else {
614619 let longPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
615620 let shortPremiumFraction = divd(muld(longPremiumFraction, totalLongPositionSize()), totalShortPositionSize())
616621 $Tuple2(shortPremiumFraction, longPremiumFraction)
617622 }
618623 }
619624
620625
621626 func updateSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact,_partialLiquidationRatio,_maxPriceSpread) = [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)]
622627
623628
624629 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)]
625630
626631
627632 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)]
628633
629634
630635 func appendTwap (price) = {
631636 let minuteId = ((lastBlock.timestamp / 1000) / 60)
632637 let previousMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
633638 if ((previousMinuteId > minuteId))
634639 then throw("TWAP out-of-order")
635640 else {
636641 let lastMinuteId = if ((previousMinuteId == 0))
637642 then minuteId
638643 else previousMinuteId
639644 if ((minuteId > previousMinuteId))
640645 then {
641646 let prevCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(previousMinuteId))), 0)
642647 let prevPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(previousMinuteId))), price)
643648 let lastCumulativePrice = (prevCumulativePrice + ((minuteId - lastMinuteId) * prevPrice))
644649 let list = pushToQueue(strToList(valueOrElse(getString(this, k_lastDataStr), "")), TWAP_INTERVAL, toString(minuteId))
645650 [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))]
646651 }
647652 else {
648653 let twapDataPreviousMinuteId = valueOrElse(getInteger(this, toCompositeKey(k_twapDataPreviousMinuteId, toString(minuteId))), 0)
649654 let prevCumulativePrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastCumulativePrice, toString(twapDataPreviousMinuteId))), 0)
650655 let prevPrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastPrice, toString(twapDataPreviousMinuteId))), price)
651656 let lastCumulativePrice = (prevCumulativePrice + ((minuteId - twapDataPreviousMinuteId) * prevPrice))
652657 [IntegerEntry(toCompositeKey(k_twapDataLastCumulativePrice, toString(minuteId)), lastCumulativePrice), IntegerEntry(toCompositeKey(k_twapDataLastPrice, toString(minuteId)), price)]
653658 }
654659 }
655660 }
656661
657662
658663 func updateAmmReserves (_qtAstR,_bsAstR) = [IntegerEntry(k_quoteAssetReserve, _qtAstR), IntegerEntry(k_baseAssetReserve, _bsAstR)]
659664
660665
661666 func updateAmm (_qtAstR,_bsAstR,_totalPositionSizeAfter,_cumulativeNotionalAfter,_openInterestNotional,_totalLongPositionSize,_totalShortPositionSize) = if (((_totalLongPositionSize - _totalShortPositionSize) != _totalPositionSizeAfter))
662667 then throw(((((("Invalid AMM state data: " + toString(_totalLongPositionSize)) + " + ") + toString(_totalShortPositionSize)) + " != ") + toString(_totalPositionSizeAfter)))
663668 else ((updateAmmReserves(_qtAstR, _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)))
664669
665670
666671 func deletePosition (_address) = [DeleteEntry(toCompositeKey(k_positionSize, _address)), DeleteEntry(toCompositeKey(k_positionMargin, _address)), DeleteEntry(toCompositeKey(k_positionOpenNotional, _address)), DeleteEntry(toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _address)), IntegerEntry(toCompositeKey(k_positionClosedDate, _address), lastBlock.timestamp)]
667672
668673
669674 func withdraw (_address,_amount) = {
670675 let balance = assetBalance(this, quoteAsset())
671676 if ((_amount > balance))
672677 then throw(((("Unable to withdraw " + toString(_amount)) + " from contract balance ") + toString(balance)))
673678 else [ScriptTransfer(_address, _amount, quoteAsset())]
674679 }
675680
676681
677682 func updateBalance (i) = if ((0 > i))
678683 then throw("Balance")
679684 else [IntegerEntry(k_balance, i)]
680685
681686
682687 func transferFee (i) = [ScriptTransfer(stakingAddress(), i, quoteAsset())]
683688
684689
685690 @Callable(i)
686691 func pause () = if ((i.caller != adminAddress()))
687692 then throw("Invalid togglePause params")
688693 else [BooleanEntry(k_paused, true)]
689694
690695
691696
692697 @Callable(i)
693698 func unpause () = if ((i.caller != adminAddress()))
694699 then throw("Invalid togglePause params")
695700 else [BooleanEntry(k_paused, false)]
696701
697702
698703
699704 @Callable(i)
700705 func addLiquidity (_quoteAssetAmount) = if (if ((i.caller != adminAddress()))
701706 then true
702707 else (0 >= _quoteAssetAmount))
703708 then throw("Invalid addLiquidity params")
704709 else {
705710 let _qtAstR = qtAstR()
706711 let _bsAstR = bsAstR()
707712 let price = divd(_qtAstR, _bsAstR)
708713 let baseAssetAmountToAdd = divd(_quoteAssetAmount, price)
709714 let qtAstRAfter = (_qtAstR + _quoteAssetAmount)
710715 let bsAstRAfter = (_bsAstR + baseAssetAmountToAdd)
711716 updateAmmReserves(qtAstRAfter, bsAstRAfter)
712717 }
713718
714719
715720
716721 @Callable(i)
717722 func removeLiquidity (_quoteAssetAmount) = if (if ((i.caller != adminAddress()))
718723 then true
719724 else (0 >= _quoteAssetAmount))
720725 then throw("Invalid removeLiquidity params")
721726 else {
722727 let _qtAstR = qtAstR()
723728 let _bsAstR = bsAstR()
724729 let price = divd(_qtAstR, _bsAstR)
725730 let baseAssetAmountToRemove = divd(_quoteAssetAmount, price)
726731 let qtAstRAfter = (_qtAstR - _quoteAssetAmount)
727732 let bsAstRAfter = (_bsAstR - baseAssetAmountToRemove)
728733 updateAmmReserves(qtAstRAfter, bsAstRAfter)
729734 }
730735
731736
732737
733738 @Callable(i)
734739 func changeSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact,_partialLiquidationRatio,_maxPriceSpread) = if ((i.caller != adminAddress()))
735740 then throw("Invalid changeSettings params")
736741 else updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact, _partialLiquidationRatio, _maxPriceSpread)
737742
738743
739744
740745 @Callable(i)
741746 func initialize (_qtAstR,_bsAstR,_fundingPeriod,_initMarginRatio,_mmr,_liquidationFeeRatio,_fee,_oracle,_oracleKey,_coordinator,_spreadLimit,_maxPriceImpact,_partialLiquidationRatio,_maxPriceSpread) = if (if (if (if (if (if (if (if (if (if (if (if ((0 >= _qtAstR))
742747 then true
743748 else (0 >= _bsAstR))
744749 then true
745750 else (0 >= _fundingPeriod))
746751 then true
747752 else (0 >= _initMarginRatio))
748753 then true
749754 else (0 >= _mmr))
750755 then true
751756 else (0 >= _liquidationFeeRatio))
752757 then true
753758 else (0 >= _fee))
754759 then true
755760 else (0 >= _spreadLimit))
756761 then true
757762 else (0 >= _maxPriceImpact))
758763 then true
759764 else (0 >= _partialLiquidationRatio))
760765 then true
761766 else (0 >= _maxPriceSpread))
762767 then true
763768 else initialized())
764769 then throw("Invalid initialize parameters")
765770 else ((((updateAmm(_qtAstR, _bsAstR, 0, 0, 0, 0, 0) ++ updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact, _partialLiquidationRatio, _maxPriceSpread)) ++ 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)])
766771
767772
768773
769774 @Callable(i)
770775 func setInitMarginRatio (_initMarginRatio) = if (if ((0 >= _initMarginRatio))
771776 then true
772777 else !(initialized()))
773778 then throw("Invalid setInitMarginRatio parameters")
774779 else updateSettings(_initMarginRatio, maintenanceMarginRatio(), liquidationFeeRatio(), fundingPeriodRaw(), fee(), spreadLimit(), maxPriceImpact(), partialLiquidationRatio(), maxPriceSpread())
775780
776781
777782
778783 @Callable(i)
779784 func decreasePosition (_amount,_leverage,_minBaseAssetAmount) = if (if (if (if (if ((0 >= _amount))
780785 then true
781786 else !(initialized()))
782787 then true
783788 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
784789 then true
785790 else !(requireOpenPosition(toString(i.caller))))
786791 then true
787792 else paused())
788793 then throw("Invalid decreasePosition parameters")
789794 else {
790- let $t03733137483 = getPosition(toString(i.caller))
791- let oldPositionSize = $t03733137483._1
792- let oldPositionMargin = $t03733137483._2
793- let oldPositionOpenNotional = $t03733137483._3
794- let oldPositionLstUpdCPF = $t03733137483._4
795+ let $t03753437686 = getPosition(toString(i.caller))
796+ let oldPositionSize = $t03753437686._1
797+ let oldPositionMargin = $t03753437686._2
798+ let oldPositionOpenNotional = $t03753437686._3
799+ let oldPositionLstUpdCPF = $t03753437686._4
795800 let _direction = if ((oldPositionSize > 0))
796801 then DIR_SHORT
797802 else DIR_LONG
798803 let isAdd = (_direction == DIR_LONG)
799804 let openNotional = muld(_amount, _leverage)
800- let $t03765637772 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
801- let oldPositionNotional = $t03765637772._1
802- let unrealizedPnl = $t03765637772._2
803- let $t03777840327 = if ((oldPositionNotional > openNotional))
805+ let $t03785937975 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
806+ let oldPositionNotional = $t03785937975._1
807+ let unrealizedPnl = $t03785937975._2
808+ let $t03798140530 = if ((oldPositionNotional > openNotional))
804809 then {
805- let $t03815538374 = swapInput(isAdd, openNotional)
806- let exchangedPositionSize = $t03815538374._1
807- let quoteAssetReserveAfter = $t03815538374._2
808- let baseAssetReserveAfter = $t03815538374._3
809- let totalPositionSizeAfter = $t03815538374._4
810- let cumulativeNotionalAfter = $t03815538374._5
810+ let $t03835838577 = swapInput(isAdd, openNotional)
811+ let exchangedPositionSize = $t03835838577._1
812+ let quoteAssetReserveAfter = $t03835838577._2
813+ let baseAssetReserveAfter = $t03835838577._3
814+ let totalPositionSizeAfter = $t03835838577._4
815+ let cumulativeNotionalAfter = $t03835838577._5
811816 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
812817 if (if ((_minBaseAssetAmount != 0))
813818 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
814819 else false)
815820 then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
816821 else {
817822 let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), abs(oldPositionSize))
818- let $t03881139056 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
819- let remainMargin = $t03881139056._1
820- let badDebt = $t03881139056._2
821- let fundingPayment = $t03881139056._3
823+ let $t03901439259 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
824+ let remainMargin = $t03901439259._1
825+ let badDebt = $t03901439259._2
826+ let fundingPayment = $t03901439259._3
822827 let exchangedQuoteAssetAmount = openNotional
823828 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
824829 let remainOpenNotional = if ((oldPositionSize > 0))
825830 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
826831 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
827832 let newPositionSize = (oldPositionSize + exchangedPositionSize)
828833 $Tuple11(newPositionSize, remainMargin, abs(remainOpenNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() - openNotional), (totalLongPositionSize() - (if ((newPositionSize > 0))
829834 then abs(exchangedPositionSize)
830835 else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
831836 then abs(exchangedPositionSize)
832837 else 0)))
833838 }
834839 }
835840 else throw("Close position first")
836- let newPositionSize = $t03777840327._1
837- let newPositionRemainMargin = $t03777840327._2
838- let newPositionOpenNotional = $t03777840327._3
839- let newPositionLatestCPF = $t03777840327._4
840- let baseAssetReserveAfter = $t03777840327._5
841- let quoteAssetReserveAfter = $t03777840327._6
842- let totalPositionSizeAfter = $t03777840327._7
843- let cumulativeNotionalAfter = $t03777840327._8
844- let openInterestNotionalAfter = $t03777840327._9
845- let totalLongAfter = $t03777840327._10
846- let totalShortAfter = $t03777840327._11
841+ let newPositionSize = $t03798140530._1
842+ let newPositionRemainMargin = $t03798140530._2
843+ let newPositionOpenNotional = $t03798140530._3
844+ let newPositionLatestCPF = $t03798140530._4
845+ let baseAssetReserveAfter = $t03798140530._5
846+ let quoteAssetReserveAfter = $t03798140530._6
847+ let totalPositionSizeAfter = $t03798140530._7
848+ let cumulativeNotionalAfter = $t03798140530._8
849+ let openInterestNotionalAfter = $t03798140530._9
850+ let totalLongAfter = $t03798140530._10
851+ let totalShortAfter = $t03798140530._11
847852 let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), newPositionOpenNotional], nil)
848853 if ((notifyNotional == notifyNotional))
849854 then (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter))
850855 else throw("Strict value is not equal to itself.")
851856 }
852857
853858
854859
855860 @Callable(i)
856861 func increasePosition (_direction,_leverage,_minBaseAssetAmount,_refLink) = {
857862 let _rawAmount = i.payments[0].amount
858863 if (if (if (if (if (if (if ((_direction != DIR_LONG))
859864 then (_direction != DIR_SHORT)
860865 else false)
861866 then true
862867 else (0 >= _rawAmount))
863868 then true
864869 else !(initialized()))
865870 then true
866871 else (i.payments[0].assetId != quoteAsset()))
867872 then true
868873 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
869874 then true
870875 else paused())
871876 then throw("Invalid increasePosition parameters")
872877 else {
873878 let _trader = toString(i.caller)
874879 let rawFeeAmount = muld(_rawAmount, fee())
875880 let referrerFeeAny = invoke(referralAddress(), "acceptPaymentWithLink", [_trader, _refLink], [AttachedPayment(quoteAsset(), rawFeeAmount)])
876881 if ((referrerFeeAny == referrerFeeAny))
877882 then {
878883 let referrerFee = match referrerFeeAny {
879884 case x: Int =>
880885 x
881886 case _ =>
882887 throw("Invalid referrerFee")
883888 }
884889 let _amount = (_rawAmount - rawFeeAmount)
885890 let feeAmount = (rawFeeAmount - referrerFee)
886- let $t04185641996 = getPosition(_trader)
887- let oldPositionSize = $t04185641996._1
888- let oldPositionMargin = $t04185641996._2
889- let oldPositionOpenNotional = $t04185641996._3
890- let oldPositionLstUpdCPF = $t04185641996._4
891+ let $t04205942199 = getPosition(_trader)
892+ let oldPositionSize = $t04205942199._1
893+ let oldPositionMargin = $t04205942199._2
894+ let oldPositionOpenNotional = $t04205942199._3
895+ let oldPositionLstUpdCPF = $t04205942199._4
891896 let isNewPosition = (oldPositionSize == 0)
892897 let isSameDirection = if ((oldPositionSize > 0))
893898 then (_direction == DIR_LONG)
894899 else (_direction == DIR_SHORT)
895900 let expandExisting = if (!(isNewPosition))
896901 then isSameDirection
897902 else false
898903 let isAdd = (_direction == DIR_LONG)
899- let $t04228544853 = if (if (isNewPosition)
904+ let $t04248845056 = if (if (isNewPosition)
900905 then true
901906 else expandExisting)
902907 then {
903908 let openNotional = muld(_amount, _leverage)
904- let $t04270942915 = swapInput(isAdd, openNotional)
905- let amountBaseAssetBought = $t04270942915._1
906- let quoteAssetReserveAfter = $t04270942915._2
907- let baseAssetReserveAfter = $t04270942915._3
908- let totalPositionSizeAfter = $t04270942915._4
909- let cumulativeNotionalAfter = $t04270942915._5
909+ let $t04291243118 = swapInput(isAdd, openNotional)
910+ let amountBaseAssetBought = $t04291243118._1
911+ let quoteAssetReserveAfter = $t04291243118._2
912+ let baseAssetReserveAfter = $t04291243118._3
913+ let totalPositionSizeAfter = $t04291243118._4
914+ let cumulativeNotionalAfter = $t04291243118._5
910915 if (if ((_minBaseAssetAmount != 0))
911916 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
912917 else false)
913918 then throw(((("Limit error: " + toString(abs(amountBaseAssetBought))) + " < ") + toString(_minBaseAssetAmount)))
914919 else {
915920 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
916921 let increaseMarginRequirement = divd(openNotional, _leverage)
917- let $t04329643535 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
918- let remainMargin = $t04329643535._1
919- let x1 = $t04329643535._2
920- let x2 = $t04329643535._3
922+ let $t04349943738 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
923+ let remainMargin = $t04349943738._1
924+ let x1 = $t04349943738._2
925+ let x2 = $t04349943738._3
921926 if (!(requireNotOverSpreadLimit(quoteAssetReserveAfter, baseAssetReserveAfter)))
922927 then throw("Over max spread limit")
923928 else $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
924929 then abs(amountBaseAssetBought)
925930 else 0)), (totalShortPositionSize() + (if ((0 > newPositionSize))
926931 then abs(amountBaseAssetBought)
927932 else 0)))
928933 }
929934 }
930935 else {
931936 let openNotional = muld(_amount, _leverage)
932- let $t04454644662 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
933- let oldPositionNotional = $t04454644662._1
934- let unrealizedPnl = $t04454644662._2
937+ let $t04474944865 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
938+ let oldPositionNotional = $t04474944865._1
939+ let unrealizedPnl = $t04474944865._2
935940 if ((oldPositionNotional > openNotional))
936941 then throw("Use decreasePosition to decrease position size")
937942 else throw("Close position first")
938943 }
939- let newPositionSize = $t04228544853._1
940- let newPositionRemainMargin = $t04228544853._2
941- let newPositionOpenNotional = $t04228544853._3
942- let newPositionLatestCPF = $t04228544853._4
943- let baseAssetReserveAfter = $t04228544853._5
944- let quoteAssetReserveAfter = $t04228544853._6
945- let totalPositionSizeAfter = $t04228544853._7
946- let cumulativeNotionalAfter = $t04228544853._8
947- let openInterestNotionalAfter = $t04228544853._9
948- let totalLongAfter = $t04228544853._10
949- let totalShortAfter = $t04228544853._11
944+ let newPositionSize = $t04248845056._1
945+ let newPositionRemainMargin = $t04248845056._2
946+ let newPositionOpenNotional = $t04248845056._3
947+ let newPositionLatestCPF = $t04248845056._4
948+ let baseAssetReserveAfter = $t04248845056._5
949+ let quoteAssetReserveAfter = $t04248845056._6
950+ let totalPositionSizeAfter = $t04248845056._7
951+ let cumulativeNotionalAfter = $t04248845056._8
952+ let openInterestNotionalAfter = $t04248845056._9
953+ let totalLongAfter = $t04248845056._10
954+ let totalShortAfter = $t04248845056._11
950955 let feeToStakers = (feeAmount / 2)
951956 let feeToInsurance = (feeAmount - feeToStakers)
952- let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
957+ let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _amount)])
953958 if ((stake == stake))
954959 then {
955960 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
956961 if ((depositInsurance == depositInsurance))
957962 then {
958963 let notifyFee = invoke(minerAddress(), "notifyFees", [_trader, feeAmount], nil)
959964 if ((notifyFee == notifyFee))
960965 then {
961966 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, newPositionOpenNotional], nil)
962967 if ((notifyNotional == notifyNotional))
963968 then (((updatePosition(_trader, newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
964969 else throw("Strict value is not equal to itself.")
965970 }
966971 else throw("Strict value is not equal to itself.")
967972 }
968973 else throw("Strict value is not equal to itself.")
969974 }
970975 else throw("Strict value is not equal to itself.")
971976 }
972977 else throw("Strict value is not equal to itself.")
973978 }
974979 }
975980
976981
977982
978983 @Callable(i)
979984 func addMargin () = {
980985 let _rawAmount = i.payments[0].amount
981986 if (if (if (if ((i.payments[0].assetId != quoteAsset()))
982987 then true
983988 else !(requireOpenPosition(toString(i.caller))))
984989 then true
985990 else !(initialized()))
986991 then true
987992 else paused())
988993 then throw("Invalid addMargin parameters")
989994 else {
990995 let _trader = toString(i.caller)
991996 let rawFeeAmount = muld(_rawAmount, fee())
992997 let referrerFeeAny = invoke(referralAddress(), "acceptPayment", [_trader], [AttachedPayment(quoteAsset(), rawFeeAmount)])
993998 if ((referrerFeeAny == referrerFeeAny))
994999 then {
9951000 let referrerFee = match referrerFeeAny {
9961001 case x: Int =>
9971002 x
9981003 case _ =>
9991004 throw("Invalid referrerFee")
10001005 }
10011006 let feeAmount = (rawFeeAmount - referrerFee)
10021007 let _amount = (_rawAmount - rawFeeAmount)
1003- let $t04674646886 = getPosition(_trader)
1004- let oldPositionSize = $t04674646886._1
1005- let oldPositionMargin = $t04674646886._2
1006- let oldPositionOpenNotional = $t04674646886._3
1007- let oldPositionLstUpdCPF = $t04674646886._4
1008+ let $t04690247042 = getPosition(_trader)
1009+ let oldPositionSize = $t04690247042._1
1010+ let oldPositionMargin = $t04690247042._2
1011+ let oldPositionOpenNotional = $t04690247042._3
1012+ let oldPositionLstUpdCPF = $t04690247042._4
10081013 let feeToStakers = (feeAmount / 2)
10091014 let feeToInsurance = (feeAmount - feeToStakers)
1010- let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
1015+ let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _amount)])
10111016 if ((stake == stake))
10121017 then {
10131018 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
10141019 if ((depositInsurance == depositInsurance))
10151020 then {
10161021 let notifyFee = invoke(minerAddress(), "notifyFees", [_trader, feeAmount], nil)
10171022 if ((notifyFee == notifyFee))
10181023 then ((updatePosition(_trader, oldPositionSize, (oldPositionMargin + _amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
10191024 else throw("Strict value is not equal to itself.")
10201025 }
10211026 else throw("Strict value is not equal to itself.")
10221027 }
10231028 else throw("Strict value is not equal to itself.")
10241029 }
10251030 else throw("Strict value is not equal to itself.")
10261031 }
10271032 }
10281033
10291034
10301035
10311036 @Callable(i)
10321037 func removeMargin (_amount) = if (if (if (if ((0 >= _amount))
10331038 then true
10341039 else !(requireOpenPosition(toString(i.caller))))
10351040 then true
10361041 else !(initialized()))
10371042 then true
10381043 else paused())
10391044 then throw("Invalid removeMargin parameters")
10401045 else {
1041- let $t04791148063 = getPosition(toString(i.caller))
1042- let oldPositionSize = $t04791148063._1
1043- let oldPositionMargin = $t04791148063._2
1044- let oldPositionOpenNotional = $t04791148063._3
1045- let oldPositionLstUpdCPF = $t04791148063._4
1046+ let $t04801848170 = getPosition(toString(i.caller))
1047+ let oldPositionSize = $t04801848170._1
1048+ let oldPositionMargin = $t04801848170._2
1049+ let oldPositionOpenNotional = $t04801848170._3
1050+ let oldPositionLstUpdCPF = $t04801848170._4
10461051 let marginDelta = -(_amount)
1047- let $t04810048279 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1048- let remainMargin = $t04810048279._1
1049- let badDebt = $t04810048279._2
1052+ let $t04820748386 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1053+ let remainMargin = $t04820748386._1
1054+ let badDebt = $t04820748386._2
10501055 if ((badDebt != 0))
10511056 then throw("Invalid removed margin amount")
10521057 else {
10531058 let marginRatio = calcMarginRatio(remainMargin, badDebt, oldPositionOpenNotional)
10541059 if (!(requireMoreMarginRatio(marginRatio, initMarginRatio(), true)))
10551060 then throw(((("Too much margin removed: " + toString(marginRatio)) + " < ") + toString(initMarginRatio())))
10561061 else {
1057- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [_amount, toBase58String(quoteAsset())], nil)
1062+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), _amount], nil)
10581063 if ((unstake == unstake))
10591064 then ((updatePosition(toString(i.caller), oldPositionSize, remainMargin, oldPositionOpenNotional, latestCumulativePremiumFraction(oldPositionSize)) ++ withdraw(i.caller, _amount)) ++ updateBalance((cbalance() - _amount)))
10601065 else throw("Strict value is not equal to itself.")
10611066 }
10621067 }
10631068 }
10641069
10651070
10661071
10671072 @Callable(i)
10681073 func closePosition () = {
10691074 let caller = getActualCaller(i)
10701075 let callerAddress = valueOrErrorMessage(addressFromString(caller), "Invalid caller")
10711076 if (if (if (!(requireOpenPosition(caller)))
10721077 then true
10731078 else !(initialized()))
10741079 then true
10751080 else paused())
10761081 then throw("Invalid closePosition parameters")
10771082 else {
1078- let $t04948249859 = internalClosePosition(caller, true)
1079- let x1 = $t04948249859._1
1080- let positionBadDebt = $t04948249859._2
1081- let realizedPnl = $t04948249859._3
1082- let marginToVault = $t04948249859._4
1083- let quoteAssetReserveAfter = $t04948249859._5
1084- let baseAssetReserveAfter = $t04948249859._6
1085- let totalPositionSizeAfter = $t04948249859._7
1086- let cumulativeNotionalAfter = $t04948249859._8
1087- let openInterestNotionalAfter = $t04948249859._9
1088- let x2 = $t04948249859._10
1089- let totalLongAfter = $t04948249859._11
1090- let totalShortAfter = $t04948249859._12
1083+ let $t04958049957 = internalClosePosition(caller, true)
1084+ let x1 = $t04958049957._1
1085+ let positionBadDebt = $t04958049957._2
1086+ let realizedPnl = $t04958049957._3
1087+ let marginToVault = $t04958049957._4
1088+ let quoteAssetReserveAfter = $t04958049957._5
1089+ let baseAssetReserveAfter = $t04958049957._6
1090+ let totalPositionSizeAfter = $t04958049957._7
1091+ let cumulativeNotionalAfter = $t04958049957._8
1092+ let openInterestNotionalAfter = $t04958049957._9
1093+ let x2 = $t04958049957._10
1094+ let totalLongAfter = $t04958049957._11
1095+ let totalShortAfter = $t04958049957._12
10911096 if ((positionBadDebt > 0))
10921097 then throw("Unable to close position with bad debt")
10931098 else {
10941099 let withdrawAmount = abs(marginToVault)
10951100 let ammBalance = (cbalance() - withdrawAmount)
1096- let $t05006850210 = if ((0 > ammBalance))
1101+ let $t05016650308 = if ((0 > ammBalance))
10971102 then $Tuple2(0, abs(ammBalance))
10981103 else $Tuple2(ammBalance, 0)
1099- let ammNewBalance = $t05006850210._1
1100- let getFromInsurance = $t05006850210._2
1104+ let ammNewBalance = $t05016650308._1
1105+ let getFromInsurance = $t05016650308._2
11011106 let x = if ((getFromInsurance > 0))
11021107 then {
11031108 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil)
11041109 if ((withdrawInsurance == withdrawInsurance))
11051110 then nil
11061111 else throw("Strict value is not equal to itself.")
11071112 }
11081113 else nil
11091114 if ((x == x))
11101115 then {
1111- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(withdrawAmount - getFromInsurance), toBase58String(quoteAsset())], nil)
1116+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), (withdrawAmount - getFromInsurance)], nil)
11121117 if ((unstake == unstake))
11131118 then {
11141119 let notifyNotional = invoke(minerAddress(), "notifyNotional", [caller, 0], nil)
11151120 if ((notifyNotional == notifyNotional))
11161121 then (((deletePosition(caller) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(callerAddress, withdrawAmount)) ++ updateBalance(ammNewBalance))
11171122 else throw("Strict value is not equal to itself.")
11181123 }
11191124 else throw("Strict value is not equal to itself.")
11201125 }
11211126 else throw("Strict value is not equal to itself.")
11221127 }
11231128 }
11241129 }
11251130
11261131
11271132
11281133 @Callable(i)
11291134 func liquidate (_trader) = {
11301135 let spotMarginRatio = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
11311136 let marginRatio = if (isOverFluctuationLimit())
11321137 then {
11331138 let oracleMarginRatio = getMarginRatioByOption(_trader, PNL_OPTION_ORACLE)
11341139 vmax(spotMarginRatio, oracleMarginRatio)
11351140 }
11361141 else spotMarginRatio
11371142 if (if (if (if (!(requireMoreMarginRatio(marginRatio, maintenanceMarginRatio(), false)))
11381143 then true
11391144 else !(requireOpenPosition(_trader)))
11401145 then true
11411146 else !(initialized()))
11421147 then true
11431148 else paused())
11441149 then throw("Unable to liquidate")
11451150 else if (if (if ((spotMarginRatio > liquidationFeeRatio()))
11461151 then (partialLiquidationRatio() > 0)
11471152 else false)
11481153 then (DECIMAL_UNIT > partialLiquidationRatio())
11491154 else false)
11501155 then {
1151- let $t05229052440 = getPosition(_trader)
1152- let oldPositionSize = $t05229052440._1
1153- let oldPositionMargin = $t05229052440._2
1154- let oldPositionOpenNotional = $t05229052440._3
1155- let oldPositionLstUpdCPF = $t05229052440._4
1156+ let $t05237952529 = getPosition(_trader)
1157+ let oldPositionSize = $t05237952529._1
1158+ let oldPositionMargin = $t05237952529._2
1159+ let oldPositionOpenNotional = $t05237952529._3
1160+ let oldPositionLstUpdCPF = $t05237952529._4
11561161 let _direction = if ((oldPositionSize > 0))
11571162 then DIR_SHORT
11581163 else DIR_LONG
11591164 let isAdd = (_direction == DIR_LONG)
11601165 let exchangedQuoteAssetAmount = getPartialLiquidationAmount(_trader, oldPositionSize)
1161- let $t05266552769 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1162- let oldPositionNotional = $t05266552769._1
1163- let unrealizedPnl = $t05266552769._2
1164- let $t05277753067 = swapInput(isAdd, exchangedQuoteAssetAmount)
1165- let exchangedPositionSize = $t05277753067._1
1166- let quoteAssetReserveAfter = $t05277753067._2
1167- let baseAssetReserveAfter = $t05277753067._3
1168- let totalPositionSizeAfter = $t05277753067._4
1169- let cumulativeNotionalAfter = $t05277753067._5
1166+ let $t05275452858 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1167+ let oldPositionNotional = $t05275452858._1
1168+ let unrealizedPnl = $t05275452858._2
1169+ let $t05286653156 = swapInput(isAdd, exchangedQuoteAssetAmount)
1170+ let exchangedPositionSize = $t05286653156._1
1171+ let quoteAssetReserveAfter = $t05286653156._2
1172+ let baseAssetReserveAfter = $t05286653156._3
1173+ let totalPositionSizeAfter = $t05286653156._4
1174+ let cumulativeNotionalAfter = $t05286653156._5
11701175 let realizedPnl = divd(muld(unrealizedPnl, abs(exchangedPositionSize)), abs(oldPositionSize))
1171- let $t05317453407 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1172- let remainMargin = $t05317453407._1
1173- let badDebt = $t05317453407._2
1174- let fundingPayment = $t05317453407._3
1176+ let $t05326353496 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1177+ let remainMargin = $t05326353496._1
1178+ let badDebt = $t05326353496._2
1179+ let fundingPayment = $t05326353496._3
11751180 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
11761181 let remainOpenNotional = if ((oldPositionSize > 0))
11771182 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
11781183 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
11791184 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
11801185 let feeToLiquidator = (liquidationPenalty / 2)
11811186 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
11821187 let newPositionMargin = (remainMargin - liquidationPenalty)
11831188 let newPositionSize = (oldPositionSize + exchangedPositionSize)
11841189 let newPositionOpenNotional = abs(remainOpenNotional)
11851190 let newPositionLstUpdCPF = latestCumulativePremiumFraction(newPositionSize)
11861191 let openInterestNotionalAfter = (openInterestNotional() - exchangedQuoteAssetAmount)
11871192 let ammBalance = (cbalance() - liquidationPenalty)
1188- let $t05458054723 = if ((0 > ammBalance))
1193+ let $t05466954812 = if ((0 > ammBalance))
11891194 then $Tuple2(0, abs(ammBalance))
11901195 else $Tuple2(ammBalance, 0)
1191- let newAmmBalance = $t05458054723._1
1192- let takeFromInsurance = $t05458054723._2
1196+ let newAmmBalance = $t05466954812._1
1197+ let takeFromInsurance = $t05466954812._2
11931198 let x = if ((takeFromInsurance > 0))
11941199 then {
11951200 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
11961201 if ((withdrawInsurance == withdrawInsurance))
11971202 then nil
11981203 else throw("Strict value is not equal to itself.")
11991204 }
12001205 else nil
12011206 if ((x == x))
12021207 then {
1203- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(liquidationPenalty - takeFromInsurance), toBase58String(quoteAsset())], nil)
1208+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), (liquidationPenalty - takeFromInsurance)], nil)
12041209 if ((unstake == unstake))
12051210 then {
12061211 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
12071212 if ((depositInsurance == depositInsurance))
12081213 then {
12091214 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, newPositionOpenNotional], nil)
12101215 if ((notifyNotional == notifyNotional))
12111216 then (((updatePosition(_trader, newPositionSize, newPositionMargin, newPositionOpenNotional, newPositionLstUpdCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, (totalLongPositionSize() - (if ((newPositionSize > 0))
12121217 then abs(exchangedPositionSize)
12131218 else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
12141219 then abs(exchangedPositionSize)
12151220 else 0)))) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance))
12161221 else throw("Strict value is not equal to itself.")
12171222 }
12181223 else throw("Strict value is not equal to itself.")
12191224 }
12201225 else throw("Strict value is not equal to itself.")
12211226 }
12221227 else throw("Strict value is not equal to itself.")
12231228 }
12241229 else {
1225- let $t05617956634 = internalClosePosition(_trader, false)
1226- let x1 = $t05617956634._1
1227- let badDebt = $t05617956634._2
1228- let x2 = $t05617956634._3
1229- let x3 = $t05617956634._4
1230- let quoteAssetReserveAfter = $t05617956634._5
1231- let baseAssetReserveAfter = $t05617956634._6
1232- let totalPositionSizeAfter = $t05617956634._7
1233- let cumulativeNotionalAfter = $t05617956634._8
1234- let openInterestNotionalAfter = $t05617956634._9
1235- let exchangedQuoteAssetAmount = $t05617956634._10
1236- let totalLongAfter = $t05617956634._11
1237- let totalShortAfter = $t05617956634._12
1230+ let $t05625956714 = internalClosePosition(_trader, false)
1231+ let x1 = $t05625956714._1
1232+ let badDebt = $t05625956714._2
1233+ let x2 = $t05625956714._3
1234+ let x3 = $t05625956714._4
1235+ let quoteAssetReserveAfter = $t05625956714._5
1236+ let baseAssetReserveAfter = $t05625956714._6
1237+ let totalPositionSizeAfter = $t05625956714._7
1238+ let cumulativeNotionalAfter = $t05625956714._8
1239+ let openInterestNotionalAfter = $t05625956714._9
1240+ let exchangedQuoteAssetAmount = $t05625956714._10
1241+ let totalLongAfter = $t05625956714._11
1242+ let totalShortAfter = $t05625956714._12
12381243 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
12391244 let feeToLiquidator = (liquidationPenalty / 2)
12401245 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
12411246 let ammBalance = (cbalance() - liquidationPenalty)
1242- let $t05704657189 = if ((0 > ammBalance))
1247+ let $t05712657269 = if ((0 > ammBalance))
12431248 then $Tuple2(0, abs(ammBalance))
12441249 else $Tuple2(ammBalance, 0)
1245- let newAmmBalance = $t05704657189._1
1246- let takeFromInsurance = $t05704657189._2
1250+ let newAmmBalance = $t05712657269._1
1251+ let takeFromInsurance = $t05712657269._2
12471252 let x = if ((takeFromInsurance > 0))
12481253 then {
12491254 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
12501255 if ((withdrawInsurance == withdrawInsurance))
12511256 then nil
12521257 else throw("Strict value is not equal to itself.")
12531258 }
12541259 else nil
12551260 if ((x == x))
12561261 then {
1257- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(liquidationPenalty - takeFromInsurance), toBase58String(quoteAsset())], nil)
1262+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), (liquidationPenalty - takeFromInsurance)], nil)
12581263 if ((unstake == unstake))
12591264 then {
12601265 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
12611266 if ((depositInsurance == depositInsurance))
12621267 then {
12631268 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, 0], nil)
12641269 if ((notifyNotional == notifyNotional))
12651270 then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance))
12661271 else throw("Strict value is not equal to itself.")
12671272 }
12681273 else throw("Strict value is not equal to itself.")
12691274 }
12701275 else throw("Strict value is not equal to itself.")
12711276 }
12721277 else throw("Strict value is not equal to itself.")
12731278 }
12741279 }
12751280
12761281
12771282
12781283 @Callable(i)
12791284 func payFunding () = {
12801285 let fundingBlockTimestamp = nextFundingBlockTimestamp()
12811286 if (if (if ((fundingBlockTimestamp > lastBlock.timestamp))
12821287 then true
12831288 else !(initialized()))
12841289 then true
12851290 else paused())
12861291 then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp)))
12871292 else {
12881293 let underlyingPrice = getOracleTwapPrice()
1289- let $t05868458746 = getFunding()
1290- let shortPremiumFraction = $t05868458746._1
1291- let longPremiumFraction = $t05868458746._2
1294+ let $t05875558817 = getFunding()
1295+ let shortPremiumFraction = $t05875558817._1
1296+ let longPremiumFraction = $t05875558817._2
12921297 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
12931298 }
12941299 }
12951300
12961301
12971302
12981303 @Callable(i)
12991304 func forceMoveAsset (_trader,_amount) = if (if ((addressFromPublicKey(adminPublicKey()) != i.caller))
13001305 then true
13011306 else (0 > _amount))
13021307 then throw("Invalid forceMoveAsset parameters")
13031308 else {
1304- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [_amount, toBase58String(quoteAsset())], nil)
1309+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), _amount], nil)
13051310 if ((unstake == unstake))
13061311 then (withdraw(addressFromStringValue(_trader), _amount) ++ updateBalance((cbalance() - _amount)))
13071312 else throw("Strict value is not equal to itself.")
13081313 }
13091314
13101315
13111316
13121317 @Callable(i)
13131318 func adjustPeg (_price) = if (if ((addressFromPublicKey(adminPublicKey()) != i.caller))
13141319 then true
13151320 else (0 > _price))
13161321 then throw("Invalid adjustPeg parameters")
13171322 else {
1318- let $t05974659832 = getPegAdjustCost(_price)
1319- let newQuoteAssetReserve = $t05974659832._1
1320- let pegChangeCost = $t05974659832._2
1323+ let $t05980859894 = getPegAdjustCost(_price)
1324+ let newQuoteAssetReserve = $t05980859894._1
1325+ let pegChangeCost = $t05980859894._2
13211326 if ((pegChangeCost == 0))
13221327 then throw("Nothing to adjust")
13231328 else if ((pegChangeCost > 0))
1324- then {
1325- let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [pegChangeCost], nil)
1326- if ((withdrawInsurance == withdrawInsurance))
1327- then {
1328- let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), pegChangeCost)])
1329- if ((stake == stake))
1330- then (updateBalance((cbalance() + pegChangeCost)) ++ updateAmmReserves(newQuoteAssetReserve, bsAstR()))
1331- else throw("Strict value is not equal to itself.")
1332- }
1333- else throw("Strict value is not equal to itself.")
1334- }
1329+ then updateAmmReserves(newQuoteAssetReserve, bsAstR())
13351330 else {
1336- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [abs(pegChangeCost), toBase58String(quoteAsset())], nil)
1331+ let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), abs(pegChangeCost)], nil)
13371332 if ((unstake == unstake))
13381333 then {
13391334 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), abs(pegChangeCost))])
13401335 if ((depositInsurance == depositInsurance))
13411336 then (updateBalance((cbalance() - abs(pegChangeCost))) ++ updateAmmReserves(newQuoteAssetReserve, bsAstR()))
13421337 else throw("Strict value is not equal to itself.")
13431338 }
13441339 else throw("Strict value is not equal to itself.")
13451340 }
13461341 }
13471342
13481343
13491344
13501345 @Callable(i)
1346+func migrateLiquidity () = {
1347+ let amount = cbalance()
1348+ let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [amount, toBase58String(quoteAsset())], nil)
1349+ if ((unstake == unstake))
1350+ then {
1351+ let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), amount)])
1352+ if ((stake == stake))
1353+ then nil
1354+ else throw("Strict value is not equal to itself.")
1355+ }
1356+ else throw("Strict value is not equal to itself.")
1357+ }
1358+
1359+
1360+
1361+@Callable(i)
13511362 func v_get (_trader) = {
1352- let $t06105761117 = internalClosePosition(_trader, false)
1353- let x1 = $t06105761117._1
1354- let x2 = $t06105761117._2
1355- let x3 = $t06105761117._3
1356- let x4 = $t06105761117._4
1363+ let $t06146361523 = internalClosePosition(_trader, false)
1364+ let x1 = $t06146361523._1
1365+ let x2 = $t06146361523._2
1366+ let x3 = $t06146361523._3
1367+ let x4 = $t06146361523._4
13571368 throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader))))
13581369 }
13591370
13601371
13611372
13621373 @Callable(i)
13631374 func view_calcRemainMarginWithFundingPayment (_trader) = {
1364- let $t06126461375 = getPosition(_trader)
1365- let positionSize = $t06126461375._1
1366- let positionMargin = $t06126461375._2
1367- let pon = $t06126461375._3
1368- let positionLstUpdCPF = $t06126461375._4
1369- let $t06138061481 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1370- let positionNotional = $t06138061481._1
1371- let unrealizedPnl = $t06138061481._2
1372- let $t06148661668 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1373- let remainMargin = $t06148661668._1
1374- let badDebt = $t06148661668._2
1375- let fundingPayment = $t06148661668._3
1375+ let $t06167061781 = getPosition(_trader)
1376+ let positionSize = $t06167061781._1
1377+ let positionMargin = $t06167061781._2
1378+ let pon = $t06167061781._3
1379+ let positionLstUpdCPF = $t06167061781._4
1380+ let $t06178661887 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1381+ let positionNotional = $t06178661887._1
1382+ let unrealizedPnl = $t06178661887._2
1383+ let $t06189262074 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1384+ let remainMargin = $t06189262074._1
1385+ let badDebt = $t06189262074._2
1386+ let fundingPayment = $t06189262074._3
13761387 throw((((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)) + s(badDebt)) + s(positionNotional)))
13771388 }
13781389
13791390
13801391
13811392 @Callable(i)
13821393 func view_getPegAdjustCost (_price) = {
13831394 let cost = getPegAdjustCost(_price)
13841395 throw(toString(cost._2))
13851396 }
13861397
13871398
13881399
13891400 @Callable(i)
13901401 func view_getFunding () = {
13911402 let underlyingPrice = getOracleTwapPrice()
1392- let $t06205962121 = getFunding()
1393- let shortPremiumFraction = $t06205962121._1
1394- let longPremiumFraction = $t06205962121._2
1403+ let $t06246562527 = getFunding()
1404+ let shortPremiumFraction = $t06246562527._1
1405+ let longPremiumFraction = $t06246562527._2
13951406 let longFunding = divd(longPremiumFraction, underlyingPrice)
13961407 let shortFunding = divd(shortPremiumFraction, underlyingPrice)
13971408 throw((((s(longFunding) + s(shortFunding)) + s(getTwapSpotPrice())) + s(getOracleTwapPrice())))
13981409 }
13991410
14001411
14011412 @Verifier(tx)
14021413 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], adminPublicKey())
14031414

github/deemru/w8io/169f3d6 
263.59 ms