tx · 8eRaEHemhAtsv2aUgTwXbzsuJzRy44o9J8zCGHRFEcGe

3N4mv2c2ehFvfSR5pXDCUqFZDaatagfBaMA:  -0.03600000 Waves

2022.06.05 10:21 [2082752] smart account 3N4mv2c2ehFvfSR5pXDCUqFZDaatagfBaMA > SELF 0.00000000 Waves

{ "type": 13, "id": "8eRaEHemhAtsv2aUgTwXbzsuJzRy44o9J8zCGHRFEcGe", "fee": 3600000, "feeAssetId": null, "timestamp": 1654413691595, "version": 2, "chainId": 84, "sender": "3N4mv2c2ehFvfSR5pXDCUqFZDaatagfBaMA", "senderPublicKey": "DVEaMSvh9RbcfQEjtuj688gRa2kN2ATfwfT1VtWMewT1", "proofs": [ "4W3QvWScb5iGEur7dXVF7MYETUjQ9SGB4GQnyFXskYwwCUtGcAQunCoabrzTg24gxTu9moDGmQq8oaga3YzfY3Rw" ], "script": "base64:AAIFAAAAAAAAADMIAhILCgkBAQEBAQEBCAgSBgoEAQEBARIFCgMBAQESABIDCgEBEgASAwoBCBIAEgMKAQgAAABOAAAAAAlrX29yYV9rZXkCAAAACWtfb3JhX2tleQAAAAAFa19vcmECAAAABWtfb3JhAAAAAAlrX2JhbGFuY2UCAAAACWtfYmFsYW5jZQAAAAAOa19wb3NpdGlvblNpemUCAAAADmtfcG9zaXRpb25TaXplAAAAABBrX3Bvc2l0aW9uTWFyZ2luAgAAABBrX3Bvc2l0aW9uTWFyZ2luAAAAAAVrX3BvbgIAAAAWa19wb3NpdGlvbk9wZW5Ob3Rpb25hbAAAAAATa19wb3NpdGlvbkxzdFVwZENQRgIAAAASa19wb3NpdGlvbkZyYWN0aW9uAAAAAA1rX2luaXRpYWxpemVkAgAAAA1rX2luaXRpYWxpemVkAAAAAAVrX2ZlZQIAAAAFa19mZWUAAAAAD2tfZnVuZGluZ1BlcmlvZAIAAAAPa19mdW5kaW5nUGVyaW9kAAAAABFrX2luaXRNYXJnaW5SYXRpbwIAAAARa19pbml0TWFyZ2luUmF0aW8AAAAABWtfbW1y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R0MDI4MjE0MjgyOTIAAAACXzkEAAAAA3gxMAgFAAAADSR0MDI4MjE0MjgyOTIAAAADXzEwCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQEAAAABcwAAAAEFAAAAAngyCQEAAAABcwAAAAEFAAAAAngzCQEAAAABcwAAAAEFAAAAAng0AAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAEEFETUlOX1BVQkxJQ19LRVlb7U2m", "height": 2082752, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9rrXuAyZovehMG6jntrUMyw6Jti2JP9efsy9MfRR7Pf8 Next: EPhnEh5ESrNcd9FA9kXrhygkPQ2xZc6ba2UQfXb1CKwT Diff:
OldNewDifferences
3737
3838 let k_bsAstR = "k_bsAstR"
3939
40-let k_baseAssetDeltaThisFundingPeriod = "k_baseAssetDelta"
40+let k_baseAsstFndDelt = "k_baseAssetDelta"
4141
4242 let k_totalPositionSize = "k_totalPositionSize"
4343
6868 let DECIMAL_UNIT = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
6969
7070 let ONE_DAY = (86400 * DECIMAL_UNIT)
71+
72+func s (_x) = (toString(_x) + ",")
73+
7174
7275 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
7376
115118 func bsAstR () = int(k_bsAstR)
116119
117120
118-func baseAssetDeltaThisFundingPeriod () = int(k_baseAssetDeltaThisFundingPeriod)
121+func baseAsstFndDelt () = int(k_baseAsstFndDelt)
119122
120123
121124 func totalPositionSize () = int(k_totalPositionSize)
160163
161164
162165 func requireOpenPosition (_trader) = {
163- let $t039624073 = getPosition(_trader)
164- let positionSize = $t039624073._1
165- let positionMargin = $t039624073._2
166- let pon = $t039624073._3
167- let positionLstUpdCPF = $t039624073._4
166+ let $t039534064 = getPosition(_trader)
167+ let positionSize = $t039534064._1
168+ let positionMargin = $t039534064._2
169+ let pon = $t039534064._3
170+ let positionLstUpdCPF = $t039534064._4
168171 if ((positionSize == 0))
169172 then throw("No open position")
170173 else true
175178
176179
177180 func updateReserve (_isAdd,_quoteAssetAmount,_baseAssetAmount) = if (_isAdd)
178- then $Tuple5((qtAstR() + _quoteAssetAmount), (bsAstR() - _baseAssetAmount), (baseAssetDeltaThisFundingPeriod() - _baseAssetAmount), (totalPositionSize() + _baseAssetAmount), (cumulativeNotional() + _quoteAssetAmount))
179- else $Tuple5((qtAstR() - _quoteAssetAmount), (bsAstR() + _baseAssetAmount), (baseAssetDeltaThisFundingPeriod() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount), (cumulativeNotional() - _quoteAssetAmount))
181+ then $Tuple5((qtAstR() + _quoteAssetAmount), (bsAstR() - _baseAssetAmount), (baseAsstFndDelt() - _baseAssetAmount), (totalPositionSize() + _baseAssetAmount), (cumulativeNotional() + _quoteAssetAmount))
182+ else $Tuple5((qtAstR() - _quoteAssetAmount), (bsAstR() + _baseAssetAmount), (baseAsstFndDelt() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount), (cumulativeNotional() - _quoteAssetAmount))
180183
181184
182185 func swapInput (_isAdd,_quoteAssetAmoun) = {
191194 let amountBaseAssetBought = if (_isAdd)
192195 then amountBaseAssetBoughtAbs
193196 else -(amountBaseAssetBoughtAbs)
194- let $t053615575 = updateReserve(_isAdd, _quoteAssetAmoun, amountBaseAssetBoughtAbs)
195- let qtAstRAfter1 = $t053615575._1
196- let bsAstRAfter1 = $t053615575._2
197- let baseAssetDeltaThisFundingPeriodAfter1 = $t053615575._3
198- let totalPositionSizeAfter1 = $t053615575._4
199- let cumulativeNotionalAfter1 = $t053615575._5
200- $Tuple6(amountBaseAssetBought, qtAstRAfter1, bsAstRAfter1, baseAssetDeltaThisFundingPeriodAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
197+ let $t053205518 = updateReserve(_isAdd, _quoteAssetAmoun, amountBaseAssetBoughtAbs)
198+ let qtAstRAfter1 = $t053205518._1
199+ let bsAstRAfter1 = $t053205518._2
200+ let baseAsstFndDeltAfter1 = $t053205518._3
201+ let totalPositionSizeAfter1 = $t053205518._4
202+ let cumulativeNotionalAfter1 = $t053205518._5
203+ $Tuple6(amountBaseAssetBought, qtAstRAfter1, bsAstRAfter1, baseAsstFndDeltAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
201204 }
202205
203206
207210 then muld((_latestCPF - _oldPositionLstUpdCPF), _oldPositionSize)
208211 else 0
209212 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
210- let $t061656292 = if ((0 > signedMargin))
213+ let $t060926219 = if ((0 > signedMargin))
211214 then $Tuple2(0, abs(signedMargin))
212215 else $Tuple2(abs(signedMargin), 0)
213- let remainMargin = $t061656292._1
214- let badDebt = $t061656292._2
216+ let remainMargin = $t060926219._1
217+ let badDebt = $t060926219._2
215218 $Tuple4(remainMargin, badDebt, fundingPayment, _latestCPF)
216219 }
217220
225228 else (_baseAssetPoolAmount - _baseAssetAmount)
226229 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
227230 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetPoolAmount))
228- let $t069417156 = updateReserve(!(_add), quoteAssetSold, _baseAssetAmount)
229- let qtAstRAfter1 = $t069417156._1
230- let bsAstRAfter1 = $t069417156._2
231- let baseAssetDeltaThisFundingPeriodAfter1 = $t069417156._3
232- let totalPositionSizeAfter1 = $t069417156._4
233- let cumulativeNotionalAfter1 = $t069417156._5
234- $Tuple6(quoteAssetSold, qtAstRAfter1, bsAstRAfter1, baseAssetDeltaThisFundingPeriodAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
231+ let $t068687067 = updateReserve(!(_add), quoteAssetSold, _baseAssetAmount)
232+ let qtAstRAfter1 = $t068687067._1
233+ let bsAstRAfter1 = $t068687067._2
234+ let baseAsstFndDeltAfter1 = $t068687067._3
235+ let totalPositionSizeAfter1 = $t068687067._4
236+ let cumulativeNotionalAfter1 = $t068687067._5
237+ $Tuple6(quoteAssetSold, qtAstRAfter1, bsAstRAfter1, baseAsstFndDeltAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
235238 }
236239
237240
238241 func getPositionNotionalAndUnrealizedPnl (_trader) = {
239- let $t074107521 = getPosition(_trader)
240- let positionSize = $t074107521._1
241- let positionMargin = $t074107521._2
242- let pon = $t074107521._3
243- let positionLstUpdCPF = $t074107521._4
242+ let $t073057416 = getPosition(_trader)
243+ let positionSize = $t073057416._1
244+ let positionMargin = $t073057416._2
245+ let pon = $t073057416._3
246+ let positionLstUpdCPF = $t073057416._4
244247 let positionSizeAbs = abs(positionSize)
245248 if ((positionSizeAbs == 0))
246249 then throw("Invalid position size")
247250 else {
248251 let isShort = (0 > positionSize)
249- let $t076987848 = getOutputPriceWithReserves(!(isShort), positionSizeAbs, qtAstR(), bsAstR())
250- let positionNotional = $t076987848._1
251- let x1 = $t076987848._2
252- let x2 = $t076987848._3
253- let x3 = $t076987848._4
252+ let $t075937743 = getOutputPriceWithReserves(!(isShort), positionSizeAbs, qtAstR(), bsAstR())
253+ let positionNotional = $t075937743._1
254+ let x1 = $t075937743._2
255+ let x2 = $t075937743._3
256+ let x3 = $t075937743._4
254257 let unrealizedPnl = if (isShort)
255258 then (pon - positionNotional)
256259 else (positionNotional - pon)
270273
271274
272275 func getMarginRatio (_trader) = {
273- let $t083588469 = getPosition(_trader)
274- let positionSize = $t083588469._1
275- let positionMargin = $t083588469._2
276- let pon = $t083588469._3
277- let positionLstUpdCPF = $t083588469._4
278- let $t084758559 = getPositionNotionalAndUnrealizedPnl(_trader)
279- let positionNotional = $t084758559._1
280- let unrealizedPnl = $t084758559._2
281- let $t085648730 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
282- let remainMargin = $t085648730._1
283- let badDebt = $t085648730._2
276+ let $t082538364 = getPosition(_trader)
277+ let positionSize = $t082538364._1
278+ let positionMargin = $t082538364._2
279+ let pon = $t082538364._3
280+ let positionLstUpdCPF = $t082538364._4
281+ let $t083708454 = getPositionNotionalAndUnrealizedPnl(_trader)
282+ let positionNotional = $t083708454._1
283+ let unrealizedPnl = $t083708454._2
284+ let $t084598625 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
285+ let remainMargin = $t084598625._1
286+ let badDebt = $t084598625._2
284287 divd((remainMargin - badDebt), positionNotional)
285288 }
286289
287290
288291 func internalClosePosition (_trader) = {
289- let $t088378948 = getPosition(_trader)
290- let positionSize = $t088378948._1
291- let positionMargin = $t088378948._2
292- let pon = $t088378948._3
293- let positionLstUpdCPF = $t088378948._4
294- let $t089549024 = getPositionNotionalAndUnrealizedPnl(_trader)
295- let x1 = $t089549024._1
296- let unrealizedPnl = $t089549024._2
297- let $t090299201 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
298- let remainMargin = $t090299201._1
299- let badDebt = $t090299201._2
300- let x2 = $t090299201._3
292+ let $t087328843 = getPosition(_trader)
293+ let positionSize = $t087328843._1
294+ let positionMargin = $t087328843._2
295+ let pon = $t087328843._3
296+ let positionLstUpdCPF = $t087328843._4
297+ let $t088498919 = getPositionNotionalAndUnrealizedPnl(_trader)
298+ let x1 = $t088498919._1
299+ let unrealizedPnl = $t088498919._2
300+ let $t089249096 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
301+ let remainMargin = $t089249096._1
302+ let badDebt = $t089249096._2
303+ let x2 = $t089249096._3
301304 let exchangedPositionSize = -(positionSize)
302305 let realizedPnl = unrealizedPnl
303306 let marginToVault = -(remainMargin)
304- let $t093289651 = getOutputPriceWithReserves((positionSize > 0), abs(positionSize), qtAstR(), bsAstR())
305- let exchangedQuoteAssetAmount = $t093289651._1
306- let quoteAssetReserveAfter = $t093289651._2
307- let bsAstRAfter = $t093289651._3
308- let baseAssetDeltaThisFundingPeriodAfter = $t093289651._4
309- let totalPositionSizeAfter = $t093289651._5
310- let cumulativeNotionalAfter = $t093289651._6
307+ let $t092239530 = getOutputPriceWithReserves((positionSize > 0), abs(positionSize), qtAstR(), bsAstR())
308+ let exchangedQuoteAssetAmount = $t092239530._1
309+ let quoteAssetReserveAfter = $t092239530._2
310+ let bsAstRAfter = $t092239530._3
311+ let baseAsstFndDeltAfter = $t092239530._4
312+ let totalPositionSizeAfter = $t092239530._5
313+ let cumulativeNotionalAfter = $t092239530._6
311314 let openInteresetNotionalAfter = (openInteresetNotional() - pon)
312- $Tuple11(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, bsAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter, exchangedQuoteAssetAmount)
315+ $Tuple11(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, bsAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter, exchangedQuoteAssetAmount)
313316 }
314317
315318
316319 func updateSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee) = [IntegerEntry(k_initMarginRatio, _initMarginRatio), IntegerEntry(k_mmr, _mmr), IntegerEntry(k_liquidationFeeRatio, _liquidationFeeRatio), IntegerEntry(k_fundingPeriod, _fundingPeriod), IntegerEntry(k_fee, _fee)]
317320
318321
319-func updateFunding (_baseADTFP,_nextFundingBlock,_latestCPF,_fundingRate) = [IntegerEntry(k_baseAssetDeltaThisFundingPeriod, _baseADTFP), IntegerEntry(k_nextFundingBlock, _nextFundingBlock), IntegerEntry(k_latestCPF, _latestCPF), IntegerEntry(k_fundingRate, _fundingRate)]
322+func updateFunding (_baseADTFP,_nextFundingBlock,_latestCPF,_fundingRate) = [IntegerEntry(k_baseAsstFndDelt, _baseADTFP), IntegerEntry(k_nextFundingBlock, _nextFundingBlock), IntegerEntry(k_latestCPF, _latestCPF), IntegerEntry(k_fundingRate, _fundingRate)]
320323
321324
322325 func updatePosition (_address,_size,_margin,_openNotinal,_LstUpdCPF) = [IntegerEntry(toCompositeKey(k_positionSize, _address), _size), IntegerEntry(toCompositeKey(k_positionMargin, _address), _margin), IntegerEntry(toCompositeKey(k_pon, _address), _openNotinal), IntegerEntry(toCompositeKey(k_positionLstUpdCPF, _address), _LstUpdCPF)]
323326
324327
325-func updateAmm (_qtAstR,_bsAstR,_baseAssetDeltaThisFundingPeriodAfter,_totalPositionSizeAfter,_cumulativeNotionalAfter,_openInteresetNotional) = [IntegerEntry(k_qtAstR, _qtAstR), IntegerEntry(k_bsAstR, _bsAstR), IntegerEntry(k_baseAssetDeltaThisFundingPeriod, _baseAssetDeltaThisFundingPeriodAfter), IntegerEntry(k_totalPositionSize, _totalPositionSizeAfter), IntegerEntry(k_cumulativeNotional, _cumulativeNotionalAfter), IntegerEntry(k_openInteresetNotional, _openInteresetNotional)]
328+func updateAmm (_qtAstR,_bsAstR,_baseAsstFndDeltAfter,_totalPositionSizeAfter,_cumulativeNotionalAfter,_openInteresetNotional) = [IntegerEntry(k_qtAstR, _qtAstR), IntegerEntry(k_bsAstR, _bsAstR), IntegerEntry(k_baseAsstFndDelt, _baseAsstFndDeltAfter), IntegerEntry(k_totalPositionSize, _totalPositionSizeAfter), IntegerEntry(k_cumulativeNotional, _cumulativeNotionalAfter), IntegerEntry(k_openInteresetNotional, _openInteresetNotional)]
326329
327330
328331 func deletePosition (_address) = [DeleteEntry(toCompositeKey(k_positionSize, _address)), DeleteEntry(toCompositeKey(k_positionMargin, _address)), DeleteEntry(toCompositeKey(k_pon, _address)), DeleteEntry(toCompositeKey(k_positionLstUpdCPF, _address))]
384387 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
385388 then throw("Invalid decreasePosition parameters")
386389 else {
387- let $t01412414276 = getPosition(toString(i.caller))
388- let oldPositionSize = $t01412414276._1
389- let oldPositionMargin = $t01412414276._2
390- let oldPositionOpenNotional = $t01412414276._3
391- let oldPositionLstUpdCPF = $t01412414276._4
390+ let $t01392314075 = getPosition(toString(i.caller))
391+ let oldPositionSize = $t01392314075._1
392+ let oldPositionMargin = $t01392314075._2
393+ let oldPositionOpenNotional = $t01392314075._3
394+ let oldPositionLstUpdCPF = $t01392314075._4
392395 let isNewPosition = (oldPositionSize == 0)
393396 let isSameDirection = if ((oldPositionSize > 0))
394397 then (_direction == DIR_LONG)
397400 then isSameDirection
398401 else false
399402 let isAdd = (_direction == DIR_LONG)
400- let $t01456517362 = if (if (isNewPosition)
403+ let $t01436417097 = if (if (isNewPosition)
401404 then true
402405 else expandExisting)
403406 then throw("Use increasePosition to open new or increase position")
404407 else {
405408 let openNotional = muld(_amount, _leverage)
406- let $t01504915148 = getPositionNotionalAndUnrealizedPnl(toString(i.caller))
407- let oldPositionNotional = $t01504915148._1
408- let unrealizedPnl = $t01504915148._2
409+ let $t01483214931 = getPositionNotionalAndUnrealizedPnl(toString(i.caller))
410+ let oldPositionNotional = $t01483214931._1
411+ let unrealizedPnl = $t01483214931._2
409412 if ((oldPositionNotional > openNotional))
410413 then {
411- let $t01521015469 = swapInput(isAdd, openNotional)
412- let exchangedPositionSize = $t01521015469._1
413- let qtAstRAfter = $t01521015469._2
414- let bsAstRAfter = $t01521015469._3
415- let baseAssetDeltaThisFundingPeriodAfter = $t01521015469._4
416- let totalPositionSizeAfter = $t01521015469._5
417- let cumulativeNotionalAfter = $t01521015469._6
414+ let $t01499315236 = swapInput(isAdd, openNotional)
415+ let exchangedPositionSize = $t01499315236._1
416+ let qtAstRAfter = $t01499315236._2
417+ let bsAstRAfter = $t01499315236._3
418+ let baseAsstFndDeltAfter = $t01499315236._4
419+ let totalPositionSizeAfter = $t01499315236._5
420+ let cumulativeNotionalAfter = $t01499315236._6
418421 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
419422 if (if ((_minBaseAssetAmount != 0))
420423 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
424427 let realizedPnl = if ((oldPositionSize != 0))
425428 then divd(muld(unrealizedPnl, exchangedPositionSizeAbs), oldPositionSize)
426429 else 0
427- let $t01601016281 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
428- let remainMargin = $t01601016281._1
429- let badDebt = $t01601016281._2
430- let fundingPayment = $t01601016281._3
431- let oldLatestCPF = $t01601016281._4
430+ let $t01577716048 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
431+ let remainMargin = $t01577716048._1
432+ let badDebt = $t01577716048._2
433+ let fundingPayment = $t01577716048._3
434+ let oldLatestCPF = $t01577716048._4
432435 let exchangedQuoteAssetAmount = openNotional
433436 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
434437 let remainOpenNotional = if ((oldPositionSize > 0))
435438 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
436439 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
437- $Tuple10((oldPositionSize + exchangedPositionSize), remainMargin, abs(remainOpenNotional), oldLatestCPF, bsAstRAfter, qtAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInteresetNotional() - openNotional))
440+ $Tuple10((oldPositionSize + exchangedPositionSize), remainMargin, abs(remainOpenNotional), oldLatestCPF, bsAstRAfter, qtAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInteresetNotional() - openNotional))
438441 }
439442 }
440443 else throw("Close position first")
441444 }
442- let newPositionSize = $t01456517362._1
443- let newPositionRemainMargin = $t01456517362._2
444- let newPosiionOpenNotional = $t01456517362._3
445- let newPositionLatestCPF = $t01456517362._4
446- let bsAstRAfter = $t01456517362._5
447- let qtAstRAfter = $t01456517362._6
448- let baseAssetDeltaThisFundingPeriodAfter = $t01456517362._7
449- let totalPositionSizeAfter = $t01456517362._8
450- let cumulativeNotionalAfter = $t01456517362._9
451- let openInteresetNotionalAfter = $t01456517362._10
452- (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPosiionOpenNotional, newPositionLatestCPF) ++ updateAmm(qtAstRAfter, bsAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter))
445+ let newPositionSize = $t01436417097._1
446+ let newPositionRemainMargin = $t01436417097._2
447+ let newPosiionOpenNotional = $t01436417097._3
448+ let newPositionLatestCPF = $t01436417097._4
449+ let bsAstRAfter = $t01436417097._5
450+ let qtAstRAfter = $t01436417097._6
451+ let baseAsstFndDeltAfter = $t01436417097._7
452+ let totalPositionSizeAfter = $t01436417097._8
453+ let cumulativeNotionalAfter = $t01436417097._9
454+ let openInteresetNotionalAfter = $t01436417097._10
455+ (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPosiionOpenNotional, newPositionLatestCPF) ++ updateAmm(qtAstRAfter, bsAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter))
453456 }
454457
455458
476479 else {
477480 let feeAmount = muld(_rawAmount, fee())
478481 let _amount = (_rawAmount - feeAmount)
479- let $t01835218504 = getPosition(toString(i.caller))
480- let oldPositionSize = $t01835218504._1
481- let oldPositionMargin = $t01835218504._2
482- let oldPositionOpenNotional = $t01835218504._3
483- let oldPositionLstUpdCPF = $t01835218504._4
482+ let $t01807118223 = getPosition(toString(i.caller))
483+ let oldPositionSize = $t01807118223._1
484+ let oldPositionMargin = $t01807118223._2
485+ let oldPositionOpenNotional = $t01807118223._3
486+ let oldPositionLstUpdCPF = $t01807118223._4
484487 let isNewPosition = (oldPositionSize == 0)
485488 let isSameDirection = if ((oldPositionSize > 0))
486489 then (_direction == DIR_LONG)
489492 then isSameDirection
490493 else false
491494 let isAdd = (_direction == DIR_LONG)
492- let $t01879320981 = if (if (isNewPosition)
495+ let $t01851220636 = if (if (isNewPosition)
493496 then true
494497 else expandExisting)
495498 then {
496499 let openNotional = muld(_amount, _leverage)
497- let $t01919519426 = swapInput(isAdd, openNotional)
498- let amountBaseAssetBought = $t01919519426._1
499- let qtAstRAfter = $t01919519426._2
500- let bsAstRAfter = $t01919519426._3
501- let baseAssetDeltaThisFundingPeriodAfter = $t01919519426._4
502- let totalPositionSizeAfter = $t01919519426._5
503- let cumulativeNotionalAfter = $t01919519426._6
500+ let $t01889819113 = swapInput(isAdd, openNotional)
501+ let amountBaseAssetBought = $t01889819113._1
502+ let qtAstRAfter = $t01889819113._2
503+ let bsAstRAfter = $t01889819113._3
504+ let baseAsstFndDeltAfter = $t01889819113._4
505+ let totalPositionSizeAfter = $t01889819113._5
506+ let cumulativeNotionalAfter = $t01889819113._6
504507 if (if ((_minBaseAssetAmount != 0))
505508 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
506509 else false)
508511 else {
509512 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
510513 let increaseMarginRequirement = divd(openNotional, _leverage)
511- let $t01980720060 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
512- let remainMargin = $t01980720060._1
513- let x1 = $t01980720060._2
514- let x2 = $t01980720060._3
515- let oldLatestCPF = $t01980720060._4
516- $Tuple10(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), oldLatestCPF, bsAstRAfter, qtAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInteresetNotional() + openNotional))
514+ let $t01949419747 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
515+ let remainMargin = $t01949419747._1
516+ let x1 = $t01949419747._2
517+ let x2 = $t01949419747._3
518+ let oldLatestCPF = $t01949419747._4
519+ $Tuple10(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), oldLatestCPF, bsAstRAfter, qtAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInteresetNotional() + openNotional))
517520 }
518521 }
519522 else {
520523 let openNotional = muld(_amount, _leverage)
521- let $t02069120790 = getPositionNotionalAndUnrealizedPnl(toString(i.caller))
522- let oldPositionNotional = $t02069120790._1
523- let unrealizedPnl = $t02069120790._2
524+ let $t02034620445 = getPositionNotionalAndUnrealizedPnl(toString(i.caller))
525+ let oldPositionNotional = $t02034620445._1
526+ let unrealizedPnl = $t02034620445._2
524527 if ((oldPositionNotional > openNotional))
525528 then throw("Use decreasePosition to decrease position size")
526529 else throw("Close position first")
527530 }
528- let newPositionSize = $t01879320981._1
529- let newPositionRemainMargin = $t01879320981._2
530- let newPosiionOpenNotional = $t01879320981._3
531- let newPositionLatestCPF = $t01879320981._4
532- let bsAstRAfter = $t01879320981._5
533- let qtAstRAfter = $t01879320981._6
534- let baseAssetDeltaThisFundingPeriodAfter = $t01879320981._7
535- let totalPositionSizeAfter = $t01879320981._8
536- let cumulativeNotionalAfter = $t01879320981._9
537- let openInteresetNotionalAfter = $t01879320981._10
531+ let newPositionSize = $t01851220636._1
532+ let newPositionRemainMargin = $t01851220636._2
533+ let newPosiionOpenNotional = $t01851220636._3
534+ let newPositionLatestCPF = $t01851220636._4
535+ let bsAstRAfter = $t01851220636._5
536+ let qtAstRAfter = $t01851220636._6
537+ let baseAsstFndDeltAfter = $t01851220636._7
538+ let totalPositionSizeAfter = $t01851220636._8
539+ let cumulativeNotionalAfter = $t01851220636._9
540+ let openInteresetNotionalAfter = $t01851220636._10
538541 let stake = invoke(USDN_STAKING, "lockNeutrino", nil, [AttachedPayment(USDN, _amount)])
539542 if ((stake == stake))
540- then (((updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPosiionOpenNotional, newPositionLatestCPF) ++ updateAmm(qtAstRAfter, bsAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ transferFee(feeAmount)) ++ upblc((cbalance() + _amount)))
543+ then (((updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPosiionOpenNotional, newPositionLatestCPF) ++ updateAmm(qtAstRAfter, bsAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ transferFee(feeAmount)) ++ upblc((cbalance() + _amount)))
541544 else throw("Strict value is not equal to itself.")
542545 }
543546 }
554557 else {
555558 let feeAmount = muld(_rawAmount, fee())
556559 let _amount = (_rawAmount - feeAmount)
557- let $t02188322035 = getPosition(toString(i.caller))
558- let oldPositionSize = $t02188322035._1
559- let oldPositionMargin = $t02188322035._2
560- let oldPositionOpenNotional = $t02188322035._3
561- let oldPositionLstUpdCPF = $t02188322035._4
560+ let $t02152221674 = getPosition(toString(i.caller))
561+ let oldPositionSize = $t02152221674._1
562+ let oldPositionMargin = $t02152221674._2
563+ let oldPositionOpenNotional = $t02152221674._3
564+ let oldPositionLstUpdCPF = $t02152221674._4
562565 let stake = invoke(USDN_STAKING, "lockNeutrino", nil, [AttachedPayment(USDN, _amount)])
563566 if ((stake == stake))
564567 then ((updatePosition(toString(i.caller), oldPositionSize, (oldPositionMargin + i.payments[0].amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeAmount)) ++ upblc((cbalance() + _amount)))
574577 else !(requireOpenPosition(toString(i.caller))))
575578 then throw("Invalid removeMargin parameters")
576579 else {
577- let $t02262122773 = getPosition(toString(i.caller))
578- let oldPositionSize = $t02262122773._1
579- let oldPositionMargin = $t02262122773._2
580- let oldPositionOpenNotional = $t02262122773._3
581- let oldPositionLstUpdCPF = $t02262122773._4
580+ let $t02226022412 = getPosition(toString(i.caller))
581+ let oldPositionSize = $t02226022412._1
582+ let oldPositionMargin = $t02226022412._2
583+ let oldPositionOpenNotional = $t02226022412._3
584+ let oldPositionLstUpdCPF = $t02226022412._4
582585 let marginDelta = -(_amount)
583- let $t02281023005 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
584- let remainMargin = $t02281023005._1
585- let badDebt = $t02281023005._2
586- let x1 = $t02281023005._3
587- let latestCPF1 = $t02281023005._4
586+ let $t02244922644 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
587+ let remainMargin = $t02244922644._1
588+ let badDebt = $t02244922644._2
589+ let x1 = $t02244922644._3
590+ let latestCPF1 = $t02244922644._4
588591 if ((badDebt != 0))
589592 then throw("Invalid added margin amount")
590593 else {
601604 func closePosition () = if (!(requireOpenPosition(toString(i.caller))))
602605 then throw("Invalid closePosition parameters")
603606 else {
604- let $t02365524003 = internalClosePosition(toString(i.caller))
605- let x1 = $t02365524003._1
606- let badDebt = $t02365524003._2
607- let realizedPnl = $t02365524003._3
608- let marginToVault = $t02365524003._4
609- let quoteAssetReserveAfter = $t02365524003._5
610- let bsAstRAfter = $t02365524003._6
611- let baseAssetDeltaThisFundingPeriodAfter = $t02365524003._7
612- let totalPositionSizeAfter = $t02365524003._8
613- let cumulativeNotionalAfter = $t02365524003._9
614- let openInteresetNotionalAfter = $t02365524003._10
607+ let $t02329423626 = internalClosePosition(toString(i.caller))
608+ let x1 = $t02329423626._1
609+ let badDebt = $t02329423626._2
610+ let realizedPnl = $t02329423626._3
611+ let marginToVault = $t02329423626._4
612+ let quoteAssetReserveAfter = $t02329423626._5
613+ let bsAstRAfter = $t02329423626._6
614+ let baseAsstFndDeltAfter = $t02329423626._7
615+ let totalPositionSizeAfter = $t02329423626._8
616+ let cumulativeNotionalAfter = $t02329423626._9
617+ let openInteresetNotionalAfter = $t02329423626._10
615618 if ((badDebt > 0))
616619 then throw("Unable to close position with bad debt")
617620 else {
618621 let withdrawAmount = abs(marginToVault)
619622 let bd = (cbalance() - withdrawAmount)
620- let $t02419624292 = if ((0 > bd))
623+ let $t02381923915 = if ((0 > bd))
621624 then $Tuple2(0, abs(bd))
622625 else $Tuple2(bd, 0)
623- let nb = $t02419624292._1
624- let fromi = $t02419624292._2
626+ let nb = $t02381923915._1
627+ let fromi = $t02381923915._2
625628 let x = if ((fromi > 0))
626629 then {
627630 let withdrawInsurance = invoke(INSURANCE_ADDRESS, "withdraw", [fromi], nil)
634637 then {
635638 let unstake = invoke(USDN_STAKING, "unlockNeutrino", [(withdrawAmount - fromi), toBase58String(USDN)], nil)
636639 if ((unstake == unstake))
637- then (((deletePosition(toString(i.caller)) ++ updateAmm(quoteAssetReserveAfter, bsAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ withdraw(i.caller, withdrawAmount)) ++ upblc(nb))
640+ then (((deletePosition(toString(i.caller)) ++ updateAmm(quoteAssetReserveAfter, bsAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ withdraw(i.caller, withdrawAmount)) ++ upblc(nb))
638641 else throw("Strict value is not equal to itself.")
639642 }
640643 else throw("Strict value is not equal to itself.")
649652 else !(initialized()))
650653 then throw("Unable to liquidate")
651654 else {
652- let $t02524625566 = internalClosePosition(_trader)
653- let x1 = $t02524625566._1
654- let badDebt = $t02524625566._2
655- let x2 = $t02524625566._3
656- let marginToVault = $t02524625566._4
657- let quoteAssetReserveAfter = $t02524625566._5
658- let bsAstRAfter = $t02524625566._6
659- let baseAssetDeltaThisFundingPeriodAfter = $t02524625566._7
660- let totalPositionSizeAfter = $t02524625566._8
661- let cumulativeNotionalAfter = $t02524625566._9
662- let openInteresetNotionalAfter = $t02524625566._10
663- let exchangedQuoteAssetAmount = $t02524625566._11
655+ let $t02485325157 = internalClosePosition(_trader)
656+ let x1 = $t02485325157._1
657+ let badDebt = $t02485325157._2
658+ let x2 = $t02485325157._3
659+ let marginToVault = $t02485325157._4
660+ let quoteAssetReserveAfter = $t02485325157._5
661+ let bsAstRAfter = $t02485325157._6
662+ let baseAsstFndDeltAfter = $t02485325157._7
663+ let totalPositionSizeAfter = $t02485325157._8
664+ let cumulativeNotionalAfter = $t02485325157._9
665+ let openInteresetNotionalAfter = $t02485325157._10
666+ let exchangedQuoteAssetAmount = $t02485325157._11
664667 let feeToLiquidator = (muld(exchangedQuoteAssetAmount, liquidationFeeRatio()) / 2)
665- let $t02565626060 = if ((feeToLiquidator > marginToVault))
668+ let $t02524725651 = if ((feeToLiquidator > marginToVault))
666669 then $Tuple3((feeToLiquidator - marginToVault), marginToVault, ((badDebt + feeToLiquidator) - marginToVault))
667670 else $Tuple3(0, (marginToVault - feeToLiquidator), badDebt)
668- let liquidationBadDebt = $t02565626060._1
669- let remainMargin = $t02565626060._2
670- let totalBadDebt = $t02565626060._3
671+ let liquidationBadDebt = $t02524725651._1
672+ let remainMargin = $t02524725651._2
673+ let totalBadDebt = $t02524725651._3
671674 let bd = (cbalance() - feeToLiquidator)
672- let $t02610826196 = if ((0 > bd))
675+ let $t02569925787 = if ((0 > bd))
673676 then $Tuple2(0, abs(bd))
674677 else $Tuple2(bd, 0)
675- let nb = $t02610826196._1
676- let fromi = $t02610826196._2
678+ let nb = $t02569925787._1
679+ let fromi = $t02569925787._2
677680 let x = if ((fromi > 0))
678681 then {
679682 let withdrawInsurance = invoke(INSURANCE_ADDRESS, "withdraw", [fromi], nil)
686689 then {
687690 let unstake = invoke(USDN_STAKING, "unlockNeutrino", [(feeToLiquidator - fromi), toBase58String(USDN)], nil)
688691 if ((unstake == unstake))
689- then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, bsAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ upblc(nb))
692+ then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, bsAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ upblc(nb))
690693 else throw("Strict value is not equal to itself.")
691694 }
692695 else throw("Strict value is not equal to itself.")
738741
739742
740743 @Callable(i)
741-func view_getMarginRatio (_trader) = throw(toString(getMarginRatio(_trader)))
744+func v_close (_trader) = {
745+ let $t02821428292 = internalClosePosition(_trader)
746+ let x1 = $t02821428292._1
747+ let x2 = $t02821428292._2
748+ let x3 = $t02821428292._3
749+ let x4 = $t02821428292._4
750+ let x5 = $t02821428292._5
751+ let x6 = $t02821428292._6
752+ let x7 = $t02821428292._7
753+ let x8 = $t02821428292._8
754+ let x9 = $t02821428292._9
755+ let x10 = $t02821428292._10
756+ throw(((s(x2) + s(x3)) + s(x4)))
757+ }
742758
743759
744760 @Verifier(tx)
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 = "k_ora"
77
88 let k_balance = "k_balance"
99
1010 let k_positionSize = "k_positionSize"
1111
1212 let k_positionMargin = "k_positionMargin"
1313
1414 let k_pon = "k_positionOpenNotional"
1515
1616 let k_positionLstUpdCPF = "k_positionFraction"
1717
1818 let k_initialized = "k_initialized"
1919
2020 let k_fee = "k_fee"
2121
2222 let k_fundingPeriod = "k_fundingPeriod"
2323
2424 let k_initMarginRatio = "k_initMarginRatio"
2525
2626 let k_mmr = "k_mmr"
2727
2828 let k_liquidationFeeRatio = "k_liquidationFeeRatio"
2929
3030 let k_latestCPF = "k_latestPremiumFraction"
3131
3232 let k_nextFundingBlock = "k_nextFundingBlockMinTimestamp"
3333
3434 let k_fundingRate = "k_fundingRate"
3535
3636 let k_qtAstR = "k_qtAstR"
3737
3838 let k_bsAstR = "k_bsAstR"
3939
40-let k_baseAssetDeltaThisFundingPeriod = "k_baseAssetDelta"
40+let k_baseAsstFndDelt = "k_baseAssetDelta"
4141
4242 let k_totalPositionSize = "k_totalPositionSize"
4343
4444 let k_cumulativeNotional = "k_cumulativeNotional"
4545
4646 let k_openInteresetNotional = "k_openInteresetNotional"
4747
4848 let ADMIN_ADDRESS = Address(base58'3Mz1td457M34EA7wU1swt2DBQDZEDpsMtgE')
4949
5050 let ADMIN_PUBLIC_KEY = base58'DKoVYQRirYnan4ojiUkT12oE6XmpyNoht3ZcecUpgLsf'
5151
5252 let USDN = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
5353
5454 let USDN_STAKING = Address(base58'3N9LkJahTMx41wGhSxLS42prCZtRCp4dhTs')
5555
5656 let FEES_ACCOUNT = Address(base58'3MseEJNEHkYhvcHre6Mann1F8e27S1qptdg')
5757
5858 let INSURANCE_ADDRESS = Address(base58'3N2qeokoCMkNrCkh5EFfZMFYN7Krun5ZFxJ')
5959
6060 let DIR_LONG = 1
6161
6262 let DIR_SHORT = 2
6363
6464 let FUNDING_BLOCK_INTERVAL = 60
6565
6666 let SECONDS = 1000
6767
6868 let DECIMAL_UNIT = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
6969
7070 let ONE_DAY = (86400 * DECIMAL_UNIT)
71+
72+func s (_x) = (toString(_x) + ",")
73+
7174
7275 func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN)
7376
7477
7578 func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN)
7679
7780
7881 func abs (_x) = if ((_x > 0))
7982 then _x
8083 else -(_x)
8184
8285
8386 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
8487
8588
8689 func requireMoreMarginRatio (_marginRatio,_baseMarginRatio,_largerThanOrEqualTo) = {
8790 let remainingMarginRatio = (_marginRatio - _baseMarginRatio)
8891 if (if (_largerThanOrEqualTo)
8992 then (0 > remainingMarginRatio)
9093 else false)
9194 then throw("Invalid margin")
9295 else if (if (!(_largerThanOrEqualTo))
9396 then (remainingMarginRatio >= 0)
9497 else false)
9598 then throw("Invalid margin")
9699 else true
97100 }
98101
99102
100103 func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k))
101104
102105
103106 func cbalance () = int(k_balance)
104107
105108
106109 func fee () = int(k_fee)
107110
108111
109112 func initMarginRatio () = int(k_initMarginRatio)
110113
111114
112115 func qtAstR () = int(k_qtAstR)
113116
114117
115118 func bsAstR () = int(k_bsAstR)
116119
117120
118-func baseAssetDeltaThisFundingPeriod () = int(k_baseAssetDeltaThisFundingPeriod)
121+func baseAsstFndDelt () = int(k_baseAsstFndDelt)
119122
120123
121124 func totalPositionSize () = int(k_totalPositionSize)
122125
123126
124127 func cumulativeNotional () = int(k_cumulativeNotional)
125128
126129
127130 func latestCPF () = int(k_latestCPF)
128131
129132
130133 func openInteresetNotional () = int(k_openInteresetNotional)
131134
132135
133136 func nextFundingBlockTimestamp () = int(k_nextFundingBlock)
134137
135138
136139 func fundingPeriodRaw () = int(k_fundingPeriod)
137140
138141
139142 func fundingPeriodDecimal () = (fundingPeriodRaw() * DECIMAL_UNIT)
140143
141144
142145 func fundingPeriodSeconds () = (fundingPeriodRaw() * SECONDS)
143146
144147
145148 func mmr () = int(k_mmr)
146149
147150
148151 func liquidationFeeRatio () = int(k_liquidationFeeRatio)
149152
150153
151154 func getPosition (invesor) = {
152155 let positionSizeOpt = getInteger(this, toCompositeKey(k_positionSize, invesor))
153156 match positionSizeOpt {
154157 case positionSize: Int =>
155158 $Tuple4(positionSize, getIntegerValue(this, toCompositeKey(k_positionMargin, invesor)), getIntegerValue(this, toCompositeKey(k_pon, invesor)), getIntegerValue(this, toCompositeKey(k_positionLstUpdCPF, invesor)))
156159 case _ =>
157160 $Tuple4(0, 0, 0, 0)
158161 }
159162 }
160163
161164
162165 func requireOpenPosition (_trader) = {
163- let $t039624073 = getPosition(_trader)
164- let positionSize = $t039624073._1
165- let positionMargin = $t039624073._2
166- let pon = $t039624073._3
167- let positionLstUpdCPF = $t039624073._4
166+ let $t039534064 = getPosition(_trader)
167+ let positionSize = $t039534064._1
168+ let positionMargin = $t039534064._2
169+ let pon = $t039534064._3
170+ let positionLstUpdCPF = $t039534064._4
168171 if ((positionSize == 0))
169172 then throw("No open position")
170173 else true
171174 }
172175
173176
174177 func initialized () = valueOrElse(getBoolean(this, k_initialized), false)
175178
176179
177180 func updateReserve (_isAdd,_quoteAssetAmount,_baseAssetAmount) = if (_isAdd)
178- then $Tuple5((qtAstR() + _quoteAssetAmount), (bsAstR() - _baseAssetAmount), (baseAssetDeltaThisFundingPeriod() - _baseAssetAmount), (totalPositionSize() + _baseAssetAmount), (cumulativeNotional() + _quoteAssetAmount))
179- else $Tuple5((qtAstR() - _quoteAssetAmount), (bsAstR() + _baseAssetAmount), (baseAssetDeltaThisFundingPeriod() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount), (cumulativeNotional() - _quoteAssetAmount))
181+ then $Tuple5((qtAstR() + _quoteAssetAmount), (bsAstR() - _baseAssetAmount), (baseAsstFndDelt() - _baseAssetAmount), (totalPositionSize() + _baseAssetAmount), (cumulativeNotional() + _quoteAssetAmount))
182+ else $Tuple5((qtAstR() - _quoteAssetAmount), (bsAstR() + _baseAssetAmount), (baseAsstFndDelt() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount), (cumulativeNotional() - _quoteAssetAmount))
180183
181184
182185 func swapInput (_isAdd,_quoteAssetAmoun) = {
183186 let _qtAstR = qtAstR()
184187 let _bsAstR = bsAstR()
185188 let k = muld(_qtAstR, _bsAstR)
186189 let qtAstRAfter = if (_isAdd)
187190 then (_qtAstR + _quoteAssetAmoun)
188191 else (_qtAstR - _quoteAssetAmoun)
189192 let bsAstRAfter = divd(k, qtAstRAfter)
190193 let amountBaseAssetBoughtAbs = abs((bsAstRAfter - _bsAstR))
191194 let amountBaseAssetBought = if (_isAdd)
192195 then amountBaseAssetBoughtAbs
193196 else -(amountBaseAssetBoughtAbs)
194- let $t053615575 = updateReserve(_isAdd, _quoteAssetAmoun, amountBaseAssetBoughtAbs)
195- let qtAstRAfter1 = $t053615575._1
196- let bsAstRAfter1 = $t053615575._2
197- let baseAssetDeltaThisFundingPeriodAfter1 = $t053615575._3
198- let totalPositionSizeAfter1 = $t053615575._4
199- let cumulativeNotionalAfter1 = $t053615575._5
200- $Tuple6(amountBaseAssetBought, qtAstRAfter1, bsAstRAfter1, baseAssetDeltaThisFundingPeriodAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
197+ let $t053205518 = updateReserve(_isAdd, _quoteAssetAmoun, amountBaseAssetBoughtAbs)
198+ let qtAstRAfter1 = $t053205518._1
199+ let bsAstRAfter1 = $t053205518._2
200+ let baseAsstFndDeltAfter1 = $t053205518._3
201+ let totalPositionSizeAfter1 = $t053205518._4
202+ let cumulativeNotionalAfter1 = $t053205518._5
203+ $Tuple6(amountBaseAssetBought, qtAstRAfter1, bsAstRAfter1, baseAsstFndDeltAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
201204 }
202205
203206
204207 func calcRemainMarginWithFundingPayment (_oldPositionSize,_oldPositionMargin,_oldPositionLstUpdCPF,_marginDelta) = {
205208 let _latestCPF = latestCPF()
206209 let fundingPayment = if ((_oldPositionSize != 0))
207210 then muld((_latestCPF - _oldPositionLstUpdCPF), _oldPositionSize)
208211 else 0
209212 let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin)
210- let $t061656292 = if ((0 > signedMargin))
213+ let $t060926219 = if ((0 > signedMargin))
211214 then $Tuple2(0, abs(signedMargin))
212215 else $Tuple2(abs(signedMargin), 0)
213- let remainMargin = $t061656292._1
214- let badDebt = $t061656292._2
216+ let remainMargin = $t060926219._1
217+ let badDebt = $t060926219._2
215218 $Tuple4(remainMargin, badDebt, fundingPayment, _latestCPF)
216219 }
217220
218221
219222 func getOutputPriceWithReserves (_add,_baseAssetAmount,_quoteAssetPoolAmount,_baseAssetPoolAmount) = if ((_baseAssetAmount == 0))
220223 then throw("Invalid base asset amount")
221224 else {
222225 let k = muld(_quoteAssetPoolAmount, _baseAssetPoolAmount)
223226 let baseAssetPoolAmountAfter = if (_add)
224227 then (_baseAssetPoolAmount + _baseAssetAmount)
225228 else (_baseAssetPoolAmount - _baseAssetAmount)
226229 let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter)
227230 let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetPoolAmount))
228- let $t069417156 = updateReserve(!(_add), quoteAssetSold, _baseAssetAmount)
229- let qtAstRAfter1 = $t069417156._1
230- let bsAstRAfter1 = $t069417156._2
231- let baseAssetDeltaThisFundingPeriodAfter1 = $t069417156._3
232- let totalPositionSizeAfter1 = $t069417156._4
233- let cumulativeNotionalAfter1 = $t069417156._5
234- $Tuple6(quoteAssetSold, qtAstRAfter1, bsAstRAfter1, baseAssetDeltaThisFundingPeriodAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
231+ let $t068687067 = updateReserve(!(_add), quoteAssetSold, _baseAssetAmount)
232+ let qtAstRAfter1 = $t068687067._1
233+ let bsAstRAfter1 = $t068687067._2
234+ let baseAsstFndDeltAfter1 = $t068687067._3
235+ let totalPositionSizeAfter1 = $t068687067._4
236+ let cumulativeNotionalAfter1 = $t068687067._5
237+ $Tuple6(quoteAssetSold, qtAstRAfter1, bsAstRAfter1, baseAsstFndDeltAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1)
235238 }
236239
237240
238241 func getPositionNotionalAndUnrealizedPnl (_trader) = {
239- let $t074107521 = getPosition(_trader)
240- let positionSize = $t074107521._1
241- let positionMargin = $t074107521._2
242- let pon = $t074107521._3
243- let positionLstUpdCPF = $t074107521._4
242+ let $t073057416 = getPosition(_trader)
243+ let positionSize = $t073057416._1
244+ let positionMargin = $t073057416._2
245+ let pon = $t073057416._3
246+ let positionLstUpdCPF = $t073057416._4
244247 let positionSizeAbs = abs(positionSize)
245248 if ((positionSizeAbs == 0))
246249 then throw("Invalid position size")
247250 else {
248251 let isShort = (0 > positionSize)
249- let $t076987848 = getOutputPriceWithReserves(!(isShort), positionSizeAbs, qtAstR(), bsAstR())
250- let positionNotional = $t076987848._1
251- let x1 = $t076987848._2
252- let x2 = $t076987848._3
253- let x3 = $t076987848._4
252+ let $t075937743 = getOutputPriceWithReserves(!(isShort), positionSizeAbs, qtAstR(), bsAstR())
253+ let positionNotional = $t075937743._1
254+ let x1 = $t075937743._2
255+ let x2 = $t075937743._3
256+ let x3 = $t075937743._4
254257 let unrealizedPnl = if (isShort)
255258 then (pon - positionNotional)
256259 else (positionNotional - pon)
257260 $Tuple2(positionNotional, unrealizedPnl)
258261 }
259262 }
260263
261264
262265 func getOracleTwapPrice () = {
263266 let oracle = valueOrErrorMessage(addressFromString(getStringValue(this, k_ora)), "")
264267 let priceKey = getStringValue(this, k_ora_key)
265268 getIntegerValue(oracle, priceKey)
266269 }
267270
268271
269272 func getTwapSpotPrice () = divd(qtAstR(), bsAstR())
270273
271274
272275 func getMarginRatio (_trader) = {
273- let $t083588469 = getPosition(_trader)
274- let positionSize = $t083588469._1
275- let positionMargin = $t083588469._2
276- let pon = $t083588469._3
277- let positionLstUpdCPF = $t083588469._4
278- let $t084758559 = getPositionNotionalAndUnrealizedPnl(_trader)
279- let positionNotional = $t084758559._1
280- let unrealizedPnl = $t084758559._2
281- let $t085648730 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
282- let remainMargin = $t085648730._1
283- let badDebt = $t085648730._2
276+ let $t082538364 = getPosition(_trader)
277+ let positionSize = $t082538364._1
278+ let positionMargin = $t082538364._2
279+ let pon = $t082538364._3
280+ let positionLstUpdCPF = $t082538364._4
281+ let $t083708454 = getPositionNotionalAndUnrealizedPnl(_trader)
282+ let positionNotional = $t083708454._1
283+ let unrealizedPnl = $t083708454._2
284+ let $t084598625 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
285+ let remainMargin = $t084598625._1
286+ let badDebt = $t084598625._2
284287 divd((remainMargin - badDebt), positionNotional)
285288 }
286289
287290
288291 func internalClosePosition (_trader) = {
289- let $t088378948 = getPosition(_trader)
290- let positionSize = $t088378948._1
291- let positionMargin = $t088378948._2
292- let pon = $t088378948._3
293- let positionLstUpdCPF = $t088378948._4
294- let $t089549024 = getPositionNotionalAndUnrealizedPnl(_trader)
295- let x1 = $t089549024._1
296- let unrealizedPnl = $t089549024._2
297- let $t090299201 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
298- let remainMargin = $t090299201._1
299- let badDebt = $t090299201._2
300- let x2 = $t090299201._3
292+ let $t087328843 = getPosition(_trader)
293+ let positionSize = $t087328843._1
294+ let positionMargin = $t087328843._2
295+ let pon = $t087328843._3
296+ let positionLstUpdCPF = $t087328843._4
297+ let $t088498919 = getPositionNotionalAndUnrealizedPnl(_trader)
298+ let x1 = $t088498919._1
299+ let unrealizedPnl = $t088498919._2
300+ let $t089249096 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl)
301+ let remainMargin = $t089249096._1
302+ let badDebt = $t089249096._2
303+ let x2 = $t089249096._3
301304 let exchangedPositionSize = -(positionSize)
302305 let realizedPnl = unrealizedPnl
303306 let marginToVault = -(remainMargin)
304- let $t093289651 = getOutputPriceWithReserves((positionSize > 0), abs(positionSize), qtAstR(), bsAstR())
305- let exchangedQuoteAssetAmount = $t093289651._1
306- let quoteAssetReserveAfter = $t093289651._2
307- let bsAstRAfter = $t093289651._3
308- let baseAssetDeltaThisFundingPeriodAfter = $t093289651._4
309- let totalPositionSizeAfter = $t093289651._5
310- let cumulativeNotionalAfter = $t093289651._6
307+ let $t092239530 = getOutputPriceWithReserves((positionSize > 0), abs(positionSize), qtAstR(), bsAstR())
308+ let exchangedQuoteAssetAmount = $t092239530._1
309+ let quoteAssetReserveAfter = $t092239530._2
310+ let bsAstRAfter = $t092239530._3
311+ let baseAsstFndDeltAfter = $t092239530._4
312+ let totalPositionSizeAfter = $t092239530._5
313+ let cumulativeNotionalAfter = $t092239530._6
311314 let openInteresetNotionalAfter = (openInteresetNotional() - pon)
312- $Tuple11(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, bsAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter, exchangedQuoteAssetAmount)
315+ $Tuple11(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, bsAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter, exchangedQuoteAssetAmount)
313316 }
314317
315318
316319 func updateSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee) = [IntegerEntry(k_initMarginRatio, _initMarginRatio), IntegerEntry(k_mmr, _mmr), IntegerEntry(k_liquidationFeeRatio, _liquidationFeeRatio), IntegerEntry(k_fundingPeriod, _fundingPeriod), IntegerEntry(k_fee, _fee)]
317320
318321
319-func updateFunding (_baseADTFP,_nextFundingBlock,_latestCPF,_fundingRate) = [IntegerEntry(k_baseAssetDeltaThisFundingPeriod, _baseADTFP), IntegerEntry(k_nextFundingBlock, _nextFundingBlock), IntegerEntry(k_latestCPF, _latestCPF), IntegerEntry(k_fundingRate, _fundingRate)]
322+func updateFunding (_baseADTFP,_nextFundingBlock,_latestCPF,_fundingRate) = [IntegerEntry(k_baseAsstFndDelt, _baseADTFP), IntegerEntry(k_nextFundingBlock, _nextFundingBlock), IntegerEntry(k_latestCPF, _latestCPF), IntegerEntry(k_fundingRate, _fundingRate)]
320323
321324
322325 func updatePosition (_address,_size,_margin,_openNotinal,_LstUpdCPF) = [IntegerEntry(toCompositeKey(k_positionSize, _address), _size), IntegerEntry(toCompositeKey(k_positionMargin, _address), _margin), IntegerEntry(toCompositeKey(k_pon, _address), _openNotinal), IntegerEntry(toCompositeKey(k_positionLstUpdCPF, _address), _LstUpdCPF)]
323326
324327
325-func updateAmm (_qtAstR,_bsAstR,_baseAssetDeltaThisFundingPeriodAfter,_totalPositionSizeAfter,_cumulativeNotionalAfter,_openInteresetNotional) = [IntegerEntry(k_qtAstR, _qtAstR), IntegerEntry(k_bsAstR, _bsAstR), IntegerEntry(k_baseAssetDeltaThisFundingPeriod, _baseAssetDeltaThisFundingPeriodAfter), IntegerEntry(k_totalPositionSize, _totalPositionSizeAfter), IntegerEntry(k_cumulativeNotional, _cumulativeNotionalAfter), IntegerEntry(k_openInteresetNotional, _openInteresetNotional)]
328+func updateAmm (_qtAstR,_bsAstR,_baseAsstFndDeltAfter,_totalPositionSizeAfter,_cumulativeNotionalAfter,_openInteresetNotional) = [IntegerEntry(k_qtAstR, _qtAstR), IntegerEntry(k_bsAstR, _bsAstR), IntegerEntry(k_baseAsstFndDelt, _baseAsstFndDeltAfter), IntegerEntry(k_totalPositionSize, _totalPositionSizeAfter), IntegerEntry(k_cumulativeNotional, _cumulativeNotionalAfter), IntegerEntry(k_openInteresetNotional, _openInteresetNotional)]
326329
327330
328331 func deletePosition (_address) = [DeleteEntry(toCompositeKey(k_positionSize, _address)), DeleteEntry(toCompositeKey(k_positionMargin, _address)), DeleteEntry(toCompositeKey(k_pon, _address)), DeleteEntry(toCompositeKey(k_positionLstUpdCPF, _address))]
329332
330333
331334 func withdraw (_address,_amount) = {
332335 let balance = assetBalance(this, USDN)
333336 if ((_amount > balance))
334337 then throw(((("Unable to withdraw " + toString(_amount)) + " from contract balance ") + toString(balance)))
335338 else [ScriptTransfer(_address, _amount, USDN)]
336339 }
337340
338341
339342 func writeConstants () = [StringEntry("ADMIN_ADDRESS", toString(ADMIN_ADDRESS)), StringEntry("USDN", toBase58String(USDN)), StringEntry("USDN_STAKING", toString(USDN_STAKING))]
340343
341344
342345 func upblc (i) = if ((0 > i))
343346 then throw("Balance")
344347 else [IntegerEntry(k_balance, i)]
345348
346349
347350 func transferFee (i) = [ScriptTransfer(FEES_ACCOUNT, i, USDN)]
348351
349352
350353 @Callable(i)
351354 func initialize (_qtAstR,_bsAstR,_fundingPeriod,_initMarginRatio,_mmr,_liquidationFeeRatio,_fee,_oracle,_oracleKey) = if (if (if (if (if (if (if (if ((0 >= _qtAstR))
352355 then true
353356 else (0 >= _bsAstR))
354357 then true
355358 else (0 >= _fundingPeriod))
356359 then true
357360 else (0 >= _initMarginRatio))
358361 then true
359362 else (0 >= _mmr))
360363 then true
361364 else (0 >= _liquidationFeeRatio))
362365 then true
363366 else (i.caller != ADMIN_ADDRESS))
364367 then true
365368 else initialized())
366369 then throw("Invalid initialize parameters")
367370 else (((((updateAmm(_qtAstR, _bsAstR, 0, 0, 0, 0) ++ updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee)) ++ updateFunding(0, (lastBlock.timestamp + _fundingPeriod), 0, 0)) ++ upblc(0)) ++ writeConstants()) ++ [BooleanEntry(k_initialized, true), StringEntry(k_ora, _oracle), StringEntry(k_ora_key, _oracleKey)])
368371
369372
370373
371374 @Callable(i)
372375 func decreasePosition (_direction,_amount,_leverage,_minBaseAssetAmount) = if (if (if (if (if (if ((_direction != DIR_LONG))
373376 then (_direction != DIR_SHORT)
374377 else false)
375378 then true
376379 else (0 >= _amount))
377380 then true
378381 else if (((1 * DECIMAL_UNIT) > _leverage))
379382 then true
380383 else (_leverage > (3 * DECIMAL_UNIT)))
381384 then true
382385 else !(initialized()))
383386 then true
384387 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
385388 then throw("Invalid decreasePosition parameters")
386389 else {
387- let $t01412414276 = getPosition(toString(i.caller))
388- let oldPositionSize = $t01412414276._1
389- let oldPositionMargin = $t01412414276._2
390- let oldPositionOpenNotional = $t01412414276._3
391- let oldPositionLstUpdCPF = $t01412414276._4
390+ let $t01392314075 = getPosition(toString(i.caller))
391+ let oldPositionSize = $t01392314075._1
392+ let oldPositionMargin = $t01392314075._2
393+ let oldPositionOpenNotional = $t01392314075._3
394+ let oldPositionLstUpdCPF = $t01392314075._4
392395 let isNewPosition = (oldPositionSize == 0)
393396 let isSameDirection = if ((oldPositionSize > 0))
394397 then (_direction == DIR_LONG)
395398 else (_direction == DIR_SHORT)
396399 let expandExisting = if (!(isNewPosition))
397400 then isSameDirection
398401 else false
399402 let isAdd = (_direction == DIR_LONG)
400- let $t01456517362 = if (if (isNewPosition)
403+ let $t01436417097 = if (if (isNewPosition)
401404 then true
402405 else expandExisting)
403406 then throw("Use increasePosition to open new or increase position")
404407 else {
405408 let openNotional = muld(_amount, _leverage)
406- let $t01504915148 = getPositionNotionalAndUnrealizedPnl(toString(i.caller))
407- let oldPositionNotional = $t01504915148._1
408- let unrealizedPnl = $t01504915148._2
409+ let $t01483214931 = getPositionNotionalAndUnrealizedPnl(toString(i.caller))
410+ let oldPositionNotional = $t01483214931._1
411+ let unrealizedPnl = $t01483214931._2
409412 if ((oldPositionNotional > openNotional))
410413 then {
411- let $t01521015469 = swapInput(isAdd, openNotional)
412- let exchangedPositionSize = $t01521015469._1
413- let qtAstRAfter = $t01521015469._2
414- let bsAstRAfter = $t01521015469._3
415- let baseAssetDeltaThisFundingPeriodAfter = $t01521015469._4
416- let totalPositionSizeAfter = $t01521015469._5
417- let cumulativeNotionalAfter = $t01521015469._6
414+ let $t01499315236 = swapInput(isAdd, openNotional)
415+ let exchangedPositionSize = $t01499315236._1
416+ let qtAstRAfter = $t01499315236._2
417+ let bsAstRAfter = $t01499315236._3
418+ let baseAsstFndDeltAfter = $t01499315236._4
419+ let totalPositionSizeAfter = $t01499315236._5
420+ let cumulativeNotionalAfter = $t01499315236._6
418421 let exchangedPositionSizeAbs = abs(exchangedPositionSize)
419422 if (if ((_minBaseAssetAmount != 0))
420423 then (_minBaseAssetAmount > exchangedPositionSizeAbs)
421424 else false)
422425 then throw(((("Too little basse asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount)))
423426 else {
424427 let realizedPnl = if ((oldPositionSize != 0))
425428 then divd(muld(unrealizedPnl, exchangedPositionSizeAbs), oldPositionSize)
426429 else 0
427- let $t01601016281 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
428- let remainMargin = $t01601016281._1
429- let badDebt = $t01601016281._2
430- let fundingPayment = $t01601016281._3
431- let oldLatestCPF = $t01601016281._4
430+ let $t01577716048 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl)
431+ let remainMargin = $t01577716048._1
432+ let badDebt = $t01577716048._2
433+ let fundingPayment = $t01577716048._3
434+ let oldLatestCPF = $t01577716048._4
432435 let exchangedQuoteAssetAmount = openNotional
433436 let unrealizedPnlAfter = (unrealizedPnl - realizedPnl)
434437 let remainOpenNotional = if ((oldPositionSize > 0))
435438 then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter)
436439 else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount)
437- $Tuple10((oldPositionSize + exchangedPositionSize), remainMargin, abs(remainOpenNotional), oldLatestCPF, bsAstRAfter, qtAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInteresetNotional() - openNotional))
440+ $Tuple10((oldPositionSize + exchangedPositionSize), remainMargin, abs(remainOpenNotional), oldLatestCPF, bsAstRAfter, qtAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInteresetNotional() - openNotional))
438441 }
439442 }
440443 else throw("Close position first")
441444 }
442- let newPositionSize = $t01456517362._1
443- let newPositionRemainMargin = $t01456517362._2
444- let newPosiionOpenNotional = $t01456517362._3
445- let newPositionLatestCPF = $t01456517362._4
446- let bsAstRAfter = $t01456517362._5
447- let qtAstRAfter = $t01456517362._6
448- let baseAssetDeltaThisFundingPeriodAfter = $t01456517362._7
449- let totalPositionSizeAfter = $t01456517362._8
450- let cumulativeNotionalAfter = $t01456517362._9
451- let openInteresetNotionalAfter = $t01456517362._10
452- (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPosiionOpenNotional, newPositionLatestCPF) ++ updateAmm(qtAstRAfter, bsAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter))
445+ let newPositionSize = $t01436417097._1
446+ let newPositionRemainMargin = $t01436417097._2
447+ let newPosiionOpenNotional = $t01436417097._3
448+ let newPositionLatestCPF = $t01436417097._4
449+ let bsAstRAfter = $t01436417097._5
450+ let qtAstRAfter = $t01436417097._6
451+ let baseAsstFndDeltAfter = $t01436417097._7
452+ let totalPositionSizeAfter = $t01436417097._8
453+ let cumulativeNotionalAfter = $t01436417097._9
454+ let openInteresetNotionalAfter = $t01436417097._10
455+ (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPosiionOpenNotional, newPositionLatestCPF) ++ updateAmm(qtAstRAfter, bsAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter))
453456 }
454457
455458
456459
457460 @Callable(i)
458461 func increasePosition (_direction,_leverage,_minBaseAssetAmount) = {
459462 let _rawAmount = i.payments[0].amount
460463 if (if (if (if (if (if (if ((_direction != DIR_LONG))
461464 then (_direction != DIR_SHORT)
462465 else false)
463466 then true
464467 else (0 >= _rawAmount))
465468 then true
466469 else if (((1 * DECIMAL_UNIT) > _leverage))
467470 then true
468471 else (_leverage > (3 * DECIMAL_UNIT)))
469472 then true
470473 else !(initialized()))
471474 then true
472475 else (i.payments[0].assetId != USDN))
473476 then true
474477 else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true)))
475478 then throw("Invalid increasePosition parameters")
476479 else {
477480 let feeAmount = muld(_rawAmount, fee())
478481 let _amount = (_rawAmount - feeAmount)
479- let $t01835218504 = getPosition(toString(i.caller))
480- let oldPositionSize = $t01835218504._1
481- let oldPositionMargin = $t01835218504._2
482- let oldPositionOpenNotional = $t01835218504._3
483- let oldPositionLstUpdCPF = $t01835218504._4
482+ let $t01807118223 = getPosition(toString(i.caller))
483+ let oldPositionSize = $t01807118223._1
484+ let oldPositionMargin = $t01807118223._2
485+ let oldPositionOpenNotional = $t01807118223._3
486+ let oldPositionLstUpdCPF = $t01807118223._4
484487 let isNewPosition = (oldPositionSize == 0)
485488 let isSameDirection = if ((oldPositionSize > 0))
486489 then (_direction == DIR_LONG)
487490 else (_direction == DIR_SHORT)
488491 let expandExisting = if (!(isNewPosition))
489492 then isSameDirection
490493 else false
491494 let isAdd = (_direction == DIR_LONG)
492- let $t01879320981 = if (if (isNewPosition)
495+ let $t01851220636 = if (if (isNewPosition)
493496 then true
494497 else expandExisting)
495498 then {
496499 let openNotional = muld(_amount, _leverage)
497- let $t01919519426 = swapInput(isAdd, openNotional)
498- let amountBaseAssetBought = $t01919519426._1
499- let qtAstRAfter = $t01919519426._2
500- let bsAstRAfter = $t01919519426._3
501- let baseAssetDeltaThisFundingPeriodAfter = $t01919519426._4
502- let totalPositionSizeAfter = $t01919519426._5
503- let cumulativeNotionalAfter = $t01919519426._6
500+ let $t01889819113 = swapInput(isAdd, openNotional)
501+ let amountBaseAssetBought = $t01889819113._1
502+ let qtAstRAfter = $t01889819113._2
503+ let bsAstRAfter = $t01889819113._3
504+ let baseAsstFndDeltAfter = $t01889819113._4
505+ let totalPositionSizeAfter = $t01889819113._5
506+ let cumulativeNotionalAfter = $t01889819113._6
504507 if (if ((_minBaseAssetAmount != 0))
505508 then (_minBaseAssetAmount > abs(amountBaseAssetBought))
506509 else false)
507510 then throw(((("Limit error: " + toString(abs(amountBaseAssetBought))) + " < ") + toString(_minBaseAssetAmount)))
508511 else {
509512 let newPositionSize = (oldPositionSize + amountBaseAssetBought)
510513 let increaseMarginRequirement = divd(openNotional, _leverage)
511- let $t01980720060 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
512- let remainMargin = $t01980720060._1
513- let x1 = $t01980720060._2
514- let x2 = $t01980720060._3
515- let oldLatestCPF = $t01980720060._4
516- $Tuple10(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), oldLatestCPF, bsAstRAfter, qtAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInteresetNotional() + openNotional))
514+ let $t01949419747 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement)
515+ let remainMargin = $t01949419747._1
516+ let x1 = $t01949419747._2
517+ let x2 = $t01949419747._3
518+ let oldLatestCPF = $t01949419747._4
519+ $Tuple10(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), oldLatestCPF, bsAstRAfter, qtAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInteresetNotional() + openNotional))
517520 }
518521 }
519522 else {
520523 let openNotional = muld(_amount, _leverage)
521- let $t02069120790 = getPositionNotionalAndUnrealizedPnl(toString(i.caller))
522- let oldPositionNotional = $t02069120790._1
523- let unrealizedPnl = $t02069120790._2
524+ let $t02034620445 = getPositionNotionalAndUnrealizedPnl(toString(i.caller))
525+ let oldPositionNotional = $t02034620445._1
526+ let unrealizedPnl = $t02034620445._2
524527 if ((oldPositionNotional > openNotional))
525528 then throw("Use decreasePosition to decrease position size")
526529 else throw("Close position first")
527530 }
528- let newPositionSize = $t01879320981._1
529- let newPositionRemainMargin = $t01879320981._2
530- let newPosiionOpenNotional = $t01879320981._3
531- let newPositionLatestCPF = $t01879320981._4
532- let bsAstRAfter = $t01879320981._5
533- let qtAstRAfter = $t01879320981._6
534- let baseAssetDeltaThisFundingPeriodAfter = $t01879320981._7
535- let totalPositionSizeAfter = $t01879320981._8
536- let cumulativeNotionalAfter = $t01879320981._9
537- let openInteresetNotionalAfter = $t01879320981._10
531+ let newPositionSize = $t01851220636._1
532+ let newPositionRemainMargin = $t01851220636._2
533+ let newPosiionOpenNotional = $t01851220636._3
534+ let newPositionLatestCPF = $t01851220636._4
535+ let bsAstRAfter = $t01851220636._5
536+ let qtAstRAfter = $t01851220636._6
537+ let baseAsstFndDeltAfter = $t01851220636._7
538+ let totalPositionSizeAfter = $t01851220636._8
539+ let cumulativeNotionalAfter = $t01851220636._9
540+ let openInteresetNotionalAfter = $t01851220636._10
538541 let stake = invoke(USDN_STAKING, "lockNeutrino", nil, [AttachedPayment(USDN, _amount)])
539542 if ((stake == stake))
540- then (((updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPosiionOpenNotional, newPositionLatestCPF) ++ updateAmm(qtAstRAfter, bsAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ transferFee(feeAmount)) ++ upblc((cbalance() + _amount)))
543+ then (((updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPosiionOpenNotional, newPositionLatestCPF) ++ updateAmm(qtAstRAfter, bsAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ transferFee(feeAmount)) ++ upblc((cbalance() + _amount)))
541544 else throw("Strict value is not equal to itself.")
542545 }
543546 }
544547
545548
546549
547550 @Callable(i)
548551 func addMargin () = {
549552 let _rawAmount = i.payments[0].amount
550553 if (if ((i.payments[0].assetId != USDN))
551554 then true
552555 else !(requireOpenPosition(toString(i.caller))))
553556 then throw("Invalid addMargin parameters")
554557 else {
555558 let feeAmount = muld(_rawAmount, fee())
556559 let _amount = (_rawAmount - feeAmount)
557- let $t02188322035 = getPosition(toString(i.caller))
558- let oldPositionSize = $t02188322035._1
559- let oldPositionMargin = $t02188322035._2
560- let oldPositionOpenNotional = $t02188322035._3
561- let oldPositionLstUpdCPF = $t02188322035._4
560+ let $t02152221674 = getPosition(toString(i.caller))
561+ let oldPositionSize = $t02152221674._1
562+ let oldPositionMargin = $t02152221674._2
563+ let oldPositionOpenNotional = $t02152221674._3
564+ let oldPositionLstUpdCPF = $t02152221674._4
562565 let stake = invoke(USDN_STAKING, "lockNeutrino", nil, [AttachedPayment(USDN, _amount)])
563566 if ((stake == stake))
564567 then ((updatePosition(toString(i.caller), oldPositionSize, (oldPositionMargin + i.payments[0].amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeAmount)) ++ upblc((cbalance() + _amount)))
565568 else throw("Strict value is not equal to itself.")
566569 }
567570 }
568571
569572
570573
571574 @Callable(i)
572575 func removeMargin (_amount) = if (if ((0 >= _amount))
573576 then true
574577 else !(requireOpenPosition(toString(i.caller))))
575578 then throw("Invalid removeMargin parameters")
576579 else {
577- let $t02262122773 = getPosition(toString(i.caller))
578- let oldPositionSize = $t02262122773._1
579- let oldPositionMargin = $t02262122773._2
580- let oldPositionOpenNotional = $t02262122773._3
581- let oldPositionLstUpdCPF = $t02262122773._4
580+ let $t02226022412 = getPosition(toString(i.caller))
581+ let oldPositionSize = $t02226022412._1
582+ let oldPositionMargin = $t02226022412._2
583+ let oldPositionOpenNotional = $t02226022412._3
584+ let oldPositionLstUpdCPF = $t02226022412._4
582585 let marginDelta = -(_amount)
583- let $t02281023005 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
584- let remainMargin = $t02281023005._1
585- let badDebt = $t02281023005._2
586- let x1 = $t02281023005._3
587- let latestCPF1 = $t02281023005._4
586+ let $t02244922644 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta)
587+ let remainMargin = $t02244922644._1
588+ let badDebt = $t02244922644._2
589+ let x1 = $t02244922644._3
590+ let latestCPF1 = $t02244922644._4
588591 if ((badDebt != 0))
589592 then throw("Invalid added margin amount")
590593 else {
591594 let unstake = invoke(USDN_STAKING, "unlockNeutrino", [_amount, toBase58String(USDN)], nil)
592595 if ((unstake == unstake))
593596 then ((updatePosition(toString(i.caller), oldPositionSize, remainMargin, oldPositionOpenNotional, latestCPF1) ++ withdraw(i.caller, _amount)) ++ upblc((cbalance() - _amount)))
594597 else throw("Strict value is not equal to itself.")
595598 }
596599 }
597600
598601
599602
600603 @Callable(i)
601604 func closePosition () = if (!(requireOpenPosition(toString(i.caller))))
602605 then throw("Invalid closePosition parameters")
603606 else {
604- let $t02365524003 = internalClosePosition(toString(i.caller))
605- let x1 = $t02365524003._1
606- let badDebt = $t02365524003._2
607- let realizedPnl = $t02365524003._3
608- let marginToVault = $t02365524003._4
609- let quoteAssetReserveAfter = $t02365524003._5
610- let bsAstRAfter = $t02365524003._6
611- let baseAssetDeltaThisFundingPeriodAfter = $t02365524003._7
612- let totalPositionSizeAfter = $t02365524003._8
613- let cumulativeNotionalAfter = $t02365524003._9
614- let openInteresetNotionalAfter = $t02365524003._10
607+ let $t02329423626 = internalClosePosition(toString(i.caller))
608+ let x1 = $t02329423626._1
609+ let badDebt = $t02329423626._2
610+ let realizedPnl = $t02329423626._3
611+ let marginToVault = $t02329423626._4
612+ let quoteAssetReserveAfter = $t02329423626._5
613+ let bsAstRAfter = $t02329423626._6
614+ let baseAsstFndDeltAfter = $t02329423626._7
615+ let totalPositionSizeAfter = $t02329423626._8
616+ let cumulativeNotionalAfter = $t02329423626._9
617+ let openInteresetNotionalAfter = $t02329423626._10
615618 if ((badDebt > 0))
616619 then throw("Unable to close position with bad debt")
617620 else {
618621 let withdrawAmount = abs(marginToVault)
619622 let bd = (cbalance() - withdrawAmount)
620- let $t02419624292 = if ((0 > bd))
623+ let $t02381923915 = if ((0 > bd))
621624 then $Tuple2(0, abs(bd))
622625 else $Tuple2(bd, 0)
623- let nb = $t02419624292._1
624- let fromi = $t02419624292._2
626+ let nb = $t02381923915._1
627+ let fromi = $t02381923915._2
625628 let x = if ((fromi > 0))
626629 then {
627630 let withdrawInsurance = invoke(INSURANCE_ADDRESS, "withdraw", [fromi], nil)
628631 if ((withdrawInsurance == withdrawInsurance))
629632 then nil
630633 else throw("Strict value is not equal to itself.")
631634 }
632635 else nil
633636 if ((x == x))
634637 then {
635638 let unstake = invoke(USDN_STAKING, "unlockNeutrino", [(withdrawAmount - fromi), toBase58String(USDN)], nil)
636639 if ((unstake == unstake))
637- then (((deletePosition(toString(i.caller)) ++ updateAmm(quoteAssetReserveAfter, bsAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ withdraw(i.caller, withdrawAmount)) ++ upblc(nb))
640+ then (((deletePosition(toString(i.caller)) ++ updateAmm(quoteAssetReserveAfter, bsAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ withdraw(i.caller, withdrawAmount)) ++ upblc(nb))
638641 else throw("Strict value is not equal to itself.")
639642 }
640643 else throw("Strict value is not equal to itself.")
641644 }
642645 }
643646
644647
645648
646649 @Callable(i)
647650 func liquidate (_trader) = if (if (!(requireMoreMarginRatio(getMarginRatio(_trader), mmr(), false)))
648651 then true
649652 else !(initialized()))
650653 then throw("Unable to liquidate")
651654 else {
652- let $t02524625566 = internalClosePosition(_trader)
653- let x1 = $t02524625566._1
654- let badDebt = $t02524625566._2
655- let x2 = $t02524625566._3
656- let marginToVault = $t02524625566._4
657- let quoteAssetReserveAfter = $t02524625566._5
658- let bsAstRAfter = $t02524625566._6
659- let baseAssetDeltaThisFundingPeriodAfter = $t02524625566._7
660- let totalPositionSizeAfter = $t02524625566._8
661- let cumulativeNotionalAfter = $t02524625566._9
662- let openInteresetNotionalAfter = $t02524625566._10
663- let exchangedQuoteAssetAmount = $t02524625566._11
655+ let $t02485325157 = internalClosePosition(_trader)
656+ let x1 = $t02485325157._1
657+ let badDebt = $t02485325157._2
658+ let x2 = $t02485325157._3
659+ let marginToVault = $t02485325157._4
660+ let quoteAssetReserveAfter = $t02485325157._5
661+ let bsAstRAfter = $t02485325157._6
662+ let baseAsstFndDeltAfter = $t02485325157._7
663+ let totalPositionSizeAfter = $t02485325157._8
664+ let cumulativeNotionalAfter = $t02485325157._9
665+ let openInteresetNotionalAfter = $t02485325157._10
666+ let exchangedQuoteAssetAmount = $t02485325157._11
664667 let feeToLiquidator = (muld(exchangedQuoteAssetAmount, liquidationFeeRatio()) / 2)
665- let $t02565626060 = if ((feeToLiquidator > marginToVault))
668+ let $t02524725651 = if ((feeToLiquidator > marginToVault))
666669 then $Tuple3((feeToLiquidator - marginToVault), marginToVault, ((badDebt + feeToLiquidator) - marginToVault))
667670 else $Tuple3(0, (marginToVault - feeToLiquidator), badDebt)
668- let liquidationBadDebt = $t02565626060._1
669- let remainMargin = $t02565626060._2
670- let totalBadDebt = $t02565626060._3
671+ let liquidationBadDebt = $t02524725651._1
672+ let remainMargin = $t02524725651._2
673+ let totalBadDebt = $t02524725651._3
671674 let bd = (cbalance() - feeToLiquidator)
672- let $t02610826196 = if ((0 > bd))
675+ let $t02569925787 = if ((0 > bd))
673676 then $Tuple2(0, abs(bd))
674677 else $Tuple2(bd, 0)
675- let nb = $t02610826196._1
676- let fromi = $t02610826196._2
678+ let nb = $t02569925787._1
679+ let fromi = $t02569925787._2
677680 let x = if ((fromi > 0))
678681 then {
679682 let withdrawInsurance = invoke(INSURANCE_ADDRESS, "withdraw", [fromi], nil)
680683 if ((withdrawInsurance == withdrawInsurance))
681684 then nil
682685 else throw("Strict value is not equal to itself.")
683686 }
684687 else nil
685688 if ((x == x))
686689 then {
687690 let unstake = invoke(USDN_STAKING, "unlockNeutrino", [(feeToLiquidator - fromi), toBase58String(USDN)], nil)
688691 if ((unstake == unstake))
689- then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, bsAstRAfter, baseAssetDeltaThisFundingPeriodAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ upblc(nb))
692+ then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, bsAstRAfter, baseAsstFndDeltAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInteresetNotionalAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ upblc(nb))
690693 else throw("Strict value is not equal to itself.")
691694 }
692695 else throw("Strict value is not equal to itself.")
693696 }
694697
695698
696699
697700 @Callable(i)
698701 func payFunding () = {
699702 let fundingBlockTimestamp = nextFundingBlockTimestamp()
700703 if (if ((fundingBlockTimestamp > lastBlock.timestamp))
701704 then true
702705 else !(initialized()))
703706 then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp)))
704707 else {
705708 let underlyingPrice = getOracleTwapPrice()
706709 let spotTwapPrice = getTwapSpotPrice()
707710 let premium = (spotTwapPrice - underlyingPrice)
708711 let premiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY)
709712 let totalTraderPositionSize = totalPositionSize()
710713 let ammFundingPaymentProfit = muld(premiumFraction, totalTraderPositionSize)
711714 let fundingAmount = abs(ammFundingPaymentProfit)
712715 if ((0 > ammFundingPaymentProfit))
713716 then {
714717 let withdrawInsurance = invoke(INSURANCE_ADDRESS, "withdraw", [fundingAmount], nil)
715718 if ((withdrawInsurance == withdrawInsurance))
716719 then {
717720 let stake = invoke(USDN_STAKING, "lockNeutrino", nil, [AttachedPayment(USDN, fundingAmount)])
718721 if ((stake == stake))
719722 then upblc((cbalance() + fundingAmount))
720723 else throw("Strict value is not equal to itself.")
721724 }
722725 else throw("Strict value is not equal to itself.")
723726 }
724727 else ({
725728 let unstake = invoke(USDN_STAKING, "unlockNeutrino", [fundingAmount, toBase58String(USDN)], nil)
726729 if ((unstake == unstake))
727730 then {
728731 let depositInsurance = invoke(INSURANCE_ADDRESS, "deposit", nil, [AttachedPayment(USDN, fundingAmount)])
729732 if ((depositInsurance == depositInsurance))
730733 then upblc((cbalance() - fundingAmount))
731734 else throw("Strict value is not equal to itself.")
732735 }
733736 else throw("Strict value is not equal to itself.")
734737 } ++ updateFunding(0, (fundingBlockTimestamp + fundingPeriodSeconds()), (latestCPF() + premiumFraction), divd(premiumFraction, underlyingPrice)))
735738 }
736739 }
737740
738741
739742
740743 @Callable(i)
741-func view_getMarginRatio (_trader) = throw(toString(getMarginRatio(_trader)))
744+func v_close (_trader) = {
745+ let $t02821428292 = internalClosePosition(_trader)
746+ let x1 = $t02821428292._1
747+ let x2 = $t02821428292._2
748+ let x3 = $t02821428292._3
749+ let x4 = $t02821428292._4
750+ let x5 = $t02821428292._5
751+ let x6 = $t02821428292._6
752+ let x7 = $t02821428292._7
753+ let x8 = $t02821428292._8
754+ let x9 = $t02821428292._9
755+ let x10 = $t02821428292._10
756+ throw(((s(x2) + s(x3)) + s(x4)))
757+ }
742758
743759
744760 @Verifier(tx)
745761 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], ADMIN_PUBLIC_KEY)
746762

github/deemru/w8io/026f985 
136.23 ms