tx · 4u3Zo3Ju2psFwE8bxFVrJfPUVd5Bo2TR9PWrpvSnZqRa

3MrRa3KaEgRyyjQdMLuU78m5GkJLvP5DZLj:  -0.05100000 Waves

2022.07.05 18:35 [2126564] smart account 3MrRa3KaEgRyyjQdMLuU78m5GkJLvP5DZLj > SELF 0.00000000 Waves

{ "type": 13, "id": "4u3Zo3Ju2psFwE8bxFVrJfPUVd5Bo2TR9PWrpvSnZqRa", "fee": 5100000, "feeAssetId": null, "timestamp": 1657035317817, "version": 2, "chainId": 84, "sender": "3MrRa3KaEgRyyjQdMLuU78m5GkJLvP5DZLj", "senderPublicKey": "AJNTN7EtP9dsAmPzcKRp9bRMvzZL4uwkmVxQuFuar3Qr", "proofs": [ "3ibTbfbVaUUSw9AEjaH3h27MUqNhq8FSQaRvVYZiLiXKeX5LVkJPyw1MvXoWZDRxf8EaApzUxzXjw5KTnU6sHqi" ], "script": "base64:AAIFAAAAAAAAAEkIAhIAEgASCQoHAQEBAQEBARIOCgwBAQEBAQEBCAgIAQESBQoDAQEBEgUKAwEBARIAEgMKAQESABIDCgEIEgASAwoBCBIDCgEIAAAAdAAAAAAJa19vcmFfa2V5AgAAAAlrX29yYV9rZXkAAAAAD2tfb3JhX2Jsb2NrX2tleQIAAAAPa19vcmFfYmxvY2tfa2V5AAAAAAVrX29yYQIAAAAFa19vcmEAAAAACWtfYmFsYW5jZQIAAAAJa19iYWxhbmNlAAAAAA5rX3Bvc2l0aW9uU2l6ZQIAAAAOa19wb3NpdGlvblNpemUAAAAAEGtfcG9zaXRpb25NYXJnaW4CAAAAEGtfcG9zaXRpb25NYXJnaW4AAAAAFmtfcG9zaXRpb25PcGVuTm90aW9uYWwCAAAAFmtfcG9zaXRpb25PcGVuTm90aW9uYWwAAAAALmtfcG9zaXRpb25MYXN0VXBkYXRlZEN1bXVsYXRpdmVQcmVtaXVtRnJhY3Rpb24CAAAAEmtfcG9zaXRpb25GcmFjdGlvbgAAAAANa19pbml0aWFsaXplZAIAAAANa19p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AAACXzIEAAAADmZ1bmRpbmdQYXltZW50CAUAAAANJHQwNDUwODI0NTI2NAAAAAJfMwkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkBAAAAAXMAAAABBQAAAAxyZW1haW5NYXJnaW4JAQAAAAFzAAAAAQUAAAAOZnVuZGluZ1BheW1lbnQJAQAAAAFzAAAAAQkBAAAADmdldE1hcmdpblJhdGlvAAAAAQUAAAAHX3RyYWRlcgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQEAAAAOYWRtaW5QdWJsaWNLZXkAAAAAGvX3jQ==", "height": 2126564, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FaqpdL2EJLiGZYpGmk2P3pRY1RM622NT9Uzn8Mjp84sM Next: 4hKn9z7ArwhYU28m2uvqfDbvLaEzNi7uBZreVNS3U7Eb Diff:
OldNewDifferences
4242 let k_twapDataLastCumulativePrice = "k_twapDataLastCumulativePrice"
4343
4444 let k_twapDataLastPrice = "k_twapDataLastPrice"
45+
46+let k_twapDataPreviousMinuteId = "k_twapDataPreviousMinuteId"
4547
4648 let k_latestLongCumulativePremiumFraction = "k_latestLongPremiumFraction"
4749
141143
142144
143145 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
146+
147+
148+func listToStr (_list) = {
149+ func _join (accumulator,val) = ((accumulator + val) + ",")
150+
151+ let newListStr = {
152+ let $l = _list
153+ let $s = size($l)
154+ let $acc0 = ""
155+ func $f0_1 ($a,$i) = if (($i >= $s))
156+ then $a
157+ else _join($a, $l[$i])
158+
159+ func $f0_2 ($a,$i) = if (($i >= $s))
160+ then $a
161+ else throw("List size exceeds 20")
162+
163+ $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)
164+ }
165+ let newListStrU = dropRight(newListStr, 1)
166+ let newListStrR = if ((take(newListStrU, 1) == ","))
167+ then drop(newListStrU, 1)
168+ else newListStrU
169+ newListStrR
170+ }
171+
172+
173+func strToList (_str) = split(_str, ",")
174+
175+
176+func pushToQueue (_list,_maxSize,_value) = if ((size(_list) > _maxSize))
177+ then (removeByIndex(_list, 0) :+ _value)
178+ else (_list :+ _value)
144179
145180
146181 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
283318 if ((priceImpact > maxPriceImpactValue))
284319 then throw(((("Price impact " + toString(priceImpact)) + " > max price impact ") + toString(maxPriceImpactValue)))
285320 else {
286- let $t01143211635 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
287- let quoteAssetReserveAfter1 = $t01143211635._1
288- let baseAssetReserveAfter1 = $t01143211635._2
289- let totalPositionSizeAfter1 = $t01143211635._3
290- let cumulativeNotionalAfter1 = $t01143211635._4
321+ let $t01209412297 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
322+ let quoteAssetReserveAfter1 = $t01209412297._1
323+ let baseAssetReserveAfter1 = $t01209412297._2
324+ let totalPositionSizeAfter1 = $t01209412297._3
325+ let cumulativeNotionalAfter1 = $t01209412297._4
291326 $Tuple5(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
292327 }
293328 }
301336 }
302337 else 0
303338 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
304- let $t01238212509 = if ((0 > signedMargin))
339+ let $t01304413171 = if ((0 > signedMargin))
305340 then $Tuple2(0, abs(signedMargin))
306341 else $Tuple2(abs(signedMargin), 0)
307- let remainMargin = $t01238212509._1
308- let badDebt = $t01238212509._2
342+ let remainMargin = $t01304413171._1
343+ let badDebt = $t01304413171._2
309344 $Tuple3(remainMargin, badDebt, fundingPayment)
310345 }
311346
322357 else (_baseAssetReserve - _baseAssetAmount)
323358 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
324359 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetReserve))
325- let $t01334713540 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
326- let quoteAssetReserveAfter1 = $t01334713540._1
327- let baseAssetReserveAfter1 = $t01334713540._2
328- let totalPositionSizeAfter1 = $t01334713540._3
329- let cumulativeNotionalAfter1 = $t01334713540._4
360+ let $t01400914202 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
361+ let quoteAssetReserveAfter1 = $t01400914202._1
362+ let baseAssetReserveAfter1 = $t01400914202._2
363+ let totalPositionSizeAfter1 = $t01400914202._3
364+ let cumulativeNotionalAfter1 = $t01400914202._4
330365 $Tuple7(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1, (totalLongPositionSize() - (if (_isAdd)
331366 then abs(_baseAssetAmount)
332367 else 0)), (totalShortPositionSize() - (if (!(_isAdd))
360395
361396
362397 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
363- let $t01517215300 = getPosition(_trader)
364- let positionSize = $t01517215300._1
365- let positionMargin = $t01517215300._2
366- let positionOpenNotional = $t01517215300._3
367- let positionLstUpdCPF = $t01517215300._4
398+ let $t01583415962 = getPosition(_trader)
399+ let positionSize = $t01583415962._1
400+ let positionMargin = $t01583415962._2
401+ let positionOpenNotional = $t01583415962._3
402+ let positionLstUpdCPF = $t01583415962._4
368403 let positionSizeAbs = abs(positionSize)
369404 if ((positionSizeAbs == 0))
370405 then throw("Invalid position size")
372407 let isShort = (0 > positionSize)
373408 let positionNotional = if ((_option == PNL_OPTION_SPOT))
374409 then {
375- let $t01554715654 = swapOutput(!(isShort), positionSizeAbs)
376- let outPositionNotional = $t01554715654._1
377- let x1 = $t01554715654._2
378- let x2 = $t01554715654._3
379- let x3 = $t01554715654._4
410+ let $t01620916316 = swapOutput(!(isShort), positionSizeAbs)
411+ let outPositionNotional = $t01620916316._1
412+ let x1 = $t01620916316._2
413+ let x2 = $t01620916316._3
414+ let x3 = $t01620916316._4
380415 outPositionNotional
381416 }
382417 else (positionSizeAbs * getOracleTwapPrice())
389424
390425
391426 func getMarginRatioByOption (_trader,_option) = {
392- let $t01614916260 = getPosition(_trader)
393- let positionSize = $t01614916260._1
394- let positionMargin = $t01614916260._2
395- let pon = $t01614916260._3
396- let positionLstUpdCPF = $t01614916260._4
397- let $t01626616359 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
398- let positionNotional = $t01626616359._1
399- let unrealizedPnl = $t01626616359._2
400- let $t01636416530 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
401- let remainMargin = $t01636416530._1
402- let badDebt = $t01636416530._2
427+ let $t01681116922 = getPosition(_trader)
428+ let positionSize = $t01681116922._1
429+ let positionMargin = $t01681116922._2
430+ let pon = $t01681116922._3
431+ let positionLstUpdCPF = $t01681116922._4
432+ let $t01692817021 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
433+ let positionNotional = $t01692817021._1
434+ let unrealizedPnl = $t01692817021._2
435+ let $t01702617192 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
436+ let remainMargin = $t01702617192._1
437+ let badDebt = $t01702617192._2
403438 divd((remainMargin - badDebt), positionNotional)
404439 }
405440
408443
409444
410445 func internalClosePosition (_trader) = {
411- let $t01683616947 = getPosition(_trader)
412- let positionSize = $t01683616947._1
413- let positionMargin = $t01683616947._2
414- let pon = $t01683616947._3
415- let positionLstUpdCPF = $t01683616947._4
416- let $t01695317040 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
417- let x1 = $t01695317040._1
418- let unrealizedPnl = $t01695317040._2
419- let $t01704517213 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
420- let remainMargin = $t01704517213._1
421- let badDebt = $t01704517213._2
446+ let $t01749817609 = getPosition(_trader)
447+ let positionSize = $t01749817609._1
448+ let positionMargin = $t01749817609._2
449+ let pon = $t01749817609._3
450+ let positionLstUpdCPF = $t01749817609._4
451+ let $t01761517702 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
452+ let x1 = $t01761517702._1
453+ let unrealizedPnl = $t01761517702._2
454+ let $t01770717875 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
455+ let remainMargin = $t01770717875._1
456+ let badDebt = $t01770717875._2
422457 let exchangedPositionSize = -(positionSize)
423458 let realizedPnl = unrealizedPnl
424459 let marginToVault = -(remainMargin)
425- let $t01734017621 = swapOutput((positionSize > 0), abs(positionSize))
426- let exchangedQuoteAssetAmount = $t01734017621._1
427- let quoteAssetReserveAfter = $t01734017621._2
428- let baseAssetReserveAfter = $t01734017621._3
429- let totalPositionSizeAfter = $t01734017621._4
430- let cumulativeNotionalAfter = $t01734017621._5
431- let totalLongAfter = $t01734017621._6
432- let totalShortAfter = $t01734017621._7
460+ let $t01800218283 = swapOutput((positionSize > 0), abs(positionSize))
461+ let exchangedQuoteAssetAmount = $t01800218283._1
462+ let quoteAssetReserveAfter = $t01800218283._2
463+ let baseAssetReserveAfter = $t01800218283._3
464+ let totalPositionSizeAfter = $t01800218283._4
465+ let cumulativeNotionalAfter = $t01800218283._5
466+ let totalLongAfter = $t01800218283._6
467+ let totalShortAfter = $t01800218283._7
433468 let openInterestNotionalAfter = (openInterestNotional() - pon)
434469 $Tuple12(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter)
435470 }
490525 let lastMinuteId = if ((previousMinuteId == 0))
491526 then minuteId
492527 else previousMinuteId
493- let listStr = valueOrElse(getString(this, k_lastDataStr), "")
494- let oldList = split(listStr, ",")
495- let list = if ((size(oldList) > TWAP_INTERVAL))
496- then (removeByIndex(oldList, 0) :+ toString(minuteId))
497- else (oldList :+ toString(minuteId))
498- let prevCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(previousMinuteId))), 0)
499- let prevPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(previousMinuteId))), price)
500- let lastCumulativePrice = (prevCumulativePrice + ((minuteId - lastMinuteId) * prevPrice))
501- func join (accumulator,val) = ((accumulator + val) + ",")
502-
503- let newListStr = {
504- let $l = list
505- let $s = size($l)
506- let $acc0 = ""
507- func $f0_1 ($a,$i) = if (($i >= $s))
508- then $a
509- else join($a, $l[$i])
510-
511- func $f0_2 ($a,$i) = if (($i >= $s))
512- then $a
513- else throw("List size exceeds 20")
514-
515- $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)
516- }
517- let newListStrU = dropRight(newListStr, 1)
518- let newListStrR = if ((take(newListStrU, 1) == ","))
519- then drop(newListStrU, 1)
520- else newListStrU
521-[IntegerEntry(((k_twapDataLastCumulativePrice + "_") + toString(minuteId)), lastCumulativePrice), IntegerEntry(((k_twapDataLastPrice + "_") + toString(minuteId)), price), IntegerEntry(k_lastMinuteId, minuteId), StringEntry(k_lastDataStr, newListStrR)]
528+ if ((minuteId > previousMinuteId))
529+ then {
530+ let prevCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(previousMinuteId))), 0)
531+ let prevPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(previousMinuteId))), price)
532+ let lastCumulativePrice = (prevCumulativePrice + ((minuteId - lastMinuteId) * prevPrice))
533+ let list = pushToQueue(strToList(valueOrElse(getString(this, k_lastDataStr), "")), TWAP_INTERVAL, toString(minuteId))
534+[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))]
535+ }
536+ else {
537+ let twapDataPreviousMinuteId = valueOrElse(getInteger(this, toCompositeKey(k_twapDataPreviousMinuteId, toString(minuteId))), 0)
538+ let prevCumulativePrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastCumulativePrice, toString(twapDataPreviousMinuteId))), 0)
539+ let prevPrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastPrice, toString(twapDataPreviousMinuteId))), price)
540+ let lastCumulativePrice = (prevCumulativePrice + ((minuteId - twapDataPreviousMinuteId) * prevPrice))
541+[IntegerEntry(toCompositeKey(k_twapDataLastCumulativePrice, toString(minuteId)), lastCumulativePrice), IntegerEntry(toCompositeKey(k_twapDataLastPrice, toString(minuteId)), price)]
542+ }
522543 }
523544 }
524545
609630 else paused())
610631 then throw("Invalid decreasePosition parameters")
611632 else {
612- let $t02672326875 = getPosition(toString(i.caller))
613- let oldPositionSize = $t02672326875._1
614- let oldPositionMargin = $t02672326875._2
615- let oldPositionOpenNotional = $t02672326875._3
616- let oldPositionLstUpdCPF = $t02672326875._4
633+ let $t02810728259 = getPosition(toString(i.caller))
634+ let oldPositionSize = $t02810728259._1
635+ let oldPositionMargin = $t02810728259._2
636+ let oldPositionOpenNotional = $t02810728259._3
637+ let oldPositionLstUpdCPF = $t02810728259._4
617638 let _direction = if ((oldPositionSize > 0))
618639 then DIR_SHORT
619640 else DIR_LONG
620641 let isAdd = (_direction == DIR_LONG)
621642 let openNotional = muld(_amount, _leverage)
622- let $t02704827164 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
623- let oldPositionNotional = $t02704827164._1
624- let unrealizedPnl = $t02704827164._2
625- let $t02717029804 = if ((oldPositionNotional > openNotional))
643+ let $t02843228548 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
644+ let oldPositionNotional = $t02843228548._1
645+ let unrealizedPnl = $t02843228548._2
646+ let $t02855431098 = if ((oldPositionNotional > openNotional))
626647 then {
627- let $t02754727766 = swapInput(isAdd, openNotional)
628- let exchangedPositionSize = $t02754727766._1
629- let quoteAssetReserveAfter = $t02754727766._2
630- let baseAssetReserveAfter = $t02754727766._3
631- let totalPositionSizeAfter = $t02754727766._4
632- let cumulativeNotionalAfter = $t02754727766._5
648+ let $t02893129150 = swapInput(isAdd, openNotional)
649+ let exchangedPositionSize = $t02893129150._1
650+ let quoteAssetReserveAfter = $t02893129150._2
651+ let baseAssetReserveAfter = $t02893129150._3
652+ let totalPositionSizeAfter = $t02893129150._4
653+ let cumulativeNotionalAfter = $t02893129150._5
633654 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
634655 if (if ((_minBaseAssetAmount != 0))
635656 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
636657 else false)
637658 then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
638659 else {
639- let realizedPnl = if ((oldPositionSize != 0))
640- then divd(muld(unrealizedPnl, exchangedPositionSizeAbs), oldPositionSize)
641- else 0
642- let $t02828828533 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
643- let remainMargin = $t02828828533._1
644- let badDebt = $t02828828533._2
645- let fundingPayment = $t02828828533._3
660+ let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), oldPositionSize)
661+ let $t02958229827 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
662+ let remainMargin = $t02958229827._1
663+ let badDebt = $t02958229827._2
664+ let fundingPayment = $t02958229827._3
646665 let exchangedQuoteAssetAmount = openNotional
647666 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
648667 let remainOpenNotional = if ((oldPositionSize > 0))
657676 }
658677 }
659678 else throw("Close position first")
660- let newPositionSize = $t02717029804._1
661- let newPositionRemainMargin = $t02717029804._2
662- let newPositionOpenNotional = $t02717029804._3
663- let newPositionLatestCPF = $t02717029804._4
664- let baseAssetReserveAfter = $t02717029804._5
665- let quoteAssetReserveAfter = $t02717029804._6
666- let totalPositionSizeAfter = $t02717029804._7
667- let cumulativeNotionalAfter = $t02717029804._8
668- let openInterestNotionalAfter = $t02717029804._9
669- let totalLongAfter = $t02717029804._10
670- let totalShortAfter = $t02717029804._11
679+ let newPositionSize = $t02855431098._1
680+ let newPositionRemainMargin = $t02855431098._2
681+ let newPositionOpenNotional = $t02855431098._3
682+ let newPositionLatestCPF = $t02855431098._4
683+ let baseAssetReserveAfter = $t02855431098._5
684+ let quoteAssetReserveAfter = $t02855431098._6
685+ let totalPositionSizeAfter = $t02855431098._7
686+ let cumulativeNotionalAfter = $t02855431098._8
687+ let openInterestNotionalAfter = $t02855431098._9
688+ let totalLongAfter = $t02855431098._10
689+ let totalShortAfter = $t02855431098._11
671690 (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter))
672691 }
673692
697716 else {
698717 let feeAmount = muld(_rawAmount, fee())
699718 let _amount = (_rawAmount - feeAmount)
700- let $t03084030992 = getPosition(toString(i.caller))
701- let oldPositionSize = $t03084030992._1
702- let oldPositionMargin = $t03084030992._2
703- let oldPositionOpenNotional = $t03084030992._3
704- let oldPositionLstUpdCPF = $t03084030992._4
719+ let $t03213432286 = getPosition(toString(i.caller))
720+ let oldPositionSize = $t03213432286._1
721+ let oldPositionMargin = $t03213432286._2
722+ let oldPositionOpenNotional = $t03213432286._3
723+ let oldPositionLstUpdCPF = $t03213432286._4
705724 let isNewPosition = (oldPositionSize == 0)
706725 let isSameDirection = if ((oldPositionSize > 0))
707726 then (_direction == DIR_LONG)
710729 then isSameDirection
711730 else false
712731 let isAdd = (_direction == DIR_LONG)
713- let $t03128133670 = if (if (isNewPosition)
732+ let $t03257534964 = if (if (isNewPosition)
714733 then true
715734 else expandExisting)
716735 then {
717736 let openNotional = muld(_amount, _leverage)
718- let $t03170531911 = swapInput(isAdd, openNotional)
719- let amountBaseAssetBought = $t03170531911._1
720- let quoteAssetReserveAfter = $t03170531911._2
721- let baseAssetReserveAfter = $t03170531911._3
722- let totalPositionSizeAfter = $t03170531911._4
723- let cumulativeNotionalAfter = $t03170531911._5
737+ let $t03299933205 = swapInput(isAdd, openNotional)
738+ let amountBaseAssetBought = $t03299933205._1
739+ let quoteAssetReserveAfter = $t03299933205._2
740+ let baseAssetReserveAfter = $t03299933205._3
741+ let totalPositionSizeAfter = $t03299933205._4
742+ let cumulativeNotionalAfter = $t03299933205._5
724743 if (if ((_minBaseAssetAmount != 0))
725744 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
726745 else false)
728747 else {
729748 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
730749 let increaseMarginRequirement = divd(openNotional, _leverage)
731- let $t03229232531 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
732- let remainMargin = $t03229232531._1
733- let x1 = $t03229232531._2
734- let x2 = $t03229232531._3
750+ let $t03358633825 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
751+ let remainMargin = $t03358633825._1
752+ let x1 = $t03358633825._2
753+ let x2 = $t03358633825._3
735754 $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
736755 then abs(amountBaseAssetBought)
737756 else 0)), (totalShortPositionSize() + (if ((0 > newPositionSize))
741760 }
742761 else {
743762 let openNotional = muld(_amount, _leverage)
744- let $t03336333479 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
745- let oldPositionNotional = $t03336333479._1
746- let unrealizedPnl = $t03336333479._2
763+ let $t03465734773 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
764+ let oldPositionNotional = $t03465734773._1
765+ let unrealizedPnl = $t03465734773._2
747766 if ((oldPositionNotional > openNotional))
748767 then throw("Use decreasePosition to decrease position size")
749768 else throw("Close position first")
750769 }
751- let newPositionSize = $t03128133670._1
752- let newPositionRemainMargin = $t03128133670._2
753- let newPositionOpenNotional = $t03128133670._3
754- let newPositionLatestCPF = $t03128133670._4
755- let baseAssetReserveAfter = $t03128133670._5
756- let quoteAssetReserveAfter = $t03128133670._6
757- let totalPositionSizeAfter = $t03128133670._7
758- let cumulativeNotionalAfter = $t03128133670._8
759- let openInterestNotionalAfter = $t03128133670._9
760- let totalLongAfter = $t03128133670._10
761- let totalShortAfter = $t03128133670._11
770+ let newPositionSize = $t03257534964._1
771+ let newPositionRemainMargin = $t03257534964._2
772+ let newPositionOpenNotional = $t03257534964._3
773+ let newPositionLatestCPF = $t03257534964._4
774+ let baseAssetReserveAfter = $t03257534964._5
775+ let quoteAssetReserveAfter = $t03257534964._6
776+ let totalPositionSizeAfter = $t03257534964._7
777+ let cumulativeNotionalAfter = $t03257534964._8
778+ let openInterestNotionalAfter = $t03257534964._9
779+ let totalLongAfter = $t03257534964._10
780+ let totalShortAfter = $t03257534964._11
762781 let feeToStakers = (feeAmount / 2)
763782 let feeToInsurance = (feeAmount - feeToStakers)
764783 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
789808 else {
790809 let feeAmount = muld(_rawAmount, fee())
791810 let _amount = (_rawAmount - feeAmount)
792- let $t03494635098 = getPosition(toString(i.caller))
793- let oldPositionSize = $t03494635098._1
794- let oldPositionMargin = $t03494635098._2
795- let oldPositionOpenNotional = $t03494635098._3
796- let oldPositionLstUpdCPF = $t03494635098._4
811+ let $t03624036392 = getPosition(toString(i.caller))
812+ let oldPositionSize = $t03624036392._1
813+ let oldPositionMargin = $t03624036392._2
814+ let oldPositionOpenNotional = $t03624036392._3
815+ let oldPositionLstUpdCPF = $t03624036392._4
797816 let feeToStakers = (feeAmount / 2)
798817 let feeToInsurance = (feeAmount - feeToStakers)
799818 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
820839 else paused())
821840 then throw("Invalid removeMargin parameters")
822841 else {
823- let $t03601836170 = getPosition(toString(i.caller))
824- let oldPositionSize = $t03601836170._1
825- let oldPositionMargin = $t03601836170._2
826- let oldPositionOpenNotional = $t03601836170._3
827- let oldPositionLstUpdCPF = $t03601836170._4
842+ let $t03731237464 = getPosition(toString(i.caller))
843+ let oldPositionSize = $t03731237464._1
844+ let oldPositionMargin = $t03731237464._2
845+ let oldPositionOpenNotional = $t03731237464._3
846+ let oldPositionLstUpdCPF = $t03731237464._4
828847 let marginDelta = -(_amount)
829- let $t03620736386 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
830- let remainMargin = $t03620736386._1
831- let badDebt = $t03620736386._2
848+ let $t03750137680 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
849+ let remainMargin = $t03750137680._1
850+ let badDebt = $t03750137680._2
832851 if ((badDebt != 0))
833852 then throw("Invalid added margin amount")
834853 else {
849868 else paused())
850869 then throw("Invalid closePosition parameters")
851870 else {
852- let $t03714637530 = internalClosePosition(toString(i.caller))
853- let x1 = $t03714637530._1
854- let positionBadDebt = $t03714637530._2
855- let realizedPnl = $t03714637530._3
856- let marginToVault = $t03714637530._4
857- let quoteAssetReserveAfter = $t03714637530._5
858- let baseAssetReserveAfter = $t03714637530._6
859- let totalPositionSizeAfter = $t03714637530._7
860- let cumulativeNotionalAfter = $t03714637530._8
861- let openInterestNotionalAfter = $t03714637530._9
862- let x2 = $t03714637530._10
863- let totalLongAfter = $t03714637530._11
864- let totalShortAfter = $t03714637530._12
871+ let $t03844038824 = internalClosePosition(toString(i.caller))
872+ let x1 = $t03844038824._1
873+ let positionBadDebt = $t03844038824._2
874+ let realizedPnl = $t03844038824._3
875+ let marginToVault = $t03844038824._4
876+ let quoteAssetReserveAfter = $t03844038824._5
877+ let baseAssetReserveAfter = $t03844038824._6
878+ let totalPositionSizeAfter = $t03844038824._7
879+ let cumulativeNotionalAfter = $t03844038824._8
880+ let openInterestNotionalAfter = $t03844038824._9
881+ let x2 = $t03844038824._10
882+ let totalLongAfter = $t03844038824._11
883+ let totalShortAfter = $t03844038824._12
865884 if ((positionBadDebt > 0))
866885 then throw("Unable to close position with bad debt")
867886 else {
868887 let withdrawAmount = abs(marginToVault)
869888 let ammBalance = (cbalance() - withdrawAmount)
870- let $t03773937881 = if ((0 > ammBalance))
889+ let $t03903339175 = if ((0 > ammBalance))
871890 then $Tuple2(0, abs(ammBalance))
872891 else $Tuple2(ammBalance, 0)
873- let ammNewBalance = $t03773937881._1
874- let getFromInsurance = $t03773937881._2
892+ let ammNewBalance = $t03903339175._1
893+ let getFromInsurance = $t03903339175._2
875894 let x = if ((getFromInsurance > 0))
876895 then {
877896 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil)
907926 else paused())
908927 then throw("Unable to liquidate")
909928 else {
910- let $t03932039747 = internalClosePosition(_trader)
911- let x1 = $t03932039747._1
912- let badDebt = $t03932039747._2
913- let x2 = $t03932039747._3
914- let marginToVault = $t03932039747._4
915- let quoteAssetReserveAfter = $t03932039747._5
916- let baseAssetReserveAfter = $t03932039747._6
917- let totalPositionSizeAfter = $t03932039747._7
918- let cumulativeNotionalAfter = $t03932039747._8
919- let openInterestNotionalAfter = $t03932039747._9
920- let exchangedQuoteAssetAmount = $t03932039747._10
921- let totalLongAfter = $t03932039747._11
922- let totalShortAfter = $t03932039747._12
929+ let $t04061441041 = internalClosePosition(_trader)
930+ let x1 = $t04061441041._1
931+ let badDebt = $t04061441041._2
932+ let x2 = $t04061441041._3
933+ let marginToVault = $t04061441041._4
934+ let quoteAssetReserveAfter = $t04061441041._5
935+ let baseAssetReserveAfter = $t04061441041._6
936+ let totalPositionSizeAfter = $t04061441041._7
937+ let cumulativeNotionalAfter = $t04061441041._8
938+ let openInterestNotionalAfter = $t04061441041._9
939+ let exchangedQuoteAssetAmount = $t04061441041._10
940+ let totalLongAfter = $t04061441041._11
941+ let totalShortAfter = $t04061441041._12
923942 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
924943 let feeToLiquidator = (liquidationPenalty / 2)
925944 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
926- let ammBadDebt = (cbalance() - liquidationPenalty)
927- let $t04014540280 = if ((0 > ammBadDebt))
928- then $Tuple2(0, abs(ammBadDebt))
929- else $Tuple2(ammBadDebt, 0)
930- let newAmmBalance = $t04014540280._1
931- let takeFromInsurance = $t04014540280._2
945+ let ammBalance = (cbalance() - liquidationPenalty)
946+ let $t04143941574 = if ((0 > ammBalance))
947+ then $Tuple2(0, abs(ammBalance))
948+ else $Tuple2(ammBalance, 0)
949+ let newAmmBalance = $t04143941574._1
950+ let takeFromInsurance = $t04143941574._2
932951 let x = if ((takeFromInsurance > 0))
933952 then {
934953 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
939958 else nil
940959 if ((x == x))
941960 then {
942- let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
943- if ((depositInsurance == depositInsurance))
961+ let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(liquidationPenalty - takeFromInsurance), toBase58String(quoteAsset())], nil)
962+ if ((unstake == unstake))
944963 then {
945- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(feeToLiquidator - takeFromInsurance), toBase58String(quoteAsset())], nil)
946- if ((unstake == unstake))
947- then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(ammBadDebt))
964+ let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
965+ if ((depositInsurance == depositInsurance))
966+ then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance))
948967 else throw("Strict value is not equal to itself.")
949968 }
950969 else throw("Strict value is not equal to itself.")
968987 let underlyingPrice = getOracleTwapPrice()
969988 let spotTwapPrice = getTwapSpotPrice()
970989 let premium = (spotTwapPrice - underlyingPrice)
971- let $t04165042985 = if (if ((totalShortPositionSize() == 0))
990+ let $t04295044285 = if (if ((totalShortPositionSize() == 0))
972991 then true
973992 else (totalLongPositionSize() == 0))
974993 then $Tuple2(0, 0)
9831002 let shortPremiumFraction = divd(muld(longPremiumFraction, totalLongPositionSize()), totalShortPositionSize())
9841003 $Tuple2(shortPremiumFraction, longPremiumFraction)
9851004 }
986- let shortPremiumFraction = $t04165042985._1
987- let longPremiumFraction = $t04165042985._2
1005+ let shortPremiumFraction = $t04295044285._1
1006+ let longPremiumFraction = $t04295044285._2
9881007 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
9891008 }
9901009 }
9931012
9941013 @Callable(i)
9951014 func v_get (_trader) = {
996- let $t04336043413 = internalClosePosition(_trader)
997- let x1 = $t04336043413._1
998- let x2 = $t04336043413._2
999- let x3 = $t04336043413._3
1000- let x4 = $t04336043413._4
1015+ let $t04466044713 = internalClosePosition(_trader)
1016+ let x1 = $t04466044713._1
1017+ let x2 = $t04466044713._2
1018+ let x3 = $t04466044713._3
1019+ let x4 = $t04466044713._4
10011020 throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader))))
10021021 }
10031022
10051024
10061025 @Callable(i)
10071026 func view_calcRemainMarginWithFundingPayment (_trader) = {
1008- let $t04356043671 = getPosition(_trader)
1009- let positionSize = $t04356043671._1
1010- let positionMargin = $t04356043671._2
1011- let pon = $t04356043671._3
1012- let positionLstUpdCPF = $t04356043671._4
1013- let $t04367643777 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1014- let positionNotional = $t04367643777._1
1015- let unrealizedPnl = $t04367643777._2
1016- let $t04378243964 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1017- let remainMargin = $t04378243964._1
1018- let badDebt = $t04378243964._2
1019- let fundingPayment = $t04378243964._3
1027+ let $t04486044971 = getPosition(_trader)
1028+ let positionSize = $t04486044971._1
1029+ let positionMargin = $t04486044971._2
1030+ let pon = $t04486044971._3
1031+ let positionLstUpdCPF = $t04486044971._4
1032+ let $t04497645077 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1033+ let positionNotional = $t04497645077._1
1034+ let unrealizedPnl = $t04497645077._2
1035+ let $t04508245264 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1036+ let remainMargin = $t04508245264._1
1037+ let badDebt = $t04508245264._2
1038+ let fundingPayment = $t04508245264._3
10201039 throw(((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))))
10211040 }
10221041
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let k_ora_key = "k_ora_key"
55
66 let k_ora_block_key = "k_ora_block_key"
77
88 let k_ora = "k_ora"
99
1010 let k_balance = "k_balance"
1111
1212 let k_positionSize = "k_positionSize"
1313
1414 let k_positionMargin = "k_positionMargin"
1515
1616 let k_positionOpenNotional = "k_positionOpenNotional"
1717
1818 let k_positionLastUpdatedCumulativePremiumFraction = "k_positionFraction"
1919
2020 let k_initialized = "k_initialized"
2121
2222 let k_paused = "k_paused"
2323
2424 let k_fee = "k_fee"
2525
2626 let k_fundingPeriod = "k_fundingPeriod"
2727
2828 let k_initMarginRatio = "k_initMarginRatio"
2929
3030 let k_maintenanceMarginRatio = "k_mmr"
3131
3232 let k_liquidationFeeRatio = "k_liquidationFeeRatio"
3333
3434 let k_spreadLimit = "k_spreadLimit"
3535
3636 let k_maxPriceImpact = "k_maxPriceImpact"
3737
3838 let k_lastDataStr = "k_lastDataStr"
3939
4040 let k_lastMinuteId = "k_lastMinuteId"
4141
4242 let k_twapDataLastCumulativePrice = "k_twapDataLastCumulativePrice"
4343
4444 let k_twapDataLastPrice = "k_twapDataLastPrice"
45+
46+let k_twapDataPreviousMinuteId = "k_twapDataPreviousMinuteId"
4547
4648 let k_latestLongCumulativePremiumFraction = "k_latestLongPremiumFraction"
4749
4850 let k_latestShortCumulativePremiumFraction = "k_latestShortPremiumFraction"
4951
5052 let k_nextFundingBlock = "k_nextFundingBlockMinTimestamp"
5153
5254 let k_longFundingRate = "k_longFundingRate"
5355
5456 let k_shortFundingRate = "k_shortFundingRate"
5557
5658 let k_quoteAssetReserve = "k_qtAstR"
5759
5860 let k_baseAssetReserve = "k_bsAstR"
5961
6062 let k_totalPositionSize = "k_totalPositionSize"
6163
6264 let k_totalLongPositionSize = "k_totalLongPositionSize"
6365
6466 let k_totalShortPositionSize = "k_totalShortPositionSize"
6567
6668 let k_cumulativeNotional = "k_cumulativeNotional"
6769
6870 let k_openInterestNotional = "k_openInterestNotional"
6971
7072 let k_coordinatorAddress = "k_coordinatorAddress"
7173
7274 let k_insurance_address = "k_insurance_address"
7375
7476 let k_admin_address = "k_admin_address"
7577
7678 let k_admin_public_key = "k_admin_public_key"
7779
7880 let k_quote_asset = "k_quote_asset"
7981
8082 let k_quote_staking = "k_quote_staking"
8183
8284 let k_staking_address = "k_staking_address"
8385
8486 func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set")
8587
8688
8789 func adminAddress () = addressFromString(getStringValue(coordinator(), k_admin_address))
8890
8991
9092 func adminPublicKey () = fromBase58String(getStringValue(coordinator(), k_admin_public_key))
9193
9294
9395 func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset))
9496
9597
9698 func quoteAssetStaking () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_quote_staking)), "Quote asset staking not set")
9799
98100
99101 func stakingAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_staking_address)), "Insurance not set")
100102
101103
102104 func insuranceAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_insurance_address)), "Insurance not set")
103105
104106
105107 let DIR_LONG = 1
106108
107109 let DIR_SHORT = 2
108110
109111 let FUNDING_BLOCK_INTERVAL = 60
110112
111113 let TWAP_INTERVAL = 15
112114
113115 let ORACLE_INTERVAL = 15
114116
115117 let SECONDS = 1000
116118
117119 let DECIMAL_UNIT = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
118120
119121 let HUNDRED_PERCENT = (100 * DECIMAL_UNIT)
120122
121123 let ONE_DAY = (86400 * DECIMAL_UNIT)
122124
123125 let ALL_FEES = 100
124126
125127 let PNL_OPTION_SPOT = 1
126128
127129 let PNL_OPTION_ORACLE = 2
128130
129131 func s (_x) = (toString(_x) + ",")
130132
131133
132134 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
133135
134136
135137 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
136138
137139
138140 func abs (_x) = if ((_x > 0))
139141 then _x
140142 else -(_x)
141143
142144
143145 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
146+
147+
148+func listToStr (_list) = {
149+ func _join (accumulator,val) = ((accumulator + val) + ",")
150+
151+ let newListStr = {
152+ let $l = _list
153+ let $s = size($l)
154+ let $acc0 = ""
155+ func $f0_1 ($a,$i) = if (($i >= $s))
156+ then $a
157+ else _join($a, $l[$i])
158+
159+ func $f0_2 ($a,$i) = if (($i >= $s))
160+ then $a
161+ else throw("List size exceeds 20")
162+
163+ $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)
164+ }
165+ let newListStrU = dropRight(newListStr, 1)
166+ let newListStrR = if ((take(newListStrU, 1) == ","))
167+ then drop(newListStrU, 1)
168+ else newListStrU
169+ newListStrR
170+ }
171+
172+
173+func strToList (_str) = split(_str, ",")
174+
175+
176+func pushToQueue (_list,_maxSize,_value) = if ((size(_list) > _maxSize))
177+ then (removeByIndex(_list, 0) :+ _value)
178+ else (_list :+ _value)
144179
145180
146181 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
147182
148183
149184 func cbalance () = int(k_balance)
150185
151186
152187 func fee () = int(k_fee)
153188
154189
155190 func initMarginRatio () = int(k_initMarginRatio)
156191
157192
158193 func qtAstR () = int(k_quoteAssetReserve)
159194
160195
161196 func bsAstR () = int(k_baseAssetReserve)
162197
163198
164199 func totalPositionSize () = int(k_totalPositionSize)
165200
166201
167202 func cumulativeNotional () = int(k_cumulativeNotional)
168203
169204
170205 func openInterestNotional () = int(k_openInterestNotional)
171206
172207
173208 func nextFundingBlockTimestamp () = int(k_nextFundingBlock)
174209
175210
176211 func fundingPeriodRaw () = int(k_fundingPeriod)
177212
178213
179214 func fundingPeriodDecimal () = (fundingPeriodRaw() * DECIMAL_UNIT)
180215
181216
182217 func fundingPeriodSeconds () = (fundingPeriodRaw() * SECONDS)
183218
184219
185220 func maintenanceMarginRatio () = int(k_maintenanceMarginRatio)
186221
187222
188223 func liquidationFeeRatio () = int(k_liquidationFeeRatio)
189224
190225
191226 func spreadLimit () = int(k_spreadLimit)
192227
193228
194229 func maxPriceImpact () = int(k_maxPriceImpact)
195230
196231
197232 func latestLongCumulativePremiumFraction () = int(k_latestLongCumulativePremiumFraction)
198233
199234
200235 func latestShortCumulativePremiumFraction () = int(k_latestShortCumulativePremiumFraction)
201236
202237
203238 func totalShortPositionSize () = int(k_totalShortPositionSize)
204239
205240
206241 func totalLongPositionSize () = int(k_totalLongPositionSize)
207242
208243
209244 func requireMoreMarginRatio (_marginRatio,_baseMarginRatio,_largerThanOrEqualTo) = {
210245 let remainingMarginRatio = (_marginRatio - _baseMarginRatio)
211246 if (if (_largerThanOrEqualTo)
212247 then (0 > remainingMarginRatio)
213248 else false)
214249 then throw("Invalid margin")
215250 else if (if (!(_largerThanOrEqualTo))
216251 then (remainingMarginRatio >= 0)
217252 else false)
218253 then throw("Invalid margin")
219254 else true
220255 }
221256
222257
223258 func latestCumulativePremiumFraction (_positionSize) = if ((_positionSize == 0))
224259 then throw("Should not be called with _positionSize == 0")
225260 else if ((_positionSize > 0))
226261 then latestLongCumulativePremiumFraction()
227262 else latestShortCumulativePremiumFraction()
228263
229264
230265 func getPosition (_trader) = {
231266 let positionSizeOpt = getInteger(this, toCompositeKey(k_positionSize, _trader))
232267 match positionSizeOpt {
233268 case positionSize: Int =>
234269 $Tuple4(positionSize, getIntegerValue(this, toCompositeKey(k_positionMargin, _trader)), getIntegerValue(this, toCompositeKey(k_positionOpenNotional, _trader)), getIntegerValue(this, toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _trader)))
235270 case _ =>
236271 $Tuple4(0, 0, 0, 0)
237272 }
238273 }
239274
240275
241276 func requireOpenPosition (_trader) = if ((getPosition(_trader)._1 == 0))
242277 then throw("No open position")
243278 else true
244279
245280
246281 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
247282
248283
249284 func paused () = valueOrElse(getBoolean(this, k_paused), false)
250285
251286
252287 func updateReserve (_isAdd,_quoteAssetAmount,_baseAssetAmount) = if (_isAdd)
253288 then {
254289 let newBase = (bsAstR() - _baseAssetAmount)
255290 if ((0 >= newBase))
256291 then throw("Tx lead to base asset reserve <= 0, revert")
257292 else $Tuple4((qtAstR() + _quoteAssetAmount), newBase, (totalPositionSize() + _baseAssetAmount), (cumulativeNotional() + _quoteAssetAmount))
258293 }
259294 else {
260295 let newQuote = (qtAstR() - _quoteAssetAmount)
261296 if ((0 >= newQuote))
262297 then throw("Tx lead to base quote reserve <= 0, revert")
263298 else $Tuple4(newQuote, (bsAstR() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount), (cumulativeNotional() - _quoteAssetAmount))
264299 }
265300
266301
267302 func swapInput (_isAdd,_quoteAssetAmount) = {
268303 let _qtAstR = qtAstR()
269304 let _bsAstR = bsAstR()
270305 let priceBefore = divd(_qtAstR, _bsAstR)
271306 let amountBaseAssetBoughtWithoutPriceImpact = muld(_quoteAssetAmount, priceBefore)
272307 let k = muld(_qtAstR, _bsAstR)
273308 let quoteAssetReserveAfter = if (_isAdd)
274309 then (_qtAstR + _quoteAssetAmount)
275310 else (_qtAstR - _quoteAssetAmount)
276311 let baseAssetReserveAfter = divd(k, quoteAssetReserveAfter)
277312 let amountBaseAssetBoughtAbs = abs((baseAssetReserveAfter - _bsAstR))
278313 let amountBaseAssetBought = if (_isAdd)
279314 then amountBaseAssetBoughtAbs
280315 else -(amountBaseAssetBoughtAbs)
281316 let priceImpact = ((amountBaseAssetBoughtWithoutPriceImpact - amountBaseAssetBoughtAbs) / amountBaseAssetBoughtWithoutPriceImpact)
282317 let maxPriceImpactValue = maxPriceImpact()
283318 if ((priceImpact > maxPriceImpactValue))
284319 then throw(((("Price impact " + toString(priceImpact)) + " > max price impact ") + toString(maxPriceImpactValue)))
285320 else {
286- let $t01143211635 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
287- let quoteAssetReserveAfter1 = $t01143211635._1
288- let baseAssetReserveAfter1 = $t01143211635._2
289- let totalPositionSizeAfter1 = $t01143211635._3
290- let cumulativeNotionalAfter1 = $t01143211635._4
321+ let $t01209412297 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs)
322+ let quoteAssetReserveAfter1 = $t01209412297._1
323+ let baseAssetReserveAfter1 = $t01209412297._2
324+ let totalPositionSizeAfter1 = $t01209412297._3
325+ let cumulativeNotionalAfter1 = $t01209412297._4
291326 $Tuple5(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
292327 }
293328 }
294329
295330
296331 func calcRemainMarginWithFundingPayment (_oldPositionSize,_oldPositionMargin,_oldPositionCumulativePremiumFraction,_marginDelta) = {
297332 let fundingPayment = if ((_oldPositionSize != 0))
298333 then {
299334 let _latestCumulativePremiumFraction = latestCumulativePremiumFraction(_oldPositionSize)
300335 muld((_latestCumulativePremiumFraction - _oldPositionCumulativePremiumFraction), _oldPositionSize)
301336 }
302337 else 0
303338 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
304- let $t01238212509 = if ((0 > signedMargin))
339+ let $t01304413171 = if ((0 > signedMargin))
305340 then $Tuple2(0, abs(signedMargin))
306341 else $Tuple2(abs(signedMargin), 0)
307- let remainMargin = $t01238212509._1
308- let badDebt = $t01238212509._2
342+ let remainMargin = $t01304413171._1
343+ let badDebt = $t01304413171._2
309344 $Tuple3(remainMargin, badDebt, fundingPayment)
310345 }
311346
312347
313348 func swapOutput (_isAdd,_baseAssetAmount) = {
314349 let _quoteAssetReserve = qtAstR()
315350 let _baseAssetReserve = bsAstR()
316351 if ((_baseAssetAmount == 0))
317352 then throw("Invalid base asset amount")
318353 else {
319354 let k = muld(_quoteAssetReserve, _baseAssetReserve)
320355 let baseAssetPoolAmountAfter = if (_isAdd)
321356 then (_baseAssetReserve + _baseAssetAmount)
322357 else (_baseAssetReserve - _baseAssetAmount)
323358 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
324359 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetReserve))
325- let $t01334713540 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
326- let quoteAssetReserveAfter1 = $t01334713540._1
327- let baseAssetReserveAfter1 = $t01334713540._2
328- let totalPositionSizeAfter1 = $t01334713540._3
329- let cumulativeNotionalAfter1 = $t01334713540._4
360+ let $t01400914202 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount)
361+ let quoteAssetReserveAfter1 = $t01400914202._1
362+ let baseAssetReserveAfter1 = $t01400914202._2
363+ let totalPositionSizeAfter1 = $t01400914202._3
364+ let cumulativeNotionalAfter1 = $t01400914202._4
330365 $Tuple7(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1, (totalLongPositionSize() - (if (_isAdd)
331366 then abs(_baseAssetAmount)
332367 else 0)), (totalShortPositionSize() - (if (!(_isAdd))
333368 then abs(_baseAssetAmount)
334369 else 0)))
335370 }
336371 }
337372
338373
339374 func getOracleTwapPrice () = {
340375 let oracle = valueOrErrorMessage(addressFromString(getStringValue(this, k_ora)), "")
341376 let priceKey = getStringValue(this, k_ora_key)
342377 let blockKey = getStringValue(this, k_ora_block_key)
343378 let lastValue = getIntegerValue(oracle, priceKey)
344379 lastValue
345380 }
346381
347382
348383 func getSpotPrice () = {
349384 let _quoteAssetReserve = qtAstR()
350385 let _baseAssetReserve = bsAstR()
351386 divd(_quoteAssetReserve, _baseAssetReserve)
352387 }
353388
354389
355390 func isOverFluctuationLimit () = {
356391 let oraclePrice = getOracleTwapPrice()
357392 let currentPrice = getSpotPrice()
358393 (divd(abs((oraclePrice - currentPrice)), oraclePrice) > spreadLimit())
359394 }
360395
361396
362397 func getPositionNotionalAndUnrealizedPnl (_trader,_option) = {
363- let $t01517215300 = getPosition(_trader)
364- let positionSize = $t01517215300._1
365- let positionMargin = $t01517215300._2
366- let positionOpenNotional = $t01517215300._3
367- let positionLstUpdCPF = $t01517215300._4
398+ let $t01583415962 = getPosition(_trader)
399+ let positionSize = $t01583415962._1
400+ let positionMargin = $t01583415962._2
401+ let positionOpenNotional = $t01583415962._3
402+ let positionLstUpdCPF = $t01583415962._4
368403 let positionSizeAbs = abs(positionSize)
369404 if ((positionSizeAbs == 0))
370405 then throw("Invalid position size")
371406 else {
372407 let isShort = (0 > positionSize)
373408 let positionNotional = if ((_option == PNL_OPTION_SPOT))
374409 then {
375- let $t01554715654 = swapOutput(!(isShort), positionSizeAbs)
376- let outPositionNotional = $t01554715654._1
377- let x1 = $t01554715654._2
378- let x2 = $t01554715654._3
379- let x3 = $t01554715654._4
410+ let $t01620916316 = swapOutput(!(isShort), positionSizeAbs)
411+ let outPositionNotional = $t01620916316._1
412+ let x1 = $t01620916316._2
413+ let x2 = $t01620916316._3
414+ let x3 = $t01620916316._4
380415 outPositionNotional
381416 }
382417 else (positionSizeAbs * getOracleTwapPrice())
383418 let unrealizedPnl = if (isShort)
384419 then (positionOpenNotional - positionNotional)
385420 else (positionNotional - positionOpenNotional)
386421 $Tuple2(positionNotional, unrealizedPnl)
387422 }
388423 }
389424
390425
391426 func getMarginRatioByOption (_trader,_option) = {
392- let $t01614916260 = getPosition(_trader)
393- let positionSize = $t01614916260._1
394- let positionMargin = $t01614916260._2
395- let pon = $t01614916260._3
396- let positionLstUpdCPF = $t01614916260._4
397- let $t01626616359 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
398- let positionNotional = $t01626616359._1
399- let unrealizedPnl = $t01626616359._2
400- let $t01636416530 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
401- let remainMargin = $t01636416530._1
402- let badDebt = $t01636416530._2
427+ let $t01681116922 = getPosition(_trader)
428+ let positionSize = $t01681116922._1
429+ let positionMargin = $t01681116922._2
430+ let pon = $t01681116922._3
431+ let positionLstUpdCPF = $t01681116922._4
432+ let $t01692817021 = getPositionNotionalAndUnrealizedPnl(_trader, _option)
433+ let positionNotional = $t01692817021._1
434+ let unrealizedPnl = $t01692817021._2
435+ let $t01702617192 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
436+ let remainMargin = $t01702617192._1
437+ let badDebt = $t01702617192._2
403438 divd((remainMargin - badDebt), positionNotional)
404439 }
405440
406441
407442 func getMarginRatio (_trader) = getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
408443
409444
410445 func internalClosePosition (_trader) = {
411- let $t01683616947 = getPosition(_trader)
412- let positionSize = $t01683616947._1
413- let positionMargin = $t01683616947._2
414- let pon = $t01683616947._3
415- let positionLstUpdCPF = $t01683616947._4
416- let $t01695317040 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
417- let x1 = $t01695317040._1
418- let unrealizedPnl = $t01695317040._2
419- let $t01704517213 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
420- let remainMargin = $t01704517213._1
421- let badDebt = $t01704517213._2
446+ let $t01749817609 = getPosition(_trader)
447+ let positionSize = $t01749817609._1
448+ let positionMargin = $t01749817609._2
449+ let pon = $t01749817609._3
450+ let positionLstUpdCPF = $t01749817609._4
451+ let $t01761517702 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
452+ let x1 = $t01761517702._1
453+ let unrealizedPnl = $t01761517702._2
454+ let $t01770717875 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
455+ let remainMargin = $t01770717875._1
456+ let badDebt = $t01770717875._2
422457 let exchangedPositionSize = -(positionSize)
423458 let realizedPnl = unrealizedPnl
424459 let marginToVault = -(remainMargin)
425- let $t01734017621 = swapOutput((positionSize > 0), abs(positionSize))
426- let exchangedQuoteAssetAmount = $t01734017621._1
427- let quoteAssetReserveAfter = $t01734017621._2
428- let baseAssetReserveAfter = $t01734017621._3
429- let totalPositionSizeAfter = $t01734017621._4
430- let cumulativeNotionalAfter = $t01734017621._5
431- let totalLongAfter = $t01734017621._6
432- let totalShortAfter = $t01734017621._7
460+ let $t01800218283 = swapOutput((positionSize > 0), abs(positionSize))
461+ let exchangedQuoteAssetAmount = $t01800218283._1
462+ let quoteAssetReserveAfter = $t01800218283._2
463+ let baseAssetReserveAfter = $t01800218283._3
464+ let totalPositionSizeAfter = $t01800218283._4
465+ let cumulativeNotionalAfter = $t01800218283._5
466+ let totalLongAfter = $t01800218283._6
467+ let totalShortAfter = $t01800218283._7
433468 let openInterestNotionalAfter = (openInterestNotional() - pon)
434469 $Tuple12(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter)
435470 }
436471
437472
438473 func getTwapSpotPrice () = {
439474 let minuteId = ((lastBlock.timestamp / 1000) / 60)
440475 let startMinuteId = (minuteId - TWAP_INTERVAL)
441476 let listStr = valueOrElse(getString(this, k_lastDataStr), "")
442477 let list = split(listStr, ",")
443478 func filterFn (accumulator,next) = if ((startMinuteId >= parseIntValue(next)))
444479 then (accumulator :+ parseIntValue(next))
445480 else accumulator
446481
447482 let listF = {
448483 let $l = list
449484 let $s = size($l)
450485 let $acc0 = nil
451486 func $f0_1 ($a,$i) = if (($i >= $s))
452487 then $a
453488 else filterFn($a, $l[$i])
454489
455490 func $f0_2 ($a,$i) = if (($i >= $s))
456491 then $a
457492 else throw("List size exceeds 20")
458493
459494 $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)
460495 }
461496 let maxIndex = if ((size(listF) > 0))
462497 then max(listF)
463498 else parseIntValue(list[0])
464499 let lastMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
465500 let endLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(lastMinuteId))), 0)
466501 let endLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(lastMinuteId))), 0)
467502 let nowCumulativePrice = (endLastCumulativePrice + ((minuteId - lastMinuteId) * endLastPrice))
468503 let startLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(maxIndex))), 0)
469504 let startLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(maxIndex))), 0)
470505 let startCumulativePrice = (startLastCumulativePrice + ((startMinuteId - maxIndex) * startLastPrice))
471506 ((nowCumulativePrice - startCumulativePrice) / TWAP_INTERVAL)
472507 }
473508
474509
475510 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)]
476511
477512
478513 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)]
479514
480515
481516 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)]
482517
483518
484519 func appendTwap (price) = {
485520 let minuteId = ((lastBlock.timestamp / 1000) / 60)
486521 let previousMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0)
487522 if ((previousMinuteId > minuteId))
488523 then throw("TWAP out-of-order")
489524 else {
490525 let lastMinuteId = if ((previousMinuteId == 0))
491526 then minuteId
492527 else previousMinuteId
493- let listStr = valueOrElse(getString(this, k_lastDataStr), "")
494- let oldList = split(listStr, ",")
495- let list = if ((size(oldList) > TWAP_INTERVAL))
496- then (removeByIndex(oldList, 0) :+ toString(minuteId))
497- else (oldList :+ toString(minuteId))
498- let prevCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(previousMinuteId))), 0)
499- let prevPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(previousMinuteId))), price)
500- let lastCumulativePrice = (prevCumulativePrice + ((minuteId - lastMinuteId) * prevPrice))
501- func join (accumulator,val) = ((accumulator + val) + ",")
502-
503- let newListStr = {
504- let $l = list
505- let $s = size($l)
506- let $acc0 = ""
507- func $f0_1 ($a,$i) = if (($i >= $s))
508- then $a
509- else join($a, $l[$i])
510-
511- func $f0_2 ($a,$i) = if (($i >= $s))
512- then $a
513- else throw("List size exceeds 20")
514-
515- $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)
516- }
517- let newListStrU = dropRight(newListStr, 1)
518- let newListStrR = if ((take(newListStrU, 1) == ","))
519- then drop(newListStrU, 1)
520- else newListStrU
521-[IntegerEntry(((k_twapDataLastCumulativePrice + "_") + toString(minuteId)), lastCumulativePrice), IntegerEntry(((k_twapDataLastPrice + "_") + toString(minuteId)), price), IntegerEntry(k_lastMinuteId, minuteId), StringEntry(k_lastDataStr, newListStrR)]
528+ if ((minuteId > previousMinuteId))
529+ then {
530+ let prevCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(previousMinuteId))), 0)
531+ let prevPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(previousMinuteId))), price)
532+ let lastCumulativePrice = (prevCumulativePrice + ((minuteId - lastMinuteId) * prevPrice))
533+ let list = pushToQueue(strToList(valueOrElse(getString(this, k_lastDataStr), "")), TWAP_INTERVAL, toString(minuteId))
534+[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))]
535+ }
536+ else {
537+ let twapDataPreviousMinuteId = valueOrElse(getInteger(this, toCompositeKey(k_twapDataPreviousMinuteId, toString(minuteId))), 0)
538+ let prevCumulativePrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastCumulativePrice, toString(twapDataPreviousMinuteId))), 0)
539+ let prevPrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastPrice, toString(twapDataPreviousMinuteId))), price)
540+ let lastCumulativePrice = (prevCumulativePrice + ((minuteId - twapDataPreviousMinuteId) * prevPrice))
541+[IntegerEntry(toCompositeKey(k_twapDataLastCumulativePrice, toString(minuteId)), lastCumulativePrice), IntegerEntry(toCompositeKey(k_twapDataLastPrice, toString(minuteId)), price)]
542+ }
522543 }
523544 }
524545
525546
526547 func updateAmm (_qtAstR,_bsAstR,_totalPositionSizeAfter,_cumulativeNotionalAfter,_openInterestNotional,_totalLongPositionSize,_totalShortPositionSize) = if (((_totalLongPositionSize - _totalShortPositionSize) != _totalPositionSizeAfter))
527548 then throw(((((("Invalid AMM state data: " + toString(_totalLongPositionSize)) + " + ") + toString(_totalShortPositionSize)) + " != ") + toString(_totalPositionSizeAfter)))
528549 else ([IntegerEntry(k_quoteAssetReserve, _qtAstR), IntegerEntry(k_baseAssetReserve, _bsAstR), IntegerEntry(k_totalPositionSize, _totalPositionSizeAfter), IntegerEntry(k_cumulativeNotional, _cumulativeNotionalAfter), IntegerEntry(k_openInterestNotional, _openInterestNotional), IntegerEntry(k_totalLongPositionSize, _totalLongPositionSize), IntegerEntry(k_totalShortPositionSize, _totalShortPositionSize)] ++ appendTwap(divd(_qtAstR, _bsAstR)))
529550
530551
531552 func deletePosition (_address) = [DeleteEntry(toCompositeKey(k_positionSize, _address)), DeleteEntry(toCompositeKey(k_positionMargin, _address)), DeleteEntry(toCompositeKey(k_positionOpenNotional, _address)), DeleteEntry(toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _address))]
532553
533554
534555 func withdraw (_address,_amount) = {
535556 let balance = assetBalance(this, quoteAsset())
536557 if ((_amount > balance))
537558 then throw(((("Unable to withdraw " + toString(_amount)) + " from contract balance ") + toString(balance)))
538559 else [ScriptTransfer(_address, _amount, quoteAsset())]
539560 }
540561
541562
542563 func updateBalance (i) = if ((0 > i))
543564 then throw("Balance")
544565 else [IntegerEntry(k_balance, i)]
545566
546567
547568 func transferFee (i) = [ScriptTransfer(stakingAddress(), i, quoteAsset())]
548569
549570
550571 @Callable(i)
551572 func pause () = if ((i.caller != adminAddress()))
552573 then throw("Invalid togglePause params")
553574 else [BooleanEntry(k_paused, true)]
554575
555576
556577
557578 @Callable(i)
558579 func unpause () = if ((i.caller != adminAddress()))
559580 then throw("Invalid togglePause params")
560581 else [BooleanEntry(k_paused, false)]
561582
562583
563584
564585 @Callable(i)
565586 func changeSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact) = if ((i.caller != adminAddress()))
566587 then throw("Invalid changeSettings params")
567588 else updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact)
568589
569590
570591
571592 @Callable(i)
572593 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))
573594 then true
574595 else (0 >= _bsAstR))
575596 then true
576597 else (0 >= _fundingPeriod))
577598 then true
578599 else (0 >= _initMarginRatio))
579600 then true
580601 else (0 >= _mmr))
581602 then true
582603 else (0 >= _liquidationFeeRatio))
583604 then true
584605 else (0 >= _fee))
585606 then true
586607 else (0 >= _spreadLimit))
587608 then true
588609 else (0 >= _maxPriceImpact))
589610 then true
590611 else initialized())
591612 then throw("Invalid initialize parameters")
592613 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)])
593614
594615
595616
596617 @Callable(i)
597618 func decreasePosition (_amount,_leverage,_minBaseAssetAmount) = if (if (if (if (if (if ((0 >= _amount))
598619 then true
599620 else if (((1 * DECIMAL_UNIT) > _leverage))
600621 then true
601622 else (_leverage > (3 * DECIMAL_UNIT)))
602623 then true
603624 else !(initialized()))
604625 then true
605626 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
606627 then true
607628 else !(requireOpenPosition(toString(i.caller))))
608629 then true
609630 else paused())
610631 then throw("Invalid decreasePosition parameters")
611632 else {
612- let $t02672326875 = getPosition(toString(i.caller))
613- let oldPositionSize = $t02672326875._1
614- let oldPositionMargin = $t02672326875._2
615- let oldPositionOpenNotional = $t02672326875._3
616- let oldPositionLstUpdCPF = $t02672326875._4
633+ let $t02810728259 = getPosition(toString(i.caller))
634+ let oldPositionSize = $t02810728259._1
635+ let oldPositionMargin = $t02810728259._2
636+ let oldPositionOpenNotional = $t02810728259._3
637+ let oldPositionLstUpdCPF = $t02810728259._4
617638 let _direction = if ((oldPositionSize > 0))
618639 then DIR_SHORT
619640 else DIR_LONG
620641 let isAdd = (_direction == DIR_LONG)
621642 let openNotional = muld(_amount, _leverage)
622- let $t02704827164 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
623- let oldPositionNotional = $t02704827164._1
624- let unrealizedPnl = $t02704827164._2
625- let $t02717029804 = if ((oldPositionNotional > openNotional))
643+ let $t02843228548 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
644+ let oldPositionNotional = $t02843228548._1
645+ let unrealizedPnl = $t02843228548._2
646+ let $t02855431098 = if ((oldPositionNotional > openNotional))
626647 then {
627- let $t02754727766 = swapInput(isAdd, openNotional)
628- let exchangedPositionSize = $t02754727766._1
629- let quoteAssetReserveAfter = $t02754727766._2
630- let baseAssetReserveAfter = $t02754727766._3
631- let totalPositionSizeAfter = $t02754727766._4
632- let cumulativeNotionalAfter = $t02754727766._5
648+ let $t02893129150 = swapInput(isAdd, openNotional)
649+ let exchangedPositionSize = $t02893129150._1
650+ let quoteAssetReserveAfter = $t02893129150._2
651+ let baseAssetReserveAfter = $t02893129150._3
652+ let totalPositionSizeAfter = $t02893129150._4
653+ let cumulativeNotionalAfter = $t02893129150._5
633654 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
634655 if (if ((_minBaseAssetAmount != 0))
635656 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
636657 else false)
637658 then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
638659 else {
639- let realizedPnl = if ((oldPositionSize != 0))
640- then divd(muld(unrealizedPnl, exchangedPositionSizeAbs), oldPositionSize)
641- else 0
642- let $t02828828533 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
643- let remainMargin = $t02828828533._1
644- let badDebt = $t02828828533._2
645- let fundingPayment = $t02828828533._3
660+ let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), oldPositionSize)
661+ let $t02958229827 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
662+ let remainMargin = $t02958229827._1
663+ let badDebt = $t02958229827._2
664+ let fundingPayment = $t02958229827._3
646665 let exchangedQuoteAssetAmount = openNotional
647666 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
648667 let remainOpenNotional = if ((oldPositionSize > 0))
649668 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
650669 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
651670 let newPositionSize = (oldPositionSize + exchangedPositionSize)
652671 $Tuple11(newPositionSize, remainMargin, abs(remainOpenNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() - openNotional), (totalLongPositionSize() - (if ((newPositionSize > 0))
653672 then abs(exchangedPositionSize)
654673 else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize))
655674 then abs(exchangedPositionSize)
656675 else 0)))
657676 }
658677 }
659678 else throw("Close position first")
660- let newPositionSize = $t02717029804._1
661- let newPositionRemainMargin = $t02717029804._2
662- let newPositionOpenNotional = $t02717029804._3
663- let newPositionLatestCPF = $t02717029804._4
664- let baseAssetReserveAfter = $t02717029804._5
665- let quoteAssetReserveAfter = $t02717029804._6
666- let totalPositionSizeAfter = $t02717029804._7
667- let cumulativeNotionalAfter = $t02717029804._8
668- let openInterestNotionalAfter = $t02717029804._9
669- let totalLongAfter = $t02717029804._10
670- let totalShortAfter = $t02717029804._11
679+ let newPositionSize = $t02855431098._1
680+ let newPositionRemainMargin = $t02855431098._2
681+ let newPositionOpenNotional = $t02855431098._3
682+ let newPositionLatestCPF = $t02855431098._4
683+ let baseAssetReserveAfter = $t02855431098._5
684+ let quoteAssetReserveAfter = $t02855431098._6
685+ let totalPositionSizeAfter = $t02855431098._7
686+ let cumulativeNotionalAfter = $t02855431098._8
687+ let openInterestNotionalAfter = $t02855431098._9
688+ let totalLongAfter = $t02855431098._10
689+ let totalShortAfter = $t02855431098._11
671690 (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter))
672691 }
673692
674693
675694
676695 @Callable(i)
677696 func increasePosition (_direction,_leverage,_minBaseAssetAmount) = {
678697 let _rawAmount = i.payments[0].amount
679698 if (if (if (if (if (if (if (if ((_direction != DIR_LONG))
680699 then (_direction != DIR_SHORT)
681700 else false)
682701 then true
683702 else (0 >= _rawAmount))
684703 then true
685704 else if (((1 * DECIMAL_UNIT) > _leverage))
686705 then true
687706 else (_leverage > (3 * DECIMAL_UNIT)))
688707 then true
689708 else !(initialized()))
690709 then true
691710 else (i.payments[0].assetId != quoteAsset()))
692711 then true
693712 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
694713 then true
695714 else paused())
696715 then throw("Invalid increasePosition parameters")
697716 else {
698717 let feeAmount = muld(_rawAmount, fee())
699718 let _amount = (_rawAmount - feeAmount)
700- let $t03084030992 = getPosition(toString(i.caller))
701- let oldPositionSize = $t03084030992._1
702- let oldPositionMargin = $t03084030992._2
703- let oldPositionOpenNotional = $t03084030992._3
704- let oldPositionLstUpdCPF = $t03084030992._4
719+ let $t03213432286 = getPosition(toString(i.caller))
720+ let oldPositionSize = $t03213432286._1
721+ let oldPositionMargin = $t03213432286._2
722+ let oldPositionOpenNotional = $t03213432286._3
723+ let oldPositionLstUpdCPF = $t03213432286._4
705724 let isNewPosition = (oldPositionSize == 0)
706725 let isSameDirection = if ((oldPositionSize > 0))
707726 then (_direction == DIR_LONG)
708727 else (_direction == DIR_SHORT)
709728 let expandExisting = if (!(isNewPosition))
710729 then isSameDirection
711730 else false
712731 let isAdd = (_direction == DIR_LONG)
713- let $t03128133670 = if (if (isNewPosition)
732+ let $t03257534964 = if (if (isNewPosition)
714733 then true
715734 else expandExisting)
716735 then {
717736 let openNotional = muld(_amount, _leverage)
718- let $t03170531911 = swapInput(isAdd, openNotional)
719- let amountBaseAssetBought = $t03170531911._1
720- let quoteAssetReserveAfter = $t03170531911._2
721- let baseAssetReserveAfter = $t03170531911._3
722- let totalPositionSizeAfter = $t03170531911._4
723- let cumulativeNotionalAfter = $t03170531911._5
737+ let $t03299933205 = swapInput(isAdd, openNotional)
738+ let amountBaseAssetBought = $t03299933205._1
739+ let quoteAssetReserveAfter = $t03299933205._2
740+ let baseAssetReserveAfter = $t03299933205._3
741+ let totalPositionSizeAfter = $t03299933205._4
742+ let cumulativeNotionalAfter = $t03299933205._5
724743 if (if ((_minBaseAssetAmount != 0))
725744 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
726745 else false)
727746 then throw(((("Limit error: " + toString(abs(amountBaseAssetBought))) + " < ") + toString(_minBaseAssetAmount)))
728747 else {
729748 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
730749 let increaseMarginRequirement = divd(openNotional, _leverage)
731- let $t03229232531 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
732- let remainMargin = $t03229232531._1
733- let x1 = $t03229232531._2
734- let x2 = $t03229232531._3
750+ let $t03358633825 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
751+ let remainMargin = $t03358633825._1
752+ let x1 = $t03358633825._2
753+ let x2 = $t03358633825._3
735754 $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0))
736755 then abs(amountBaseAssetBought)
737756 else 0)), (totalShortPositionSize() + (if ((0 > newPositionSize))
738757 then abs(amountBaseAssetBought)
739758 else 0)))
740759 }
741760 }
742761 else {
743762 let openNotional = muld(_amount, _leverage)
744- let $t03336333479 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
745- let oldPositionNotional = $t03336333479._1
746- let unrealizedPnl = $t03336333479._2
763+ let $t03465734773 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT)
764+ let oldPositionNotional = $t03465734773._1
765+ let unrealizedPnl = $t03465734773._2
747766 if ((oldPositionNotional > openNotional))
748767 then throw("Use decreasePosition to decrease position size")
749768 else throw("Close position first")
750769 }
751- let newPositionSize = $t03128133670._1
752- let newPositionRemainMargin = $t03128133670._2
753- let newPositionOpenNotional = $t03128133670._3
754- let newPositionLatestCPF = $t03128133670._4
755- let baseAssetReserveAfter = $t03128133670._5
756- let quoteAssetReserveAfter = $t03128133670._6
757- let totalPositionSizeAfter = $t03128133670._7
758- let cumulativeNotionalAfter = $t03128133670._8
759- let openInterestNotionalAfter = $t03128133670._9
760- let totalLongAfter = $t03128133670._10
761- let totalShortAfter = $t03128133670._11
770+ let newPositionSize = $t03257534964._1
771+ let newPositionRemainMargin = $t03257534964._2
772+ let newPositionOpenNotional = $t03257534964._3
773+ let newPositionLatestCPF = $t03257534964._4
774+ let baseAssetReserveAfter = $t03257534964._5
775+ let quoteAssetReserveAfter = $t03257534964._6
776+ let totalPositionSizeAfter = $t03257534964._7
777+ let cumulativeNotionalAfter = $t03257534964._8
778+ let openInterestNotionalAfter = $t03257534964._9
779+ let totalLongAfter = $t03257534964._10
780+ let totalShortAfter = $t03257534964._11
762781 let feeToStakers = (feeAmount / 2)
763782 let feeToInsurance = (feeAmount - feeToStakers)
764783 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
765784 if ((stake == stake))
766785 then {
767786 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
768787 if ((depositInsurance == depositInsurance))
769788 then (((updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
770789 else throw("Strict value is not equal to itself.")
771790 }
772791 else throw("Strict value is not equal to itself.")
773792 }
774793 }
775794
776795
777796
778797 @Callable(i)
779798 func addMargin () = {
780799 let _rawAmount = i.payments[0].amount
781800 if (if (if (if ((i.payments[0].assetId != quoteAsset()))
782801 then true
783802 else !(requireOpenPosition(toString(i.caller))))
784803 then true
785804 else !(initialized()))
786805 then true
787806 else paused())
788807 then throw("Invalid addMargin parameters")
789808 else {
790809 let feeAmount = muld(_rawAmount, fee())
791810 let _amount = (_rawAmount - feeAmount)
792- let $t03494635098 = getPosition(toString(i.caller))
793- let oldPositionSize = $t03494635098._1
794- let oldPositionMargin = $t03494635098._2
795- let oldPositionOpenNotional = $t03494635098._3
796- let oldPositionLstUpdCPF = $t03494635098._4
811+ let $t03624036392 = getPosition(toString(i.caller))
812+ let oldPositionSize = $t03624036392._1
813+ let oldPositionMargin = $t03624036392._2
814+ let oldPositionOpenNotional = $t03624036392._3
815+ let oldPositionLstUpdCPF = $t03624036392._4
797816 let feeToStakers = (feeAmount / 2)
798817 let feeToInsurance = (feeAmount - feeToStakers)
799818 let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)])
800819 if ((stake == stake))
801820 then {
802821 let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
803822 if ((depositInsurance == depositInsurance))
804823 then ((updatePosition(toString(i.caller), oldPositionSize, (oldPositionMargin + _amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount)))
805824 else throw("Strict value is not equal to itself.")
806825 }
807826 else throw("Strict value is not equal to itself.")
808827 }
809828 }
810829
811830
812831
813832 @Callable(i)
814833 func removeMargin (_amount) = if (if (if (if ((0 >= _amount))
815834 then true
816835 else !(requireOpenPosition(toString(i.caller))))
817836 then true
818837 else !(initialized()))
819838 then true
820839 else paused())
821840 then throw("Invalid removeMargin parameters")
822841 else {
823- let $t03601836170 = getPosition(toString(i.caller))
824- let oldPositionSize = $t03601836170._1
825- let oldPositionMargin = $t03601836170._2
826- let oldPositionOpenNotional = $t03601836170._3
827- let oldPositionLstUpdCPF = $t03601836170._4
842+ let $t03731237464 = getPosition(toString(i.caller))
843+ let oldPositionSize = $t03731237464._1
844+ let oldPositionMargin = $t03731237464._2
845+ let oldPositionOpenNotional = $t03731237464._3
846+ let oldPositionLstUpdCPF = $t03731237464._4
828847 let marginDelta = -(_amount)
829- let $t03620736386 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
830- let remainMargin = $t03620736386._1
831- let badDebt = $t03620736386._2
848+ let $t03750137680 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
849+ let remainMargin = $t03750137680._1
850+ let badDebt = $t03750137680._2
832851 if ((badDebt != 0))
833852 then throw("Invalid added margin amount")
834853 else {
835854 let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [_amount, toBase58String(quoteAsset())], nil)
836855 if ((unstake == unstake))
837856 then ((updatePosition(toString(i.caller), oldPositionSize, remainMargin, oldPositionOpenNotional, latestCumulativePremiumFraction(oldPositionSize)) ++ withdraw(i.caller, _amount)) ++ updateBalance((cbalance() - _amount)))
838857 else throw("Strict value is not equal to itself.")
839858 }
840859 }
841860
842861
843862
844863 @Callable(i)
845864 func closePosition () = if (if (if (!(requireOpenPosition(toString(i.caller))))
846865 then true
847866 else !(initialized()))
848867 then true
849868 else paused())
850869 then throw("Invalid closePosition parameters")
851870 else {
852- let $t03714637530 = internalClosePosition(toString(i.caller))
853- let x1 = $t03714637530._1
854- let positionBadDebt = $t03714637530._2
855- let realizedPnl = $t03714637530._3
856- let marginToVault = $t03714637530._4
857- let quoteAssetReserveAfter = $t03714637530._5
858- let baseAssetReserveAfter = $t03714637530._6
859- let totalPositionSizeAfter = $t03714637530._7
860- let cumulativeNotionalAfter = $t03714637530._8
861- let openInterestNotionalAfter = $t03714637530._9
862- let x2 = $t03714637530._10
863- let totalLongAfter = $t03714637530._11
864- let totalShortAfter = $t03714637530._12
871+ let $t03844038824 = internalClosePosition(toString(i.caller))
872+ let x1 = $t03844038824._1
873+ let positionBadDebt = $t03844038824._2
874+ let realizedPnl = $t03844038824._3
875+ let marginToVault = $t03844038824._4
876+ let quoteAssetReserveAfter = $t03844038824._5
877+ let baseAssetReserveAfter = $t03844038824._6
878+ let totalPositionSizeAfter = $t03844038824._7
879+ let cumulativeNotionalAfter = $t03844038824._8
880+ let openInterestNotionalAfter = $t03844038824._9
881+ let x2 = $t03844038824._10
882+ let totalLongAfter = $t03844038824._11
883+ let totalShortAfter = $t03844038824._12
865884 if ((positionBadDebt > 0))
866885 then throw("Unable to close position with bad debt")
867886 else {
868887 let withdrawAmount = abs(marginToVault)
869888 let ammBalance = (cbalance() - withdrawAmount)
870- let $t03773937881 = if ((0 > ammBalance))
889+ let $t03903339175 = if ((0 > ammBalance))
871890 then $Tuple2(0, abs(ammBalance))
872891 else $Tuple2(ammBalance, 0)
873- let ammNewBalance = $t03773937881._1
874- let getFromInsurance = $t03773937881._2
892+ let ammNewBalance = $t03903339175._1
893+ let getFromInsurance = $t03903339175._2
875894 let x = if ((getFromInsurance > 0))
876895 then {
877896 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil)
878897 if ((withdrawInsurance == withdrawInsurance))
879898 then nil
880899 else throw("Strict value is not equal to itself.")
881900 }
882901 else nil
883902 if ((x == x))
884903 then {
885904 let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(withdrawAmount - getFromInsurance), toBase58String(quoteAsset())], nil)
886905 if ((unstake == unstake))
887906 then (((deletePosition(toString(i.caller)) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, withdrawAmount)) ++ updateBalance(ammNewBalance))
888907 else throw("Strict value is not equal to itself.")
889908 }
890909 else throw("Strict value is not equal to itself.")
891910 }
892911 }
893912
894913
895914
896915 @Callable(i)
897916 func liquidate (_trader) = {
898917 let marginRatio = if (isOverFluctuationLimit())
899918 then getMarginRatioByOption(_trader, PNL_OPTION_ORACLE)
900919 else getMarginRatioByOption(_trader, PNL_OPTION_SPOT)
901920 if (if (if (if (!(requireMoreMarginRatio(marginRatio, maintenanceMarginRatio(), false)))
902921 then true
903922 else !(requireOpenPosition(_trader)))
904923 then true
905924 else !(initialized()))
906925 then true
907926 else paused())
908927 then throw("Unable to liquidate")
909928 else {
910- let $t03932039747 = internalClosePosition(_trader)
911- let x1 = $t03932039747._1
912- let badDebt = $t03932039747._2
913- let x2 = $t03932039747._3
914- let marginToVault = $t03932039747._4
915- let quoteAssetReserveAfter = $t03932039747._5
916- let baseAssetReserveAfter = $t03932039747._6
917- let totalPositionSizeAfter = $t03932039747._7
918- let cumulativeNotionalAfter = $t03932039747._8
919- let openInterestNotionalAfter = $t03932039747._9
920- let exchangedQuoteAssetAmount = $t03932039747._10
921- let totalLongAfter = $t03932039747._11
922- let totalShortAfter = $t03932039747._12
929+ let $t04061441041 = internalClosePosition(_trader)
930+ let x1 = $t04061441041._1
931+ let badDebt = $t04061441041._2
932+ let x2 = $t04061441041._3
933+ let marginToVault = $t04061441041._4
934+ let quoteAssetReserveAfter = $t04061441041._5
935+ let baseAssetReserveAfter = $t04061441041._6
936+ let totalPositionSizeAfter = $t04061441041._7
937+ let cumulativeNotionalAfter = $t04061441041._8
938+ let openInterestNotionalAfter = $t04061441041._9
939+ let exchangedQuoteAssetAmount = $t04061441041._10
940+ let totalLongAfter = $t04061441041._11
941+ let totalShortAfter = $t04061441041._12
923942 let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio())
924943 let feeToLiquidator = (liquidationPenalty / 2)
925944 let feeToInsurance = (liquidationPenalty - feeToLiquidator)
926- let ammBadDebt = (cbalance() - liquidationPenalty)
927- let $t04014540280 = if ((0 > ammBadDebt))
928- then $Tuple2(0, abs(ammBadDebt))
929- else $Tuple2(ammBadDebt, 0)
930- let newAmmBalance = $t04014540280._1
931- let takeFromInsurance = $t04014540280._2
945+ let ammBalance = (cbalance() - liquidationPenalty)
946+ let $t04143941574 = if ((0 > ammBalance))
947+ then $Tuple2(0, abs(ammBalance))
948+ else $Tuple2(ammBalance, 0)
949+ let newAmmBalance = $t04143941574._1
950+ let takeFromInsurance = $t04143941574._2
932951 let x = if ((takeFromInsurance > 0))
933952 then {
934953 let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil)
935954 if ((withdrawInsurance == withdrawInsurance))
936955 then nil
937956 else throw("Strict value is not equal to itself.")
938957 }
939958 else nil
940959 if ((x == x))
941960 then {
942- let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
943- if ((depositInsurance == depositInsurance))
961+ let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(liquidationPenalty - takeFromInsurance), toBase58String(quoteAsset())], nil)
962+ if ((unstake == unstake))
944963 then {
945- let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(feeToLiquidator - takeFromInsurance), toBase58String(quoteAsset())], nil)
946- if ((unstake == unstake))
947- then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(ammBadDebt))
964+ let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)])
965+ if ((depositInsurance == depositInsurance))
966+ then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance))
948967 else throw("Strict value is not equal to itself.")
949968 }
950969 else throw("Strict value is not equal to itself.")
951970 }
952971 else throw("Strict value is not equal to itself.")
953972 }
954973 }
955974
956975
957976
958977 @Callable(i)
959978 func payFunding () = {
960979 let fundingBlockTimestamp = nextFundingBlockTimestamp()
961980 if (if (if ((fundingBlockTimestamp > lastBlock.timestamp))
962981 then true
963982 else !(initialized()))
964983 then true
965984 else paused())
966985 then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp)))
967986 else {
968987 let underlyingPrice = getOracleTwapPrice()
969988 let spotTwapPrice = getTwapSpotPrice()
970989 let premium = (spotTwapPrice - underlyingPrice)
971- let $t04165042985 = if (if ((totalShortPositionSize() == 0))
990+ let $t04295044285 = if (if ((totalShortPositionSize() == 0))
972991 then true
973992 else (totalLongPositionSize() == 0))
974993 then $Tuple2(0, 0)
975994 else if ((0 > premium))
976995 then {
977996 let shortPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
978997 let longPremiumFraction = divd(muld(shortPremiumFraction, totalShortPositionSize()), totalLongPositionSize())
979998 $Tuple2(shortPremiumFraction, longPremiumFraction)
980999 }
9811000 else {
9821001 let longPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
9831002 let shortPremiumFraction = divd(muld(longPremiumFraction, totalLongPositionSize()), totalShortPositionSize())
9841003 $Tuple2(shortPremiumFraction, longPremiumFraction)
9851004 }
986- let shortPremiumFraction = $t04165042985._1
987- let longPremiumFraction = $t04165042985._2
1005+ let shortPremiumFraction = $t04295044285._1
1006+ let longPremiumFraction = $t04295044285._2
9881007 updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice))
9891008 }
9901009 }
9911010
9921011
9931012
9941013 @Callable(i)
9951014 func v_get (_trader) = {
996- let $t04336043413 = internalClosePosition(_trader)
997- let x1 = $t04336043413._1
998- let x2 = $t04336043413._2
999- let x3 = $t04336043413._3
1000- let x4 = $t04336043413._4
1015+ let $t04466044713 = internalClosePosition(_trader)
1016+ let x1 = $t04466044713._1
1017+ let x2 = $t04466044713._2
1018+ let x3 = $t04466044713._3
1019+ let x4 = $t04466044713._4
10011020 throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader))))
10021021 }
10031022
10041023
10051024
10061025 @Callable(i)
10071026 func view_calcRemainMarginWithFundingPayment (_trader) = {
1008- let $t04356043671 = getPosition(_trader)
1009- let positionSize = $t04356043671._1
1010- let positionMargin = $t04356043671._2
1011- let pon = $t04356043671._3
1012- let positionLstUpdCPF = $t04356043671._4
1013- let $t04367643777 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1014- let positionNotional = $t04367643777._1
1015- let unrealizedPnl = $t04367643777._2
1016- let $t04378243964 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1017- let remainMargin = $t04378243964._1
1018- let badDebt = $t04378243964._2
1019- let fundingPayment = $t04378243964._3
1027+ let $t04486044971 = getPosition(_trader)
1028+ let positionSize = $t04486044971._1
1029+ let positionMargin = $t04486044971._2
1030+ let pon = $t04486044971._3
1031+ let positionLstUpdCPF = $t04486044971._4
1032+ let $t04497645077 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)
1033+ let positionNotional = $t04497645077._1
1034+ let unrealizedPnl = $t04497645077._2
1035+ let $t04508245264 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
1036+ let remainMargin = $t04508245264._1
1037+ let badDebt = $t04508245264._2
1038+ let fundingPayment = $t04508245264._3
10201039 throw(((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))))
10211040 }
10221041
10231042
10241043 @Verifier(tx)
10251044 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], adminPublicKey())
10261045

github/deemru/w8io/026f985 
165.77 ms