tx · ALp4boW79cZFUo44sQN5M5qJEQbwNfWm9FzAkkd3nFTk

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.22000000 Waves

2023.04.10 11:57 [2528268] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "ALp4boW79cZFUo44sQN5M5qJEQbwNfWm9FzAkkd3nFTk", "fee": 22000000, "feeAssetId": null, "timestamp": 1681117105441, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "HrMR5WvNKzv4EUH6TyB7jkDy4ccWyknj7a3LRSX82on5v4cpSVon7FpS8sQSpqHqYEfCdTGXoMV2sxui8KLpjco" ], "script": "base64:BgJOCAISBQoDCAEIEgMKAQgSBAoCCAESAwoBCBIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEgcKBQgIAQEBPAALU0ZfUE9TX1RZUEUCAlNGAAtXWF9QT1NfVFlQRQICV1gAB0NBUF9GRUUCA2NhcAAITE9BTl9GRUUCBGxvYW4AC05PX0xPQU5fRkVFAgZub0xvYW4ABlNDQUxFOACAwtcvAAdTQ0FMRTEwAIDIr6AlAApGRUVfU0NBTEU2AMCEPQAUa1NGUG9vbEFBc3NldEJhbGFuY2UCD0FfYXNzZXRfYmFsYW5jZQAUa1NGUG9vbEJBc3NldEJhbGFuY2UCD0JfYXNzZXRfYmFsYW5jZQAPa1NGUG9vbEFBc3NldElkAgpBX2Fzc2V0X2lkAA9rU0ZQb29sQkFzc2V0SWQCCkJfYXNzZXRfaWQADmtTRlBvb2xTaGFyZUlkAg5zaGFyZV9hc3NldF9pZAANa1VzZXJQb3NpdGlvbgIOX3VzZXJfcG9zaXRpb24AEWtVc2VyQm9ycm93QW1vdW50AhxfdXNlcl9wb3N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UFC1dYX1BPU19UWVBFBwkAAgECCldyb25nIHR5cGUJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUIcG9vbEFkZHIFFWtBeGx5SW5GZWVXaXRob3V0TG9hbgULaW5GZWVOb0xvYW4JAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUIcG9vbEFkZHIFEmtBeGx5SW5GZWVXaXRoTG9hbgUJaW5GZWVMb2FuCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBQtrQXhseUNhcEZlZQUGY2FwRmVlCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBQ1rUG9vbEludGVyZXN0AAAJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICBQVrUG9vbAUIcG9vbEFkZHIFBHR5cGUFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnQHe0V", "height": 2528268, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6Pq1yPNn7cehpHX6h2uQLkfEBMPBRqq8d6avicocUWHA Next: E4JbTH1etik8Tm6bawmhHKCoR52xS4vkaSTGmzFBSynb Diff:
OldNewDifferences
298298 else false)
299299 then {
300300 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
301- invoke(poolAddr, "put", [500000, false], payments)
301+ invoke(poolAddr, "put", [1000000, false], payments)
302302 }
303303 else 0
304304 if ((inv1 == inv1))
332332 }
333333
334334
335-func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId) = {
335+func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type) = {
336336 let totalAmount = getPoolTotalShare(pool)
337- let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
338-[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionType), SF_POS_TYPE), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
337+ let curPoolInterest = getIntegerValue(this, (pool + kPoolInterest))
338+[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionType), type), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
339339 }
340340
341341
413413
414414 func capitalize (pool,type,tokenId,tokenAmount) = {
415415 let poolAddr = Address(fromBase58String(pool))
416- let $t01325613334 = getPoolData(poolAddr, type)
417- let AId = $t01325613334._1
418- let BId = $t01325613334._2
419- let balA = $t01325613334._3
420- let balB = $t01325613334._4
421- let shareId = $t01325613334._5
422- let $t01333713417 = if ((tokenId == AId))
416+ let $t01325413332 = getPoolData(poolAddr, type)
417+ let AId = $t01325413332._1
418+ let BId = $t01325413332._2
419+ let balA = $t01325413332._3
420+ let balB = $t01325413332._4
421+ let shareId = $t01325413332._5
422+ let $t01333513415 = if ((tokenId == AId))
423423 then $Tuple2(tokenAmount, 0)
424424 else $Tuple2(0, tokenAmount)
425- let pmtA = $t01333713417._1
426- let pmtB = $t01333713417._2
427- let $t01342013785 = if ((type == SF_POS_TYPE))
425+ let pmtA = $t01333513415._1
426+ let pmtB = $t01333513415._2
427+ let $t01341813783 = if ((type == SF_POS_TYPE))
428428 then replenishSwopFi(pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
429429 else replenishWX(pool, CAP_FEE, pmtA, AId, pmtB, BId, shareId)
430- let stakedAmount = $t01342013785._1
431- let axlyFee = $t01342013785._2
430+ let stakedAmount = $t01341813783._1
431+ let axlyFee = $t01341813783._2
432432 let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
433433 let totalShareAmount = getPoolTotalShare(pool)
434434 let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount))
443443 then throw("Leverage can't be <100 and >300")
444444 else {
445445 let type = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
446- let $t01439014479 = getPoolData(Address(fromBase58String(pool)), type)
447- let AId = $t01439014479._1
448- let BId = $t01439014479._2
449- let balA = $t01439014479._3
450- let balB = $t01439014479._4
451- let shareId = $t01439014479._5
452- let $t01448215119 = if ((size(i.payments) == 2))
446+ let $t01438814477 = getPoolData(Address(fromBase58String(pool)), type)
447+ let AId = $t01438814477._1
448+ let BId = $t01438814477._2
449+ let balA = $t01438814477._3
450+ let balB = $t01438814477._4
451+ let shareId = $t01438814477._5
452+ let $t01448015117 = if ((size(i.payments) == 2))
453453 then if ((assetIdToStr(i.payments[0].assetId) != AId))
454454 then throw("Wrong payment asset A")
455455 else if ((assetIdToStr(i.payments[1].assetId) != BId))
462462 then $Tuple4(0, AId, i.payments[0].amount, BId)
463463 else throw("Wrong payment")
464464 else throw("One or two payments expected")
465- let pmtA = $t01448215119._1
466- let pmtAssetA = $t01448215119._2
467- let pmtB = $t01448215119._3
468- let pmtAssetB = $t01448215119._4
465+ let pmtA = $t01448015117._1
466+ let pmtAssetA = $t01448015117._2
467+ let pmtB = $t01448015117._3
468+ let pmtAssetB = $t01448015117._4
469469 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
470470 if ((leverage > 100))
471471 then {
497497 else throw("Strict value is not equal to itself.")
498498 }
499499 else {
500- let $t01645516850 = if ((type == SF_POS_TYPE))
500+ let $t01645316848 = if ((type == SF_POS_TYPE))
501501 then replenishSwopFi(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, balA, balB, shareId)
502502 else replenishWX(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, shareId)
503- let userStaked = $t01645516850._1
504- let axlyFee = $t01645516850._2
505- replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId)
503+ let userStaked = $t01645316848._1
504+ let axlyFee = $t01645316848._2
505+ replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, type)
506506 }
507507 }
508508
528528 let user = request[1]
529529 let shareId = request[9]
530530 let posNum = parseIntValue(request[12])
531- let $t01780218325 = if ((request[0] == SF_POS_TYPE))
531+ let $t01780618329 = if ((request[0] == SF_POS_TYPE))
532532 then replenishSwopFi(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], parseIntValue(request[7]), parseIntValue(request[8]), shareId)
533533 else if ((request[0] == WX_POS_TYPE))
534534 then replenishWX(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], shareId)
535535 else throw("Wrong request type")
536- let userStaked = $t01780218325._1
537- let axlyFee = $t01780218325._2
536+ let userStaked = $t01780618329._1
537+ let axlyFee = $t01780618329._2
538538 let borrowEntries = [IntegerEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAmount), i.payments[0].amount), StringEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAssetId), request[10])]
539- let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId)
539+ let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, request[0])
540540 $Tuple2(((entries ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
541541 }
542542 }
556556 let userAddr = Address(fromBase58String(user))
557557 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAmount))
558558 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAssetId))
559- let $t01969719797 = getPoolData(Address(fromBase58String(pool)), pType)
560- let assetIdA = $t01969719797._1
561- let assetIdB = $t01969719797._2
562- let balA = $t01969719797._3
563- let balB = $t01969719797._4
564- let shareId = $t01969719797._5
559+ let $t01971319813 = getPoolData(Address(fromBase58String(pool)), pType)
560+ let assetIdA = $t01971319813._1
561+ let assetIdB = $t01971319813._2
562+ let balA = $t01971319813._3
563+ let balB = $t01971319813._4
564+ let shareId = $t01971319813._5
565565 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
566566 if ((cBalABefore == cBalABefore))
567567 then {
577577 then {
578578 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
579579 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
580- let $t02031720406 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
581- let tokensAmountA = $t02031720406._1
582- let tokensAmountB = $t02031720406._2
580+ let $t02033320422 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
581+ let tokensAmountA = $t02033320422._1
582+ let tokensAmountB = $t02033320422._2
583583 [DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionType)), DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, tokensAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, tokensAmountB, assetIdFromStr(assetIdB))]
584584 }
585585 else throw("Strict value is not equal to itself.")
601601
602602 @Callable(i)
603603 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
604- let $t02159721795 = if (claim)
604+ let $t02161321811 = if (claim)
605605 then claimFarmed(type, pool)
606606 else {
607607 let claimedAsset = if ((type == SF_POS_TYPE))
609609 else WXID
610610 $Tuple2(amountToExchange, claimedAsset)
611611 }
612- let claimedAmount = $t02159721795._1
613- let claimedAsset = $t02159721795._2
612+ let claimedAmount = $t02161321811._1
613+ let claimedAsset = $t02161321811._2
614614 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
615615 let change = (claimedAmount - amountToExchange)
616616 let changeEntry = if ((change > 0))
623623
624624 @Callable(i)
625625 func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
626- let $t02245122649 = if (claim)
626+ let $t02246722665 = if (claim)
627627 then claimFarmed(type, pool)
628628 else {
629629 let claimedAsset = if ((type == SF_POS_TYPE))
631631 else WXID
632632 $Tuple2(amountToExchange, claimedAsset)
633633 }
634- let claimedAmount = $t02245122649._1
635- let claimedAsset = $t02245122649._2
634+ let claimedAmount = $t02246722665._1
635+ let claimedAsset = $t02246722665._2
636636 let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
637637 let change = (claimedAmount - amountToExchange)
638638 let changeEntry = if ((change > 0))
645645
646646 @Callable(i)
647647 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
648- let $t02337223570 = if (claim)
648+ let $t02338823586 = if (claim)
649649 then claimFarmed(type, pool)
650650 else {
651651 let claimedAsset = if ((type == SF_POS_TYPE))
653653 else WXID
654654 $Tuple2(amountToExchange, claimedAsset)
655655 }
656- let claimedAmount = $t02337223570._1
657- let claimedAsset = $t02337223570._2
656+ let claimedAmount = $t02338823586._1
657+ let claimedAsset = $t02338823586._2
658658 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
659659 let change = (claimedAmount - amountToExchange)
660660 let changeEntry = if ((change > 0))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SF_POS_TYPE = "SF"
55
66 let WX_POS_TYPE = "WX"
77
88 let CAP_FEE = "cap"
99
1010 let LOAN_FEE = "loan"
1111
1212 let NO_LOAN_FEE = "noLoan"
1313
1414 let SCALE8 = 100000000
1515
1616 let SCALE10 = 10000000000
1717
1818 let FEE_SCALE6 = 1000000
1919
2020 let kSFPoolAAssetBalance = "A_asset_balance"
2121
2222 let kSFPoolBAssetBalance = "B_asset_balance"
2323
2424 let kSFPoolAAssetId = "A_asset_id"
2525
2626 let kSFPoolBAssetId = "B_asset_id"
2727
2828 let kSFPoolShareId = "share_asset_id"
2929
3030 let kUserPosition = "_user_position"
3131
3232 let kUserBorrowAmount = "_user_position_borrow_amount"
3333
3434 let kUserBorrowAssetId = "_user_position_borrow_asset_id"
3535
3636 let kUserPositionType = "_user_position_type"
3737
3838 let kUserPositionNum = "_user_position_number"
3939
4040 let kUserPositionInterest = "_user_position_interest"
4141
4242 let kPoolTotal = "_pool_total"
4343
4444 let kPoolInterest = "_pool_interest"
4545
4646 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
4747
4848 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
4949
5050 let kAxlyCapFee = "_axly_fee_cap"
5151
5252 let kRequestId = "_request_id"
5353
5454 let kRequestIter = "requests_iter"
5555
5656 let kPool = "pool_"
5757
5858 let kPoolCapChange = "_pool_cap_change"
5959
6060 let kMoneyBox = "axly_money_box"
6161
6262 let kSFFarmingAddr = "swopfi_farming_addr"
6363
6464 let kLendService = "lend_service_addr"
6565
6666 let kPriceOracle = "price_oracle"
6767
6868 let kExContract = "exchangeContract"
6969
7070 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
7171
7272 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
7373
7474 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
7575
7676 let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
7777
7878 let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
7979
8080 func isSelfCall (i) = if ((i.caller == this))
8181 then unit
8282 else throw("Only contract itself can call this function")
8383
8484
8585 func accountBalance (assetId) = match assetId {
8686 case id: ByteVector =>
8787 assetBalance(this, id)
8888 case waves: Unit =>
8989 wavesBalance(this).available
9090 case _ =>
9191 throw("Match error")
9292 }
9393
9494
9595 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"))
9696
9797
9898 func getWXPoolData (poolAddr) = {
9999 let cfg = {
100100 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
101101 if ($isInstanceOf(@, "List[Any]"))
102102 then @
103103 else throw(($getType(@) + " couldn't be cast to List[Any]"))
104104 }
105105 if ((cfg == cfg))
106106 then $Tuple5(valueOrErrorMessage({
107107 let @ = cfg[4]
108108 if ($isInstanceOf(@, "String"))
109109 then @
110110 else unit
111111 }, "Can't get pool A asset id"), valueOrErrorMessage({
112112 let @ = cfg[5]
113113 if ($isInstanceOf(@, "String"))
114114 then @
115115 else unit
116116 }, "Can't get pool B asset id"), 0, 0, valueOrErrorMessage({
117117 let @ = cfg[3]
118118 if ($isInstanceOf(@, "String"))
119119 then @
120120 else unit
121121 }, "Can't get pool LP asset id"))
122122 else throw("Strict value is not equal to itself.")
123123 }
124124
125125
126126 func getPoolData (poolAddr,type) = if ((type == SF_POS_TYPE))
127127 then getSFPoolData(poolAddr)
128128 else if ((type == WX_POS_TYPE))
129129 then getWXPoolData(poolAddr)
130130 else throw("Wrong pool type")
131131
132132
133133 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
134134
135135
136136 func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (((pool + "_") + user) + kUserPositionNum)), 0) + 1)
137137
138138
139139 func getAxlyFee (pool,feeType) = if ((feeType == "cap"))
140140 then getIntegerValue(this, (pool + kAxlyCapFee))
141141 else if ((feeType == "loan"))
142142 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
143143 else if ((feeType == "noLoan"))
144144 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
145145 else throw("Wrong fee type")
146146
147147
148148 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
149149
150150
151151 func getWXFarmingAddr (poolAddr) = {
152152 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
153153 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
154154 Address(fromBase58String(factroyCfg[1]))
155155 }
156156
157157
158158 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
159159
160160
161161 func assetIdToStr (assetId) = match assetId {
162162 case id: ByteVector =>
163163 toBase58String(id)
164164 case waves: Unit =>
165165 "WAVES"
166166 case _ =>
167167 throw("Match error")
168168 }
169169
170170
171171 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
172172 then unit
173173 else fromBase58String(assetId)
174174
175175
176176 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
177177 then 8
178178 else match assetInfo(fromBase58String(assetId)) {
179179 case asset: Asset =>
180180 asset.decimals
181181 case _ =>
182182 throw("Can't find asset")
183183 }
184184
185185
186186 func replenishSwopFi (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId) = {
187187 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
188188 if ((shareBalanceBefore == shareBalanceBefore))
189189 then {
190190 let poolAddr = Address(fromBase58String(pool))
191191 let ratioA = fraction(SCALE8, pmtA, balA)
192192 let ratioB = fraction(SCALE8, pmtB, balB)
193193 let $t063656657 = if ((ratioB > ratioA))
194194 then {
195195 let pmt = fraction(balB, ratioA, SCALE8, CEILING)
196196 $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
197197 }
198198 else {
199199 let pmt = fraction(balA, ratioB, SCALE8, CEILING)
200200 $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
201201 }
202202 let pmtAmountA = $t063656657._1
203203 let pmtAmountB = $t063656657._2
204204 let change = $t063656657._3
205205 let changeAssetId = $t063656657._4
206206 let inv1 = if (if ((pmtAmountA > 0))
207207 then (pmtAmountB > 0)
208208 else false)
209209 then {
210210 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
211211 invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
212212 }
213213 else 0
214214 if ((inv1 == inv1))
215215 then {
216216 let inv2 = if ((change > 0))
217217 then {
218218 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
219219 let vars = ["0", "false", "0"]
220220 invoke(poolAddr, "callFunction", ["replenishWithOneToken", vars], payments)
221221 }
222222 else 0
223223 if ((inv2 == inv2))
224224 then {
225225 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
226226 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
227227 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
228228 let userShareForStake = (totalStaked - axlyFeeAmount)
229229 if ((0 >= userShareForStake))
230230 then throw("amount of staked sharetokens must be > 0")
231231 else {
232232 let inv3 = invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], [AttachedPayment(fromBase58String(shareId), userShareForStake)])
233233 if ((inv3 == inv3))
234234 then $Tuple2(userShareForStake, axlyFeeAmount)
235235 else throw("Strict value is not equal to itself.")
236236 }
237237 }
238238 else throw("Strict value is not equal to itself.")
239239 }
240240 else throw("Strict value is not equal to itself.")
241241 }
242242 else throw("Strict value is not equal to itself.")
243243 }
244244
245245
246246 func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = {
247247 let poolAddr = Address(fromBase58String(pool))
248248 let $t081088957 = if (if ((pmtA > 0))
249249 then (pmtB > 0)
250250 else false)
251251 then {
252252 let evalPutInA = split({
253253 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
254254 if ($isInstanceOf(@, "String"))
255255 then @
256256 else throw(($getType(@) + " couldn't be cast to String"))
257257 }, "__")
258258 if ((evalPutInA == evalPutInA))
259259 then {
260260 let evalPutInB = split({
261261 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
262262 if ($isInstanceOf(@, "String"))
263263 then @
264264 else throw(($getType(@) + " couldn't be cast to String"))
265265 }, "__")
266266 if ((evalPutInB == evalPutInB))
267267 then {
268268 let lpInA = parseIntValue(evalPutInA[1])
269269 let lpInB = parseIntValue(evalPutInB[1])
270270 if ((lpInB > lpInA))
271271 then {
272272 let pmtInB = parseIntValue(evalPutInA[8])
273273 $Tuple4(pmtA, pmtInB, (pmtB - pmtInB), pmtAssetB)
274274 }
275275 else {
276276 let pmtInA = parseIntValue(evalPutInB[7])
277277 $Tuple4(pmtInA, pmtB, (pmtA - pmtInA), pmtAssetA)
278278 }
279279 }
280280 else throw("Strict value is not equal to itself.")
281281 }
282282 else throw("Strict value is not equal to itself.")
283283 }
284284 else if ((pmtA > 0))
285285 then $Tuple4(pmtA, pmtB, pmtA, pmtAssetA)
286286 else if ((pmtB > 0))
287287 then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB)
288288 else throw("pmts must be > 0")
289289 let pmtAmountA = $t081088957._1
290290 let pmtAmountB = $t081088957._2
291291 let change = $t081088957._3
292292 let changeAssetId = $t081088957._4
293293 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
294294 if ((shareBalanceBefore == shareBalanceBefore))
295295 then {
296296 let inv1 = if (if ((pmtAmountA > 0))
297297 then (pmtAmountB > 0)
298298 else false)
299299 then {
300300 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
301- invoke(poolAddr, "put", [500000, false], payments)
301+ invoke(poolAddr, "put", [1000000, false], payments)
302302 }
303303 else 0
304304 if ((inv1 == inv1))
305305 then {
306306 let inv2 = if ((change > 0))
307307 then {
308308 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
309309 invoke(poolAddr, "putOneTkn", [0, false], payments)
310310 }
311311 else 0
312312 if ((inv2 == inv2))
313313 then {
314314 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
315315 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
316316 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
317317 let userShareForStake = (totalStaked - axlyFeeAmount)
318318 if ((0 >= userShareForStake))
319319 then throw("amount of staked sharetokens must be > 0")
320320 else {
321321 let inv3 = invoke(getWXFarmingAddr(poolAddr), "stake", nil, [AttachedPayment(fromBase58String(shareId), userShareForStake)])
322322 if ((inv3 == inv3))
323323 then $Tuple2(userShareForStake, axlyFeeAmount)
324324 else throw("Strict value is not equal to itself.")
325325 }
326326 }
327327 else throw("Strict value is not equal to itself.")
328328 }
329329 else throw("Strict value is not equal to itself.")
330330 }
331331 else throw("Strict value is not equal to itself.")
332332 }
333333
334334
335-func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId) = {
335+func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type) = {
336336 let totalAmount = getPoolTotalShare(pool)
337- let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
338-[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionType), SF_POS_TYPE), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
337+ let curPoolInterest = getIntegerValue(this, (pool + kPoolInterest))
338+[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionType), type), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
339339 }
340340
341341
342342 func claimFarmed (type,pool) = if ((type == SF_POS_TYPE))
343343 then {
344344 let balBefore = accountBalance(SWOPID)
345345 if ((balBefore == balBefore))
346346 then {
347347 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
348348 if ((inv == inv))
349349 then {
350350 let balAfter = accountBalance(SWOPID)
351351 $Tuple2((balAfter - balBefore), SWOPID)
352352 }
353353 else throw("Strict value is not equal to itself.")
354354 }
355355 else throw("Strict value is not equal to itself.")
356356 }
357357 else if ((type == WX_POS_TYPE))
358358 then {
359359 let balBefore = accountBalance(WXID)
360360 if ((balBefore == balBefore))
361361 then {
362362 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
363363 if ((inv == inv))
364364 then {
365365 let balAfter = accountBalance(WXID)
366366 $Tuple2((balAfter - balBefore), WXID)
367367 }
368368 else throw("Strict value is not equal to itself.")
369369 }
370370 else throw("Strict value is not equal to itself.")
371371 }
372372 else throw("Wrong pool type")
373373
374374
375375 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
376376 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
377377 if ((tokenBalanceBefore == tokenBalanceBefore))
378378 then {
379379 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
380380 if ((inv == inv))
381381 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
382382 else throw("Strict value is not equal to itself.")
383383 }
384384 else throw("Strict value is not equal to itself.")
385385 }
386386
387387
388388 func exchangePazzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
389389 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
390390 if ((tokenBalanceBefore == tokenBalanceBefore))
391391 then {
392392 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
393393 if ((inv == inv))
394394 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
395395 else throw("Strict value is not equal to itself.")
396396 }
397397 else throw("Strict value is not equal to itself.")
398398 }
399399
400400
401401 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
402402 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
403403 if ((tokenBalanceBefore == tokenBalanceBefore))
404404 then {
405405 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
406406 if ((inv == inv))
407407 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
408408 else throw("Strict value is not equal to itself.")
409409 }
410410 else throw("Strict value is not equal to itself.")
411411 }
412412
413413
414414 func capitalize (pool,type,tokenId,tokenAmount) = {
415415 let poolAddr = Address(fromBase58String(pool))
416- let $t01325613334 = getPoolData(poolAddr, type)
417- let AId = $t01325613334._1
418- let BId = $t01325613334._2
419- let balA = $t01325613334._3
420- let balB = $t01325613334._4
421- let shareId = $t01325613334._5
422- let $t01333713417 = if ((tokenId == AId))
416+ let $t01325413332 = getPoolData(poolAddr, type)
417+ let AId = $t01325413332._1
418+ let BId = $t01325413332._2
419+ let balA = $t01325413332._3
420+ let balB = $t01325413332._4
421+ let shareId = $t01325413332._5
422+ let $t01333513415 = if ((tokenId == AId))
423423 then $Tuple2(tokenAmount, 0)
424424 else $Tuple2(0, tokenAmount)
425- let pmtA = $t01333713417._1
426- let pmtB = $t01333713417._2
427- let $t01342013785 = if ((type == SF_POS_TYPE))
425+ let pmtA = $t01333513415._1
426+ let pmtB = $t01333513415._2
427+ let $t01341813783 = if ((type == SF_POS_TYPE))
428428 then replenishSwopFi(pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
429429 else replenishWX(pool, CAP_FEE, pmtA, AId, pmtB, BId, shareId)
430- let stakedAmount = $t01342013785._1
431- let axlyFee = $t01342013785._2
430+ let stakedAmount = $t01341813783._1
431+ let axlyFee = $t01341813783._2
432432 let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
433433 let totalShareAmount = getPoolTotalShare(pool)
434434 let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount))
435435 [IntegerEntry((pool + kPoolInterest), newInterest), ScriptTransfer(moneyBox, axlyFee, fromBase58String(shareId))]
436436 }
437437
438438
439439 @Callable(i)
440440 func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
441441 then true
442442 else (leverage > 300))
443443 then throw("Leverage can't be <100 and >300")
444444 else {
445445 let type = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
446- let $t01439014479 = getPoolData(Address(fromBase58String(pool)), type)
447- let AId = $t01439014479._1
448- let BId = $t01439014479._2
449- let balA = $t01439014479._3
450- let balB = $t01439014479._4
451- let shareId = $t01439014479._5
452- let $t01448215119 = if ((size(i.payments) == 2))
446+ let $t01438814477 = getPoolData(Address(fromBase58String(pool)), type)
447+ let AId = $t01438814477._1
448+ let BId = $t01438814477._2
449+ let balA = $t01438814477._3
450+ let balB = $t01438814477._4
451+ let shareId = $t01438814477._5
452+ let $t01448015117 = if ((size(i.payments) == 2))
453453 then if ((assetIdToStr(i.payments[0].assetId) != AId))
454454 then throw("Wrong payment asset A")
455455 else if ((assetIdToStr(i.payments[1].assetId) != BId))
456456 then throw("Wrong payment asset B")
457457 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
458458 else if ((size(i.payments) == 1))
459459 then if ((assetIdToStr(i.payments[0].assetId) == AId))
460460 then $Tuple4(i.payments[0].amount, AId, 0, BId)
461461 else if ((assetIdToStr(i.payments[0].assetId) == BId))
462462 then $Tuple4(0, AId, i.payments[0].amount, BId)
463463 else throw("Wrong payment")
464464 else throw("One or two payments expected")
465- let pmtA = $t01448215119._1
466- let pmtAssetA = $t01448215119._2
467- let pmtB = $t01448215119._3
468- let pmtAssetB = $t01448215119._4
465+ let pmtA = $t01448015117._1
466+ let pmtAssetA = $t01448015117._2
467+ let pmtB = $t01448015117._3
468+ let pmtAssetB = $t01448015117._4
469469 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
470470 if ((leverage > 100))
471471 then {
472472 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
473473 if ($isInstanceOf(@, "(Int, Int)"))
474474 then @
475475 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
476476 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
477477 if ($isInstanceOf(@, "(Int, Int)"))
478478 then @
479479 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
480480 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
481481 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
482482 let request = makeString([type, toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(newPosNum)], ",")
483483 let newRequestId = {
484484 let @ = invoke(this, "createNewRequest", [request], nil)
485485 if ($isInstanceOf(@, "Int"))
486486 then @
487487 else unit
488488 }
489489 if ((newRequestId == newRequestId))
490490 then {
491491 let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
492492 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
493493 if ((inv == inv))
494494 then nil
495495 else throw("Strict value is not equal to itself.")
496496 }
497497 else throw("Strict value is not equal to itself.")
498498 }
499499 else {
500- let $t01645516850 = if ((type == SF_POS_TYPE))
500+ let $t01645316848 = if ((type == SF_POS_TYPE))
501501 then replenishSwopFi(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, balA, balB, shareId)
502502 else replenishWX(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, shareId)
503- let userStaked = $t01645516850._1
504- let axlyFee = $t01645516850._2
505- replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId)
503+ let userStaked = $t01645316848._1
504+ let axlyFee = $t01645316848._2
505+ replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, type)
506506 }
507507 }
508508
509509
510510
511511 @Callable(i)
512512 func replenishFromLand (requestId) = {
513513 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
514514 if ((size(i.payments) != 1))
515515 then throw("Wrong payment size")
516516 else if (if ((assetIdToStr(i.payments[0].assetId) != request[10]))
517517 then true
518518 else (i.payments[0].amount != parseIntValue(request[11])))
519519 then throw("Wrong payment")
520520 else {
521521 let pmtA = if ((request[4] == assetIdToStr(i.payments[0].assetId)))
522522 then (parseIntValue(request[3]) + i.payments[0].amount)
523523 else parseIntValue(request[3])
524524 let pmtB = if ((request[6] == assetIdToStr(i.payments[0].assetId)))
525525 then (parseIntValue(request[5]) + i.payments[0].amount)
526526 else parseIntValue(request[3])
527527 let pool = request[2]
528528 let user = request[1]
529529 let shareId = request[9]
530530 let posNum = parseIntValue(request[12])
531- let $t01780218325 = if ((request[0] == SF_POS_TYPE))
531+ let $t01780618329 = if ((request[0] == SF_POS_TYPE))
532532 then replenishSwopFi(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], parseIntValue(request[7]), parseIntValue(request[8]), shareId)
533533 else if ((request[0] == WX_POS_TYPE))
534534 then replenishWX(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], shareId)
535535 else throw("Wrong request type")
536- let userStaked = $t01780218325._1
537- let axlyFee = $t01780218325._2
536+ let userStaked = $t01780618329._1
537+ let axlyFee = $t01780618329._2
538538 let borrowEntries = [IntegerEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAmount), i.payments[0].amount), StringEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAssetId), request[10])]
539- let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId)
539+ let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, request[0])
540540 $Tuple2(((entries ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
541541 }
542542 }
543543
544544
545545
546546 @Callable(i)
547547 func withdraw (pool,posId) = {
548548 let user = toString(i.caller)
549549 let pType = valueOrErrorMessage(getString(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionType)), "Can't find position")
550550 let pAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition))
551551 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest))
552552 let poolInterst = getIntegerValue(this, (pool + kPoolInterest))
553553 let poolTotalShare = getIntegerValue(this, (pool + kPoolTotal))
554554 let userCanWithdraw = (pAmount + fraction(pAmount, (poolInterst - userInterest), SCALE10))
555555 let poolAddr = Address(fromBase58String(pool))
556556 let userAddr = Address(fromBase58String(user))
557557 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAmount))
558558 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAssetId))
559- let $t01969719797 = getPoolData(Address(fromBase58String(pool)), pType)
560- let assetIdA = $t01969719797._1
561- let assetIdB = $t01969719797._2
562- let balA = $t01969719797._3
563- let balB = $t01969719797._4
564- let shareId = $t01969719797._5
559+ let $t01971319813 = getPoolData(Address(fromBase58String(pool)), pType)
560+ let assetIdA = $t01971319813._1
561+ let assetIdB = $t01971319813._2
562+ let balA = $t01971319813._3
563+ let balB = $t01971319813._4
564+ let shareId = $t01971319813._5
565565 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
566566 if ((cBalABefore == cBalABefore))
567567 then {
568568 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
569569 if ((cBalBBefore == cBalBBefore))
570570 then {
571571 let inv = if ((pType == SF_POS_TYPE))
572572 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
573573 else if ((pType == WX_POS_TYPE))
574574 then invoke(poolAddr, "unstakeAndGet", [userCanWithdraw], nil)
575575 else throw("Wrong position type")
576576 if ((inv == inv))
577577 then {
578578 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
579579 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
580- let $t02031720406 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
581- let tokensAmountA = $t02031720406._1
582- let tokensAmountB = $t02031720406._2
580+ let $t02033320422 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
581+ let tokensAmountA = $t02033320422._1
582+ let tokensAmountB = $t02033320422._2
583583 [DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionType)), DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, tokensAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, tokensAmountB, assetIdFromStr(assetIdB))]
584584 }
585585 else throw("Strict value is not equal to itself.")
586586 }
587587 else throw("Strict value is not equal to itself.")
588588 }
589589 else throw("Strict value is not equal to itself.")
590590 }
591591
592592
593593
594594 @Callable(i)
595595 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
596596 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
597597 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
598598 })
599599
600600
601601
602602 @Callable(i)
603603 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
604- let $t02159721795 = if (claim)
604+ let $t02161321811 = if (claim)
605605 then claimFarmed(type, pool)
606606 else {
607607 let claimedAsset = if ((type == SF_POS_TYPE))
608608 then SWOPID
609609 else WXID
610610 $Tuple2(amountToExchange, claimedAsset)
611611 }
612- let claimedAmount = $t02159721795._1
613- let claimedAsset = $t02159721795._2
612+ let claimedAmount = $t02161321811._1
613+ let claimedAsset = $t02161321811._2
614614 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
615615 let change = (claimedAmount - amountToExchange)
616616 let changeEntry = if ((change > 0))
617617 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
618618 else nil
619619 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
620620 }
621621
622622
623623
624624 @Callable(i)
625625 func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
626- let $t02245122649 = if (claim)
626+ let $t02246722665 = if (claim)
627627 then claimFarmed(type, pool)
628628 else {
629629 let claimedAsset = if ((type == SF_POS_TYPE))
630630 then SWOPID
631631 else WXID
632632 $Tuple2(amountToExchange, claimedAsset)
633633 }
634- let claimedAmount = $t02245122649._1
635- let claimedAsset = $t02245122649._2
634+ let claimedAmount = $t02246722665._1
635+ let claimedAsset = $t02246722665._2
636636 let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
637637 let change = (claimedAmount - amountToExchange)
638638 let changeEntry = if ((change > 0))
639639 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
640640 else nil
641641 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
642642 }
643643
644644
645645
646646 @Callable(i)
647647 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
648- let $t02337223570 = if (claim)
648+ let $t02338823586 = if (claim)
649649 then claimFarmed(type, pool)
650650 else {
651651 let claimedAsset = if ((type == SF_POS_TYPE))
652652 then SWOPID
653653 else WXID
654654 $Tuple2(amountToExchange, claimedAsset)
655655 }
656- let claimedAmount = $t02337223570._1
657- let claimedAsset = $t02337223570._2
656+ let claimedAmount = $t02338823586._1
657+ let claimedAsset = $t02338823586._2
658658 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
659659 let change = (claimedAmount - amountToExchange)
660660 let changeEntry = if ((change > 0))
661661 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
662662 else nil
663663 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
664664 }
665665
666666
667667
668668 @Callable(i)
669669 func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFee) = if (if ((type != SF_POS_TYPE))
670670 then (type != WX_POS_TYPE)
671671 else false)
672672 then throw("Wrong type")
673673 else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyCapFee), capFee), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type)]
674674
675675
676676 @Verifier(tx)
677677 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
678678

github/deemru/w8io/026f985 
102.70 ms