tx · 6jA3yWbKPoHCx6LkM23kJrgaTaJtHUB2dD1erLLMTd3U

3MrRa3KaEgRyyjQdMLuU78m5GkJLvP5DZLj:  -0.05100000 Waves

2022.08.16 23:45 [2187524] smart account 3MrRa3KaEgRyyjQdMLuU78m5GkJLvP5DZLj > SELF 0.00000000 Waves

{ "type": 13, "id": "6jA3yWbKPoHCx6LkM23kJrgaTaJtHUB2dD1erLLMTd3U", "fee": 5100000, "feeAssetId": null, "timestamp": 1660682764827, "version": 2, "chainId": 84, "sender": "3MrRa3KaEgRyyjQdMLuU78m5GkJLvP5DZLj", "senderPublicKey": "AJNTN7EtP9dsAmPzcKRp9bRMvzZL4uwkmVxQuFuar3Qr", "proofs": [ "5hRPnTpoXRR8mQad6XKk1LsAM2iTCPecgVY17h9rde8Ncnd47CeqeSrMq7mJDUPUVMxFYwnAbHMJaeaQV3J7Wbtr" ], "script": "base64:BgJZCAISABIAEgMKAQESAwoBARIJCgcBAQEBAQEBEg4KDAEBAQEBAQEICAgBARIFCgMBAQESBQoDAQEBEgASAwoBARIAEgMKAQgSABIDCgEIEgMKAQgSBAoCCAF3AAlrX29yYV9rZXkCCWtfb3JhX2tleQAPa19vcmFfYmxvY2tfa2V5Ag9rX29yYV9ibG9ja19rZXkABWtfb3JhAgVrX29yYQAJa19iYWxhbmNlAglrX2JhbGFuY2UADmtfcG9zaXRpb25TaXplAg5rX3Bvc2l0aW9uU2l6ZQAQa19wb3NpdGlvbk1hcmdpbgIQa19wb3NpdGlvbk1hcmdpbgAWa19wb3NpdGlvbk9wZW5Ob3Rpb25hbAIWa19wb3NpdGlvbk9wZW5Ob3Rpb25hbAAua19wb3NpdGlvbkxhc3RVcGRhdGVkQ3VtdWxhdGl2ZVByZW1pdW1GcmFjdGlvbgISa19wb3NpdGlvbkZyYWN0aW9uAA1rX2luaXRpYWxpemVkAg1rX2luaXRpYWxpemVkAAhrX3BhdXNlZAIIa19wYXVzZWQABWtfZmVlAgVrX2ZlZQAPa19mdW5kaW5n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CQEOZ2V0TWFyZ2luUmF0aW8BBQdfdHJhZGVyCQEBcwEFDXVucmVhbGl6ZWRQbmwJAQFzAQUHYmFkRGVidAFpAQ5mb3JjZU1vdmVBc3NldAIHX3RyYWRlcgdfYW1vdW50AwMJAQIhPQIJAKcIAQkBDmFkbWluUHVibGljS2V5AAgFAWkGY2FsbGVyBgkAZgIAAAUHX2Ftb3VudAkAAgECIUludmFsaWQgZm9yY2VNb3ZlQXNzZXQgcGFyYW1ldGVycwQHdW5zdGFrZQkA/AcECQERcXVvdGVBc3NldFN0YWtpbmcAAg51bmxvY2tOZXV0cmlubwkAzAgCBQdfYW1vdW50CQDMCAIJANgEAQkBCnF1b3RlQXNzZXQABQNuaWwFA25pbAMJAAACBQd1bnN0YWtlBQd1bnN0YWtlCQDOCAIJAQh3aXRoZHJhdwIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFB190cmFkZXIFB19hbW91bnQJAQ11cGRhdGVCYWxhbmNlAQkAZQIJAQhjYmFsYW5jZQAFB19hbW91bnQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQEOYWRtaW5QdWJsaWNLZXkAwTjzEQ==", "height": 2187524, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2wQQjNpAEKfYNuVtRSvSRV1aJXBgThsEJUMTzhsCwnT5 Next: Ehsz59tFRahrbrmvuUU6tyHrXcS3kaT9CAFX8f4kfMsT Diff:
OldNewDifferences
308308 func swapInput (_isAdd,_quoteAssetAmount) = {
309309 let _qtAstR = qtAstR()
310310 let _bsAstR = bsAstR()
311- let priceBefore = divd(_qtAstR, _bsAstR)
312- let amountBaseAssetBoughtWithoutPriceImpact = divd(_quoteAssetAmount, priceBefore)
313311 let k = muld(_qtAstR, _bsAstR)
314312 let quoteAssetReserveAfter = if (_isAdd)
315313 then (_qtAstR + _quoteAssetAmount)
319317 let amountBaseAssetBought = if (_isAdd)
320318 then amountBaseAssetBoughtAbs
321319 else -(amountBaseAssetBoughtAbs)
322- let priceImpact = abs((divd(amountBaseAssetBoughtWithoutPriceImpact, amountBaseAssetBoughtAbs) - DECIMAL_UNIT))
320+ let $t01183712030 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
321+ let quoteAssetReserveAfter1 = $t01183712030._1
322+ let baseAssetReserveAfter1 = $t01183712030._2
323+ let totalPositionSizeAfter1 = $t01183712030._3
324+ let cumulativeNotionalAfter1 = $t01183712030._4
325+ let priceBefore = divd(_qtAstR, _bsAstR)
326+ let marketPrice = divd(_quoteAssetAmount, amountBaseAssetBoughtAbs)
327+ let priceDiff = abs((priceBefore - marketPrice))
328+ let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
323329 let maxPriceImpactValue = maxPriceImpact()
324330 if ((priceImpact > maxPriceImpactValue))
325- 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)) + " ideal price buy: ") + toString(amountBaseAssetBoughtWithoutPriceImpact)) + " real price buy: ") + toString(amountBaseAssetBoughtAbs)))
326- else {
327- let $t01261712820 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
328- let quoteAssetReserveAfter1 = $t01261712820._1
329- let baseAssetReserveAfter1 = $t01261712820._2
330- let totalPositionSizeAfter1 = $t01261712820._3
331- let cumulativeNotionalAfter1 = $t01261712820._4
332- $Tuple5(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
333- }
331+ 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)))
332+ else $Tuple5(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
334333 }
335334
336335
342341 }
343342 else 0
344343 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
345- let $t01356713694 = if ((0 > signedMargin))
344+ let $t01352113648 = if ((0 > signedMargin))
346345 then $Tuple2(0, abs(signedMargin))
347346 else $Tuple2(abs(signedMargin), 0)
348- let remainMargin = $t01356713694._1
349- let badDebt = $t01356713694._2
347+ let remainMargin = $t01352113648._1
348+ let badDebt = $t01352113648._2
350349 $Tuple3(remainMargin, badDebt, fundingPayment)
351350 }
352351
353352
354-func swapOutput (_isAdd,_baseAssetAmount) = {
353+func swapOutput (_isAdd,_baseAssetAmount,_checkMaxPriceImpact) = {
355354 let _quoteAssetReserve = qtAstR()
356355 let _baseAssetReserve = bsAstR()
356+ let priceBefore = divd(_quoteAssetReserve, _baseAssetReserve)
357357 if ((_baseAssetAmount == 0))
358358 then throw("Invalid base asset amount")
359359 else {
363363 else (_baseAssetReserve - _baseAssetAmount)
364364 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
365365 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetReserve))
366- let $t01453214725 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
367- let quoteAssetReserveAfter1 = $t01453214725._1
368- let baseAssetReserveAfter1 = $t01453214725._2
369- let totalPositionSizeAfter1 = $t01453214725._3
370- let cumulativeNotionalAfter1 = $t01453214725._4
371- $Tuple7(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1, (totalLongPositionSize() - (if (_isAdd)
372- then abs(_baseAssetAmount)
373- else 0)), (totalShortPositionSize() - (if (!(_isAdd))
374- then abs(_baseAssetAmount)
375- else 0)))
366+ let maxPriceImpactValue = maxPriceImpact()
367+ let $t01463214825 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
368+ let quoteAssetReserveAfter1 = $t01463214825._1
369+ let baseAssetReserveAfter1 = $t01463214825._2
370+ let totalPositionSizeAfter1 = $t01463214825._3
371+ let cumulativeNotionalAfter1 = $t01463214825._4
372+ let marketPrice = divd(quoteAssetSold, _baseAssetAmount)
373+ let priceDiff = abs((priceBefore - marketPrice))
374+ let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
375+ if (if ((priceImpact > maxPriceImpactValue))
376+ then _checkMaxPriceImpact
377+ else false)
378+ 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)))
379+ else $Tuple7(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1, (totalLongPositionSize() - (if (_isAdd)
380+ then abs(_baseAssetAmount)
381+ else 0)), (totalShortPositionSize() - (if (!(_isAdd))
382+ then abs(_baseAssetAmount)
383+ else 0)))
376384 }
377385 }
378386
401409
402410
403411 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
404- let $t01645216580 = getPosition(_trader)
405- let positionSize = $t01645216580._1
406- let positionMargin = $t01645216580._2
407- let positionOpenNotional = $t01645216580._3
408- let positionLstUpdCPF = $t01645216580._4
412+ let $t01729317421 = getPosition(_trader)
413+ let positionSize = $t01729317421._1
414+ let positionMargin = $t01729317421._2
415+ let positionOpenNotional = $t01729317421._3
416+ let positionLstUpdCPF = $t01729317421._4
409417 let positionSizeAbs = abs(positionSize)
410418 if ((positionSizeAbs == 0))
411419 then throw("Invalid position size")
413421 let isShort = (0 > positionSize)
414422 let positionNotional = if ((_option == PNL_OPTION_SPOT))
415423 then {
416- let $t01682716934 = swapOutput(!(isShort), positionSizeAbs)
417- let outPositionNotional = $t01682716934._1
418- let x1 = $t01682716934._2
419- let x2 = $t01682716934._3
420- let x3 = $t01682716934._4
424+ let $t01766817792 = swapOutput(!(isShort), positionSizeAbs, false)
425+ let outPositionNotional = $t01766817792._1
426+ let x1 = $t01766817792._2
427+ let x2 = $t01766817792._3
428+ let x3 = $t01766817792._4
421429 outPositionNotional
422430 }
423431 else muld(positionSizeAbs, getOracleTwapPrice())
433441
434442
435443 func getMarginRatioByOption (_trader,_option) = {
436- let $t01760417715 = getPosition(_trader)
437- let positionSize = $t01760417715._1
438- let positionMargin = $t01760417715._2
439- let pon = $t01760417715._3
440- let positionLstUpdCPF = $t01760417715._4
441- let $t01772117814 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
442- let positionNotional = $t01772117814._1
443- let unrealizedPnl = $t01772117814._2
444- let $t01781917985 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
445- let remainMargin = $t01781917985._1
446- let badDebt = $t01781917985._2
444+ let $t01846218573 = getPosition(_trader)
445+ let positionSize = $t01846218573._1
446+ let positionMargin = $t01846218573._2
447+ let pon = $t01846218573._3
448+ let positionLstUpdCPF = $t01846218573._4
449+ let $t01857918672 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
450+ let positionNotional = $t01857918672._1
451+ let unrealizedPnl = $t01857918672._2
452+ let $t01867718843 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
453+ let remainMargin = $t01867718843._1
454+ let badDebt = $t01867718843._2
447455 calcMarginRatio(remainMargin, badDebt, positionNotional)
448456 }
449457
451459 func getMarginRatio (_trader) = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
452460
453461
454-func internalClosePosition (_trader) = {
455- let $t01830118429 = getPosition(_trader)
456- let positionSize = $t01830118429._1
457- let positionMargin = $t01830118429._2
458- let positionOpenNotional = $t01830118429._3
459- let positionLstUpdCPF = $t01830118429._4
460- let $t01843518522 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
461- let x1 = $t01843518522._1
462- let unrealizedPnl = $t01843518522._2
463- let $t01852718695 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
464- let remainMargin = $t01852718695._1
465- let badDebt = $t01852718695._2
462+func internalClosePosition (_trader,_checkMaxPriceImpact) = {
463+ let $t01919019318 = getPosition(_trader)
464+ let positionSize = $t01919019318._1
465+ let positionMargin = $t01919019318._2
466+ let positionOpenNotional = $t01919019318._3
467+ let positionLstUpdCPF = $t01919019318._4
468+ let $t01932419411 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
469+ let x1 = $t01932419411._1
470+ let unrealizedPnl = $t01932419411._2
471+ let $t01941619584 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
472+ let remainMargin = $t01941619584._1
473+ let badDebt = $t01941619584._2
466474 let exchangedPositionSize = -(positionSize)
467475 let realizedPnl = unrealizedPnl
468476 let marginToVault = -(remainMargin)
469- let $t01882219103 = swapOutput((positionSize > 0), abs(positionSize))
470- let exchangedQuoteAssetAmount = $t01882219103._1
471- let quoteAssetReserveAfter = $t01882219103._2
472- let baseAssetReserveAfter = $t01882219103._3
473- let totalPositionSizeAfter = $t01882219103._4
474- let cumulativeNotionalAfter = $t01882219103._5
475- let totalLongAfter = $t01882219103._6
476- let totalShortAfter = $t01882219103._7
477+ let $t01971120022 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
478+ let exchangedQuoteAssetAmount = $t01971120022._1
479+ let quoteAssetReserveAfter = $t01971120022._2
480+ let baseAssetReserveAfter = $t01971120022._3
481+ let totalPositionSizeAfter = $t01971120022._4
482+ let cumulativeNotionalAfter = $t01971120022._5
483+ let totalLongAfter = $t01971120022._6
484+ let totalShortAfter = $t01971120022._7
477485 let openInterestNotionalAfter = (openInterestNotional() - positionOpenNotional)
478486 $Tuple12(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter)
479487 }
672680 else paused())
673681 then throw("Invalid decreasePosition parameters")
674682 else {
675- let $t03001230164 = getPosition(toString(i.caller))
676- let oldPositionSize = $t03001230164._1
677- let oldPositionMargin = $t03001230164._2
678- let oldPositionOpenNotional = $t03001230164._3
679- let oldPositionLstUpdCPF = $t03001230164._4
683+ let $t03093131083 = getPosition(toString(i.caller))
684+ let oldPositionSize = $t03093131083._1
685+ let oldPositionMargin = $t03093131083._2
686+ let oldPositionOpenNotional = $t03093131083._3
687+ let oldPositionLstUpdCPF = $t03093131083._4
680688 let _direction = if ((oldPositionSize > 0))
681689 then DIR_SHORT
682690 else DIR_LONG
683691 let isAdd = (_direction == DIR_LONG)
684692 let openNotional = muld(_amount, _leverage)
685- let $t03033730453 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
686- let oldPositionNotional = $t03033730453._1
687- let unrealizedPnl = $t03033730453._2
688- let $t03045933008 = if ((oldPositionNotional > openNotional))
693+ let $t03125631372 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
694+ let oldPositionNotional = $t03125631372._1
695+ let unrealizedPnl = $t03125631372._2
696+ let $t03137833927 = if ((oldPositionNotional > openNotional))
689697 then {
690- let $t03083631055 = swapInput(isAdd, openNotional)
691- let exchangedPositionSize = $t03083631055._1
692- let quoteAssetReserveAfter = $t03083631055._2
693- let baseAssetReserveAfter = $t03083631055._3
694- let totalPositionSizeAfter = $t03083631055._4
695- let cumulativeNotionalAfter = $t03083631055._5
698+ let $t03175531974 = swapInput(isAdd, openNotional)
699+ let exchangedPositionSize = $t03175531974._1
700+ let quoteAssetReserveAfter = $t03175531974._2
701+ let baseAssetReserveAfter = $t03175531974._3
702+ let totalPositionSizeAfter = $t03175531974._4
703+ let cumulativeNotionalAfter = $t03175531974._5
696704 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
697705 if (if ((_minBaseAssetAmount != 0))
698706 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
700708 then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
701709 else {
702710 let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), abs(oldPositionSize))
703- let $t03149231737 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
704- let remainMargin = $t03149231737._1
705- let badDebt = $t03149231737._2
706- let fundingPayment = $t03149231737._3
711+ let $t03241132656 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
712+ let remainMargin = $t03241132656._1
713+ let badDebt = $t03241132656._2
714+ let fundingPayment = $t03241132656._3
707715 let exchangedQuoteAssetAmount = openNotional
708716 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
709717 let remainOpenNotional = if ((oldPositionSize > 0))
718726 }
719727 }
720728 else throw("Close position first")
721- let newPositionSize = $t03045933008._1
722- let newPositionRemainMargin = $t03045933008._2
723- let newPositionOpenNotional = $t03045933008._3
724- let newPositionLatestCPF = $t03045933008._4
725- let baseAssetReserveAfter = $t03045933008._5
726- let quoteAssetReserveAfter = $t03045933008._6
727- let totalPositionSizeAfter = $t03045933008._7
728- let cumulativeNotionalAfter = $t03045933008._8
729- let openInterestNotionalAfter = $t03045933008._9
730- let totalLongAfter = $t03045933008._10
731- let totalShortAfter = $t03045933008._11
729+ let newPositionSize = $t03137833927._1
730+ let newPositionRemainMargin = $t03137833927._2
731+ let newPositionOpenNotional = $t03137833927._3
732+ let newPositionLatestCPF = $t03137833927._4
733+ let baseAssetReserveAfter = $t03137833927._5
734+ let quoteAssetReserveAfter = $t03137833927._6
735+ let totalPositionSizeAfter = $t03137833927._7
736+ let cumulativeNotionalAfter = $t03137833927._8
737+ let openInterestNotionalAfter = $t03137833927._9
738+ let totalLongAfter = $t03137833927._10
739+ let totalShortAfter = $t03137833927._11
732740 let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), newPositionOpenNotional], nil)
733741 if ((notifyNotional == notifyNotional))
734742 then (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter))
757765 else {
758766 let feeAmount = muld(_rawAmount, fee())
759767 let _amount = (_rawAmount - feeAmount)
760- let $t03412634278 = getPosition(toString(i.caller))
761- let oldPositionSize = $t03412634278._1
762- let oldPositionMargin = $t03412634278._2
763- let oldPositionOpenNotional = $t03412634278._3
764- let oldPositionLstUpdCPF = $t03412634278._4
768+ let $t03504535197 = getPosition(toString(i.caller))
769+ let oldPositionSize = $t03504535197._1
770+ let oldPositionMargin = $t03504535197._2
771+ let oldPositionOpenNotional = $t03504535197._3
772+ let oldPositionLstUpdCPF = $t03504535197._4
765773 let isNewPosition = (oldPositionSize == 0)
766774 let isSameDirection = if ((oldPositionSize > 0))
767775 then (_direction == DIR_LONG)
770778 then isSameDirection
771779 else false
772780 let isAdd = (_direction == DIR_LONG)
773- let $t03456736956 = if (if (isNewPosition)
781+ let $t03548637875 = if (if (isNewPosition)
774782 then true
775783 else expandExisting)
776784 then {
777785 let openNotional = muld(_amount, _leverage)
778- let $t03499135197 = swapInput(isAdd, openNotional)
779- let amountBaseAssetBought = $t03499135197._1
780- let quoteAssetReserveAfter = $t03499135197._2
781- let baseAssetReserveAfter = $t03499135197._3
782- let totalPositionSizeAfter = $t03499135197._4
783- let cumulativeNotionalAfter = $t03499135197._5
786+ let $t03591036116 = swapInput(isAdd, openNotional)
787+ let amountBaseAssetBought = $t03591036116._1
788+ let quoteAssetReserveAfter = $t03591036116._2
789+ let baseAssetReserveAfter = $t03591036116._3
790+ let totalPositionSizeAfter = $t03591036116._4
791+ let cumulativeNotionalAfter = $t03591036116._5
784792 if (if ((_minBaseAssetAmount != 0))
785793 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
786794 else false)
788796 else {
789797 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
790798 let increaseMarginRequirement = divd(openNotional, _leverage)
791- let $t03557835817 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
792- let remainMargin = $t03557835817._1
793- let x1 = $t03557835817._2
794- let x2 = $t03557835817._3
799+ let $t03649736736 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
800+ let remainMargin = $t03649736736._1
801+ let x1 = $t03649736736._2
802+ let x2 = $t03649736736._3
795803 $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
796804 then abs(amountBaseAssetBought)
797805 else 0)), (totalShortPositionSize() + (if ((0 > newPositionSize))
801809 }
802810 else {
803811 let openNotional = muld(_amount, _leverage)
804- let $t03664936765 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
805- let oldPositionNotional = $t03664936765._1
806- let unrealizedPnl = $t03664936765._2
812+ let $t03756837684 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
813+ let oldPositionNotional = $t03756837684._1
814+ let unrealizedPnl = $t03756837684._2
807815 if ((oldPositionNotional > openNotional))
808816 then throw("Use decreasePosition to decrease position size")
809817 else throw("Close position first")
810818 }
811- let newPositionSize = $t03456736956._1
812- let newPositionRemainMargin = $t03456736956._2
813- let newPositionOpenNotional = $t03456736956._3
814- let newPositionLatestCPF = $t03456736956._4
815- let baseAssetReserveAfter = $t03456736956._5
816- let quoteAssetReserveAfter = $t03456736956._6
817- let totalPositionSizeAfter = $t03456736956._7
818- let cumulativeNotionalAfter = $t03456736956._8
819- let openInterestNotionalAfter = $t03456736956._9
820- let totalLongAfter = $t03456736956._10
821- let totalShortAfter = $t03456736956._11
819+ let newPositionSize = $t03548637875._1
820+ let newPositionRemainMargin = $t03548637875._2
821+ let newPositionOpenNotional = $t03548637875._3
822+ let newPositionLatestCPF = $t03548637875._4
823+ let baseAssetReserveAfter = $t03548637875._5
824+ let quoteAssetReserveAfter = $t03548637875._6
825+ let totalPositionSizeAfter = $t03548637875._7
826+ let cumulativeNotionalAfter = $t03548637875._8
827+ let openInterestNotionalAfter = $t03548637875._9
828+ let totalLongAfter = $t03548637875._10
829+ let totalShortAfter = $t03548637875._11
822830 let feeToStakers = (feeAmount / 2)
823831 let feeToInsurance = (feeAmount - feeToStakers)
824832 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
859867 else {
860868 let feeAmount = muld(_rawAmount, fee())
861869 let _amount = (_rawAmount - feeAmount)
862- let $t03851238664 = getPosition(toString(i.caller))
863- let oldPositionSize = $t03851238664._1
864- let oldPositionMargin = $t03851238664._2
865- let oldPositionOpenNotional = $t03851238664._3
866- let oldPositionLstUpdCPF = $t03851238664._4
870+ let $t03943139583 = getPosition(toString(i.caller))
871+ let oldPositionSize = $t03943139583._1
872+ let oldPositionMargin = $t03943139583._2
873+ let oldPositionOpenNotional = $t03943139583._3
874+ let oldPositionLstUpdCPF = $t03943139583._4
867875 let feeToStakers = (feeAmount / 2)
868876 let feeToInsurance = (feeAmount - feeToStakers)
869877 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
895903 else paused())
896904 then throw("Invalid removeMargin parameters")
897905 else {
898- let $t03971339865 = getPosition(toString(i.caller))
899- let oldPositionSize = $t03971339865._1
900- let oldPositionMargin = $t03971339865._2
901- let oldPositionOpenNotional = $t03971339865._3
902- let oldPositionLstUpdCPF = $t03971339865._4
906+ let $t04063240784 = getPosition(toString(i.caller))
907+ let oldPositionSize = $t04063240784._1
908+ let oldPositionMargin = $t04063240784._2
909+ let oldPositionOpenNotional = $t04063240784._3
910+ let oldPositionLstUpdCPF = $t04063240784._4
903911 let marginDelta = -(_amount)
904- let $t03990240081 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
905- let remainMargin = $t03990240081._1
906- let badDebt = $t03990240081._2
912+ let $t04082141000 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
913+ let remainMargin = $t04082141000._1
914+ let badDebt = $t04082141000._2
907915 if ((badDebt != 0))
908916 then throw("Invalid removed margin amount")
909917 else {
929937 else paused())
930938 then throw("Invalid closePosition parameters")
931939 else {
932- let $t04117741561 = internalClosePosition(toString(i.caller))
933- let x1 = $t04117741561._1
934- let positionBadDebt = $t04117741561._2
935- let realizedPnl = $t04117741561._3
936- let marginToVault = $t04117741561._4
937- let quoteAssetReserveAfter = $t04117741561._5
938- let baseAssetReserveAfter = $t04117741561._6
939- let totalPositionSizeAfter = $t04117741561._7
940- let cumulativeNotionalAfter = $t04117741561._8
941- let openInterestNotionalAfter = $t04117741561._9
942- let x2 = $t04117741561._10
943- let totalLongAfter = $t04117741561._11
944- let totalShortAfter = $t04117741561._12
940+ let $t04209642486 = internalClosePosition(toString(i.caller), true)
941+ let x1 = $t04209642486._1
942+ let positionBadDebt = $t04209642486._2
943+ let realizedPnl = $t04209642486._3
944+ let marginToVault = $t04209642486._4
945+ let quoteAssetReserveAfter = $t04209642486._5
946+ let baseAssetReserveAfter = $t04209642486._6
947+ let totalPositionSizeAfter = $t04209642486._7
948+ let cumulativeNotionalAfter = $t04209642486._8
949+ let openInterestNotionalAfter = $t04209642486._9
950+ let x2 = $t04209642486._10
951+ let totalLongAfter = $t04209642486._11
952+ let totalShortAfter = $t04209642486._12
945953 if ((positionBadDebt > 0))
946954 then throw("Unable to close position with bad debt")
947955 else {
948956 let withdrawAmount = abs(marginToVault)
949957 let ammBalance = (cbalance() - withdrawAmount)
950- let $t04177041912 = if ((0 > ammBalance))
958+ let $t04269542837 = if ((0 > ammBalance))
951959 then $Tuple2(0, abs(ammBalance))
952960 else $Tuple2(ammBalance, 0)
953- let ammNewBalance = $t04177041912._1
954- let getFromInsurance = $t04177041912._2
961+ let ammNewBalance = $t04269542837._1
962+ let getFromInsurance = $t04269542837._2
955963 let x = if ((getFromInsurance > 0))
956964 then {
957965 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil)
9961004 else paused())
9971005 then throw("Unable to liquidate")
9981006 else {
999- let $t04360244018 = internalClosePosition(_trader)
1000- let x1 = $t04360244018._1
1001- let badDebt = $t04360244018._2
1002- let x2 = $t04360244018._3
1003- let x3 = $t04360244018._4
1004- let quoteAssetReserveAfter = $t04360244018._5
1005- let baseAssetReserveAfter = $t04360244018._6
1006- let totalPositionSizeAfter = $t04360244018._7
1007- let cumulativeNotionalAfter = $t04360244018._8
1008- let openInterestNotionalAfter = $t04360244018._9
1009- let exchangedQuoteAssetAmount = $t04360244018._10
1010- let totalLongAfter = $t04360244018._11
1011- let totalShortAfter = $t04360244018._12
1007+ let $t04452744950 = internalClosePosition(_trader, false)
1008+ let x1 = $t04452744950._1
1009+ let badDebt = $t04452744950._2
1010+ let x2 = $t04452744950._3
1011+ let x3 = $t04452744950._4
1012+ let quoteAssetReserveAfter = $t04452744950._5
1013+ let baseAssetReserveAfter = $t04452744950._6
1014+ let totalPositionSizeAfter = $t04452744950._7
1015+ let cumulativeNotionalAfter = $t04452744950._8
1016+ let openInterestNotionalAfter = $t04452744950._9
1017+ let exchangedQuoteAssetAmount = $t04452744950._10
1018+ let totalLongAfter = $t04452744950._11
1019+ let totalShortAfter = $t04452744950._12
10121020 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
10131021 let feeToLiquidator = (liquidationPenalty / 2)
10141022 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
10151023 let ammBalance = (cbalance() - liquidationPenalty)
1016- let $t04441644551 = if ((0 > ammBalance))
1024+ let $t04534845483 = if ((0 > ammBalance))
10171025 then $Tuple2(0, abs(ammBalance))
10181026 else $Tuple2(ammBalance, 0)
1019- let newAmmBalance = $t04441644551._1
1020- let takeFromInsurance = $t04441644551._2
1027+ let newAmmBalance = $t04534845483._1
1028+ let takeFromInsurance = $t04534845483._2
10211029 let x = if ((takeFromInsurance > 0))
10221030 then {
10231031 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
10621070 let underlyingPrice = getOracleTwapPrice()
10631071 let spotTwapPrice = getTwapSpotPrice()
10641072 let premium = (spotTwapPrice - underlyingPrice)
1065- let $t04604547380 = if (if ((totalShortPositionSize() == 0))
1073+ let $t04697748312 = if (if ((totalShortPositionSize() == 0))
10661074 then true
10671075 else (totalLongPositionSize() == 0))
10681076 then $Tuple2(0, 0)
10771085 let shortPremiumFraction = divd(muld(longPremiumFraction, totalLongPositionSize()), totalShortPositionSize())
10781086 $Tuple2(shortPremiumFraction, longPremiumFraction)
10791087 }
1080- let shortPremiumFraction = $t04604547380._1
1081- let longPremiumFraction = $t04604547380._2
1088+ let shortPremiumFraction = $t04697748312._1
1089+ let longPremiumFraction = $t04697748312._2
10821090 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
10831091 }
10841092 }
10871095
10881096 @Callable(i)
10891097 func v_get (_trader) = {
1090- let $t04775547808 = internalClosePosition(_trader)
1091- let x1 = $t04775547808._1
1092- let x2 = $t04775547808._2
1093- let x3 = $t04775547808._3
1094- let x4 = $t04775547808._4
1098+ let $t04868748747 = internalClosePosition(_trader, false)
1099+ let x1 = $t04868748747._1
1100+ let x2 = $t04868748747._2
1101+ let x3 = $t04868748747._3
1102+ let x4 = $t04868748747._4
10951103 throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader))))
10961104 }
10971105
10991107
11001108 @Callable(i)
11011109 func view_calcRemainMarginWithFundingPayment (_trader) = {
1102- let $t04795548066 = getPosition(_trader)
1103- let positionSize = $t04795548066._1
1104- let positionMargin = $t04795548066._2
1105- let pon = $t04795548066._3
1106- let positionLstUpdCPF = $t04795548066._4
1107- let $t04807148172 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1108- let positionNotional = $t04807148172._1
1109- let unrealizedPnl = $t04807148172._2
1110- let $t04817748359 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1111- let remainMargin = $t04817748359._1
1112- let badDebt = $t04817748359._2
1113- let fundingPayment = $t04817748359._3
1114- throw((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)))
1110+ let $t04889449005 = getPosition(_trader)
1111+ let positionSize = $t04889449005._1
1112+ let positionMargin = $t04889449005._2
1113+ let pon = $t04889449005._3
1114+ let positionLstUpdCPF = $t04889449005._4
1115+ let $t04901049111 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1116+ let positionNotional = $t04901049111._1
1117+ let unrealizedPnl = $t04901049111._2
1118+ let $t04911649298 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1119+ let remainMargin = $t04911649298._1
1120+ let badDebt = $t04911649298._2
1121+ let fundingPayment = $t04911649298._3
1122+ throw(((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)) + s(badDebt)))
11151123 }
11161124
11171125
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_initialized = "k_initialized"
2121
2222 let k_paused = "k_paused"
2323
2424 let k_fee = "k_fee"
2525
2626 let k_fundingPeriod = "k_fundingPeriod"
2727
2828 let k_initMarginRatio = "k_initMarginRatio"
2929
3030 let k_maintenanceMarginRatio = "k_mmr"
3131
3232 let k_liquidationFeeRatio = "k_liquidationFeeRatio"
3333
3434 let k_spreadLimit = "k_spreadLimit"
3535
3636 let k_maxPriceImpact = "k_maxPriceImpact"
3737
3838 let k_lastDataStr = "k_lastDataStr"
3939
4040 let k_lastMinuteId = "k_lastMinuteId"
4141
4242 let k_twapDataLastCumulativePrice = "k_twapDataLastCumulativePrice"
4343
4444 let k_twapDataLastPrice = "k_twapDataLastPrice"
4545
4646 let k_twapDataPreviousMinuteId = "k_twapDataPreviousMinuteId"
4747
4848 let k_latestLongCumulativePremiumFraction = "k_latestLongPremiumFraction"
4949
5050 let k_latestShortCumulativePremiumFraction = "k_latestShortPremiumFraction"
5151
5252 let k_nextFundingBlock = "k_nextFundingBlockMinTimestamp"
5353
5454 let k_longFundingRate = "k_longFundingRate"
5555
5656 let k_shortFundingRate = "k_shortFundingRate"
5757
5858 let k_quoteAssetReserve = "k_qtAstR"
5959
6060 let k_baseAssetReserve = "k_bsAstR"
6161
6262 let k_totalPositionSize = "k_totalPositionSize"
6363
6464 let k_totalLongPositionSize = "k_totalLongPositionSize"
6565
6666 let k_totalShortPositionSize = "k_totalShortPositionSize"
6767
6868 let k_cumulativeNotional = "k_cumulativeNotional"
6969
7070 let k_openInterestNotional = "k_openInterestNotional"
7171
7272 let k_coordinatorAddress = "k_coordinatorAddress"
7373
7474 let k_insurance_address = "k_insurance_address"
7575
7676 let k_admin_address = "k_admin_address"
7777
7878 let k_admin_public_key = "k_admin_public_key"
7979
8080 let k_quote_asset = "k_quote_asset"
8181
8282 let k_quote_staking = "k_quote_staking"
8383
8484 let k_staking_address = "k_staking_address"
8585
8686 let k_miner_address = "k_miner_address"
8787
8888 func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set")
8989
9090
9191 func adminAddress () = addressFromString(getStringValue(coordinator(), k_admin_address))
9292
9393
9494 func adminPublicKey () = fromBase58String(getStringValue(coordinator(), k_admin_public_key))
9595
9696
9797 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
9898
9999
100100 func quoteAssetStaking () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_quote_staking)), "Quote asset staking not set")
101101
102102
103103 func stakingAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_staking_address)), "Insurance not set")
104104
105105
106106 func insuranceAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_insurance_address)), "Insurance not set")
107107
108108
109109 func minerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_miner_address)), "Insurance not set")
110110
111111
112112 let DIR_LONG = 1
113113
114114 let DIR_SHORT = 2
115115
116116 let TWAP_INTERVAL = 15
117117
118118 let ORACLE_INTERVAL = 15
119119
120120 let SECONDS = 1000
121121
122122 let DECIMAL_UNIT = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
123123
124124 let ONE_DAY = (86400 * DECIMAL_UNIT)
125125
126126 let ALL_FEES = 100
127127
128128 let PNL_OPTION_SPOT = 1
129129
130130 let PNL_OPTION_ORACLE = 2
131131
132132 func s (_x) = (toString(_x) + ",")
133133
134134
135135 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
136136
137137
138138 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
139139
140140
141141 func abs (_x) = if ((_x > 0))
142142 then _x
143143 else -(_x)
144144
145145
146146 func vmax (_x,_y) = if ((_x >= _y))
147147 then _x
148148 else _y
149149
150150
151151 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
152152
153153
154154 func listToStr (_list) = {
155155 func _join (accumulator,val) = ((accumulator + val) + ",")
156156
157157 let newListStr = {
158158 let $l = _list
159159 let $s = size($l)
160160 let $acc0 = ""
161161 func $f0_1 ($a,$i) = if (($i >= $s))
162162 then $a
163163 else _join($a, $l[$i])
164164
165165 func $f0_2 ($a,$i) = if (($i >= $s))
166166 then $a
167167 else throw("List size exceeds 20")
168168
169169 $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)
170170 }
171171 let newListStrU = dropRight(newListStr, 1)
172172 let newListStrR = if ((take(newListStrU, 1) == ","))
173173 then drop(newListStrU, 1)
174174 else newListStrU
175175 newListStrR
176176 }
177177
178178
179179 func strToList (_str) = split(_str, ",")
180180
181181
182182 func pushToQueue (_list,_maxSize,_value) = if ((size(_list) > _maxSize))
183183 then (removeByIndex(_list, 0) :+ _value)
184184 else (_list :+ _value)
185185
186186
187187 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
188188
189189
190190 func cbalance () = int(k_balance)
191191
192192
193193 func fee () = int(k_fee)
194194
195195
196196 func initMarginRatio () = int(k_initMarginRatio)
197197
198198
199199 func qtAstR () = int(k_quoteAssetReserve)
200200
201201
202202 func bsAstR () = int(k_baseAssetReserve)
203203
204204
205205 func totalPositionSize () = int(k_totalPositionSize)
206206
207207
208208 func cumulativeNotional () = int(k_cumulativeNotional)
209209
210210
211211 func openInterestNotional () = int(k_openInterestNotional)
212212
213213
214214 func nextFundingBlockTimestamp () = int(k_nextFundingBlock)
215215
216216
217217 func fundingPeriodRaw () = int(k_fundingPeriod)
218218
219219
220220 func fundingPeriodDecimal () = (fundingPeriodRaw() * DECIMAL_UNIT)
221221
222222
223223 func fundingPeriodSeconds () = (fundingPeriodRaw() * SECONDS)
224224
225225
226226 func maintenanceMarginRatio () = int(k_maintenanceMarginRatio)
227227
228228
229229 func liquidationFeeRatio () = int(k_liquidationFeeRatio)
230230
231231
232232 func spreadLimit () = int(k_spreadLimit)
233233
234234
235235 func maxPriceImpact () = int(k_maxPriceImpact)
236236
237237
238238 func latestLongCumulativePremiumFraction () = int(k_latestLongCumulativePremiumFraction)
239239
240240
241241 func latestShortCumulativePremiumFraction () = int(k_latestShortCumulativePremiumFraction)
242242
243243
244244 func totalShortPositionSize () = int(k_totalShortPositionSize)
245245
246246
247247 func totalLongPositionSize () = int(k_totalLongPositionSize)
248248
249249
250250 func requireMoreMarginRatio (_marginRatio,_baseMarginRatio,_largerThanOrEqualTo) = {
251251 let remainingMarginRatio = (_marginRatio - _baseMarginRatio)
252252 if (if (_largerThanOrEqualTo)
253253 then (0 > remainingMarginRatio)
254254 else false)
255255 then throw("Invalid margin")
256256 else if (if (!(_largerThanOrEqualTo))
257257 then (remainingMarginRatio >= 0)
258258 else false)
259259 then throw("Invalid margin")
260260 else true
261261 }
262262
263263
264264 func latestCumulativePremiumFraction (_positionSize) = if ((_positionSize == 0))
265265 then throw("Should not be called with _positionSize == 0")
266266 else if ((_positionSize > 0))
267267 then latestLongCumulativePremiumFraction()
268268 else latestShortCumulativePremiumFraction()
269269
270270
271271 func getPosition (_trader) = {
272272 let positionSizeOpt = getInteger(this, toCompositeKey(k_positionSize, _trader))
273273 match positionSizeOpt {
274274 case positionSize: Int =>
275275 $Tuple4(positionSize, getIntegerValue(this, toCompositeKey(k_positionMargin, _trader)), getIntegerValue(this, toCompositeKey(k_positionOpenNotional, _trader)), getIntegerValue(this, toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _trader)))
276276 case _ =>
277277 $Tuple4(0, 0, 0, 0)
278278 }
279279 }
280280
281281
282282 func requireOpenPosition (_trader) = if ((getPosition(_trader)._1 == 0))
283283 then throw("No open position")
284284 else true
285285
286286
287287 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
288288
289289
290290 func paused () = valueOrElse(getBoolean(this, k_paused), false)
291291
292292
293293 func updateReserve (_isAdd,_quoteAssetAmount,_baseAssetAmount) = if (_isAdd)
294294 then {
295295 let newBase = (bsAstR() - _baseAssetAmount)
296296 if ((0 >= newBase))
297297 then throw("Tx lead to base asset reserve <= 0, revert")
298298 else $Tuple4((qtAstR() + _quoteAssetAmount), newBase, (totalPositionSize() + _baseAssetAmount), (cumulativeNotional() + _quoteAssetAmount))
299299 }
300300 else {
301301 let newQuote = (qtAstR() - _quoteAssetAmount)
302302 if ((0 >= newQuote))
303303 then throw("Tx lead to base quote reserve <= 0, revert")
304304 else $Tuple4(newQuote, (bsAstR() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount), (cumulativeNotional() - _quoteAssetAmount))
305305 }
306306
307307
308308 func swapInput (_isAdd,_quoteAssetAmount) = {
309309 let _qtAstR = qtAstR()
310310 let _bsAstR = bsAstR()
311- let priceBefore = divd(_qtAstR, _bsAstR)
312- let amountBaseAssetBoughtWithoutPriceImpact = divd(_quoteAssetAmount, priceBefore)
313311 let k = muld(_qtAstR, _bsAstR)
314312 let quoteAssetReserveAfter = if (_isAdd)
315313 then (_qtAstR + _quoteAssetAmount)
316314 else (_qtAstR - _quoteAssetAmount)
317315 let baseAssetReserveAfter = divd(k, quoteAssetReserveAfter)
318316 let amountBaseAssetBoughtAbs = abs((baseAssetReserveAfter - _bsAstR))
319317 let amountBaseAssetBought = if (_isAdd)
320318 then amountBaseAssetBoughtAbs
321319 else -(amountBaseAssetBoughtAbs)
322- let priceImpact = abs((divd(amountBaseAssetBoughtWithoutPriceImpact, amountBaseAssetBoughtAbs) - DECIMAL_UNIT))
320+ let $t01183712030 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
321+ let quoteAssetReserveAfter1 = $t01183712030._1
322+ let baseAssetReserveAfter1 = $t01183712030._2
323+ let totalPositionSizeAfter1 = $t01183712030._3
324+ let cumulativeNotionalAfter1 = $t01183712030._4
325+ let priceBefore = divd(_qtAstR, _bsAstR)
326+ let marketPrice = divd(_quoteAssetAmount, amountBaseAssetBoughtAbs)
327+ let priceDiff = abs((priceBefore - marketPrice))
328+ let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
323329 let maxPriceImpactValue = maxPriceImpact()
324330 if ((priceImpact > maxPriceImpactValue))
325- 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)) + " ideal price buy: ") + toString(amountBaseAssetBoughtWithoutPriceImpact)) + " real price buy: ") + toString(amountBaseAssetBoughtAbs)))
326- else {
327- let $t01261712820 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
328- let quoteAssetReserveAfter1 = $t01261712820._1
329- let baseAssetReserveAfter1 = $t01261712820._2
330- let totalPositionSizeAfter1 = $t01261712820._3
331- let cumulativeNotionalAfter1 = $t01261712820._4
332- $Tuple5(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
333- }
331+ 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)))
332+ else $Tuple5(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
334333 }
335334
336335
337336 func calcRemainMarginWithFundingPayment (_oldPositionSize,_oldPositionMargin,_oldPositionCumulativePremiumFraction,_marginDelta) = {
338337 let fundingPayment = if ((_oldPositionSize != 0))
339338 then {
340339 let _latestCumulativePremiumFraction = latestCumulativePremiumFraction(_oldPositionSize)
341340 muld((_latestCumulativePremiumFraction - _oldPositionCumulativePremiumFraction), _oldPositionSize)
342341 }
343342 else 0
344343 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
345- let $t01356713694 = if ((0 > signedMargin))
344+ let $t01352113648 = if ((0 > signedMargin))
346345 then $Tuple2(0, abs(signedMargin))
347346 else $Tuple2(abs(signedMargin), 0)
348- let remainMargin = $t01356713694._1
349- let badDebt = $t01356713694._2
347+ let remainMargin = $t01352113648._1
348+ let badDebt = $t01352113648._2
350349 $Tuple3(remainMargin, badDebt, fundingPayment)
351350 }
352351
353352
354-func swapOutput (_isAdd,_baseAssetAmount) = {
353+func swapOutput (_isAdd,_baseAssetAmount,_checkMaxPriceImpact) = {
355354 let _quoteAssetReserve = qtAstR()
356355 let _baseAssetReserve = bsAstR()
356+ let priceBefore = divd(_quoteAssetReserve, _baseAssetReserve)
357357 if ((_baseAssetAmount == 0))
358358 then throw("Invalid base asset amount")
359359 else {
360360 let k = muld(_quoteAssetReserve, _baseAssetReserve)
361361 let baseAssetPoolAmountAfter = if (_isAdd)
362362 then (_baseAssetReserve + _baseAssetAmount)
363363 else (_baseAssetReserve - _baseAssetAmount)
364364 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
365365 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetReserve))
366- let $t01453214725 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
367- let quoteAssetReserveAfter1 = $t01453214725._1
368- let baseAssetReserveAfter1 = $t01453214725._2
369- let totalPositionSizeAfter1 = $t01453214725._3
370- let cumulativeNotionalAfter1 = $t01453214725._4
371- $Tuple7(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1, (totalLongPositionSize() - (if (_isAdd)
372- then abs(_baseAssetAmount)
373- else 0)), (totalShortPositionSize() - (if (!(_isAdd))
374- then abs(_baseAssetAmount)
375- else 0)))
366+ let maxPriceImpactValue = maxPriceImpact()
367+ let $t01463214825 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
368+ let quoteAssetReserveAfter1 = $t01463214825._1
369+ let baseAssetReserveAfter1 = $t01463214825._2
370+ let totalPositionSizeAfter1 = $t01463214825._3
371+ let cumulativeNotionalAfter1 = $t01463214825._4
372+ let marketPrice = divd(quoteAssetSold, _baseAssetAmount)
373+ let priceDiff = abs((priceBefore - marketPrice))
374+ let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff)))
375+ if (if ((priceImpact > maxPriceImpactValue))
376+ then _checkMaxPriceImpact
377+ else false)
378+ 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)))
379+ else $Tuple7(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1, (totalLongPositionSize() - (if (_isAdd)
380+ then abs(_baseAssetAmount)
381+ else 0)), (totalShortPositionSize() - (if (!(_isAdd))
382+ then abs(_baseAssetAmount)
383+ else 0)))
376384 }
377385 }
378386
379387
380388 func getOracleTwapPrice () = {
381389 let oracle = valueOrErrorMessage(addressFromString(getStringValue(this, k_ora)), "")
382390 let priceKey = getStringValue(this, k_ora_key)
383391 let blockKey = getStringValue(this, k_ora_block_key)
384392 let lastValue = valueOrErrorMessage(getInteger(oracle, priceKey), ((("Can not get oracle price. Oracle: " + toString(oracle)) + " key: ") + priceKey))
385393 lastValue
386394 }
387395
388396
389397 func getSpotPrice () = {
390398 let _quoteAssetReserve = qtAstR()
391399 let _baseAssetReserve = bsAstR()
392400 divd(_quoteAssetReserve, _baseAssetReserve)
393401 }
394402
395403
396404 func isOverFluctuationLimit () = {
397405 let oraclePrice = getOracleTwapPrice()
398406 let currentPrice = getSpotPrice()
399407 (divd(abs((oraclePrice - currentPrice)), oraclePrice) > spreadLimit())
400408 }
401409
402410
403411 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
404- let $t01645216580 = getPosition(_trader)
405- let positionSize = $t01645216580._1
406- let positionMargin = $t01645216580._2
407- let positionOpenNotional = $t01645216580._3
408- let positionLstUpdCPF = $t01645216580._4
412+ let $t01729317421 = getPosition(_trader)
413+ let positionSize = $t01729317421._1
414+ let positionMargin = $t01729317421._2
415+ let positionOpenNotional = $t01729317421._3
416+ let positionLstUpdCPF = $t01729317421._4
409417 let positionSizeAbs = abs(positionSize)
410418 if ((positionSizeAbs == 0))
411419 then throw("Invalid position size")
412420 else {
413421 let isShort = (0 > positionSize)
414422 let positionNotional = if ((_option == PNL_OPTION_SPOT))
415423 then {
416- let $t01682716934 = swapOutput(!(isShort), positionSizeAbs)
417- let outPositionNotional = $t01682716934._1
418- let x1 = $t01682716934._2
419- let x2 = $t01682716934._3
420- let x3 = $t01682716934._4
424+ let $t01766817792 = swapOutput(!(isShort), positionSizeAbs, false)
425+ let outPositionNotional = $t01766817792._1
426+ let x1 = $t01766817792._2
427+ let x2 = $t01766817792._3
428+ let x3 = $t01766817792._4
421429 outPositionNotional
422430 }
423431 else muld(positionSizeAbs, getOracleTwapPrice())
424432 let unrealizedPnl = if (isShort)
425433 then (positionOpenNotional - positionNotional)
426434 else (positionNotional - positionOpenNotional)
427435 $Tuple2(positionNotional, unrealizedPnl)
428436 }
429437 }
430438
431439
432440 func calcMarginRatio (_remainMargin,_badDebt,_positionNotional) = divd((_remainMargin - _badDebt), _positionNotional)
433441
434442
435443 func getMarginRatioByOption (_trader,_option) = {
436- let $t01760417715 = getPosition(_trader)
437- let positionSize = $t01760417715._1
438- let positionMargin = $t01760417715._2
439- let pon = $t01760417715._3
440- let positionLstUpdCPF = $t01760417715._4
441- let $t01772117814 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
442- let positionNotional = $t01772117814._1
443- let unrealizedPnl = $t01772117814._2
444- let $t01781917985 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
445- let remainMargin = $t01781917985._1
446- let badDebt = $t01781917985._2
444+ let $t01846218573 = getPosition(_trader)
445+ let positionSize = $t01846218573._1
446+ let positionMargin = $t01846218573._2
447+ let pon = $t01846218573._3
448+ let positionLstUpdCPF = $t01846218573._4
449+ let $t01857918672 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
450+ let positionNotional = $t01857918672._1
451+ let unrealizedPnl = $t01857918672._2
452+ let $t01867718843 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
453+ let remainMargin = $t01867718843._1
454+ let badDebt = $t01867718843._2
447455 calcMarginRatio(remainMargin, badDebt, positionNotional)
448456 }
449457
450458
451459 func getMarginRatio (_trader) = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
452460
453461
454-func internalClosePosition (_trader) = {
455- let $t01830118429 = getPosition(_trader)
456- let positionSize = $t01830118429._1
457- let positionMargin = $t01830118429._2
458- let positionOpenNotional = $t01830118429._3
459- let positionLstUpdCPF = $t01830118429._4
460- let $t01843518522 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
461- let x1 = $t01843518522._1
462- let unrealizedPnl = $t01843518522._2
463- let $t01852718695 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
464- let remainMargin = $t01852718695._1
465- let badDebt = $t01852718695._2
462+func internalClosePosition (_trader,_checkMaxPriceImpact) = {
463+ let $t01919019318 = getPosition(_trader)
464+ let positionSize = $t01919019318._1
465+ let positionMargin = $t01919019318._2
466+ let positionOpenNotional = $t01919019318._3
467+ let positionLstUpdCPF = $t01919019318._4
468+ let $t01932419411 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
469+ let x1 = $t01932419411._1
470+ let unrealizedPnl = $t01932419411._2
471+ let $t01941619584 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
472+ let remainMargin = $t01941619584._1
473+ let badDebt = $t01941619584._2
466474 let exchangedPositionSize = -(positionSize)
467475 let realizedPnl = unrealizedPnl
468476 let marginToVault = -(remainMargin)
469- let $t01882219103 = swapOutput((positionSize > 0), abs(positionSize))
470- let exchangedQuoteAssetAmount = $t01882219103._1
471- let quoteAssetReserveAfter = $t01882219103._2
472- let baseAssetReserveAfter = $t01882219103._3
473- let totalPositionSizeAfter = $t01882219103._4
474- let cumulativeNotionalAfter = $t01882219103._5
475- let totalLongAfter = $t01882219103._6
476- let totalShortAfter = $t01882219103._7
477+ let $t01971120022 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact)
478+ let exchangedQuoteAssetAmount = $t01971120022._1
479+ let quoteAssetReserveAfter = $t01971120022._2
480+ let baseAssetReserveAfter = $t01971120022._3
481+ let totalPositionSizeAfter = $t01971120022._4
482+ let cumulativeNotionalAfter = $t01971120022._5
483+ let totalLongAfter = $t01971120022._6
484+ let totalShortAfter = $t01971120022._7
477485 let openInterestNotionalAfter = (openInterestNotional() - positionOpenNotional)
478486 $Tuple12(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter)
479487 }
480488
481489
482490 func getTwapSpotPrice () = {
483491 let minuteId = ((lastBlock.timestamp / 1000) / 60)
484492 let startMinuteId = (minuteId - TWAP_INTERVAL)
485493 let listStr = valueOrElse(getString(this, k_lastDataStr), "")
486494 let list = split(listStr, ",")
487495 func filterFn (accumulator,next) = if ((startMinuteId >= parseIntValue(next)))
488496 then (accumulator :+ parseIntValue(next))
489497 else accumulator
490498
491499 let listF = {
492500 let $l = list
493501 let $s = size($l)
494502 let $acc0 = nil
495503 func $f0_1 ($a,$i) = if (($i >= $s))
496504 then $a
497505 else filterFn($a, $l[$i])
498506
499507 func $f0_2 ($a,$i) = if (($i >= $s))
500508 then $a
501509 else throw("List size exceeds 20")
502510
503511 $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)
504512 }
505513 let maxIndex = if ((size(listF) > 0))
506514 then max(listF)
507515 else parseIntValue(list[0])
508516 let lastMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
509517 let endLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(lastMinuteId))), 0)
510518 let endLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(lastMinuteId))), 0)
511519 let nowCumulativePrice = (endLastCumulativePrice + ((minuteId - lastMinuteId) * endLastPrice))
512520 let startLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(maxIndex))), 0)
513521 let startLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(maxIndex))), 0)
514522 let startCumulativePrice = (startLastCumulativePrice + ((startMinuteId - maxIndex) * startLastPrice))
515523 ((nowCumulativePrice - startCumulativePrice) / TWAP_INTERVAL)
516524 }
517525
518526
519527 func updateSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact) = [IntegerEntry(k_initMarginRatio, _initMarginRatio), IntegerEntry(k_maintenanceMarginRatio, _mmr), IntegerEntry(k_liquidationFeeRatio, _liquidationFeeRatio), IntegerEntry(k_fundingPeriod, _fundingPeriod), IntegerEntry(k_fee, _fee), IntegerEntry(k_spreadLimit, _spreadLimit), IntegerEntry(k_maxPriceImpact, _maxPriceImpact)]
520528
521529
522530 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)]
523531
524532
525533 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)]
526534
527535
528536 func appendTwap (price) = {
529537 let minuteId = ((lastBlock.timestamp / 1000) / 60)
530538 let previousMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
531539 if ((previousMinuteId > minuteId))
532540 then throw("TWAP out-of-order")
533541 else {
534542 let lastMinuteId = if ((previousMinuteId == 0))
535543 then minuteId
536544 else previousMinuteId
537545 if ((minuteId > previousMinuteId))
538546 then {
539547 let prevCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(previousMinuteId))), 0)
540548 let prevPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(previousMinuteId))), price)
541549 let lastCumulativePrice = (prevCumulativePrice + ((minuteId - lastMinuteId) * prevPrice))
542550 let list = pushToQueue(strToList(valueOrElse(getString(this, k_lastDataStr), "")), TWAP_INTERVAL, toString(minuteId))
543551 [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))]
544552 }
545553 else {
546554 let twapDataPreviousMinuteId = valueOrElse(getInteger(this, toCompositeKey(k_twapDataPreviousMinuteId, toString(minuteId))), 0)
547555 let prevCumulativePrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastCumulativePrice, toString(twapDataPreviousMinuteId))), 0)
548556 let prevPrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastPrice, toString(twapDataPreviousMinuteId))), price)
549557 let lastCumulativePrice = (prevCumulativePrice + ((minuteId - twapDataPreviousMinuteId) * prevPrice))
550558 [IntegerEntry(toCompositeKey(k_twapDataLastCumulativePrice, toString(minuteId)), lastCumulativePrice), IntegerEntry(toCompositeKey(k_twapDataLastPrice, toString(minuteId)), price)]
551559 }
552560 }
553561 }
554562
555563
556564 func updateAmmReserves (_qtAstR,_bsAstR) = [IntegerEntry(k_quoteAssetReserve, _qtAstR), IntegerEntry(k_baseAssetReserve, _bsAstR)]
557565
558566
559567 func updateAmm (_qtAstR,_bsAstR,_totalPositionSizeAfter,_cumulativeNotionalAfter,_openInterestNotional,_totalLongPositionSize,_totalShortPositionSize) = if (((_totalLongPositionSize - _totalShortPositionSize) != _totalPositionSizeAfter))
560568 then throw(((((("Invalid AMM state data: " + toString(_totalLongPositionSize)) + " + ") + toString(_totalShortPositionSize)) + " != ") + toString(_totalPositionSizeAfter)))
561569 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)))
562570
563571
564572 func deletePosition (_address) = [DeleteEntry(toCompositeKey(k_positionSize, _address)), DeleteEntry(toCompositeKey(k_positionMargin, _address)), DeleteEntry(toCompositeKey(k_positionOpenNotional, _address)), DeleteEntry(toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _address))]
565573
566574
567575 func withdraw (_address,_amount) = {
568576 let balance = assetBalance(this, quoteAsset())
569577 if ((_amount > balance))
570578 then throw(((("Unable to withdraw " + toString(_amount)) + " from contract balance ") + toString(balance)))
571579 else [ScriptTransfer(_address, _amount, quoteAsset())]
572580 }
573581
574582
575583 func updateBalance (i) = if ((0 > i))
576584 then throw("Balance")
577585 else [IntegerEntry(k_balance, i)]
578586
579587
580588 func transferFee (i) = [ScriptTransfer(stakingAddress(), i, quoteAsset())]
581589
582590
583591 @Callable(i)
584592 func pause () = if ((i.caller != adminAddress()))
585593 then throw("Invalid togglePause params")
586594 else [BooleanEntry(k_paused, true)]
587595
588596
589597
590598 @Callable(i)
591599 func unpause () = if ((i.caller != adminAddress()))
592600 then throw("Invalid togglePause params")
593601 else [BooleanEntry(k_paused, false)]
594602
595603
596604
597605 @Callable(i)
598606 func addLiquidity (_quoteAssetAmount) = if (if ((i.caller != adminAddress()))
599607 then true
600608 else (0 >= _quoteAssetAmount))
601609 then throw("Invalid addLiquidity params")
602610 else {
603611 let _qtAstR = qtAstR()
604612 let _bsAstR = bsAstR()
605613 let price = divd(_qtAstR, _bsAstR)
606614 let baseAssetAmountToAdd = divd(_quoteAssetAmount, price)
607615 let qtAstRAfter = (_qtAstR + _quoteAssetAmount)
608616 let bsAstRAfter = (_bsAstR + baseAssetAmountToAdd)
609617 updateAmmReserves(qtAstRAfter, bsAstRAfter)
610618 }
611619
612620
613621
614622 @Callable(i)
615623 func removeLiquidity (_quoteAssetAmount) = if (if ((i.caller != adminAddress()))
616624 then true
617625 else (0 >= _quoteAssetAmount))
618626 then throw("Invalid removeLiquidity params")
619627 else {
620628 let _qtAstR = qtAstR()
621629 let _bsAstR = bsAstR()
622630 let price = divd(_qtAstR, _bsAstR)
623631 let baseAssetAmountToRemove = divd(_quoteAssetAmount, price)
624632 let qtAstRAfter = (_qtAstR - _quoteAssetAmount)
625633 let bsAstRAfter = (_bsAstR - baseAssetAmountToRemove)
626634 updateAmmReserves(qtAstRAfter, bsAstRAfter)
627635 }
628636
629637
630638
631639 @Callable(i)
632640 func changeSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact) = if ((i.caller != adminAddress()))
633641 then throw("Invalid changeSettings params")
634642 else updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact)
635643
636644
637645
638646 @Callable(i)
639647 func initialize (_qtAstR,_bsAstR,_fundingPeriod,_initMarginRatio,_mmr,_liquidationFeeRatio,_fee,_oracle,_oracleKey,_coordinator,_spreadLimit,_maxPriceImpact) = if (if (if (if (if (if (if (if (if (if ((0 >= _qtAstR))
640648 then true
641649 else (0 >= _bsAstR))
642650 then true
643651 else (0 >= _fundingPeriod))
644652 then true
645653 else (0 >= _initMarginRatio))
646654 then true
647655 else (0 >= _mmr))
648656 then true
649657 else (0 >= _liquidationFeeRatio))
650658 then true
651659 else (0 >= _fee))
652660 then true
653661 else (0 >= _spreadLimit))
654662 then true
655663 else (0 >= _maxPriceImpact))
656664 then true
657665 else initialized())
658666 then throw("Invalid initialize parameters")
659667 else ((((updateAmm(_qtAstR, _bsAstR, 0, 0, 0, 0, 0) ++ updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact)) ++ updateFunding((lastBlock.timestamp + _fundingPeriod), 0, 0, 0, 0)) ++ updateBalance(0)) ++ [BooleanEntry(k_initialized, true), StringEntry(k_ora, _oracle), StringEntry(k_ora_key, _oracleKey), StringEntry(k_coordinatorAddress, _coordinator)])
660668
661669
662670
663671 @Callable(i)
664672 func decreasePosition (_amount,_leverage,_minBaseAssetAmount) = if (if (if (if (if ((0 >= _amount))
665673 then true
666674 else !(initialized()))
667675 then true
668676 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
669677 then true
670678 else !(requireOpenPosition(toString(i.caller))))
671679 then true
672680 else paused())
673681 then throw("Invalid decreasePosition parameters")
674682 else {
675- let $t03001230164 = getPosition(toString(i.caller))
676- let oldPositionSize = $t03001230164._1
677- let oldPositionMargin = $t03001230164._2
678- let oldPositionOpenNotional = $t03001230164._3
679- let oldPositionLstUpdCPF = $t03001230164._4
683+ let $t03093131083 = getPosition(toString(i.caller))
684+ let oldPositionSize = $t03093131083._1
685+ let oldPositionMargin = $t03093131083._2
686+ let oldPositionOpenNotional = $t03093131083._3
687+ let oldPositionLstUpdCPF = $t03093131083._4
680688 let _direction = if ((oldPositionSize > 0))
681689 then DIR_SHORT
682690 else DIR_LONG
683691 let isAdd = (_direction == DIR_LONG)
684692 let openNotional = muld(_amount, _leverage)
685- let $t03033730453 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
686- let oldPositionNotional = $t03033730453._1
687- let unrealizedPnl = $t03033730453._2
688- let $t03045933008 = if ((oldPositionNotional > openNotional))
693+ let $t03125631372 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
694+ let oldPositionNotional = $t03125631372._1
695+ let unrealizedPnl = $t03125631372._2
696+ let $t03137833927 = if ((oldPositionNotional > openNotional))
689697 then {
690- let $t03083631055 = swapInput(isAdd, openNotional)
691- let exchangedPositionSize = $t03083631055._1
692- let quoteAssetReserveAfter = $t03083631055._2
693- let baseAssetReserveAfter = $t03083631055._3
694- let totalPositionSizeAfter = $t03083631055._4
695- let cumulativeNotionalAfter = $t03083631055._5
698+ let $t03175531974 = swapInput(isAdd, openNotional)
699+ let exchangedPositionSize = $t03175531974._1
700+ let quoteAssetReserveAfter = $t03175531974._2
701+ let baseAssetReserveAfter = $t03175531974._3
702+ let totalPositionSizeAfter = $t03175531974._4
703+ let cumulativeNotionalAfter = $t03175531974._5
696704 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
697705 if (if ((_minBaseAssetAmount != 0))
698706 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
699707 else false)
700708 then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
701709 else {
702710 let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), abs(oldPositionSize))
703- let $t03149231737 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
704- let remainMargin = $t03149231737._1
705- let badDebt = $t03149231737._2
706- let fundingPayment = $t03149231737._3
711+ let $t03241132656 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
712+ let remainMargin = $t03241132656._1
713+ let badDebt = $t03241132656._2
714+ let fundingPayment = $t03241132656._3
707715 let exchangedQuoteAssetAmount = openNotional
708716 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
709717 let remainOpenNotional = if ((oldPositionSize > 0))
710718 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
711719 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
712720 let newPositionSize = (oldPositionSize + exchangedPositionSize)
713721 $Tuple11(newPositionSize, remainMargin, abs(remainOpenNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() - openNotional), (totalLongPositionSize() - (if ((newPositionSize > 0))
714722 then abs(exchangedPositionSize)
715723 else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
716724 then abs(exchangedPositionSize)
717725 else 0)))
718726 }
719727 }
720728 else throw("Close position first")
721- let newPositionSize = $t03045933008._1
722- let newPositionRemainMargin = $t03045933008._2
723- let newPositionOpenNotional = $t03045933008._3
724- let newPositionLatestCPF = $t03045933008._4
725- let baseAssetReserveAfter = $t03045933008._5
726- let quoteAssetReserveAfter = $t03045933008._6
727- let totalPositionSizeAfter = $t03045933008._7
728- let cumulativeNotionalAfter = $t03045933008._8
729- let openInterestNotionalAfter = $t03045933008._9
730- let totalLongAfter = $t03045933008._10
731- let totalShortAfter = $t03045933008._11
729+ let newPositionSize = $t03137833927._1
730+ let newPositionRemainMargin = $t03137833927._2
731+ let newPositionOpenNotional = $t03137833927._3
732+ let newPositionLatestCPF = $t03137833927._4
733+ let baseAssetReserveAfter = $t03137833927._5
734+ let quoteAssetReserveAfter = $t03137833927._6
735+ let totalPositionSizeAfter = $t03137833927._7
736+ let cumulativeNotionalAfter = $t03137833927._8
737+ let openInterestNotionalAfter = $t03137833927._9
738+ let totalLongAfter = $t03137833927._10
739+ let totalShortAfter = $t03137833927._11
732740 let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), newPositionOpenNotional], nil)
733741 if ((notifyNotional == notifyNotional))
734742 then (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter))
735743 else throw("Strict value is not equal to itself.")
736744 }
737745
738746
739747
740748 @Callable(i)
741749 func increasePosition (_direction,_leverage,_minBaseAssetAmount) = {
742750 let _rawAmount = i.payments[0].amount
743751 if (if (if (if (if (if (if ((_direction != DIR_LONG))
744752 then (_direction != DIR_SHORT)
745753 else false)
746754 then true
747755 else (0 >= _rawAmount))
748756 then true
749757 else !(initialized()))
750758 then true
751759 else (i.payments[0].assetId != quoteAsset()))
752760 then true
753761 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
754762 then true
755763 else paused())
756764 then throw("Invalid increasePosition parameters")
757765 else {
758766 let feeAmount = muld(_rawAmount, fee())
759767 let _amount = (_rawAmount - feeAmount)
760- let $t03412634278 = getPosition(toString(i.caller))
761- let oldPositionSize = $t03412634278._1
762- let oldPositionMargin = $t03412634278._2
763- let oldPositionOpenNotional = $t03412634278._3
764- let oldPositionLstUpdCPF = $t03412634278._4
768+ let $t03504535197 = getPosition(toString(i.caller))
769+ let oldPositionSize = $t03504535197._1
770+ let oldPositionMargin = $t03504535197._2
771+ let oldPositionOpenNotional = $t03504535197._3
772+ let oldPositionLstUpdCPF = $t03504535197._4
765773 let isNewPosition = (oldPositionSize == 0)
766774 let isSameDirection = if ((oldPositionSize > 0))
767775 then (_direction == DIR_LONG)
768776 else (_direction == DIR_SHORT)
769777 let expandExisting = if (!(isNewPosition))
770778 then isSameDirection
771779 else false
772780 let isAdd = (_direction == DIR_LONG)
773- let $t03456736956 = if (if (isNewPosition)
781+ let $t03548637875 = if (if (isNewPosition)
774782 then true
775783 else expandExisting)
776784 then {
777785 let openNotional = muld(_amount, _leverage)
778- let $t03499135197 = swapInput(isAdd, openNotional)
779- let amountBaseAssetBought = $t03499135197._1
780- let quoteAssetReserveAfter = $t03499135197._2
781- let baseAssetReserveAfter = $t03499135197._3
782- let totalPositionSizeAfter = $t03499135197._4
783- let cumulativeNotionalAfter = $t03499135197._5
786+ let $t03591036116 = swapInput(isAdd, openNotional)
787+ let amountBaseAssetBought = $t03591036116._1
788+ let quoteAssetReserveAfter = $t03591036116._2
789+ let baseAssetReserveAfter = $t03591036116._3
790+ let totalPositionSizeAfter = $t03591036116._4
791+ let cumulativeNotionalAfter = $t03591036116._5
784792 if (if ((_minBaseAssetAmount != 0))
785793 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
786794 else false)
787795 then throw(((("Limit error: " + toString(abs(amountBaseAssetBought))) + " < ") + toString(_minBaseAssetAmount)))
788796 else {
789797 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
790798 let increaseMarginRequirement = divd(openNotional, _leverage)
791- let $t03557835817 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
792- let remainMargin = $t03557835817._1
793- let x1 = $t03557835817._2
794- let x2 = $t03557835817._3
799+ let $t03649736736 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
800+ let remainMargin = $t03649736736._1
801+ let x1 = $t03649736736._2
802+ let x2 = $t03649736736._3
795803 $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
796804 then abs(amountBaseAssetBought)
797805 else 0)), (totalShortPositionSize() + (if ((0 > newPositionSize))
798806 then abs(amountBaseAssetBought)
799807 else 0)))
800808 }
801809 }
802810 else {
803811 let openNotional = muld(_amount, _leverage)
804- let $t03664936765 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
805- let oldPositionNotional = $t03664936765._1
806- let unrealizedPnl = $t03664936765._2
812+ let $t03756837684 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
813+ let oldPositionNotional = $t03756837684._1
814+ let unrealizedPnl = $t03756837684._2
807815 if ((oldPositionNotional > openNotional))
808816 then throw("Use decreasePosition to decrease position size")
809817 else throw("Close position first")
810818 }
811- let newPositionSize = $t03456736956._1
812- let newPositionRemainMargin = $t03456736956._2
813- let newPositionOpenNotional = $t03456736956._3
814- let newPositionLatestCPF = $t03456736956._4
815- let baseAssetReserveAfter = $t03456736956._5
816- let quoteAssetReserveAfter = $t03456736956._6
817- let totalPositionSizeAfter = $t03456736956._7
818- let cumulativeNotionalAfter = $t03456736956._8
819- let openInterestNotionalAfter = $t03456736956._9
820- let totalLongAfter = $t03456736956._10
821- let totalShortAfter = $t03456736956._11
819+ let newPositionSize = $t03548637875._1
820+ let newPositionRemainMargin = $t03548637875._2
821+ let newPositionOpenNotional = $t03548637875._3
822+ let newPositionLatestCPF = $t03548637875._4
823+ let baseAssetReserveAfter = $t03548637875._5
824+ let quoteAssetReserveAfter = $t03548637875._6
825+ let totalPositionSizeAfter = $t03548637875._7
826+ let cumulativeNotionalAfter = $t03548637875._8
827+ let openInterestNotionalAfter = $t03548637875._9
828+ let totalLongAfter = $t03548637875._10
829+ let totalShortAfter = $t03548637875._11
822830 let feeToStakers = (feeAmount / 2)
823831 let feeToInsurance = (feeAmount - feeToStakers)
824832 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
825833 if ((stake == stake))
826834 then {
827835 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
828836 if ((depositInsurance == depositInsurance))
829837 then {
830838 let notifyFee = invoke(minerAddress(), "notifyFees", [toString(i.caller), feeAmount], nil)
831839 if ((notifyFee == notifyFee))
832840 then {
833841 let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), newPositionOpenNotional], nil)
834842 if ((notifyNotional == notifyNotional))
835843 then (((updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
836844 else throw("Strict value is not equal to itself.")
837845 }
838846 else throw("Strict value is not equal to itself.")
839847 }
840848 else throw("Strict value is not equal to itself.")
841849 }
842850 else throw("Strict value is not equal to itself.")
843851 }
844852 }
845853
846854
847855
848856 @Callable(i)
849857 func addMargin () = {
850858 let _rawAmount = i.payments[0].amount
851859 if (if (if (if ((i.payments[0].assetId != quoteAsset()))
852860 then true
853861 else !(requireOpenPosition(toString(i.caller))))
854862 then true
855863 else !(initialized()))
856864 then true
857865 else paused())
858866 then throw("Invalid addMargin parameters")
859867 else {
860868 let feeAmount = muld(_rawAmount, fee())
861869 let _amount = (_rawAmount - feeAmount)
862- let $t03851238664 = getPosition(toString(i.caller))
863- let oldPositionSize = $t03851238664._1
864- let oldPositionMargin = $t03851238664._2
865- let oldPositionOpenNotional = $t03851238664._3
866- let oldPositionLstUpdCPF = $t03851238664._4
870+ let $t03943139583 = getPosition(toString(i.caller))
871+ let oldPositionSize = $t03943139583._1
872+ let oldPositionMargin = $t03943139583._2
873+ let oldPositionOpenNotional = $t03943139583._3
874+ let oldPositionLstUpdCPF = $t03943139583._4
867875 let feeToStakers = (feeAmount / 2)
868876 let feeToInsurance = (feeAmount - feeToStakers)
869877 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
870878 if ((stake == stake))
871879 then {
872880 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
873881 if ((depositInsurance == depositInsurance))
874882 then {
875883 let notifyFee = invoke(minerAddress(), "notifyFees", [toString(i.caller), feeAmount], nil)
876884 if ((notifyFee == notifyFee))
877885 then ((updatePosition(toString(i.caller), oldPositionSize, (oldPositionMargin + _amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
878886 else throw("Strict value is not equal to itself.")
879887 }
880888 else throw("Strict value is not equal to itself.")
881889 }
882890 else throw("Strict value is not equal to itself.")
883891 }
884892 }
885893
886894
887895
888896 @Callable(i)
889897 func removeMargin (_amount) = if (if (if (if ((0 >= _amount))
890898 then true
891899 else !(requireOpenPosition(toString(i.caller))))
892900 then true
893901 else !(initialized()))
894902 then true
895903 else paused())
896904 then throw("Invalid removeMargin parameters")
897905 else {
898- let $t03971339865 = getPosition(toString(i.caller))
899- let oldPositionSize = $t03971339865._1
900- let oldPositionMargin = $t03971339865._2
901- let oldPositionOpenNotional = $t03971339865._3
902- let oldPositionLstUpdCPF = $t03971339865._4
906+ let $t04063240784 = getPosition(toString(i.caller))
907+ let oldPositionSize = $t04063240784._1
908+ let oldPositionMargin = $t04063240784._2
909+ let oldPositionOpenNotional = $t04063240784._3
910+ let oldPositionLstUpdCPF = $t04063240784._4
903911 let marginDelta = -(_amount)
904- let $t03990240081 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
905- let remainMargin = $t03990240081._1
906- let badDebt = $t03990240081._2
912+ let $t04082141000 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
913+ let remainMargin = $t04082141000._1
914+ let badDebt = $t04082141000._2
907915 if ((badDebt != 0))
908916 then throw("Invalid removed margin amount")
909917 else {
910918 let marginRatio = calcMarginRatio(remainMargin, badDebt, oldPositionOpenNotional)
911919 if (!(requireMoreMarginRatio(marginRatio, initMarginRatio(), true)))
912920 then throw(((("Too much margin removed: " + toString(marginRatio)) + " < ") + toString(initMarginRatio())))
913921 else {
914922 let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [_amount, toBase58String(quoteAsset())], nil)
915923 if ((unstake == unstake))
916924 then ((updatePosition(toString(i.caller), oldPositionSize, remainMargin, oldPositionOpenNotional, latestCumulativePremiumFraction(oldPositionSize)) ++ withdraw(i.caller, _amount)) ++ updateBalance((cbalance() - _amount)))
917925 else throw("Strict value is not equal to itself.")
918926 }
919927 }
920928 }
921929
922930
923931
924932 @Callable(i)
925933 func closePosition () = if (if (if (!(requireOpenPosition(toString(i.caller))))
926934 then true
927935 else !(initialized()))
928936 then true
929937 else paused())
930938 then throw("Invalid closePosition parameters")
931939 else {
932- let $t04117741561 = internalClosePosition(toString(i.caller))
933- let x1 = $t04117741561._1
934- let positionBadDebt = $t04117741561._2
935- let realizedPnl = $t04117741561._3
936- let marginToVault = $t04117741561._4
937- let quoteAssetReserveAfter = $t04117741561._5
938- let baseAssetReserveAfter = $t04117741561._6
939- let totalPositionSizeAfter = $t04117741561._7
940- let cumulativeNotionalAfter = $t04117741561._8
941- let openInterestNotionalAfter = $t04117741561._9
942- let x2 = $t04117741561._10
943- let totalLongAfter = $t04117741561._11
944- let totalShortAfter = $t04117741561._12
940+ let $t04209642486 = internalClosePosition(toString(i.caller), true)
941+ let x1 = $t04209642486._1
942+ let positionBadDebt = $t04209642486._2
943+ let realizedPnl = $t04209642486._3
944+ let marginToVault = $t04209642486._4
945+ let quoteAssetReserveAfter = $t04209642486._5
946+ let baseAssetReserveAfter = $t04209642486._6
947+ let totalPositionSizeAfter = $t04209642486._7
948+ let cumulativeNotionalAfter = $t04209642486._8
949+ let openInterestNotionalAfter = $t04209642486._9
950+ let x2 = $t04209642486._10
951+ let totalLongAfter = $t04209642486._11
952+ let totalShortAfter = $t04209642486._12
945953 if ((positionBadDebt > 0))
946954 then throw("Unable to close position with bad debt")
947955 else {
948956 let withdrawAmount = abs(marginToVault)
949957 let ammBalance = (cbalance() - withdrawAmount)
950- let $t04177041912 = if ((0 > ammBalance))
958+ let $t04269542837 = if ((0 > ammBalance))
951959 then $Tuple2(0, abs(ammBalance))
952960 else $Tuple2(ammBalance, 0)
953- let ammNewBalance = $t04177041912._1
954- let getFromInsurance = $t04177041912._2
961+ let ammNewBalance = $t04269542837._1
962+ let getFromInsurance = $t04269542837._2
955963 let x = if ((getFromInsurance > 0))
956964 then {
957965 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil)
958966 if ((withdrawInsurance == withdrawInsurance))
959967 then nil
960968 else throw("Strict value is not equal to itself.")
961969 }
962970 else nil
963971 if ((x == x))
964972 then {
965973 let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(withdrawAmount - getFromInsurance), toBase58String(quoteAsset())], nil)
966974 if ((unstake == unstake))
967975 then {
968976 let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), 0], nil)
969977 if ((notifyNotional == notifyNotional))
970978 then (((deletePosition(toString(i.caller)) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, withdrawAmount)) ++ updateBalance(ammNewBalance))
971979 else throw("Strict value is not equal to itself.")
972980 }
973981 else throw("Strict value is not equal to itself.")
974982 }
975983 else throw("Strict value is not equal to itself.")
976984 }
977985 }
978986
979987
980988
981989 @Callable(i)
982990 func liquidate (_trader) = {
983991 let spotMarginRatio = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
984992 let marginRatio = if (isOverFluctuationLimit())
985993 then {
986994 let oracleMarginRatio = getMarginRatioByOption(_trader, PNL_OPTION_ORACLE)
987995 vmax(spotMarginRatio, oracleMarginRatio)
988996 }
989997 else spotMarginRatio
990998 if (if (if (if (!(requireMoreMarginRatio(marginRatio, maintenanceMarginRatio(), false)))
991999 then true
9921000 else !(requireOpenPosition(_trader)))
9931001 then true
9941002 else !(initialized()))
9951003 then true
9961004 else paused())
9971005 then throw("Unable to liquidate")
9981006 else {
999- let $t04360244018 = internalClosePosition(_trader)
1000- let x1 = $t04360244018._1
1001- let badDebt = $t04360244018._2
1002- let x2 = $t04360244018._3
1003- let x3 = $t04360244018._4
1004- let quoteAssetReserveAfter = $t04360244018._5
1005- let baseAssetReserveAfter = $t04360244018._6
1006- let totalPositionSizeAfter = $t04360244018._7
1007- let cumulativeNotionalAfter = $t04360244018._8
1008- let openInterestNotionalAfter = $t04360244018._9
1009- let exchangedQuoteAssetAmount = $t04360244018._10
1010- let totalLongAfter = $t04360244018._11
1011- let totalShortAfter = $t04360244018._12
1007+ let $t04452744950 = internalClosePosition(_trader, false)
1008+ let x1 = $t04452744950._1
1009+ let badDebt = $t04452744950._2
1010+ let x2 = $t04452744950._3
1011+ let x3 = $t04452744950._4
1012+ let quoteAssetReserveAfter = $t04452744950._5
1013+ let baseAssetReserveAfter = $t04452744950._6
1014+ let totalPositionSizeAfter = $t04452744950._7
1015+ let cumulativeNotionalAfter = $t04452744950._8
1016+ let openInterestNotionalAfter = $t04452744950._9
1017+ let exchangedQuoteAssetAmount = $t04452744950._10
1018+ let totalLongAfter = $t04452744950._11
1019+ let totalShortAfter = $t04452744950._12
10121020 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
10131021 let feeToLiquidator = (liquidationPenalty / 2)
10141022 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
10151023 let ammBalance = (cbalance() - liquidationPenalty)
1016- let $t04441644551 = if ((0 > ammBalance))
1024+ let $t04534845483 = if ((0 > ammBalance))
10171025 then $Tuple2(0, abs(ammBalance))
10181026 else $Tuple2(ammBalance, 0)
1019- let newAmmBalance = $t04441644551._1
1020- let takeFromInsurance = $t04441644551._2
1027+ let newAmmBalance = $t04534845483._1
1028+ let takeFromInsurance = $t04534845483._2
10211029 let x = if ((takeFromInsurance > 0))
10221030 then {
10231031 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
10241032 if ((withdrawInsurance == withdrawInsurance))
10251033 then nil
10261034 else throw("Strict value is not equal to itself.")
10271035 }
10281036 else nil
10291037 if ((x == x))
10301038 then {
10311039 let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(liquidationPenalty - takeFromInsurance), toBase58String(quoteAsset())], nil)
10321040 if ((unstake == unstake))
10331041 then {
10341042 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
10351043 if ((depositInsurance == depositInsurance))
10361044 then {
10371045 let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, 0], nil)
10381046 if ((notifyNotional == notifyNotional))
10391047 then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance))
10401048 else throw("Strict value is not equal to itself.")
10411049 }
10421050 else throw("Strict value is not equal to itself.")
10431051 }
10441052 else throw("Strict value is not equal to itself.")
10451053 }
10461054 else throw("Strict value is not equal to itself.")
10471055 }
10481056 }
10491057
10501058
10511059
10521060 @Callable(i)
10531061 func payFunding () = {
10541062 let fundingBlockTimestamp = nextFundingBlockTimestamp()
10551063 if (if (if ((fundingBlockTimestamp > lastBlock.timestamp))
10561064 then true
10571065 else !(initialized()))
10581066 then true
10591067 else paused())
10601068 then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp)))
10611069 else {
10621070 let underlyingPrice = getOracleTwapPrice()
10631071 let spotTwapPrice = getTwapSpotPrice()
10641072 let premium = (spotTwapPrice - underlyingPrice)
1065- let $t04604547380 = if (if ((totalShortPositionSize() == 0))
1073+ let $t04697748312 = if (if ((totalShortPositionSize() == 0))
10661074 then true
10671075 else (totalLongPositionSize() == 0))
10681076 then $Tuple2(0, 0)
10691077 else if ((0 > premium))
10701078 then {
10711079 let shortPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
10721080 let longPremiumFraction = divd(muld(shortPremiumFraction, totalShortPositionSize()), totalLongPositionSize())
10731081 $Tuple2(shortPremiumFraction, longPremiumFraction)
10741082 }
10751083 else {
10761084 let longPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
10771085 let shortPremiumFraction = divd(muld(longPremiumFraction, totalLongPositionSize()), totalShortPositionSize())
10781086 $Tuple2(shortPremiumFraction, longPremiumFraction)
10791087 }
1080- let shortPremiumFraction = $t04604547380._1
1081- let longPremiumFraction = $t04604547380._2
1088+ let shortPremiumFraction = $t04697748312._1
1089+ let longPremiumFraction = $t04697748312._2
10821090 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
10831091 }
10841092 }
10851093
10861094
10871095
10881096 @Callable(i)
10891097 func v_get (_trader) = {
1090- let $t04775547808 = internalClosePosition(_trader)
1091- let x1 = $t04775547808._1
1092- let x2 = $t04775547808._2
1093- let x3 = $t04775547808._3
1094- let x4 = $t04775547808._4
1098+ let $t04868748747 = internalClosePosition(_trader, false)
1099+ let x1 = $t04868748747._1
1100+ let x2 = $t04868748747._2
1101+ let x3 = $t04868748747._3
1102+ let x4 = $t04868748747._4
10951103 throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader))))
10961104 }
10971105
10981106
10991107
11001108 @Callable(i)
11011109 func view_calcRemainMarginWithFundingPayment (_trader) = {
1102- let $t04795548066 = getPosition(_trader)
1103- let positionSize = $t04795548066._1
1104- let positionMargin = $t04795548066._2
1105- let pon = $t04795548066._3
1106- let positionLstUpdCPF = $t04795548066._4
1107- let $t04807148172 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1108- let positionNotional = $t04807148172._1
1109- let unrealizedPnl = $t04807148172._2
1110- let $t04817748359 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1111- let remainMargin = $t04817748359._1
1112- let badDebt = $t04817748359._2
1113- let fundingPayment = $t04817748359._3
1114- throw((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)))
1110+ let $t04889449005 = getPosition(_trader)
1111+ let positionSize = $t04889449005._1
1112+ let positionMargin = $t04889449005._2
1113+ let pon = $t04889449005._3
1114+ let positionLstUpdCPF = $t04889449005._4
1115+ let $t04901049111 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1116+ let positionNotional = $t04901049111._1
1117+ let unrealizedPnl = $t04901049111._2
1118+ let $t04911649298 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1119+ let remainMargin = $t04911649298._1
1120+ let badDebt = $t04911649298._2
1121+ let fundingPayment = $t04911649298._3
1122+ throw(((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)) + s(badDebt)))
11151123 }
11161124
11171125
11181126
11191127 @Callable(i)
11201128 func forceMoveAsset (_trader,_amount) = if (if ((addressFromPublicKey(adminPublicKey()) != i.caller))
11211129 then true
11221130 else (0 > _amount))
11231131 then throw("Invalid forceMoveAsset parameters")
11241132 else {
11251133 let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [_amount, toBase58String(quoteAsset())], nil)
11261134 if ((unstake == unstake))
11271135 then (withdraw(addressFromStringValue(_trader), _amount) ++ updateBalance((cbalance() - _amount)))
11281136 else throw("Strict value is not equal to itself.")
11291137 }
11301138
11311139
11321140 @Verifier(tx)
11331141 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], adminPublicKey())
11341142

github/deemru/w8io/026f985 
171.63 ms