tx · G3JAdpq4Jv68ad3r8K5MfoR6xRzXRKU5AKfKPiTPMLfk

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.32000000 Waves

2023.04.20 10:50 [2542593] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "G3JAdpq4Jv68ad3r8K5MfoR6xRzXRKU5AKfKPiTPMLfk", "fee": 32000000, "feeAssetId": null, "timestamp": 1681977024482, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "5xnpxV4XmnmKRGzMjBuMF8SeR6ne339z1nrxJDWDD1z4gD9GQHMcSyDNv5YE8FvVR3KmMsVW1SFrnkEmvpRzqGMF" ], "script": "base64:BgJlCAISAwoBCBIDCgEIEgUKAwgBCBIDCgEIEgUKAwgBCBIDCgEIEgQKAggBEgMKAQgSDgoMCAgIAQQRGBgRAQEYEgoKCAgICAEECAEYEg4KDAgICAEEGBgYGBgBGBIICgYICAEBAQFJAAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4ACExPQU5fRkVFAgRsb2FuAAtOT19MT0FOX0ZFRQIGbm9Mb2FuAAZTQ0FMRTgAgMLXLwAHU0NBTEUxMACAyK+gJQAKRkVFX1NDQUxFNgDAhD0AFGtTRlBvb2xBQXNzZXRCYWxhbmNlAg9BX2Fzc2V0X2JhbGFuY2UAFGtTRlBvb2xCQXNzZXRCYWxhbmNlAg9CX2Fzc2V0X2JhbGFuY2UAD2tTRlBvb2xBQXNzZXRJZAIKQV9hc3NldF9pZAAPa1NGUG9vbEJBc3NldElkAgpCX2Fzc2V0X2lkAA5rU0ZQb29sU2hhcmVJZAIOc2hhcmVfY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rUG9vbEludGVyZXN0AAAJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQVrUG9vbAUIcG9vbEFkZHIFBHR5cGUJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQdzaGFyZUlkBQprU2hhcmVQb29sBQhwb29sQWRkcgUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleecYp4I=", "height": 2542593, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3hoWt5UxKr2tE3ZN9Rdp28thqzX28PitvoW7kvgnDkXN Next: D5fR9GKAFo54kJi9S7gKH27SmohD7tgNEpmujjBqCHFk Diff:
OldNewDifferences
55
66 let WX_POOL = "WX"
77
8-let CAP_FEE = "cap"
8+let CAP_FEE_NO_LOAN = "capNoLoan"
9+
10+let CAP_FEE_LOAN = "capLoan"
911
1012 let LOAN_FEE = "loan"
1113
4143
4244 let kPoolTotal = "_pool_total"
4345
46+let kPoolTotalLoan = "_pool_total_loan"
47+
4448 let kPoolInterest = "_pool_interest"
4549
4650 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
4751
4852 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
4953
50-let kAxlyCapFee = "_axly_fee_cap"
54+let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan"
55+
56+let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan"
5157
5258 let kRequestId = "_request_id"
5359
5460 let kRequestIter = "requests_iter"
5561
5662 let kPool = "pool_"
63+
64+let kSharePool = "_pool_share_id"
5765
5866 let kPoolCapChange = "_pool_cap_change"
5967
107115 else throw(($getType(@) + " couldn't be cast to List[Any]"))
108116 }
109117 if ((cfg == cfg))
110- then $Tuple5(valueOrErrorMessage({
111- let @ = cfg[4]
112- if ($isInstanceOf(@, "String"))
113- then @
114- else unit
115- }, "Can't get pool A asset id"), valueOrErrorMessage({
116- let @ = cfg[5]
117- if ($isInstanceOf(@, "String"))
118- then @
119- else unit
120- }, "Can't get pool B asset id"), 0, 0, valueOrErrorMessage({
121- let @ = cfg[3]
122- if ($isInstanceOf(@, "String"))
123- then @
124- else unit
125- }, "Can't get pool LP asset id"))
118+ then {
119+ let aId = valueOrErrorMessage({
120+ let @ = cfg[4]
121+ if ($isInstanceOf(@, "String"))
122+ then @
123+ else unit
124+ }, "Can't get pool A asset id")
125+ let bId = valueOrErrorMessage({
126+ let @ = cfg[5]
127+ if ($isInstanceOf(@, "String"))
128+ then @
129+ else unit
130+ }, "Can't get pool B asset id")
131+ let shareId = valueOrErrorMessage({
132+ let @ = cfg[3]
133+ if ($isInstanceOf(@, "String"))
134+ then @
135+ else unit
136+ }, "Can't get pool LP asset id")
137+ let balA = {
138+ let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil)
139+ if ($isInstanceOf(@, "Int"))
140+ then @
141+ else throw(($getType(@) + " couldn't be cast to Int"))
142+ }
143+ if ((balA == balA))
144+ then {
145+ let balB = {
146+ let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil)
147+ if ($isInstanceOf(@, "Int"))
148+ then @
149+ else throw(($getType(@) + " couldn't be cast to Int"))
150+ }
151+ if ((balB == balB))
152+ then $Tuple5(aId, bId, balA, balB, shareId)
153+ else throw("Strict value is not equal to itself.")
154+ }
155+ else throw("Strict value is not equal to itself.")
156+ }
126157 else throw("Strict value is not equal to itself.")
127158 }
128159
137168 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
138169
139170
171+func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0)
172+
173+
140174 func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (((pool + "_") + user) + kUserPositionNum)), 0) + 1)
141175
142176
143-func getAxlyFee (pool,feeType) = if ((feeType == "cap"))
144- then getIntegerValue(this, (pool + kAxlyCapFee))
145- else if ((feeType == "loan"))
146- then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
147- else if ((feeType == "noLoan"))
148- then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
149- else throw("Wrong fee type")
177+func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN))
178+ then getIntegerValue(this, (pool + kAxlyWithLoanCapFee))
179+ else if ((feeType == CAP_FEE_NO_LOAN))
180+ then getIntegerValue(this, (pool + kAxlyNoLoanCapFee))
181+ else if ((feeType == LOAN_FEE))
182+ then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
183+ else if ((feeType == NO_LOAN_FEE))
184+ then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
185+ else throw("Wrong fee type")
150186
151187
152188 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
194230 let poolAddr = Address(fromBase58String(pool))
195231 let ratioA = fraction(SCALE8, pmtA, balA)
196232 let ratioB = fraction(SCALE8, pmtB, balB)
197- let $t063976689 = if ((ratioB > ratioA))
233+ let $t071357427 = if ((ratioB > ratioA))
198234 then {
199235 let pmt = fraction(balB, ratioA, SCALE8, CEILING)
200236 $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
203239 let pmt = fraction(balA, ratioB, SCALE8, CEILING)
204240 $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
205241 }
206- let pmtAmountA = $t063976689._1
207- let pmtAmountB = $t063976689._2
208- let change = $t063976689._3
209- let changeAssetId = $t063976689._4
242+ let pmtAmountA = $t071357427._1
243+ let pmtAmountB = $t071357427._2
244+ let change = $t071357427._3
245+ let changeAssetId = $t071357427._4
210246 let inv1 = if (if ((pmtAmountA > 0))
211247 then (pmtAmountB > 0)
212248 else false)
249285
250286 func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = {
251287 let poolAddr = Address(fromBase58String(pool))
252- let $t081408989 = if (if ((pmtA > 0))
288+ let $t088789727 = if (if ((pmtA > 0))
253289 then (pmtB > 0)
254290 else false)
255291 then {
290326 else if ((pmtB > 0))
291327 then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB)
292328 else throw("pmts must be > 0")
293- let pmtAmountA = $t081408989._1
294- let pmtAmountB = $t081408989._2
295- let change = $t081408989._3
296- let changeAssetId = $t081408989._4
329+ let pmtAmountA = $t088789727._1
330+ let pmtAmountB = $t088789727._2
331+ let change = $t088789727._3
332+ let changeAssetId = $t088789727._4
297333 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
298334 if ((shareBalanceBefore == shareBalanceBefore))
299335 then {
345381
346382 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type) = {
347383 let totalAmount = getPoolTotalShare(pool)
384+ let totalAmountLoan = getPoolTotalShareWithLoan(pool)
348385 let curPoolInterest = getIntegerValue(this, (pool + kPoolInterest))
349-[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
386+[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), (totalAmountLoan + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
350387 }
351388
352389
424461
425462 func capitalize (pool,pType,tokenId,tokenAmount) = {
426463 let poolAddr = Address(fromBase58String(pool))
427- let $t01382413903 = getPoolData(poolAddr, pType)
428- let AId = $t01382413903._1
429- let BId = $t01382413903._2
430- let balA = $t01382413903._3
431- let balB = $t01382413903._4
432- let shareId = $t01382413903._5
433- let $t01390613986 = if ((tokenId == AId))
464+ let $t01469114770 = getPoolData(poolAddr, pType)
465+ let AId = $t01469114770._1
466+ let BId = $t01469114770._2
467+ let balA = $t01469114770._3
468+ let balB = $t01469114770._4
469+ let shareId = $t01469114770._5
470+ let $t01477314853 = if ((tokenId == AId))
434471 then $Tuple2(tokenAmount, 0)
435472 else $Tuple2(0, tokenAmount)
436- let pmtA = $t01390613986._1
437- let pmtB = $t01390613986._2
438- let $t01398914099 = replenishByType(pType, pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
439- let stakedAmount = $t01398914099._1
440- let axlyFee = $t01398914099._2
473+ let pmtA = $t01477314853._1
474+ let pmtB = $t01477314853._2
475+ let $t01485614971 = replenishByType(pType, pool, CAP_FEE_LOAN, pmtA, AId, pmtB, BId, balA, balB, shareId)
476+ let stakedAmount = $t01485614971._1
477+ let axlyFee = $t01485614971._2
441478 let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
442479 let totalShareAmount = getPoolTotalShare(pool)
443480 let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount))
450487 let feeScale6 = 1000000
451488 let fee = getIntegerValue(poolAddr, kSFPoolFee)
452489 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
453- let $t01479215080 = if ((assetTokenToGet == assetIdA))
490+ let $t01566415952 = if ((assetTokenToGet == assetIdA))
454491 then {
455492 let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
456493 $Tuple2(amountToPay, assetIdB)
459496 let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
460497 $Tuple2(amountToPay, assetIdA)
461498 }
462- let amountToPay = $t01479215080._1
463- let assetToPay = $t01479215080._2
499+ let amountToPay = $t01566415952._1
500+ let assetToPay = $t01566415952._2
464501 invoke(poolAddr, "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
465502 }
466503
470507 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
471508 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
472509 let feeScale = toBigInt(100000000)
473- let $t01555915867 = if ((assetTokenToGet == assetIdA))
510+ let $t01643116739 = if ((assetTokenToGet == assetIdA))
474511 then {
475512 let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
476513 $Tuple2(amountToPay, assetIdB)
479516 let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
480517 $Tuple2(amountToPay, assetIdA)
481518 }
482- let amountToPay = $t01555915867._1
483- let assetToPay = $t01555915867._2
519+ let amountToPay = $t01643116739._1
520+ let assetToPay = $t01643116739._2
484521 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
485522 invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)])
486523 }
494531 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
495532 let poolAddr = Address(fromBase58String(pool))
496533 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
497- let $t01673216799 = getPoolData(poolAddr, pType)
498- let assetIdA = $t01673216799._1
499- let assetIdB = $t01673216799._2
500- let balA = $t01673216799._3
501- let balB = $t01673216799._4
534+ let $t01760417671 = getPoolData(poolAddr, pType)
535+ let assetIdA = $t01760417671._1
536+ let assetIdB = $t01760417671._2
537+ let balA = $t01760417671._3
538+ let balB = $t01760417671._4
502539 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
503540 if ((cBalABefore == cBalABefore))
504541 then {
514551 then {
515552 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
516553 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
517- let $t01731117400 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
518- let tokensAmountA = $t01731117400._1
519- let tokensAmountB = $t01731117400._2
520- let $t01740318099 = if ((debt > 0))
554+ let $t01818318272 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
555+ let tokensAmountA = $t01818318272._1
556+ let tokensAmountB = $t01818318272._2
557+ let $t01827518971 = if ((debt > 0))
521558 then {
522559 let amountToGetEx = if (if ((borrowAsset == assetIdA))
523560 then (debt > tokensAmountA)
540577 else throw("Strict value is not equal to itself.")
541578 }
542579 else $Tuple2(tokensAmountA, tokensAmountB)
543- let toUserAmountA = $t01740318099._1
544- let toUserAmountB = $t01740318099._2
545- $Tuple4(toUserAmountA, assetIdA, toUserAmountB, assetIdB)
580+ let toUserAmountA = $t01827518971._1
581+ let toUserAmountB = $t01827518971._2
582+ $Tuple6(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter)
546583 }
547584 else throw("Strict value is not equal to itself.")
548585 }
570607
571608
572609 @Callable(i)
610+func getAssetPrice (assetId) = $Tuple2(nil, (let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
611+if ($isInstanceOf(@, "(Int, Int)"))
612+ then @
613+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2)
614+
615+
616+
617+@Callable(i)
618+func getSharePrice (shareId) = {
619+ let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
620+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
621+ let $t02006620136 = getPoolData(Address(fromBase58String(pool)), pType)
622+ let aId = $t02006620136._1
623+ let bId = $t02006620136._2
624+ let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
625+ if ($isInstanceOf(@, "(Int, Int)"))
626+ then @
627+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
628+ let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
629+ if ($isInstanceOf(@, "(Int, Int)"))
630+ then @
631+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
632+ $Tuple2(nil, (dPriceA + dPriceB))
633+ }
634+
635+
636+
637+@Callable(i)
573638 func replenishEVALONLY (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
574639 then true
575640 else (leverage > 300))
576641 then throw("Leverage can't be <100 and >300")
577642 else {
578643 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
579- let $t01905319143 = getPoolData(Address(fromBase58String(pool)), pType)
580- let AId = $t01905319143._1
581- let BId = $t01905319143._2
582- let balA = $t01905319143._3
583- let balB = $t01905319143._4
584- let shareId = $t01905319143._5
585- let $t01914619783 = if ((size(i.payments) == 2))
644+ let $t02062120711 = getPoolData(Address(fromBase58String(pool)), pType)
645+ let AId = $t02062120711._1
646+ let BId = $t02062120711._2
647+ let balA = $t02062120711._3
648+ let balB = $t02062120711._4
649+ let shareId = $t02062120711._5
650+ let $t02071421351 = if ((size(i.payments) == 2))
586651 then if ((assetIdToStr(i.payments[0].assetId) != AId))
587652 then throw("Wrong payment asset A")
588653 else if ((assetIdToStr(i.payments[1].assetId) != BId))
595660 then $Tuple4(0, AId, i.payments[0].amount, BId)
596661 else throw("Wrong payment")
597662 else throw("One or two payments expected")
598- let pmtA = $t01914619783._1
599- let pmtAssetA = $t01914619783._2
600- let pmtB = $t01914619783._3
601- let pmtAssetB = $t01914619783._4
602- let $t01978621237 = if ((leverage > 100))
663+ let pmtA = $t02071421351._1
664+ let pmtAssetA = $t02071421351._2
665+ let pmtB = $t02071421351._3
666+ let pmtAssetB = $t02071421351._4
667+ let $t02135422805 = if ((leverage > 100))
603668 then {
604669 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
605670 if ($isInstanceOf(@, "(Int, Int)"))
606671 then @
607- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
672+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
608673 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
609674 if ($isInstanceOf(@, "(Int, Int)"))
610675 then @
611- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
676+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
612677 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
613678 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
614679 let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(1)], ",")
629694 else throw("Strict value is not equal to itself.")
630695 }
631696 else $Tuple2(replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)._1, 0)
632- let userStaked = $t01978621237._1
633- let borrowAmount = $t01978621237._2
634- let $t02124121366 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
635- if (($t02124121366 == $t02124121366))
697+ let userStaked = $t02135422805._1
698+ let borrowAmount = $t02135422805._2
699+ let $t02280922976 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
700+ if (($t02280922976 == $t02280922976))
636701 then {
637- let assetIdB = $t02124121366._4
638- let toUserAmountB = $t02124121366._3
639- let assetIdA = $t02124121366._2
640- let toUserAmountA = $t02124121366._1
641- $Tuple2(nil, [userStaked, toUserAmountA, toUserAmountB])
702+ let userGetBBeforeRepay = $t02280922976._6
703+ let userGetABeforeRepay = $t02280922976._5
704+ let assetIdB = $t02280922976._4
705+ let toUserAmountB = $t02280922976._3
706+ let assetIdA = $t02280922976._2
707+ let toUserAmountA = $t02280922976._1
708+ let $t02297923094 = getPoolData(Address(fromBase58String(pool)), pType)
709+ let AIdAfter = $t02297923094._1
710+ let BIdAfter = $t02297923094._2
711+ let balAAfter = $t02297923094._3
712+ let balBAfter = $t02297923094._4
713+ let shareIdAfter = $t02297923094._5
714+ let ratioBefore = fraction(balB, SCALE8, balA)
715+ let ratioAfter = fraction(balBAfter, SCALE8, balAAfter)
716+ let impact = (SCALE8 - fraction(ratioBefore, SCALE8, ratioAfter))
717+ let imcatMod = if ((0 > impact))
718+ then (impact * -1)
719+ else impact
720+ $Tuple2(nil, [userGetABeforeRepay, userGetBBeforeRepay, imcatMod])
642721 }
643722 else throw("Strict value is not equal to itself.")
644723 }
647726
648727 @Callable(i)
649728 func replenishFromLandEVALONLY (requestId) = {
650- let $t02149021594 = parseRequest(requestId)
651- let user = $t02149021594._1
652- let pool = $t02149021594._2
653- let pmtA = $t02149021594._3
654- let AId = $t02149021594._4
655- let pmtB = $t02149021594._5
656- let BId = $t02149021594._6
657- let balA = $t02149021594._7
658- let balB = $t02149021594._8
659- let shareId = $t02149021594._9
660- let bwAsset = $t02149021594._10
661- let bwAmount = $t02149021594._11
729+ let $t02346423568 = parseRequest(requestId)
730+ let user = $t02346423568._1
731+ let pool = $t02346423568._2
732+ let pmtA = $t02346423568._3
733+ let AId = $t02346423568._4
734+ let pmtB = $t02346423568._5
735+ let BId = $t02346423568._6
736+ let balA = $t02346423568._7
737+ let balB = $t02346423568._8
738+ let shareId = $t02346423568._9
739+ let bwAsset = $t02346423568._10
740+ let bwAmount = $t02346423568._11
662741 if ((size(i.payments) != 1))
663742 then throw("Wrong payment size")
664743 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
666745 else (i.payments[0].amount != bwAmount))
667746 then throw("Wrong payment")
668747 else {
669- let $t02178421908 = if ((AId == bwAsset))
748+ let $t02375823882 = if ((AId == bwAsset))
670749 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
671750 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
672- let pmtAllA = $t02178421908._1
673- let pmtAllB = $t02178421908._2
751+ let pmtAllA = $t02375823882._1
752+ let pmtAllB = $t02375823882._2
674753 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
675- let $t02199022099 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
676- let userStaked = $t02199022099._1
677- let axlyFee = $t02199022099._2
754+ let $t02396424073 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
755+ let userStaked = $t02396424073._1
756+ let axlyFee = $t02396424073._2
678757 $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", userStaked)], userStaked)
679758 }
680759 }
688767 then throw("Leverage can't be <100 and >300")
689768 else {
690769 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
691- let $t02247622566 = getPoolData(Address(fromBase58String(pool)), pType)
692- let AId = $t02247622566._1
693- let BId = $t02247622566._2
694- let balA = $t02247622566._3
695- let balB = $t02247622566._4
696- let shareId = $t02247622566._5
697- let $t02256923206 = if ((size(i.payments) == 2))
770+ let $t02445024540 = getPoolData(Address(fromBase58String(pool)), pType)
771+ let AId = $t02445024540._1
772+ let BId = $t02445024540._2
773+ let balA = $t02445024540._3
774+ let balB = $t02445024540._4
775+ let shareId = $t02445024540._5
776+ let $t02454325180 = if ((size(i.payments) == 2))
698777 then if ((assetIdToStr(i.payments[0].assetId) != AId))
699778 then throw("Wrong payment asset A")
700779 else if ((assetIdToStr(i.payments[1].assetId) != BId))
707786 then $Tuple4(0, AId, i.payments[0].amount, BId)
708787 else throw("Wrong payment")
709788 else throw("One or two payments expected")
710- let pmtA = $t02256923206._1
711- let pmtAssetA = $t02256923206._2
712- let pmtB = $t02256923206._3
713- let pmtAssetB = $t02256923206._4
789+ let pmtA = $t02454325180._1
790+ let pmtAssetA = $t02454325180._2
791+ let pmtB = $t02454325180._3
792+ let pmtAssetB = $t02454325180._4
714793 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
715794 if ((leverage > 100))
716795 then {
717796 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
718797 if ($isInstanceOf(@, "(Int, Int)"))
719798 then @
720- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
799+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
721800 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
722801 if ($isInstanceOf(@, "(Int, Int)"))
723802 then @
724- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
803+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
725804 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
726805 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
727806 let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",")
742821 else throw("Strict value is not equal to itself.")
743822 }
744823 else {
745- let $t02450324615 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
746- let userStaked = $t02450324615._1
747- let axlyFee = $t02450324615._2
824+ let $t02647726589 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
825+ let userStaked = $t02647726589._1
826+ let axlyFee = $t02647726589._2
748827 replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType)
749828 }
750829 }
753832
754833 @Callable(i)
755834 func replenishFromLand (requestId) = {
756- let $t02477724881 = parseRequest(requestId)
757- let user = $t02477724881._1
758- let pool = $t02477724881._2
759- let pmtA = $t02477724881._3
760- let AId = $t02477724881._4
761- let pmtB = $t02477724881._5
762- let BId = $t02477724881._6
763- let balA = $t02477724881._7
764- let balB = $t02477724881._8
765- let shareId = $t02477724881._9
766- let bwAsset = $t02477724881._10
767- let bwAmount = $t02477724881._11
835+ let $t02675126855 = parseRequest(requestId)
836+ let user = $t02675126855._1
837+ let pool = $t02675126855._2
838+ let pmtA = $t02675126855._3
839+ let AId = $t02675126855._4
840+ let pmtB = $t02675126855._5
841+ let BId = $t02675126855._6
842+ let balA = $t02675126855._7
843+ let balB = $t02675126855._8
844+ let shareId = $t02675126855._9
845+ let bwAsset = $t02675126855._10
846+ let bwAmount = $t02675126855._11
768847 if ((size(i.payments) != 1))
769848 then throw("Wrong payment size")
770849 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
772851 else (i.payments[0].amount != bwAmount))
773852 then throw("Wrong payment")
774853 else {
775- let $t02507125195 = if ((AId == bwAsset))
854+ let $t02704527169 = if ((AId == bwAsset))
776855 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
777856 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
778- let pmtAllA = $t02507125195._1
779- let pmtAllB = $t02507125195._2
857+ let pmtAllA = $t02704527169._1
858+ let pmtAllB = $t02704527169._2
780859 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
781- let $t02527725386 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
782- let userStaked = $t02527725386._1
783- let axlyFee = $t02527725386._2
860+ let $t02725127360 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
861+ let userStaked = $t02725127360._1
862+ let axlyFee = $t02725127360._2
784863 let posNum = getNewUserPositionNumber(pool, toString(i.caller))
785864 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
786865 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType)
809888 else throw(($getType(@) + " couldn't be cast to Int"))
810889 }
811890 else 0
812- let $t02682826948 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
813- if (($t02682826948 == $t02682826948))
891+ let $t02880228922 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
892+ if (($t02880228922 == $t02880228922))
814893 then {
815- let assetIdB = $t02682826948._4
816- let toUserAmountB = $t02682826948._3
817- let assetIdA = $t02682826948._2
818- let toUserAmountA = $t02682826948._1
894+ let assetIdB = $t02880228922._4
895+ let toUserAmountB = $t02880228922._3
896+ let assetIdA = $t02880228922._2
897+ let toUserAmountA = $t02880228922._1
819898 let closeDbtInv = if ((debt > 0))
820899 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + toString(posId))], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
821900 else 0
838917
839918 @Callable(i)
840919 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
841- let $t02824528439 = if (claim)
920+ let $t03021930413 = if (claim)
842921 then claimFarmed(type, pool)
843922 else {
844923 let claimedAsset = if ((type == SF_POOL))
846925 else WXID
847926 $Tuple2(amountToExchange, claimedAsset)
848927 }
849- let claimedAmount = $t02824528439._1
850- let claimedAsset = $t02824528439._2
928+ let claimedAmount = $t03021930413._1
929+ let claimedAsset = $t03021930413._2
851930 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
852931 let change = (claimedAmount - amountToExchange)
853932 let changeEntry = if ((change > 0))
860939
861940 @Callable(i)
862941 func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
863- let $t02909529289 = if (claim)
942+ let $t03106931263 = if (claim)
864943 then claimFarmed(type, pool)
865944 else {
866945 let claimedAsset = if ((type == SF_POOL))
868947 else WXID
869948 $Tuple2(amountToExchange, claimedAsset)
870949 }
871- let claimedAmount = $t02909529289._1
872- let claimedAsset = $t02909529289._2
950+ let claimedAmount = $t03106931263._1
951+ let claimedAsset = $t03106931263._2
873952 let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
874953 let change = (claimedAmount - amountToExchange)
875954 let changeEntry = if ((change > 0))
882961
883962 @Callable(i)
884963 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
885- let $t03001230206 = if (claim)
964+ let $t03198632180 = if (claim)
886965 then claimFarmed(type, pool)
887966 else {
888967 let claimedAsset = if ((type == SF_POOL))
890969 else WXID
891970 $Tuple2(amountToExchange, claimedAsset)
892971 }
893- let claimedAmount = $t03001230206._1
894- let claimedAsset = $t03001230206._2
972+ let claimedAmount = $t03198632180._1
973+ let claimedAsset = $t03198632180._2
895974 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
896975 let change = (claimedAmount - amountToExchange)
897976 let changeEntry = if ((change > 0))
903982
904983
905984 @Callable(i)
906-func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFee) = if (if ((type != SF_POOL))
985+func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan) = if (if ((type != SF_POOL))
907986 then (type != WX_POOL)
908987 else false)
909988 then throw("Wrong type")
910- else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyCapFee), capFee), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type)]
989+ else {
990+ let $t03282532919 = getPoolData(Address(fromBase58String(poolAddr)), type)
991+ let aId = $t03282532919._1
992+ let bId = $t03282532919._2
993+ let aBal = $t03282532919._3
994+ let bBal = $t03282532919._4
995+ let shareId = $t03282532919._5
996+[IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr)]
997+ }
911998
912999
9131000 @Verifier(tx)
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
8-let CAP_FEE = "cap"
8+let CAP_FEE_NO_LOAN = "capNoLoan"
9+
10+let CAP_FEE_LOAN = "capLoan"
911
1012 let LOAN_FEE = "loan"
1113
1214 let NO_LOAN_FEE = "noLoan"
1315
1416 let SCALE8 = 100000000
1517
1618 let SCALE10 = 10000000000
1719
1820 let FEE_SCALE6 = 1000000
1921
2022 let kSFPoolAAssetBalance = "A_asset_balance"
2123
2224 let kSFPoolBAssetBalance = "B_asset_balance"
2325
2426 let kSFPoolAAssetId = "A_asset_id"
2527
2628 let kSFPoolBAssetId = "B_asset_id"
2729
2830 let kSFPoolShareId = "share_asset_id"
2931
3032 let kSFPoolFee = "commission"
3133
3234 let kUserPosition = "_user_position"
3335
3436 let kUserBorrowAmount = "_user_position_borrow_amount"
3537
3638 let kUserBorrowAssetId = "_user_position_borrow_asset_id"
3739
3840 let kUserPositionNum = "_user_position_number"
3941
4042 let kUserPositionInterest = "_user_position_interest"
4143
4244 let kPoolTotal = "_pool_total"
4345
46+let kPoolTotalLoan = "_pool_total_loan"
47+
4448 let kPoolInterest = "_pool_interest"
4549
4650 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
4751
4852 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
4953
50-let kAxlyCapFee = "_axly_fee_cap"
54+let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan"
55+
56+let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan"
5157
5258 let kRequestId = "_request_id"
5359
5460 let kRequestIter = "requests_iter"
5561
5662 let kPool = "pool_"
63+
64+let kSharePool = "_pool_share_id"
5765
5866 let kPoolCapChange = "_pool_cap_change"
5967
6068 let kMoneyBox = "axly_money_box"
6169
6270 let kSFFarmingAddr = "swopfi_farming_addr"
6371
6472 let kLendService = "lend_service_addr"
6573
6674 let kPriceOracle = "price_oracle"
6775
6876 let kExContract = "exchange_contract"
6977
7078 let kWxSwapContract = "wx_swap_contract"
7179
7280 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
7381
7482 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
7583
7684 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
7785
7886 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
7987
8088 let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
8189
8290 let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
8391
8492 func isSelfCall (i) = if ((i.caller == this))
8593 then unit
8694 else throw("Only contract itself can call this function")
8795
8896
8997 func accountBalance (assetId) = match assetId {
9098 case id: ByteVector =>
9199 assetBalance(this, id)
92100 case waves: Unit =>
93101 wavesBalance(this).available
94102 case _ =>
95103 throw("Match error")
96104 }
97105
98106
99107 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"))
100108
101109
102110 func getWXPoolData (poolAddr) = {
103111 let cfg = {
104112 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
105113 if ($isInstanceOf(@, "List[Any]"))
106114 then @
107115 else throw(($getType(@) + " couldn't be cast to List[Any]"))
108116 }
109117 if ((cfg == cfg))
110- then $Tuple5(valueOrErrorMessage({
111- let @ = cfg[4]
112- if ($isInstanceOf(@, "String"))
113- then @
114- else unit
115- }, "Can't get pool A asset id"), valueOrErrorMessage({
116- let @ = cfg[5]
117- if ($isInstanceOf(@, "String"))
118- then @
119- else unit
120- }, "Can't get pool B asset id"), 0, 0, valueOrErrorMessage({
121- let @ = cfg[3]
122- if ($isInstanceOf(@, "String"))
123- then @
124- else unit
125- }, "Can't get pool LP asset id"))
118+ then {
119+ let aId = valueOrErrorMessage({
120+ let @ = cfg[4]
121+ if ($isInstanceOf(@, "String"))
122+ then @
123+ else unit
124+ }, "Can't get pool A asset id")
125+ let bId = valueOrErrorMessage({
126+ let @ = cfg[5]
127+ if ($isInstanceOf(@, "String"))
128+ then @
129+ else unit
130+ }, "Can't get pool B asset id")
131+ let shareId = valueOrErrorMessage({
132+ let @ = cfg[3]
133+ if ($isInstanceOf(@, "String"))
134+ then @
135+ else unit
136+ }, "Can't get pool LP asset id")
137+ let balA = {
138+ let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil)
139+ if ($isInstanceOf(@, "Int"))
140+ then @
141+ else throw(($getType(@) + " couldn't be cast to Int"))
142+ }
143+ if ((balA == balA))
144+ then {
145+ let balB = {
146+ let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil)
147+ if ($isInstanceOf(@, "Int"))
148+ then @
149+ else throw(($getType(@) + " couldn't be cast to Int"))
150+ }
151+ if ((balB == balB))
152+ then $Tuple5(aId, bId, balA, balB, shareId)
153+ else throw("Strict value is not equal to itself.")
154+ }
155+ else throw("Strict value is not equal to itself.")
156+ }
126157 else throw("Strict value is not equal to itself.")
127158 }
128159
129160
130161 func getPoolData (poolAddr,type) = if ((type == SF_POOL))
131162 then getSFPoolData(poolAddr)
132163 else if ((type == WX_POOL))
133164 then getWXPoolData(poolAddr)
134165 else throw("Wrong pool type")
135166
136167
137168 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
138169
139170
171+func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0)
172+
173+
140174 func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (((pool + "_") + user) + kUserPositionNum)), 0) + 1)
141175
142176
143-func getAxlyFee (pool,feeType) = if ((feeType == "cap"))
144- then getIntegerValue(this, (pool + kAxlyCapFee))
145- else if ((feeType == "loan"))
146- then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
147- else if ((feeType == "noLoan"))
148- then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
149- else throw("Wrong fee type")
177+func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN))
178+ then getIntegerValue(this, (pool + kAxlyWithLoanCapFee))
179+ else if ((feeType == CAP_FEE_NO_LOAN))
180+ then getIntegerValue(this, (pool + kAxlyNoLoanCapFee))
181+ else if ((feeType == LOAN_FEE))
182+ then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
183+ else if ((feeType == NO_LOAN_FEE))
184+ then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
185+ else throw("Wrong fee type")
150186
151187
152188 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
153189
154190
155191 func getWXFarmingAddr (poolAddr) = {
156192 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
157193 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
158194 Address(fromBase58String(factroyCfg[1]))
159195 }
160196
161197
162198 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
163199
164200
165201 func assetIdToStr (assetId) = match assetId {
166202 case id: ByteVector =>
167203 toBase58String(id)
168204 case waves: Unit =>
169205 "WAVES"
170206 case _ =>
171207 throw("Match error")
172208 }
173209
174210
175211 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
176212 then unit
177213 else fromBase58String(assetId)
178214
179215
180216 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
181217 then 8
182218 else match assetInfo(fromBase58String(assetId)) {
183219 case asset: Asset =>
184220 asset.decimals
185221 case _ =>
186222 throw("Can't find asset")
187223 }
188224
189225
190226 func replenishSwopFi (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId) = {
191227 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
192228 if ((shareBalanceBefore == shareBalanceBefore))
193229 then {
194230 let poolAddr = Address(fromBase58String(pool))
195231 let ratioA = fraction(SCALE8, pmtA, balA)
196232 let ratioB = fraction(SCALE8, pmtB, balB)
197- let $t063976689 = if ((ratioB > ratioA))
233+ let $t071357427 = if ((ratioB > ratioA))
198234 then {
199235 let pmt = fraction(balB, ratioA, SCALE8, CEILING)
200236 $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
201237 }
202238 else {
203239 let pmt = fraction(balA, ratioB, SCALE8, CEILING)
204240 $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
205241 }
206- let pmtAmountA = $t063976689._1
207- let pmtAmountB = $t063976689._2
208- let change = $t063976689._3
209- let changeAssetId = $t063976689._4
242+ let pmtAmountA = $t071357427._1
243+ let pmtAmountB = $t071357427._2
244+ let change = $t071357427._3
245+ let changeAssetId = $t071357427._4
210246 let inv1 = if (if ((pmtAmountA > 0))
211247 then (pmtAmountB > 0)
212248 else false)
213249 then {
214250 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
215251 invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
216252 }
217253 else 0
218254 if ((inv1 == inv1))
219255 then {
220256 let inv2 = if ((change > 0))
221257 then {
222258 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
223259 let vars = ["0", "false", "0"]
224260 invoke(poolAddr, "callFunction", ["replenishWithOneToken", vars], payments)
225261 }
226262 else 0
227263 if ((inv2 == inv2))
228264 then {
229265 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
230266 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
231267 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
232268 let userShareForStake = (totalStaked - axlyFeeAmount)
233269 if ((0 >= userShareForStake))
234270 then throw("amount of staked sharetokens must be > 0")
235271 else {
236272 let inv3 = invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], [AttachedPayment(fromBase58String(shareId), userShareForStake)])
237273 if ((inv3 == inv3))
238274 then $Tuple2(userShareForStake, axlyFeeAmount)
239275 else throw("Strict value is not equal to itself.")
240276 }
241277 }
242278 else throw("Strict value is not equal to itself.")
243279 }
244280 else throw("Strict value is not equal to itself.")
245281 }
246282 else throw("Strict value is not equal to itself.")
247283 }
248284
249285
250286 func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = {
251287 let poolAddr = Address(fromBase58String(pool))
252- let $t081408989 = if (if ((pmtA > 0))
288+ let $t088789727 = if (if ((pmtA > 0))
253289 then (pmtB > 0)
254290 else false)
255291 then {
256292 let evalPutInA = split({
257293 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
258294 if ($isInstanceOf(@, "String"))
259295 then @
260296 else throw(($getType(@) + " couldn't be cast to String"))
261297 }, "__")
262298 if ((evalPutInA == evalPutInA))
263299 then {
264300 let evalPutInB = split({
265301 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
266302 if ($isInstanceOf(@, "String"))
267303 then @
268304 else throw(($getType(@) + " couldn't be cast to String"))
269305 }, "__")
270306 if ((evalPutInB == evalPutInB))
271307 then {
272308 let lpInA = parseIntValue(evalPutInA[1])
273309 let lpInB = parseIntValue(evalPutInB[1])
274310 if ((lpInB > lpInA))
275311 then {
276312 let pmtInB = parseIntValue(evalPutInA[8])
277313 $Tuple4(pmtA, pmtInB, (pmtB - pmtInB), pmtAssetB)
278314 }
279315 else {
280316 let pmtInA = parseIntValue(evalPutInB[7])
281317 $Tuple4(pmtInA, pmtB, (pmtA - pmtInA), pmtAssetA)
282318 }
283319 }
284320 else throw("Strict value is not equal to itself.")
285321 }
286322 else throw("Strict value is not equal to itself.")
287323 }
288324 else if ((pmtA > 0))
289325 then $Tuple4(pmtA, pmtB, pmtA, pmtAssetA)
290326 else if ((pmtB > 0))
291327 then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB)
292328 else throw("pmts must be > 0")
293- let pmtAmountA = $t081408989._1
294- let pmtAmountB = $t081408989._2
295- let change = $t081408989._3
296- let changeAssetId = $t081408989._4
329+ let pmtAmountA = $t088789727._1
330+ let pmtAmountB = $t088789727._2
331+ let change = $t088789727._3
332+ let changeAssetId = $t088789727._4
297333 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
298334 if ((shareBalanceBefore == shareBalanceBefore))
299335 then {
300336 let inv1 = if (if ((pmtAmountA > 0))
301337 then (pmtAmountB > 0)
302338 else false)
303339 then {
304340 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
305341 invoke(poolAddr, "put", [1000000, false], payments)
306342 }
307343 else 0
308344 if ((inv1 == inv1))
309345 then {
310346 let inv2 = if ((change > 0))
311347 then {
312348 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
313349 invoke(poolAddr, "putOneTkn", [0, false], payments)
314350 }
315351 else 0
316352 if ((inv2 == inv2))
317353 then {
318354 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
319355 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
320356 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
321357 let userShareForStake = (totalStaked - axlyFeeAmount)
322358 if ((0 >= userShareForStake))
323359 then throw("amount of staked sharetokens must be > 0")
324360 else {
325361 let inv3 = invoke(getWXFarmingAddr(poolAddr), "stake", nil, [AttachedPayment(fromBase58String(shareId), userShareForStake)])
326362 if ((inv3 == inv3))
327363 then $Tuple2(userShareForStake, axlyFeeAmount)
328364 else throw("Strict value is not equal to itself.")
329365 }
330366 }
331367 else throw("Strict value is not equal to itself.")
332368 }
333369 else throw("Strict value is not equal to itself.")
334370 }
335371 else throw("Strict value is not equal to itself.")
336372 }
337373
338374
339375 func replenishByType (type,pool,feeType,pmtA,AId,pmtB,BId,balA,balB,shareId) = if ((type == SF_POOL))
340376 then replenishSwopFi(pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
341377 else if ((type == WX_POOL))
342378 then replenishWX(pool, LOAN_FEE, pmtA, AId, pmtB, BId, shareId)
343379 else throw("Wrong pool type")
344380
345381
346382 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type) = {
347383 let totalAmount = getPoolTotalShare(pool)
384+ let totalAmountLoan = getPoolTotalShareWithLoan(pool)
348385 let curPoolInterest = getIntegerValue(this, (pool + kPoolInterest))
349-[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
386+[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), (totalAmountLoan + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
350387 }
351388
352389
353390 func claimFarmed (type,pool) = if ((type == SF_POOL))
354391 then {
355392 let balBefore = accountBalance(SWOPID)
356393 if ((balBefore == balBefore))
357394 then {
358395 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
359396 if ((inv == inv))
360397 then {
361398 let balAfter = accountBalance(SWOPID)
362399 $Tuple2((balAfter - balBefore), SWOPID)
363400 }
364401 else throw("Strict value is not equal to itself.")
365402 }
366403 else throw("Strict value is not equal to itself.")
367404 }
368405 else if ((type == WX_POOL))
369406 then {
370407 let balBefore = accountBalance(WXID)
371408 if ((balBefore == balBefore))
372409 then {
373410 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
374411 if ((inv == inv))
375412 then {
376413 let balAfter = accountBalance(WXID)
377414 $Tuple2((balAfter - balBefore), WXID)
378415 }
379416 else throw("Strict value is not equal to itself.")
380417 }
381418 else throw("Strict value is not equal to itself.")
382419 }
383420 else throw("Wrong pool type")
384421
385422
386423 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
387424 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
388425 if ((tokenBalanceBefore == tokenBalanceBefore))
389426 then {
390427 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
391428 if ((inv == inv))
392429 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
393430 else throw("Strict value is not equal to itself.")
394431 }
395432 else throw("Strict value is not equal to itself.")
396433 }
397434
398435
399436 func exchangePazzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
400437 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
401438 if ((tokenBalanceBefore == tokenBalanceBefore))
402439 then {
403440 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
404441 if ((inv == inv))
405442 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
406443 else throw("Strict value is not equal to itself.")
407444 }
408445 else throw("Strict value is not equal to itself.")
409446 }
410447
411448
412449 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
413450 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
414451 if ((tokenBalanceBefore == tokenBalanceBefore))
415452 then {
416453 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
417454 if ((inv == inv))
418455 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
419456 else throw("Strict value is not equal to itself.")
420457 }
421458 else throw("Strict value is not equal to itself.")
422459 }
423460
424461
425462 func capitalize (pool,pType,tokenId,tokenAmount) = {
426463 let poolAddr = Address(fromBase58String(pool))
427- let $t01382413903 = getPoolData(poolAddr, pType)
428- let AId = $t01382413903._1
429- let BId = $t01382413903._2
430- let balA = $t01382413903._3
431- let balB = $t01382413903._4
432- let shareId = $t01382413903._5
433- let $t01390613986 = if ((tokenId == AId))
464+ let $t01469114770 = getPoolData(poolAddr, pType)
465+ let AId = $t01469114770._1
466+ let BId = $t01469114770._2
467+ let balA = $t01469114770._3
468+ let balB = $t01469114770._4
469+ let shareId = $t01469114770._5
470+ let $t01477314853 = if ((tokenId == AId))
434471 then $Tuple2(tokenAmount, 0)
435472 else $Tuple2(0, tokenAmount)
436- let pmtA = $t01390613986._1
437- let pmtB = $t01390613986._2
438- let $t01398914099 = replenishByType(pType, pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
439- let stakedAmount = $t01398914099._1
440- let axlyFee = $t01398914099._2
473+ let pmtA = $t01477314853._1
474+ let pmtB = $t01477314853._2
475+ let $t01485614971 = replenishByType(pType, pool, CAP_FEE_LOAN, pmtA, AId, pmtB, BId, balA, balB, shareId)
476+ let stakedAmount = $t01485614971._1
477+ let axlyFee = $t01485614971._2
441478 let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
442479 let totalShareAmount = getPoolTotalShare(pool)
443480 let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount))
444481 [IntegerEntry((pool + kPoolInterest), newInterest), ScriptTransfer(moneyBox, axlyFee, fromBase58String(shareId))]
445482 }
446483
447484
448485 func exchangeDirectlySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
449486 let poolAddr = Address(fromBase58String(pool))
450487 let feeScale6 = 1000000
451488 let fee = getIntegerValue(poolAddr, kSFPoolFee)
452489 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
453- let $t01479215080 = if ((assetTokenToGet == assetIdA))
490+ let $t01566415952 = if ((assetTokenToGet == assetIdA))
454491 then {
455492 let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
456493 $Tuple2(amountToPay, assetIdB)
457494 }
458495 else {
459496 let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
460497 $Tuple2(amountToPay, assetIdA)
461498 }
462- let amountToPay = $t01479215080._1
463- let assetToPay = $t01479215080._2
499+ let amountToPay = $t01566415952._1
500+ let assetToPay = $t01566415952._2
464501 invoke(poolAddr, "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
465502 }
466503
467504
468505 func exchangeDirectlyWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
469506 let poolAddr = Address(fromBase58String(pool))
470507 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
471508 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
472509 let feeScale = toBigInt(100000000)
473- let $t01555915867 = if ((assetTokenToGet == assetIdA))
510+ let $t01643116739 = if ((assetTokenToGet == assetIdA))
474511 then {
475512 let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
476513 $Tuple2(amountToPay, assetIdB)
477514 }
478515 else {
479516 let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
480517 $Tuple2(amountToPay, assetIdA)
481518 }
482- let amountToPay = $t01555915867._1
483- let assetToPay = $t01555915867._2
519+ let amountToPay = $t01643116739._1
520+ let assetToPay = $t01643116739._2
484521 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
485522 invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)])
486523 }
487524
488525
489526 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
490527 then exchangeDirectlySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
491528 else exchangeDirectlyWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
492529
493530
494531 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
495532 let poolAddr = Address(fromBase58String(pool))
496533 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
497- let $t01673216799 = getPoolData(poolAddr, pType)
498- let assetIdA = $t01673216799._1
499- let assetIdB = $t01673216799._2
500- let balA = $t01673216799._3
501- let balB = $t01673216799._4
534+ let $t01760417671 = getPoolData(poolAddr, pType)
535+ let assetIdA = $t01760417671._1
536+ let assetIdB = $t01760417671._2
537+ let balA = $t01760417671._3
538+ let balB = $t01760417671._4
502539 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
503540 if ((cBalABefore == cBalABefore))
504541 then {
505542 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
506543 if ((cBalBBefore == cBalBBefore))
507544 then {
508545 let inv = if ((pType == SF_POOL))
509546 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
510547 else if ((pType == WX_POOL))
511548 then invoke(poolAddr, "unstakeAndGet", [userCanWithdraw], nil)
512549 else throw("Wrong position type")
513550 if ((inv == inv))
514551 then {
515552 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
516553 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
517- let $t01731117400 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
518- let tokensAmountA = $t01731117400._1
519- let tokensAmountB = $t01731117400._2
520- let $t01740318099 = if ((debt > 0))
554+ let $t01818318272 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
555+ let tokensAmountA = $t01818318272._1
556+ let tokensAmountB = $t01818318272._2
557+ let $t01827518971 = if ((debt > 0))
521558 then {
522559 let amountToGetEx = if (if ((borrowAsset == assetIdA))
523560 then (debt > tokensAmountA)
524561 else false)
525562 then (debt - tokensAmountA)
526563 else if (if ((borrowAsset == assetIdB))
527564 then (debt > tokensAmountB)
528565 else false)
529566 then (debt - tokensAmountB)
530567 else 0
531568 let exInv = if ((amountToGetEx > 0))
532569 then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset)
533570 else 0
534571 if ((exInv == exInv))
535572 then {
536573 let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
537574 let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
538575 $Tuple2((cBalAAfterRepay - cBalABefore), (cBalBAfterRepay - cBalBBefore))
539576 }
540577 else throw("Strict value is not equal to itself.")
541578 }
542579 else $Tuple2(tokensAmountA, tokensAmountB)
543- let toUserAmountA = $t01740318099._1
544- let toUserAmountB = $t01740318099._2
545- $Tuple4(toUserAmountA, assetIdA, toUserAmountB, assetIdB)
580+ let toUserAmountA = $t01827518971._1
581+ let toUserAmountB = $t01827518971._2
582+ $Tuple6(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter)
546583 }
547584 else throw("Strict value is not equal to itself.")
548585 }
549586 else throw("Strict value is not equal to itself.")
550587 }
551588 else throw("Strict value is not equal to itself.")
552589 }
553590
554591
555592 func parseRequest (requestId) = {
556593 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
557594 let user = request[0]
558595 let pool = request[1]
559596 let pmtA = parseIntValue(request[2])
560597 let AId = request[3]
561598 let pmtB = parseIntValue(request[4])
562599 let BId = request[5]
563600 let balA = parseIntValue(request[6])
564601 let balB = parseIntValue(request[7])
565602 let shareId = request[8]
566603 let bwAsset = request[9]
567604 let bwAmount = parseIntValue(request[10])
568605 $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
569606 }
570607
571608
572609 @Callable(i)
610+func getAssetPrice (assetId) = $Tuple2(nil, (let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
611+if ($isInstanceOf(@, "(Int, Int)"))
612+ then @
613+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2)
614+
615+
616+
617+@Callable(i)
618+func getSharePrice (shareId) = {
619+ let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
620+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
621+ let $t02006620136 = getPoolData(Address(fromBase58String(pool)), pType)
622+ let aId = $t02006620136._1
623+ let bId = $t02006620136._2
624+ let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
625+ if ($isInstanceOf(@, "(Int, Int)"))
626+ then @
627+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
628+ let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
629+ if ($isInstanceOf(@, "(Int, Int)"))
630+ then @
631+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
632+ $Tuple2(nil, (dPriceA + dPriceB))
633+ }
634+
635+
636+
637+@Callable(i)
573638 func replenishEVALONLY (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
574639 then true
575640 else (leverage > 300))
576641 then throw("Leverage can't be <100 and >300")
577642 else {
578643 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
579- let $t01905319143 = getPoolData(Address(fromBase58String(pool)), pType)
580- let AId = $t01905319143._1
581- let BId = $t01905319143._2
582- let balA = $t01905319143._3
583- let balB = $t01905319143._4
584- let shareId = $t01905319143._5
585- let $t01914619783 = if ((size(i.payments) == 2))
644+ let $t02062120711 = getPoolData(Address(fromBase58String(pool)), pType)
645+ let AId = $t02062120711._1
646+ let BId = $t02062120711._2
647+ let balA = $t02062120711._3
648+ let balB = $t02062120711._4
649+ let shareId = $t02062120711._5
650+ let $t02071421351 = if ((size(i.payments) == 2))
586651 then if ((assetIdToStr(i.payments[0].assetId) != AId))
587652 then throw("Wrong payment asset A")
588653 else if ((assetIdToStr(i.payments[1].assetId) != BId))
589654 then throw("Wrong payment asset B")
590655 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
591656 else if ((size(i.payments) == 1))
592657 then if ((assetIdToStr(i.payments[0].assetId) == AId))
593658 then $Tuple4(i.payments[0].amount, AId, 0, BId)
594659 else if ((assetIdToStr(i.payments[0].assetId) == BId))
595660 then $Tuple4(0, AId, i.payments[0].amount, BId)
596661 else throw("Wrong payment")
597662 else throw("One or two payments expected")
598- let pmtA = $t01914619783._1
599- let pmtAssetA = $t01914619783._2
600- let pmtB = $t01914619783._3
601- let pmtAssetB = $t01914619783._4
602- let $t01978621237 = if ((leverage > 100))
663+ let pmtA = $t02071421351._1
664+ let pmtAssetA = $t02071421351._2
665+ let pmtB = $t02071421351._3
666+ let pmtAssetB = $t02071421351._4
667+ let $t02135422805 = if ((leverage > 100))
603668 then {
604669 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
605670 if ($isInstanceOf(@, "(Int, Int)"))
606671 then @
607- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
672+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
608673 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
609674 if ($isInstanceOf(@, "(Int, Int)"))
610675 then @
611- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
676+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
612677 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
613678 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
614679 let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(1)], ",")
615680 let newRequestId = {
616681 let @ = invoke(this, "createNewRequest", [request], nil)
617682 if ($isInstanceOf(@, "Int"))
618683 then @
619684 else throw(($getType(@) + " couldn't be cast to Int"))
620685 }
621686 if ((newRequestId == newRequestId))
622687 then {
623688 let args = [((toString(i.caller) + "_") + toString(1)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLandReadOnly", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
624689 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
625690 if ((inv == inv))
626691 then $Tuple2(getIntegerValue(this, "EVALONLY_STAKEDAMOUNT"), borrowAmount)
627692 else throw("Strict value is not equal to itself.")
628693 }
629694 else throw("Strict value is not equal to itself.")
630695 }
631696 else $Tuple2(replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)._1, 0)
632- let userStaked = $t01978621237._1
633- let borrowAmount = $t01978621237._2
634- let $t02124121366 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
635- if (($t02124121366 == $t02124121366))
697+ let userStaked = $t02135422805._1
698+ let borrowAmount = $t02135422805._2
699+ let $t02280922976 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
700+ if (($t02280922976 == $t02280922976))
636701 then {
637- let assetIdB = $t02124121366._4
638- let toUserAmountB = $t02124121366._3
639- let assetIdA = $t02124121366._2
640- let toUserAmountA = $t02124121366._1
641- $Tuple2(nil, [userStaked, toUserAmountA, toUserAmountB])
702+ let userGetBBeforeRepay = $t02280922976._6
703+ let userGetABeforeRepay = $t02280922976._5
704+ let assetIdB = $t02280922976._4
705+ let toUserAmountB = $t02280922976._3
706+ let assetIdA = $t02280922976._2
707+ let toUserAmountA = $t02280922976._1
708+ let $t02297923094 = getPoolData(Address(fromBase58String(pool)), pType)
709+ let AIdAfter = $t02297923094._1
710+ let BIdAfter = $t02297923094._2
711+ let balAAfter = $t02297923094._3
712+ let balBAfter = $t02297923094._4
713+ let shareIdAfter = $t02297923094._5
714+ let ratioBefore = fraction(balB, SCALE8, balA)
715+ let ratioAfter = fraction(balBAfter, SCALE8, balAAfter)
716+ let impact = (SCALE8 - fraction(ratioBefore, SCALE8, ratioAfter))
717+ let imcatMod = if ((0 > impact))
718+ then (impact * -1)
719+ else impact
720+ $Tuple2(nil, [userGetABeforeRepay, userGetBBeforeRepay, imcatMod])
642721 }
643722 else throw("Strict value is not equal to itself.")
644723 }
645724
646725
647726
648727 @Callable(i)
649728 func replenishFromLandEVALONLY (requestId) = {
650- let $t02149021594 = parseRequest(requestId)
651- let user = $t02149021594._1
652- let pool = $t02149021594._2
653- let pmtA = $t02149021594._3
654- let AId = $t02149021594._4
655- let pmtB = $t02149021594._5
656- let BId = $t02149021594._6
657- let balA = $t02149021594._7
658- let balB = $t02149021594._8
659- let shareId = $t02149021594._9
660- let bwAsset = $t02149021594._10
661- let bwAmount = $t02149021594._11
729+ let $t02346423568 = parseRequest(requestId)
730+ let user = $t02346423568._1
731+ let pool = $t02346423568._2
732+ let pmtA = $t02346423568._3
733+ let AId = $t02346423568._4
734+ let pmtB = $t02346423568._5
735+ let BId = $t02346423568._6
736+ let balA = $t02346423568._7
737+ let balB = $t02346423568._8
738+ let shareId = $t02346423568._9
739+ let bwAsset = $t02346423568._10
740+ let bwAmount = $t02346423568._11
662741 if ((size(i.payments) != 1))
663742 then throw("Wrong payment size")
664743 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
665744 then true
666745 else (i.payments[0].amount != bwAmount))
667746 then throw("Wrong payment")
668747 else {
669- let $t02178421908 = if ((AId == bwAsset))
748+ let $t02375823882 = if ((AId == bwAsset))
670749 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
671750 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
672- let pmtAllA = $t02178421908._1
673- let pmtAllB = $t02178421908._2
751+ let pmtAllA = $t02375823882._1
752+ let pmtAllB = $t02375823882._2
674753 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
675- let $t02199022099 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
676- let userStaked = $t02199022099._1
677- let axlyFee = $t02199022099._2
754+ let $t02396424073 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
755+ let userStaked = $t02396424073._1
756+ let axlyFee = $t02396424073._2
678757 $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", userStaked)], userStaked)
679758 }
680759 }
681760
682761
683762
684763 @Callable(i)
685764 func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
686765 then true
687766 else (leverage > 300))
688767 then throw("Leverage can't be <100 and >300")
689768 else {
690769 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
691- let $t02247622566 = getPoolData(Address(fromBase58String(pool)), pType)
692- let AId = $t02247622566._1
693- let BId = $t02247622566._2
694- let balA = $t02247622566._3
695- let balB = $t02247622566._4
696- let shareId = $t02247622566._5
697- let $t02256923206 = if ((size(i.payments) == 2))
770+ let $t02445024540 = getPoolData(Address(fromBase58String(pool)), pType)
771+ let AId = $t02445024540._1
772+ let BId = $t02445024540._2
773+ let balA = $t02445024540._3
774+ let balB = $t02445024540._4
775+ let shareId = $t02445024540._5
776+ let $t02454325180 = if ((size(i.payments) == 2))
698777 then if ((assetIdToStr(i.payments[0].assetId) != AId))
699778 then throw("Wrong payment asset A")
700779 else if ((assetIdToStr(i.payments[1].assetId) != BId))
701780 then throw("Wrong payment asset B")
702781 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
703782 else if ((size(i.payments) == 1))
704783 then if ((assetIdToStr(i.payments[0].assetId) == AId))
705784 then $Tuple4(i.payments[0].amount, AId, 0, BId)
706785 else if ((assetIdToStr(i.payments[0].assetId) == BId))
707786 then $Tuple4(0, AId, i.payments[0].amount, BId)
708787 else throw("Wrong payment")
709788 else throw("One or two payments expected")
710- let pmtA = $t02256923206._1
711- let pmtAssetA = $t02256923206._2
712- let pmtB = $t02256923206._3
713- let pmtAssetB = $t02256923206._4
789+ let pmtA = $t02454325180._1
790+ let pmtAssetA = $t02454325180._2
791+ let pmtB = $t02454325180._3
792+ let pmtAssetB = $t02454325180._4
714793 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
715794 if ((leverage > 100))
716795 then {
717796 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
718797 if ($isInstanceOf(@, "(Int, Int)"))
719798 then @
720- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
799+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
721800 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
722801 if ($isInstanceOf(@, "(Int, Int)"))
723802 then @
724- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
803+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
725804 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
726805 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
727806 let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",")
728807 let newRequestId = {
729808 let @ = invoke(this, "createNewRequest", [request], nil)
730809 if ($isInstanceOf(@, "Int"))
731810 then @
732811 else throw(($getType(@) + " couldn't be cast to Int"))
733812 }
734813 if ((newRequestId == newRequestId))
735814 then {
736815 let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
737816 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
738817 if ((inv == inv))
739818 then nil
740819 else throw("Strict value is not equal to itself.")
741820 }
742821 else throw("Strict value is not equal to itself.")
743822 }
744823 else {
745- let $t02450324615 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
746- let userStaked = $t02450324615._1
747- let axlyFee = $t02450324615._2
824+ let $t02647726589 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
825+ let userStaked = $t02647726589._1
826+ let axlyFee = $t02647726589._2
748827 replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType)
749828 }
750829 }
751830
752831
753832
754833 @Callable(i)
755834 func replenishFromLand (requestId) = {
756- let $t02477724881 = parseRequest(requestId)
757- let user = $t02477724881._1
758- let pool = $t02477724881._2
759- let pmtA = $t02477724881._3
760- let AId = $t02477724881._4
761- let pmtB = $t02477724881._5
762- let BId = $t02477724881._6
763- let balA = $t02477724881._7
764- let balB = $t02477724881._8
765- let shareId = $t02477724881._9
766- let bwAsset = $t02477724881._10
767- let bwAmount = $t02477724881._11
835+ let $t02675126855 = parseRequest(requestId)
836+ let user = $t02675126855._1
837+ let pool = $t02675126855._2
838+ let pmtA = $t02675126855._3
839+ let AId = $t02675126855._4
840+ let pmtB = $t02675126855._5
841+ let BId = $t02675126855._6
842+ let balA = $t02675126855._7
843+ let balB = $t02675126855._8
844+ let shareId = $t02675126855._9
845+ let bwAsset = $t02675126855._10
846+ let bwAmount = $t02675126855._11
768847 if ((size(i.payments) != 1))
769848 then throw("Wrong payment size")
770849 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
771850 then true
772851 else (i.payments[0].amount != bwAmount))
773852 then throw("Wrong payment")
774853 else {
775- let $t02507125195 = if ((AId == bwAsset))
854+ let $t02704527169 = if ((AId == bwAsset))
776855 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
777856 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
778- let pmtAllA = $t02507125195._1
779- let pmtAllB = $t02507125195._2
857+ let pmtAllA = $t02704527169._1
858+ let pmtAllB = $t02704527169._2
780859 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
781- let $t02527725386 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
782- let userStaked = $t02527725386._1
783- let axlyFee = $t02527725386._2
860+ let $t02725127360 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
861+ let userStaked = $t02725127360._1
862+ let axlyFee = $t02725127360._2
784863 let posNum = getNewUserPositionNumber(pool, toString(i.caller))
785864 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
786865 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType)
787866 $Tuple2(((entries ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
788867 }
789868 }
790869
791870
792871
793872 @Callable(i)
794873 func withdraw (pool,posId) = {
795874 let user = toString(i.caller)
796875 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), "Unknown position")
797876 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest))
798877 let poolInterst = getIntegerValue(this, (pool + kPoolInterest))
799878 let poolTotalShare = getPoolTotalShare(pool)
800879 let userCanWithdraw = (pAmount + fraction(pAmount, (poolInterst - userInterest), SCALE10))
801880 let userAddr = Address(fromBase58String(user))
802881 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAmount))
803882 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAssetId))
804883 let debt = if ((borrowAmount > 0))
805884 then {
806885 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((((pool + "_") + user) + "_") + toString(posId)), borrowAsset], nil)
807886 if ($isInstanceOf(@, "Int"))
808887 then @
809888 else throw(($getType(@) + " couldn't be cast to Int"))
810889 }
811890 else 0
812- let $t02682826948 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
813- if (($t02682826948 == $t02682826948))
891+ let $t02880228922 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
892+ if (($t02880228922 == $t02880228922))
814893 then {
815- let assetIdB = $t02682826948._4
816- let toUserAmountB = $t02682826948._3
817- let assetIdA = $t02682826948._2
818- let toUserAmountA = $t02682826948._1
894+ let assetIdB = $t02880228922._4
895+ let toUserAmountB = $t02880228922._3
896+ let assetIdA = $t02880228922._2
897+ let toUserAmountA = $t02880228922._1
819898 let closeDbtInv = if ((debt > 0))
820899 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + toString(posId))], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
821900 else 0
822901 if ((closeDbtInv == closeDbtInv))
823902 then [DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))]
824903 else throw("Strict value is not equal to itself.")
825904 }
826905 else throw("Strict value is not equal to itself.")
827906 }
828907
829908
830909
831910 @Callable(i)
832911 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
833912 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
834913 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
835914 })
836915
837916
838917
839918 @Callable(i)
840919 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
841- let $t02824528439 = if (claim)
920+ let $t03021930413 = if (claim)
842921 then claimFarmed(type, pool)
843922 else {
844923 let claimedAsset = if ((type == SF_POOL))
845924 then SWOPID
846925 else WXID
847926 $Tuple2(amountToExchange, claimedAsset)
848927 }
849- let claimedAmount = $t02824528439._1
850- let claimedAsset = $t02824528439._2
928+ let claimedAmount = $t03021930413._1
929+ let claimedAsset = $t03021930413._2
851930 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
852931 let change = (claimedAmount - amountToExchange)
853932 let changeEntry = if ((change > 0))
854933 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
855934 else nil
856935 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
857936 }
858937
859938
860939
861940 @Callable(i)
862941 func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
863- let $t02909529289 = if (claim)
942+ let $t03106931263 = if (claim)
864943 then claimFarmed(type, pool)
865944 else {
866945 let claimedAsset = if ((type == SF_POOL))
867946 then SWOPID
868947 else WXID
869948 $Tuple2(amountToExchange, claimedAsset)
870949 }
871- let claimedAmount = $t02909529289._1
872- let claimedAsset = $t02909529289._2
950+ let claimedAmount = $t03106931263._1
951+ let claimedAsset = $t03106931263._2
873952 let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
874953 let change = (claimedAmount - amountToExchange)
875954 let changeEntry = if ((change > 0))
876955 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
877956 else nil
878957 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
879958 }
880959
881960
882961
883962 @Callable(i)
884963 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
885- let $t03001230206 = if (claim)
964+ let $t03198632180 = if (claim)
886965 then claimFarmed(type, pool)
887966 else {
888967 let claimedAsset = if ((type == SF_POOL))
889968 then SWOPID
890969 else WXID
891970 $Tuple2(amountToExchange, claimedAsset)
892971 }
893- let claimedAmount = $t03001230206._1
894- let claimedAsset = $t03001230206._2
972+ let claimedAmount = $t03198632180._1
973+ let claimedAsset = $t03198632180._2
895974 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
896975 let change = (claimedAmount - amountToExchange)
897976 let changeEntry = if ((change > 0))
898977 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
899978 else nil
900979 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
901980 }
902981
903982
904983
905984 @Callable(i)
906-func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFee) = if (if ((type != SF_POOL))
985+func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan) = if (if ((type != SF_POOL))
907986 then (type != WX_POOL)
908987 else false)
909988 then throw("Wrong type")
910- else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyCapFee), capFee), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type)]
989+ else {
990+ let $t03282532919 = getPoolData(Address(fromBase58String(poolAddr)), type)
991+ let aId = $t03282532919._1
992+ let bId = $t03282532919._2
993+ let aBal = $t03282532919._3
994+ let bBal = $t03282532919._4
995+ let shareId = $t03282532919._5
996+[IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr)]
997+ }
911998
912999
9131000 @Verifier(tx)
9141001 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
9151002

github/deemru/w8io/026f985 
133.82 ms