tx · DSmQDEwe6cvm6JWEPfvNjcZ96G24VNdmTb97JJXL2GCm

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.04400000 Waves

2023.06.28 13:44 [2642408] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "DSmQDEwe6cvm6JWEPfvNjcZ96G24VNdmTb97JJXL2GCm", "fee": 4400000, "feeAssetId": null, "timestamp": 1687949090086, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "44LchAEP2mVH2PFMrc85QpM8gGLAhbTtpVmSRTkULEK621xKX2vi7Z9ws8fcixCdsfKfc4oLW1wuCGEk9s1k5Pr7" ], "script": "base64:BgKYAQgCEgcKBQgBCAEBEgMKAQgSBAoCCAgSBQoDCBgYEgUKAwgBCBIECgIIARIGCgQBCAgBEgUKAwEICBILCgkICAgICAgICAgSAwoBCBIDCgEIEgUKAwgIARIGCgQIAQgIEg4KDAgICAEEERgYEQEBGBIKCggICAgBBAgBGBIOCgwICAgBBBgYGBgYARgSCwoJCAgBAQEBAQEEagAHU0ZfUE9PTAICU0YAB1dYX1BPT0wCAldYAA9DQVBfRkVFX05PX0xPQU4CCWNhcE5vTG9hbgAMQ0FQX0ZFRV9MT0FOAgdjYXBMb2FuABRTVE9QTE9TU19GRUVfTk9fTE9BTgIOc3RvcExvc3NOb0xvYW4ADVNUT1BMT1NTX0xPQU4CDHN0b3BMb3NzTG9hbgAITE9BTl9GRUUCBGxvYW4AC05PX0xPQU5fRkVFAgZub0xvYW4ABk5PX0ZFRQIFbm9GZWUABlNDQUxFOACAwtcvAAdTQ0FMRTEwAIDIr6AlAAdTQ0FMRTE2CQC2AgEAgICE/qbe4REACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFs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eGx5U3RvcExvc3NMb2FuRmVlBRNzdG9wbG9zc0ZlZVdpdGhMb2FuCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRFrUG9vbEludGVyZXN0TG9hbgAACQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRNrUG9vbEludGVyZXN0Tm9Mb2FuAAAJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQVrUG9vbAUIcG9vbEFkZHIFBHR5cGUJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQdzaGFyZUlkBQprU2hhcmVQb29sBQhwb29sQWRkcgkAzAgCCQEMQm9vbGVhbkVudHJ5AgkArAICBQhwb29sQWRkcgUOa1Bvb2xDYW5Cb3Jyb3cFCWNhbkJvcnJvdwUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tledx6SS4=", "height": 2642408, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HjN54TVya4jBZ7Gzy6f7nPeWba4tn28dRUWwEmLX84cp Next: G7rzmQHAtsfUpwa9mB74gfth6zoUZETuovY4X2y2dZXb Diff:
OldNewDifferences
8686 let kPoolCapChange = "_pool_cap_change"
8787
8888 let kTokenLastPrice = "last_price"
89+
90+let kPriceInOracle = "_twap5B"
8991
9092 let kUserStopLoss = "_stop_loss"
9193
280282
281283 func getAssetsPrice (assetIds) = {
282284 func getPrices (a,assetId) = {
283- let assetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
284- if ($isInstanceOf(@, "(Int, Int)"))
285- then @
286- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
285+ let assetPrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
287286 (a :+ assetPrice)
288287 }
289288
306305 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
307306 let poolAddr = Address(fromBase58String(pool))
308307 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
309- let $t090179082 = getPoolData(poolAddr, pType)
310- let aId = $t090179082._1
311- let bId = $t090179082._2
312- let aBalance = $t090179082._3
313- let bBalance = $t090179082._4
314- let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
315- if ($isInstanceOf(@, "(Int, Int)"))
316- then @
317- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
318- let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
319- if ($isInstanceOf(@, "(Int, Int)"))
320- then @
321- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
308+ let $t092109275 = getPoolData(poolAddr, pType)
309+ let aId = $t092109275._1
310+ let bId = $t092109275._2
311+ let aBalance = $t092109275._3
312+ let bBalance = $t092109275._4
313+ let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
314+ let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
322315 let shareSupply = getShareSupply(poolAddr, pType, shareId)
323316 let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
324317 let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
387380 else throw("Strict value is not equal to itself.")
388381 }
389382 else {
390- let $t01061210862 = $Tuple2(split({
383+ let $t01075911009 = $Tuple2(split({
391384 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
392385 if ($isInstanceOf(@, "String"))
393386 then @
398391 then @
399392 else throw(($getType(@) + " couldn't be cast to String"))
400393 }, "__"))
401- if (($t01061210862 == $t01061210862))
394+ if (($t01075911009 == $t01075911009))
402395 then {
403- let evalPutInB = $t01061210862._2
404- let evalPutInA = $t01061210862._1
396+ let evalPutInB = $t01075911009._2
397+ let evalPutInA = $t01075911009._1
405398 let lpInA = parseIntValue(evalPutInA[1])
406399 let lpInB = parseIntValue(evalPutInB[1])
407400 if ((lpInB > lpInA))
443436
444437
445438 func unstakeLP (pool,pType,shareId,amount) = {
446- let $t01234712704 = if ((pType == SF_POOL))
439+ let $t01249412851 = if ((pType == SF_POOL))
447440 then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
448441 else if ((pType == WX_POOL))
449442 then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
450443 else throw("Wrong pool type")
451- let farmAddr = $t01234712704._1
452- let fName = $t01234712704._2
453- let params = $t01234712704._3
444+ let farmAddr = $t01249412851._1
445+ let fName = $t01249412851._2
446+ let params = $t01249412851._3
454447 let inv = invoke(farmAddr, fName, params, nil)
455448 if ((inv == inv))
456449 then amount
463456 let feeScale6 = 1000000
464457 let fee = getIntegerValue(poolAddr, kSFPoolFee)
465458 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
466- let $t01311713405 = if ((assetTokenToGet == assetIdA))
459+ let $t01326413552 = if ((assetTokenToGet == assetIdA))
467460 then {
468461 let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee))
469462 $Tuple2(amountToPay, assetIdB)
472465 let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee))
473466 $Tuple2(amountToPay, assetIdA)
474467 }
475- let amountToPay = $t01311713405._1
476- let assetToPay = $t01311713405._2
468+ let amountToPay = $t01326413552._1
469+ let assetToPay = $t01326413552._2
477470 $Tuple2(assetToPay, amountToPay)
478471 }
479472
482475 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
483476 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
484477 let feeScale = toBigInt(100000000)
485- let $t01374414052 = if ((assetTokenToGet == assetIdA))
478+ let $t01389114199 = if ((assetTokenToGet == assetIdA))
486479 then {
487480 let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet))
488481 $Tuple2(amountToPay, assetIdB)
491484 let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet))
492485 $Tuple2(amountToPay, assetIdA)
493486 }
494- let amountToPay = $t01374414052._1
495- let assetToPay = $t01374414052._2
487+ let amountToPay = $t01389114199._1
488+ let assetToPay = $t01389114199._2
496489 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING))
497490 $Tuple2(assetToPay, fraction(amountToPayWithFee, 102, 100))
498491 }
500493
501494 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
502495 then {
503- let $t01441514537 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
504- let assetToPay = $t01441514537._1
505- let amountToPay = $t01441514537._2
496+ let $t01456214684 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
497+ let assetToPay = $t01456214684._1
498+ let amountToPay = $t01456214684._2
506499 invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
507500 }
508501 else {
509- let $t01471214834 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
510- let assetToPay = $t01471214834._1
511- let amountToPay = $t01471214834._2
502+ let $t01485914981 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
503+ let assetToPay = $t01485914981._1
504+ let amountToPay = $t01485914981._2
512505 invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
513506 }
514507
539532 }
540533 else if ((pType == WX_POOL))
541534 then {
542- let $t01543715778 = if (if ((pmtA > 0))
535+ let $t01558415925 = if (if ((pmtA > 0))
543536 then (pmtB > 0)
544537 else false)
545538 then {
546- let $t01551815644 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
547- let pmtInA = $t01551815644._1
548- let pmtInB = $t01551815644._2
549- let change = $t01551815644._3
550- let changeId = $t01551815644._4
551- let lpAmount = $t01551815644._5
539+ let $t01566515791 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
540+ let pmtInA = $t01566515791._1
541+ let pmtInB = $t01566515791._2
542+ let change = $t01566515791._3
543+ let changeId = $t01566515791._4
544+ let lpAmount = $t01566515791._5
552545 $Tuple3(change, changeId, lpAmount)
553546 }
554547 else if ((pmtA > 0))
555548 then $Tuple3(pmtA, aId, 0)
556549 else $Tuple3(pmtB, bId, 0)
557- let change = $t01543715778._1
558- let changeId = $t01543715778._2
559- let lpTwo = $t01543715778._3
560- let $t01578516001 = if ((change > 0))
550+ let change = $t01558415925._1
551+ let changeId = $t01558415925._2
552+ let lpTwo = $t01558415925._3
553+ let $t01593216148 = if ((change > 0))
561554 then {
562555 let inv = {
563556 let @ = invoke(poolAddr, "putOneTknREADONLY", [changeId, change], nil)
570563 else throw("Strict value is not equal to itself.")
571564 }
572565 else $Tuple2(0, 0)
573- let lpOne = $t01578516001._1
574- let loss = $t01578516001._2
566+ let lpOne = $t01593216148._1
567+ let loss = $t01593216148._2
575568 $Tuple2((lpTwo + lpOne), loss)
576569 }
577570 else throw("Wrong pool type")
580573
581574 func calcWithdrawLPVirt (pType,pool,lpAmount,shareId,aId,bId,balA,balB,borrowAmount,borrowAssetId) = {
582575 let poolAddr = addressFromStringValue(pool)
583- let $t01629516795 = if ((pType == SF_POOL))
576+ let $t01644216942 = if ((pType == SF_POOL))
584577 then {
585578 let inv = {
586579 let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(lpAmount), toString(balA), toString(balB)]], nil)
615608 else throw("Strict value is not equal to itself.")
616609 }
617610 else throw("Wrong pool type")
618- let getAmountA = $t01629516795._1
619- let getAmountB = $t01629516795._2
611+ let getAmountA = $t01644216942._1
612+ let getAmountB = $t01644216942._2
620613 if ((borrowAmount > 0))
621614 then {
622615 let amountToGetEx = if (if ((borrowAssetId == aId))
628621 else false)
629622 then (borrowAmount - getAmountB)
630623 else 0
631- let $t01707317376 = if ((amountToGetEx > 0))
624+ let $t01722017523 = if ((amountToGetEx > 0))
632625 then if ((pType == SF_POOL))
633626 then calcAmountToPaySF(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
634627 else calcAmountToPayWX(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
635628 else $Tuple2("", 0)
636- let assetToPay = $t01707317376._1
637- let amountToPay = $t01707317376._2
629+ let assetToPay = $t01722017523._1
630+ let amountToPay = $t01722017523._2
638631 if ((borrowAssetId == aId))
639632 then $Tuple2(((getAmountA + amountToGetEx) - borrowAmount), (getAmountB - amountToPay))
640633 else $Tuple2((getAmountA - amountToPay), ((getAmountB + amountToGetEx) - borrowAmount))
681674 if ((lpBalanceBefore == lpBalanceBefore))
682675 then {
683676 let poolAddr = addressFromStringValue(pool)
684- let $t01857318989 = if (if ((pmtA > 0))
677+ let $t01872019136 = if (if ((pmtA > 0))
685678 then (pmtB > 0)
686679 else false)
687680 then {
688- let $t01863918755 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
689- let pmtInA = $t01863918755._1
690- let pmtInB = $t01863918755._2
691- let change = $t01863918755._3
692- let changeId = $t01863918755._4
681+ let $t01878618902 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
682+ let pmtInA = $t01878618902._1
683+ let pmtInB = $t01878618902._2
684+ let change = $t01878618902._3
685+ let changeId = $t01878618902._4
693686 let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
694687 if ((inv == inv))
695688 then $Tuple2(change, changeId)
700693 else if ((pmtB > 0))
701694 then $Tuple2(pmtB, bId)
702695 else throw("pmts must be > 0")
703- let change = $t01857318989._1
704- let changeId = $t01857318989._2
696+ let change = $t01872019136._1
697+ let changeId = $t01872019136._2
705698 let inv = if ((change > 0))
706699 then replenishOneTokenByType(poolAddr, pType, change, changeId)
707700 else nil
729722 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
730723 let totalAmount = getPoolTotalShare(pool)
731724 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
732- let $t01984720085 = if (withLoan)
725+ let $t01999420232 = if (withLoan)
733726 then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
734727 else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
735- let curPoolInterest = $t01984720085._1
736- let totalStakedWithLoan = $t01984720085._2
728+ let curPoolInterest = $t01999420232._1
729+ let totalStakedWithLoan = $t01999420232._2
737730 [IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), totalStakedWithLoan), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), StringEntry((((user + "_") + toString(posNum)) + kUserPositionPool), pool), IntegerEntry((user + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
738731 }
739732
779772
780773 func capitalize (pool,pType,tokenId,tokenAmount) = {
781774 let poolAddr = Address(fromBase58String(pool))
782- let $t02243622502 = getPoolData(poolAddr, pType)
783- let AId = $t02243622502._1
784- let BId = $t02243622502._2
785- let balA = $t02243622502._3
786- let balB = $t02243622502._4
787- let shareId = $t02243622502._5
775+ let $t02258322649 = getPoolData(poolAddr, pType)
776+ let AId = $t02258322649._1
777+ let BId = $t02258322649._2
778+ let balA = $t02258322649._3
779+ let balB = $t02258322649._4
780+ let shareId = $t02258322649._5
788781 if (if ((tokenId != AId))
789782 then (tokenId != BId)
790783 else false)
791784 then throw("Wrong asset")
792785 else {
793- let $t02258722667 = if ((tokenId == AId))
786+ let $t02273422814 = if ((tokenId == AId))
794787 then $Tuple2(tokenAmount, 0)
795788 else $Tuple2(0, tokenAmount)
796- let pmtA = $t02258722667._1
797- let pmtB = $t02258722667._2
798- let $t02267022774 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
799- let stakedAmount = $t02267022774._1
800- let nf = $t02267022774._2
789+ let pmtA = $t02273422814._1
790+ let pmtB = $t02273422814._2
791+ let $t02281722921 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
792+ let stakedAmount = $t02281722921._1
793+ let nf = $t02281722921._2
801794 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
802795 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
803796 let totalShareAmount = getPoolTotalShare(pool)
824817 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
825818 let poolAddr = Address(fromBase58String(pool))
826819 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
827- let $t02454224618 = getPoolData(poolAddr, pType)
828- let assetIdA = $t02454224618._1
829- let assetIdB = $t02454224618._2
830- let balA = $t02454224618._3
831- let balB = $t02454224618._4
832- let shareId = $t02454224618._5
820+ let $t02468924765 = getPoolData(poolAddr, pType)
821+ let assetIdA = $t02468924765._1
822+ let assetIdB = $t02468924765._2
823+ let balA = $t02468924765._3
824+ let balB = $t02468924765._4
825+ let shareId = $t02468924765._5
833826 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
834827 if ((cBalABefore == cBalABefore))
835828 then {
848841 then {
849842 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
850843 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
851- let $t02518125270 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
852- let tokensAmountA = $t02518125270._1
853- let tokensAmountB = $t02518125270._2
854- let $t02527326093 = if ((debt > 0))
844+ let $t02532825417 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
845+ let tokensAmountA = $t02532825417._1
846+ let tokensAmountB = $t02532825417._2
847+ let $t02542026240 = if ((debt > 0))
855848 then {
856849 let amountToGetEx = if (if ((borrowAsset == assetIdA))
857850 then (debt > tokensAmountA)
876869 else throw("Strict value is not equal to itself.")
877870 }
878871 else $Tuple2(tokensAmountA, tokensAmountB)
879- let toUserA = $t02527326093._1
880- let toUserB = $t02527326093._2
872+ let toUserA = $t02542026240._1
873+ let toUserB = $t02542026240._2
881874 $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId)
882875 }
883876 else throw("Strict value is not equal to itself.")
913906 else throw(($getType(@) + " couldn't be cast to Int"))
914907 }
915908 else 0
916- let $t02748127634 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
917- if (($t02748127634 == $t02748127634))
909+ let $t02762827781 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
910+ if (($t02762827781 == $t02762827781))
918911 then {
919- let shareId = $t02748127634._7
920- let cBalBAfter = $t02748127634._6
921- let cBalAAfter = $t02748127634._5
922- let assetIdB = $t02748127634._4
923- let toUserAmountB = $t02748127634._3
924- let assetIdA = $t02748127634._2
925- let toUserAmountA = $t02748127634._1
912+ let shareId = $t02762827781._7
913+ let cBalBAfter = $t02762827781._6
914+ let cBalAAfter = $t02762827781._5
915+ let assetIdB = $t02762827781._4
916+ let toUserAmountB = $t02762827781._3
917+ let assetIdA = $t02762827781._2
918+ let toUserAmountA = $t02762827781._1
926919 let closeDbtInv = if ((debt > 0))
927920 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
928921 else 0
952945
953946
954947 func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = {
955- let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
956- if ($isInstanceOf(@, "(Int, Int)"))
957- then @
958- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
959- let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
960- if ($isInstanceOf(@, "(Int, Int)"))
961- then @
962- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
948+ let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
949+ let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
963950 let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
964951 let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
965952 let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
966- let $t02932029417 = if ((borrowId == aId))
953+ let $t02942129518 = if ((borrowId == aId))
967954 then $Tuple2(dPriceA, decPrA)
968955 else $Tuple2(dPriceB, decPrB)
969- let borrowPrice = $t02932029417._1
970- let borrowDecPr = $t02932029417._2
956+ let borrowPrice = $t02942129518._1
957+ let borrowDecPr = $t02942129518._2
971958 fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
972959 }
973960
979966 then throw("Leverage can't be <100 and >300")
980967 else {
981968 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
982- let $t02983529925 = getPoolData(Address(fromBase58String(pool)), pType)
983- let AId = $t02983529925._1
984- let BId = $t02983529925._2
985- let balA = $t02983529925._3
986- let balB = $t02983529925._4
987- let shareId = $t02983529925._5
969+ let $t02993630026 = getPoolData(Address(fromBase58String(pool)), pType)
970+ let AId = $t02993630026._1
971+ let BId = $t02993630026._2
972+ let balA = $t02993630026._3
973+ let balB = $t02993630026._4
974+ let shareId = $t02993630026._5
988975 let borrowAmount = if ((leverage > 100))
989976 then calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
990977 else 0
991- let $t03006030167 = if ((borrowId == AId))
978+ let $t03016130268 = if ((borrowId == AId))
992979 then $Tuple2((pmtA + borrowAmount), pmtB)
993980 else $Tuple2(pmtA, (pmtB + borrowAmount))
994- let payInA = $t03006030167._1
995- let payInB = $t03006030167._2
996- let $t03017030263 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
997- let lpAmount = $t03017030263._1
998- let loss = $t03017030263._2
981+ let payInA = $t03016130268._1
982+ let payInB = $t03016130268._2
983+ let $t03027130364 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
984+ let lpAmount = $t03027130364._1
985+ let loss = $t03027130364._2
999986 let impactMod = if ((0 > loss))
1000987 then (loss * -1)
1001988 else loss
10251012 @Callable(i)
10261013 func getUserPositionInDollarsREADONLY (user,pools,posNum) = {
10271014 func userPos (a,pool) = {
1028- let $t03107631110 = a
1029- let totalPos = $t03107631110._1
1030- let posDebt = $t03107631110._2
1031- let index = $t03107631110._3
1015+ let $t03117731211 = a
1016+ let totalPos = $t03117731211._1
1017+ let posDebt = $t03117731211._2
1018+ let index = $t03117731211._3
10321019 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1033- let $t03120231292 = getPoolData(Address(fromBase58String(pool)), pType)
1034- let AId = $t03120231292._1
1035- let BId = $t03120231292._2
1036- let balA = $t03120231292._3
1037- let balB = $t03120231292._4
1038- let shareId = $t03120231292._5
1020+ let $t03130331393 = getPoolData(Address(fromBase58String(pool)), pType)
1021+ let AId = $t03130331393._1
1022+ let BId = $t03130331393._2
1023+ let balA = $t03130331393._3
1024+ let balB = $t03130331393._4
1025+ let shareId = $t03130331393._5
10391026 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
10401027 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0))
10411028 let sharePrices = getSharePrice(shareId)
10511038 then @
10521039 else throw(($getType(@) + " couldn't be cast to Int"))
10531040 }
1054- let borrowAssetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [borrowAsset, false], nil)
1055- if ($isInstanceOf(@, "(Int, Int)"))
1056- then @
1057- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
1041+ let borrowAssetPrice = getIntegerValue(priceOracleAddr, (borrowAsset + kPriceInOracle))
10581042 let decPrBorrowId = pow(10, 0, getAssetDecimals(borrowAsset), 0, 0, DOWN)
10591043 let debtD = fraction(debt, borrowAssetPrice, decPrBorrowId)
10601044 $Tuple3((totalPos :+ shareD), (posDebt :+ debtD), (index + 1))
10611045 }
10621046 }
10631047
1064- let $t03233532390 = {
1048+ let $t03241332468 = {
10651049 let $l = pools
10661050 let $s = size($l)
10671051 let $acc0 = $Tuple3(nil, nil, 0)
10751059
10761060 $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)
10771061 }
1078- let pos = $t03233532390._1
1079- let debt = $t03233532390._2
1062+ let pos = $t03241332468._1
1063+ let debt = $t03241332468._2
10801064 $Tuple2(nil, $Tuple2(pos, debt))
10811065 }
10821066
10931077 then throw("You can't borrow in this pool")
10941078 else {
10951079 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1096- let $t03283032920 = getPoolData(Address(fromBase58String(pool)), pType)
1097- let AId = $t03283032920._1
1098- let BId = $t03283032920._2
1099- let balA = $t03283032920._3
1100- let balB = $t03283032920._4
1101- let shareId = $t03283032920._5
1102- let $t03292333560 = if ((size(i.payments) == 2))
1080+ let $t03290832998 = getPoolData(Address(fromBase58String(pool)), pType)
1081+ let AId = $t03290832998._1
1082+ let BId = $t03290832998._2
1083+ let balA = $t03290832998._3
1084+ let balB = $t03290832998._4
1085+ let shareId = $t03290832998._5
1086+ let $t03300133638 = if ((size(i.payments) == 2))
11031087 then if ((assetIdToStr(i.payments[0].assetId) != AId))
11041088 then throw("Wrong payment asset A")
11051089 else if ((assetIdToStr(i.payments[1].assetId) != BId))
11121096 then $Tuple4(0, AId, i.payments[0].amount, BId)
11131097 else throw("Wrong payment")
11141098 else throw("One or two payments expected")
1115- let pmtA = $t03292333560._1
1116- let pmtAssetA = $t03292333560._2
1117- let pmtB = $t03292333560._3
1118- let pmtAssetB = $t03292333560._4
1099+ let pmtA = $t03300133638._1
1100+ let pmtAssetA = $t03300133638._2
1101+ let pmtB = $t03300133638._3
1102+ let pmtAssetB = $t03300133638._4
11191103 let newPosNum = getNewUserPositionNumber(toString(i.caller))
11201104 if ((leverage > 100))
11211105 then {
11381122 else throw("Strict value is not equal to itself.")
11391123 }
11401124 else {
1141- let $t03448834600 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1142- let userStaked = $t03448834600._1
1143- let axlyFee = $t03448834600._2
1125+ let $t03456634678 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1126+ let userStaked = $t03456634678._1
1127+ let axlyFee = $t03456634678._2
11441128 (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
11451129 }
11461130 }
11541138
11551139 @Callable(i)
11561140 func createUpdateStopLoss (posId,poolId,assetId,price) = {
1157- let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
1158- if ($isInstanceOf(@, "(Int, Int)"))
1159- then @
1160- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
1141+ let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
11611142 if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
11621143 then throw("There are no user position")
11631144 else if ((0 >= price))
11931174
11941175 @Callable(i)
11951176 func replenishFromLand (requestId) = valueOrElse(isLandCall(i), {
1196- let $t03708037184 = parseRequest(requestId)
1197- let user = $t03708037184._1
1198- let pool = $t03708037184._2
1199- let pmtA = $t03708037184._3
1200- let AId = $t03708037184._4
1201- let pmtB = $t03708037184._5
1202- let BId = $t03708037184._6
1203- let balA = $t03708037184._7
1204- let balB = $t03708037184._8
1205- let shareId = $t03708037184._9
1206- let bwAsset = $t03708037184._10
1207- let bwAmount = $t03708037184._11
1177+ let $t03713537239 = parseRequest(requestId)
1178+ let user = $t03713537239._1
1179+ let pool = $t03713537239._2
1180+ let pmtA = $t03713537239._3
1181+ let AId = $t03713537239._4
1182+ let pmtB = $t03713537239._5
1183+ let BId = $t03713537239._6
1184+ let balA = $t03713537239._7
1185+ let balB = $t03713537239._8
1186+ let shareId = $t03713537239._9
1187+ let bwAsset = $t03713537239._10
1188+ let bwAmount = $t03713537239._11
12081189 if ((size(i.payments) != 1))
12091190 then throw("Wrong payment size")
12101191 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
12121193 else (i.payments[0].amount != bwAmount))
12131194 then throw("Wrong payment")
12141195 else {
1215- let $t03737437498 = if ((AId == bwAsset))
1196+ let $t03742937553 = if ((AId == bwAsset))
12161197 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
12171198 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
1218- let pmtAllA = $t03737437498._1
1219- let pmtAllB = $t03737437498._2
1199+ let pmtAllA = $t03742937553._1
1200+ let pmtAllB = $t03742937553._2
12201201 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
1221- let $t03758037695 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1222- let userStaked = $t03758037695._1
1223- let axlyFee = $t03758037695._2
1202+ let $t03763537750 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1203+ let userStaked = $t03763537750._1
1204+ let axlyFee = $t03763537750._2
12241205 let posNum = getNewUserPositionNumber(user)
12251206 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
12261207 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
12341215 func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), {
12351216 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
12361217 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1237- let $t03847438564 = getPoolData(Address(fromBase58String(pool)), pType)
1238- let AId = $t03847438564._1
1239- let BId = $t03847438564._2
1240- let balA = $t03847438564._3
1241- let balB = $t03847438564._4
1242- let shareId = $t03847438564._5
1218+ let $t03852938619 = getPoolData(Address(fromBase58String(pool)), pType)
1219+ let AId = $t03852938619._1
1220+ let BId = $t03852938619._2
1221+ let balA = $t03852938619._3
1222+ let balB = $t03852938619._4
1223+ let shareId = $t03852938619._5
12431224 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
12441225 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
12451226 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
12531234
12541235 @Callable(i)
12551236 func stopLoss (user,posId,pool,assetId) = valueOrElse(isAdminCall(i), {
1256- let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
1257- if ($isInstanceOf(@, "(Int, Int)"))
1258- then @
1259- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
1237+ let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
12601238 if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))))
12611239 then throw("No entry")
12621240 else (withdrawToUser(toString(i.caller), pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))
12661244
12671245 @Callable(i)
12681246 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), {
1269- let $t04035040544 = if (claim)
1247+ let $t04038240576 = if (claim)
12701248 then claimFarmed(type, pool)
12711249 else {
12721250 let claimedAsset = if ((type == SF_POOL))
12741252 else WXID
12751253 $Tuple2(amountToExchange, claimedAsset)
12761254 }
1277- let claimedAmount = $t04035040544._1
1278- let claimedAsset = $t04035040544._2
1255+ let claimedAmount = $t04038240576._1
1256+ let claimedAsset = $t04038240576._2
12791257 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
12801258 let change = (claimedAmount - amountToExchange)
12811259 let changeEntry = if ((change > 0))
12881266
12891267 @Callable(i)
12901268 func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), {
1291- let $t04122941423 = if (claim)
1269+ let $t04126141455 = if (claim)
12921270 then claimFarmed(type, pool)
12931271 else {
12941272 let claimedAsset = if ((type == SF_POOL))
12961274 else WXID
12971275 $Tuple2(amountToExchange, claimedAsset)
12981276 }
1299- let claimedAmount = $t04122941423._1
1300- let claimedAsset = $t04122941423._2
1277+ let claimedAmount = $t04126141455._1
1278+ let claimedAsset = $t04126141455._2
13011279 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
13021280 let change = (claimedAmount - amountToExchange)
13031281 let changeEntry = if ((change > 0))
13101288
13111289 @Callable(i)
13121290 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), {
1313- let $t04217442368 = if (claim)
1291+ let $t04220642400 = if (claim)
13141292 then claimFarmed(type, pool)
13151293 else {
13161294 let claimedAsset = if ((type == SF_POOL))
13181296 else WXID
13191297 $Tuple2(amountToExchange, claimedAsset)
13201298 }
1321- let claimedAmount = $t04217442368._1
1322- let claimedAsset = $t04217442368._2
1299+ let claimedAmount = $t04220642400._1
1300+ let claimedAsset = $t04220642400._2
13231301 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
13241302 let change = (claimedAmount - amountToExchange)
13251303 let changeEntry = if ((change > 0))
13361314 else false)
13371315 then throw("Wrong type")
13381316 else {
1339- let $t04310943203 = getPoolData(Address(fromBase58String(poolAddr)), type)
1340- let aId = $t04310943203._1
1341- let bId = $t04310943203._2
1342- let aBal = $t04310943203._3
1343- let bBal = $t04310943203._4
1344- let shareId = $t04310943203._5
1317+ let $t04314143235 = getPoolData(Address(fromBase58String(poolAddr)), type)
1318+ let aId = $t04314143235._1
1319+ let bId = $t04314143235._2
1320+ let aBal = $t04314143235._3
1321+ let bBal = $t04314143235._4
1322+ let shareId = $t04314143235._5
13451323 [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)]
13461324 })
13471325
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SF_POOL = "SF"
55
66 let WX_POOL = "WX"
77
88 let CAP_FEE_NO_LOAN = "capNoLoan"
99
1010 let CAP_FEE_LOAN = "capLoan"
1111
1212 let STOPLOSS_FEE_NO_LOAN = "stopLossNoLoan"
1313
1414 let STOPLOSS_LOAN = "stopLossLoan"
1515
1616 let LOAN_FEE = "loan"
1717
1818 let NO_LOAN_FEE = "noLoan"
1919
2020 let NO_FEE = "noFee"
2121
2222 let SCALE8 = 100000000
2323
2424 let SCALE10 = 10000000000
2525
2626 let SCALE16 = toBigInt(10000000000000000)
2727
2828 let FEE_SCALE6 = 1000000
2929
3030 let kSFPoolAAssetBalance = "A_asset_balance"
3131
3232 let kSFPoolBAssetBalance = "B_asset_balance"
3333
3434 let kSFPoolAAssetId = "A_asset_id"
3535
3636 let kSFPoolBAssetId = "B_asset_id"
3737
3838 let kSFPoolShareId = "share_asset_id"
3939
4040 let kSFPoolShareSupply = "share_asset_supply"
4141
4242 let kSFPoolFee = "commission"
4343
4444 let kUserPosition = "_user_position"
4545
4646 let kUserPositionPool = "_user_position_pool"
4747
4848 let kUserBorrowAmount = "_user_position_borrow_amount"
4949
5050 let kUserBorrowAssetId = "_user_position_borrow_asset_id"
5151
5252 let kUserPositionNum = "_user_position_number"
5353
5454 let kUserPositionInterest = "_user_position_interest"
5555
5656 let kPoolTotal = "_pool_total"
5757
5858 let kPoolTotalLoan = "_pool_total_loan"
5959
6060 let kPoolInterestLoan = "_pool_interest_loan"
6161
6262 let kPoolInterestNoLoan = "_pool_interest_no_loan"
6363
6464 let kPoolCanBorrow = "_pool_can_borrow"
6565
6666 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
6767
6868 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
6969
7070 let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan"
7171
7272 let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan"
7373
7474 let kAxlyStopLossNoLoanFee = "_axly_fee_stoploss_with_loan"
7575
7676 let kAxlyStopLossLoanFee = "_axly_fee_stoploss_no_loan"
7777
7878 let kRequestId = "_request_id"
7979
8080 let kRequestIter = "requests_iter"
8181
8282 let kPool = "pool_"
8383
8484 let kSharePool = "_pool_share_id"
8585
8686 let kPoolCapChange = "_pool_cap_change"
8787
8888 let kTokenLastPrice = "last_price"
89+
90+let kPriceInOracle = "_twap5B"
8991
9092 let kUserStopLoss = "_stop_loss"
9193
9294 let kMoneyBox = "axly_money_box"
9395
9496 let kSFFarmingAddr = "swopfi_farming_addr"
9597
9698 let kLendService = "lend_service_addr"
9799
98100 let kAdminCallPK = "admin_call_pub_key"
99101
100102 let kPriceOracle = "price_oracle"
101103
102104 let kExContract = "exchange_contract"
103105
104106 let kWxSwapContract = "wx_swap_contract"
105107
106108 let kSwopId = "swop_id"
107109
108110 let kWxId = "wx_id"
109111
110112 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
111113
112114 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
113115
114116 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
115117
116118 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
117119
118120 let SWOPID = fromBase58String(valueOrErrorMessage(getString(this, kSwopId), "No swop id"))
119121
120122 let WXID = fromBase58String(valueOrErrorMessage(getString(this, kWxId), "No wx id"))
121123
122124 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
123125
124126
125127 func getAdminCallAddr () = addressFromPublicKey(fromBase58String(valueOrErrorMessage(getString(this, kAdminCallPK), "Can't get admin addr")))
126128
127129
128130 func isAdminCall (i) = if ((i.caller == getAdminCallAddr()))
129131 then unit
130132 else throw("Only admin can call this function")
131133
132134
133135 func isSelfCall (i) = if ((i.caller == this))
134136 then unit
135137 else throw("Only contract itself can call this function")
136138
137139
138140 func isLandCall (i) = if ((i.caller == getLendSrvAddr()))
139141 then unit
140142 else throw("Only land contract can call this function")
141143
142144
143145 func accountBalance (assetId) = match assetId {
144146 case id: ByteVector =>
145147 assetBalance(this, id)
146148 case waves: Unit =>
147149 wavesBalance(this).available
148150 case _ =>
149151 throw("Match error")
150152 }
151153
152154
153155 func getSFPoolData (poolAddr) = $Tuple5(valueOrErrorMessage(getString(poolAddr, kSFPoolAAssetId), "Can't get pool A asset id"), valueOrErrorMessage(getString(poolAddr, kSFPoolBAssetId), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolAAssetBalance), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(poolAddr, kSFPoolBAssetBalance), "Can't get pool B asset balance"), valueOrErrorMessage(getString(poolAddr, kSFPoolShareId), "Can't get share asset id"))
154156
155157
156158 func getWXPoolData (poolAddr) = {
157159 let cfg = {
158160 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
159161 if ($isInstanceOf(@, "List[Any]"))
160162 then @
161163 else throw(($getType(@) + " couldn't be cast to List[Any]"))
162164 }
163165 if ((cfg == cfg))
164166 then {
165167 let aId = valueOrErrorMessage({
166168 let @ = cfg[4]
167169 if ($isInstanceOf(@, "String"))
168170 then @
169171 else unit
170172 }, "Can't get pool A asset id")
171173 let bId = valueOrErrorMessage({
172174 let @ = cfg[5]
173175 if ($isInstanceOf(@, "String"))
174176 then @
175177 else unit
176178 }, "Can't get pool B asset id")
177179 let shareId = valueOrErrorMessage({
178180 let @ = cfg[3]
179181 if ($isInstanceOf(@, "String"))
180182 then @
181183 else unit
182184 }, "Can't get pool LP asset id")
183185 let balA = {
184186 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil)
185187 if ($isInstanceOf(@, "Int"))
186188 then @
187189 else throw(($getType(@) + " couldn't be cast to Int"))
188190 }
189191 if ((balA == balA))
190192 then {
191193 let balB = {
192194 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil)
193195 if ($isInstanceOf(@, "Int"))
194196 then @
195197 else throw(($getType(@) + " couldn't be cast to Int"))
196198 }
197199 if ((balB == balB))
198200 then $Tuple5(aId, bId, balA, balB, shareId)
199201 else throw("Strict value is not equal to itself.")
200202 }
201203 else throw("Strict value is not equal to itself.")
202204 }
203205 else throw("Strict value is not equal to itself.")
204206 }
205207
206208
207209 func getPoolData (poolAddr,type) = if ((type == SF_POOL))
208210 then getSFPoolData(poolAddr)
209211 else if ((type == WX_POOL))
210212 then getWXPoolData(poolAddr)
211213 else throw("Wrong pool type")
212214
213215
214216 func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL))
215217 then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply")
216218 else if ((type == WX_POOL))
217219 then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity
218220 else throw("Wrong pool type")
219221
220222
221223 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
222224
223225
224226 func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0)
225227
226228
227229 func getNewUserPositionNumber (user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1)
228230
229231
230232 func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN))
231233 then getIntegerValue(this, (pool + kAxlyWithLoanCapFee))
232234 else if ((feeType == CAP_FEE_NO_LOAN))
233235 then getIntegerValue(this, (pool + kAxlyNoLoanCapFee))
234236 else if ((feeType == LOAN_FEE))
235237 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
236238 else if ((feeType == NO_LOAN_FEE))
237239 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
238240 else if ((feeType == NO_FEE))
239241 then 0
240242 else throw("Wrong fee type")
241243
242244
243245 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
244246
245247
246248 func getWXFarmingAddr (poolAddr) = {
247249 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
248250 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
249251 Address(fromBase58String(factroyCfg[1]))
250252 }
251253
252254
253255 func assetIdToStr (assetId) = match assetId {
254256 case id: ByteVector =>
255257 toBase58String(id)
256258 case waves: Unit =>
257259 "WAVES"
258260 case _ =>
259261 throw("Not Asset id")
260262 }
261263
262264
263265 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
264266 then unit
265267 else fromBase58String(assetId)
266268
267269
268270 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
269271 then 8
270272 else match assetInfo(fromBase58String(assetId)) {
271273 case asset: Asset =>
272274 asset.decimals
273275 case _ =>
274276 throw("Can't find asset")
275277 }
276278
277279
278280 func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN)
279281
280282
281283 func getAssetsPrice (assetIds) = {
282284 func getPrices (a,assetId) = {
283- let assetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
284- if ($isInstanceOf(@, "(Int, Int)"))
285- then @
286- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
285+ let assetPrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
287286 (a :+ assetPrice)
288287 }
289288
290289 let $l = assetIds
291290 let $s = size($l)
292291 let $acc0 = nil
293292 func $f0_1 ($a,$i) = if (($i >= $s))
294293 then $a
295294 else getPrices($a, $l[$i])
296295
297296 func $f0_2 ($a,$i) = if (($i >= $s))
298297 then $a
299298 else throw("List size exceeds 50")
300299
301300 $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($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($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), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
302301 }
303302
304303
305304 func getSharePrice (shareId) = {
306305 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
307306 let poolAddr = Address(fromBase58String(pool))
308307 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
309- let $t090179082 = getPoolData(poolAddr, pType)
310- let aId = $t090179082._1
311- let bId = $t090179082._2
312- let aBalance = $t090179082._3
313- let bBalance = $t090179082._4
314- let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
315- if ($isInstanceOf(@, "(Int, Int)"))
316- then @
317- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
318- let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
319- if ($isInstanceOf(@, "(Int, Int)"))
320- then @
321- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
308+ let $t092109275 = getPoolData(poolAddr, pType)
309+ let aId = $t092109275._1
310+ let bId = $t092109275._2
311+ let aBalance = $t092109275._3
312+ let bBalance = $t092109275._4
313+ let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
314+ let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
322315 let shareSupply = getShareSupply(poolAddr, pType, shareId)
323316 let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
324317 let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
325318 let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
326319 let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision))
327320 fraction(sum, sharePrecision, shareSupply)
328321 }
329322
330323
331324 func getSharePrices (shareIds) = {
332325 func getPrices (a,shareId) = (a :+ getSharePrice(shareId))
333326
334327 let $l = shareIds
335328 let $s = size($l)
336329 let $acc0 = nil
337330 func $f0_1 ($a,$i) = if (($i >= $s))
338331 then $a
339332 else getPrices($a, $l[$i])
340333
341334 func $f0_2 ($a,$i) = if (($i >= $s))
342335 then $a
343336 else throw("List size exceeds 20")
344337
345338 $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)
346339 }
347340
348341
349342 func getCursEntries (aId,bId,shareId) = {
350343 let assetsPrices = getAssetsPrice([aId, bId])
351344 let sharePrice = getSharePrice(shareId)
352345 let prices = [toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice)]
353346 [StringEntry(kTokenLastPrice, makeString(prices, ","))]
354347 }
355348
356349
357350 func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = if ((pType == SF_POOL))
358351 then {
359352 let repl = {
360353 let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishTwoTokensREADONLY", [toString(pmtA), toString(pmtB)]], nil)
361354 if ($isInstanceOf(@, "List[Any]"))
362355 then @
363356 else throw(($getType(@) + " couldn't be cast to List[Any]"))
364357 }
365358 if ((repl == repl))
366359 then $Tuple5({
367360 let @ = repl[3]
368361 if ($isInstanceOf(@, "Int"))
369362 then @
370363 else throw(($getType(@) + " couldn't be cast to Int"))
371364 }, {
372365 let @ = repl[4]
373366 if ($isInstanceOf(@, "Int"))
374367 then @
375368 else throw(($getType(@) + " couldn't be cast to Int"))
376369 }, {
377370 let @ = repl[1]
378371 if ($isInstanceOf(@, "Int"))
379372 then @
380373 else throw(($getType(@) + " couldn't be cast to Int"))
381374 }, assetIdToStr(repl[2]), {
382375 let @ = repl[0]
383376 if ($isInstanceOf(@, "Int"))
384377 then @
385378 else throw(($getType(@) + " couldn't be cast to Int"))
386379 })
387380 else throw("Strict value is not equal to itself.")
388381 }
389382 else {
390- let $t01061210862 = $Tuple2(split({
383+ let $t01075911009 = $Tuple2(split({
391384 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
392385 if ($isInstanceOf(@, "String"))
393386 then @
394387 else throw(($getType(@) + " couldn't be cast to String"))
395388 }, "__"), split({
396389 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
397390 if ($isInstanceOf(@, "String"))
398391 then @
399392 else throw(($getType(@) + " couldn't be cast to String"))
400393 }, "__"))
401- if (($t01061210862 == $t01061210862))
394+ if (($t01075911009 == $t01075911009))
402395 then {
403- let evalPutInB = $t01061210862._2
404- let evalPutInA = $t01061210862._1
396+ let evalPutInB = $t01075911009._2
397+ let evalPutInA = $t01075911009._1
405398 let lpInA = parseIntValue(evalPutInA[1])
406399 let lpInB = parseIntValue(evalPutInB[1])
407400 if ((lpInB > lpInA))
408401 then {
409402 let pmt = parseIntValue(evalPutInA[8])
410403 $Tuple5(pmtA, pmt, (pmtB - pmt), bId, lpInB)
411404 }
412405 else {
413406 let pmt = parseIntValue(evalPutInA[8])
414407 $Tuple5(pmt, pmtB, (pmtA - pmt), aId, lpInA)
415408 }
416409 }
417410 else throw("Strict value is not equal to itself.")
418411 }
419412
420413
421414 func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = {
422415 let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)]
423416 if ((pType == SF_POOL))
424417 then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
425418 else invoke(poolAddr, "put", [1000000, false], payments)
426419 }
427420
428421
429422 func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = {
430423 let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)]
431424 if ((pType == SF_POOL))
432425 then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments)
433426 else invoke(poolAddr, "putOneTkn", [0, false], payments)
434427 }
435428
436429
437430 func stakeLP (pool,pType,shareId,amount) = {
438431 let payments = [AttachedPayment(fromBase58String(shareId), amount)]
439432 if ((pType == SF_POOL))
440433 then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments)
441434 else invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments)
442435 }
443436
444437
445438 func unstakeLP (pool,pType,shareId,amount) = {
446- let $t01234712704 = if ((pType == SF_POOL))
439+ let $t01249412851 = if ((pType == SF_POOL))
447440 then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
448441 else if ((pType == WX_POOL))
449442 then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
450443 else throw("Wrong pool type")
451- let farmAddr = $t01234712704._1
452- let fName = $t01234712704._2
453- let params = $t01234712704._3
444+ let farmAddr = $t01249412851._1
445+ let fName = $t01249412851._2
446+ let params = $t01249412851._3
454447 let inv = invoke(farmAddr, fName, params, nil)
455448 if ((inv == inv))
456449 then amount
457450 else throw("Strict value is not equal to itself.")
458451 }
459452
460453
461454 func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
462455 let poolAddr = Address(fromBase58String(pool))
463456 let feeScale6 = 1000000
464457 let fee = getIntegerValue(poolAddr, kSFPoolFee)
465458 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
466- let $t01311713405 = if ((assetTokenToGet == assetIdA))
459+ let $t01326413552 = if ((assetTokenToGet == assetIdA))
467460 then {
468461 let amountToPay = fraction(amntGetNoFee, balB, (balA - amntGetNoFee))
469462 $Tuple2(amountToPay, assetIdB)
470463 }
471464 else {
472465 let amountToPay = fraction(amntGetNoFee, balA, (balB - amntGetNoFee))
473466 $Tuple2(amountToPay, assetIdA)
474467 }
475- let amountToPay = $t01311713405._1
476- let assetToPay = $t01311713405._2
468+ let amountToPay = $t01326413552._1
469+ let assetToPay = $t01326413552._2
477470 $Tuple2(assetToPay, amountToPay)
478471 }
479472
480473
481474 func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
482475 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
483476 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
484477 let feeScale = toBigInt(100000000)
485- let $t01374414052 = if ((assetTokenToGet == assetIdA))
478+ let $t01389114199 = if ((assetTokenToGet == assetIdA))
486479 then {
487480 let amountToPay = fraction(amountTokenToGet, balB, (balA - amountTokenToGet))
488481 $Tuple2(amountToPay, assetIdB)
489482 }
490483 else {
491484 let amountToPay = fraction(amountTokenToGet, balA, (balB - amountTokenToGet))
492485 $Tuple2(amountToPay, assetIdA)
493486 }
494- let amountToPay = $t01374414052._1
495- let assetToPay = $t01374414052._2
487+ let amountToPay = $t01389114199._1
488+ let assetToPay = $t01389114199._2
496489 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))), CEILING))
497490 $Tuple2(assetToPay, fraction(amountToPayWithFee, 102, 100))
498491 }
499492
500493
501494 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
502495 then {
503- let $t01441514537 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
504- let assetToPay = $t01441514537._1
505- let amountToPay = $t01441514537._2
496+ let $t01456214684 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
497+ let assetToPay = $t01456214684._1
498+ let amountToPay = $t01456214684._2
506499 invoke(addressFromStringValue(pool), "callFunction", ["exchange", [toString(amountTokenToGet)]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
507500 }
508501 else {
509- let $t01471214834 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
510- let assetToPay = $t01471214834._1
511- let amountToPay = $t01471214834._2
502+ let $t01485914981 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
503+ let assetToPay = $t01485914981._1
504+ let amountToPay = $t01485914981._2
512505 invoke(wxSwapContract, "swap", [amountTokenToGet, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
513506 }
514507
515508
516509 func calcReplenishLPVirt (pType,pool,pmtA,aId,pmtB,bId,balA,balB) = {
517510 let poolAddr = addressFromStringValue(pool)
518511 if ((pType == SF_POOL))
519512 then {
520513 let inv = {
521514 let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishDiffPropREADONLY", [toString(pmtA), toString(pmtB), "0"]], nil)
522515 if ($isInstanceOf(@, "List[Any]"))
523516 then @
524517 else throw(($getType(@) + " couldn't be cast to List[Any]"))
525518 }
526519 if ((inv == inv))
527520 then $Tuple2({
528521 let @ = inv[0]
529522 if ($isInstanceOf(@, "Int"))
530523 then @
531524 else throw(($getType(@) + " couldn't be cast to Int"))
532525 }, {
533526 let @ = inv[1]
534527 if ($isInstanceOf(@, "Int"))
535528 then @
536529 else throw(($getType(@) + " couldn't be cast to Int"))
537530 })
538531 else throw("Strict value is not equal to itself.")
539532 }
540533 else if ((pType == WX_POOL))
541534 then {
542- let $t01543715778 = if (if ((pmtA > 0))
535+ let $t01558415925 = if (if ((pmtA > 0))
543536 then (pmtB > 0)
544537 else false)
545538 then {
546- let $t01551815644 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
547- let pmtInA = $t01551815644._1
548- let pmtInB = $t01551815644._2
549- let change = $t01551815644._3
550- let changeId = $t01551815644._4
551- let lpAmount = $t01551815644._5
539+ let $t01566515791 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
540+ let pmtInA = $t01566515791._1
541+ let pmtInB = $t01566515791._2
542+ let change = $t01566515791._3
543+ let changeId = $t01566515791._4
544+ let lpAmount = $t01566515791._5
552545 $Tuple3(change, changeId, lpAmount)
553546 }
554547 else if ((pmtA > 0))
555548 then $Tuple3(pmtA, aId, 0)
556549 else $Tuple3(pmtB, bId, 0)
557- let change = $t01543715778._1
558- let changeId = $t01543715778._2
559- let lpTwo = $t01543715778._3
560- let $t01578516001 = if ((change > 0))
550+ let change = $t01558415925._1
551+ let changeId = $t01558415925._2
552+ let lpTwo = $t01558415925._3
553+ let $t01593216148 = if ((change > 0))
561554 then {
562555 let inv = {
563556 let @ = invoke(poolAddr, "putOneTknREADONLY", [changeId, change], nil)
564557 if ($isInstanceOf(@, "(Int, Int, Int)"))
565558 then @
566559 else throw(($getType(@) + " couldn't be cast to (Int, Int, Int)"))
567560 }
568561 if ((inv == inv))
569562 then $Tuple2(inv._1, inv._3)
570563 else throw("Strict value is not equal to itself.")
571564 }
572565 else $Tuple2(0, 0)
573- let lpOne = $t01578516001._1
574- let loss = $t01578516001._2
566+ let lpOne = $t01593216148._1
567+ let loss = $t01593216148._2
575568 $Tuple2((lpTwo + lpOne), loss)
576569 }
577570 else throw("Wrong pool type")
578571 }
579572
580573
581574 func calcWithdrawLPVirt (pType,pool,lpAmount,shareId,aId,bId,balA,balB,borrowAmount,borrowAssetId) = {
582575 let poolAddr = addressFromStringValue(pool)
583- let $t01629516795 = if ((pType == SF_POOL))
576+ let $t01644216942 = if ((pType == SF_POOL))
584577 then {
585578 let inv = {
586579 let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(lpAmount), toString(balA), toString(balB)]], nil)
587580 if ($isInstanceOf(@, "List[Any]"))
588581 then @
589582 else throw(($getType(@) + " couldn't be cast to List[Any]"))
590583 }
591584 if ((inv == inv))
592585 then $Tuple2({
593586 let @ = inv[0]
594587 if ($isInstanceOf(@, "Int"))
595588 then @
596589 else throw(($getType(@) + " couldn't be cast to Int"))
597590 }, {
598591 let @ = inv[1]
599592 if ($isInstanceOf(@, "Int"))
600593 then @
601594 else throw(($getType(@) + " couldn't be cast to Int"))
602595 })
603596 else throw("Strict value is not equal to itself.")
604597 }
605598 else if ((pType == WX_POOL))
606599 then {
607600 let get = split({
608601 let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, lpAmount], nil)
609602 if ($isInstanceOf(@, "String"))
610603 then @
611604 else throw(($getType(@) + " couldn't be cast to String"))
612605 }, "__")
613606 if ((get == get))
614607 then $Tuple2(parseIntValue(get[1]), parseIntValue(get[2]))
615608 else throw("Strict value is not equal to itself.")
616609 }
617610 else throw("Wrong pool type")
618- let getAmountA = $t01629516795._1
619- let getAmountB = $t01629516795._2
611+ let getAmountA = $t01644216942._1
612+ let getAmountB = $t01644216942._2
620613 if ((borrowAmount > 0))
621614 then {
622615 let amountToGetEx = if (if ((borrowAssetId == aId))
623616 then (borrowAmount > getAmountA)
624617 else false)
625618 then (borrowAmount - getAmountA)
626619 else if (if ((borrowAssetId == bId))
627620 then (borrowAmount > getAmountB)
628621 else false)
629622 then (borrowAmount - getAmountB)
630623 else 0
631- let $t01707317376 = if ((amountToGetEx > 0))
624+ let $t01722017523 = if ((amountToGetEx > 0))
632625 then if ((pType == SF_POOL))
633626 then calcAmountToPaySF(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
634627 else calcAmountToPayWX(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId)
635628 else $Tuple2("", 0)
636- let assetToPay = $t01707317376._1
637- let amountToPay = $t01707317376._2
629+ let assetToPay = $t01722017523._1
630+ let amountToPay = $t01722017523._2
638631 if ((borrowAssetId == aId))
639632 then $Tuple2(((getAmountA + amountToGetEx) - borrowAmount), (getAmountB - amountToPay))
640633 else $Tuple2((getAmountA - amountToPay), ((getAmountB + amountToGetEx) - borrowAmount))
641634 }
642635 else $Tuple2(getAmountA, getAmountB)
643636 }
644637
645638
646639 func claimFarmed (type,pool) = if ((type == SF_POOL))
647640 then {
648641 let balBefore = accountBalance(SWOPID)
649642 if ((balBefore == balBefore))
650643 then {
651644 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
652645 if ((inv == inv))
653646 then {
654647 let balAfter = accountBalance(SWOPID)
655648 $Tuple2((balAfter - balBefore), SWOPID)
656649 }
657650 else throw("Strict value is not equal to itself.")
658651 }
659652 else throw("Strict value is not equal to itself.")
660653 }
661654 else if ((type == WX_POOL))
662655 then {
663656 let balBefore = accountBalance(WXID)
664657 if ((balBefore == balBefore))
665658 then {
666659 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
667660 if ((inv == inv))
668661 then {
669662 let balAfter = accountBalance(WXID)
670663 $Tuple2((balAfter - balBefore), WXID)
671664 }
672665 else throw("Strict value is not equal to itself.")
673666 }
674667 else throw("Strict value is not equal to itself.")
675668 }
676669 else throw("Wrong pool type")
677670
678671
679672 func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = {
680673 let lpBalanceBefore = accountBalance(fromBase58String(LPId))
681674 if ((lpBalanceBefore == lpBalanceBefore))
682675 then {
683676 let poolAddr = addressFromStringValue(pool)
684- let $t01857318989 = if (if ((pmtA > 0))
677+ let $t01872019136 = if (if ((pmtA > 0))
685678 then (pmtB > 0)
686679 else false)
687680 then {
688- let $t01863918755 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
689- let pmtInA = $t01863918755._1
690- let pmtInB = $t01863918755._2
691- let change = $t01863918755._3
692- let changeId = $t01863918755._4
681+ let $t01878618902 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
682+ let pmtInA = $t01878618902._1
683+ let pmtInB = $t01878618902._2
684+ let change = $t01878618902._3
685+ let changeId = $t01878618902._4
693686 let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
694687 if ((inv == inv))
695688 then $Tuple2(change, changeId)
696689 else throw("Strict value is not equal to itself.")
697690 }
698691 else if ((pmtA > 0))
699692 then $Tuple2(pmtA, aId)
700693 else if ((pmtB > 0))
701694 then $Tuple2(pmtB, bId)
702695 else throw("pmts must be > 0")
703- let change = $t01857318989._1
704- let changeId = $t01857318989._2
696+ let change = $t01872019136._1
697+ let changeId = $t01872019136._2
705698 let inv = if ((change > 0))
706699 then replenishOneTokenByType(poolAddr, pType, change, changeId)
707700 else nil
708701 if ((inv == inv))
709702 then {
710703 let lpBalanceAfter = accountBalance(fromBase58String(LPId))
711704 let totalStaked = (lpBalanceAfter - lpBalanceBefore)
712705 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
713706 let userShareForStake = (totalStaked - axlyFeeAmount)
714707 if ((0 >= userShareForStake))
715708 then throw("amount of staked sharetokens must be > 0")
716709 else {
717710 let invLP = stakeLP(pool, pType, LPId, userShareForStake)
718711 if ((invLP == invLP))
719712 then $Tuple2(userShareForStake, axlyFeeAmount)
720713 else throw("Strict value is not equal to itself.")
721714 }
722715 }
723716 else throw("Strict value is not equal to itself.")
724717 }
725718 else throw("Strict value is not equal to itself.")
726719 }
727720
728721
729722 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
730723 let totalAmount = getPoolTotalShare(pool)
731724 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
732- let $t01984720085 = if (withLoan)
725+ let $t01999420232 = if (withLoan)
733726 then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
734727 else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
735- let curPoolInterest = $t01984720085._1
736- let totalStakedWithLoan = $t01984720085._2
728+ let curPoolInterest = $t01999420232._1
729+ let totalStakedWithLoan = $t01999420232._2
737730 [IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), totalStakedWithLoan), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), StringEntry((((user + "_") + toString(posNum)) + kUserPositionPool), pool), IntegerEntry((user + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
738731 }
739732
740733
741734 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
742735 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
743736 if ((tokenBalanceBefore == tokenBalanceBefore))
744737 then {
745738 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
746739 if ((inv == inv))
747740 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
748741 else throw("Strict value is not equal to itself.")
749742 }
750743 else throw("Strict value is not equal to itself.")
751744 }
752745
753746
754747 func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
755748 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
756749 if ((tokenBalanceBefore == tokenBalanceBefore))
757750 then {
758751 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
759752 if ((inv == inv))
760753 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
761754 else throw("Strict value is not equal to itself.")
762755 }
763756 else throw("Strict value is not equal to itself.")
764757 }
765758
766759
767760 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
768761 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
769762 if ((tokenBalanceBefore == tokenBalanceBefore))
770763 then {
771764 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
772765 if ((inv == inv))
773766 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
774767 else throw("Strict value is not equal to itself.")
775768 }
776769 else throw("Strict value is not equal to itself.")
777770 }
778771
779772
780773 func capitalize (pool,pType,tokenId,tokenAmount) = {
781774 let poolAddr = Address(fromBase58String(pool))
782- let $t02243622502 = getPoolData(poolAddr, pType)
783- let AId = $t02243622502._1
784- let BId = $t02243622502._2
785- let balA = $t02243622502._3
786- let balB = $t02243622502._4
787- let shareId = $t02243622502._5
775+ let $t02258322649 = getPoolData(poolAddr, pType)
776+ let AId = $t02258322649._1
777+ let BId = $t02258322649._2
778+ let balA = $t02258322649._3
779+ let balB = $t02258322649._4
780+ let shareId = $t02258322649._5
788781 if (if ((tokenId != AId))
789782 then (tokenId != BId)
790783 else false)
791784 then throw("Wrong asset")
792785 else {
793- let $t02258722667 = if ((tokenId == AId))
786+ let $t02273422814 = if ((tokenId == AId))
794787 then $Tuple2(tokenAmount, 0)
795788 else $Tuple2(0, tokenAmount)
796- let pmtA = $t02258722667._1
797- let pmtB = $t02258722667._2
798- let $t02267022774 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
799- let stakedAmount = $t02267022774._1
800- let nf = $t02267022774._2
789+ let pmtA = $t02273422814._1
790+ let pmtB = $t02273422814._2
791+ let $t02281722921 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
792+ let stakedAmount = $t02281722921._1
793+ let nf = $t02281722921._2
801794 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
802795 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
803796 let totalShareAmount = getPoolTotalShare(pool)
804797 let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool)
805798 let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount)
806799 let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8)
807800 let stakedNoLoan = (stakedAmount - stakedLoan)
808801 let newInterestLoan = if ((totalShareAmountWithLoan > 0))
809802 then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan))
810803 else 0
811804 let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0))
812805 then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan)))
813806 else 0
814807 let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6)
815808 let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6)
816809 let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan))
817810 if ((axlyFee == axlyFee))
818811 then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId))
819812 else throw("Strict value is not equal to itself.")
820813 }
821814 }
822815
823816
824817 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
825818 let poolAddr = Address(fromBase58String(pool))
826819 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
827- let $t02454224618 = getPoolData(poolAddr, pType)
828- let assetIdA = $t02454224618._1
829- let assetIdB = $t02454224618._2
830- let balA = $t02454224618._3
831- let balB = $t02454224618._4
832- let shareId = $t02454224618._5
820+ let $t02468924765 = getPoolData(poolAddr, pType)
821+ let assetIdA = $t02468924765._1
822+ let assetIdB = $t02468924765._2
823+ let balA = $t02468924765._3
824+ let balB = $t02468924765._4
825+ let shareId = $t02468924765._5
833826 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
834827 if ((cBalABefore == cBalABefore))
835828 then {
836829 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
837830 if ((cBalBBefore == cBalBBefore))
838831 then {
839832 let inv = if ((pType == SF_POOL))
840833 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
841834 else {
842835 let inv = unstakeLP(pool, pType, shareId, userCanWithdraw)
843836 if ((inv == inv))
844837 then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)])
845838 else throw("Strict value is not equal to itself.")
846839 }
847840 if ((inv == inv))
848841 then {
849842 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
850843 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
851- let $t02518125270 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
852- let tokensAmountA = $t02518125270._1
853- let tokensAmountB = $t02518125270._2
854- let $t02527326093 = if ((debt > 0))
844+ let $t02532825417 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
845+ let tokensAmountA = $t02532825417._1
846+ let tokensAmountB = $t02532825417._2
847+ let $t02542026240 = if ((debt > 0))
855848 then {
856849 let amountToGetEx = if (if ((borrowAsset == assetIdA))
857850 then (debt > tokensAmountA)
858851 else false)
859852 then (debt - tokensAmountA)
860853 else if (if ((borrowAsset == assetIdB))
861854 then (debt > tokensAmountB)
862855 else false)
863856 then (debt - tokensAmountB)
864857 else 0
865858 let exInv = if ((amountToGetEx > 0))
866859 then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset)
867860 else 0
868861 if ((exInv == exInv))
869862 then {
870863 let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
871864 let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
872865 if ((borrowAsset == assetIdA))
873866 then $Tuple2(((cBalAAfterRepay - cBalABefore) - debt), (cBalBAfterRepay - cBalBBefore))
874867 else $Tuple2((cBalAAfterRepay - cBalABefore), ((cBalBAfterRepay - cBalBBefore) - debt))
875868 }
876869 else throw("Strict value is not equal to itself.")
877870 }
878871 else $Tuple2(tokensAmountA, tokensAmountB)
879- let toUserA = $t02527326093._1
880- let toUserB = $t02527326093._2
872+ let toUserA = $t02542026240._1
873+ let toUserB = $t02542026240._2
881874 $Tuple7(toUserA, assetIdA, toUserB, assetIdB, cBalAAfter, cBalBAfter, shareId)
882875 }
883876 else throw("Strict value is not equal to itself.")
884877 }
885878 else throw("Strict value is not equal to itself.")
886879 }
887880 else throw("Strict value is not equal to itself.")
888881 }
889882
890883
891884 func userCanWithdrawShareCalc (user,pool,posId,borrowed) = {
892885 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
893886 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest))
894887 let poolInterest = if (borrowed)
895888 then getIntegerValue(this, (pool + kPoolInterestLoan))
896889 else getIntegerValue(this, (pool + kPoolInterestNoLoan))
897890 (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10))
898891 }
899892
900893
901894 func withdrawToUser (user,pool,posId,stopLoss) = {
902895 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
903896 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0)
904897 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
905898 let poolTotalShare = getPoolTotalShare(pool)
906899 let userAddr = Address(fromBase58String(user))
907900 let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "")
908901 let debt = if ((borrowAmount > 0))
909902 then {
910903 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posId), borrowAsset], nil)
911904 if ($isInstanceOf(@, "Int"))
912905 then @
913906 else throw(($getType(@) + " couldn't be cast to Int"))
914907 }
915908 else 0
916- let $t02748127634 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
917- if (($t02748127634 == $t02748127634))
909+ let $t02762827781 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
910+ if (($t02762827781 == $t02762827781))
918911 then {
919- let shareId = $t02748127634._7
920- let cBalBAfter = $t02748127634._6
921- let cBalAAfter = $t02748127634._5
922- let assetIdB = $t02748127634._4
923- let toUserAmountB = $t02748127634._3
924- let assetIdA = $t02748127634._2
925- let toUserAmountA = $t02748127634._1
912+ let shareId = $t02762827781._7
913+ let cBalBAfter = $t02762827781._6
914+ let cBalAAfter = $t02762827781._5
915+ let assetIdB = $t02762827781._4
916+ let toUserAmountB = $t02762827781._3
917+ let assetIdA = $t02762827781._2
918+ let toUserAmountA = $t02762827781._1
926919 let closeDbtInv = if ((debt > 0))
927920 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
928921 else 0
929922 if ((closeDbtInv == closeDbtInv))
930923 then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId))
931924 else throw("Strict value is not equal to itself.")
932925 }
933926 else throw("Strict value is not equal to itself.")
934927 }
935928
936929
937930 func parseRequest (requestId) = {
938931 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
939932 let user = request[0]
940933 let pool = request[1]
941934 let pmtA = parseIntValue(request[2])
942935 let AId = request[3]
943936 let pmtB = parseIntValue(request[4])
944937 let BId = request[5]
945938 let balA = parseIntValue(request[6])
946939 let balB = parseIntValue(request[7])
947940 let shareId = request[8]
948941 let bwAsset = request[9]
949942 let bwAmount = parseIntValue(request[10])
950943 $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
951944 }
952945
953946
954947 func calcBorrowAmount (pmtA,pmtB,aId,bId,leverage,borrowId) = {
955- let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
956- if ($isInstanceOf(@, "(Int, Int)"))
957- then @
958- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
959- let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
960- if ($isInstanceOf(@, "(Int, Int)"))
961- then @
962- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
948+ let dPriceA = getIntegerValue(priceOracleAddr, (aId + kPriceInOracle))
949+ let dPriceB = getIntegerValue(priceOracleAddr, (bId + kPriceInOracle))
963950 let decPrA = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
964951 let decPrB = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
965952 let paydInDollar = (fraction(dPriceA, pmtA, decPrA) + fraction(dPriceB, pmtB, decPrB))
966- let $t02932029417 = if ((borrowId == aId))
953+ let $t02942129518 = if ((borrowId == aId))
967954 then $Tuple2(dPriceA, decPrA)
968955 else $Tuple2(dPriceB, decPrB)
969- let borrowPrice = $t02932029417._1
970- let borrowDecPr = $t02932029417._2
956+ let borrowPrice = $t02942129518._1
957+ let borrowDecPr = $t02942129518._2
971958 fraction(fraction(paydInDollar, (leverage - 100), 100), borrowDecPr, borrowPrice)
972959 }
973960
974961
975962 @Callable(i)
976963 func calcPriceImpactEVALONLY (pool,leverage,borrowId,pmtA,pmtB) = if (if ((100 > leverage))
977964 then true
978965 else (leverage > 300))
979966 then throw("Leverage can't be <100 and >300")
980967 else {
981968 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
982- let $t02983529925 = getPoolData(Address(fromBase58String(pool)), pType)
983- let AId = $t02983529925._1
984- let BId = $t02983529925._2
985- let balA = $t02983529925._3
986- let balB = $t02983529925._4
987- let shareId = $t02983529925._5
969+ let $t02993630026 = getPoolData(Address(fromBase58String(pool)), pType)
970+ let AId = $t02993630026._1
971+ let BId = $t02993630026._2
972+ let balA = $t02993630026._3
973+ let balB = $t02993630026._4
974+ let shareId = $t02993630026._5
988975 let borrowAmount = if ((leverage > 100))
989976 then calcBorrowAmount(pmtA, pmtB, AId, BId, leverage, borrowId)
990977 else 0
991- let $t03006030167 = if ((borrowId == AId))
978+ let $t03016130268 = if ((borrowId == AId))
992979 then $Tuple2((pmtA + borrowAmount), pmtB)
993980 else $Tuple2(pmtA, (pmtB + borrowAmount))
994- let payInA = $t03006030167._1
995- let payInB = $t03006030167._2
996- let $t03017030263 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
997- let lpAmount = $t03017030263._1
998- let loss = $t03017030263._2
981+ let payInA = $t03016130268._1
982+ let payInB = $t03016130268._2
983+ let $t03027130364 = calcReplenishLPVirt(pType, pool, payInA, AId, payInB, BId, balA, balB)
984+ let lpAmount = $t03027130364._1
985+ let loss = $t03027130364._2
999986 let impactMod = if ((0 > loss))
1000987 then (loss * -1)
1001988 else loss
1002989 $Tuple2(nil, [impactMod])
1003990 }
1004991
1005992
1006993
1007994 @Callable(i)
1008995 func getShareAssetPriceREADONLY (shareId) = {
1009996 let sharePrices = getSharePrice(shareId)
1010997 $Tuple2(nil, sharePrices)
1011998 }
1012999
10131000
10141001
10151002 @Callable(i)
10161003 func getUserPositionShareAmountREADONLY (user,posNum) = {
10171004 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position")
10181005 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount))
10191006 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0))
10201007 $Tuple2(nil, userCanWithdraw)
10211008 }
10221009
10231010
10241011
10251012 @Callable(i)
10261013 func getUserPositionInDollarsREADONLY (user,pools,posNum) = {
10271014 func userPos (a,pool) = {
1028- let $t03107631110 = a
1029- let totalPos = $t03107631110._1
1030- let posDebt = $t03107631110._2
1031- let index = $t03107631110._3
1015+ let $t03117731211 = a
1016+ let totalPos = $t03117731211._1
1017+ let posDebt = $t03117731211._2
1018+ let index = $t03117731211._3
10321019 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1033- let $t03120231292 = getPoolData(Address(fromBase58String(pool)), pType)
1034- let AId = $t03120231292._1
1035- let BId = $t03120231292._2
1036- let balA = $t03120231292._3
1037- let balB = $t03120231292._4
1038- let shareId = $t03120231292._5
1020+ let $t03130331393 = getPoolData(Address(fromBase58String(pool)), pType)
1021+ let AId = $t03130331393._1
1022+ let BId = $t03130331393._2
1023+ let balA = $t03130331393._3
1024+ let balB = $t03130331393._4
1025+ let shareId = $t03130331393._5
10391026 let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAmount)), 0)
10401027 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum[index], (borrowAmount > 0))
10411028 let sharePrices = getSharePrice(shareId)
10421029 let decPrShare = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
10431030 let shareD = fraction(userCanWithdraw, sharePrices, decPrShare)
10441031 if ((borrowAmount == 0))
10451032 then $Tuple3((totalPos :+ shareD), (posDebt :+ 0), (index + 1))
10461033 else {
10471034 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posNum[index]) + kUserBorrowAssetId))
10481035 let debt = {
10491036 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((user + "_") + posNum[index]), borrowAsset], nil)
10501037 if ($isInstanceOf(@, "Int"))
10511038 then @
10521039 else throw(($getType(@) + " couldn't be cast to Int"))
10531040 }
1054- let borrowAssetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [borrowAsset, false], nil)
1055- if ($isInstanceOf(@, "(Int, Int)"))
1056- then @
1057- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
1041+ let borrowAssetPrice = getIntegerValue(priceOracleAddr, (borrowAsset + kPriceInOracle))
10581042 let decPrBorrowId = pow(10, 0, getAssetDecimals(borrowAsset), 0, 0, DOWN)
10591043 let debtD = fraction(debt, borrowAssetPrice, decPrBorrowId)
10601044 $Tuple3((totalPos :+ shareD), (posDebt :+ debtD), (index + 1))
10611045 }
10621046 }
10631047
1064- let $t03233532390 = {
1048+ let $t03241332468 = {
10651049 let $l = pools
10661050 let $s = size($l)
10671051 let $acc0 = $Tuple3(nil, nil, 0)
10681052 func $f0_1 ($a,$i) = if (($i >= $s))
10691053 then $a
10701054 else userPos($a, $l[$i])
10711055
10721056 func $f0_2 ($a,$i) = if (($i >= $s))
10731057 then $a
10741058 else throw("List size exceeds 20")
10751059
10761060 $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)
10771061 }
1078- let pos = $t03233532390._1
1079- let debt = $t03233532390._2
1062+ let pos = $t03241332468._1
1063+ let debt = $t03241332468._2
10801064 $Tuple2(nil, $Tuple2(pos, debt))
10811065 }
10821066
10831067
10841068
10851069 @Callable(i)
10861070 func replenish (pool,leverage,borrowId) = if (if ((100 > leverage))
10871071 then true
10881072 else (leverage > 300))
10891073 then throw("Leverage can't be <100 and >300")
10901074 else if (if (!(getBooleanValue(this, (pool + kPoolCanBorrow))))
10911075 then (leverage > 100)
10921076 else false)
10931077 then throw("You can't borrow in this pool")
10941078 else {
10951079 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1096- let $t03283032920 = getPoolData(Address(fromBase58String(pool)), pType)
1097- let AId = $t03283032920._1
1098- let BId = $t03283032920._2
1099- let balA = $t03283032920._3
1100- let balB = $t03283032920._4
1101- let shareId = $t03283032920._5
1102- let $t03292333560 = if ((size(i.payments) == 2))
1080+ let $t03290832998 = getPoolData(Address(fromBase58String(pool)), pType)
1081+ let AId = $t03290832998._1
1082+ let BId = $t03290832998._2
1083+ let balA = $t03290832998._3
1084+ let balB = $t03290832998._4
1085+ let shareId = $t03290832998._5
1086+ let $t03300133638 = if ((size(i.payments) == 2))
11031087 then if ((assetIdToStr(i.payments[0].assetId) != AId))
11041088 then throw("Wrong payment asset A")
11051089 else if ((assetIdToStr(i.payments[1].assetId) != BId))
11061090 then throw("Wrong payment asset B")
11071091 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
11081092 else if ((size(i.payments) == 1))
11091093 then if ((assetIdToStr(i.payments[0].assetId) == AId))
11101094 then $Tuple4(i.payments[0].amount, AId, 0, BId)
11111095 else if ((assetIdToStr(i.payments[0].assetId) == BId))
11121096 then $Tuple4(0, AId, i.payments[0].amount, BId)
11131097 else throw("Wrong payment")
11141098 else throw("One or two payments expected")
1115- let pmtA = $t03292333560._1
1116- let pmtAssetA = $t03292333560._2
1117- let pmtB = $t03292333560._3
1118- let pmtAssetB = $t03292333560._4
1099+ let pmtA = $t03300133638._1
1100+ let pmtAssetA = $t03300133638._2
1101+ let pmtB = $t03300133638._3
1102+ let pmtAssetB = $t03300133638._4
11191103 let newPosNum = getNewUserPositionNumber(toString(i.caller))
11201104 if ((leverage > 100))
11211105 then {
11221106 let borrowAmount = calcBorrowAmount(pmtA, pmtB, pmtAssetA, pmtAssetB, leverage, borrowId)
11231107 let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowId, toString(borrowAmount)], ",")
11241108 let newRequestId = {
11251109 let @ = invoke(this, "createNewRequest", [request], nil)
11261110 if ($isInstanceOf(@, "Int"))
11271111 then @
11281112 else throw(($getType(@) + " couldn't be cast to Int"))
11291113 }
11301114 if ((newRequestId == newRequestId))
11311115 then {
11321116 let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
11331117 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
11341118 if ((inv == inv))
11351119 then nil
11361120 else throw("Strict value is not equal to itself.")
11371121 }
11381122 else throw("Strict value is not equal to itself.")
11391123 }
11401124 else {
1141- let $t03448834600 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1142- let userStaked = $t03448834600._1
1143- let axlyFee = $t03448834600._2
1125+ let $t03456634678 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1126+ let userStaked = $t03456634678._1
1127+ let axlyFee = $t03456634678._2
11441128 (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
11451129 }
11461130 }
11471131
11481132
11491133
11501134 @Callable(i)
11511135 func withdraw (pool,posId) = withdrawToUser(toString(i.caller), pool, toString(posId), false)
11521136
11531137
11541138
11551139 @Callable(i)
11561140 func createUpdateStopLoss (posId,poolId,assetId,price) = {
1157- let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
1158- if ($isInstanceOf(@, "(Int, Int)"))
1159- then @
1160- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
1141+ let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
11611142 if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
11621143 then throw("There are no user position")
11631144 else if ((0 >= price))
11641145 then throw("Price must be greater than 0")
11651146 else if ((price > tokenOraclePrice))
11661147 then throw("Price must be less than current token price")
11671148 else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)]
11681149 }
11691150
11701151
11711152
11721153 @Callable(i)
11731154 func deleteStopLoss (posId,poolId,assetId) = if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss)))))
11741155 then throw("No entry")
11751156 else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))]
11761157
11771158
11781159
11791160 @Callable(i)
11801161 func init (moneyBoxAddr,sfFarmingAddr,lendAddr,priceOracleAddr,keeperExContract,wxSwapContract,swopAssetId,wxAssetId,adminPubKey) = if (isDefined(getString(kMoneyBox)))
11811162 then throw("Already inited")
11821163 else [StringEntry(kMoneyBox, moneyBoxAddr), StringEntry(kSFFarmingAddr, sfFarmingAddr), StringEntry(kLendService, lendAddr), StringEntry(kPriceOracle, priceOracleAddr), StringEntry(kExContract, keeperExContract), StringEntry(kWxSwapContract, wxSwapContract), StringEntry(kSwopId, swopAssetId), StringEntry(kWxId, wxAssetId), StringEntry(kAdminCallPK, adminPubKey)]
11831164
11841165
11851166
11861167 @Callable(i)
11871168 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
11881169 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
11891170 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
11901171 })
11911172
11921173
11931174
11941175 @Callable(i)
11951176 func replenishFromLand (requestId) = valueOrElse(isLandCall(i), {
1196- let $t03708037184 = parseRequest(requestId)
1197- let user = $t03708037184._1
1198- let pool = $t03708037184._2
1199- let pmtA = $t03708037184._3
1200- let AId = $t03708037184._4
1201- let pmtB = $t03708037184._5
1202- let BId = $t03708037184._6
1203- let balA = $t03708037184._7
1204- let balB = $t03708037184._8
1205- let shareId = $t03708037184._9
1206- let bwAsset = $t03708037184._10
1207- let bwAmount = $t03708037184._11
1177+ let $t03713537239 = parseRequest(requestId)
1178+ let user = $t03713537239._1
1179+ let pool = $t03713537239._2
1180+ let pmtA = $t03713537239._3
1181+ let AId = $t03713537239._4
1182+ let pmtB = $t03713537239._5
1183+ let BId = $t03713537239._6
1184+ let balA = $t03713537239._7
1185+ let balB = $t03713537239._8
1186+ let shareId = $t03713537239._9
1187+ let bwAsset = $t03713537239._10
1188+ let bwAmount = $t03713537239._11
12081189 if ((size(i.payments) != 1))
12091190 then throw("Wrong payment size")
12101191 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
12111192 then true
12121193 else (i.payments[0].amount != bwAmount))
12131194 then throw("Wrong payment")
12141195 else {
1215- let $t03737437498 = if ((AId == bwAsset))
1196+ let $t03742937553 = if ((AId == bwAsset))
12161197 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
12171198 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
1218- let pmtAllA = $t03737437498._1
1219- let pmtAllB = $t03737437498._2
1199+ let pmtAllA = $t03742937553._1
1200+ let pmtAllB = $t03742937553._2
12201201 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
1221- let $t03758037695 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1222- let userStaked = $t03758037695._1
1223- let axlyFee = $t03758037695._2
1202+ let $t03763537750 = replenishByType(pType, pool, LOAN_FEE, pmtAllA, AId, pmtAllB, BId, balA, balB, shareId)
1203+ let userStaked = $t03763537750._1
1204+ let axlyFee = $t03763537750._2
12241205 let posNum = getNewUserPositionNumber(user)
12251206 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
12261207 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
12271208 $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
12281209 }
12291210 })
12301211
12311212
12321213
12331214 @Callable(i)
12341215 func liquidate (user,posId,liquidateAmount) = valueOrElse(isLandCall(i), {
12351216 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
12361217 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1237- let $t03847438564 = getPoolData(Address(fromBase58String(pool)), pType)
1238- let AId = $t03847438564._1
1239- let BId = $t03847438564._2
1240- let balA = $t03847438564._3
1241- let balB = $t03847438564._4
1242- let shareId = $t03847438564._5
1218+ let $t03852938619 = getPoolData(Address(fromBase58String(pool)), pType)
1219+ let AId = $t03852938619._1
1220+ let BId = $t03852938619._2
1221+ let balA = $t03852938619._3
1222+ let balB = $t03852938619._4
1223+ let shareId = $t03852938619._5
12431224 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
12441225 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
12451226 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
12461227 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
12471228 if ((borrowAmount == 0))
12481229 then throw("You can't liquidate position without borrow")
12491230 else [IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest), getIntegerValue(this, (pool + kPoolInterestLoan))), IntegerEntry((pool + kPoolTotalLoan), (getPoolTotalShareWithLoan(pool) - liquidateAmount)), IntegerEntry((pool + kPoolTotal), (getPoolTotalShare(pool) - liquidateAmount)), IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition), (userCanWithdraw - liquidateAmount)), ScriptTransfer(i.caller, amount, fromBase58String(shareId))]
12501231 })
12511232
12521233
12531234
12541235 @Callable(i)
12551236 func stopLoss (user,posId,pool,assetId) = valueOrElse(isAdminCall(i), {
1256- let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
1257- if ($isInstanceOf(@, "(Int, Int)"))
1258- then @
1259- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
1237+ let tokenOraclePrice = getIntegerValue(priceOracleAddr, (assetId + kPriceInOracle))
12601238 if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))))
12611239 then throw("No entry")
12621240 else (withdrawToUser(toString(i.caller), pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))
12631241 })
12641242
12651243
12661244
12671245 @Callable(i)
12681246 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = valueOrElse(isAdminCall(i), {
1269- let $t04035040544 = if (claim)
1247+ let $t04038240576 = if (claim)
12701248 then claimFarmed(type, pool)
12711249 else {
12721250 let claimedAsset = if ((type == SF_POOL))
12731251 then SWOPID
12741252 else WXID
12751253 $Tuple2(amountToExchange, claimedAsset)
12761254 }
1277- let claimedAmount = $t04035040544._1
1278- let claimedAsset = $t04035040544._2
1255+ let claimedAmount = $t04038240576._1
1256+ let claimedAsset = $t04038240576._2
12791257 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
12801258 let change = (claimedAmount - amountToExchange)
12811259 let changeEntry = if ((change > 0))
12821260 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
12831261 else nil
12841262 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
12851263 })
12861264
12871265
12881266
12891267 @Callable(i)
12901268 func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = valueOrElse(isAdminCall(i), {
1291- let $t04122941423 = if (claim)
1269+ let $t04126141455 = if (claim)
12921270 then claimFarmed(type, pool)
12931271 else {
12941272 let claimedAsset = if ((type == SF_POOL))
12951273 then SWOPID
12961274 else WXID
12971275 $Tuple2(amountToExchange, claimedAsset)
12981276 }
1299- let claimedAmount = $t04122941423._1
1300- let claimedAsset = $t04122941423._2
1277+ let claimedAmount = $t04126141455._1
1278+ let claimedAsset = $t04126141455._2
13011279 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
13021280 let change = (claimedAmount - amountToExchange)
13031281 let changeEntry = if ((change > 0))
13041282 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
13051283 else nil
13061284 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
13071285 })
13081286
13091287
13101288
13111289 @Callable(i)
13121290 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = valueOrElse(isAdminCall(i), {
1313- let $t04217442368 = if (claim)
1291+ let $t04220642400 = if (claim)
13141292 then claimFarmed(type, pool)
13151293 else {
13161294 let claimedAsset = if ((type == SF_POOL))
13171295 then SWOPID
13181296 else WXID
13191297 $Tuple2(amountToExchange, claimedAsset)
13201298 }
1321- let claimedAmount = $t04217442368._1
1322- let claimedAsset = $t04217442368._2
1299+ let claimedAmount = $t04220642400._1
1300+ let claimedAsset = $t04220642400._2
13231301 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
13241302 let change = (claimedAmount - amountToExchange)
13251303 let changeEntry = if ((change > 0))
13261304 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
13271305 else nil
13281306 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
13291307 })
13301308
13311309
13321310
13331311 @Callable(i)
13341312 func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan,canBorrow) = valueOrElse(isAdminCall(i), if (if ((type != SF_POOL))
13351313 then (type != WX_POOL)
13361314 else false)
13371315 then throw("Wrong type")
13381316 else {
1339- let $t04310943203 = getPoolData(Address(fromBase58String(poolAddr)), type)
1340- let aId = $t04310943203._1
1341- let bId = $t04310943203._2
1342- let aBal = $t04310943203._3
1343- let bBal = $t04310943203._4
1344- let shareId = $t04310943203._5
1317+ let $t04314143235 = getPoolData(Address(fromBase58String(poolAddr)), type)
1318+ let aId = $t04314143235._1
1319+ let bId = $t04314143235._2
1320+ let aBal = $t04314143235._3
1321+ let bBal = $t04314143235._4
1322+ let shareId = $t04314143235._5
13451323 [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr), BooleanEntry((poolAddr + kPoolCanBorrow), canBorrow)]
13461324 })
13471325
13481326
13491327 @Verifier(tx)
13501328 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
13511329

github/deemru/w8io/026f985 
207.83 ms