tx · 39TFbC5mtxkszWZnZGrJZdY5VTSohx4Hbh2QmrWm16oU

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.28000000 Waves

2023.04.19 20:28 [2541735] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "39TFbC5mtxkszWZnZGrJZdY5VTSohx4Hbh2QmrWm16oU", "fee": 28000000, "feeAssetId": null, "timestamp": 1681925359249, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "4wVCznkrtq5bpgHqv97ierf3gssEoczXrrzZ4C7ueUrjHQ3KD5FdGxzGvrBgW5DePgKpGbYCmsfstJtKcHUUunoH" ], "script": "base64:BgJaCAISBQoDCAEIEgMKAQgSBQoDCAEIEgMKAQgSBAoCCAESAwoBCBIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEgcKBQgIAQEBRAAHU0ZfUE9PTAICU0YAB1dYX1BPT0wCAldYAAdDQVBfRkVFAgNjYXAACExPQU5fRkVFAgRsb2FuAAtOT19MT0FOX0ZFRQIGbm9Mb2FuAAZTQ0FMRTgAgMLXLwAHU0NBTEUxMACAyK+gJQAKRkVFX1NDQUxFNgDAhD0AFGtTRlBvb2xBQXNzZXRCYWxhbmNlAg9BX2Fzc2V0X2JhbGFuY2UAFGtTRlBvb2xCQXNzZXRCYWxhbmNlAg9CX2Fzc2V0X2JhbGFuY2UAD2tTRlBvb2xBQXNzZXRJZAIKQV9hc3NldF9pZAAPa1NGUG9vbEJBc3NldElkAgpCX2Fzc2V0X2lkAA5rU0ZQb29sU2hhcmVJZAIOc2hhcmVfYXNzZXRfaWQACmtTRlBvb2xGZWUCCmNvbW1pc3Npb24ADWtVc2VyUG9zaXRpb24CDl91c2VyX3Bv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BC1N0cmluZ0VudHJ5AgkArAICBQVrUG9vbAUIcG9vbEFkZHIFBHR5cGUFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmkTWIo", "height": 2541735, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4xywBKP5PNVxYfCzvzWiAYkzdUtQmzuKRVtWZoWcHg3V Next: AzvBKi1Rn5LX2nwRd14t6BCsXiXzBeT5W435XQM3bkaV Diff:
OldNewDifferences
336336 }
337337
338338
339+func replenishByType (type,pool,feeType,pmtA,AId,pmtB,BId,balA,balB,shareId) = if ((type == SF_POOL))
340+ then replenishSwopFi(pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
341+ else if ((type == WX_POOL))
342+ then replenishWX(pool, LOAN_FEE, pmtA, AId, pmtB, BId, shareId)
343+ else throw("Wrong pool type")
344+
345+
339346 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type) = {
340347 let totalAmount = getPoolTotalShare(pool)
341348 let curPoolInterest = getIntegerValue(this, (pool + kPoolInterest))
415422 }
416423
417424
418-func capitalize (pool,type,tokenId,tokenAmount) = {
425+func capitalize (pool,pType,tokenId,tokenAmount) = {
419426 let poolAddr = Address(fromBase58String(pool))
420- let $t01319013268 = getPoolData(poolAddr, type)
421- let AId = $t01319013268._1
422- let BId = $t01319013268._2
423- let balA = $t01319013268._3
424- let balB = $t01319013268._4
425- let shareId = $t01319013268._5
426- let $t01327113351 = if ((tokenId == AId))
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))
427434 then $Tuple2(tokenAmount, 0)
428435 else $Tuple2(0, tokenAmount)
429- let pmtA = $t01327113351._1
430- let pmtB = $t01327113351._2
431- let $t01335413715 = if ((type == SF_POOL))
432- then replenishSwopFi(pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
433- else replenishWX(pool, CAP_FEE, pmtA, AId, pmtB, BId, shareId)
434- let stakedAmount = $t01335413715._1
435- let axlyFee = $t01335413715._2
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
436441 let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
437442 let totalShareAmount = getPoolTotalShare(pool)
438443 let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount))
445450 let feeScale6 = 1000000
446451 let fee = getIntegerValue(poolAddr, kSFPoolFee)
447452 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
448- let $t01440814696 = if ((assetTokenToGet == assetIdA))
453+ let $t01479215080 = if ((assetTokenToGet == assetIdA))
449454 then {
450455 let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
451456 $Tuple2(amountToPay, assetIdB)
454459 let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
455460 $Tuple2(amountToPay, assetIdA)
456461 }
457- let amountToPay = $t01440814696._1
458- let assetToPay = $t01440814696._2
462+ let amountToPay = $t01479215080._1
463+ let assetToPay = $t01479215080._2
459464 invoke(poolAddr, "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
460465 }
461466
465470 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
466471 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
467472 let feeScale = toBigInt(100000000)
468- let $t01517515483 = if ((assetTokenToGet == assetIdA))
473+ let $t01555915867 = if ((assetTokenToGet == assetIdA))
469474 then {
470475 let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
471476 $Tuple2(amountToPay, assetIdB)
474479 let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
475480 $Tuple2(amountToPay, assetIdA)
476481 }
477- let amountToPay = $t01517515483._1
478- let assetToPay = $t01517515483._2
482+ let amountToPay = $t01555915867._1
483+ let assetToPay = $t01555915867._2
479484 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
480485 invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)])
481486 }
489494 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
490495 let poolAddr = Address(fromBase58String(pool))
491496 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
492- let $t01634816415 = getPoolData(poolAddr, pType)
493- let assetIdA = $t01634816415._1
494- let assetIdB = $t01634816415._2
495- let balA = $t01634816415._3
496- let balB = $t01634816415._4
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
497502 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
498503 if ((cBalABefore == cBalABefore))
499504 then {
509514 then {
510515 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
511516 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
512- let $t01692717016 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
513- let tokensAmountA = $t01692717016._1
514- let tokensAmountB = $t01692717016._2
515- let $t01701917715 = if ((debt > 0))
517+ let $t01731117400 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
518+ let tokensAmountA = $t01731117400._1
519+ let tokensAmountB = $t01731117400._2
520+ let $t01740318099 = if ((debt > 0))
516521 then {
517522 let amountToGetEx = if (if ((borrowAsset == assetIdA))
518523 then (debt > tokensAmountA)
535540 else throw("Strict value is not equal to itself.")
536541 }
537542 else $Tuple2(tokensAmountA, tokensAmountB)
538- let toUserAmountA = $t01701917715._1
539- let toUserAmountB = $t01701917715._2
543+ let toUserAmountA = $t01740318099._1
544+ let toUserAmountB = $t01740318099._2
540545 $Tuple4(toUserAmountA, assetIdA, toUserAmountB, assetIdB)
541546 }
542547 else throw("Strict value is not equal to itself.")
547552 }
548553
549554
555+func parseRequest (requestId) = {
556+ let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
557+ let user = request[0]
558+ let pool = request[1]
559+ let pmtA = parseIntValue(request[2])
560+ let AId = request[3]
561+ let pmtB = parseIntValue(request[4])
562+ let BId = request[5]
563+ let balA = parseIntValue(request[6])
564+ let balB = parseIntValue(request[7])
565+ let shareId = request[8]
566+ let bwAsset = request[9]
567+ let bwAmount = parseIntValue(request[10])
568+ $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
569+ }
570+
571+
550572 @Callable(i)
551573 func replenishREADONLY (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
552574 then true
553575 else (leverage > 300))
554576 then throw("Leverage can't be <100 and >300")
555577 else {
556- let type = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
557- let $t01807818167 = getPoolData(Address(fromBase58String(pool)), type)
558- let AId = $t01807818167._1
559- let BId = $t01807818167._2
560- let balA = $t01807818167._3
561- let balB = $t01807818167._4
562- let shareId = $t01807818167._5
563- let $t01817018807 = if ((size(i.payments) == 2))
578+ 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))
564586 then if ((assetIdToStr(i.payments[0].assetId) != AId))
565587 then throw("Wrong payment asset A")
566588 else if ((assetIdToStr(i.payments[1].assetId) != BId))
573595 then $Tuple4(0, AId, i.payments[0].amount, BId)
574596 else throw("Wrong payment")
575597 else throw("One or two payments expected")
576- let pmtA = $t01817018807._1
577- let pmtAssetA = $t01817018807._2
578- let pmtB = $t01817018807._3
579- let pmtAssetB = $t01817018807._4
580- let $t01881020335 = if ((leverage > 100))
598+ let pmtA = $t01914619783._1
599+ let pmtAssetA = $t01914619783._2
600+ let pmtB = $t01914619783._3
601+ let pmtAssetB = $t01914619783._4
602+ let $t01978621297 = if ((leverage > 100))
581603 then {
582604 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
583605 if ($isInstanceOf(@, "(Int, Int)"))
589611 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
590612 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
591613 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
592- let request = makeString([type, toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(1)], ",")
614+ let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(1)], ",")
593615 let newRequestId = {
594616 let @ = invoke(this, "createNewRequest", [request], nil)
595617 if ($isInstanceOf(@, "Int"))
609631 else throw("Strict value is not equal to itself.")
610632 }
611633 else $Tuple4(pmtA, pmtB, NO_LOAN_FEE, 0)
612- let paymentA = $t01881020335._1
613- let paymentB = $t01881020335._2
614- let feeType = $t01881020335._3
615- let borrowAmount = $t01881020335._4
616- let $t02033820732 = if ((type == SF_POOL))
617- then replenishSwopFi(pool, feeType, paymentA, pmtAssetA, paymentB, pmtAssetB, balA, balB, shareId)
618- else replenishWX(pool, feeType, pmtA, pmtAssetA, pmtB, pmtAssetB, shareId)
619- let userStaked = $t02033820732._1
620- let axlyFee = $t02033820732._2
621- let $t02073520860 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
622- if (($t02073520860 == $t02073520860))
634+ let paymentA = $t01978621297._1
635+ let paymentB = $t01978621297._2
636+ let feeType = $t01978621297._3
637+ let borrowAmount = $t01978621297._4
638+ let $t02130021412 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
639+ let userStaked = $t02130021412._1
640+ let axlyFee = $t02130021412._2
641+ let $t02141621541 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
642+ if (($t02141621541 == $t02141621541))
623643 then {
624- let assetIdB = $t02073520860._4
625- let toUserAmountB = $t02073520860._3
626- let assetIdA = $t02073520860._2
627- let toUserAmountA = $t02073520860._1
644+ let assetIdB = $t02141621541._4
645+ let toUserAmountB = $t02141621541._3
646+ let assetIdA = $t02141621541._2
647+ let toUserAmountA = $t02141621541._1
628648 $Tuple2(nil, [userStaked, toUserAmountA, toUserAmountB])
629649 }
630650 else throw("Strict value is not equal to itself.")
633653
634654
635655 @Callable(i)
636-func replenishFromLandReadOnly (requestId) = $Tuple2(nil, 11111)
656+func replenishFromLandReadOnly (requestId) = {
657+ let $t02166521769 = parseRequest(requestId)
658+ let user = $t02166521769._1
659+ let pool = $t02166521769._2
660+ let pmtA = $t02166521769._3
661+ let AId = $t02166521769._4
662+ let pmtB = $t02166521769._5
663+ let BId = $t02166521769._6
664+ let balA = $t02166521769._7
665+ let balB = $t02166521769._8
666+ let shareId = $t02166521769._9
667+ let bwAsset = $t02166521769._10
668+ let bwAmount = $t02166521769._11
669+ if ((size(i.payments) != 1))
670+ then throw("Wrong payment size")
671+ else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
672+ then true
673+ else (i.payments[0].amount != bwAmount))
674+ then throw("Wrong payment")
675+ else {
676+ let $t02195922083 = if ((AId == bwAsset))
677+ then $Tuple2((pmtA + i.payments[0].amount), pmtB)
678+ else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
679+ let pmtAllA = $t02195922083._1
680+ let pmtAllB = $t02195922083._2
681+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
682+ let $t02216522274 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
683+ let userStaked = $t02216522274._1
684+ let axlyFee = $t02216522274._2
685+ nil
686+ }
687+ }
637688
638689
639690
643694 else (leverage > 300))
644695 then throw("Leverage can't be <100 and >300")
645696 else {
646- let type = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
647- let $t02130221391 = getPoolData(Address(fromBase58String(pool)), type)
648- let AId = $t02130221391._1
649- let BId = $t02130221391._2
650- let balA = $t02130221391._3
651- let balB = $t02130221391._4
652- let shareId = $t02130221391._5
653- let $t02139422031 = if ((size(i.payments) == 2))
697+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
698+ let $t02258822678 = getPoolData(Address(fromBase58String(pool)), pType)
699+ let AId = $t02258822678._1
700+ let BId = $t02258822678._2
701+ let balA = $t02258822678._3
702+ let balB = $t02258822678._4
703+ let shareId = $t02258822678._5
704+ let $t02268123318 = if ((size(i.payments) == 2))
654705 then if ((assetIdToStr(i.payments[0].assetId) != AId))
655706 then throw("Wrong payment asset A")
656707 else if ((assetIdToStr(i.payments[1].assetId) != BId))
663714 then $Tuple4(0, AId, i.payments[0].amount, BId)
664715 else throw("Wrong payment")
665716 else throw("One or two payments expected")
666- let pmtA = $t02139422031._1
667- let pmtAssetA = $t02139422031._2
668- let pmtB = $t02139422031._3
669- let pmtAssetB = $t02139422031._4
717+ let pmtA = $t02268123318._1
718+ let pmtAssetA = $t02268123318._2
719+ let pmtB = $t02268123318._3
720+ let pmtAssetB = $t02268123318._4
670721 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
671722 if ((leverage > 100))
672723 then {
680731 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
681732 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
682733 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
683- let request = makeString([type, toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(newPosNum)], ",")
734+ let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",")
684735 let newRequestId = {
685736 let @ = invoke(this, "createNewRequest", [request], nil)
686737 if ($isInstanceOf(@, "Int"))
698749 else throw("Strict value is not equal to itself.")
699750 }
700751 else {
701- let $t02337223763 = if ((type == SF_POOL))
702- then replenishSwopFi(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, balA, balB, shareId)
703- else replenishWX(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, shareId)
704- let userStaked = $t02337223763._1
705- let axlyFee = $t02337223763._2
706- replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, type)
752+ let $t02461524727 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
753+ let userStaked = $t02461524727._1
754+ let axlyFee = $t02461524727._2
755+ replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType)
707756 }
708757 }
709758
711760
712761 @Callable(i)
713762 func replenishFromLand (requestId) = {
714- let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
763+ let $t02488924993 = parseRequest(requestId)
764+ let user = $t02488924993._1
765+ let pool = $t02488924993._2
766+ let pmtA = $t02488924993._3
767+ let AId = $t02488924993._4
768+ let pmtB = $t02488924993._5
769+ let BId = $t02488924993._6
770+ let balA = $t02488924993._7
771+ let balB = $t02488924993._8
772+ let shareId = $t02488924993._9
773+ let bwAsset = $t02488924993._10
774+ let bwAmount = $t02488924993._11
715775 if ((size(i.payments) != 1))
716776 then throw("Wrong payment size")
717- else if (if ((assetIdToStr(i.payments[0].assetId) != request[10]))
777+ else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
718778 then true
719- else (i.payments[0].amount != parseIntValue(request[11])))
779+ else (i.payments[0].amount != bwAmount))
720780 then throw("Wrong payment")
721781 else {
722- let pmtA = if ((request[4] == assetIdToStr(i.payments[0].assetId)))
723- then (parseIntValue(request[3]) + i.payments[0].amount)
724- else parseIntValue(request[3])
725- let pmtB = if ((request[6] == assetIdToStr(i.payments[0].assetId)))
726- then (parseIntValue(request[5]) + i.payments[0].amount)
727- else parseIntValue(request[3])
728- let pool = request[2]
729- let user = request[1]
730- let shareId = request[9]
731- let posNum = parseIntValue(request[12])
732- let $t02472125236 = if ((request[0] == SF_POOL))
733- then replenishSwopFi(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], parseIntValue(request[7]), parseIntValue(request[8]), shareId)
734- else if ((request[0] == WX_POOL))
735- then replenishWX(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], shareId)
736- else throw("Wrong request type")
737- let userStaked = $t02472125236._1
738- let axlyFee = $t02472125236._2
739- let borrowEntries = [IntegerEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAmount), i.payments[0].amount), StringEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAssetId), request[10])]
740- let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, request[0])
782+ let $t02518325307 = if ((AId == bwAsset))
783+ then $Tuple2((pmtA + i.payments[0].amount), pmtB)
784+ else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
785+ let pmtAllA = $t02518325307._1
786+ let pmtAllB = $t02518325307._2
787+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
788+ let $t02538925498 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
789+ let userStaked = $t02538925498._1
790+ let axlyFee = $t02538925498._2
791+ let posNum = getNewUserPositionNumber(pool, toString(i.caller))
792+ let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
793+ let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType)
741794 $Tuple2(((entries ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
742795 }
743796 }
763816 else throw(($getType(@) + " couldn't be cast to Int"))
764817 }
765818 else 0
766- let $t02664326763 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
767- if (($t02664326763 == $t02664326763))
819+ let $t02694027060 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
820+ if (($t02694027060 == $t02694027060))
768821 then {
769- let assetIdB = $t02664326763._4
770- let toUserAmountB = $t02664326763._3
771- let assetIdA = $t02664326763._2
772- let toUserAmountA = $t02664326763._1
822+ let assetIdB = $t02694027060._4
823+ let toUserAmountB = $t02694027060._3
824+ let assetIdA = $t02694027060._2
825+ let toUserAmountA = $t02694027060._1
773826 let closeDbtInv = if ((debt > 0))
774827 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + toString(posId))], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
775828 else 0
792845
793846 @Callable(i)
794847 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
795- let $t02806028254 = if (claim)
848+ let $t02835728551 = if (claim)
796849 then claimFarmed(type, pool)
797850 else {
798851 let claimedAsset = if ((type == SF_POOL))
800853 else WXID
801854 $Tuple2(amountToExchange, claimedAsset)
802855 }
803- let claimedAmount = $t02806028254._1
804- let claimedAsset = $t02806028254._2
856+ let claimedAmount = $t02835728551._1
857+ let claimedAsset = $t02835728551._2
805858 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
806859 let change = (claimedAmount - amountToExchange)
807860 let changeEntry = if ((change > 0))
814867
815868 @Callable(i)
816869 func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
817- let $t02891029104 = if (claim)
870+ let $t02920729401 = if (claim)
818871 then claimFarmed(type, pool)
819872 else {
820873 let claimedAsset = if ((type == SF_POOL))
822875 else WXID
823876 $Tuple2(amountToExchange, claimedAsset)
824877 }
825- let claimedAmount = $t02891029104._1
826- let claimedAsset = $t02891029104._2
878+ let claimedAmount = $t02920729401._1
879+ let claimedAsset = $t02920729401._2
827880 let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
828881 let change = (claimedAmount - amountToExchange)
829882 let changeEntry = if ((change > 0))
836889
837890 @Callable(i)
838891 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
839- let $t02982730021 = if (claim)
892+ let $t03012430318 = if (claim)
840893 then claimFarmed(type, pool)
841894 else {
842895 let claimedAsset = if ((type == SF_POOL))
844897 else WXID
845898 $Tuple2(amountToExchange, claimedAsset)
846899 }
847- let claimedAmount = $t02982730021._1
848- let claimedAsset = $t02982730021._2
900+ let claimedAmount = $t03012430318._1
901+ let claimedAsset = $t03012430318._2
849902 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
850903 let change = (claimedAmount - amountToExchange)
851904 let changeEntry = if ((change > 0))
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 = "cap"
99
1010 let LOAN_FEE = "loan"
1111
1212 let NO_LOAN_FEE = "noLoan"
1313
1414 let SCALE8 = 100000000
1515
1616 let SCALE10 = 10000000000
1717
1818 let FEE_SCALE6 = 1000000
1919
2020 let kSFPoolAAssetBalance = "A_asset_balance"
2121
2222 let kSFPoolBAssetBalance = "B_asset_balance"
2323
2424 let kSFPoolAAssetId = "A_asset_id"
2525
2626 let kSFPoolBAssetId = "B_asset_id"
2727
2828 let kSFPoolShareId = "share_asset_id"
2929
3030 let kSFPoolFee = "commission"
3131
3232 let kUserPosition = "_user_position"
3333
3434 let kUserBorrowAmount = "_user_position_borrow_amount"
3535
3636 let kUserBorrowAssetId = "_user_position_borrow_asset_id"
3737
3838 let kUserPositionNum = "_user_position_number"
3939
4040 let kUserPositionInterest = "_user_position_interest"
4141
4242 let kPoolTotal = "_pool_total"
4343
4444 let kPoolInterest = "_pool_interest"
4545
4646 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
4747
4848 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
4949
5050 let kAxlyCapFee = "_axly_fee_cap"
5151
5252 let kRequestId = "_request_id"
5353
5454 let kRequestIter = "requests_iter"
5555
5656 let kPool = "pool_"
5757
5858 let kPoolCapChange = "_pool_cap_change"
5959
6060 let kMoneyBox = "axly_money_box"
6161
6262 let kSFFarmingAddr = "swopfi_farming_addr"
6363
6464 let kLendService = "lend_service_addr"
6565
6666 let kPriceOracle = "price_oracle"
6767
6868 let kExContract = "exchange_contract"
6969
7070 let kWxSwapContract = "wx_swap_contract"
7171
7272 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
7373
7474 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
7575
7676 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
7777
7878 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
7979
8080 let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
8181
8282 let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
8383
8484 func isSelfCall (i) = if ((i.caller == this))
8585 then unit
8686 else throw("Only contract itself can call this function")
8787
8888
8989 func accountBalance (assetId) = match assetId {
9090 case id: ByteVector =>
9191 assetBalance(this, id)
9292 case waves: Unit =>
9393 wavesBalance(this).available
9494 case _ =>
9595 throw("Match error")
9696 }
9797
9898
9999 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"))
100100
101101
102102 func getWXPoolData (poolAddr) = {
103103 let cfg = {
104104 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
105105 if ($isInstanceOf(@, "List[Any]"))
106106 then @
107107 else throw(($getType(@) + " couldn't be cast to List[Any]"))
108108 }
109109 if ((cfg == cfg))
110110 then $Tuple5(valueOrErrorMessage({
111111 let @ = cfg[4]
112112 if ($isInstanceOf(@, "String"))
113113 then @
114114 else unit
115115 }, "Can't get pool A asset id"), valueOrErrorMessage({
116116 let @ = cfg[5]
117117 if ($isInstanceOf(@, "String"))
118118 then @
119119 else unit
120120 }, "Can't get pool B asset id"), 0, 0, valueOrErrorMessage({
121121 let @ = cfg[3]
122122 if ($isInstanceOf(@, "String"))
123123 then @
124124 else unit
125125 }, "Can't get pool LP asset id"))
126126 else throw("Strict value is not equal to itself.")
127127 }
128128
129129
130130 func getPoolData (poolAddr,type) = if ((type == SF_POOL))
131131 then getSFPoolData(poolAddr)
132132 else if ((type == WX_POOL))
133133 then getWXPoolData(poolAddr)
134134 else throw("Wrong pool type")
135135
136136
137137 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
138138
139139
140140 func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (((pool + "_") + user) + kUserPositionNum)), 0) + 1)
141141
142142
143143 func getAxlyFee (pool,feeType) = if ((feeType == "cap"))
144144 then getIntegerValue(this, (pool + kAxlyCapFee))
145145 else if ((feeType == "loan"))
146146 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
147147 else if ((feeType == "noLoan"))
148148 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
149149 else throw("Wrong fee type")
150150
151151
152152 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
153153
154154
155155 func getWXFarmingAddr (poolAddr) = {
156156 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
157157 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
158158 Address(fromBase58String(factroyCfg[1]))
159159 }
160160
161161
162162 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
163163
164164
165165 func assetIdToStr (assetId) = match assetId {
166166 case id: ByteVector =>
167167 toBase58String(id)
168168 case waves: Unit =>
169169 "WAVES"
170170 case _ =>
171171 throw("Match error")
172172 }
173173
174174
175175 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
176176 then unit
177177 else fromBase58String(assetId)
178178
179179
180180 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
181181 then 8
182182 else match assetInfo(fromBase58String(assetId)) {
183183 case asset: Asset =>
184184 asset.decimals
185185 case _ =>
186186 throw("Can't find asset")
187187 }
188188
189189
190190 func replenishSwopFi (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId) = {
191191 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
192192 if ((shareBalanceBefore == shareBalanceBefore))
193193 then {
194194 let poolAddr = Address(fromBase58String(pool))
195195 let ratioA = fraction(SCALE8, pmtA, balA)
196196 let ratioB = fraction(SCALE8, pmtB, balB)
197197 let $t063976689 = if ((ratioB > ratioA))
198198 then {
199199 let pmt = fraction(balB, ratioA, SCALE8, CEILING)
200200 $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
201201 }
202202 else {
203203 let pmt = fraction(balA, ratioB, SCALE8, CEILING)
204204 $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
205205 }
206206 let pmtAmountA = $t063976689._1
207207 let pmtAmountB = $t063976689._2
208208 let change = $t063976689._3
209209 let changeAssetId = $t063976689._4
210210 let inv1 = if (if ((pmtAmountA > 0))
211211 then (pmtAmountB > 0)
212212 else false)
213213 then {
214214 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
215215 invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
216216 }
217217 else 0
218218 if ((inv1 == inv1))
219219 then {
220220 let inv2 = if ((change > 0))
221221 then {
222222 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
223223 let vars = ["0", "false", "0"]
224224 invoke(poolAddr, "callFunction", ["replenishWithOneToken", vars], payments)
225225 }
226226 else 0
227227 if ((inv2 == inv2))
228228 then {
229229 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
230230 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
231231 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
232232 let userShareForStake = (totalStaked - axlyFeeAmount)
233233 if ((0 >= userShareForStake))
234234 then throw("amount of staked sharetokens must be > 0")
235235 else {
236236 let inv3 = invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], [AttachedPayment(fromBase58String(shareId), userShareForStake)])
237237 if ((inv3 == inv3))
238238 then $Tuple2(userShareForStake, axlyFeeAmount)
239239 else throw("Strict value is not equal to itself.")
240240 }
241241 }
242242 else throw("Strict value is not equal to itself.")
243243 }
244244 else throw("Strict value is not equal to itself.")
245245 }
246246 else throw("Strict value is not equal to itself.")
247247 }
248248
249249
250250 func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = {
251251 let poolAddr = Address(fromBase58String(pool))
252252 let $t081408989 = if (if ((pmtA > 0))
253253 then (pmtB > 0)
254254 else false)
255255 then {
256256 let evalPutInA = split({
257257 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
258258 if ($isInstanceOf(@, "String"))
259259 then @
260260 else throw(($getType(@) + " couldn't be cast to String"))
261261 }, "__")
262262 if ((evalPutInA == evalPutInA))
263263 then {
264264 let evalPutInB = split({
265265 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
266266 if ($isInstanceOf(@, "String"))
267267 then @
268268 else throw(($getType(@) + " couldn't be cast to String"))
269269 }, "__")
270270 if ((evalPutInB == evalPutInB))
271271 then {
272272 let lpInA = parseIntValue(evalPutInA[1])
273273 let lpInB = parseIntValue(evalPutInB[1])
274274 if ((lpInB > lpInA))
275275 then {
276276 let pmtInB = parseIntValue(evalPutInA[8])
277277 $Tuple4(pmtA, pmtInB, (pmtB - pmtInB), pmtAssetB)
278278 }
279279 else {
280280 let pmtInA = parseIntValue(evalPutInB[7])
281281 $Tuple4(pmtInA, pmtB, (pmtA - pmtInA), pmtAssetA)
282282 }
283283 }
284284 else throw("Strict value is not equal to itself.")
285285 }
286286 else throw("Strict value is not equal to itself.")
287287 }
288288 else if ((pmtA > 0))
289289 then $Tuple4(pmtA, pmtB, pmtA, pmtAssetA)
290290 else if ((pmtB > 0))
291291 then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB)
292292 else throw("pmts must be > 0")
293293 let pmtAmountA = $t081408989._1
294294 let pmtAmountB = $t081408989._2
295295 let change = $t081408989._3
296296 let changeAssetId = $t081408989._4
297297 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
298298 if ((shareBalanceBefore == shareBalanceBefore))
299299 then {
300300 let inv1 = if (if ((pmtAmountA > 0))
301301 then (pmtAmountB > 0)
302302 else false)
303303 then {
304304 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
305305 invoke(poolAddr, "put", [1000000, false], payments)
306306 }
307307 else 0
308308 if ((inv1 == inv1))
309309 then {
310310 let inv2 = if ((change > 0))
311311 then {
312312 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
313313 invoke(poolAddr, "putOneTkn", [0, false], payments)
314314 }
315315 else 0
316316 if ((inv2 == inv2))
317317 then {
318318 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
319319 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
320320 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
321321 let userShareForStake = (totalStaked - axlyFeeAmount)
322322 if ((0 >= userShareForStake))
323323 then throw("amount of staked sharetokens must be > 0")
324324 else {
325325 let inv3 = invoke(getWXFarmingAddr(poolAddr), "stake", nil, [AttachedPayment(fromBase58String(shareId), userShareForStake)])
326326 if ((inv3 == inv3))
327327 then $Tuple2(userShareForStake, axlyFeeAmount)
328328 else throw("Strict value is not equal to itself.")
329329 }
330330 }
331331 else throw("Strict value is not equal to itself.")
332332 }
333333 else throw("Strict value is not equal to itself.")
334334 }
335335 else throw("Strict value is not equal to itself.")
336336 }
337337
338338
339+func replenishByType (type,pool,feeType,pmtA,AId,pmtB,BId,balA,balB,shareId) = if ((type == SF_POOL))
340+ then replenishSwopFi(pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
341+ else if ((type == WX_POOL))
342+ then replenishWX(pool, LOAN_FEE, pmtA, AId, pmtB, BId, shareId)
343+ else throw("Wrong pool type")
344+
345+
339346 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type) = {
340347 let totalAmount = getPoolTotalShare(pool)
341348 let curPoolInterest = getIntegerValue(this, (pool + kPoolInterest))
342349 [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))]
343350 }
344351
345352
346353 func claimFarmed (type,pool) = if ((type == SF_POOL))
347354 then {
348355 let balBefore = accountBalance(SWOPID)
349356 if ((balBefore == balBefore))
350357 then {
351358 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
352359 if ((inv == inv))
353360 then {
354361 let balAfter = accountBalance(SWOPID)
355362 $Tuple2((balAfter - balBefore), SWOPID)
356363 }
357364 else throw("Strict value is not equal to itself.")
358365 }
359366 else throw("Strict value is not equal to itself.")
360367 }
361368 else if ((type == WX_POOL))
362369 then {
363370 let balBefore = accountBalance(WXID)
364371 if ((balBefore == balBefore))
365372 then {
366373 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
367374 if ((inv == inv))
368375 then {
369376 let balAfter = accountBalance(WXID)
370377 $Tuple2((balAfter - balBefore), WXID)
371378 }
372379 else throw("Strict value is not equal to itself.")
373380 }
374381 else throw("Strict value is not equal to itself.")
375382 }
376383 else throw("Wrong pool type")
377384
378385
379386 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
380387 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
381388 if ((tokenBalanceBefore == tokenBalanceBefore))
382389 then {
383390 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
384391 if ((inv == inv))
385392 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
386393 else throw("Strict value is not equal to itself.")
387394 }
388395 else throw("Strict value is not equal to itself.")
389396 }
390397
391398
392399 func exchangePazzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
393400 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
394401 if ((tokenBalanceBefore == tokenBalanceBefore))
395402 then {
396403 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
397404 if ((inv == inv))
398405 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
399406 else throw("Strict value is not equal to itself.")
400407 }
401408 else throw("Strict value is not equal to itself.")
402409 }
403410
404411
405412 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
406413 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
407414 if ((tokenBalanceBefore == tokenBalanceBefore))
408415 then {
409416 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
410417 if ((inv == inv))
411418 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
412419 else throw("Strict value is not equal to itself.")
413420 }
414421 else throw("Strict value is not equal to itself.")
415422 }
416423
417424
418-func capitalize (pool,type,tokenId,tokenAmount) = {
425+func capitalize (pool,pType,tokenId,tokenAmount) = {
419426 let poolAddr = Address(fromBase58String(pool))
420- let $t01319013268 = getPoolData(poolAddr, type)
421- let AId = $t01319013268._1
422- let BId = $t01319013268._2
423- let balA = $t01319013268._3
424- let balB = $t01319013268._4
425- let shareId = $t01319013268._5
426- let $t01327113351 = if ((tokenId == AId))
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))
427434 then $Tuple2(tokenAmount, 0)
428435 else $Tuple2(0, tokenAmount)
429- let pmtA = $t01327113351._1
430- let pmtB = $t01327113351._2
431- let $t01335413715 = if ((type == SF_POOL))
432- then replenishSwopFi(pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
433- else replenishWX(pool, CAP_FEE, pmtA, AId, pmtB, BId, shareId)
434- let stakedAmount = $t01335413715._1
435- let axlyFee = $t01335413715._2
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
436441 let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
437442 let totalShareAmount = getPoolTotalShare(pool)
438443 let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount))
439444 [IntegerEntry((pool + kPoolInterest), newInterest), ScriptTransfer(moneyBox, axlyFee, fromBase58String(shareId))]
440445 }
441446
442447
443448 func exchangeDirectlySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
444449 let poolAddr = Address(fromBase58String(pool))
445450 let feeScale6 = 1000000
446451 let fee = getIntegerValue(poolAddr, kSFPoolFee)
447452 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
448- let $t01440814696 = if ((assetTokenToGet == assetIdA))
453+ let $t01479215080 = if ((assetTokenToGet == assetIdA))
449454 then {
450455 let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
451456 $Tuple2(amountToPay, assetIdB)
452457 }
453458 else {
454459 let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
455460 $Tuple2(amountToPay, assetIdA)
456461 }
457- let amountToPay = $t01440814696._1
458- let assetToPay = $t01440814696._2
462+ let amountToPay = $t01479215080._1
463+ let assetToPay = $t01479215080._2
459464 invoke(poolAddr, "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
460465 }
461466
462467
463468 func exchangeDirectlyWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
464469 let poolAddr = Address(fromBase58String(pool))
465470 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
466471 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
467472 let feeScale = toBigInt(100000000)
468- let $t01517515483 = if ((assetTokenToGet == assetIdA))
473+ let $t01555915867 = if ((assetTokenToGet == assetIdA))
469474 then {
470475 let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
471476 $Tuple2(amountToPay, assetIdB)
472477 }
473478 else {
474479 let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
475480 $Tuple2(amountToPay, assetIdA)
476481 }
477- let amountToPay = $t01517515483._1
478- let assetToPay = $t01517515483._2
482+ let amountToPay = $t01555915867._1
483+ let assetToPay = $t01555915867._2
479484 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
480485 invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)])
481486 }
482487
483488
484489 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
485490 then exchangeDirectlySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
486491 else exchangeDirectlyWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
487492
488493
489494 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
490495 let poolAddr = Address(fromBase58String(pool))
491496 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
492- let $t01634816415 = getPoolData(poolAddr, pType)
493- let assetIdA = $t01634816415._1
494- let assetIdB = $t01634816415._2
495- let balA = $t01634816415._3
496- let balB = $t01634816415._4
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
497502 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
498503 if ((cBalABefore == cBalABefore))
499504 then {
500505 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
501506 if ((cBalBBefore == cBalBBefore))
502507 then {
503508 let inv = if ((pType == SF_POOL))
504509 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
505510 else if ((pType == WX_POOL))
506511 then invoke(poolAddr, "unstakeAndGet", [userCanWithdraw], nil)
507512 else throw("Wrong position type")
508513 if ((inv == inv))
509514 then {
510515 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
511516 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
512- let $t01692717016 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
513- let tokensAmountA = $t01692717016._1
514- let tokensAmountB = $t01692717016._2
515- let $t01701917715 = if ((debt > 0))
517+ let $t01731117400 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
518+ let tokensAmountA = $t01731117400._1
519+ let tokensAmountB = $t01731117400._2
520+ let $t01740318099 = if ((debt > 0))
516521 then {
517522 let amountToGetEx = if (if ((borrowAsset == assetIdA))
518523 then (debt > tokensAmountA)
519524 else false)
520525 then (debt - tokensAmountA)
521526 else if (if ((borrowAsset == assetIdB))
522527 then (debt > tokensAmountB)
523528 else false)
524529 then (debt - tokensAmountB)
525530 else 0
526531 let exInv = if ((amountToGetEx > 0))
527532 then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset)
528533 else 0
529534 if ((exInv == exInv))
530535 then {
531536 let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
532537 let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
533538 $Tuple2((cBalAAfterRepay - cBalABefore), (cBalBAfterRepay - cBalBBefore))
534539 }
535540 else throw("Strict value is not equal to itself.")
536541 }
537542 else $Tuple2(tokensAmountA, tokensAmountB)
538- let toUserAmountA = $t01701917715._1
539- let toUserAmountB = $t01701917715._2
543+ let toUserAmountA = $t01740318099._1
544+ let toUserAmountB = $t01740318099._2
540545 $Tuple4(toUserAmountA, assetIdA, toUserAmountB, assetIdB)
541546 }
542547 else throw("Strict value is not equal to itself.")
543548 }
544549 else throw("Strict value is not equal to itself.")
545550 }
546551 else throw("Strict value is not equal to itself.")
547552 }
548553
549554
555+func parseRequest (requestId) = {
556+ let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
557+ let user = request[0]
558+ let pool = request[1]
559+ let pmtA = parseIntValue(request[2])
560+ let AId = request[3]
561+ let pmtB = parseIntValue(request[4])
562+ let BId = request[5]
563+ let balA = parseIntValue(request[6])
564+ let balB = parseIntValue(request[7])
565+ let shareId = request[8]
566+ let bwAsset = request[9]
567+ let bwAmount = parseIntValue(request[10])
568+ $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
569+ }
570+
571+
550572 @Callable(i)
551573 func replenishREADONLY (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
552574 then true
553575 else (leverage > 300))
554576 then throw("Leverage can't be <100 and >300")
555577 else {
556- let type = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
557- let $t01807818167 = getPoolData(Address(fromBase58String(pool)), type)
558- let AId = $t01807818167._1
559- let BId = $t01807818167._2
560- let balA = $t01807818167._3
561- let balB = $t01807818167._4
562- let shareId = $t01807818167._5
563- let $t01817018807 = if ((size(i.payments) == 2))
578+ 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))
564586 then if ((assetIdToStr(i.payments[0].assetId) != AId))
565587 then throw("Wrong payment asset A")
566588 else if ((assetIdToStr(i.payments[1].assetId) != BId))
567589 then throw("Wrong payment asset B")
568590 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
569591 else if ((size(i.payments) == 1))
570592 then if ((assetIdToStr(i.payments[0].assetId) == AId))
571593 then $Tuple4(i.payments[0].amount, AId, 0, BId)
572594 else if ((assetIdToStr(i.payments[0].assetId) == BId))
573595 then $Tuple4(0, AId, i.payments[0].amount, BId)
574596 else throw("Wrong payment")
575597 else throw("One or two payments expected")
576- let pmtA = $t01817018807._1
577- let pmtAssetA = $t01817018807._2
578- let pmtB = $t01817018807._3
579- let pmtAssetB = $t01817018807._4
580- let $t01881020335 = if ((leverage > 100))
598+ let pmtA = $t01914619783._1
599+ let pmtAssetA = $t01914619783._2
600+ let pmtB = $t01914619783._3
601+ let pmtAssetB = $t01914619783._4
602+ let $t01978621297 = if ((leverage > 100))
581603 then {
582604 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
583605 if ($isInstanceOf(@, "(Int, Int)"))
584606 then @
585607 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
586608 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
587609 if ($isInstanceOf(@, "(Int, Int)"))
588610 then @
589611 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
590612 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
591613 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
592- let request = makeString([type, toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(1)], ",")
614+ let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(1)], ",")
593615 let newRequestId = {
594616 let @ = invoke(this, "createNewRequest", [request], nil)
595617 if ($isInstanceOf(@, "Int"))
596618 then @
597619 else throw(($getType(@) + " couldn't be cast to Int"))
598620 }
599621 if ((newRequestId == newRequestId))
600622 then {
601623 let args = [((toString(i.caller) + "_") + toString(1)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLandReadOnly", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
602624 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
603625 if ((inv == inv))
604626 then if ((borrowAssetId == pmtAssetA))
605627 then $Tuple4((pmtA + borrowAmount), pmtB, LOAN_FEE, borrowAmount)
606628 else $Tuple4(pmtA, (pmtB + borrowAmount), LOAN_FEE, borrowAmount)
607629 else throw("Strict value is not equal to itself.")
608630 }
609631 else throw("Strict value is not equal to itself.")
610632 }
611633 else $Tuple4(pmtA, pmtB, NO_LOAN_FEE, 0)
612- let paymentA = $t01881020335._1
613- let paymentB = $t01881020335._2
614- let feeType = $t01881020335._3
615- let borrowAmount = $t01881020335._4
616- let $t02033820732 = if ((type == SF_POOL))
617- then replenishSwopFi(pool, feeType, paymentA, pmtAssetA, paymentB, pmtAssetB, balA, balB, shareId)
618- else replenishWX(pool, feeType, pmtA, pmtAssetA, pmtB, pmtAssetB, shareId)
619- let userStaked = $t02033820732._1
620- let axlyFee = $t02033820732._2
621- let $t02073520860 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
622- if (($t02073520860 == $t02073520860))
634+ let paymentA = $t01978621297._1
635+ let paymentB = $t01978621297._2
636+ let feeType = $t01978621297._3
637+ let borrowAmount = $t01978621297._4
638+ let $t02130021412 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
639+ let userStaked = $t02130021412._1
640+ let axlyFee = $t02130021412._2
641+ let $t02141621541 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
642+ if (($t02141621541 == $t02141621541))
623643 then {
624- let assetIdB = $t02073520860._4
625- let toUserAmountB = $t02073520860._3
626- let assetIdA = $t02073520860._2
627- let toUserAmountA = $t02073520860._1
644+ let assetIdB = $t02141621541._4
645+ let toUserAmountB = $t02141621541._3
646+ let assetIdA = $t02141621541._2
647+ let toUserAmountA = $t02141621541._1
628648 $Tuple2(nil, [userStaked, toUserAmountA, toUserAmountB])
629649 }
630650 else throw("Strict value is not equal to itself.")
631651 }
632652
633653
634654
635655 @Callable(i)
636-func replenishFromLandReadOnly (requestId) = $Tuple2(nil, 11111)
656+func replenishFromLandReadOnly (requestId) = {
657+ let $t02166521769 = parseRequest(requestId)
658+ let user = $t02166521769._1
659+ let pool = $t02166521769._2
660+ let pmtA = $t02166521769._3
661+ let AId = $t02166521769._4
662+ let pmtB = $t02166521769._5
663+ let BId = $t02166521769._6
664+ let balA = $t02166521769._7
665+ let balB = $t02166521769._8
666+ let shareId = $t02166521769._9
667+ let bwAsset = $t02166521769._10
668+ let bwAmount = $t02166521769._11
669+ if ((size(i.payments) != 1))
670+ then throw("Wrong payment size")
671+ else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
672+ then true
673+ else (i.payments[0].amount != bwAmount))
674+ then throw("Wrong payment")
675+ else {
676+ let $t02195922083 = if ((AId == bwAsset))
677+ then $Tuple2((pmtA + i.payments[0].amount), pmtB)
678+ else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
679+ let pmtAllA = $t02195922083._1
680+ let pmtAllB = $t02195922083._2
681+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
682+ let $t02216522274 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
683+ let userStaked = $t02216522274._1
684+ let axlyFee = $t02216522274._2
685+ nil
686+ }
687+ }
637688
638689
639690
640691 @Callable(i)
641692 func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
642693 then true
643694 else (leverage > 300))
644695 then throw("Leverage can't be <100 and >300")
645696 else {
646- let type = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
647- let $t02130221391 = getPoolData(Address(fromBase58String(pool)), type)
648- let AId = $t02130221391._1
649- let BId = $t02130221391._2
650- let balA = $t02130221391._3
651- let balB = $t02130221391._4
652- let shareId = $t02130221391._5
653- let $t02139422031 = if ((size(i.payments) == 2))
697+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
698+ let $t02258822678 = getPoolData(Address(fromBase58String(pool)), pType)
699+ let AId = $t02258822678._1
700+ let BId = $t02258822678._2
701+ let balA = $t02258822678._3
702+ let balB = $t02258822678._4
703+ let shareId = $t02258822678._5
704+ let $t02268123318 = if ((size(i.payments) == 2))
654705 then if ((assetIdToStr(i.payments[0].assetId) != AId))
655706 then throw("Wrong payment asset A")
656707 else if ((assetIdToStr(i.payments[1].assetId) != BId))
657708 then throw("Wrong payment asset B")
658709 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
659710 else if ((size(i.payments) == 1))
660711 then if ((assetIdToStr(i.payments[0].assetId) == AId))
661712 then $Tuple4(i.payments[0].amount, AId, 0, BId)
662713 else if ((assetIdToStr(i.payments[0].assetId) == BId))
663714 then $Tuple4(0, AId, i.payments[0].amount, BId)
664715 else throw("Wrong payment")
665716 else throw("One or two payments expected")
666- let pmtA = $t02139422031._1
667- let pmtAssetA = $t02139422031._2
668- let pmtB = $t02139422031._3
669- let pmtAssetB = $t02139422031._4
717+ let pmtA = $t02268123318._1
718+ let pmtAssetA = $t02268123318._2
719+ let pmtB = $t02268123318._3
720+ let pmtAssetB = $t02268123318._4
670721 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
671722 if ((leverage > 100))
672723 then {
673724 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
674725 if ($isInstanceOf(@, "(Int, Int)"))
675726 then @
676727 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
677728 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
678729 if ($isInstanceOf(@, "(Int, Int)"))
679730 then @
680731 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
681732 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
682733 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
683- let request = makeString([type, toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(newPosNum)], ",")
734+ let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",")
684735 let newRequestId = {
685736 let @ = invoke(this, "createNewRequest", [request], nil)
686737 if ($isInstanceOf(@, "Int"))
687738 then @
688739 else throw(($getType(@) + " couldn't be cast to Int"))
689740 }
690741 if ((newRequestId == newRequestId))
691742 then {
692743 let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
693744 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
694745 if ((inv == inv))
695746 then nil
696747 else throw("Strict value is not equal to itself.")
697748 }
698749 else throw("Strict value is not equal to itself.")
699750 }
700751 else {
701- let $t02337223763 = if ((type == SF_POOL))
702- then replenishSwopFi(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, balA, balB, shareId)
703- else replenishWX(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, shareId)
704- let userStaked = $t02337223763._1
705- let axlyFee = $t02337223763._2
706- replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, type)
752+ let $t02461524727 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
753+ let userStaked = $t02461524727._1
754+ let axlyFee = $t02461524727._2
755+ replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType)
707756 }
708757 }
709758
710759
711760
712761 @Callable(i)
713762 func replenishFromLand (requestId) = {
714- let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
763+ let $t02488924993 = parseRequest(requestId)
764+ let user = $t02488924993._1
765+ let pool = $t02488924993._2
766+ let pmtA = $t02488924993._3
767+ let AId = $t02488924993._4
768+ let pmtB = $t02488924993._5
769+ let BId = $t02488924993._6
770+ let balA = $t02488924993._7
771+ let balB = $t02488924993._8
772+ let shareId = $t02488924993._9
773+ let bwAsset = $t02488924993._10
774+ let bwAmount = $t02488924993._11
715775 if ((size(i.payments) != 1))
716776 then throw("Wrong payment size")
717- else if (if ((assetIdToStr(i.payments[0].assetId) != request[10]))
777+ else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
718778 then true
719- else (i.payments[0].amount != parseIntValue(request[11])))
779+ else (i.payments[0].amount != bwAmount))
720780 then throw("Wrong payment")
721781 else {
722- let pmtA = if ((request[4] == assetIdToStr(i.payments[0].assetId)))
723- then (parseIntValue(request[3]) + i.payments[0].amount)
724- else parseIntValue(request[3])
725- let pmtB = if ((request[6] == assetIdToStr(i.payments[0].assetId)))
726- then (parseIntValue(request[5]) + i.payments[0].amount)
727- else parseIntValue(request[3])
728- let pool = request[2]
729- let user = request[1]
730- let shareId = request[9]
731- let posNum = parseIntValue(request[12])
732- let $t02472125236 = if ((request[0] == SF_POOL))
733- then replenishSwopFi(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], parseIntValue(request[7]), parseIntValue(request[8]), shareId)
734- else if ((request[0] == WX_POOL))
735- then replenishWX(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], shareId)
736- else throw("Wrong request type")
737- let userStaked = $t02472125236._1
738- let axlyFee = $t02472125236._2
739- let borrowEntries = [IntegerEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAmount), i.payments[0].amount), StringEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAssetId), request[10])]
740- let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, request[0])
782+ let $t02518325307 = if ((AId == bwAsset))
783+ then $Tuple2((pmtA + i.payments[0].amount), pmtB)
784+ else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
785+ let pmtAllA = $t02518325307._1
786+ let pmtAllB = $t02518325307._2
787+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
788+ let $t02538925498 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
789+ let userStaked = $t02538925498._1
790+ let axlyFee = $t02538925498._2
791+ let posNum = getNewUserPositionNumber(pool, toString(i.caller))
792+ let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
793+ let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType)
741794 $Tuple2(((entries ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
742795 }
743796 }
744797
745798
746799
747800 @Callable(i)
748801 func withdraw (pool,posId) = {
749802 let user = toString(i.caller)
750803 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), "Unknown position")
751804 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest))
752805 let poolInterst = getIntegerValue(this, (pool + kPoolInterest))
753806 let poolTotalShare = getPoolTotalShare(pool)
754807 let userCanWithdraw = (pAmount + fraction(pAmount, (poolInterst - userInterest), SCALE10))
755808 let userAddr = Address(fromBase58String(user))
756809 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAmount))
757810 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAssetId))
758811 let debt = if ((borrowAmount > 0))
759812 then {
760813 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((((pool + "_") + user) + "_") + toString(posId)), borrowAsset], nil)
761814 if ($isInstanceOf(@, "Int"))
762815 then @
763816 else throw(($getType(@) + " couldn't be cast to Int"))
764817 }
765818 else 0
766- let $t02664326763 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
767- if (($t02664326763 == $t02664326763))
819+ let $t02694027060 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
820+ if (($t02694027060 == $t02694027060))
768821 then {
769- let assetIdB = $t02664326763._4
770- let toUserAmountB = $t02664326763._3
771- let assetIdA = $t02664326763._2
772- let toUserAmountA = $t02664326763._1
822+ let assetIdB = $t02694027060._4
823+ let toUserAmountB = $t02694027060._3
824+ let assetIdA = $t02694027060._2
825+ let toUserAmountA = $t02694027060._1
773826 let closeDbtInv = if ((debt > 0))
774827 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + toString(posId))], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
775828 else 0
776829 if ((closeDbtInv == closeDbtInv))
777830 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))]
778831 else throw("Strict value is not equal to itself.")
779832 }
780833 else throw("Strict value is not equal to itself.")
781834 }
782835
783836
784837
785838 @Callable(i)
786839 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
787840 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
788841 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
789842 })
790843
791844
792845
793846 @Callable(i)
794847 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
795- let $t02806028254 = if (claim)
848+ let $t02835728551 = if (claim)
796849 then claimFarmed(type, pool)
797850 else {
798851 let claimedAsset = if ((type == SF_POOL))
799852 then SWOPID
800853 else WXID
801854 $Tuple2(amountToExchange, claimedAsset)
802855 }
803- let claimedAmount = $t02806028254._1
804- let claimedAsset = $t02806028254._2
856+ let claimedAmount = $t02835728551._1
857+ let claimedAsset = $t02835728551._2
805858 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
806859 let change = (claimedAmount - amountToExchange)
807860 let changeEntry = if ((change > 0))
808861 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
809862 else nil
810863 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
811864 }
812865
813866
814867
815868 @Callable(i)
816869 func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
817- let $t02891029104 = if (claim)
870+ let $t02920729401 = if (claim)
818871 then claimFarmed(type, pool)
819872 else {
820873 let claimedAsset = if ((type == SF_POOL))
821874 then SWOPID
822875 else WXID
823876 $Tuple2(amountToExchange, claimedAsset)
824877 }
825- let claimedAmount = $t02891029104._1
826- let claimedAsset = $t02891029104._2
878+ let claimedAmount = $t02920729401._1
879+ let claimedAsset = $t02920729401._2
827880 let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
828881 let change = (claimedAmount - amountToExchange)
829882 let changeEntry = if ((change > 0))
830883 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
831884 else nil
832885 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
833886 }
834887
835888
836889
837890 @Callable(i)
838891 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
839- let $t02982730021 = if (claim)
892+ let $t03012430318 = if (claim)
840893 then claimFarmed(type, pool)
841894 else {
842895 let claimedAsset = if ((type == SF_POOL))
843896 then SWOPID
844897 else WXID
845898 $Tuple2(amountToExchange, claimedAsset)
846899 }
847- let claimedAmount = $t02982730021._1
848- let claimedAsset = $t02982730021._2
900+ let claimedAmount = $t03012430318._1
901+ let claimedAsset = $t03012430318._2
849902 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
850903 let change = (claimedAmount - amountToExchange)
851904 let changeEntry = if ((change > 0))
852905 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
853906 else nil
854907 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
855908 }
856909
857910
858911
859912 @Callable(i)
860913 func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFee) = if (if ((type != SF_POOL))
861914 then (type != WX_POOL)
862915 else false)
863916 then throw("Wrong type")
864917 else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyCapFee), capFee), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type)]
865918
866919
867920 @Verifier(tx)
868921 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
869922

github/deemru/w8io/026f985 
115.10 ms