tx · GXwAxZXERgcp37f6kmjBUgwH4EZQuaKKXbwDRE1SSJau

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.04100000 Waves

2023.06.02 11:49 [2604844] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "GXwAxZXERgcp37f6kmjBUgwH4EZQuaKKXbwDRE1SSJau", "fee": 4100000, "feeAssetId": null, "timestamp": 1685695783574, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "3EMWGZYzusFJuzFo5rJk79DwWAXDsTExPZm5nzdyren9ceQTyt8Yoz44GjteF3Rqmka9tPHoG1H9bLp7HEcxmZ5m" ], "script": "base64:BgKRAQgCEgcKBQgBCAEBEgMKAQgSBAoCCAgSBQoDCAEIEgMKAQgSBAoCCAESBgoEAQgIARIFCgMBCAgSAwoBCBIGCgQIAQgIEgUKAwgIARIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEgoKCAgIAQEBAQEBEgYKBAgICAESBAoCCAheAAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4AFFNUT1BMT1NTX0ZFRV9OT19MT0FOAg5zdG9wTG9zc05vTG9hbgANU1RPUExPU1NfTE9BTgIMc3RvcExvc3NMb2FuAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGTk9fRkVFAgVub0ZlZQAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZQIPQV9hc3NldF9iYWxhbmNlABRrU0ZQb29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yUHVibGljS2V5yZW6sQ==", "height": 2604844, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6TbKo8A2zLaJThrj13ersx3KLkfDtus8QY3kXiQUznos Next: 3qGRKp6MRVwx9wsMF15ynQEffnnypCfAVoz54Hu2HRWF Diff:
OldNewDifferences
284284 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
285285 let poolAddr = Address(fromBase58String(pool))
286286 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
287- let $t084268491 = getPoolData(poolAddr, pType)
288- let aId = $t084268491._1
289- let bId = $t084268491._2
290- let aBalance = $t084268491._3
291- let bBalance = $t084268491._4
287+ let $t084298494 = getPoolData(poolAddr, pType)
288+ let aId = $t084298494._1
289+ let bId = $t084298494._2
290+ let aBalance = $t084298494._3
291+ let bBalance = $t084298494._4
292292 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
293293 if ($isInstanceOf(@, "(Int, Int)"))
294294 then @
328328 }
329329
330330
331-func replenishSwopFi (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId) = {
332- let shareBalanceBefore = accountBalance(fromBase58String(shareId))
333- if ((shareBalanceBefore == shareBalanceBefore))
331+func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = {
332+ let $t096669971 = if ((pType == SF_POOL))
333+ then $Tuple2(nil, nil)
334+ else $Tuple2(split({
335+ let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
336+ if ($isInstanceOf(@, "String"))
337+ then @
338+ else throw(($getType(@) + " couldn't be cast to String"))
339+ }, "__"), split({
340+ let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
341+ if ($isInstanceOf(@, "String"))
342+ then @
343+ else throw(($getType(@) + " couldn't be cast to String"))
344+ }, "__"))
345+ if (($t096669971 == $t096669971))
334346 then {
335- let poolAddr = Address(fromBase58String(pool))
336- let ratioA = fraction(SCALE8, pmtA, balA)
337- let ratioB = fraction(SCALE8, pmtB, balB)
338- let $t0999610288 = if ((ratioB > ratioA))
347+ let evalPutInB = $t096669971._2
348+ let evalPutInA = $t096669971._1
349+ let $t0998110177 = if ((pType == SF_POOL))
350+ then $Tuple2(fraction(SCALE8, pmtA, balA), fraction(SCALE8, pmtB, balB))
351+ else $Tuple2(parseIntValue(evalPutInA[1]), parseIntValue(evalPutInB[1]))
352+ let ratioA = $t0998110177._1
353+ let ratioB = $t0998110177._2
354+ let $t01018310646 = if ((ratioB > ratioA))
339355 then {
340- let pmt = fraction(balB, ratioA, SCALE8, CEILING)
341- $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
356+ let pmt = if ((pType == SF_POOL))
357+ then fraction(balB, ratioA, SCALE8, CEILING)
358+ else parseIntValue(evalPutInA[8])
359+ $Tuple4(pmtA, pmt, (pmtB - pmt), bId)
342360 }
343361 else {
344- let pmt = fraction(balA, ratioB, SCALE8, CEILING)
345- $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
362+ let pmt = if ((pType == SF_POOL))
363+ then fraction(balA, ratioB, SCALE8, CEILING)
364+ else parseIntValue(evalPutInB[8])
365+ $Tuple4(pmtA, pmtB, (pmtA - pmt), aId)
346366 }
347- let pmtAmountA = $t0999610288._1
348- let pmtAmountB = $t0999610288._2
349- let change = $t0999610288._3
350- let changeAssetId = $t0999610288._4
351- let inv1 = if (if ((pmtAmountA > 0))
352- then (pmtAmountB > 0)
353- else false)
354- then {
355- let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
356- invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
357- }
358- else 0
359- if ((inv1 == inv1))
360- then {
361- let inv2 = if ((change > 0))
362- then {
363- let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
364- let vars = ["0", "false", "0"]
365- invoke(poolAddr, "callFunction", ["replenishWithOneToken", vars], payments)
366- }
367- else 0
368- if ((inv2 == inv2))
369- then {
370- let shareBalanceAfter = accountBalance(fromBase58String(shareId))
371- let totalStaked = (shareBalanceAfter - shareBalanceBefore)
372- let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
373- let userShareForStake = (totalStaked - axlyFeeAmount)
374- if ((0 >= userShareForStake))
375- then throw("amount of staked sharetokens must be > 0")
376- else {
377- let inv3 = invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], [AttachedPayment(fromBase58String(shareId), userShareForStake)])
378- if ((inv3 == inv3))
379- then $Tuple2(userShareForStake, axlyFeeAmount)
380- else throw("Strict value is not equal to itself.")
381- }
382- }
383- else throw("Strict value is not equal to itself.")
384- }
385- else throw("Strict value is not equal to itself.")
367+ let pmtInA = $t01018310646._1
368+ let pmtInB = $t01018310646._2
369+ let change = $t01018310646._3
370+ let changeAssetId = $t01018310646._4
371+ $Tuple4(pmtInA, pmtInB, change, changeAssetId)
386372 }
387373 else throw("Strict value is not equal to itself.")
388374 }
389375
390376
391-func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = {
392- let poolAddr = Address(fromBase58String(pool))
393- let $t01173912588 = if (if ((pmtA > 0))
394- then (pmtB > 0)
395- else false)
396- then {
397- let evalPutInA = split({
398- let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
399- if ($isInstanceOf(@, "String"))
400- then @
401- else throw(($getType(@) + " couldn't be cast to String"))
402- }, "__")
403- if ((evalPutInA == evalPutInA))
404- then {
405- let evalPutInB = split({
406- let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
407- if ($isInstanceOf(@, "String"))
408- then @
409- else throw(($getType(@) + " couldn't be cast to String"))
410- }, "__")
411- if ((evalPutInB == evalPutInB))
412- then {
413- let lpInA = parseIntValue(evalPutInA[1])
414- let lpInB = parseIntValue(evalPutInB[1])
415- if ((lpInB > lpInA))
416- then {
417- let pmtInB = parseIntValue(evalPutInA[8])
418- $Tuple4(pmtA, pmtInB, (pmtB - pmtInB), pmtAssetB)
419- }
420- else {
421- let pmtInA = parseIntValue(evalPutInB[7])
422- $Tuple4(pmtInA, pmtB, (pmtA - pmtInA), pmtAssetA)
423- }
424- }
425- else throw("Strict value is not equal to itself.")
426- }
427- else throw("Strict value is not equal to itself.")
428- }
429- else if ((pmtA > 0))
430- then $Tuple4(pmtA, pmtB, pmtA, pmtAssetA)
431- else if ((pmtB > 0))
432- then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB)
433- else throw("pmts must be > 0")
434- let pmtAmountA = $t01173912588._1
435- let pmtAmountB = $t01173912588._2
436- let change = $t01173912588._3
437- let changeAssetId = $t01173912588._4
438- let shareBalanceBefore = accountBalance(fromBase58String(shareId))
439- if ((shareBalanceBefore == shareBalanceBefore))
440- then {
441- let inv1 = if (if ((pmtAmountA > 0))
442- then (pmtAmountB > 0)
443- else false)
444- then {
445- let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
446- invoke(poolAddr, "put", [1000000, false], payments)
447- }
448- else 0
449- if ((inv1 == inv1))
450- then {
451- let inv2 = if ((change > 0))
452- then {
453- let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
454- invoke(poolAddr, "putOneTkn", [0, false], payments)
455- }
456- else 0
457- if ((inv2 == inv2))
458- then {
459- let shareBalanceAfter = accountBalance(fromBase58String(shareId))
460- let totalStaked = (shareBalanceAfter - shareBalanceBefore)
461- let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
462- let userShareForStake = (totalStaked - axlyFeeAmount)
463- if ((0 >= userShareForStake))
464- then throw("amount of staked sharetokens must be > 0")
465- else {
466- let inv3 = invoke(getWXFarmingAddr(poolAddr), "stake", nil, [AttachedPayment(fromBase58String(shareId), userShareForStake)])
467- if ((inv3 == inv3))
468- then $Tuple2(userShareForStake, axlyFeeAmount)
469- else throw("Strict value is not equal to itself.")
470- }
471- }
472- else throw("Strict value is not equal to itself.")
473- }
474- else throw("Strict value is not equal to itself.")
475- }
377+func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = {
378+ let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)]
379+ if ((pType == SF_POOL))
380+ then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
381+ else invoke(poolAddr, "put", [1000000, false], payments)
382+ }
383+
384+
385+func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = {
386+ let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)]
387+ if ((pType == SF_POOL))
388+ then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments)
389+ else invoke(poolAddr, "putOneTkn", [0, false], payments)
390+ }
391+
392+
393+func stakeLP (pool,pType,shareId,amount) = {
394+ let payments = [AttachedPayment(fromBase58String(shareId), amount)]
395+ if ((pType == SF_POOL))
396+ then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments)
397+ else invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments)
398+ }
399+
400+
401+func unstakeLP (pool,pType,shareId,amount) = {
402+ let $t01187212229 = if ((pType == SF_POOL))
403+ then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
404+ else if ((pType == WX_POOL))
405+ then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
406+ else throw("Wrong pool type")
407+ let farmAddr = $t01187212229._1
408+ let fName = $t01187212229._2
409+ let params = $t01187212229._3
410+ let inv = invoke(farmAddr, fName, params, nil)
411+ if ((inv == inv))
412+ then amount
476413 else throw("Strict value is not equal to itself.")
477414 }
478415
479416
480-func replenishByType (type,pool,feeType,pmtA,AId,pmtB,BId,balA,balB,shareId) = if ((type == SF_POOL))
481- then replenishSwopFi(pool, feeType, pmtA, AId, pmtB, BId, balA, balB, shareId)
482- else if ((type == WX_POOL))
483- then replenishWX(pool, feeType, pmtA, AId, pmtB, BId, shareId)
484- else throw("Wrong pool type")
485-
486-
487-func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
488- let totalAmount = getPoolTotalShare(pool)
489- let totalAmountLoan = getPoolTotalShareWithLoan(pool)
490- let $t01460614844 = if (withLoan)
491- then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
492- else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
493- let curPoolInterest = $t01460614844._1
494- let totalStakedWithLoan = $t01460614844._2
495-[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), totalStakedWithLoan), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), StringEntry((((user + "_") + toString(posNum)) + kUserPositionPool), pool), IntegerEntry((user + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
417+func calcReplanishLPVirt (pType,pool,pmtA,aId,pmtB,bId,balA,balB) = {
418+ let poolAddr = addressFromStringValue(pool)
419+ if ((pType == SF_POOL))
420+ then nil
421+ else if ((pType == WX_POOL))
422+ then {
423+ let $t01254312659 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
424+ let pmtInA = $t01254312659._1
425+ let pmtInB = $t01254312659._2
426+ let change = $t01254312659._3
427+ let changeId = $t01254312659._4
428+ let inv = split({
429+ let @ = invoke(poolAddr, "estimatePutOperationWrapperREADONLY", [pmtInA], nil)
430+ if ($isInstanceOf(@, "String"))
431+ then @
432+ else throw(($getType(@) + " couldn't be cast to String"))
433+ }, "__")
434+ if ((inv == inv))
435+ then nil
436+ else throw("Strict value is not equal to itself.")
437+ }
438+ else throw("Wrong pool type")
496439 }
497440
498441
527470 else throw("Strict value is not equal to itself.")
528471 }
529472 else throw("Wrong pool type")
473+
474+
475+func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = {
476+ let lpBalanceBefore = accountBalance(fromBase58String(LPId))
477+ if ((lpBalanceBefore == lpBalanceBefore))
478+ then {
479+ let poolAddr = addressFromStringValue(pool)
480+ let $t01377814194 = if (if ((pmtA > 0))
481+ then (pmtB > 0)
482+ else false)
483+ then {
484+ let $t01384413960 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
485+ let pmtInA = $t01384413960._1
486+ let pmtInB = $t01384413960._2
487+ let change = $t01384413960._3
488+ let changeId = $t01384413960._4
489+ let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
490+ if ((inv == inv))
491+ then $Tuple2(change, changeId)
492+ else throw("Strict value is not equal to itself.")
493+ }
494+ else if ((pmtA > 0))
495+ then $Tuple2(pmtA, aId)
496+ else if ((pmtB > 0))
497+ then $Tuple2(pmtB, bId)
498+ else throw("pmts must be > 0")
499+ let change = $t01377814194._1
500+ let changeId = $t01377814194._2
501+ let inv = if ((change > 0))
502+ then replenishOneTokenByType(poolAddr, pType, change, changeId)
503+ else nil
504+ if ((inv == inv))
505+ then {
506+ let lpBalanceAfter = accountBalance(fromBase58String(LPId))
507+ let totalStaked = (lpBalanceAfter - lpBalanceBefore)
508+ let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
509+ let userShareForStake = (totalStaked - axlyFeeAmount)
510+ if ((0 >= userShareForStake))
511+ then throw("amount of staked sharetokens must be > 0")
512+ else {
513+ let invLP = stakeLP(pool, pType, LPId, userShareForStake)
514+ if ((invLP == invLP))
515+ then $Tuple2(userShareForStake, axlyFeeAmount)
516+ else throw("Strict value is not equal to itself.")
517+ }
518+ }
519+ else throw("Strict value is not equal to itself.")
520+ }
521+ else throw("Strict value is not equal to itself.")
522+ }
523+
524+
525+func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
526+ let totalAmount = getPoolTotalShare(pool)
527+ let totalAmountLoan = getPoolTotalShareWithLoan(pool)
528+ let $t01505215290 = if (withLoan)
529+ then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
530+ else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
531+ let curPoolInterest = $t01505215290._1
532+ let totalStakedWithLoan = $t01505215290._2
533+[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), totalStakedWithLoan), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), StringEntry((((user + "_") + toString(posNum)) + kUserPositionPool), pool), IntegerEntry((user + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
534+ }
530535
531536
532537 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
568573 }
569574
570575
571-func unstakeLP (pool,pType,shareId,amount) = {
572- let $t01772818085 = if ((pType == SF_POOL))
573- then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
574- else if ((pType == WX_POOL))
575- then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
576- else throw("Wrong pool type")
577- let farmAddr = $t01772818085._1
578- let fName = $t01772818085._2
579- let params = $t01772818085._3
580- let inv = invoke(farmAddr, fName, params, nil)
581- if ((inv == inv))
582- then amount
583- else throw("Strict value is not equal to itself.")
584- }
585-
586-
587576 func capitalize (pool,pType,tokenId,tokenAmount) = {
588577 let poolAddr = Address(fromBase58String(pool))
589- let $t01830218381 = getPoolData(poolAddr, pType)
590- let AId = $t01830218381._1
591- let BId = $t01830218381._2
592- let balA = $t01830218381._3
593- let balB = $t01830218381._4
594- let shareId = $t01830218381._5
595- let $t01838418464 = if ((tokenId == AId))
578+ let $t01764117720 = getPoolData(poolAddr, pType)
579+ let AId = $t01764117720._1
580+ let BId = $t01764117720._2
581+ let balA = $t01764117720._3
582+ let balB = $t01764117720._4
583+ let shareId = $t01764117720._5
584+ let $t01772317803 = if ((tokenId == AId))
596585 then $Tuple2(tokenAmount, 0)
597586 else $Tuple2(0, tokenAmount)
598- let pmtA = $t01838418464._1
599- let pmtB = $t01838418464._2
600- let $t01846718571 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
601- let stakedAmount = $t01846718571._1
602- let nf = $t01846718571._2
587+ let pmtA = $t01772317803._1
588+ let pmtB = $t01772317803._2
589+ let $t01780617910 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
590+ let stakedAmount = $t01780617910._1
591+ let nf = $t01780617910._2
603592 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
604593 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
605594 let totalShareAmount = getPoolTotalShare(pool)
627616 let feeScale6 = 1000000
628617 let fee = getIntegerValue(poolAddr, kSFPoolFee)
629618 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
630- let $t02046120749 = if ((assetTokenToGet == assetIdA))
619+ let $t01980020088 = if ((assetTokenToGet == assetIdA))
631620 then {
632621 let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
633622 $Tuple2(amountToPay, assetIdB)
636625 let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
637626 $Tuple2(amountToPay, assetIdA)
638627 }
639- let amountToPay = $t02046120749._1
640- let assetToPay = $t02046120749._2
628+ let amountToPay = $t01980020088._1
629+ let assetToPay = $t01980020088._2
641630 invoke(poolAddr, "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
642631 }
643632
647636 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
648637 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
649638 let feeScale = toBigInt(100000000)
650- let $t02122821536 = if ((assetTokenToGet == assetIdA))
639+ let $t02056720875 = if ((assetTokenToGet == assetIdA))
651640 then {
652641 let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
653642 $Tuple2(amountToPay, assetIdB)
656645 let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
657646 $Tuple2(amountToPay, assetIdA)
658647 }
659- let amountToPay = $t02122821536._1
660- let assetToPay = $t02122821536._2
648+ let amountToPay = $t02056720875._1
649+ let assetToPay = $t02056720875._2
661650 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
662651 invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)])
663652 }
671660 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
672661 let poolAddr = Address(fromBase58String(pool))
673662 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
674- let $t02240122477 = getPoolData(poolAddr, pType)
675- let assetIdA = $t02240122477._1
676- let assetIdB = $t02240122477._2
677- let balA = $t02240122477._3
678- let balB = $t02240122477._4
679- let shareId = $t02240122477._5
663+ let $t02174021816 = getPoolData(poolAddr, pType)
664+ let assetIdA = $t02174021816._1
665+ let assetIdB = $t02174021816._2
666+ let balA = $t02174021816._3
667+ let balB = $t02174021816._4
668+ let shareId = $t02174021816._5
680669 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
681670 if ((cBalABefore == cBalABefore))
682671 then {
692681 then {
693682 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
694683 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
695- let $t02298923078 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
696- let tokensAmountA = $t02298923078._1
697- let tokensAmountB = $t02298923078._2
698- let $t02308123777 = if ((debt > 0))
684+ let $t02232822417 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
685+ let tokensAmountA = $t02232822417._1
686+ let tokensAmountB = $t02232822417._2
687+ let $t02242023116 = if ((debt > 0))
699688 then {
700689 let amountToGetEx = if (if ((borrowAsset == assetIdA))
701690 then (debt > tokensAmountA)
718707 else throw("Strict value is not equal to itself.")
719708 }
720709 else $Tuple2(tokensAmountA, tokensAmountB)
721- let toUserAmountA = $t02308123777._1
722- let toUserAmountB = $t02308123777._2
710+ let toUserAmountA = $t02242023116._1
711+ let toUserAmountB = $t02242023116._2
723712 $Tuple7(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter, shareId)
724713 }
725714 else throw("Strict value is not equal to itself.")
756745 else throw(($getType(@) + " couldn't be cast to Int"))
757746 }
758747 else 0
759- let $t02526825421 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
760- if (($t02526825421 == $t02526825421))
748+ let $t02460724760 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
749+ if (($t02460724760 == $t02460724760))
761750 then {
762- let shareId = $t02526825421._7
763- let cBalBAfter = $t02526825421._6
764- let cBalAAfter = $t02526825421._5
765- let assetIdB = $t02526825421._4
766- let toUserAmountB = $t02526825421._3
767- let assetIdA = $t02526825421._2
768- let toUserAmountA = $t02526825421._1
751+ let shareId = $t02460724760._7
752+ let cBalBAfter = $t02460724760._6
753+ let cBalAAfter = $t02460724760._5
754+ let assetIdB = $t02460724760._4
755+ let toUserAmountB = $t02460724760._3
756+ let assetIdA = $t02460724760._2
757+ let toUserAmountA = $t02460724760._1
769758 let closeDbtInv = if ((debt > 0))
770759 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
771760 else 0
801790 then throw("Leverage can't be <100 and >300")
802791 else {
803792 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
804- let $t02693327023 = getPoolData(Address(fromBase58String(pool)), pType)
805- let AId = $t02693327023._1
806- let BId = $t02693327023._2
807- let balA = $t02693327023._3
808- let balB = $t02693327023._4
809- let shareId = $t02693327023._5
793+ let $t02627226362 = getPoolData(Address(fromBase58String(pool)), pType)
794+ let AId = $t02627226362._1
795+ let BId = $t02627226362._2
796+ let balA = $t02627226362._3
797+ let balB = $t02627226362._4
798+ let shareId = $t02627226362._5
810799 let borrowAmount = if ((leverage > 100))
811800 then {
812801 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [AId, false], nil)
818807 then @
819808 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
820809 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(AId), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(BId), 0, 0, DOWN)))
821- fraction(paydInDollar, (leverage - 100), 100)
810+ let borrowPrice = if ((borrowAssetId == AId))
811+ then dPriceA
812+ else dPriceB
813+ (fraction(paydInDollar, (leverage - 100), 100) / borrowPrice)
822814 }
823- else $Tuple2(replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)._1, 0)
815+ else 0
816+ let $t02693327045 = if ((borrowAssetId == AId))
817+ then $Tuple2((pmtA + borrowAmount), pmtB)
818+ else $Tuple2(pmtA, (pmtB + borrowAmount))
819+ let payInA = $t02693327045._1
820+ let payInB = $t02693327045._2
821+ let lpAmount = calcReplanishLPVirt(pType, pool, pmtA, AId, pmtB, BId, balA, balB)
824822 nil
825823 }
826824
851849 then throw("Leverage can't be <100 and >300")
852850 else {
853851 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
854- let $t02903929129 = getPoolData(Address(fromBase58String(pool)), pType)
855- let AId = $t02903929129._1
856- let BId = $t02903929129._2
857- let balA = $t02903929129._3
858- let balB = $t02903929129._4
859- let shareId = $t02903929129._5
860- let $t02913229769 = if ((size(i.payments) == 2))
852+ let $t02857628666 = getPoolData(Address(fromBase58String(pool)), pType)
853+ let AId = $t02857628666._1
854+ let BId = $t02857628666._2
855+ let balA = $t02857628666._3
856+ let balB = $t02857628666._4
857+ let shareId = $t02857628666._5
858+ let $t02866929306 = if ((size(i.payments) == 2))
861859 then if ((assetIdToStr(i.payments[0].assetId) != AId))
862860 then throw("Wrong payment asset A")
863861 else if ((assetIdToStr(i.payments[1].assetId) != BId))
870868 then $Tuple4(0, AId, i.payments[0].amount, BId)
871869 else throw("Wrong payment")
872870 else throw("One or two payments expected")
873- let pmtA = $t02913229769._1
874- let pmtAssetA = $t02913229769._2
875- let pmtB = $t02913229769._3
876- let pmtAssetB = $t02913229769._4
871+ let pmtA = $t02866929306._1
872+ let pmtAssetA = $t02866929306._2
873+ let pmtB = $t02866929306._3
874+ let pmtAssetB = $t02866929306._4
877875 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
878876 if ((leverage > 100))
879877 then {
908906 else throw("Strict value is not equal to itself.")
909907 }
910908 else {
911- let $t03115231264 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
912- let userStaked = $t03115231264._1
913- let axlyFee = $t03115231264._2
909+ let $t03068930801 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
910+ let userStaked = $t03068930801._1
911+ let axlyFee = $t03068930801._2
914912 (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
915913 }
916914 }
919917
920918 @Callable(i)
921919 func replenishFromLand (requestId) = {
922- let $t03147531579 = parseRequest(requestId)
923- let user = $t03147531579._1
924- let pool = $t03147531579._2
925- let pmtA = $t03147531579._3
926- let AId = $t03147531579._4
927- let pmtB = $t03147531579._5
928- let BId = $t03147531579._6
929- let balA = $t03147531579._7
930- let balB = $t03147531579._8
931- let shareId = $t03147531579._9
932- let bwAsset = $t03147531579._10
933- let bwAmount = $t03147531579._11
920+ let $t03101231116 = parseRequest(requestId)
921+ let user = $t03101231116._1
922+ let pool = $t03101231116._2
923+ let pmtA = $t03101231116._3
924+ let AId = $t03101231116._4
925+ let pmtB = $t03101231116._5
926+ let BId = $t03101231116._6
927+ let balA = $t03101231116._7
928+ let balB = $t03101231116._8
929+ let shareId = $t03101231116._9
930+ let bwAsset = $t03101231116._10
931+ let bwAmount = $t03101231116._11
934932 if ((size(i.payments) != 1))
935933 then throw("Wrong payment size")
936934 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
938936 else (i.payments[0].amount != bwAmount))
939937 then throw("Wrong payment")
940938 else {
941- let $t03176931893 = if ((AId == bwAsset))
939+ let $t03130631430 = if ((AId == bwAsset))
942940 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
943941 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
944- let pmtAllA = $t03176931893._1
945- let pmtAllB = $t03176931893._2
942+ let pmtAllA = $t03130631430._1
943+ let pmtAllB = $t03130631430._2
946944 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
947- let $t03197532084 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
948- let userStaked = $t03197532084._1
949- let axlyFee = $t03197532084._2
945+ let $t03151231621 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
946+ let userStaked = $t03151231621._1
947+ let axlyFee = $t03151231621._2
950948 let posNum = getNewUserPositionNumber(pool, toString(i.caller))
951949 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
952950 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
10101008 func liquidate (user,posId,liquidateAmount) = {
10111009 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
10121010 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1013- let $t03486734957 = getPoolData(Address(fromBase58String(pool)), pType)
1014- let AId = $t03486734957._1
1015- let BId = $t03486734957._2
1016- let balA = $t03486734957._3
1017- let balB = $t03486734957._4
1018- let shareId = $t03486734957._5
1011+ let $t03440434494 = getPoolData(Address(fromBase58String(pool)), pType)
1012+ let AId = $t03440434494._1
1013+ let BId = $t03440434494._2
1014+ let balA = $t03440434494._3
1015+ let balB = $t03440434494._4
1016+ let shareId = $t03440434494._5
10191017 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
10201018 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
10211019 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
10291027
10301028 @Callable(i)
10311029 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
1032- let $t03629736491 = if (claim)
1030+ let $t03583436028 = if (claim)
10331031 then claimFarmed(type, pool)
10341032 else {
10351033 let claimedAsset = if ((type == SF_POOL))
10371035 else WXID
10381036 $Tuple2(amountToExchange, claimedAsset)
10391037 }
1040- let claimedAmount = $t03629736491._1
1041- let claimedAsset = $t03629736491._2
1038+ let claimedAmount = $t03583436028._1
1039+ let claimedAsset = $t03583436028._2
10421040 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
10431041 let change = (claimedAmount - amountToExchange)
10441042 let changeEntry = if ((change > 0))
10511049
10521050 @Callable(i)
10531051 func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
1054- let $t03714837342 = if (claim)
1052+ let $t03668536879 = if (claim)
10551053 then claimFarmed(type, pool)
10561054 else {
10571055 let claimedAsset = if ((type == SF_POOL))
10591057 else WXID
10601058 $Tuple2(amountToExchange, claimedAsset)
10611059 }
1062- let claimedAmount = $t03714837342._1
1063- let claimedAsset = $t03714837342._2
1060+ let claimedAmount = $t03668536879._1
1061+ let claimedAsset = $t03668536879._2
10641062 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
10651063 let change = (claimedAmount - amountToExchange)
10661064 let changeEntry = if ((change > 0))
10731071
10741072 @Callable(i)
10751073 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
1076- let $t03806538259 = if (claim)
1074+ let $t03760237796 = if (claim)
10771075 then claimFarmed(type, pool)
10781076 else {
10791077 let claimedAsset = if ((type == SF_POOL))
10811079 else WXID
10821080 $Tuple2(amountToExchange, claimedAsset)
10831081 }
1084- let claimedAmount = $t03806538259._1
1085- let claimedAsset = $t03806538259._2
1082+ let claimedAmount = $t03760237796._1
1083+ let claimedAsset = $t03760237796._2
10861084 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
10871085 let change = (claimedAmount - amountToExchange)
10881086 let changeEntry = if ((change > 0))
10991097 else false)
11001098 then throw("Wrong type")
11011099 else {
1102- let $t03895239046 = getPoolData(Address(fromBase58String(poolAddr)), type)
1103- let aId = $t03895239046._1
1104- let bId = $t03895239046._2
1105- let aBal = $t03895239046._3
1106- let bBal = $t03895239046._4
1107- let shareId = $t03895239046._5
1100+ let $t03848938583 = getPoolData(Address(fromBase58String(poolAddr)), type)
1101+ let aId = $t03848938583._1
1102+ let bId = $t03848938583._2
1103+ let aBal = $t03848938583._3
1104+ let bBal = $t03848938583._4
1105+ let shareId = $t03848938583._5
11081106 [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr)]
11091107 }
11101108
11131111 @Callable(i)
11141112 func capitalizeTest (pool,pType,tokenId,tokenAmount) = {
11151113 let poolAddr = Address(fromBase58String(pool))
1116- let $t03984239921 = getPoolData(poolAddr, pType)
1117- let AId = $t03984239921._1
1118- let BId = $t03984239921._2
1119- let balA = $t03984239921._3
1120- let balB = $t03984239921._4
1121- let shareId = $t03984239921._5
1122- let $t03992440004 = if ((tokenId == AId))
1114+ let $t03937939458 = getPoolData(poolAddr, pType)
1115+ let AId = $t03937939458._1
1116+ let BId = $t03937939458._2
1117+ let balA = $t03937939458._3
1118+ let balB = $t03937939458._4
1119+ let shareId = $t03937939458._5
1120+ let $t03946139541 = if ((tokenId == AId))
11231121 then $Tuple2(tokenAmount, 0)
11241122 else $Tuple2(0, tokenAmount)
1125- let pmtA = $t03992440004._1
1126- let pmtB = $t03992440004._2
1127- let $t04000740111 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1128- let stakedAmount = $t04000740111._1
1129- let nf = $t04000740111._2
1123+ let pmtA = $t03946139541._1
1124+ let pmtB = $t03946139541._2
1125+ let $t03954439648 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1126+ let stakedAmount = $t03954439648._1
1127+ let nf = $t03954439648._2
11301128 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
11311129 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
11321130 let totalShareAmount = getPoolTotalShare(pool)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SF_POOL = "SF"
55
66 let WX_POOL = "WX"
77
88 let CAP_FEE_NO_LOAN = "capNoLoan"
99
1010 let CAP_FEE_LOAN = "capLoan"
1111
1212 let STOPLOSS_FEE_NO_LOAN = "stopLossNoLoan"
1313
1414 let STOPLOSS_LOAN = "stopLossLoan"
1515
1616 let LOAN_FEE = "loan"
1717
1818 let NO_LOAN_FEE = "noLoan"
1919
2020 let NO_FEE = "noFee"
2121
2222 let SCALE8 = 100000000
2323
2424 let SCALE10 = 10000000000
2525
2626 let FEE_SCALE6 = 1000000
2727
2828 let kSFPoolAAssetBalance = "A_asset_balance"
2929
3030 let kSFPoolBAssetBalance = "B_asset_balance"
3131
3232 let kSFPoolAAssetId = "A_asset_id"
3333
3434 let kSFPoolBAssetId = "B_asset_id"
3535
3636 let kSFPoolShareId = "share_asset_id"
3737
3838 let kSFPoolShareSupply = "share_asset_supply"
3939
4040 let kSFPoolFee = "commission"
4141
4242 let kUserPosition = "_user_position"
4343
4444 let kUserPositionPool = "_user_position_pool"
4545
4646 let kUserBorrowAmount = "_user_position_borrow_amount"
4747
4848 let kUserBorrowAssetId = "_user_position_borrow_asset_id"
4949
5050 let kUserPositionNum = "_user_position_number"
5151
5252 let kUserPositionInterest = "_user_position_interest"
5353
5454 let kPoolTotal = "_pool_total"
5555
5656 let kPoolTotalLoan = "_pool_total_loan"
5757
5858 let kPoolInterestLoan = "_pool_interest_loan"
5959
6060 let kPoolInterestNoLoan = "_pool_interest_no_loan"
6161
6262 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
6363
6464 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
6565
6666 let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan"
6767
6868 let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan"
6969
7070 let kAxlyStopLossNoLoanFee = "_axly_fee_stoploss_with_loan"
7171
7272 let kAxlyStopLossLoanFee = "_axly_fee_stoploss_no_loan"
7373
7474 let kRequestId = "_request_id"
7575
7676 let kRequestIter = "requests_iter"
7777
7878 let kPool = "pool_"
7979
8080 let kSharePool = "_pool_share_id"
8181
8282 let kPoolCapChange = "_pool_cap_change"
8383
8484 let kTokenLastPrice = "_last_price"
8585
8686 let kUserStopLoss = "_stop_loss"
8787
8888 let kMoneyBox = "axly_money_box"
8989
9090 let kSFFarmingAddr = "swopfi_farming_addr"
9191
9292 let kLendService = "lend_service_addr"
9393
9494 let kPriceOracle = "price_oracle"
9595
9696 let kExContract = "exchange_contract"
9797
9898 let kWxSwapContract = "wx_swap_contract"
9999
100100 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
101101
102102 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
103103
104104 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
105105
106106 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
107107
108108 let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
109109
110110 let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
111111
112112 func isSelfCall (i) = if ((i.caller == this))
113113 then unit
114114 else throw("Only contract itself can call this function")
115115
116116
117117 func accountBalance (assetId) = match assetId {
118118 case id: ByteVector =>
119119 assetBalance(this, id)
120120 case waves: Unit =>
121121 wavesBalance(this).available
122122 case _ =>
123123 throw("Match error")
124124 }
125125
126126
127127 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"))
128128
129129
130130 func getWXPoolData (poolAddr) = {
131131 let cfg = {
132132 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
133133 if ($isInstanceOf(@, "List[Any]"))
134134 then @
135135 else throw(($getType(@) + " couldn't be cast to List[Any]"))
136136 }
137137 if ((cfg == cfg))
138138 then {
139139 let aId = valueOrErrorMessage({
140140 let @ = cfg[4]
141141 if ($isInstanceOf(@, "String"))
142142 then @
143143 else unit
144144 }, "Can't get pool A asset id")
145145 let bId = valueOrErrorMessage({
146146 let @ = cfg[5]
147147 if ($isInstanceOf(@, "String"))
148148 then @
149149 else unit
150150 }, "Can't get pool B asset id")
151151 let shareId = valueOrErrorMessage({
152152 let @ = cfg[3]
153153 if ($isInstanceOf(@, "String"))
154154 then @
155155 else unit
156156 }, "Can't get pool LP asset id")
157157 let balA = {
158158 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil)
159159 if ($isInstanceOf(@, "Int"))
160160 then @
161161 else throw(($getType(@) + " couldn't be cast to Int"))
162162 }
163163 if ((balA == balA))
164164 then {
165165 let balB = {
166166 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil)
167167 if ($isInstanceOf(@, "Int"))
168168 then @
169169 else throw(($getType(@) + " couldn't be cast to Int"))
170170 }
171171 if ((balB == balB))
172172 then $Tuple5(aId, bId, balA, balB, shareId)
173173 else throw("Strict value is not equal to itself.")
174174 }
175175 else throw("Strict value is not equal to itself.")
176176 }
177177 else throw("Strict value is not equal to itself.")
178178 }
179179
180180
181181 func getPoolData (poolAddr,type) = if ((type == SF_POOL))
182182 then getSFPoolData(poolAddr)
183183 else if ((type == WX_POOL))
184184 then getWXPoolData(poolAddr)
185185 else throw("Wrong pool type")
186186
187187
188188 func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL))
189189 then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply")
190190 else if ((type == WX_POOL))
191191 then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity
192192 else throw("Wrong pool type")
193193
194194
195195 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
196196
197197
198198 func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0)
199199
200200
201201 func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1)
202202
203203
204204 func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN))
205205 then getIntegerValue(this, (pool + kAxlyWithLoanCapFee))
206206 else if ((feeType == CAP_FEE_NO_LOAN))
207207 then getIntegerValue(this, (pool + kAxlyNoLoanCapFee))
208208 else if ((feeType == LOAN_FEE))
209209 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
210210 else if ((feeType == NO_LOAN_FEE))
211211 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
212212 else if ((feeType == NO_FEE))
213213 then 0
214214 else throw("Wrong fee type")
215215
216216
217217 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
218218
219219
220220 func getWXFarmingAddr (poolAddr) = {
221221 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
222222 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
223223 Address(fromBase58String(factroyCfg[1]))
224224 }
225225
226226
227227 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
228228
229229
230230 func assetIdToStr (assetId) = match assetId {
231231 case id: ByteVector =>
232232 toBase58String(id)
233233 case waves: Unit =>
234234 "WAVES"
235235 case _ =>
236236 throw("Match error")
237237 }
238238
239239
240240 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
241241 then unit
242242 else fromBase58String(assetId)
243243
244244
245245 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
246246 then 8
247247 else match assetInfo(fromBase58String(assetId)) {
248248 case asset: Asset =>
249249 asset.decimals
250250 case _ =>
251251 throw("Can't find asset")
252252 }
253253
254254
255255 func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN)
256256
257257
258258 func getAssetsPrice (assetIds) = {
259259 func getPrices (a,assetId) = {
260260 let assetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
261261 if ($isInstanceOf(@, "(Int, Int)"))
262262 then @
263263 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
264264 (a :+ assetPrice)
265265 }
266266
267267 let $l = assetIds
268268 let $s = size($l)
269269 let $acc0 = nil
270270 func $f0_1 ($a,$i) = if (($i >= $s))
271271 then $a
272272 else getPrices($a, $l[$i])
273273
274274 func $f0_2 ($a,$i) = if (($i >= $s))
275275 then $a
276276 else throw("List size exceeds 100")
277277
278278 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50), 51), 52), 53), 54), 55), 56), 57), 58), 59), 60), 61), 62), 63), 64), 65), 66), 67), 68), 69), 70), 71), 72), 73), 74), 75), 76), 77), 78), 79), 80), 81), 82), 83), 84), 85), 86), 87), 88), 89), 90), 91), 92), 93), 94), 95), 96), 97), 98), 99), 100)
279279 }
280280
281281
282282 func getSharePrice (shareIds) = {
283283 func getPrices (a,shareId) = {
284284 let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
285285 let poolAddr = Address(fromBase58String(pool))
286286 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
287- let $t084268491 = getPoolData(poolAddr, pType)
288- let aId = $t084268491._1
289- let bId = $t084268491._2
290- let aBalance = $t084268491._3
291- let bBalance = $t084268491._4
287+ let $t084298494 = getPoolData(poolAddr, pType)
288+ let aId = $t084298494._1
289+ let bId = $t084298494._2
290+ let aBalance = $t084298494._3
291+ let bBalance = $t084298494._4
292292 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
293293 if ($isInstanceOf(@, "(Int, Int)"))
294294 then @
295295 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
296296 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
297297 if ($isInstanceOf(@, "(Int, Int)"))
298298 then @
299299 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
300300 let shareSupply = getShareSupply(poolAddr, pType, shareId)
301301 let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
302302 let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
303303 let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
304304 let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision))
305305 let sharePrice = fraction(sum, sharePrecision, shareSupply)
306306 (a :+ sharePrice)
307307 }
308308
309309 let $l = shareIds
310310 let $s = size($l)
311311 let $acc0 = nil
312312 func $f0_1 ($a,$i) = if (($i >= $s))
313313 then $a
314314 else getPrices($a, $l[$i])
315315
316316 func $f0_2 ($a,$i) = if (($i >= $s))
317317 then $a
318318 else throw("List size exceeds 50")
319319
320320 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
321321 }
322322
323323
324324 func getCursEntries (aId,bId,shareId) = {
325325 let assetsPrices = getAssetsPrice([aId, bId])
326326 let sharePrice = getSharePrice([shareId])
327327 [IntegerEntry((aId + kTokenLastPrice), assetsPrices[0]), IntegerEntry((bId + kTokenLastPrice), assetsPrices[1]), IntegerEntry((shareId + kTokenLastPrice), sharePrice[0])]
328328 }
329329
330330
331-func replenishSwopFi (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId) = {
332- let shareBalanceBefore = accountBalance(fromBase58String(shareId))
333- if ((shareBalanceBefore == shareBalanceBefore))
331+func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = {
332+ let $t096669971 = if ((pType == SF_POOL))
333+ then $Tuple2(nil, nil)
334+ else $Tuple2(split({
335+ let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
336+ if ($isInstanceOf(@, "String"))
337+ then @
338+ else throw(($getType(@) + " couldn't be cast to String"))
339+ }, "__"), split({
340+ let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
341+ if ($isInstanceOf(@, "String"))
342+ then @
343+ else throw(($getType(@) + " couldn't be cast to String"))
344+ }, "__"))
345+ if (($t096669971 == $t096669971))
334346 then {
335- let poolAddr = Address(fromBase58String(pool))
336- let ratioA = fraction(SCALE8, pmtA, balA)
337- let ratioB = fraction(SCALE8, pmtB, balB)
338- let $t0999610288 = if ((ratioB > ratioA))
347+ let evalPutInB = $t096669971._2
348+ let evalPutInA = $t096669971._1
349+ let $t0998110177 = if ((pType == SF_POOL))
350+ then $Tuple2(fraction(SCALE8, pmtA, balA), fraction(SCALE8, pmtB, balB))
351+ else $Tuple2(parseIntValue(evalPutInA[1]), parseIntValue(evalPutInB[1]))
352+ let ratioA = $t0998110177._1
353+ let ratioB = $t0998110177._2
354+ let $t01018310646 = if ((ratioB > ratioA))
339355 then {
340- let pmt = fraction(balB, ratioA, SCALE8, CEILING)
341- $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
356+ let pmt = if ((pType == SF_POOL))
357+ then fraction(balB, ratioA, SCALE8, CEILING)
358+ else parseIntValue(evalPutInA[8])
359+ $Tuple4(pmtA, pmt, (pmtB - pmt), bId)
342360 }
343361 else {
344- let pmt = fraction(balA, ratioB, SCALE8, CEILING)
345- $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
362+ let pmt = if ((pType == SF_POOL))
363+ then fraction(balA, ratioB, SCALE8, CEILING)
364+ else parseIntValue(evalPutInB[8])
365+ $Tuple4(pmtA, pmtB, (pmtA - pmt), aId)
346366 }
347- let pmtAmountA = $t0999610288._1
348- let pmtAmountB = $t0999610288._2
349- let change = $t0999610288._3
350- let changeAssetId = $t0999610288._4
351- let inv1 = if (if ((pmtAmountA > 0))
352- then (pmtAmountB > 0)
353- else false)
354- then {
355- let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
356- invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
357- }
358- else 0
359- if ((inv1 == inv1))
360- then {
361- let inv2 = if ((change > 0))
362- then {
363- let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
364- let vars = ["0", "false", "0"]
365- invoke(poolAddr, "callFunction", ["replenishWithOneToken", vars], payments)
366- }
367- else 0
368- if ((inv2 == inv2))
369- then {
370- let shareBalanceAfter = accountBalance(fromBase58String(shareId))
371- let totalStaked = (shareBalanceAfter - shareBalanceBefore)
372- let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
373- let userShareForStake = (totalStaked - axlyFeeAmount)
374- if ((0 >= userShareForStake))
375- then throw("amount of staked sharetokens must be > 0")
376- else {
377- let inv3 = invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], [AttachedPayment(fromBase58String(shareId), userShareForStake)])
378- if ((inv3 == inv3))
379- then $Tuple2(userShareForStake, axlyFeeAmount)
380- else throw("Strict value is not equal to itself.")
381- }
382- }
383- else throw("Strict value is not equal to itself.")
384- }
385- else throw("Strict value is not equal to itself.")
367+ let pmtInA = $t01018310646._1
368+ let pmtInB = $t01018310646._2
369+ let change = $t01018310646._3
370+ let changeAssetId = $t01018310646._4
371+ $Tuple4(pmtInA, pmtInB, change, changeAssetId)
386372 }
387373 else throw("Strict value is not equal to itself.")
388374 }
389375
390376
391-func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = {
392- let poolAddr = Address(fromBase58String(pool))
393- let $t01173912588 = if (if ((pmtA > 0))
394- then (pmtB > 0)
395- else false)
396- then {
397- let evalPutInA = split({
398- let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
399- if ($isInstanceOf(@, "String"))
400- then @
401- else throw(($getType(@) + " couldn't be cast to String"))
402- }, "__")
403- if ((evalPutInA == evalPutInA))
404- then {
405- let evalPutInB = split({
406- let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
407- if ($isInstanceOf(@, "String"))
408- then @
409- else throw(($getType(@) + " couldn't be cast to String"))
410- }, "__")
411- if ((evalPutInB == evalPutInB))
412- then {
413- let lpInA = parseIntValue(evalPutInA[1])
414- let lpInB = parseIntValue(evalPutInB[1])
415- if ((lpInB > lpInA))
416- then {
417- let pmtInB = parseIntValue(evalPutInA[8])
418- $Tuple4(pmtA, pmtInB, (pmtB - pmtInB), pmtAssetB)
419- }
420- else {
421- let pmtInA = parseIntValue(evalPutInB[7])
422- $Tuple4(pmtInA, pmtB, (pmtA - pmtInA), pmtAssetA)
423- }
424- }
425- else throw("Strict value is not equal to itself.")
426- }
427- else throw("Strict value is not equal to itself.")
428- }
429- else if ((pmtA > 0))
430- then $Tuple4(pmtA, pmtB, pmtA, pmtAssetA)
431- else if ((pmtB > 0))
432- then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB)
433- else throw("pmts must be > 0")
434- let pmtAmountA = $t01173912588._1
435- let pmtAmountB = $t01173912588._2
436- let change = $t01173912588._3
437- let changeAssetId = $t01173912588._4
438- let shareBalanceBefore = accountBalance(fromBase58String(shareId))
439- if ((shareBalanceBefore == shareBalanceBefore))
440- then {
441- let inv1 = if (if ((pmtAmountA > 0))
442- then (pmtAmountB > 0)
443- else false)
444- then {
445- let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
446- invoke(poolAddr, "put", [1000000, false], payments)
447- }
448- else 0
449- if ((inv1 == inv1))
450- then {
451- let inv2 = if ((change > 0))
452- then {
453- let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
454- invoke(poolAddr, "putOneTkn", [0, false], payments)
455- }
456- else 0
457- if ((inv2 == inv2))
458- then {
459- let shareBalanceAfter = accountBalance(fromBase58String(shareId))
460- let totalStaked = (shareBalanceAfter - shareBalanceBefore)
461- let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
462- let userShareForStake = (totalStaked - axlyFeeAmount)
463- if ((0 >= userShareForStake))
464- then throw("amount of staked sharetokens must be > 0")
465- else {
466- let inv3 = invoke(getWXFarmingAddr(poolAddr), "stake", nil, [AttachedPayment(fromBase58String(shareId), userShareForStake)])
467- if ((inv3 == inv3))
468- then $Tuple2(userShareForStake, axlyFeeAmount)
469- else throw("Strict value is not equal to itself.")
470- }
471- }
472- else throw("Strict value is not equal to itself.")
473- }
474- else throw("Strict value is not equal to itself.")
475- }
377+func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = {
378+ let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)]
379+ if ((pType == SF_POOL))
380+ then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
381+ else invoke(poolAddr, "put", [1000000, false], payments)
382+ }
383+
384+
385+func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = {
386+ let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)]
387+ if ((pType == SF_POOL))
388+ then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments)
389+ else invoke(poolAddr, "putOneTkn", [0, false], payments)
390+ }
391+
392+
393+func stakeLP (pool,pType,shareId,amount) = {
394+ let payments = [AttachedPayment(fromBase58String(shareId), amount)]
395+ if ((pType == SF_POOL))
396+ then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments)
397+ else invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments)
398+ }
399+
400+
401+func unstakeLP (pool,pType,shareId,amount) = {
402+ let $t01187212229 = if ((pType == SF_POOL))
403+ then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
404+ else if ((pType == WX_POOL))
405+ then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
406+ else throw("Wrong pool type")
407+ let farmAddr = $t01187212229._1
408+ let fName = $t01187212229._2
409+ let params = $t01187212229._3
410+ let inv = invoke(farmAddr, fName, params, nil)
411+ if ((inv == inv))
412+ then amount
476413 else throw("Strict value is not equal to itself.")
477414 }
478415
479416
480-func replenishByType (type,pool,feeType,pmtA,AId,pmtB,BId,balA,balB,shareId) = if ((type == SF_POOL))
481- then replenishSwopFi(pool, feeType, pmtA, AId, pmtB, BId, balA, balB, shareId)
482- else if ((type == WX_POOL))
483- then replenishWX(pool, feeType, pmtA, AId, pmtB, BId, shareId)
484- else throw("Wrong pool type")
485-
486-
487-func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
488- let totalAmount = getPoolTotalShare(pool)
489- let totalAmountLoan = getPoolTotalShareWithLoan(pool)
490- let $t01460614844 = if (withLoan)
491- then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
492- else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
493- let curPoolInterest = $t01460614844._1
494- let totalStakedWithLoan = $t01460614844._2
495-[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), totalStakedWithLoan), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), StringEntry((((user + "_") + toString(posNum)) + kUserPositionPool), pool), IntegerEntry((user + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
417+func calcReplanishLPVirt (pType,pool,pmtA,aId,pmtB,bId,balA,balB) = {
418+ let poolAddr = addressFromStringValue(pool)
419+ if ((pType == SF_POOL))
420+ then nil
421+ else if ((pType == WX_POOL))
422+ then {
423+ let $t01254312659 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
424+ let pmtInA = $t01254312659._1
425+ let pmtInB = $t01254312659._2
426+ let change = $t01254312659._3
427+ let changeId = $t01254312659._4
428+ let inv = split({
429+ let @ = invoke(poolAddr, "estimatePutOperationWrapperREADONLY", [pmtInA], nil)
430+ if ($isInstanceOf(@, "String"))
431+ then @
432+ else throw(($getType(@) + " couldn't be cast to String"))
433+ }, "__")
434+ if ((inv == inv))
435+ then nil
436+ else throw("Strict value is not equal to itself.")
437+ }
438+ else throw("Wrong pool type")
496439 }
497440
498441
499442 func claimFarmed (type,pool) = if ((type == SF_POOL))
500443 then {
501444 let balBefore = accountBalance(SWOPID)
502445 if ((balBefore == balBefore))
503446 then {
504447 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
505448 if ((inv == inv))
506449 then {
507450 let balAfter = accountBalance(SWOPID)
508451 $Tuple2((balAfter - balBefore), SWOPID)
509452 }
510453 else throw("Strict value is not equal to itself.")
511454 }
512455 else throw("Strict value is not equal to itself.")
513456 }
514457 else if ((type == WX_POOL))
515458 then {
516459 let balBefore = accountBalance(WXID)
517460 if ((balBefore == balBefore))
518461 then {
519462 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
520463 if ((inv == inv))
521464 then {
522465 let balAfter = accountBalance(WXID)
523466 $Tuple2((balAfter - balBefore), WXID)
524467 }
525468 else throw("Strict value is not equal to itself.")
526469 }
527470 else throw("Strict value is not equal to itself.")
528471 }
529472 else throw("Wrong pool type")
473+
474+
475+func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = {
476+ let lpBalanceBefore = accountBalance(fromBase58String(LPId))
477+ if ((lpBalanceBefore == lpBalanceBefore))
478+ then {
479+ let poolAddr = addressFromStringValue(pool)
480+ let $t01377814194 = if (if ((pmtA > 0))
481+ then (pmtB > 0)
482+ else false)
483+ then {
484+ let $t01384413960 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB)
485+ let pmtInA = $t01384413960._1
486+ let pmtInB = $t01384413960._2
487+ let change = $t01384413960._3
488+ let changeId = $t01384413960._4
489+ let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId)
490+ if ((inv == inv))
491+ then $Tuple2(change, changeId)
492+ else throw("Strict value is not equal to itself.")
493+ }
494+ else if ((pmtA > 0))
495+ then $Tuple2(pmtA, aId)
496+ else if ((pmtB > 0))
497+ then $Tuple2(pmtB, bId)
498+ else throw("pmts must be > 0")
499+ let change = $t01377814194._1
500+ let changeId = $t01377814194._2
501+ let inv = if ((change > 0))
502+ then replenishOneTokenByType(poolAddr, pType, change, changeId)
503+ else nil
504+ if ((inv == inv))
505+ then {
506+ let lpBalanceAfter = accountBalance(fromBase58String(LPId))
507+ let totalStaked = (lpBalanceAfter - lpBalanceBefore)
508+ let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
509+ let userShareForStake = (totalStaked - axlyFeeAmount)
510+ if ((0 >= userShareForStake))
511+ then throw("amount of staked sharetokens must be > 0")
512+ else {
513+ let invLP = stakeLP(pool, pType, LPId, userShareForStake)
514+ if ((invLP == invLP))
515+ then $Tuple2(userShareForStake, axlyFeeAmount)
516+ else throw("Strict value is not equal to itself.")
517+ }
518+ }
519+ else throw("Strict value is not equal to itself.")
520+ }
521+ else throw("Strict value is not equal to itself.")
522+ }
523+
524+
525+func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = {
526+ let totalAmount = getPoolTotalShare(pool)
527+ let totalAmountLoan = getPoolTotalShareWithLoan(pool)
528+ let $t01505215290 = if (withLoan)
529+ then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount))
530+ else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan)
531+ let curPoolInterest = $t01505215290._1
532+ let totalStakedWithLoan = $t01505215290._2
533+[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), totalStakedWithLoan), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), StringEntry((((user + "_") + toString(posNum)) + kUserPositionPool), pool), IntegerEntry((user + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
534+ }
530535
531536
532537 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
533538 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
534539 if ((tokenBalanceBefore == tokenBalanceBefore))
535540 then {
536541 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
537542 if ((inv == inv))
538543 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
539544 else throw("Strict value is not equal to itself.")
540545 }
541546 else throw("Strict value is not equal to itself.")
542547 }
543548
544549
545550 func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
546551 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
547552 if ((tokenBalanceBefore == tokenBalanceBefore))
548553 then {
549554 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
550555 if ((inv == inv))
551556 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
552557 else throw("Strict value is not equal to itself.")
553558 }
554559 else throw("Strict value is not equal to itself.")
555560 }
556561
557562
558563 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
559564 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
560565 if ((tokenBalanceBefore == tokenBalanceBefore))
561566 then {
562567 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
563568 if ((inv == inv))
564569 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
565570 else throw("Strict value is not equal to itself.")
566571 }
567572 else throw("Strict value is not equal to itself.")
568573 }
569574
570575
571-func unstakeLP (pool,pType,shareId,amount) = {
572- let $t01772818085 = if ((pType == SF_POOL))
573- then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount])
574- else if ((pType == WX_POOL))
575- then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount])
576- else throw("Wrong pool type")
577- let farmAddr = $t01772818085._1
578- let fName = $t01772818085._2
579- let params = $t01772818085._3
580- let inv = invoke(farmAddr, fName, params, nil)
581- if ((inv == inv))
582- then amount
583- else throw("Strict value is not equal to itself.")
584- }
585-
586-
587576 func capitalize (pool,pType,tokenId,tokenAmount) = {
588577 let poolAddr = Address(fromBase58String(pool))
589- let $t01830218381 = getPoolData(poolAddr, pType)
590- let AId = $t01830218381._1
591- let BId = $t01830218381._2
592- let balA = $t01830218381._3
593- let balB = $t01830218381._4
594- let shareId = $t01830218381._5
595- let $t01838418464 = if ((tokenId == AId))
578+ let $t01764117720 = getPoolData(poolAddr, pType)
579+ let AId = $t01764117720._1
580+ let BId = $t01764117720._2
581+ let balA = $t01764117720._3
582+ let balB = $t01764117720._4
583+ let shareId = $t01764117720._5
584+ let $t01772317803 = if ((tokenId == AId))
596585 then $Tuple2(tokenAmount, 0)
597586 else $Tuple2(0, tokenAmount)
598- let pmtA = $t01838418464._1
599- let pmtB = $t01838418464._2
600- let $t01846718571 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
601- let stakedAmount = $t01846718571._1
602- let nf = $t01846718571._2
587+ let pmtA = $t01772317803._1
588+ let pmtB = $t01772317803._2
589+ let $t01780617910 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
590+ let stakedAmount = $t01780617910._1
591+ let nf = $t01780617910._2
603592 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
604593 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
605594 let totalShareAmount = getPoolTotalShare(pool)
606595 let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool)
607596 let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount)
608597 let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8)
609598 let stakedNoLoan = (stakedAmount - stakedLoan)
610599 let newInterestLoan = if ((totalShareAmountWithLoan > 0))
611600 then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan))
612601 else 0
613602 let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0))
614603 then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan)))
615604 else 0
616605 let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6)
617606 let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6)
618607 let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan))
619608 if ((axlyFee == axlyFee))
620609 then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId))
621610 else throw("Strict value is not equal to itself.")
622611 }
623612
624613
625614 func exchangeDirectlySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
626615 let poolAddr = Address(fromBase58String(pool))
627616 let feeScale6 = 1000000
628617 let fee = getIntegerValue(poolAddr, kSFPoolFee)
629618 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
630- let $t02046120749 = if ((assetTokenToGet == assetIdA))
619+ let $t01980020088 = if ((assetTokenToGet == assetIdA))
631620 then {
632621 let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
633622 $Tuple2(amountToPay, assetIdB)
634623 }
635624 else {
636625 let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
637626 $Tuple2(amountToPay, assetIdA)
638627 }
639- let amountToPay = $t02046120749._1
640- let assetToPay = $t02046120749._2
628+ let amountToPay = $t01980020088._1
629+ let assetToPay = $t01980020088._2
641630 invoke(poolAddr, "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
642631 }
643632
644633
645634 func exchangeDirectlyWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
646635 let poolAddr = Address(fromBase58String(pool))
647636 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
648637 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
649638 let feeScale = toBigInt(100000000)
650- let $t02122821536 = if ((assetTokenToGet == assetIdA))
639+ let $t02056720875 = if ((assetTokenToGet == assetIdA))
651640 then {
652641 let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
653642 $Tuple2(amountToPay, assetIdB)
654643 }
655644 else {
656645 let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
657646 $Tuple2(amountToPay, assetIdA)
658647 }
659- let amountToPay = $t02122821536._1
660- let assetToPay = $t02122821536._2
648+ let amountToPay = $t02056720875._1
649+ let assetToPay = $t02056720875._2
661650 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
662651 invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)])
663652 }
664653
665654
666655 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
667656 then exchangeDirectlySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
668657 else exchangeDirectlyWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
669658
670659
671660 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
672661 let poolAddr = Address(fromBase58String(pool))
673662 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
674- let $t02240122477 = getPoolData(poolAddr, pType)
675- let assetIdA = $t02240122477._1
676- let assetIdB = $t02240122477._2
677- let balA = $t02240122477._3
678- let balB = $t02240122477._4
679- let shareId = $t02240122477._5
663+ let $t02174021816 = getPoolData(poolAddr, pType)
664+ let assetIdA = $t02174021816._1
665+ let assetIdB = $t02174021816._2
666+ let balA = $t02174021816._3
667+ let balB = $t02174021816._4
668+ let shareId = $t02174021816._5
680669 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
681670 if ((cBalABefore == cBalABefore))
682671 then {
683672 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
684673 if ((cBalBBefore == cBalBBefore))
685674 then {
686675 let inv = if ((pType == SF_POOL))
687676 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
688677 else if ((pType == WX_POOL))
689678 then invoke(poolAddr, "unstakeAndGet", [userCanWithdraw], nil)
690679 else throw("Wrong position type")
691680 if ((inv == inv))
692681 then {
693682 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
694683 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
695- let $t02298923078 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
696- let tokensAmountA = $t02298923078._1
697- let tokensAmountB = $t02298923078._2
698- let $t02308123777 = if ((debt > 0))
684+ let $t02232822417 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
685+ let tokensAmountA = $t02232822417._1
686+ let tokensAmountB = $t02232822417._2
687+ let $t02242023116 = if ((debt > 0))
699688 then {
700689 let amountToGetEx = if (if ((borrowAsset == assetIdA))
701690 then (debt > tokensAmountA)
702691 else false)
703692 then (debt - tokensAmountA)
704693 else if (if ((borrowAsset == assetIdB))
705694 then (debt > tokensAmountB)
706695 else false)
707696 then (debt - tokensAmountB)
708697 else 0
709698 let exInv = if ((amountToGetEx > 0))
710699 then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset)
711700 else 0
712701 if ((exInv == exInv))
713702 then {
714703 let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
715704 let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
716705 $Tuple2((cBalAAfterRepay - cBalABefore), (cBalBAfterRepay - cBalBBefore))
717706 }
718707 else throw("Strict value is not equal to itself.")
719708 }
720709 else $Tuple2(tokensAmountA, tokensAmountB)
721- let toUserAmountA = $t02308123777._1
722- let toUserAmountB = $t02308123777._2
710+ let toUserAmountA = $t02242023116._1
711+ let toUserAmountB = $t02242023116._2
723712 $Tuple7(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter, shareId)
724713 }
725714 else throw("Strict value is not equal to itself.")
726715 }
727716 else throw("Strict value is not equal to itself.")
728717 }
729718 else throw("Strict value is not equal to itself.")
730719 }
731720
732721
733722 func userCanWithdrawShareCalc (user,pool,posId,borrowed) = {
734723 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
735724 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest))
736725 let poolInterest = if (borrowed)
737726 then getIntegerValue(this, (pool + kPoolInterestLoan))
738727 else getIntegerValue(this, (pool + kPoolInterestNoLoan))
739728 (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10))
740729 }
741730
742731
743732 func withdrawToUser (user,pool,posId,stopLoss) = {
744733 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position")
745734 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest))
746735 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
747736 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
748737 let poolTotalShare = getPoolTotalShare(pool)
749738 let userAddr = Address(fromBase58String(user))
750739 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
751740 let debt = if ((borrowAmount > 0))
752741 then {
753742 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((((pool + "_") + user) + "_") + posId), borrowAsset], nil)
754743 if ($isInstanceOf(@, "Int"))
755744 then @
756745 else throw(($getType(@) + " couldn't be cast to Int"))
757746 }
758747 else 0
759- let $t02526825421 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
760- if (($t02526825421 == $t02526825421))
748+ let $t02460724760 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
749+ if (($t02460724760 == $t02460724760))
761750 then {
762- let shareId = $t02526825421._7
763- let cBalBAfter = $t02526825421._6
764- let cBalAAfter = $t02526825421._5
765- let assetIdB = $t02526825421._4
766- let toUserAmountB = $t02526825421._3
767- let assetIdA = $t02526825421._2
768- let toUserAmountA = $t02526825421._1
751+ let shareId = $t02460724760._7
752+ let cBalBAfter = $t02460724760._6
753+ let cBalAAfter = $t02460724760._5
754+ let assetIdB = $t02460724760._4
755+ let toUserAmountB = $t02460724760._3
756+ let assetIdA = $t02460724760._2
757+ let toUserAmountA = $t02460724760._1
769758 let closeDbtInv = if ((debt > 0))
770759 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
771760 else 0
772761 if ((closeDbtInv == closeDbtInv))
773762 then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId))
774763 else throw("Strict value is not equal to itself.")
775764 }
776765 else throw("Strict value is not equal to itself.")
777766 }
778767
779768
780769 func parseRequest (requestId) = {
781770 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
782771 let user = request[0]
783772 let pool = request[1]
784773 let pmtA = parseIntValue(request[2])
785774 let AId = request[3]
786775 let pmtB = parseIntValue(request[4])
787776 let BId = request[5]
788777 let balA = parseIntValue(request[6])
789778 let balB = parseIntValue(request[7])
790779 let shareId = request[8]
791780 let bwAsset = request[9]
792781 let bwAmount = parseIntValue(request[10])
793782 $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
794783 }
795784
796785
797786 @Callable(i)
798787 func replenishEVALONLY (pool,leverage,borrowAssetId,pmtA,pmtB) = if (if ((100 > leverage))
799788 then true
800789 else (leverage > 300))
801790 then throw("Leverage can't be <100 and >300")
802791 else {
803792 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
804- let $t02693327023 = getPoolData(Address(fromBase58String(pool)), pType)
805- let AId = $t02693327023._1
806- let BId = $t02693327023._2
807- let balA = $t02693327023._3
808- let balB = $t02693327023._4
809- let shareId = $t02693327023._5
793+ let $t02627226362 = getPoolData(Address(fromBase58String(pool)), pType)
794+ let AId = $t02627226362._1
795+ let BId = $t02627226362._2
796+ let balA = $t02627226362._3
797+ let balB = $t02627226362._4
798+ let shareId = $t02627226362._5
810799 let borrowAmount = if ((leverage > 100))
811800 then {
812801 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [AId, false], nil)
813802 if ($isInstanceOf(@, "(Int, Int)"))
814803 then @
815804 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
816805 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [BId, false], nil)
817806 if ($isInstanceOf(@, "(Int, Int)"))
818807 then @
819808 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
820809 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(AId), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(BId), 0, 0, DOWN)))
821- fraction(paydInDollar, (leverage - 100), 100)
810+ let borrowPrice = if ((borrowAssetId == AId))
811+ then dPriceA
812+ else dPriceB
813+ (fraction(paydInDollar, (leverage - 100), 100) / borrowPrice)
822814 }
823- else $Tuple2(replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)._1, 0)
815+ else 0
816+ let $t02693327045 = if ((borrowAssetId == AId))
817+ then $Tuple2((pmtA + borrowAmount), pmtB)
818+ else $Tuple2(pmtA, (pmtB + borrowAmount))
819+ let payInA = $t02693327045._1
820+ let payInB = $t02693327045._2
821+ let lpAmount = calcReplanishLPVirt(pType, pool, pmtA, AId, pmtB, BId, balA, balB)
824822 nil
825823 }
826824
827825
828826
829827 @Callable(i)
830828 func getShareAssetPriceREADONLY (shareId) = {
831829 let sharePrices = getSharePrice([shareId])
832830 $Tuple2(nil, sharePrices[0])
833831 }
834832
835833
836834
837835 @Callable(i)
838836 func getUserPositionShareAmountREADONLY (user,posNum) = {
839837 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position")
840838 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount))
841839 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0))
842840 $Tuple2(nil, userCanWithdraw)
843841 }
844842
845843
846844
847845 @Callable(i)
848846 func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
849847 then true
850848 else (leverage > 300))
851849 then throw("Leverage can't be <100 and >300")
852850 else {
853851 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
854- let $t02903929129 = getPoolData(Address(fromBase58String(pool)), pType)
855- let AId = $t02903929129._1
856- let BId = $t02903929129._2
857- let balA = $t02903929129._3
858- let balB = $t02903929129._4
859- let shareId = $t02903929129._5
860- let $t02913229769 = if ((size(i.payments) == 2))
852+ let $t02857628666 = getPoolData(Address(fromBase58String(pool)), pType)
853+ let AId = $t02857628666._1
854+ let BId = $t02857628666._2
855+ let balA = $t02857628666._3
856+ let balB = $t02857628666._4
857+ let shareId = $t02857628666._5
858+ let $t02866929306 = if ((size(i.payments) == 2))
861859 then if ((assetIdToStr(i.payments[0].assetId) != AId))
862860 then throw("Wrong payment asset A")
863861 else if ((assetIdToStr(i.payments[1].assetId) != BId))
864862 then throw("Wrong payment asset B")
865863 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
866864 else if ((size(i.payments) == 1))
867865 then if ((assetIdToStr(i.payments[0].assetId) == AId))
868866 then $Tuple4(i.payments[0].amount, AId, 0, BId)
869867 else if ((assetIdToStr(i.payments[0].assetId) == BId))
870868 then $Tuple4(0, AId, i.payments[0].amount, BId)
871869 else throw("Wrong payment")
872870 else throw("One or two payments expected")
873- let pmtA = $t02913229769._1
874- let pmtAssetA = $t02913229769._2
875- let pmtB = $t02913229769._3
876- let pmtAssetB = $t02913229769._4
871+ let pmtA = $t02866929306._1
872+ let pmtAssetA = $t02866929306._2
873+ let pmtB = $t02866929306._3
874+ let pmtAssetB = $t02866929306._4
877875 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
878876 if ((leverage > 100))
879877 then {
880878 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
881879 if ($isInstanceOf(@, "(Int, Int)"))
882880 then @
883881 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
884882 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
885883 if ($isInstanceOf(@, "(Int, Int)"))
886884 then @
887885 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
888886 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
889887 let borrowPrice = if ((borrowAssetId == AId))
890888 then dPriceA
891889 else dPriceB
892890 let borrowAmount = (fraction(paydInDollar, (leverage - 100), 100) / borrowPrice)
893891 let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",")
894892 let newRequestId = {
895893 let @ = invoke(this, "createNewRequest", [request], nil)
896894 if ($isInstanceOf(@, "Int"))
897895 then @
898896 else throw(($getType(@) + " couldn't be cast to Int"))
899897 }
900898 if ((newRequestId == newRequestId))
901899 then {
902900 let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
903901 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
904902 if ((inv == inv))
905903 then nil
906904 else throw("Strict value is not equal to itself.")
907905 }
908906 else throw("Strict value is not equal to itself.")
909907 }
910908 else {
911- let $t03115231264 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
912- let userStaked = $t03115231264._1
913- let axlyFee = $t03115231264._2
909+ let $t03068930801 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
910+ let userStaked = $t03068930801._1
911+ let axlyFee = $t03068930801._2
914912 (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId))
915913 }
916914 }
917915
918916
919917
920918 @Callable(i)
921919 func replenishFromLand (requestId) = {
922- let $t03147531579 = parseRequest(requestId)
923- let user = $t03147531579._1
924- let pool = $t03147531579._2
925- let pmtA = $t03147531579._3
926- let AId = $t03147531579._4
927- let pmtB = $t03147531579._5
928- let BId = $t03147531579._6
929- let balA = $t03147531579._7
930- let balB = $t03147531579._8
931- let shareId = $t03147531579._9
932- let bwAsset = $t03147531579._10
933- let bwAmount = $t03147531579._11
920+ let $t03101231116 = parseRequest(requestId)
921+ let user = $t03101231116._1
922+ let pool = $t03101231116._2
923+ let pmtA = $t03101231116._3
924+ let AId = $t03101231116._4
925+ let pmtB = $t03101231116._5
926+ let BId = $t03101231116._6
927+ let balA = $t03101231116._7
928+ let balB = $t03101231116._8
929+ let shareId = $t03101231116._9
930+ let bwAsset = $t03101231116._10
931+ let bwAmount = $t03101231116._11
934932 if ((size(i.payments) != 1))
935933 then throw("Wrong payment size")
936934 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
937935 then true
938936 else (i.payments[0].amount != bwAmount))
939937 then throw("Wrong payment")
940938 else {
941- let $t03176931893 = if ((AId == bwAsset))
939+ let $t03130631430 = if ((AId == bwAsset))
942940 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
943941 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
944- let pmtAllA = $t03176931893._1
945- let pmtAllB = $t03176931893._2
942+ let pmtAllA = $t03130631430._1
943+ let pmtAllB = $t03130631430._2
946944 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
947- let $t03197532084 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
948- let userStaked = $t03197532084._1
949- let axlyFee = $t03197532084._2
945+ let $t03151231621 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
946+ let userStaked = $t03151231621._1
947+ let axlyFee = $t03151231621._2
950948 let posNum = getNewUserPositionNumber(pool, toString(i.caller))
951949 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
952950 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true)
953951 $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
954952 }
955953 }
956954
957955
958956
959957 @Callable(i)
960958 func withdraw (pool,posId) = withdrawToUser(toString(i.caller), pool, toString(posId), false)
961959
962960
963961
964962 @Callable(i)
965963 func createUpdateStopLoss (posId,poolId,assetId,price) = {
966964 let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
967965 if ($isInstanceOf(@, "(Int, Int)"))
968966 then @
969967 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
970968 if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition)))))
971969 then throw("There are no user position")
972970 else if ((0 >= price))
973971 then throw("Price must be greater than 0")
974972 else if ((price > tokenOraclePrice))
975973 then throw("Price must be less than current token price")
976974 else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)]
977975 }
978976
979977
980978
981979 @Callable(i)
982980 func deleteStopLoss (posId,poolId,assetId) = if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss)))))
983981 then throw("No entry")
984982 else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))]
985983
986984
987985
988986 @Callable(i)
989987 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
990988 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
991989 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
992990 })
993991
994992
995993
996994 @Callable(i)
997995 func stopLoss (user,posId,pool,assetId) = {
998996 let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
999997 if ($isInstanceOf(@, "(Int, Int)"))
1000998 then @
1001999 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
10021000 if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))))
10031001 then throw("No entry")
10041002 else (withdrawToUser(toString(i.caller), pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss)))
10051003 }
10061004
10071005
10081006
10091007 @Callable(i)
10101008 func liquidate (user,posId,liquidateAmount) = {
10111009 let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position")
10121010 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
1013- let $t03486734957 = getPoolData(Address(fromBase58String(pool)), pType)
1014- let AId = $t03486734957._1
1015- let BId = $t03486734957._2
1016- let balA = $t03486734957._3
1017- let balB = $t03486734957._4
1018- let shareId = $t03486734957._5
1011+ let $t03440434494 = getPoolData(Address(fromBase58String(pool)), pType)
1012+ let AId = $t03440434494._1
1013+ let BId = $t03440434494._2
1014+ let balA = $t03440434494._3
1015+ let balB = $t03440434494._4
1016+ let shareId = $t03440434494._5
10191017 let amount = unstakeLP(pool, pType, shareId, liquidateAmount)
10201018 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount))
10211019 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId))
10221020 let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0))
10231021 if ((borrowAmount > 0))
10241022 then [IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest), getIntegerValue(this, (pool + kPoolInterestLoan))), IntegerEntry((pool + kPoolTotalLoan), (getPoolTotalShareWithLoan(pool) - liquidateAmount))]
10251023 else ([IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest), getIntegerValue(this, (pool + kPoolInterestNoLoan)))] ++ [IntegerEntry((pool + kPoolTotal), (getPoolTotalShare(pool) - liquidateAmount)), IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition), (userCanWithdraw - liquidateAmount)), ScriptTransfer(i.caller, amount, fromBase58String(shareId))])
10261024 }
10271025
10281026
10291027
10301028 @Callable(i)
10311029 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
1032- let $t03629736491 = if (claim)
1030+ let $t03583436028 = if (claim)
10331031 then claimFarmed(type, pool)
10341032 else {
10351033 let claimedAsset = if ((type == SF_POOL))
10361034 then SWOPID
10371035 else WXID
10381036 $Tuple2(amountToExchange, claimedAsset)
10391037 }
1040- let claimedAmount = $t03629736491._1
1041- let claimedAsset = $t03629736491._2
1038+ let claimedAmount = $t03583436028._1
1039+ let claimedAsset = $t03583436028._2
10421040 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
10431041 let change = (claimedAmount - amountToExchange)
10441042 let changeEntry = if ((change > 0))
10451043 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
10461044 else nil
10471045 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
10481046 }
10491047
10501048
10511049
10521050 @Callable(i)
10531051 func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
1054- let $t03714837342 = if (claim)
1052+ let $t03668536879 = if (claim)
10551053 then claimFarmed(type, pool)
10561054 else {
10571055 let claimedAsset = if ((type == SF_POOL))
10581056 then SWOPID
10591057 else WXID
10601058 $Tuple2(amountToExchange, claimedAsset)
10611059 }
1062- let claimedAmount = $t03714837342._1
1063- let claimedAsset = $t03714837342._2
1060+ let claimedAmount = $t03668536879._1
1061+ let claimedAsset = $t03668536879._2
10641062 let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
10651063 let change = (claimedAmount - amountToExchange)
10661064 let changeEntry = if ((change > 0))
10671065 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
10681066 else nil
10691067 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
10701068 }
10711069
10721070
10731071
10741072 @Callable(i)
10751073 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
1076- let $t03806538259 = if (claim)
1074+ let $t03760237796 = if (claim)
10771075 then claimFarmed(type, pool)
10781076 else {
10791077 let claimedAsset = if ((type == SF_POOL))
10801078 then SWOPID
10811079 else WXID
10821080 $Tuple2(amountToExchange, claimedAsset)
10831081 }
1084- let claimedAmount = $t03806538259._1
1085- let claimedAsset = $t03806538259._2
1082+ let claimedAmount = $t03760237796._1
1083+ let claimedAsset = $t03760237796._2
10861084 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
10871085 let change = (claimedAmount - amountToExchange)
10881086 let changeEntry = if ((change > 0))
10891087 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
10901088 else nil
10911089 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
10921090 }
10931091
10941092
10951093
10961094 @Callable(i)
10971095 func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = if (if ((type != SF_POOL))
10981096 then (type != WX_POOL)
10991097 else false)
11001098 then throw("Wrong type")
11011099 else {
1102- let $t03895239046 = getPoolData(Address(fromBase58String(poolAddr)), type)
1103- let aId = $t03895239046._1
1104- let bId = $t03895239046._2
1105- let aBal = $t03895239046._3
1106- let bBal = $t03895239046._4
1107- let shareId = $t03895239046._5
1100+ let $t03848938583 = getPoolData(Address(fromBase58String(poolAddr)), type)
1101+ let aId = $t03848938583._1
1102+ let bId = $t03848938583._2
1103+ let aBal = $t03848938583._3
1104+ let bBal = $t03848938583._4
1105+ let shareId = $t03848938583._5
11081106 [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr)]
11091107 }
11101108
11111109
11121110
11131111 @Callable(i)
11141112 func capitalizeTest (pool,pType,tokenId,tokenAmount) = {
11151113 let poolAddr = Address(fromBase58String(pool))
1116- let $t03984239921 = getPoolData(poolAddr, pType)
1117- let AId = $t03984239921._1
1118- let BId = $t03984239921._2
1119- let balA = $t03984239921._3
1120- let balB = $t03984239921._4
1121- let shareId = $t03984239921._5
1122- let $t03992440004 = if ((tokenId == AId))
1114+ let $t03937939458 = getPoolData(poolAddr, pType)
1115+ let AId = $t03937939458._1
1116+ let BId = $t03937939458._2
1117+ let balA = $t03937939458._3
1118+ let balB = $t03937939458._4
1119+ let shareId = $t03937939458._5
1120+ let $t03946139541 = if ((tokenId == AId))
11231121 then $Tuple2(tokenAmount, 0)
11241122 else $Tuple2(0, tokenAmount)
1125- let pmtA = $t03992440004._1
1126- let pmtB = $t03992440004._2
1127- let $t04000740111 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1128- let stakedAmount = $t04000740111._1
1129- let nf = $t04000740111._2
1123+ let pmtA = $t03946139541._1
1124+ let pmtB = $t03946139541._2
1125+ let $t03954439648 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
1126+ let stakedAmount = $t03954439648._1
1127+ let nf = $t03954439648._2
11301128 let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0)
11311129 let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0)
11321130 let totalShareAmount = getPoolTotalShare(pool)
11331131 let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool)
11341132 let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount)
11351133 let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8)
11361134 let stakedNoLoan = (stakedAmount - stakedLoan)
11371135 let newInterestLoan = if ((totalShareAmountWithLoan > 0))
11381136 then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan))
11391137 else 0
11401138 let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0))
11411139 then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan)))
11421140 else 0
11431141 let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6)
11441142 let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6)
11451143 let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan))
11461144 if ((axlyFee == axlyFee))
11471145 then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId))
11481146 else throw("Strict value is not equal to itself.")
11491147 }
11501148
11511149
11521150
11531151 @Callable(i)
11541152 func claimFarmedTest (type,pool) = if ((type == SF_POOL))
11551153 then {
11561154 let balBefore = accountBalance(SWOPID)
11571155 if ((balBefore == balBefore))
11581156 then {
11591157 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
11601158 if ((inv == inv))
11611159 then {
11621160 let balAfter = accountBalance(SWOPID)
11631161 $Tuple2(nil, $Tuple2((balAfter - balBefore), SWOPID))
11641162 }
11651163 else throw("Strict value is not equal to itself.")
11661164 }
11671165 else throw("Strict value is not equal to itself.")
11681166 }
11691167 else if ((type == WX_POOL))
11701168 then {
11711169 let balBefore = accountBalance(WXID)
11721170 if ((balBefore == balBefore))
11731171 then {
11741172 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
11751173 if ((inv == inv))
11761174 then {
11771175 let balAfter = accountBalance(WXID)
11781176 $Tuple2(nil, $Tuple2((balAfter - balBefore), WXID))
11791177 }
11801178 else throw("Strict value is not equal to itself.")
11811179 }
11821180 else throw("Strict value is not equal to itself.")
11831181 }
11841182 else throw("Wrong pool type")
11851183
11861184
11871185 @Verifier(tx)
11881186 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
11891187

github/deemru/w8io/026f985 
234.01 ms