tx · BSwAua8E9TJprwEtm7rx2UdLFgcSskLpGXvFA6XwnJHL

3MyKAZyGakn6DvvgePYccmeEFR5XufZHPmD:  -0.06000000 Waves

2022.10.25 14:27 [2287850] smart account 3MyKAZyGakn6DvvgePYccmeEFR5XufZHPmD > SELF 0.00000000 Waves

{ "type": 13, "id": "BSwAua8E9TJprwEtm7rx2UdLFgcSskLpGXvFA6XwnJHL", "fee": 6000000, "feeAssetId": null, "timestamp": 1666697288026, "version": 2, "chainId": 84, "sender": "3MyKAZyGakn6DvvgePYccmeEFR5XufZHPmD", "senderPublicKey": "6gi3c71QVs4Magr73Vi1QYfh6uvwCWeRju3mGGSVT2R4", "proofs": [ "4EyYeYrUjBdtxEtZrjgu8Fofv8GJtNQP3d6RUd1i1vSoA8qE2ect2c5YAEbh9wRSRE4DyJQr1PLxktfYJkvuDub8" ], "script": "base64:BgJxCAISABIAEgMKAQESAwoBARILCgkBAQEBAQEBAQESEAoOAQEBAQEBAQgICAEBAQESAwoBARIFCgMBAQESBgoEAQEBCBIAEgMKAQESABIDCgEIEgASBAoCCAESAwoBARIAEgMKAQgSAwoBCBIDCgEBEgCTAQAJa19vcmFfa2V5AglrX29yYV9rZXkAD2tfb3JhX2Jsb2NrX2tleQIPa19vcmFfYmxvY2tfa2V5AAVrX29yYQIFa19vcmEACWtfYmFsYW5jZQIJa19iYWxhbmNlAA5rX3Bvc2l0aW9uU2l6ZQIOa19wb3NpdGlvblNpemUAEGtfcG9zaXRpb25NYXJnaW4CEGtfcG9zaXRpb25NYXJnaW4AFmtfcG9zaXRpb25PcGVuTm90aW9uYWwCFmtfcG9zaXRpb25PcGVuTm90aW9uYWwALmtfcG9zaXRpb25MYXN0VXBkYXRlZEN1bXVsYXRpdmVQcmVtaXVtRnJhY3Rpb24CEmtfcG9zaXRpb25GcmFjdGlvbgAUa19wb3NpdGlvbkNsb3NlZERhdGUCFGtfcG9zaXRpb25DbG9zZWREYXRlAA1rX2luaXRpYWxpemVkAg1rX2luaXRpY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W1pdW1GcmFjdGlvbgUPdW5kZXJseWluZ1ByaWNlCQACAQkArAICCQCsAgIJAKwCAgkBAXMBBQtsb25nRnVuZGluZwkBAXMBBQxzaG9ydEZ1bmRpbmcJAQFzAQkBEGdldFR3YXBTcG90UHJpY2UACQEBcwEJARJnZXRPcmFjbGVUd2FwUHJpY2UAAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAkBDmFkbWluUHVibGljS2V5AOZfEiA=", "height": 2287850, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HhaRvdYRkFD5S7HeBgqbVUSxEZtqokKpSdL17jaRpppc Next: 12jwsvNBMHpiNmbzbvMVEzyfmn7cxFCr2QvdXxmqvY2v Diff:
OldNewDifferences
9797
9898 let k_manager_address = "k_manager_address"
9999
100+let k_nft_manager_address = "k_nft_manager_address"
101+
100102 func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set")
101103
102104
129131
130132 func managerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_manager_address)), "Manager not set")
131133
134+
135+func nftManagerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_nft_manager_address)), "NFT Manager not set")
136+
137+
138+let k_token_param = "k_token_param"
139+
140+let k_token_type = "k_token_type"
141+
142+let FEE_REDUCTION_TOKEN_TYPE = "fee_reduction"
132143
133144 let DIR_LONG = 1
134145
206217
207218
208219 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
220+
221+
222+func strA (_address,_key) = {
223+ let val = valueOrErrorMessage(getString(_address, _key), ("No value for key " + _key))
224+ val
225+ }
226+
227+
228+func intA (_address,_key) = {
229+ let val = valueOrErrorMessage(getInteger(_address, _key), ("No value for key " + _key))
230+ val
231+ }
209232
210233
211234 func cbalance () = int(k_balance)
347370 let amountBaseAssetBought = if (_isAdd)
348371 then amountBaseAssetBoughtAbs
349372 else -(amountBaseAssetBoughtAbs)
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
373+ let $t01366013853 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
374+ let quoteAssetReserveAfter1 = $t01366013853._1
375+ let baseAssetReserveAfter1 = $t01366013853._2
376+ let totalPositionSizeAfter1 = $t01366013853._3
377+ let cumulativeNotionalAfter1 = $t01366013853._4
355378 let priceBefore = divd(_qtAstR, _bsAstR)
356379 let marketPrice = divd(_quoteAssetAmount, amountBaseAssetBoughtAbs)
357380 let priceDiff = abs((priceBefore - marketPrice))
371394 }
372395 else 0
373396 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
374- let $t01470314830 = if ((0 > signedMargin))
397+ let $t01534415471 = if ((0 > signedMargin))
375398 then $Tuple2(0, abs(signedMargin))
376399 else $Tuple2(abs(signedMargin), 0)
377- let remainMargin = $t01470314830._1
378- let badDebt = $t01470314830._2
400+ let remainMargin = $t01534415471._1
401+ let badDebt = $t01534415471._2
379402 $Tuple3(remainMargin, badDebt, fundingPayment)
380403 }
381404
392415 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
393416 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetReserve))
394417 let maxPriceImpactValue = maxPriceImpact()
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
418+ let $t01644816641 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
419+ let quoteAssetReserveAfter1 = $t01644816641._1
420+ let baseAssetReserveAfter1 = $t01644816641._2
421+ let totalPositionSizeAfter1 = $t01644816641._3
422+ let cumulativeNotionalAfter1 = $t01644816641._4
400423 let marketPrice = divd(quoteAssetSold, _baseAssetAmount)
401424 let priceDiff = abs((priceBefore - marketPrice))
402425 let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
455478 let isShort = (0 > _positionSize)
456479 let positionNotional = if ((_option == PNL_OPTION_SPOT))
457480 then {
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
481+ let $t01985920030 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _baseAssetReserve)
482+ let outPositionNotional = $t01985920030._1
483+ let x1 = $t01985920030._2
484+ let x2 = $t01985920030._3
485+ let x3 = $t01985920030._4
463486 outPositionNotional
464487 }
465488 else muld(positionSizeAbs, getOracleTwapPrice())
480503
481504
482505 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
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
506+ let $t02134721475 = getPosition(_trader)
507+ let positionSize = $t02134721475._1
508+ let positionMargin = $t02134721475._2
509+ let positionOpenNotional = $t02134721475._3
510+ let positionLstUpdCPF = $t02134721475._4
488511 getPositionNotionalAndUnrealizedPnlByValues(positionSize, positionOpenNotional, qtAstR(), bsAstR(), _option)
489512 }
490513
493516
494517
495518 func getMarginRatioByOption (_trader,_option) = {
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
519+ let $t02195622067 = getPosition(_trader)
520+ let positionSize = $t02195622067._1
521+ let positionMargin = $t02195622067._2
522+ let pon = $t02195622067._3
523+ let positionLstUpdCPF = $t02195622067._4
524+ let $t02207322166 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
525+ let positionNotional = $t02207322166._1
526+ let unrealizedPnl = $t02207322166._2
527+ let $t02217122337 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
528+ let remainMargin = $t02217122337._1
529+ let badDebt = $t02217122337._2
507530 calcMarginRatio(remainMargin, badDebt, positionNotional)
508531 }
509532
528551
529552
530553 func internalClosePosition (_trader,_checkMaxPriceImpact) = {
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
554+ let $t02357023698 = getPosition(_trader)
555+ let positionSize = $t02357023698._1
556+ let positionMargin = $t02357023698._2
557+ let positionOpenNotional = $t02357023698._3
558+ let positionLstUpdCPF = $t02357023698._4
536559 let unrealizedPnl = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)._2
537- let $t02315223320 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
538- let remainMargin = $t02315223320._1
539- let badDebt = $t02315223320._2
560+ let $t02379323961 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
561+ let remainMargin = $t02379323961._1
562+ let badDebt = $t02379323961._2
540563 let exchangedPositionSize = -(positionSize)
541564 let realizedPnl = unrealizedPnl
542565 let marginToVault = -(remainMargin)
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
566+ let $t02408824399 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
567+ let exchangedQuoteAssetAmount = $t02408824399._1
568+ let quoteAssetReserveAfter = $t02408824399._2
569+ let baseAssetReserveAfter = $t02408824399._3
570+ let totalPositionSizeAfter = $t02408824399._4
571+ let cumulativeNotionalAfter = $t02408824399._5
572+ let totalLongAfter = $t02408824399._6
573+ let totalShortAfter = $t02408824399._7
551574 let openInterestNotionalAfter = (openInterestNotional() - positionOpenNotional)
552575 $Tuple12(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter)
553576 }
623646 }
624647
625648
649+func getAdjustedFee (i) = {
650+ let baseFee = fee()
651+ let $t02806228670 = if ((size(i.payments) > 1))
652+ then {
653+ let artifactId = toBase58String(valueOrErrorMessage(i.payments[1].assetId, "Invalid attached artifact"))
654+ let artifactKind = strA(nftManagerAddress(), toCompositeKey(k_token_type, artifactId))
655+ if ((artifactKind == FEE_REDUCTION_TOKEN_TYPE))
656+ then {
657+ let reduction = intA(nftManagerAddress(), toCompositeKey(k_token_param, artifactId))
658+ let adjustedFee = muld(baseFee, reduction)
659+ $Tuple2(adjustedFee, true)
660+ }
661+ else throw("Invalid attached artifact")
662+ }
663+ else $Tuple2(baseFee, false)
664+ let adjustedFee = $t02806228670._1
665+ let burnArtifact = $t02806228670._2
666+ $Tuple2(adjustedFee, burnArtifact)
667+ }
668+
669+
626670 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)]
627671
628672
685729
686730
687731 func transferFee (i) = [ScriptTransfer(stakingAddress(), i, quoteAsset())]
732+
733+
734+func doBurnArtifact (_burnArtifact,i) = if (_burnArtifact)
735+ then [Burn(valueOrErrorMessage(i.payments[1].assetId, "Invalid artifact"), 1)]
736+ else nil
688737
689738
690739 @Callable(i)
792841 else paused())
793842 then throw("Invalid decreasePosition parameters")
794843 else {
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
844+ let $t03908539237 = getPosition(toString(i.caller))
845+ let oldPositionSize = $t03908539237._1
846+ let oldPositionMargin = $t03908539237._2
847+ let oldPositionOpenNotional = $t03908539237._3
848+ let oldPositionLstUpdCPF = $t03908539237._4
800849 let _direction = if ((oldPositionSize > 0))
801850 then DIR_SHORT
802851 else DIR_LONG
803852 let isAdd = (_direction == DIR_LONG)
804853 let openNotional = muld(_amount, _leverage)
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))
854+ let $t03941039526 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
855+ let oldPositionNotional = $t03941039526._1
856+ let unrealizedPnl = $t03941039526._2
857+ let $t03953242081 = if ((oldPositionNotional > openNotional))
809858 then {
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
859+ let $t03990940128 = swapInput(isAdd, openNotional)
860+ let exchangedPositionSize = $t03990940128._1
861+ let quoteAssetReserveAfter = $t03990940128._2
862+ let baseAssetReserveAfter = $t03990940128._3
863+ let totalPositionSizeAfter = $t03990940128._4
864+ let cumulativeNotionalAfter = $t03990940128._5
816865 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
817866 if (if ((_minBaseAssetAmount != 0))
818867 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
820869 then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
821870 else {
822871 let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), abs(oldPositionSize))
823- let $t03901439259 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
824- let remainMargin = $t03901439259._1
825- let badDebt = $t03901439259._2
826- let fundingPayment = $t03901439259._3
872+ let $t04056540810 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
873+ let remainMargin = $t04056540810._1
874+ let badDebt = $t04056540810._2
875+ let fundingPayment = $t04056540810._3
827876 let exchangedQuoteAssetAmount = openNotional
828877 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
829878 let remainOpenNotional = if ((oldPositionSize > 0))
838887 }
839888 }
840889 else throw("Close position first")
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
890+ let newPositionSize = $t03953242081._1
891+ let newPositionRemainMargin = $t03953242081._2
892+ let newPositionOpenNotional = $t03953242081._3
893+ let newPositionLatestCPF = $t03953242081._4
894+ let baseAssetReserveAfter = $t03953242081._5
895+ let quoteAssetReserveAfter = $t03953242081._6
896+ let totalPositionSizeAfter = $t03953242081._7
897+ let cumulativeNotionalAfter = $t03953242081._8
898+ let openInterestNotionalAfter = $t03953242081._9
899+ let totalLongAfter = $t03953242081._10
900+ let totalShortAfter = $t03953242081._11
852901 let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), newPositionOpenNotional], nil)
853902 if ((notifyNotional == notifyNotional))
854903 then (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter))
876925 then throw("Invalid increasePosition parameters")
877926 else {
878927 let _trader = toString(i.caller)
879- let rawFeeAmount = muld(_rawAmount, fee())
928+ let baseFee = fee()
929+ let $t04319643247 = getAdjustedFee(i)
930+ let adjustedFee = $t04319643247._1
931+ let burnArtifact = $t04319643247._2
932+ let rawFeeAmount = muld(_rawAmount, adjustedFee)
880933 let referrerFeeAny = invoke(referralAddress(), "acceptPaymentWithLink", [_trader, _refLink], [AttachedPayment(quoteAsset(), rawFeeAmount)])
881934 if ((referrerFeeAny == referrerFeeAny))
882935 then {
888941 }
889942 let _amount = (_rawAmount - rawFeeAmount)
890943 let feeAmount = (rawFeeAmount - referrerFee)
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
944+ let $t04369643836 = getPosition(_trader)
945+ let oldPositionSize = $t04369643836._1
946+ let oldPositionMargin = $t04369643836._2
947+ let oldPositionOpenNotional = $t04369643836._3
948+ let oldPositionLstUpdCPF = $t04369643836._4
896949 let isNewPosition = (oldPositionSize == 0)
897950 let isSameDirection = if ((oldPositionSize > 0))
898951 then (_direction == DIR_LONG)
901954 then isSameDirection
902955 else false
903956 let isAdd = (_direction == DIR_LONG)
904- let $t04248845056 = if (if (isNewPosition)
957+ let $t04412546710 = if (if (isNewPosition)
905958 then true
906959 else expandExisting)
907960 then {
908961 let openNotional = muld(_amount, _leverage)
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
962+ let $t04454944755 = swapInput(isAdd, openNotional)
963+ let amountBaseAssetBought = $t04454944755._1
964+ let quoteAssetReserveAfter = $t04454944755._2
965+ let baseAssetReserveAfter = $t04454944755._3
966+ let totalPositionSizeAfter = $t04454944755._4
967+ let cumulativeNotionalAfter = $t04454944755._5
915968 if (if ((_minBaseAssetAmount != 0))
916969 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
917970 else false)
919972 else {
920973 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
921974 let increaseMarginRequirement = divd(openNotional, _leverage)
922- let $t04349943738 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
923- let remainMargin = $t04349943738._1
924- let x1 = $t04349943738._2
925- let x2 = $t04349943738._3
975+ let $t04513645375 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
976+ let remainMargin = $t04513645375._1
977+ let x1 = $t04513645375._2
978+ let x2 = $t04513645375._3
926979 if (!(requireNotOverSpreadLimit(quoteAssetReserveAfter, baseAssetReserveAfter)))
927980 then throw("Over max spread limit")
928981 else $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
934987 }
935988 else {
936989 let openNotional = muld(_amount, _leverage)
937- let $t04474944865 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
938- let oldPositionNotional = $t04474944865._1
939- let unrealizedPnl = $t04474944865._2
990+ let $t04640346519 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
991+ let oldPositionNotional = $t04640346519._1
992+ let unrealizedPnl = $t04640346519._2
940993 if ((oldPositionNotional > openNotional))
941994 then throw("Use decreasePosition to decrease position size")
942995 else throw("Close position first")
943996 }
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
997+ let newPositionSize = $t04412546710._1
998+ let newPositionRemainMargin = $t04412546710._2
999+ let newPositionOpenNotional = $t04412546710._3
1000+ let newPositionLatestCPF = $t04412546710._4
1001+ let baseAssetReserveAfter = $t04412546710._5
1002+ let quoteAssetReserveAfter = $t04412546710._6
1003+ let totalPositionSizeAfter = $t04412546710._7
1004+ let cumulativeNotionalAfter = $t04412546710._8
1005+ let openInterestNotionalAfter = $t04412546710._9
1006+ let totalLongAfter = $t04412546710._10
1007+ let totalShortAfter = $t04412546710._11
9551008 let feeToStakers = (feeAmount / 2)
9561009 let feeToInsurance = (feeAmount - feeToStakers)
9571010 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _amount)])
9651018 then {
9661019 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, newPositionOpenNotional], nil)
9671020 if ((notifyNotional == notifyNotional))
968- then (((updatePosition(_trader, newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
1021+ then ((((updatePosition(_trader, newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount))) ++ doBurnArtifact(burnArtifact, i))
9691022 else throw("Strict value is not equal to itself.")
9701023 }
9711024 else throw("Strict value is not equal to itself.")
9931046 then throw("Invalid addMargin parameters")
9941047 else {
9951048 let _trader = toString(i.caller)
996- let rawFeeAmount = muld(_rawAmount, fee())
1049+ let $t04817848229 = getAdjustedFee(i)
1050+ let adjustedFee = $t04817848229._1
1051+ let burnArtifact = $t04817848229._2
1052+ let rawFeeAmount = muld(_rawAmount, adjustedFee)
9971053 let referrerFeeAny = invoke(referralAddress(), "acceptPayment", [_trader], [AttachedPayment(quoteAsset(), rawFeeAmount)])
9981054 if ((referrerFeeAny == referrerFeeAny))
9991055 then {
10051061 }
10061062 let feeAmount = (rawFeeAmount - referrerFee)
10071063 let _amount = (_rawAmount - rawFeeAmount)
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
1064+ let $t04866148801 = getPosition(_trader)
1065+ let oldPositionSize = $t04866148801._1
1066+ let oldPositionMargin = $t04866148801._2
1067+ let oldPositionOpenNotional = $t04866148801._3
1068+ let oldPositionLstUpdCPF = $t04866148801._4
10131069 let feeToStakers = (feeAmount / 2)
10141070 let feeToInsurance = (feeAmount - feeToStakers)
10151071 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _amount)])
10201076 then {
10211077 let notifyFee = invoke(minerAddress(), "notifyFees", [_trader, feeAmount], nil)
10221078 if ((notifyFee == notifyFee))
1023- then ((updatePosition(_trader, oldPositionSize, (oldPositionMargin + _amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
1079+ then (((updatePosition(_trader, oldPositionSize, (oldPositionMargin + _amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount))) ++ doBurnArtifact(burnArtifact, i))
10241080 else throw("Strict value is not equal to itself.")
10251081 }
10261082 else throw("Strict value is not equal to itself.")
10431099 else paused())
10441100 then throw("Invalid removeMargin parameters")
10451101 else {
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
1102+ let $t04982049972 = getPosition(toString(i.caller))
1103+ let oldPositionSize = $t04982049972._1
1104+ let oldPositionMargin = $t04982049972._2
1105+ let oldPositionOpenNotional = $t04982049972._3
1106+ let oldPositionLstUpdCPF = $t04982049972._4
10511107 let marginDelta = -(_amount)
1052- let $t04820748386 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1053- let remainMargin = $t04820748386._1
1054- let badDebt = $t04820748386._2
1108+ let $t05000950188 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1109+ let remainMargin = $t05000950188._1
1110+ let badDebt = $t05000950188._2
10551111 if ((badDebt != 0))
10561112 then throw("Invalid removed margin amount")
10571113 else {
10801136 else paused())
10811137 then throw("Invalid closePosition parameters")
10821138 else {
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
1139+ let $t05138251759 = internalClosePosition(caller, true)
1140+ let x1 = $t05138251759._1
1141+ let positionBadDebt = $t05138251759._2
1142+ let realizedPnl = $t05138251759._3
1143+ let marginToVault = $t05138251759._4
1144+ let quoteAssetReserveAfter = $t05138251759._5
1145+ let baseAssetReserveAfter = $t05138251759._6
1146+ let totalPositionSizeAfter = $t05138251759._7
1147+ let cumulativeNotionalAfter = $t05138251759._8
1148+ let openInterestNotionalAfter = $t05138251759._9
1149+ let x2 = $t05138251759._10
1150+ let totalLongAfter = $t05138251759._11
1151+ let totalShortAfter = $t05138251759._12
10961152 if ((positionBadDebt > 0))
10971153 then throw("Unable to close position with bad debt")
10981154 else {
10991155 let withdrawAmount = abs(marginToVault)
11001156 let ammBalance = (cbalance() - withdrawAmount)
1101- let $t05016650308 = if ((0 > ammBalance))
1157+ let $t05196852110 = if ((0 > ammBalance))
11021158 then $Tuple2(0, abs(ammBalance))
11031159 else $Tuple2(ammBalance, 0)
1104- let ammNewBalance = $t05016650308._1
1105- let getFromInsurance = $t05016650308._2
1160+ let ammNewBalance = $t05196852110._1
1161+ let getFromInsurance = $t05196852110._2
11061162 let x = if ((getFromInsurance > 0))
11071163 then {
11081164 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil)
11531209 then (DECIMAL_UNIT > partialLiquidationRatio())
11541210 else false)
11551211 then {
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
1212+ let $t05418154331 = getPosition(_trader)
1213+ let oldPositionSize = $t05418154331._1
1214+ let oldPositionMargin = $t05418154331._2
1215+ let oldPositionOpenNotional = $t05418154331._3
1216+ let oldPositionLstUpdCPF = $t05418154331._4
11611217 let _direction = if ((oldPositionSize > 0))
11621218 then DIR_SHORT
11631219 else DIR_LONG
11641220 let isAdd = (_direction == DIR_LONG)
11651221 let exchangedQuoteAssetAmount = getPartialLiquidationAmount(_trader, oldPositionSize)
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
1222+ let $t05455654660 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1223+ let oldPositionNotional = $t05455654660._1
1224+ let unrealizedPnl = $t05455654660._2
1225+ let $t05466854958 = swapInput(isAdd, exchangedQuoteAssetAmount)
1226+ let exchangedPositionSize = $t05466854958._1
1227+ let quoteAssetReserveAfter = $t05466854958._2
1228+ let baseAssetReserveAfter = $t05466854958._3
1229+ let totalPositionSizeAfter = $t05466854958._4
1230+ let cumulativeNotionalAfter = $t05466854958._5
11751231 let realizedPnl = divd(muld(unrealizedPnl, abs(exchangedPositionSize)), abs(oldPositionSize))
1176- let $t05326353496 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1177- let remainMargin = $t05326353496._1
1178- let badDebt = $t05326353496._2
1179- let fundingPayment = $t05326353496._3
1232+ let $t05506555298 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1233+ let remainMargin = $t05506555298._1
1234+ let badDebt = $t05506555298._2
1235+ let fundingPayment = $t05506555298._3
11801236 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
11811237 let remainOpenNotional = if ((oldPositionSize > 0))
11821238 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
11901246 let newPositionLstUpdCPF = latestCumulativePremiumFraction(newPositionSize)
11911247 let openInterestNotionalAfter = (openInterestNotional() - exchangedQuoteAssetAmount)
11921248 let ammBalance = (cbalance() - liquidationPenalty)
1193- let $t05466954812 = if ((0 > ammBalance))
1249+ let $t05647156614 = if ((0 > ammBalance))
11941250 then $Tuple2(0, abs(ammBalance))
11951251 else $Tuple2(ammBalance, 0)
1196- let newAmmBalance = $t05466954812._1
1197- let takeFromInsurance = $t05466954812._2
1252+ let newAmmBalance = $t05647156614._1
1253+ let takeFromInsurance = $t05647156614._2
11981254 let x = if ((takeFromInsurance > 0))
11991255 then {
12001256 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
12271283 else throw("Strict value is not equal to itself.")
12281284 }
12291285 else {
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
1286+ let $t05806158516 = internalClosePosition(_trader, false)
1287+ let x1 = $t05806158516._1
1288+ let badDebt = $t05806158516._2
1289+ let x2 = $t05806158516._3
1290+ let x3 = $t05806158516._4
1291+ let quoteAssetReserveAfter = $t05806158516._5
1292+ let baseAssetReserveAfter = $t05806158516._6
1293+ let totalPositionSizeAfter = $t05806158516._7
1294+ let cumulativeNotionalAfter = $t05806158516._8
1295+ let openInterestNotionalAfter = $t05806158516._9
1296+ let exchangedQuoteAssetAmount = $t05806158516._10
1297+ let totalLongAfter = $t05806158516._11
1298+ let totalShortAfter = $t05806158516._12
12431299 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
12441300 let feeToLiquidator = (liquidationPenalty / 2)
12451301 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
12461302 let ammBalance = (cbalance() - liquidationPenalty)
1247- let $t05712657269 = if ((0 > ammBalance))
1303+ let $t05892859071 = if ((0 > ammBalance))
12481304 then $Tuple2(0, abs(ammBalance))
12491305 else $Tuple2(ammBalance, 0)
1250- let newAmmBalance = $t05712657269._1
1251- let takeFromInsurance = $t05712657269._2
1306+ let newAmmBalance = $t05892859071._1
1307+ let takeFromInsurance = $t05892859071._2
12521308 let x = if ((takeFromInsurance > 0))
12531309 then {
12541310 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
12911347 then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp)))
12921348 else {
12931349 let underlyingPrice = getOracleTwapPrice()
1294- let $t05875558817 = getFunding()
1295- let shortPremiumFraction = $t05875558817._1
1296- let longPremiumFraction = $t05875558817._2
1350+ let $t06055760619 = getFunding()
1351+ let shortPremiumFraction = $t06055760619._1
1352+ let longPremiumFraction = $t06055760619._2
12971353 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
12981354 }
12991355 }
13201376 else (0 > _price))
13211377 then throw("Invalid adjustPeg parameters")
13221378 else {
1323- let $t05980859894 = getPegAdjustCost(_price)
1324- let newQuoteAssetReserve = $t05980859894._1
1325- let pegChangeCost = $t05980859894._2
1379+ let $t06161061696 = getPegAdjustCost(_price)
1380+ let newQuoteAssetReserve = $t06161061696._1
1381+ let pegChangeCost = $t06161061696._2
13261382 if ((pegChangeCost == 0))
13271383 then throw("Nothing to adjust")
13281384 else if ((pegChangeCost > 0))
13451401 @Callable(i)
13461402 func migrateLiquidity () = {
13471403 let amount = cbalance()
1348- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [amount, toBase58String(quoteAsset())], nil)
1349- if ((unstake == unstake))
1404+ if ((amount > 0))
13501405 then {
1351- let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), amount)])
1352- if ((stake == stake))
1353- then nil
1406+ let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [amount, toBase58String(quoteAsset())], nil)
1407+ if ((unstake == unstake))
1408+ then {
1409+ let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), amount)])
1410+ if ((stake == stake))
1411+ then nil
1412+ else throw("Strict value is not equal to itself.")
1413+ }
13541414 else throw("Strict value is not equal to itself.")
13551415 }
1356- else throw("Strict value is not equal to itself.")
1416+ else nil
13571417 }
13581418
13591419
13601420
13611421 @Callable(i)
13621422 func v_get (_trader) = {
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
1423+ let $t06333763397 = internalClosePosition(_trader, false)
1424+ let x1 = $t06333763397._1
1425+ let x2 = $t06333763397._2
1426+ let x3 = $t06333763397._3
1427+ let x4 = $t06333763397._4
13681428 throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader))))
13691429 }
13701430
13721432
13731433 @Callable(i)
13741434 func view_calcRemainMarginWithFundingPayment (_trader) = {
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
1435+ let $t06354463655 = getPosition(_trader)
1436+ let positionSize = $t06354463655._1
1437+ let positionMargin = $t06354463655._2
1438+ let pon = $t06354463655._3
1439+ let positionLstUpdCPF = $t06354463655._4
1440+ let $t06366063761 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1441+ let positionNotional = $t06366063761._1
1442+ let unrealizedPnl = $t06366063761._2
1443+ let $t06376663948 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1444+ let remainMargin = $t06376663948._1
1445+ let badDebt = $t06376663948._2
1446+ let fundingPayment = $t06376663948._3
13871447 throw((((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)) + s(badDebt)) + s(positionNotional)))
13881448 }
13891449
14001460 @Callable(i)
14011461 func view_getFunding () = {
14021462 let underlyingPrice = getOracleTwapPrice()
1403- let $t06246562527 = getFunding()
1404- let shortPremiumFraction = $t06246562527._1
1405- let longPremiumFraction = $t06246562527._2
1463+ let $t06433964401 = getFunding()
1464+ let shortPremiumFraction = $t06433964401._1
1465+ let longPremiumFraction = $t06433964401._2
14061466 let longFunding = divd(longPremiumFraction, underlyingPrice)
14071467 let shortFunding = divd(shortPremiumFraction, underlyingPrice)
14081468 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
9898 let k_manager_address = "k_manager_address"
9999
100+let k_nft_manager_address = "k_nft_manager_address"
101+
100102 func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set")
101103
102104
103105 func adminAddress () = addressFromString(getStringValue(coordinator(), k_admin_address))
104106
105107
106108 func adminPublicKey () = fromBase58String(getStringValue(coordinator(), k_admin_public_key))
107109
108110
109111 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
110112
111113
112114 func quoteAssetStaking () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_quote_staking)), "Quote asset staking not set")
113115
114116
115117 func stakingAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_staking_address)), "Staking not set")
116118
117119
118120 func insuranceAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_insurance_address)), "Insurance not set")
119121
120122
121123 func minerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_miner_address)), "Miner not set")
122124
123125
124126 func ordersAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_orders_address)), "Orders not set")
125127
126128
127129 func referralAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_referral_address)), "Referral not set")
128130
129131
130132 func managerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_manager_address)), "Manager not set")
131133
134+
135+func nftManagerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_nft_manager_address)), "NFT Manager not set")
136+
137+
138+let k_token_param = "k_token_param"
139+
140+let k_token_type = "k_token_type"
141+
142+let FEE_REDUCTION_TOKEN_TYPE = "fee_reduction"
132143
133144 let DIR_LONG = 1
134145
135146 let DIR_SHORT = 2
136147
137148 let TWAP_INTERVAL = 15
138149
139150 let ORACLE_INTERVAL = 15
140151
141152 let SECONDS = 1000
142153
143154 let DECIMAL_UNIT = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
144155
145156 let ONE_DAY = (86400 * DECIMAL_UNIT)
146157
147158 let ALL_FEES = 100
148159
149160 let PNL_OPTION_SPOT = 1
150161
151162 let PNL_OPTION_ORACLE = 2
152163
153164 func s (_x) = (toString(_x) + ",")
154165
155166
156167 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
157168
158169
159170 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
160171
161172
162173 func abs (_x) = if ((_x > 0))
163174 then _x
164175 else -(_x)
165176
166177
167178 func vmax (_x,_y) = if ((_x >= _y))
168179 then _x
169180 else _y
170181
171182
172183 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
173184
174185
175186 func listToStr (_list) = {
176187 func _join (accumulator,val) = ((accumulator + val) + ",")
177188
178189 let newListStr = {
179190 let $l = _list
180191 let $s = size($l)
181192 let $acc0 = ""
182193 func $f0_1 ($a,$i) = if (($i >= $s))
183194 then $a
184195 else _join($a, $l[$i])
185196
186197 func $f0_2 ($a,$i) = if (($i >= $s))
187198 then $a
188199 else throw("List size exceeds 20")
189200
190201 $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)
191202 }
192203 let newListStrU = dropRight(newListStr, 1)
193204 let newListStrR = if ((take(newListStrU, 1) == ","))
194205 then drop(newListStrU, 1)
195206 else newListStrU
196207 newListStrR
197208 }
198209
199210
200211 func strToList (_str) = split(_str, ",")
201212
202213
203214 func pushToQueue (_list,_maxSize,_value) = if ((size(_list) > _maxSize))
204215 then (removeByIndex(_list, 0) :+ _value)
205216 else (_list :+ _value)
206217
207218
208219 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
220+
221+
222+func strA (_address,_key) = {
223+ let val = valueOrErrorMessage(getString(_address, _key), ("No value for key " + _key))
224+ val
225+ }
226+
227+
228+func intA (_address,_key) = {
229+ let val = valueOrErrorMessage(getInteger(_address, _key), ("No value for key " + _key))
230+ val
231+ }
209232
210233
211234 func cbalance () = int(k_balance)
212235
213236
214237 func fee () = int(k_fee)
215238
216239
217240 func initMarginRatio () = int(k_initMarginRatio)
218241
219242
220243 func qtAstR () = int(k_quoteAssetReserve)
221244
222245
223246 func bsAstR () = int(k_baseAssetReserve)
224247
225248
226249 func totalPositionSize () = int(k_totalPositionSize)
227250
228251
229252 func cumulativeNotional () = int(k_cumulativeNotional)
230253
231254
232255 func openInterestNotional () = int(k_openInterestNotional)
233256
234257
235258 func nextFundingBlockTimestamp () = int(k_nextFundingBlock)
236259
237260
238261 func fundingPeriodRaw () = int(k_fundingPeriod)
239262
240263
241264 func fundingPeriodDecimal () = (fundingPeriodRaw() * DECIMAL_UNIT)
242265
243266
244267 func fundingPeriodSeconds () = (fundingPeriodRaw() * SECONDS)
245268
246269
247270 func maintenanceMarginRatio () = int(k_maintenanceMarginRatio)
248271
249272
250273 func liquidationFeeRatio () = int(k_liquidationFeeRatio)
251274
252275
253276 func partialLiquidationRatio () = int(k_partialLiquidationRatio)
254277
255278
256279 func spreadLimit () = int(k_spreadLimit)
257280
258281
259282 func maxPriceImpact () = int(k_maxPriceImpact)
260283
261284
262285 func maxPriceSpread () = int(k_maxPriceSpread)
263286
264287
265288 func latestLongCumulativePremiumFraction () = int(k_latestLongCumulativePremiumFraction)
266289
267290
268291 func latestShortCumulativePremiumFraction () = int(k_latestShortCumulativePremiumFraction)
269292
270293
271294 func totalShortPositionSize () = int(k_totalShortPositionSize)
272295
273296
274297 func totalLongPositionSize () = int(k_totalLongPositionSize)
275298
276299
277300 func getActualCaller (i) = valueOrElse(getString(ordersAddress(), "k_sender"), toString(i.caller))
278301
279302
280303 func requireMoreMarginRatio (_marginRatio,_baseMarginRatio,_largerThanOrEqualTo) = {
281304 let remainingMarginRatio = (_marginRatio - _baseMarginRatio)
282305 if (if (_largerThanOrEqualTo)
283306 then (0 > remainingMarginRatio)
284307 else false)
285308 then throw("Invalid margin")
286309 else if (if (!(_largerThanOrEqualTo))
287310 then (remainingMarginRatio >= 0)
288311 else false)
289312 then throw("Invalid margin")
290313 else true
291314 }
292315
293316
294317 func latestCumulativePremiumFraction (_positionSize) = if ((_positionSize == 0))
295318 then throw("Should not be called with _positionSize == 0")
296319 else if ((_positionSize > 0))
297320 then latestLongCumulativePremiumFraction()
298321 else latestShortCumulativePremiumFraction()
299322
300323
301324 func getPosition (_trader) = {
302325 let positionSizeOpt = getInteger(this, toCompositeKey(k_positionSize, _trader))
303326 match positionSizeOpt {
304327 case positionSize: Int =>
305328 $Tuple4(positionSize, getIntegerValue(this, toCompositeKey(k_positionMargin, _trader)), getIntegerValue(this, toCompositeKey(k_positionOpenNotional, _trader)), getIntegerValue(this, toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _trader)))
306329 case _ =>
307330 $Tuple4(0, 0, 0, 0)
308331 }
309332 }
310333
311334
312335 func requireOpenPosition (_trader) = if ((getPosition(_trader)._1 == 0))
313336 then throw("No open position")
314337 else true
315338
316339
317340 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
318341
319342
320343 func paused () = valueOrElse(getBoolean(this, k_paused), false)
321344
322345
323346 func updateReserve (_isAdd,_quoteAssetAmount,_baseAssetAmount) = if (_isAdd)
324347 then {
325348 let newBase = (bsAstR() - _baseAssetAmount)
326349 if ((0 >= newBase))
327350 then throw("Tx lead to base asset reserve <= 0, revert")
328351 else $Tuple4((qtAstR() + _quoteAssetAmount), newBase, (totalPositionSize() + _baseAssetAmount), (cumulativeNotional() + _quoteAssetAmount))
329352 }
330353 else {
331354 let newQuote = (qtAstR() - _quoteAssetAmount)
332355 if ((0 >= newQuote))
333356 then throw("Tx lead to base quote reserve <= 0, revert")
334357 else $Tuple4(newQuote, (bsAstR() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount), (cumulativeNotional() - _quoteAssetAmount))
335358 }
336359
337360
338361 func swapInput (_isAdd,_quoteAssetAmount) = {
339362 let _qtAstR = qtAstR()
340363 let _bsAstR = bsAstR()
341364 let k = muld(_qtAstR, _bsAstR)
342365 let quoteAssetReserveAfter = if (_isAdd)
343366 then (_qtAstR + _quoteAssetAmount)
344367 else (_qtAstR - _quoteAssetAmount)
345368 let baseAssetReserveAfter = divd(k, quoteAssetReserveAfter)
346369 let amountBaseAssetBoughtAbs = abs((baseAssetReserveAfter - _bsAstR))
347370 let amountBaseAssetBought = if (_isAdd)
348371 then amountBaseAssetBoughtAbs
349372 else -(amountBaseAssetBoughtAbs)
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
373+ let $t01366013853 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
374+ let quoteAssetReserveAfter1 = $t01366013853._1
375+ let baseAssetReserveAfter1 = $t01366013853._2
376+ let totalPositionSizeAfter1 = $t01366013853._3
377+ let cumulativeNotionalAfter1 = $t01366013853._4
355378 let priceBefore = divd(_qtAstR, _bsAstR)
356379 let marketPrice = divd(_quoteAssetAmount, amountBaseAssetBoughtAbs)
357380 let priceDiff = abs((priceBefore - marketPrice))
358381 let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
359382 let maxPriceImpactValue = maxPriceImpact()
360383 if ((priceImpact > maxPriceImpactValue))
361384 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)))
362385 else $Tuple5(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
363386 }
364387
365388
366389 func calcRemainMarginWithFundingPayment (_oldPositionSize,_oldPositionMargin,_oldPositionCumulativePremiumFraction,_marginDelta) = {
367390 let fundingPayment = if ((_oldPositionSize != 0))
368391 then {
369392 let _latestCumulativePremiumFraction = latestCumulativePremiumFraction(_oldPositionSize)
370393 muld((_latestCumulativePremiumFraction - _oldPositionCumulativePremiumFraction), _oldPositionSize)
371394 }
372395 else 0
373396 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
374- let $t01470314830 = if ((0 > signedMargin))
397+ let $t01534415471 = if ((0 > signedMargin))
375398 then $Tuple2(0, abs(signedMargin))
376399 else $Tuple2(abs(signedMargin), 0)
377- let remainMargin = $t01470314830._1
378- let badDebt = $t01470314830._2
400+ let remainMargin = $t01534415471._1
401+ let badDebt = $t01534415471._2
379402 $Tuple3(remainMargin, badDebt, fundingPayment)
380403 }
381404
382405
383406 func swapOutputWithReserves (_isAdd,_baseAssetAmount,_checkMaxPriceImpact,_quoteAssetReserve,_baseAssetReserve) = {
384407 let priceBefore = divd(_quoteAssetReserve, _baseAssetReserve)
385408 if ((_baseAssetAmount == 0))
386409 then throw("Invalid base asset amount")
387410 else {
388411 let k = muld(_quoteAssetReserve, _baseAssetReserve)
389412 let baseAssetPoolAmountAfter = if (_isAdd)
390413 then (_baseAssetReserve + _baseAssetAmount)
391414 else (_baseAssetReserve - _baseAssetAmount)
392415 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
393416 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetReserve))
394417 let maxPriceImpactValue = maxPriceImpact()
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
418+ let $t01644816641 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
419+ let quoteAssetReserveAfter1 = $t01644816641._1
420+ let baseAssetReserveAfter1 = $t01644816641._2
421+ let totalPositionSizeAfter1 = $t01644816641._3
422+ let cumulativeNotionalAfter1 = $t01644816641._4
400423 let marketPrice = divd(quoteAssetSold, _baseAssetAmount)
401424 let priceDiff = abs((priceBefore - marketPrice))
402425 let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
403426 if (if ((priceImpact > maxPriceImpactValue))
404427 then _checkMaxPriceImpact
405428 else false)
406429 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)))
407430 else $Tuple8(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1, (totalLongPositionSize() - (if (_isAdd)
408431 then abs(_baseAssetAmount)
409432 else 0)), (totalShortPositionSize() - (if (!(_isAdd))
410433 then abs(_baseAssetAmount)
411434 else 0)), priceImpact)
412435 }
413436 }
414437
415438
416439 func swapOutput (_isAdd,_baseAssetAmount,_checkMaxPriceImpact) = swapOutputWithReserves(_isAdd, _baseAssetAmount, _checkMaxPriceImpact, qtAstR(), bsAstR())
417440
418441
419442 func getOracleTwapPrice () = {
420443 let oracle = valueOrErrorMessage(addressFromString(getStringValue(this, k_ora)), "")
421444 let priceKey = getStringValue(this, k_ora_key)
422445 let blockKey = getStringValue(this, k_ora_block_key)
423446 let lastValue = valueOrErrorMessage(getInteger(oracle, priceKey), ((("Can not get oracle price. Oracle: " + toString(oracle)) + " key: ") + priceKey))
424447 lastValue
425448 }
426449
427450
428451 func requireNotOverSpreadLimit (_quoteAssetReserve,_baseAssetReserve) = {
429452 let oraclePrice = getOracleTwapPrice()
430453 let priceAfter = divd(_quoteAssetReserve, _baseAssetReserve)
431454 let averagePrice = divd((oraclePrice + priceAfter), (2 * DECIMAL_UNIT))
432455 let absPriceDiff = divd(abs((oraclePrice - priceAfter)), averagePrice)
433456 if ((absPriceDiff > maxPriceSpread()))
434457 then throw(((("Price spread " + toString(absPriceDiff)) + " > max price spread ") + toString(maxPriceSpread())))
435458 else true
436459 }
437460
438461
439462 func getSpotPrice () = {
440463 let _quoteAssetReserve = qtAstR()
441464 let _baseAssetReserve = bsAstR()
442465 divd(_quoteAssetReserve, _baseAssetReserve)
443466 }
444467
445468
446469 func isOverFluctuationLimit () = {
447470 let oraclePrice = getOracleTwapPrice()
448471 let currentPrice = getSpotPrice()
449472 (divd(abs((oraclePrice - currentPrice)), oraclePrice) > spreadLimit())
450473 }
451474
452475
453476 func getPositionAdjustedOpenNotional (_positionSize,_option,_quoteAssetReserve,_baseAssetReserve) = {
454477 let positionSizeAbs = abs(_positionSize)
455478 let isShort = (0 > _positionSize)
456479 let positionNotional = if ((_option == PNL_OPTION_SPOT))
457480 then {
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
481+ let $t01985920030 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _baseAssetReserve)
482+ let outPositionNotional = $t01985920030._1
483+ let x1 = $t01985920030._2
484+ let x2 = $t01985920030._3
485+ let x3 = $t01985920030._4
463486 outPositionNotional
464487 }
465488 else muld(positionSizeAbs, getOracleTwapPrice())
466489 positionNotional
467490 }
468491
469492
470493 func getPositionNotionalAndUnrealizedPnlByValues (_positionSize,_positionOpenNotional,_quoteAssetReserve,_baseAssetReserve,_option) = if ((_positionSize == 0))
471494 then throw("Invalid position size")
472495 else {
473496 let isShort = (0 > _positionSize)
474497 let positionNotional = getPositionAdjustedOpenNotional(_positionSize, _option, _quoteAssetReserve, _baseAssetReserve)
475498 let unrealizedPnl = if (isShort)
476499 then (_positionOpenNotional - positionNotional)
477500 else (positionNotional - _positionOpenNotional)
478501 $Tuple2(positionNotional, unrealizedPnl)
479502 }
480503
481504
482505 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
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
506+ let $t02134721475 = getPosition(_trader)
507+ let positionSize = $t02134721475._1
508+ let positionMargin = $t02134721475._2
509+ let positionOpenNotional = $t02134721475._3
510+ let positionLstUpdCPF = $t02134721475._4
488511 getPositionNotionalAndUnrealizedPnlByValues(positionSize, positionOpenNotional, qtAstR(), bsAstR(), _option)
489512 }
490513
491514
492515 func calcMarginRatio (_remainMargin,_badDebt,_positionNotional) = divd((_remainMargin - _badDebt), _positionNotional)
493516
494517
495518 func getMarginRatioByOption (_trader,_option) = {
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
519+ let $t02195622067 = getPosition(_trader)
520+ let positionSize = $t02195622067._1
521+ let positionMargin = $t02195622067._2
522+ let pon = $t02195622067._3
523+ let positionLstUpdCPF = $t02195622067._4
524+ let $t02207322166 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
525+ let positionNotional = $t02207322166._1
526+ let unrealizedPnl = $t02207322166._2
527+ let $t02217122337 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
528+ let remainMargin = $t02217122337._1
529+ let badDebt = $t02217122337._2
507530 calcMarginRatio(remainMargin, badDebt, positionNotional)
508531 }
509532
510533
511534 func getMarginRatio (_trader) = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
512535
513536
514537 func getPartialLiquidationAmount (_trader,_positionSize) = {
515538 let maximumRatio = vmax(partialLiquidationRatio(), (DECIMAL_UNIT - divd(getMarginRatio(_trader), maintenanceMarginRatio())))
516539 let maxExchangedPositionSize = muld(abs(_positionSize), maximumRatio)
517540 let swapResult = swapOutput((_positionSize > 0), maxExchangedPositionSize, false)
518541 let maxExchangedQuoteAssetAmount = swapResult._1
519542 let priceImpact = swapResult._8
520543 if ((maxPriceImpact() > priceImpact))
521544 then maxExchangedQuoteAssetAmount
522545 else {
523546 let exchangedPositionSize = muld(abs(_positionSize), partialLiquidationRatio())
524547 let exchangedQuoteAssetAmount = swapOutput((_positionSize > 0), exchangedPositionSize, false)._1
525548 exchangedQuoteAssetAmount
526549 }
527550 }
528551
529552
530553 func internalClosePosition (_trader,_checkMaxPriceImpact) = {
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
554+ let $t02357023698 = getPosition(_trader)
555+ let positionSize = $t02357023698._1
556+ let positionMargin = $t02357023698._2
557+ let positionOpenNotional = $t02357023698._3
558+ let positionLstUpdCPF = $t02357023698._4
536559 let unrealizedPnl = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)._2
537- let $t02315223320 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
538- let remainMargin = $t02315223320._1
539- let badDebt = $t02315223320._2
560+ let $t02379323961 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
561+ let remainMargin = $t02379323961._1
562+ let badDebt = $t02379323961._2
540563 let exchangedPositionSize = -(positionSize)
541564 let realizedPnl = unrealizedPnl
542565 let marginToVault = -(remainMargin)
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
566+ let $t02408824399 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
567+ let exchangedQuoteAssetAmount = $t02408824399._1
568+ let quoteAssetReserveAfter = $t02408824399._2
569+ let baseAssetReserveAfter = $t02408824399._3
570+ let totalPositionSizeAfter = $t02408824399._4
571+ let cumulativeNotionalAfter = $t02408824399._5
572+ let totalLongAfter = $t02408824399._6
573+ let totalShortAfter = $t02408824399._7
551574 let openInterestNotionalAfter = (openInterestNotional() - positionOpenNotional)
552575 $Tuple12(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter)
553576 }
554577
555578
556579 func getTwapSpotPrice () = {
557580 let minuteId = ((lastBlock.timestamp / 1000) / 60)
558581 let startMinuteId = (minuteId - TWAP_INTERVAL)
559582 let listStr = valueOrElse(getString(this, k_lastDataStr), "")
560583 let list = split(listStr, ",")
561584 func filterFn (accumulator,next) = if ((startMinuteId >= parseIntValue(next)))
562585 then (accumulator :+ parseIntValue(next))
563586 else accumulator
564587
565588 let listF = {
566589 let $l = list
567590 let $s = size($l)
568591 let $acc0 = nil
569592 func $f0_1 ($a,$i) = if (($i >= $s))
570593 then $a
571594 else filterFn($a, $l[$i])
572595
573596 func $f0_2 ($a,$i) = if (($i >= $s))
574597 then $a
575598 else throw("List size exceeds 20")
576599
577600 $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)
578601 }
579602 let maxIndex = if ((size(listF) > 0))
580603 then max(listF)
581604 else parseIntValue(list[0])
582605 let lastMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
583606 let endLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(lastMinuteId))), 0)
584607 let endLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(lastMinuteId))), 0)
585608 let nowCumulativePrice = (endLastCumulativePrice + ((minuteId - lastMinuteId) * endLastPrice))
586609 let startLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(maxIndex))), 0)
587610 let startLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(maxIndex))), 0)
588611 let startCumulativePrice = (startLastCumulativePrice + ((startMinuteId - maxIndex) * startLastPrice))
589612 ((nowCumulativePrice - startCumulativePrice) / TWAP_INTERVAL)
590613 }
591614
592615
593616 func getPegAdjustCost (_price) = {
594617 let _positionSize = totalPositionSize()
595618 let direction = (_positionSize > 0)
596619 let currentNetMarketValue = swapOutput(direction, abs(_positionSize), false)._1
597620 let baseAssetReserve = bsAstR()
598621 let newQuoteAssetReserve = muld(baseAssetReserve, _price)
599622 let cost = getPositionNotionalAndUnrealizedPnlByValues(_positionSize, currentNetMarketValue, newQuoteAssetReserve, baseAssetReserve, PNL_OPTION_SPOT)._2
600623 $Tuple2(newQuoteAssetReserve, cost)
601624 }
602625
603626
604627 func getFunding () = {
605628 let underlyingPrice = getOracleTwapPrice()
606629 let spotTwapPrice = getTwapSpotPrice()
607630 let premium = (spotTwapPrice - underlyingPrice)
608631 if (if ((totalShortPositionSize() == 0))
609632 then true
610633 else (totalLongPositionSize() == 0))
611634 then $Tuple2(0, 0)
612635 else if ((0 > premium))
613636 then {
614637 let shortPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
615638 let longPremiumFraction = divd(muld(shortPremiumFraction, totalShortPositionSize()), totalLongPositionSize())
616639 $Tuple2(shortPremiumFraction, longPremiumFraction)
617640 }
618641 else {
619642 let longPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
620643 let shortPremiumFraction = divd(muld(longPremiumFraction, totalLongPositionSize()), totalShortPositionSize())
621644 $Tuple2(shortPremiumFraction, longPremiumFraction)
622645 }
623646 }
624647
625648
649+func getAdjustedFee (i) = {
650+ let baseFee = fee()
651+ let $t02806228670 = if ((size(i.payments) > 1))
652+ then {
653+ let artifactId = toBase58String(valueOrErrorMessage(i.payments[1].assetId, "Invalid attached artifact"))
654+ let artifactKind = strA(nftManagerAddress(), toCompositeKey(k_token_type, artifactId))
655+ if ((artifactKind == FEE_REDUCTION_TOKEN_TYPE))
656+ then {
657+ let reduction = intA(nftManagerAddress(), toCompositeKey(k_token_param, artifactId))
658+ let adjustedFee = muld(baseFee, reduction)
659+ $Tuple2(adjustedFee, true)
660+ }
661+ else throw("Invalid attached artifact")
662+ }
663+ else $Tuple2(baseFee, false)
664+ let adjustedFee = $t02806228670._1
665+ let burnArtifact = $t02806228670._2
666+ $Tuple2(adjustedFee, burnArtifact)
667+ }
668+
669+
626670 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)]
627671
628672
629673 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)]
630674
631675
632676 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)]
633677
634678
635679 func appendTwap (price) = {
636680 let minuteId = ((lastBlock.timestamp / 1000) / 60)
637681 let previousMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
638682 if ((previousMinuteId > minuteId))
639683 then throw("TWAP out-of-order")
640684 else {
641685 let lastMinuteId = if ((previousMinuteId == 0))
642686 then minuteId
643687 else previousMinuteId
644688 if ((minuteId > previousMinuteId))
645689 then {
646690 let prevCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(previousMinuteId))), 0)
647691 let prevPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(previousMinuteId))), price)
648692 let lastCumulativePrice = (prevCumulativePrice + ((minuteId - lastMinuteId) * prevPrice))
649693 let list = pushToQueue(strToList(valueOrElse(getString(this, k_lastDataStr), "")), TWAP_INTERVAL, toString(minuteId))
650694 [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))]
651695 }
652696 else {
653697 let twapDataPreviousMinuteId = valueOrElse(getInteger(this, toCompositeKey(k_twapDataPreviousMinuteId, toString(minuteId))), 0)
654698 let prevCumulativePrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastCumulativePrice, toString(twapDataPreviousMinuteId))), 0)
655699 let prevPrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastPrice, toString(twapDataPreviousMinuteId))), price)
656700 let lastCumulativePrice = (prevCumulativePrice + ((minuteId - twapDataPreviousMinuteId) * prevPrice))
657701 [IntegerEntry(toCompositeKey(k_twapDataLastCumulativePrice, toString(minuteId)), lastCumulativePrice), IntegerEntry(toCompositeKey(k_twapDataLastPrice, toString(minuteId)), price)]
658702 }
659703 }
660704 }
661705
662706
663707 func updateAmmReserves (_qtAstR,_bsAstR) = [IntegerEntry(k_quoteAssetReserve, _qtAstR), IntegerEntry(k_baseAssetReserve, _bsAstR)]
664708
665709
666710 func updateAmm (_qtAstR,_bsAstR,_totalPositionSizeAfter,_cumulativeNotionalAfter,_openInterestNotional,_totalLongPositionSize,_totalShortPositionSize) = if (((_totalLongPositionSize - _totalShortPositionSize) != _totalPositionSizeAfter))
667711 then throw(((((("Invalid AMM state data: " + toString(_totalLongPositionSize)) + " + ") + toString(_totalShortPositionSize)) + " != ") + toString(_totalPositionSizeAfter)))
668712 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)))
669713
670714
671715 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)]
672716
673717
674718 func withdraw (_address,_amount) = {
675719 let balance = assetBalance(this, quoteAsset())
676720 if ((_amount > balance))
677721 then throw(((("Unable to withdraw " + toString(_amount)) + " from contract balance ") + toString(balance)))
678722 else [ScriptTransfer(_address, _amount, quoteAsset())]
679723 }
680724
681725
682726 func updateBalance (i) = if ((0 > i))
683727 then throw("Balance")
684728 else [IntegerEntry(k_balance, i)]
685729
686730
687731 func transferFee (i) = [ScriptTransfer(stakingAddress(), i, quoteAsset())]
732+
733+
734+func doBurnArtifact (_burnArtifact,i) = if (_burnArtifact)
735+ then [Burn(valueOrErrorMessage(i.payments[1].assetId, "Invalid artifact"), 1)]
736+ else nil
688737
689738
690739 @Callable(i)
691740 func pause () = if ((i.caller != adminAddress()))
692741 then throw("Invalid togglePause params")
693742 else [BooleanEntry(k_paused, true)]
694743
695744
696745
697746 @Callable(i)
698747 func unpause () = if ((i.caller != adminAddress()))
699748 then throw("Invalid togglePause params")
700749 else [BooleanEntry(k_paused, false)]
701750
702751
703752
704753 @Callable(i)
705754 func addLiquidity (_quoteAssetAmount) = if (if ((i.caller != adminAddress()))
706755 then true
707756 else (0 >= _quoteAssetAmount))
708757 then throw("Invalid addLiquidity params")
709758 else {
710759 let _qtAstR = qtAstR()
711760 let _bsAstR = bsAstR()
712761 let price = divd(_qtAstR, _bsAstR)
713762 let baseAssetAmountToAdd = divd(_quoteAssetAmount, price)
714763 let qtAstRAfter = (_qtAstR + _quoteAssetAmount)
715764 let bsAstRAfter = (_bsAstR + baseAssetAmountToAdd)
716765 updateAmmReserves(qtAstRAfter, bsAstRAfter)
717766 }
718767
719768
720769
721770 @Callable(i)
722771 func removeLiquidity (_quoteAssetAmount) = if (if ((i.caller != adminAddress()))
723772 then true
724773 else (0 >= _quoteAssetAmount))
725774 then throw("Invalid removeLiquidity params")
726775 else {
727776 let _qtAstR = qtAstR()
728777 let _bsAstR = bsAstR()
729778 let price = divd(_qtAstR, _bsAstR)
730779 let baseAssetAmountToRemove = divd(_quoteAssetAmount, price)
731780 let qtAstRAfter = (_qtAstR - _quoteAssetAmount)
732781 let bsAstRAfter = (_bsAstR - baseAssetAmountToRemove)
733782 updateAmmReserves(qtAstRAfter, bsAstRAfter)
734783 }
735784
736785
737786
738787 @Callable(i)
739788 func changeSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact,_partialLiquidationRatio,_maxPriceSpread) = if ((i.caller != adminAddress()))
740789 then throw("Invalid changeSettings params")
741790 else updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact, _partialLiquidationRatio, _maxPriceSpread)
742791
743792
744793
745794 @Callable(i)
746795 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))
747796 then true
748797 else (0 >= _bsAstR))
749798 then true
750799 else (0 >= _fundingPeriod))
751800 then true
752801 else (0 >= _initMarginRatio))
753802 then true
754803 else (0 >= _mmr))
755804 then true
756805 else (0 >= _liquidationFeeRatio))
757806 then true
758807 else (0 >= _fee))
759808 then true
760809 else (0 >= _spreadLimit))
761810 then true
762811 else (0 >= _maxPriceImpact))
763812 then true
764813 else (0 >= _partialLiquidationRatio))
765814 then true
766815 else (0 >= _maxPriceSpread))
767816 then true
768817 else initialized())
769818 then throw("Invalid initialize parameters")
770819 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)])
771820
772821
773822
774823 @Callable(i)
775824 func setInitMarginRatio (_initMarginRatio) = if (if ((0 >= _initMarginRatio))
776825 then true
777826 else !(initialized()))
778827 then throw("Invalid setInitMarginRatio parameters")
779828 else updateSettings(_initMarginRatio, maintenanceMarginRatio(), liquidationFeeRatio(), fundingPeriodRaw(), fee(), spreadLimit(), maxPriceImpact(), partialLiquidationRatio(), maxPriceSpread())
780829
781830
782831
783832 @Callable(i)
784833 func decreasePosition (_amount,_leverage,_minBaseAssetAmount) = if (if (if (if (if ((0 >= _amount))
785834 then true
786835 else !(initialized()))
787836 then true
788837 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
789838 then true
790839 else !(requireOpenPosition(toString(i.caller))))
791840 then true
792841 else paused())
793842 then throw("Invalid decreasePosition parameters")
794843 else {
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
844+ let $t03908539237 = getPosition(toString(i.caller))
845+ let oldPositionSize = $t03908539237._1
846+ let oldPositionMargin = $t03908539237._2
847+ let oldPositionOpenNotional = $t03908539237._3
848+ let oldPositionLstUpdCPF = $t03908539237._4
800849 let _direction = if ((oldPositionSize > 0))
801850 then DIR_SHORT
802851 else DIR_LONG
803852 let isAdd = (_direction == DIR_LONG)
804853 let openNotional = muld(_amount, _leverage)
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))
854+ let $t03941039526 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
855+ let oldPositionNotional = $t03941039526._1
856+ let unrealizedPnl = $t03941039526._2
857+ let $t03953242081 = if ((oldPositionNotional > openNotional))
809858 then {
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
859+ let $t03990940128 = swapInput(isAdd, openNotional)
860+ let exchangedPositionSize = $t03990940128._1
861+ let quoteAssetReserveAfter = $t03990940128._2
862+ let baseAssetReserveAfter = $t03990940128._3
863+ let totalPositionSizeAfter = $t03990940128._4
864+ let cumulativeNotionalAfter = $t03990940128._5
816865 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
817866 if (if ((_minBaseAssetAmount != 0))
818867 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
819868 else false)
820869 then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
821870 else {
822871 let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), abs(oldPositionSize))
823- let $t03901439259 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
824- let remainMargin = $t03901439259._1
825- let badDebt = $t03901439259._2
826- let fundingPayment = $t03901439259._3
872+ let $t04056540810 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
873+ let remainMargin = $t04056540810._1
874+ let badDebt = $t04056540810._2
875+ let fundingPayment = $t04056540810._3
827876 let exchangedQuoteAssetAmount = openNotional
828877 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
829878 let remainOpenNotional = if ((oldPositionSize > 0))
830879 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
831880 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
832881 let newPositionSize = (oldPositionSize + exchangedPositionSize)
833882 $Tuple11(newPositionSize, remainMargin, abs(remainOpenNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() - openNotional), (totalLongPositionSize() - (if ((newPositionSize > 0))
834883 then abs(exchangedPositionSize)
835884 else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
836885 then abs(exchangedPositionSize)
837886 else 0)))
838887 }
839888 }
840889 else throw("Close position first")
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
890+ let newPositionSize = $t03953242081._1
891+ let newPositionRemainMargin = $t03953242081._2
892+ let newPositionOpenNotional = $t03953242081._3
893+ let newPositionLatestCPF = $t03953242081._4
894+ let baseAssetReserveAfter = $t03953242081._5
895+ let quoteAssetReserveAfter = $t03953242081._6
896+ let totalPositionSizeAfter = $t03953242081._7
897+ let cumulativeNotionalAfter = $t03953242081._8
898+ let openInterestNotionalAfter = $t03953242081._9
899+ let totalLongAfter = $t03953242081._10
900+ let totalShortAfter = $t03953242081._11
852901 let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), newPositionOpenNotional], nil)
853902 if ((notifyNotional == notifyNotional))
854903 then (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter))
855904 else throw("Strict value is not equal to itself.")
856905 }
857906
858907
859908
860909 @Callable(i)
861910 func increasePosition (_direction,_leverage,_minBaseAssetAmount,_refLink) = {
862911 let _rawAmount = i.payments[0].amount
863912 if (if (if (if (if (if (if ((_direction != DIR_LONG))
864913 then (_direction != DIR_SHORT)
865914 else false)
866915 then true
867916 else (0 >= _rawAmount))
868917 then true
869918 else !(initialized()))
870919 then true
871920 else (i.payments[0].assetId != quoteAsset()))
872921 then true
873922 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
874923 then true
875924 else paused())
876925 then throw("Invalid increasePosition parameters")
877926 else {
878927 let _trader = toString(i.caller)
879- let rawFeeAmount = muld(_rawAmount, fee())
928+ let baseFee = fee()
929+ let $t04319643247 = getAdjustedFee(i)
930+ let adjustedFee = $t04319643247._1
931+ let burnArtifact = $t04319643247._2
932+ let rawFeeAmount = muld(_rawAmount, adjustedFee)
880933 let referrerFeeAny = invoke(referralAddress(), "acceptPaymentWithLink", [_trader, _refLink], [AttachedPayment(quoteAsset(), rawFeeAmount)])
881934 if ((referrerFeeAny == referrerFeeAny))
882935 then {
883936 let referrerFee = match referrerFeeAny {
884937 case x: Int =>
885938 x
886939 case _ =>
887940 throw("Invalid referrerFee")
888941 }
889942 let _amount = (_rawAmount - rawFeeAmount)
890943 let feeAmount = (rawFeeAmount - referrerFee)
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
944+ let $t04369643836 = getPosition(_trader)
945+ let oldPositionSize = $t04369643836._1
946+ let oldPositionMargin = $t04369643836._2
947+ let oldPositionOpenNotional = $t04369643836._3
948+ let oldPositionLstUpdCPF = $t04369643836._4
896949 let isNewPosition = (oldPositionSize == 0)
897950 let isSameDirection = if ((oldPositionSize > 0))
898951 then (_direction == DIR_LONG)
899952 else (_direction == DIR_SHORT)
900953 let expandExisting = if (!(isNewPosition))
901954 then isSameDirection
902955 else false
903956 let isAdd = (_direction == DIR_LONG)
904- let $t04248845056 = if (if (isNewPosition)
957+ let $t04412546710 = if (if (isNewPosition)
905958 then true
906959 else expandExisting)
907960 then {
908961 let openNotional = muld(_amount, _leverage)
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
962+ let $t04454944755 = swapInput(isAdd, openNotional)
963+ let amountBaseAssetBought = $t04454944755._1
964+ let quoteAssetReserveAfter = $t04454944755._2
965+ let baseAssetReserveAfter = $t04454944755._3
966+ let totalPositionSizeAfter = $t04454944755._4
967+ let cumulativeNotionalAfter = $t04454944755._5
915968 if (if ((_minBaseAssetAmount != 0))
916969 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
917970 else false)
918971 then throw(((("Limit error: " + toString(abs(amountBaseAssetBought))) + " < ") + toString(_minBaseAssetAmount)))
919972 else {
920973 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
921974 let increaseMarginRequirement = divd(openNotional, _leverage)
922- let $t04349943738 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
923- let remainMargin = $t04349943738._1
924- let x1 = $t04349943738._2
925- let x2 = $t04349943738._3
975+ let $t04513645375 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
976+ let remainMargin = $t04513645375._1
977+ let x1 = $t04513645375._2
978+ let x2 = $t04513645375._3
926979 if (!(requireNotOverSpreadLimit(quoteAssetReserveAfter, baseAssetReserveAfter)))
927980 then throw("Over max spread limit")
928981 else $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
929982 then abs(amountBaseAssetBought)
930983 else 0)), (totalShortPositionSize() + (if ((0 > newPositionSize))
931984 then abs(amountBaseAssetBought)
932985 else 0)))
933986 }
934987 }
935988 else {
936989 let openNotional = muld(_amount, _leverage)
937- let $t04474944865 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
938- let oldPositionNotional = $t04474944865._1
939- let unrealizedPnl = $t04474944865._2
990+ let $t04640346519 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
991+ let oldPositionNotional = $t04640346519._1
992+ let unrealizedPnl = $t04640346519._2
940993 if ((oldPositionNotional > openNotional))
941994 then throw("Use decreasePosition to decrease position size")
942995 else throw("Close position first")
943996 }
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
997+ let newPositionSize = $t04412546710._1
998+ let newPositionRemainMargin = $t04412546710._2
999+ let newPositionOpenNotional = $t04412546710._3
1000+ let newPositionLatestCPF = $t04412546710._4
1001+ let baseAssetReserveAfter = $t04412546710._5
1002+ let quoteAssetReserveAfter = $t04412546710._6
1003+ let totalPositionSizeAfter = $t04412546710._7
1004+ let cumulativeNotionalAfter = $t04412546710._8
1005+ let openInterestNotionalAfter = $t04412546710._9
1006+ let totalLongAfter = $t04412546710._10
1007+ let totalShortAfter = $t04412546710._11
9551008 let feeToStakers = (feeAmount / 2)
9561009 let feeToInsurance = (feeAmount - feeToStakers)
9571010 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _amount)])
9581011 if ((stake == stake))
9591012 then {
9601013 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
9611014 if ((depositInsurance == depositInsurance))
9621015 then {
9631016 let notifyFee = invoke(minerAddress(), "notifyFees", [_trader, feeAmount], nil)
9641017 if ((notifyFee == notifyFee))
9651018 then {
9661019 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, newPositionOpenNotional], nil)
9671020 if ((notifyNotional == notifyNotional))
968- then (((updatePosition(_trader, newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
1021+ then ((((updatePosition(_trader, newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount))) ++ doBurnArtifact(burnArtifact, i))
9691022 else throw("Strict value is not equal to itself.")
9701023 }
9711024 else throw("Strict value is not equal to itself.")
9721025 }
9731026 else throw("Strict value is not equal to itself.")
9741027 }
9751028 else throw("Strict value is not equal to itself.")
9761029 }
9771030 else throw("Strict value is not equal to itself.")
9781031 }
9791032 }
9801033
9811034
9821035
9831036 @Callable(i)
9841037 func addMargin () = {
9851038 let _rawAmount = i.payments[0].amount
9861039 if (if (if (if ((i.payments[0].assetId != quoteAsset()))
9871040 then true
9881041 else !(requireOpenPosition(toString(i.caller))))
9891042 then true
9901043 else !(initialized()))
9911044 then true
9921045 else paused())
9931046 then throw("Invalid addMargin parameters")
9941047 else {
9951048 let _trader = toString(i.caller)
996- let rawFeeAmount = muld(_rawAmount, fee())
1049+ let $t04817848229 = getAdjustedFee(i)
1050+ let adjustedFee = $t04817848229._1
1051+ let burnArtifact = $t04817848229._2
1052+ let rawFeeAmount = muld(_rawAmount, adjustedFee)
9971053 let referrerFeeAny = invoke(referralAddress(), "acceptPayment", [_trader], [AttachedPayment(quoteAsset(), rawFeeAmount)])
9981054 if ((referrerFeeAny == referrerFeeAny))
9991055 then {
10001056 let referrerFee = match referrerFeeAny {
10011057 case x: Int =>
10021058 x
10031059 case _ =>
10041060 throw("Invalid referrerFee")
10051061 }
10061062 let feeAmount = (rawFeeAmount - referrerFee)
10071063 let _amount = (_rawAmount - rawFeeAmount)
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
1064+ let $t04866148801 = getPosition(_trader)
1065+ let oldPositionSize = $t04866148801._1
1066+ let oldPositionMargin = $t04866148801._2
1067+ let oldPositionOpenNotional = $t04866148801._3
1068+ let oldPositionLstUpdCPF = $t04866148801._4
10131069 let feeToStakers = (feeAmount / 2)
10141070 let feeToInsurance = (feeAmount - feeToStakers)
10151071 let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), _amount)])
10161072 if ((stake == stake))
10171073 then {
10181074 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
10191075 if ((depositInsurance == depositInsurance))
10201076 then {
10211077 let notifyFee = invoke(minerAddress(), "notifyFees", [_trader, feeAmount], nil)
10221078 if ((notifyFee == notifyFee))
1023- then ((updatePosition(_trader, oldPositionSize, (oldPositionMargin + _amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
1079+ then (((updatePosition(_trader, oldPositionSize, (oldPositionMargin + _amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount))) ++ doBurnArtifact(burnArtifact, i))
10241080 else throw("Strict value is not equal to itself.")
10251081 }
10261082 else throw("Strict value is not equal to itself.")
10271083 }
10281084 else throw("Strict value is not equal to itself.")
10291085 }
10301086 else throw("Strict value is not equal to itself.")
10311087 }
10321088 }
10331089
10341090
10351091
10361092 @Callable(i)
10371093 func removeMargin (_amount) = if (if (if (if ((0 >= _amount))
10381094 then true
10391095 else !(requireOpenPosition(toString(i.caller))))
10401096 then true
10411097 else !(initialized()))
10421098 then true
10431099 else paused())
10441100 then throw("Invalid removeMargin parameters")
10451101 else {
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
1102+ let $t04982049972 = getPosition(toString(i.caller))
1103+ let oldPositionSize = $t04982049972._1
1104+ let oldPositionMargin = $t04982049972._2
1105+ let oldPositionOpenNotional = $t04982049972._3
1106+ let oldPositionLstUpdCPF = $t04982049972._4
10511107 let marginDelta = -(_amount)
1052- let $t04820748386 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1053- let remainMargin = $t04820748386._1
1054- let badDebt = $t04820748386._2
1108+ let $t05000950188 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
1109+ let remainMargin = $t05000950188._1
1110+ let badDebt = $t05000950188._2
10551111 if ((badDebt != 0))
10561112 then throw("Invalid removed margin amount")
10571113 else {
10581114 let marginRatio = calcMarginRatio(remainMargin, badDebt, oldPositionOpenNotional)
10591115 if (!(requireMoreMarginRatio(marginRatio, initMarginRatio(), true)))
10601116 then throw(((("Too much margin removed: " + toString(marginRatio)) + " < ") + toString(initMarginRatio())))
10611117 else {
10621118 let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), _amount], nil)
10631119 if ((unstake == unstake))
10641120 then ((updatePosition(toString(i.caller), oldPositionSize, remainMargin, oldPositionOpenNotional, latestCumulativePremiumFraction(oldPositionSize)) ++ withdraw(i.caller, _amount)) ++ updateBalance((cbalance() - _amount)))
10651121 else throw("Strict value is not equal to itself.")
10661122 }
10671123 }
10681124 }
10691125
10701126
10711127
10721128 @Callable(i)
10731129 func closePosition () = {
10741130 let caller = getActualCaller(i)
10751131 let callerAddress = valueOrErrorMessage(addressFromString(caller), "Invalid caller")
10761132 if (if (if (!(requireOpenPosition(caller)))
10771133 then true
10781134 else !(initialized()))
10791135 then true
10801136 else paused())
10811137 then throw("Invalid closePosition parameters")
10821138 else {
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
1139+ let $t05138251759 = internalClosePosition(caller, true)
1140+ let x1 = $t05138251759._1
1141+ let positionBadDebt = $t05138251759._2
1142+ let realizedPnl = $t05138251759._3
1143+ let marginToVault = $t05138251759._4
1144+ let quoteAssetReserveAfter = $t05138251759._5
1145+ let baseAssetReserveAfter = $t05138251759._6
1146+ let totalPositionSizeAfter = $t05138251759._7
1147+ let cumulativeNotionalAfter = $t05138251759._8
1148+ let openInterestNotionalAfter = $t05138251759._9
1149+ let x2 = $t05138251759._10
1150+ let totalLongAfter = $t05138251759._11
1151+ let totalShortAfter = $t05138251759._12
10961152 if ((positionBadDebt > 0))
10971153 then throw("Unable to close position with bad debt")
10981154 else {
10991155 let withdrawAmount = abs(marginToVault)
11001156 let ammBalance = (cbalance() - withdrawAmount)
1101- let $t05016650308 = if ((0 > ammBalance))
1157+ let $t05196852110 = if ((0 > ammBalance))
11021158 then $Tuple2(0, abs(ammBalance))
11031159 else $Tuple2(ammBalance, 0)
1104- let ammNewBalance = $t05016650308._1
1105- let getFromInsurance = $t05016650308._2
1160+ let ammNewBalance = $t05196852110._1
1161+ let getFromInsurance = $t05196852110._2
11061162 let x = if ((getFromInsurance > 0))
11071163 then {
11081164 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil)
11091165 if ((withdrawInsurance == withdrawInsurance))
11101166 then nil
11111167 else throw("Strict value is not equal to itself.")
11121168 }
11131169 else nil
11141170 if ((x == x))
11151171 then {
11161172 let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), (withdrawAmount - getFromInsurance)], nil)
11171173 if ((unstake == unstake))
11181174 then {
11191175 let notifyNotional = invoke(minerAddress(), "notifyNotional", [caller, 0], nil)
11201176 if ((notifyNotional == notifyNotional))
11211177 then (((deletePosition(caller) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(callerAddress, withdrawAmount)) ++ updateBalance(ammNewBalance))
11221178 else throw("Strict value is not equal to itself.")
11231179 }
11241180 else throw("Strict value is not equal to itself.")
11251181 }
11261182 else throw("Strict value is not equal to itself.")
11271183 }
11281184 }
11291185 }
11301186
11311187
11321188
11331189 @Callable(i)
11341190 func liquidate (_trader) = {
11351191 let spotMarginRatio = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
11361192 let marginRatio = if (isOverFluctuationLimit())
11371193 then {
11381194 let oracleMarginRatio = getMarginRatioByOption(_trader, PNL_OPTION_ORACLE)
11391195 vmax(spotMarginRatio, oracleMarginRatio)
11401196 }
11411197 else spotMarginRatio
11421198 if (if (if (if (!(requireMoreMarginRatio(marginRatio, maintenanceMarginRatio(), false)))
11431199 then true
11441200 else !(requireOpenPosition(_trader)))
11451201 then true
11461202 else !(initialized()))
11471203 then true
11481204 else paused())
11491205 then throw("Unable to liquidate")
11501206 else if (if (if ((spotMarginRatio > liquidationFeeRatio()))
11511207 then (partialLiquidationRatio() > 0)
11521208 else false)
11531209 then (DECIMAL_UNIT > partialLiquidationRatio())
11541210 else false)
11551211 then {
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
1212+ let $t05418154331 = getPosition(_trader)
1213+ let oldPositionSize = $t05418154331._1
1214+ let oldPositionMargin = $t05418154331._2
1215+ let oldPositionOpenNotional = $t05418154331._3
1216+ let oldPositionLstUpdCPF = $t05418154331._4
11611217 let _direction = if ((oldPositionSize > 0))
11621218 then DIR_SHORT
11631219 else DIR_LONG
11641220 let isAdd = (_direction == DIR_LONG)
11651221 let exchangedQuoteAssetAmount = getPartialLiquidationAmount(_trader, oldPositionSize)
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
1222+ let $t05455654660 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1223+ let oldPositionNotional = $t05455654660._1
1224+ let unrealizedPnl = $t05455654660._2
1225+ let $t05466854958 = swapInput(isAdd, exchangedQuoteAssetAmount)
1226+ let exchangedPositionSize = $t05466854958._1
1227+ let quoteAssetReserveAfter = $t05466854958._2
1228+ let baseAssetReserveAfter = $t05466854958._3
1229+ let totalPositionSizeAfter = $t05466854958._4
1230+ let cumulativeNotionalAfter = $t05466854958._5
11751231 let realizedPnl = divd(muld(unrealizedPnl, abs(exchangedPositionSize)), abs(oldPositionSize))
1176- let $t05326353496 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1177- let remainMargin = $t05326353496._1
1178- let badDebt = $t05326353496._2
1179- let fundingPayment = $t05326353496._3
1232+ let $t05506555298 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
1233+ let remainMargin = $t05506555298._1
1234+ let badDebt = $t05506555298._2
1235+ let fundingPayment = $t05506555298._3
11801236 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
11811237 let remainOpenNotional = if ((oldPositionSize > 0))
11821238 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
11831239 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
11841240 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
11851241 let feeToLiquidator = (liquidationPenalty / 2)
11861242 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
11871243 let newPositionMargin = (remainMargin - liquidationPenalty)
11881244 let newPositionSize = (oldPositionSize + exchangedPositionSize)
11891245 let newPositionOpenNotional = abs(remainOpenNotional)
11901246 let newPositionLstUpdCPF = latestCumulativePremiumFraction(newPositionSize)
11911247 let openInterestNotionalAfter = (openInterestNotional() - exchangedQuoteAssetAmount)
11921248 let ammBalance = (cbalance() - liquidationPenalty)
1193- let $t05466954812 = if ((0 > ammBalance))
1249+ let $t05647156614 = if ((0 > ammBalance))
11941250 then $Tuple2(0, abs(ammBalance))
11951251 else $Tuple2(ammBalance, 0)
1196- let newAmmBalance = $t05466954812._1
1197- let takeFromInsurance = $t05466954812._2
1252+ let newAmmBalance = $t05647156614._1
1253+ let takeFromInsurance = $t05647156614._2
11981254 let x = if ((takeFromInsurance > 0))
11991255 then {
12001256 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
12011257 if ((withdrawInsurance == withdrawInsurance))
12021258 then nil
12031259 else throw("Strict value is not equal to itself.")
12041260 }
12051261 else nil
12061262 if ((x == x))
12071263 then {
12081264 let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), (liquidationPenalty - takeFromInsurance)], nil)
12091265 if ((unstake == unstake))
12101266 then {
12111267 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
12121268 if ((depositInsurance == depositInsurance))
12131269 then {
12141270 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, newPositionOpenNotional], nil)
12151271 if ((notifyNotional == notifyNotional))
12161272 then (((updatePosition(_trader, newPositionSize, newPositionMargin, newPositionOpenNotional, newPositionLstUpdCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, (totalLongPositionSize() - (if ((newPositionSize > 0))
12171273 then abs(exchangedPositionSize)
12181274 else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
12191275 then abs(exchangedPositionSize)
12201276 else 0)))) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance))
12211277 else throw("Strict value is not equal to itself.")
12221278 }
12231279 else throw("Strict value is not equal to itself.")
12241280 }
12251281 else throw("Strict value is not equal to itself.")
12261282 }
12271283 else throw("Strict value is not equal to itself.")
12281284 }
12291285 else {
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
1286+ let $t05806158516 = internalClosePosition(_trader, false)
1287+ let x1 = $t05806158516._1
1288+ let badDebt = $t05806158516._2
1289+ let x2 = $t05806158516._3
1290+ let x3 = $t05806158516._4
1291+ let quoteAssetReserveAfter = $t05806158516._5
1292+ let baseAssetReserveAfter = $t05806158516._6
1293+ let totalPositionSizeAfter = $t05806158516._7
1294+ let cumulativeNotionalAfter = $t05806158516._8
1295+ let openInterestNotionalAfter = $t05806158516._9
1296+ let exchangedQuoteAssetAmount = $t05806158516._10
1297+ let totalLongAfter = $t05806158516._11
1298+ let totalShortAfter = $t05806158516._12
12431299 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
12441300 let feeToLiquidator = (liquidationPenalty / 2)
12451301 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
12461302 let ammBalance = (cbalance() - liquidationPenalty)
1247- let $t05712657269 = if ((0 > ammBalance))
1303+ let $t05892859071 = if ((0 > ammBalance))
12481304 then $Tuple2(0, abs(ammBalance))
12491305 else $Tuple2(ammBalance, 0)
1250- let newAmmBalance = $t05712657269._1
1251- let takeFromInsurance = $t05712657269._2
1306+ let newAmmBalance = $t05892859071._1
1307+ let takeFromInsurance = $t05892859071._2
12521308 let x = if ((takeFromInsurance > 0))
12531309 then {
12541310 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
12551311 if ((withdrawInsurance == withdrawInsurance))
12561312 then nil
12571313 else throw("Strict value is not equal to itself.")
12581314 }
12591315 else nil
12601316 if ((x == x))
12611317 then {
12621318 let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), (liquidationPenalty - takeFromInsurance)], nil)
12631319 if ((unstake == unstake))
12641320 then {
12651321 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
12661322 if ((depositInsurance == depositInsurance))
12671323 then {
12681324 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, 0], nil)
12691325 if ((notifyNotional == notifyNotional))
12701326 then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance))
12711327 else throw("Strict value is not equal to itself.")
12721328 }
12731329 else throw("Strict value is not equal to itself.")
12741330 }
12751331 else throw("Strict value is not equal to itself.")
12761332 }
12771333 else throw("Strict value is not equal to itself.")
12781334 }
12791335 }
12801336
12811337
12821338
12831339 @Callable(i)
12841340 func payFunding () = {
12851341 let fundingBlockTimestamp = nextFundingBlockTimestamp()
12861342 if (if (if ((fundingBlockTimestamp > lastBlock.timestamp))
12871343 then true
12881344 else !(initialized()))
12891345 then true
12901346 else paused())
12911347 then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp)))
12921348 else {
12931349 let underlyingPrice = getOracleTwapPrice()
1294- let $t05875558817 = getFunding()
1295- let shortPremiumFraction = $t05875558817._1
1296- let longPremiumFraction = $t05875558817._2
1350+ let $t06055760619 = getFunding()
1351+ let shortPremiumFraction = $t06055760619._1
1352+ let longPremiumFraction = $t06055760619._2
12971353 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
12981354 }
12991355 }
13001356
13011357
13021358
13031359 @Callable(i)
13041360 func forceMoveAsset (_trader,_amount) = if (if ((addressFromPublicKey(adminPublicKey()) != i.caller))
13051361 then true
13061362 else (0 > _amount))
13071363 then throw("Invalid forceMoveAsset parameters")
13081364 else {
13091365 let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), _amount], nil)
13101366 if ((unstake == unstake))
13111367 then (withdraw(addressFromStringValue(_trader), _amount) ++ updateBalance((cbalance() - _amount)))
13121368 else throw("Strict value is not equal to itself.")
13131369 }
13141370
13151371
13161372
13171373 @Callable(i)
13181374 func adjustPeg (_price) = if (if ((addressFromPublicKey(adminPublicKey()) != i.caller))
13191375 then true
13201376 else (0 > _price))
13211377 then throw("Invalid adjustPeg parameters")
13221378 else {
1323- let $t05980859894 = getPegAdjustCost(_price)
1324- let newQuoteAssetReserve = $t05980859894._1
1325- let pegChangeCost = $t05980859894._2
1379+ let $t06161061696 = getPegAdjustCost(_price)
1380+ let newQuoteAssetReserve = $t06161061696._1
1381+ let pegChangeCost = $t06161061696._2
13261382 if ((pegChangeCost == 0))
13271383 then throw("Nothing to adjust")
13281384 else if ((pegChangeCost > 0))
13291385 then updateAmmReserves(newQuoteAssetReserve, bsAstR())
13301386 else {
13311387 let unstake = invoke(managerAddress(), "withdraw", [toBase58String(quoteAsset()), abs(pegChangeCost)], nil)
13321388 if ((unstake == unstake))
13331389 then {
13341390 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), abs(pegChangeCost))])
13351391 if ((depositInsurance == depositInsurance))
13361392 then (updateBalance((cbalance() - abs(pegChangeCost))) ++ updateAmmReserves(newQuoteAssetReserve, bsAstR()))
13371393 else throw("Strict value is not equal to itself.")
13381394 }
13391395 else throw("Strict value is not equal to itself.")
13401396 }
13411397 }
13421398
13431399
13441400
13451401 @Callable(i)
13461402 func migrateLiquidity () = {
13471403 let amount = cbalance()
1348- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [amount, toBase58String(quoteAsset())], nil)
1349- if ((unstake == unstake))
1404+ if ((amount > 0))
13501405 then {
1351- let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), amount)])
1352- if ((stake == stake))
1353- then nil
1406+ let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [amount, toBase58String(quoteAsset())], nil)
1407+ if ((unstake == unstake))
1408+ then {
1409+ let stake = invoke(managerAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), amount)])
1410+ if ((stake == stake))
1411+ then nil
1412+ else throw("Strict value is not equal to itself.")
1413+ }
13541414 else throw("Strict value is not equal to itself.")
13551415 }
1356- else throw("Strict value is not equal to itself.")
1416+ else nil
13571417 }
13581418
13591419
13601420
13611421 @Callable(i)
13621422 func v_get (_trader) = {
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
1423+ let $t06333763397 = internalClosePosition(_trader, false)
1424+ let x1 = $t06333763397._1
1425+ let x2 = $t06333763397._2
1426+ let x3 = $t06333763397._3
1427+ let x4 = $t06333763397._4
13681428 throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader))))
13691429 }
13701430
13711431
13721432
13731433 @Callable(i)
13741434 func view_calcRemainMarginWithFundingPayment (_trader) = {
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
1435+ let $t06354463655 = getPosition(_trader)
1436+ let positionSize = $t06354463655._1
1437+ let positionMargin = $t06354463655._2
1438+ let pon = $t06354463655._3
1439+ let positionLstUpdCPF = $t06354463655._4
1440+ let $t06366063761 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1441+ let positionNotional = $t06366063761._1
1442+ let unrealizedPnl = $t06366063761._2
1443+ let $t06376663948 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1444+ let remainMargin = $t06376663948._1
1445+ let badDebt = $t06376663948._2
1446+ let fundingPayment = $t06376663948._3
13871447 throw((((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)) + s(badDebt)) + s(positionNotional)))
13881448 }
13891449
13901450
13911451
13921452 @Callable(i)
13931453 func view_getPegAdjustCost (_price) = {
13941454 let cost = getPegAdjustCost(_price)
13951455 throw(toString(cost._2))
13961456 }
13971457
13981458
13991459
14001460 @Callable(i)
14011461 func view_getFunding () = {
14021462 let underlyingPrice = getOracleTwapPrice()
1403- let $t06246562527 = getFunding()
1404- let shortPremiumFraction = $t06246562527._1
1405- let longPremiumFraction = $t06246562527._2
1463+ let $t06433964401 = getFunding()
1464+ let shortPremiumFraction = $t06433964401._1
1465+ let longPremiumFraction = $t06433964401._2
14061466 let longFunding = divd(longPremiumFraction, underlyingPrice)
14071467 let shortFunding = divd(shortPremiumFraction, underlyingPrice)
14081468 throw((((s(longFunding) + s(shortFunding)) + s(getTwapSpotPrice())) + s(getOracleTwapPrice())))
14091469 }
14101470
14111471
14121472 @Verifier(tx)
14131473 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], adminPublicKey())
14141474

github/deemru/w8io/169f3d6 
271.46 ms