tx · DLjrR2vLeenXbj8E4QgH17CRKUmoXPhgb72462z7ya4a

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.03600000 Waves

2023.05.04 12:36 [2562839] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "DLjrR2vLeenXbj8E4QgH17CRKUmoXPhgb72462z7ya4a", "fee": 3600000, "feeAssetId": null, "timestamp": 1683192976834, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "atf6Qzz5iFUKVAwBbTh6iBfcq5TeY3wtD4EgYVcMVm7UpdvtjPJuQsUsiXU1oEzsU2m6NmUXs8zaQtMeTqZQLD6" ], "script": "base64:BgJbCAISBQoDCAEIEgMKAQgSBQoDCAEIEgMKAQgSBAoCCAESAwoBCBIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEggKBggIAQEBAVAAB1NGX1BPT0wCAlNGAAdXWF9QT09MAgJXWAAPQ0FQX0ZFRV9OT19MT0FOAgljYXBOb0xvYW4ADENBUF9GRUVfTE9BTgIHY2FwTG9hbgAHQ0FQX0ZFRQIDY2FwAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZQIPQV9hc3NldF9iYWxhbmNlABRrU0ZQb29sQkFzc2V0QmFsYW5jZQIPQl9hc3NldF9iYWxhbmNlAA9rU0ZQb29sQUFzc2V0SWQCCkFfYXNzZXRfaWQAD2tTRlBvb2xCQXNzZXRJZAIKQl9hc3NldF9pZAAOa1NGUG9vbFNoYXJlSWQCDnNoYXJlX2Fzc2V0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0MgJfMwQEYkJhbAgFDSR0MDM0NjQ4MzQ3NDICXzQEB3NoYXJlSWQIBQ0kdDAzNDY0ODM0NzQyAl81CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRVrQXhseUluRmVlV2l0aG91dExvYW4FC2luRmVlTm9Mb2FuCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRJrQXhseUluRmVlV2l0aExvYW4FCWluRmVlTG9hbgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQhwb29sQWRkcgURa0F4bHlOb0xvYW5DYXBGZWUFDGNhcEZlZU5vTG9hbgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQhwb29sQWRkcgUTa0F4bHlXaXRoTG9hbkNhcEZlZQUOY2FwRmVlV2l0aExvYW4JAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgUIcG9vbEFkZHIFDWtQb29sSW50ZXJlc3QAAAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBWtQb29sBQhwb29sQWRkcgUEdHlwZQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFB3NoYXJlSWQFCmtTaGFyZVBvb2wFCHBvb2xBZGRyBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5Be0ilg==", "height": 2562839, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D5fR9GKAFo54kJi9S7gKH27SmohD7tgNEpmujjBqCHFk Next: 5NjufpnggLyQB99Abxsr37ytDCCWaVprj3WXLYnDbhWg Diff:
OldNewDifferences
88 let CAP_FEE_NO_LOAN = "capNoLoan"
99
1010 let CAP_FEE_LOAN = "capLoan"
11+
12+let CAP_FEE = "cap"
1113
1214 let LOAN_FEE = "loan"
1315
2830 let kSFPoolBAssetId = "B_asset_id"
2931
3032 let kSFPoolShareId = "share_asset_id"
33+
34+let kSFPoolShareSupply = "share_asset_supply"
3135
3236 let kSFPoolFee = "commission"
3337
6468 let kSharePool = "_pool_share_id"
6569
6670 let kPoolCapChange = "_pool_cap_change"
71+
72+let kTokenLastPrice = "_last_price"
6773
6874 let kMoneyBox = "axly_money_box"
6975
165171 else throw("Wrong pool type")
166172
167173
174+func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL))
175+ then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply")
176+ else if ((type == WX_POOL))
177+ then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity
178+ else throw("Wrong pool type")
179+
180+
168181 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
169182
170183
223236 }
224237
225238
239+func getAssetsPrice (assetIds) = {
240+ func getPrices (a,assetId) = {
241+ let assetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
242+ if ($isInstanceOf(@, "(Int, Int)"))
243+ then @
244+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
245+ (a :+ assetPrice)
246+ }
247+
248+ let $l = assetIds
249+ let $s = size($l)
250+ let $acc0 = nil
251+ func $f0_1 ($a,$i) = if (($i >= $s))
252+ then $a
253+ else getPrices($a, $l[$i])
254+
255+ func $f0_2 ($a,$i) = if (($i >= $s))
256+ then $a
257+ else throw("List size exceeds 100")
258+
259+ $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)
260+ }
261+
262+
263+func getSharePrice (shareIds) = {
264+ func getPrices (a,shareId) = {
265+ let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
266+ let poolAddr = Address(fromBase58String(pool))
267+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
268+ let $t077377802 = getPoolData(poolAddr, pType)
269+ let aId = $t077377802._1
270+ let bId = $t077377802._2
271+ let aBalance = $t077377802._3
272+ let bBalance = $t077377802._4
273+ let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
274+ if ($isInstanceOf(@, "(Int, Int)"))
275+ then @
276+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
277+ let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
278+ if ($isInstanceOf(@, "(Int, Int)"))
279+ then @
280+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
281+ let shareSupply = getShareSupply(poolAddr, pType, shareId)
282+ let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
283+ let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
284+ let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
285+ let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision))
286+ let sharePrice = fraction(sum, sharePrecision, shareSupply)
287+ (a :+ sharePrice)
288+ }
289+
290+ let $l = shareIds
291+ let $s = size($l)
292+ let $acc0 = nil
293+ func $f0_1 ($a,$i) = if (($i >= $s))
294+ then $a
295+ else getPrices($a, $l[$i])
296+
297+ func $f0_2 ($a,$i) = if (($i >= $s))
298+ then $a
299+ else throw("List size exceeds 50")
300+
301+ $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)
302+ }
303+
304+
305+func getCursEntries (aId,bId,shareId) = {
306+ let assetsPrices = getAssetsPrice([aId, bId])
307+ let sharePrice = getSharePrice([shareId])
308+[IntegerEntry((aId + kTokenLastPrice), assetsPrices[0]), IntegerEntry((bId + kTokenLastPrice), assetsPrices[1]), IntegerEntry((shareId + kTokenLastPrice), sharePrice[0])]
309+ }
310+
311+
226312 func replenishSwopFi (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId) = {
227313 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
228314 if ((shareBalanceBefore == shareBalanceBefore))
230316 let poolAddr = Address(fromBase58String(pool))
231317 let ratioA = fraction(SCALE8, pmtA, balA)
232318 let ratioB = fraction(SCALE8, pmtB, balB)
233- let $t071357427 = if ((ratioB > ratioA))
319+ let $t093079599 = if ((ratioB > ratioA))
234320 then {
235321 let pmt = fraction(balB, ratioA, SCALE8, CEILING)
236322 $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
239325 let pmt = fraction(balA, ratioB, SCALE8, CEILING)
240326 $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
241327 }
242- let pmtAmountA = $t071357427._1
243- let pmtAmountB = $t071357427._2
244- let change = $t071357427._3
245- let changeAssetId = $t071357427._4
328+ let pmtAmountA = $t093079599._1
329+ let pmtAmountB = $t093079599._2
330+ let change = $t093079599._3
331+ let changeAssetId = $t093079599._4
246332 let inv1 = if (if ((pmtAmountA > 0))
247333 then (pmtAmountB > 0)
248334 else false)
264350 then {
265351 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
266352 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
267- let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
353+ let axlyFeeAmount = if ((feeType == CAP_FEE))
354+ then fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
355+ else fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
268356 let userShareForStake = (totalStaked - axlyFeeAmount)
269357 if ((0 >= userShareForStake))
270358 then throw("amount of staked sharetokens must be > 0")
285373
286374 func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = {
287375 let poolAddr = Address(fromBase58String(pool))
288- let $t088789727 = if (if ((pmtA > 0))
376+ let $t01116412013 = if (if ((pmtA > 0))
289377 then (pmtB > 0)
290378 else false)
291379 then {
326414 else if ((pmtB > 0))
327415 then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB)
328416 else throw("pmts must be > 0")
329- let pmtAmountA = $t088789727._1
330- let pmtAmountB = $t088789727._2
331- let change = $t088789727._3
332- let changeAssetId = $t088789727._4
417+ let pmtAmountA = $t01116412013._1
418+ let pmtAmountB = $t01116412013._2
419+ let change = $t01116412013._3
420+ let changeAssetId = $t01116412013._4
333421 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
334422 if ((shareBalanceBefore == shareBalanceBefore))
335423 then {
373461
374462
375463 func replenishByType (type,pool,feeType,pmtA,AId,pmtB,BId,balA,balB,shareId) = if ((type == SF_POOL))
376- then replenishSwopFi(pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
464+ then replenishSwopFi(pool, feeType, pmtA, AId, pmtB, BId, balA, balB, shareId)
377465 else if ((type == WX_POOL))
378- then replenishWX(pool, LOAN_FEE, pmtA, AId, pmtB, BId, shareId)
466+ then replenishWX(pool, feeType, pmtA, AId, pmtB, BId, shareId)
379467 else throw("Wrong pool type")
380468
381469
461549
462550 func capitalize (pool,pType,tokenId,tokenAmount) = {
463551 let poolAddr = Address(fromBase58String(pool))
464- let $t01469114770 = getPoolData(poolAddr, pType)
465- let AId = $t01469114770._1
466- let BId = $t01469114770._2
467- let balA = $t01469114770._3
468- let balB = $t01469114770._4
469- let shareId = $t01469114770._5
470- let $t01477314853 = if ((tokenId == AId))
552+ let $t01697517054 = getPoolData(poolAddr, pType)
553+ let AId = $t01697517054._1
554+ let BId = $t01697517054._2
555+ let balA = $t01697517054._3
556+ let balB = $t01697517054._4
557+ let shareId = $t01697517054._5
558+ let $t01705717137 = if ((tokenId == AId))
471559 then $Tuple2(tokenAmount, 0)
472560 else $Tuple2(0, tokenAmount)
473- let pmtA = $t01477314853._1
474- let pmtB = $t01477314853._2
475- let $t01485614971 = replenishByType(pType, pool, CAP_FEE_LOAN, pmtA, AId, pmtB, BId, balA, balB, shareId)
476- let stakedAmount = $t01485614971._1
477- let axlyFee = $t01485614971._2
561+ let pmtA = $t01705717137._1
562+ let pmtB = $t01705717137._2
563+ let $t01714017250 = replenishByType(pType, pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
564+ let stakedAmount = $t01714017250._1
565+ let axlyFee = $t01714017250._2
478566 let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
479567 let totalShareAmount = getPoolTotalShare(pool)
480568 let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount))
481-[IntegerEntry((pool + kPoolInterest), newInterest), ScriptTransfer(moneyBox, axlyFee, fromBase58String(shareId))]
569+ ([IntegerEntry((pool + kPoolInterest), newInterest), ScriptTransfer(moneyBox, axlyFee, fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId))
482570 }
483571
484572
487575 let feeScale6 = 1000000
488576 let fee = getIntegerValue(poolAddr, kSFPoolFee)
489577 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
490- let $t01566415952 = if ((assetTokenToGet == assetIdA))
578+ let $t01798018268 = if ((assetTokenToGet == assetIdA))
491579 then {
492580 let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
493581 $Tuple2(amountToPay, assetIdB)
496584 let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
497585 $Tuple2(amountToPay, assetIdA)
498586 }
499- let amountToPay = $t01566415952._1
500- let assetToPay = $t01566415952._2
587+ let amountToPay = $t01798018268._1
588+ let assetToPay = $t01798018268._2
501589 invoke(poolAddr, "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
502590 }
503591
507595 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
508596 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
509597 let feeScale = toBigInt(100000000)
510- let $t01643116739 = if ((assetTokenToGet == assetIdA))
598+ let $t01874719055 = if ((assetTokenToGet == assetIdA))
511599 then {
512600 let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
513601 $Tuple2(amountToPay, assetIdB)
516604 let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
517605 $Tuple2(amountToPay, assetIdA)
518606 }
519- let amountToPay = $t01643116739._1
520- let assetToPay = $t01643116739._2
607+ let amountToPay = $t01874719055._1
608+ let assetToPay = $t01874719055._2
521609 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
522610 invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)])
523611 }
531619 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
532620 let poolAddr = Address(fromBase58String(pool))
533621 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
534- let $t01760417671 = getPoolData(poolAddr, pType)
535- let assetIdA = $t01760417671._1
536- let assetIdB = $t01760417671._2
537- let balA = $t01760417671._3
538- let balB = $t01760417671._4
622+ let $t01992019996 = getPoolData(poolAddr, pType)
623+ let assetIdA = $t01992019996._1
624+ let assetIdB = $t01992019996._2
625+ let balA = $t01992019996._3
626+ let balB = $t01992019996._4
627+ let shareId = $t01992019996._5
539628 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
540629 if ((cBalABefore == cBalABefore))
541630 then {
551640 then {
552641 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
553642 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
554- let $t01818318272 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
555- let tokensAmountA = $t01818318272._1
556- let tokensAmountB = $t01818318272._2
557- let $t01827518971 = if ((debt > 0))
643+ let $t02050820597 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
644+ let tokensAmountA = $t02050820597._1
645+ let tokensAmountB = $t02050820597._2
646+ let $t02060021296 = if ((debt > 0))
558647 then {
559648 let amountToGetEx = if (if ((borrowAsset == assetIdA))
560649 then (debt > tokensAmountA)
577666 else throw("Strict value is not equal to itself.")
578667 }
579668 else $Tuple2(tokensAmountA, tokensAmountB)
580- let toUserAmountA = $t01827518971._1
581- let toUserAmountB = $t01827518971._2
582- $Tuple6(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter)
669+ let toUserAmountA = $t02060021296._1
670+ let toUserAmountB = $t02060021296._2
671+ $Tuple7(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter, shareId)
583672 }
584673 else throw("Strict value is not equal to itself.")
585674 }
607696
608697
609698 @Callable(i)
610-func getAssetPrice (assetId) = $Tuple2(nil, (let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
611-if ($isInstanceOf(@, "(Int, Int)"))
612- then @
613- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2)
614-
615-
616-
617-@Callable(i)
618-func getSharePrice (shareId) = {
619- let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
620- let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
621- let $t02006620136 = getPoolData(Address(fromBase58String(pool)), pType)
622- let aId = $t02006620136._1
623- let bId = $t02006620136._2
624- let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
625- if ($isInstanceOf(@, "(Int, Int)"))
626- then @
627- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
628- let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
629- if ($isInstanceOf(@, "(Int, Int)"))
630- then @
631- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
632- $Tuple2(nil, (dPriceA + dPriceB))
633- }
634-
635-
636-
637-@Callable(i)
638699 func replenishEVALONLY (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
639700 then true
640701 else (leverage > 300))
641702 then throw("Leverage can't be <100 and >300")
642703 else {
643704 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
644- let $t02062120711 = getPoolData(Address(fromBase58String(pool)), pType)
645- let AId = $t02062120711._1
646- let BId = $t02062120711._2
647- let balA = $t02062120711._3
648- let balB = $t02062120711._4
649- let shareId = $t02062120711._5
650- let $t02071421351 = if ((size(i.payments) == 2))
705+ let $t02228422374 = getPoolData(Address(fromBase58String(pool)), pType)
706+ let AId = $t02228422374._1
707+ let BId = $t02228422374._2
708+ let balA = $t02228422374._3
709+ let balB = $t02228422374._4
710+ let shareId = $t02228422374._5
711+ let $t02237723014 = if ((size(i.payments) == 2))
651712 then if ((assetIdToStr(i.payments[0].assetId) != AId))
652713 then throw("Wrong payment asset A")
653714 else if ((assetIdToStr(i.payments[1].assetId) != BId))
660721 then $Tuple4(0, AId, i.payments[0].amount, BId)
661722 else throw("Wrong payment")
662723 else throw("One or two payments expected")
663- let pmtA = $t02071421351._1
664- let pmtAssetA = $t02071421351._2
665- let pmtB = $t02071421351._3
666- let pmtAssetB = $t02071421351._4
667- let $t02135422805 = if ((leverage > 100))
724+ let pmtA = $t02237723014._1
725+ let pmtAssetA = $t02237723014._2
726+ let pmtB = $t02237723014._3
727+ let pmtAssetB = $t02237723014._4
728+ let $t02301724468 = if ((leverage > 100))
668729 then {
669730 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
670731 if ($isInstanceOf(@, "(Int, Int)"))
694755 else throw("Strict value is not equal to itself.")
695756 }
696757 else $Tuple2(replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)._1, 0)
697- let userStaked = $t02135422805._1
698- let borrowAmount = $t02135422805._2
699- let $t02280922976 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
700- if (($t02280922976 == $t02280922976))
758+ let userStaked = $t02301724468._1
759+ let borrowAmount = $t02301724468._2
760+ let $t02447224639 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
761+ if (($t02447224639 == $t02447224639))
701762 then {
702- let userGetBBeforeRepay = $t02280922976._6
703- let userGetABeforeRepay = $t02280922976._5
704- let assetIdB = $t02280922976._4
705- let toUserAmountB = $t02280922976._3
706- let assetIdA = $t02280922976._2
707- let toUserAmountA = $t02280922976._1
708- let $t02297923094 = getPoolData(Address(fromBase58String(pool)), pType)
709- let AIdAfter = $t02297923094._1
710- let BIdAfter = $t02297923094._2
711- let balAAfter = $t02297923094._3
712- let balBAfter = $t02297923094._4
713- let shareIdAfter = $t02297923094._5
763+ let userGetBBeforeRepay = $t02447224639._6
764+ let userGetABeforeRepay = $t02447224639._5
765+ let assetIdB = $t02447224639._4
766+ let toUserAmountB = $t02447224639._3
767+ let assetIdA = $t02447224639._2
768+ let toUserAmountA = $t02447224639._1
769+ let $t02464224757 = getPoolData(Address(fromBase58String(pool)), pType)
770+ let AIdAfter = $t02464224757._1
771+ let BIdAfter = $t02464224757._2
772+ let balAAfter = $t02464224757._3
773+ let balBAfter = $t02464224757._4
774+ let shareIdAfter = $t02464224757._5
714775 let ratioBefore = fraction(balB, SCALE8, balA)
715776 let ratioAfter = fraction(balBAfter, SCALE8, balAAfter)
716777 let impact = (SCALE8 - fraction(ratioBefore, SCALE8, ratioAfter))
726787
727788 @Callable(i)
728789 func replenishFromLandEVALONLY (requestId) = {
729- let $t02346423568 = parseRequest(requestId)
730- let user = $t02346423568._1
731- let pool = $t02346423568._2
732- let pmtA = $t02346423568._3
733- let AId = $t02346423568._4
734- let pmtB = $t02346423568._5
735- let BId = $t02346423568._6
736- let balA = $t02346423568._7
737- let balB = $t02346423568._8
738- let shareId = $t02346423568._9
739- let bwAsset = $t02346423568._10
740- let bwAmount = $t02346423568._11
790+ let $t02512725231 = parseRequest(requestId)
791+ let user = $t02512725231._1
792+ let pool = $t02512725231._2
793+ let pmtA = $t02512725231._3
794+ let AId = $t02512725231._4
795+ let pmtB = $t02512725231._5
796+ let BId = $t02512725231._6
797+ let balA = $t02512725231._7
798+ let balB = $t02512725231._8
799+ let shareId = $t02512725231._9
800+ let bwAsset = $t02512725231._10
801+ let bwAmount = $t02512725231._11
741802 if ((size(i.payments) != 1))
742803 then throw("Wrong payment size")
743804 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
745806 else (i.payments[0].amount != bwAmount))
746807 then throw("Wrong payment")
747808 else {
748- let $t02375823882 = if ((AId == bwAsset))
809+ let $t02542125545 = if ((AId == bwAsset))
749810 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
750811 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
751- let pmtAllA = $t02375823882._1
752- let pmtAllB = $t02375823882._2
812+ let pmtAllA = $t02542125545._1
813+ let pmtAllB = $t02542125545._2
753814 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
754- let $t02396424073 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
755- let userStaked = $t02396424073._1
756- let axlyFee = $t02396424073._2
815+ let $t02562725736 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
816+ let userStaked = $t02562725736._1
817+ let axlyFee = $t02562725736._2
757818 $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", userStaked)], userStaked)
758819 }
759820 }
767828 then throw("Leverage can't be <100 and >300")
768829 else {
769830 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
770- let $t02445024540 = getPoolData(Address(fromBase58String(pool)), pType)
771- let AId = $t02445024540._1
772- let BId = $t02445024540._2
773- let balA = $t02445024540._3
774- let balB = $t02445024540._4
775- let shareId = $t02445024540._5
776- let $t02454325180 = if ((size(i.payments) == 2))
831+ let $t02611326203 = getPoolData(Address(fromBase58String(pool)), pType)
832+ let AId = $t02611326203._1
833+ let BId = $t02611326203._2
834+ let balA = $t02611326203._3
835+ let balB = $t02611326203._4
836+ let shareId = $t02611326203._5
837+ let $t02620626843 = if ((size(i.payments) == 2))
777838 then if ((assetIdToStr(i.payments[0].assetId) != AId))
778839 then throw("Wrong payment asset A")
779840 else if ((assetIdToStr(i.payments[1].assetId) != BId))
786847 then $Tuple4(0, AId, i.payments[0].amount, BId)
787848 else throw("Wrong payment")
788849 else throw("One or two payments expected")
789- let pmtA = $t02454325180._1
790- let pmtAssetA = $t02454325180._2
791- let pmtB = $t02454325180._3
792- let pmtAssetB = $t02454325180._4
850+ let pmtA = $t02620626843._1
851+ let pmtAssetA = $t02620626843._2
852+ let pmtB = $t02620626843._3
853+ let pmtAssetB = $t02620626843._4
793854 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
794855 if ((leverage > 100))
795856 then {
821882 else throw("Strict value is not equal to itself.")
822883 }
823884 else {
824- let $t02647726589 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
825- let userStaked = $t02647726589._1
826- let axlyFee = $t02647726589._2
827- replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType)
885+ let $t02814028252 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
886+ let userStaked = $t02814028252._1
887+ let axlyFee = $t02814028252._2
888+ (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType) ++ getCursEntries(AId, BId, shareId))
828889 }
829890 }
830891
832893
833894 @Callable(i)
834895 func replenishFromLand (requestId) = {
835- let $t02675126855 = parseRequest(requestId)
836- let user = $t02675126855._1
837- let pool = $t02675126855._2
838- let pmtA = $t02675126855._3
839- let AId = $t02675126855._4
840- let pmtB = $t02675126855._5
841- let BId = $t02675126855._6
842- let balA = $t02675126855._7
843- let balB = $t02675126855._8
844- let shareId = $t02675126855._9
845- let bwAsset = $t02675126855._10
846- let bwAmount = $t02675126855._11
896+ let $t02845628560 = parseRequest(requestId)
897+ let user = $t02845628560._1
898+ let pool = $t02845628560._2
899+ let pmtA = $t02845628560._3
900+ let AId = $t02845628560._4
901+ let pmtB = $t02845628560._5
902+ let BId = $t02845628560._6
903+ let balA = $t02845628560._7
904+ let balB = $t02845628560._8
905+ let shareId = $t02845628560._9
906+ let bwAsset = $t02845628560._10
907+ let bwAmount = $t02845628560._11
847908 if ((size(i.payments) != 1))
848909 then throw("Wrong payment size")
849910 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
851912 else (i.payments[0].amount != bwAmount))
852913 then throw("Wrong payment")
853914 else {
854- let $t02704527169 = if ((AId == bwAsset))
915+ let $t02875028874 = if ((AId == bwAsset))
855916 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
856917 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
857- let pmtAllA = $t02704527169._1
858- let pmtAllB = $t02704527169._2
918+ let pmtAllA = $t02875028874._1
919+ let pmtAllB = $t02875028874._2
859920 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
860- let $t02725127360 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
861- let userStaked = $t02725127360._1
862- let axlyFee = $t02725127360._2
921+ let $t02895629065 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
922+ let userStaked = $t02895629065._1
923+ let axlyFee = $t02895629065._2
863924 let posNum = getNewUserPositionNumber(pool, toString(i.caller))
864925 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
865926 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType)
866- $Tuple2(((entries ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
927+ $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
867928 }
868929 }
869930
888949 else throw(($getType(@) + " couldn't be cast to Int"))
889950 }
890951 else 0
891- let $t02880228922 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
892- if (($t02880228922 == $t02880228922))
952+ let $t03054430697 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
953+ if (($t03054430697 == $t03054430697))
893954 then {
894- let assetIdB = $t02880228922._4
895- let toUserAmountB = $t02880228922._3
896- let assetIdA = $t02880228922._2
897- let toUserAmountA = $t02880228922._1
955+ let shareId = $t03054430697._7
956+ let cBalBAfter = $t03054430697._6
957+ let cBalAAfter = $t03054430697._5
958+ let assetIdB = $t03054430697._4
959+ let toUserAmountB = $t03054430697._3
960+ let assetIdA = $t03054430697._2
961+ let toUserAmountA = $t03054430697._1
898962 let closeDbtInv = if ((debt > 0))
899963 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + toString(posId))], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
900964 else 0
901965 if ((closeDbtInv == closeDbtInv))
902- then [DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))]
966+ then ([DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId))
903967 else throw("Strict value is not equal to itself.")
904968 }
905969 else throw("Strict value is not equal to itself.")
917981
918982 @Callable(i)
919983 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
920- let $t03021930413 = if (claim)
984+ let $t03204132235 = if (claim)
921985 then claimFarmed(type, pool)
922986 else {
923987 let claimedAsset = if ((type == SF_POOL))
925989 else WXID
926990 $Tuple2(amountToExchange, claimedAsset)
927991 }
928- let claimedAmount = $t03021930413._1
929- let claimedAsset = $t03021930413._2
992+ let claimedAmount = $t03204132235._1
993+ let claimedAsset = $t03204132235._2
930994 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
931995 let change = (claimedAmount - amountToExchange)
932996 let changeEntry = if ((change > 0))
9391003
9401004 @Callable(i)
9411005 func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
942- let $t03106931263 = if (claim)
1006+ let $t03289233086 = if (claim)
9431007 then claimFarmed(type, pool)
9441008 else {
9451009 let claimedAsset = if ((type == SF_POOL))
9471011 else WXID
9481012 $Tuple2(amountToExchange, claimedAsset)
9491013 }
950- let claimedAmount = $t03106931263._1
951- let claimedAsset = $t03106931263._2
1014+ let claimedAmount = $t03289233086._1
1015+ let claimedAsset = $t03289233086._2
9521016 let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
9531017 let change = (claimedAmount - amountToExchange)
9541018 let changeEntry = if ((change > 0))
9611025
9621026 @Callable(i)
9631027 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
964- let $t03198632180 = if (claim)
1028+ let $t03380934003 = if (claim)
9651029 then claimFarmed(type, pool)
9661030 else {
9671031 let claimedAsset = if ((type == SF_POOL))
9691033 else WXID
9701034 $Tuple2(amountToExchange, claimedAsset)
9711035 }
972- let claimedAmount = $t03198632180._1
973- let claimedAsset = $t03198632180._2
1036+ let claimedAmount = $t03380934003._1
1037+ let claimedAsset = $t03380934003._2
9741038 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
9751039 let change = (claimedAmount - amountToExchange)
9761040 let changeEntry = if ((change > 0))
9871051 else false)
9881052 then throw("Wrong type")
9891053 else {
990- let $t03282532919 = getPoolData(Address(fromBase58String(poolAddr)), type)
991- let aId = $t03282532919._1
992- let bId = $t03282532919._2
993- let aBal = $t03282532919._3
994- let bBal = $t03282532919._4
995- let shareId = $t03282532919._5
1054+ let $t03464834742 = getPoolData(Address(fromBase58String(poolAddr)), type)
1055+ let aId = $t03464834742._1
1056+ let bId = $t03464834742._2
1057+ let aBal = $t03464834742._3
1058+ let bBal = $t03464834742._4
1059+ let shareId = $t03464834742._5
9961060 [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr)]
9971061 }
9981062
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"
11+
12+let CAP_FEE = "cap"
1113
1214 let LOAN_FEE = "loan"
1315
1416 let NO_LOAN_FEE = "noLoan"
1517
1618 let SCALE8 = 100000000
1719
1820 let SCALE10 = 10000000000
1921
2022 let FEE_SCALE6 = 1000000
2123
2224 let kSFPoolAAssetBalance = "A_asset_balance"
2325
2426 let kSFPoolBAssetBalance = "B_asset_balance"
2527
2628 let kSFPoolAAssetId = "A_asset_id"
2729
2830 let kSFPoolBAssetId = "B_asset_id"
2931
3032 let kSFPoolShareId = "share_asset_id"
33+
34+let kSFPoolShareSupply = "share_asset_supply"
3135
3236 let kSFPoolFee = "commission"
3337
3438 let kUserPosition = "_user_position"
3539
3640 let kUserBorrowAmount = "_user_position_borrow_amount"
3741
3842 let kUserBorrowAssetId = "_user_position_borrow_asset_id"
3943
4044 let kUserPositionNum = "_user_position_number"
4145
4246 let kUserPositionInterest = "_user_position_interest"
4347
4448 let kPoolTotal = "_pool_total"
4549
4650 let kPoolTotalLoan = "_pool_total_loan"
4751
4852 let kPoolInterest = "_pool_interest"
4953
5054 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
5155
5256 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
5357
5458 let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan"
5559
5660 let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan"
5761
5862 let kRequestId = "_request_id"
5963
6064 let kRequestIter = "requests_iter"
6165
6266 let kPool = "pool_"
6367
6468 let kSharePool = "_pool_share_id"
6569
6670 let kPoolCapChange = "_pool_cap_change"
71+
72+let kTokenLastPrice = "_last_price"
6773
6874 let kMoneyBox = "axly_money_box"
6975
7076 let kSFFarmingAddr = "swopfi_farming_addr"
7177
7278 let kLendService = "lend_service_addr"
7379
7480 let kPriceOracle = "price_oracle"
7581
7682 let kExContract = "exchange_contract"
7783
7884 let kWxSwapContract = "wx_swap_contract"
7985
8086 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
8187
8288 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
8389
8490 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
8591
8692 let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
8793
8894 let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
8995
9096 let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
9197
9298 func isSelfCall (i) = if ((i.caller == this))
9399 then unit
94100 else throw("Only contract itself can call this function")
95101
96102
97103 func accountBalance (assetId) = match assetId {
98104 case id: ByteVector =>
99105 assetBalance(this, id)
100106 case waves: Unit =>
101107 wavesBalance(this).available
102108 case _ =>
103109 throw("Match error")
104110 }
105111
106112
107113 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"))
108114
109115
110116 func getWXPoolData (poolAddr) = {
111117 let cfg = {
112118 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
113119 if ($isInstanceOf(@, "List[Any]"))
114120 then @
115121 else throw(($getType(@) + " couldn't be cast to List[Any]"))
116122 }
117123 if ((cfg == cfg))
118124 then {
119125 let aId = valueOrErrorMessage({
120126 let @ = cfg[4]
121127 if ($isInstanceOf(@, "String"))
122128 then @
123129 else unit
124130 }, "Can't get pool A asset id")
125131 let bId = valueOrErrorMessage({
126132 let @ = cfg[5]
127133 if ($isInstanceOf(@, "String"))
128134 then @
129135 else unit
130136 }, "Can't get pool B asset id")
131137 let shareId = valueOrErrorMessage({
132138 let @ = cfg[3]
133139 if ($isInstanceOf(@, "String"))
134140 then @
135141 else unit
136142 }, "Can't get pool LP asset id")
137143 let balA = {
138144 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil)
139145 if ($isInstanceOf(@, "Int"))
140146 then @
141147 else throw(($getType(@) + " couldn't be cast to Int"))
142148 }
143149 if ((balA == balA))
144150 then {
145151 let balB = {
146152 let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil)
147153 if ($isInstanceOf(@, "Int"))
148154 then @
149155 else throw(($getType(@) + " couldn't be cast to Int"))
150156 }
151157 if ((balB == balB))
152158 then $Tuple5(aId, bId, balA, balB, shareId)
153159 else throw("Strict value is not equal to itself.")
154160 }
155161 else throw("Strict value is not equal to itself.")
156162 }
157163 else throw("Strict value is not equal to itself.")
158164 }
159165
160166
161167 func getPoolData (poolAddr,type) = if ((type == SF_POOL))
162168 then getSFPoolData(poolAddr)
163169 else if ((type == WX_POOL))
164170 then getWXPoolData(poolAddr)
165171 else throw("Wrong pool type")
166172
167173
174+func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL))
175+ then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply")
176+ else if ((type == WX_POOL))
177+ then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity
178+ else throw("Wrong pool type")
179+
180+
168181 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
169182
170183
171184 func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0)
172185
173186
174187 func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (((pool + "_") + user) + kUserPositionNum)), 0) + 1)
175188
176189
177190 func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN))
178191 then getIntegerValue(this, (pool + kAxlyWithLoanCapFee))
179192 else if ((feeType == CAP_FEE_NO_LOAN))
180193 then getIntegerValue(this, (pool + kAxlyNoLoanCapFee))
181194 else if ((feeType == LOAN_FEE))
182195 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
183196 else if ((feeType == NO_LOAN_FEE))
184197 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
185198 else throw("Wrong fee type")
186199
187200
188201 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
189202
190203
191204 func getWXFarmingAddr (poolAddr) = {
192205 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
193206 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
194207 Address(fromBase58String(factroyCfg[1]))
195208 }
196209
197210
198211 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
199212
200213
201214 func assetIdToStr (assetId) = match assetId {
202215 case id: ByteVector =>
203216 toBase58String(id)
204217 case waves: Unit =>
205218 "WAVES"
206219 case _ =>
207220 throw("Match error")
208221 }
209222
210223
211224 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
212225 then unit
213226 else fromBase58String(assetId)
214227
215228
216229 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
217230 then 8
218231 else match assetInfo(fromBase58String(assetId)) {
219232 case asset: Asset =>
220233 asset.decimals
221234 case _ =>
222235 throw("Can't find asset")
223236 }
224237
225238
239+func getAssetsPrice (assetIds) = {
240+ func getPrices (a,assetId) = {
241+ let assetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
242+ if ($isInstanceOf(@, "(Int, Int)"))
243+ then @
244+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
245+ (a :+ assetPrice)
246+ }
247+
248+ let $l = assetIds
249+ let $s = size($l)
250+ let $acc0 = nil
251+ func $f0_1 ($a,$i) = if (($i >= $s))
252+ then $a
253+ else getPrices($a, $l[$i])
254+
255+ func $f0_2 ($a,$i) = if (($i >= $s))
256+ then $a
257+ else throw("List size exceeds 100")
258+
259+ $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)
260+ }
261+
262+
263+func getSharePrice (shareIds) = {
264+ func getPrices (a,shareId) = {
265+ let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
266+ let poolAddr = Address(fromBase58String(pool))
267+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
268+ let $t077377802 = getPoolData(poolAddr, pType)
269+ let aId = $t077377802._1
270+ let bId = $t077377802._2
271+ let aBalance = $t077377802._3
272+ let bBalance = $t077377802._4
273+ let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
274+ if ($isInstanceOf(@, "(Int, Int)"))
275+ then @
276+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
277+ let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
278+ if ($isInstanceOf(@, "(Int, Int)"))
279+ then @
280+ else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
281+ let shareSupply = getShareSupply(poolAddr, pType, shareId)
282+ let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN)
283+ let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN)
284+ let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN)
285+ let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision))
286+ let sharePrice = fraction(sum, sharePrecision, shareSupply)
287+ (a :+ sharePrice)
288+ }
289+
290+ let $l = shareIds
291+ let $s = size($l)
292+ let $acc0 = nil
293+ func $f0_1 ($a,$i) = if (($i >= $s))
294+ then $a
295+ else getPrices($a, $l[$i])
296+
297+ func $f0_2 ($a,$i) = if (($i >= $s))
298+ then $a
299+ else throw("List size exceeds 50")
300+
301+ $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)
302+ }
303+
304+
305+func getCursEntries (aId,bId,shareId) = {
306+ let assetsPrices = getAssetsPrice([aId, bId])
307+ let sharePrice = getSharePrice([shareId])
308+[IntegerEntry((aId + kTokenLastPrice), assetsPrices[0]), IntegerEntry((bId + kTokenLastPrice), assetsPrices[1]), IntegerEntry((shareId + kTokenLastPrice), sharePrice[0])]
309+ }
310+
311+
226312 func replenishSwopFi (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId) = {
227313 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
228314 if ((shareBalanceBefore == shareBalanceBefore))
229315 then {
230316 let poolAddr = Address(fromBase58String(pool))
231317 let ratioA = fraction(SCALE8, pmtA, balA)
232318 let ratioB = fraction(SCALE8, pmtB, balB)
233- let $t071357427 = if ((ratioB > ratioA))
319+ let $t093079599 = if ((ratioB > ratioA))
234320 then {
235321 let pmt = fraction(balB, ratioA, SCALE8, CEILING)
236322 $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
237323 }
238324 else {
239325 let pmt = fraction(balA, ratioB, SCALE8, CEILING)
240326 $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
241327 }
242- let pmtAmountA = $t071357427._1
243- let pmtAmountB = $t071357427._2
244- let change = $t071357427._3
245- let changeAssetId = $t071357427._4
328+ let pmtAmountA = $t093079599._1
329+ let pmtAmountB = $t093079599._2
330+ let change = $t093079599._3
331+ let changeAssetId = $t093079599._4
246332 let inv1 = if (if ((pmtAmountA > 0))
247333 then (pmtAmountB > 0)
248334 else false)
249335 then {
250336 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
251337 invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
252338 }
253339 else 0
254340 if ((inv1 == inv1))
255341 then {
256342 let inv2 = if ((change > 0))
257343 then {
258344 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
259345 let vars = ["0", "false", "0"]
260346 invoke(poolAddr, "callFunction", ["replenishWithOneToken", vars], payments)
261347 }
262348 else 0
263349 if ((inv2 == inv2))
264350 then {
265351 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
266352 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
267- let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
353+ let axlyFeeAmount = if ((feeType == CAP_FEE))
354+ then fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
355+ else fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
268356 let userShareForStake = (totalStaked - axlyFeeAmount)
269357 if ((0 >= userShareForStake))
270358 then throw("amount of staked sharetokens must be > 0")
271359 else {
272360 let inv3 = invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], [AttachedPayment(fromBase58String(shareId), userShareForStake)])
273361 if ((inv3 == inv3))
274362 then $Tuple2(userShareForStake, axlyFeeAmount)
275363 else throw("Strict value is not equal to itself.")
276364 }
277365 }
278366 else throw("Strict value is not equal to itself.")
279367 }
280368 else throw("Strict value is not equal to itself.")
281369 }
282370 else throw("Strict value is not equal to itself.")
283371 }
284372
285373
286374 func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = {
287375 let poolAddr = Address(fromBase58String(pool))
288- let $t088789727 = if (if ((pmtA > 0))
376+ let $t01116412013 = if (if ((pmtA > 0))
289377 then (pmtB > 0)
290378 else false)
291379 then {
292380 let evalPutInA = split({
293381 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
294382 if ($isInstanceOf(@, "String"))
295383 then @
296384 else throw(($getType(@) + " couldn't be cast to String"))
297385 }, "__")
298386 if ((evalPutInA == evalPutInA))
299387 then {
300388 let evalPutInB = split({
301389 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
302390 if ($isInstanceOf(@, "String"))
303391 then @
304392 else throw(($getType(@) + " couldn't be cast to String"))
305393 }, "__")
306394 if ((evalPutInB == evalPutInB))
307395 then {
308396 let lpInA = parseIntValue(evalPutInA[1])
309397 let lpInB = parseIntValue(evalPutInB[1])
310398 if ((lpInB > lpInA))
311399 then {
312400 let pmtInB = parseIntValue(evalPutInA[8])
313401 $Tuple4(pmtA, pmtInB, (pmtB - pmtInB), pmtAssetB)
314402 }
315403 else {
316404 let pmtInA = parseIntValue(evalPutInB[7])
317405 $Tuple4(pmtInA, pmtB, (pmtA - pmtInA), pmtAssetA)
318406 }
319407 }
320408 else throw("Strict value is not equal to itself.")
321409 }
322410 else throw("Strict value is not equal to itself.")
323411 }
324412 else if ((pmtA > 0))
325413 then $Tuple4(pmtA, pmtB, pmtA, pmtAssetA)
326414 else if ((pmtB > 0))
327415 then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB)
328416 else throw("pmts must be > 0")
329- let pmtAmountA = $t088789727._1
330- let pmtAmountB = $t088789727._2
331- let change = $t088789727._3
332- let changeAssetId = $t088789727._4
417+ let pmtAmountA = $t01116412013._1
418+ let pmtAmountB = $t01116412013._2
419+ let change = $t01116412013._3
420+ let changeAssetId = $t01116412013._4
333421 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
334422 if ((shareBalanceBefore == shareBalanceBefore))
335423 then {
336424 let inv1 = if (if ((pmtAmountA > 0))
337425 then (pmtAmountB > 0)
338426 else false)
339427 then {
340428 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
341429 invoke(poolAddr, "put", [1000000, false], payments)
342430 }
343431 else 0
344432 if ((inv1 == inv1))
345433 then {
346434 let inv2 = if ((change > 0))
347435 then {
348436 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
349437 invoke(poolAddr, "putOneTkn", [0, false], payments)
350438 }
351439 else 0
352440 if ((inv2 == inv2))
353441 then {
354442 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
355443 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
356444 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
357445 let userShareForStake = (totalStaked - axlyFeeAmount)
358446 if ((0 >= userShareForStake))
359447 then throw("amount of staked sharetokens must be > 0")
360448 else {
361449 let inv3 = invoke(getWXFarmingAddr(poolAddr), "stake", nil, [AttachedPayment(fromBase58String(shareId), userShareForStake)])
362450 if ((inv3 == inv3))
363451 then $Tuple2(userShareForStake, axlyFeeAmount)
364452 else throw("Strict value is not equal to itself.")
365453 }
366454 }
367455 else throw("Strict value is not equal to itself.")
368456 }
369457 else throw("Strict value is not equal to itself.")
370458 }
371459 else throw("Strict value is not equal to itself.")
372460 }
373461
374462
375463 func replenishByType (type,pool,feeType,pmtA,AId,pmtB,BId,balA,balB,shareId) = if ((type == SF_POOL))
376- then replenishSwopFi(pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
464+ then replenishSwopFi(pool, feeType, pmtA, AId, pmtB, BId, balA, balB, shareId)
377465 else if ((type == WX_POOL))
378- then replenishWX(pool, LOAN_FEE, pmtA, AId, pmtB, BId, shareId)
466+ then replenishWX(pool, feeType, pmtA, AId, pmtB, BId, shareId)
379467 else throw("Wrong pool type")
380468
381469
382470 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type) = {
383471 let totalAmount = getPoolTotalShare(pool)
384472 let totalAmountLoan = getPoolTotalShareWithLoan(pool)
385473 let curPoolInterest = getIntegerValue(this, (pool + kPoolInterest))
386474 [IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), (totalAmountLoan + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
387475 }
388476
389477
390478 func claimFarmed (type,pool) = if ((type == SF_POOL))
391479 then {
392480 let balBefore = accountBalance(SWOPID)
393481 if ((balBefore == balBefore))
394482 then {
395483 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
396484 if ((inv == inv))
397485 then {
398486 let balAfter = accountBalance(SWOPID)
399487 $Tuple2((balAfter - balBefore), SWOPID)
400488 }
401489 else throw("Strict value is not equal to itself.")
402490 }
403491 else throw("Strict value is not equal to itself.")
404492 }
405493 else if ((type == WX_POOL))
406494 then {
407495 let balBefore = accountBalance(WXID)
408496 if ((balBefore == balBefore))
409497 then {
410498 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
411499 if ((inv == inv))
412500 then {
413501 let balAfter = accountBalance(WXID)
414502 $Tuple2((balAfter - balBefore), WXID)
415503 }
416504 else throw("Strict value is not equal to itself.")
417505 }
418506 else throw("Strict value is not equal to itself.")
419507 }
420508 else throw("Wrong pool type")
421509
422510
423511 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
424512 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
425513 if ((tokenBalanceBefore == tokenBalanceBefore))
426514 then {
427515 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
428516 if ((inv == inv))
429517 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
430518 else throw("Strict value is not equal to itself.")
431519 }
432520 else throw("Strict value is not equal to itself.")
433521 }
434522
435523
436524 func exchangePazzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
437525 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
438526 if ((tokenBalanceBefore == tokenBalanceBefore))
439527 then {
440528 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
441529 if ((inv == inv))
442530 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
443531 else throw("Strict value is not equal to itself.")
444532 }
445533 else throw("Strict value is not equal to itself.")
446534 }
447535
448536
449537 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
450538 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
451539 if ((tokenBalanceBefore == tokenBalanceBefore))
452540 then {
453541 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
454542 if ((inv == inv))
455543 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
456544 else throw("Strict value is not equal to itself.")
457545 }
458546 else throw("Strict value is not equal to itself.")
459547 }
460548
461549
462550 func capitalize (pool,pType,tokenId,tokenAmount) = {
463551 let poolAddr = Address(fromBase58String(pool))
464- let $t01469114770 = getPoolData(poolAddr, pType)
465- let AId = $t01469114770._1
466- let BId = $t01469114770._2
467- let balA = $t01469114770._3
468- let balB = $t01469114770._4
469- let shareId = $t01469114770._5
470- let $t01477314853 = if ((tokenId == AId))
552+ let $t01697517054 = getPoolData(poolAddr, pType)
553+ let AId = $t01697517054._1
554+ let BId = $t01697517054._2
555+ let balA = $t01697517054._3
556+ let balB = $t01697517054._4
557+ let shareId = $t01697517054._5
558+ let $t01705717137 = if ((tokenId == AId))
471559 then $Tuple2(tokenAmount, 0)
472560 else $Tuple2(0, tokenAmount)
473- let pmtA = $t01477314853._1
474- let pmtB = $t01477314853._2
475- let $t01485614971 = replenishByType(pType, pool, CAP_FEE_LOAN, pmtA, AId, pmtB, BId, balA, balB, shareId)
476- let stakedAmount = $t01485614971._1
477- let axlyFee = $t01485614971._2
561+ let pmtA = $t01705717137._1
562+ let pmtB = $t01705717137._2
563+ let $t01714017250 = replenishByType(pType, pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
564+ let stakedAmount = $t01714017250._1
565+ let axlyFee = $t01714017250._2
478566 let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
479567 let totalShareAmount = getPoolTotalShare(pool)
480568 let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount))
481-[IntegerEntry((pool + kPoolInterest), newInterest), ScriptTransfer(moneyBox, axlyFee, fromBase58String(shareId))]
569+ ([IntegerEntry((pool + kPoolInterest), newInterest), ScriptTransfer(moneyBox, axlyFee, fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId))
482570 }
483571
484572
485573 func exchangeDirectlySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
486574 let poolAddr = Address(fromBase58String(pool))
487575 let feeScale6 = 1000000
488576 let fee = getIntegerValue(poolAddr, kSFPoolFee)
489577 let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
490- let $t01566415952 = if ((assetTokenToGet == assetIdA))
578+ let $t01798018268 = if ((assetTokenToGet == assetIdA))
491579 then {
492580 let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
493581 $Tuple2(amountToPay, assetIdB)
494582 }
495583 else {
496584 let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
497585 $Tuple2(amountToPay, assetIdA)
498586 }
499- let amountToPay = $t01566415952._1
500- let assetToPay = $t01566415952._2
587+ let amountToPay = $t01798018268._1
588+ let assetToPay = $t01798018268._2
501589 invoke(poolAddr, "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
502590 }
503591
504592
505593 func exchangeDirectlyWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
506594 let poolAddr = Address(fromBase58String(pool))
507595 let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
508596 let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
509597 let feeScale = toBigInt(100000000)
510- let $t01643116739 = if ((assetTokenToGet == assetIdA))
598+ let $t01874719055 = if ((assetTokenToGet == assetIdA))
511599 then {
512600 let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
513601 $Tuple2(amountToPay, assetIdB)
514602 }
515603 else {
516604 let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
517605 $Tuple2(amountToPay, assetIdA)
518606 }
519- let amountToPay = $t01643116739._1
520- let assetToPay = $t01643116739._2
607+ let amountToPay = $t01874719055._1
608+ let assetToPay = $t01874719055._2
521609 let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
522610 invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)])
523611 }
524612
525613
526614 func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
527615 then exchangeDirectlySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
528616 else exchangeDirectlyWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
529617
530618
531619 func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = {
532620 let poolAddr = Address(fromBase58String(pool))
533621 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
534- let $t01760417671 = getPoolData(poolAddr, pType)
535- let assetIdA = $t01760417671._1
536- let assetIdB = $t01760417671._2
537- let balA = $t01760417671._3
538- let balB = $t01760417671._4
622+ let $t01992019996 = getPoolData(poolAddr, pType)
623+ let assetIdA = $t01992019996._1
624+ let assetIdB = $t01992019996._2
625+ let balA = $t01992019996._3
626+ let balB = $t01992019996._4
627+ let shareId = $t01992019996._5
539628 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
540629 if ((cBalABefore == cBalABefore))
541630 then {
542631 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
543632 if ((cBalBBefore == cBalBBefore))
544633 then {
545634 let inv = if ((pType == SF_POOL))
546635 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
547636 else if ((pType == WX_POOL))
548637 then invoke(poolAddr, "unstakeAndGet", [userCanWithdraw], nil)
549638 else throw("Wrong position type")
550639 if ((inv == inv))
551640 then {
552641 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
553642 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
554- let $t01818318272 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
555- let tokensAmountA = $t01818318272._1
556- let tokensAmountB = $t01818318272._2
557- let $t01827518971 = if ((debt > 0))
643+ let $t02050820597 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
644+ let tokensAmountA = $t02050820597._1
645+ let tokensAmountB = $t02050820597._2
646+ let $t02060021296 = if ((debt > 0))
558647 then {
559648 let amountToGetEx = if (if ((borrowAsset == assetIdA))
560649 then (debt > tokensAmountA)
561650 else false)
562651 then (debt - tokensAmountA)
563652 else if (if ((borrowAsset == assetIdB))
564653 then (debt > tokensAmountB)
565654 else false)
566655 then (debt - tokensAmountB)
567656 else 0
568657 let exInv = if ((amountToGetEx > 0))
569658 then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset)
570659 else 0
571660 if ((exInv == exInv))
572661 then {
573662 let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
574663 let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
575664 $Tuple2((cBalAAfterRepay - cBalABefore), (cBalBAfterRepay - cBalBBefore))
576665 }
577666 else throw("Strict value is not equal to itself.")
578667 }
579668 else $Tuple2(tokensAmountA, tokensAmountB)
580- let toUserAmountA = $t01827518971._1
581- let toUserAmountB = $t01827518971._2
582- $Tuple6(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter)
669+ let toUserAmountA = $t02060021296._1
670+ let toUserAmountB = $t02060021296._2
671+ $Tuple7(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter, shareId)
583672 }
584673 else throw("Strict value is not equal to itself.")
585674 }
586675 else throw("Strict value is not equal to itself.")
587676 }
588677 else throw("Strict value is not equal to itself.")
589678 }
590679
591680
592681 func parseRequest (requestId) = {
593682 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
594683 let user = request[0]
595684 let pool = request[1]
596685 let pmtA = parseIntValue(request[2])
597686 let AId = request[3]
598687 let pmtB = parseIntValue(request[4])
599688 let BId = request[5]
600689 let balA = parseIntValue(request[6])
601690 let balB = parseIntValue(request[7])
602691 let shareId = request[8]
603692 let bwAsset = request[9]
604693 let bwAmount = parseIntValue(request[10])
605694 $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount)
606695 }
607696
608697
609698 @Callable(i)
610-func getAssetPrice (assetId) = $Tuple2(nil, (let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil)
611-if ($isInstanceOf(@, "(Int, Int)"))
612- then @
613- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2)
614-
615-
616-
617-@Callable(i)
618-func getSharePrice (shareId) = {
619- let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id")
620- let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
621- let $t02006620136 = getPoolData(Address(fromBase58String(pool)), pType)
622- let aId = $t02006620136._1
623- let bId = $t02006620136._2
624- let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil)
625- if ($isInstanceOf(@, "(Int, Int)"))
626- then @
627- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
628- let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil)
629- if ($isInstanceOf(@, "(Int, Int)"))
630- then @
631- else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
632- $Tuple2(nil, (dPriceA + dPriceB))
633- }
634-
635-
636-
637-@Callable(i)
638699 func replenishEVALONLY (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
639700 then true
640701 else (leverage > 300))
641702 then throw("Leverage can't be <100 and >300")
642703 else {
643704 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
644- let $t02062120711 = getPoolData(Address(fromBase58String(pool)), pType)
645- let AId = $t02062120711._1
646- let BId = $t02062120711._2
647- let balA = $t02062120711._3
648- let balB = $t02062120711._4
649- let shareId = $t02062120711._5
650- let $t02071421351 = if ((size(i.payments) == 2))
705+ let $t02228422374 = getPoolData(Address(fromBase58String(pool)), pType)
706+ let AId = $t02228422374._1
707+ let BId = $t02228422374._2
708+ let balA = $t02228422374._3
709+ let balB = $t02228422374._4
710+ let shareId = $t02228422374._5
711+ let $t02237723014 = if ((size(i.payments) == 2))
651712 then if ((assetIdToStr(i.payments[0].assetId) != AId))
652713 then throw("Wrong payment asset A")
653714 else if ((assetIdToStr(i.payments[1].assetId) != BId))
654715 then throw("Wrong payment asset B")
655716 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
656717 else if ((size(i.payments) == 1))
657718 then if ((assetIdToStr(i.payments[0].assetId) == AId))
658719 then $Tuple4(i.payments[0].amount, AId, 0, BId)
659720 else if ((assetIdToStr(i.payments[0].assetId) == BId))
660721 then $Tuple4(0, AId, i.payments[0].amount, BId)
661722 else throw("Wrong payment")
662723 else throw("One or two payments expected")
663- let pmtA = $t02071421351._1
664- let pmtAssetA = $t02071421351._2
665- let pmtB = $t02071421351._3
666- let pmtAssetB = $t02071421351._4
667- let $t02135422805 = if ((leverage > 100))
724+ let pmtA = $t02237723014._1
725+ let pmtAssetA = $t02237723014._2
726+ let pmtB = $t02237723014._3
727+ let pmtAssetB = $t02237723014._4
728+ let $t02301724468 = if ((leverage > 100))
668729 then {
669730 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
670731 if ($isInstanceOf(@, "(Int, Int)"))
671732 then @
672733 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
673734 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
674735 if ($isInstanceOf(@, "(Int, Int)"))
675736 then @
676737 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
677738 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
678739 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
679740 let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(1)], ",")
680741 let newRequestId = {
681742 let @ = invoke(this, "createNewRequest", [request], nil)
682743 if ($isInstanceOf(@, "Int"))
683744 then @
684745 else throw(($getType(@) + " couldn't be cast to Int"))
685746 }
686747 if ((newRequestId == newRequestId))
687748 then {
688749 let args = [((toString(i.caller) + "_") + toString(1)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLandEVALONLY", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
689750 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
690751 if ((inv == inv))
691752 then $Tuple2(getIntegerValue(this, "EVALONLY_STAKEDAMOUNT"), borrowAmount)
692753 else throw("Strict value is not equal to itself.")
693754 }
694755 else throw("Strict value is not equal to itself.")
695756 }
696757 else $Tuple2(replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)._1, 0)
697- let userStaked = $t02135422805._1
698- let borrowAmount = $t02135422805._2
699- let $t02280922976 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
700- if (($t02280922976 == $t02280922976))
758+ let userStaked = $t02301724468._1
759+ let borrowAmount = $t02301724468._2
760+ let $t02447224639 = withdrawAmountCalc(pool, userStaked, borrowAmount, borrowAssetId)
761+ if (($t02447224639 == $t02447224639))
701762 then {
702- let userGetBBeforeRepay = $t02280922976._6
703- let userGetABeforeRepay = $t02280922976._5
704- let assetIdB = $t02280922976._4
705- let toUserAmountB = $t02280922976._3
706- let assetIdA = $t02280922976._2
707- let toUserAmountA = $t02280922976._1
708- let $t02297923094 = getPoolData(Address(fromBase58String(pool)), pType)
709- let AIdAfter = $t02297923094._1
710- let BIdAfter = $t02297923094._2
711- let balAAfter = $t02297923094._3
712- let balBAfter = $t02297923094._4
713- let shareIdAfter = $t02297923094._5
763+ let userGetBBeforeRepay = $t02447224639._6
764+ let userGetABeforeRepay = $t02447224639._5
765+ let assetIdB = $t02447224639._4
766+ let toUserAmountB = $t02447224639._3
767+ let assetIdA = $t02447224639._2
768+ let toUserAmountA = $t02447224639._1
769+ let $t02464224757 = getPoolData(Address(fromBase58String(pool)), pType)
770+ let AIdAfter = $t02464224757._1
771+ let BIdAfter = $t02464224757._2
772+ let balAAfter = $t02464224757._3
773+ let balBAfter = $t02464224757._4
774+ let shareIdAfter = $t02464224757._5
714775 let ratioBefore = fraction(balB, SCALE8, balA)
715776 let ratioAfter = fraction(balBAfter, SCALE8, balAAfter)
716777 let impact = (SCALE8 - fraction(ratioBefore, SCALE8, ratioAfter))
717778 let imcatMod = if ((0 > impact))
718779 then (impact * -1)
719780 else impact
720781 $Tuple2(nil, [userGetABeforeRepay, userGetBBeforeRepay, imcatMod])
721782 }
722783 else throw("Strict value is not equal to itself.")
723784 }
724785
725786
726787
727788 @Callable(i)
728789 func replenishFromLandEVALONLY (requestId) = {
729- let $t02346423568 = parseRequest(requestId)
730- let user = $t02346423568._1
731- let pool = $t02346423568._2
732- let pmtA = $t02346423568._3
733- let AId = $t02346423568._4
734- let pmtB = $t02346423568._5
735- let BId = $t02346423568._6
736- let balA = $t02346423568._7
737- let balB = $t02346423568._8
738- let shareId = $t02346423568._9
739- let bwAsset = $t02346423568._10
740- let bwAmount = $t02346423568._11
790+ let $t02512725231 = parseRequest(requestId)
791+ let user = $t02512725231._1
792+ let pool = $t02512725231._2
793+ let pmtA = $t02512725231._3
794+ let AId = $t02512725231._4
795+ let pmtB = $t02512725231._5
796+ let BId = $t02512725231._6
797+ let balA = $t02512725231._7
798+ let balB = $t02512725231._8
799+ let shareId = $t02512725231._9
800+ let bwAsset = $t02512725231._10
801+ let bwAmount = $t02512725231._11
741802 if ((size(i.payments) != 1))
742803 then throw("Wrong payment size")
743804 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
744805 then true
745806 else (i.payments[0].amount != bwAmount))
746807 then throw("Wrong payment")
747808 else {
748- let $t02375823882 = if ((AId == bwAsset))
809+ let $t02542125545 = if ((AId == bwAsset))
749810 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
750811 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
751- let pmtAllA = $t02375823882._1
752- let pmtAllB = $t02375823882._2
812+ let pmtAllA = $t02542125545._1
813+ let pmtAllB = $t02542125545._2
753814 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
754- let $t02396424073 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
755- let userStaked = $t02396424073._1
756- let axlyFee = $t02396424073._2
815+ let $t02562725736 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
816+ let userStaked = $t02562725736._1
817+ let axlyFee = $t02562725736._2
757818 $Tuple2([IntegerEntry("EVALONLY_STAKEDAMOUNT", userStaked)], userStaked)
758819 }
759820 }
760821
761822
762823
763824 @Callable(i)
764825 func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
765826 then true
766827 else (leverage > 300))
767828 then throw("Leverage can't be <100 and >300")
768829 else {
769830 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
770- let $t02445024540 = getPoolData(Address(fromBase58String(pool)), pType)
771- let AId = $t02445024540._1
772- let BId = $t02445024540._2
773- let balA = $t02445024540._3
774- let balB = $t02445024540._4
775- let shareId = $t02445024540._5
776- let $t02454325180 = if ((size(i.payments) == 2))
831+ let $t02611326203 = getPoolData(Address(fromBase58String(pool)), pType)
832+ let AId = $t02611326203._1
833+ let BId = $t02611326203._2
834+ let balA = $t02611326203._3
835+ let balB = $t02611326203._4
836+ let shareId = $t02611326203._5
837+ let $t02620626843 = if ((size(i.payments) == 2))
777838 then if ((assetIdToStr(i.payments[0].assetId) != AId))
778839 then throw("Wrong payment asset A")
779840 else if ((assetIdToStr(i.payments[1].assetId) != BId))
780841 then throw("Wrong payment asset B")
781842 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
782843 else if ((size(i.payments) == 1))
783844 then if ((assetIdToStr(i.payments[0].assetId) == AId))
784845 then $Tuple4(i.payments[0].amount, AId, 0, BId)
785846 else if ((assetIdToStr(i.payments[0].assetId) == BId))
786847 then $Tuple4(0, AId, i.payments[0].amount, BId)
787848 else throw("Wrong payment")
788849 else throw("One or two payments expected")
789- let pmtA = $t02454325180._1
790- let pmtAssetA = $t02454325180._2
791- let pmtB = $t02454325180._3
792- let pmtAssetB = $t02454325180._4
850+ let pmtA = $t02620626843._1
851+ let pmtAssetA = $t02620626843._2
852+ let pmtB = $t02620626843._3
853+ let pmtAssetB = $t02620626843._4
793854 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
794855 if ((leverage > 100))
795856 then {
796857 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
797858 if ($isInstanceOf(@, "(Int, Int)"))
798859 then @
799860 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
800861 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
801862 if ($isInstanceOf(@, "(Int, Int)"))
802863 then @
803864 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2
804865 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
805866 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
806867 let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",")
807868 let newRequestId = {
808869 let @ = invoke(this, "createNewRequest", [request], nil)
809870 if ($isInstanceOf(@, "Int"))
810871 then @
811872 else throw(($getType(@) + " couldn't be cast to Int"))
812873 }
813874 if ((newRequestId == newRequestId))
814875 then {
815876 let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
816877 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
817878 if ((inv == inv))
818879 then nil
819880 else throw("Strict value is not equal to itself.")
820881 }
821882 else throw("Strict value is not equal to itself.")
822883 }
823884 else {
824- let $t02647726589 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
825- let userStaked = $t02647726589._1
826- let axlyFee = $t02647726589._2
827- replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType)
885+ let $t02814028252 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
886+ let userStaked = $t02814028252._1
887+ let axlyFee = $t02814028252._2
888+ (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType) ++ getCursEntries(AId, BId, shareId))
828889 }
829890 }
830891
831892
832893
833894 @Callable(i)
834895 func replenishFromLand (requestId) = {
835- let $t02675126855 = parseRequest(requestId)
836- let user = $t02675126855._1
837- let pool = $t02675126855._2
838- let pmtA = $t02675126855._3
839- let AId = $t02675126855._4
840- let pmtB = $t02675126855._5
841- let BId = $t02675126855._6
842- let balA = $t02675126855._7
843- let balB = $t02675126855._8
844- let shareId = $t02675126855._9
845- let bwAsset = $t02675126855._10
846- let bwAmount = $t02675126855._11
896+ let $t02845628560 = parseRequest(requestId)
897+ let user = $t02845628560._1
898+ let pool = $t02845628560._2
899+ let pmtA = $t02845628560._3
900+ let AId = $t02845628560._4
901+ let pmtB = $t02845628560._5
902+ let BId = $t02845628560._6
903+ let balA = $t02845628560._7
904+ let balB = $t02845628560._8
905+ let shareId = $t02845628560._9
906+ let bwAsset = $t02845628560._10
907+ let bwAmount = $t02845628560._11
847908 if ((size(i.payments) != 1))
848909 then throw("Wrong payment size")
849910 else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset))
850911 then true
851912 else (i.payments[0].amount != bwAmount))
852913 then throw("Wrong payment")
853914 else {
854- let $t02704527169 = if ((AId == bwAsset))
915+ let $t02875028874 = if ((AId == bwAsset))
855916 then $Tuple2((pmtA + i.payments[0].amount), pmtB)
856917 else $Tuple2(pmtA, (pmtB + i.payments[0].amount))
857- let pmtAllA = $t02704527169._1
858- let pmtAllB = $t02704527169._2
918+ let pmtAllA = $t02875028874._1
919+ let pmtAllB = $t02875028874._2
859920 let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
860- let $t02725127360 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
861- let userStaked = $t02725127360._1
862- let axlyFee = $t02725127360._2
921+ let $t02895629065 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
922+ let userStaked = $t02895629065._1
923+ let axlyFee = $t02895629065._2
863924 let posNum = getNewUserPositionNumber(pool, toString(i.caller))
864925 let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)]
865926 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType)
866- $Tuple2(((entries ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
927+ $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
867928 }
868929 }
869930
870931
871932
872933 @Callable(i)
873934 func withdraw (pool,posId) = {
874935 let user = toString(i.caller)
875936 let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), "Unknown position")
876937 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest))
877938 let poolInterst = getIntegerValue(this, (pool + kPoolInterest))
878939 let poolTotalShare = getPoolTotalShare(pool)
879940 let userCanWithdraw = (pAmount + fraction(pAmount, (poolInterst - userInterest), SCALE10))
880941 let userAddr = Address(fromBase58String(user))
881942 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAmount))
882943 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAssetId))
883944 let debt = if ((borrowAmount > 0))
884945 then {
885946 let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((((pool + "_") + user) + "_") + toString(posId)), borrowAsset], nil)
886947 if ($isInstanceOf(@, "Int"))
887948 then @
888949 else throw(($getType(@) + " couldn't be cast to Int"))
889950 }
890951 else 0
891- let $t02880228922 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
892- if (($t02880228922 == $t02880228922))
952+ let $t03054430697 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset)
953+ if (($t03054430697 == $t03054430697))
893954 then {
894- let assetIdB = $t02880228922._4
895- let toUserAmountB = $t02880228922._3
896- let assetIdA = $t02880228922._2
897- let toUserAmountA = $t02880228922._1
955+ let shareId = $t03054430697._7
956+ let cBalBAfter = $t03054430697._6
957+ let cBalAAfter = $t03054430697._5
958+ let assetIdB = $t03054430697._4
959+ let toUserAmountB = $t03054430697._3
960+ let assetIdA = $t03054430697._2
961+ let toUserAmountA = $t03054430697._1
898962 let closeDbtInv = if ((debt > 0))
899963 then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + toString(posId))], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
900964 else 0
901965 if ((closeDbtInv == closeDbtInv))
902- then [DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))]
966+ then ([DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId))
903967 else throw("Strict value is not equal to itself.")
904968 }
905969 else throw("Strict value is not equal to itself.")
906970 }
907971
908972
909973
910974 @Callable(i)
911975 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
912976 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
913977 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
914978 })
915979
916980
917981
918982 @Callable(i)
919983 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
920- let $t03021930413 = if (claim)
984+ let $t03204132235 = if (claim)
921985 then claimFarmed(type, pool)
922986 else {
923987 let claimedAsset = if ((type == SF_POOL))
924988 then SWOPID
925989 else WXID
926990 $Tuple2(amountToExchange, claimedAsset)
927991 }
928- let claimedAmount = $t03021930413._1
929- let claimedAsset = $t03021930413._2
992+ let claimedAmount = $t03204132235._1
993+ let claimedAsset = $t03204132235._2
930994 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
931995 let change = (claimedAmount - amountToExchange)
932996 let changeEntry = if ((change > 0))
933997 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
934998 else nil
935999 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
9361000 }
9371001
9381002
9391003
9401004 @Callable(i)
9411005 func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
942- let $t03106931263 = if (claim)
1006+ let $t03289233086 = if (claim)
9431007 then claimFarmed(type, pool)
9441008 else {
9451009 let claimedAsset = if ((type == SF_POOL))
9461010 then SWOPID
9471011 else WXID
9481012 $Tuple2(amountToExchange, claimedAsset)
9491013 }
950- let claimedAmount = $t03106931263._1
951- let claimedAsset = $t03106931263._2
1014+ let claimedAmount = $t03289233086._1
1015+ let claimedAsset = $t03289233086._2
9521016 let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
9531017 let change = (claimedAmount - amountToExchange)
9541018 let changeEntry = if ((change > 0))
9551019 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
9561020 else nil
9571021 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
9581022 }
9591023
9601024
9611025
9621026 @Callable(i)
9631027 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
964- let $t03198632180 = if (claim)
1028+ let $t03380934003 = if (claim)
9651029 then claimFarmed(type, pool)
9661030 else {
9671031 let claimedAsset = if ((type == SF_POOL))
9681032 then SWOPID
9691033 else WXID
9701034 $Tuple2(amountToExchange, claimedAsset)
9711035 }
972- let claimedAmount = $t03198632180._1
973- let claimedAsset = $t03198632180._2
1036+ let claimedAmount = $t03380934003._1
1037+ let claimedAsset = $t03380934003._2
9741038 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
9751039 let change = (claimedAmount - amountToExchange)
9761040 let changeEntry = if ((change > 0))
9771041 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
9781042 else nil
9791043 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
9801044 }
9811045
9821046
9831047
9841048 @Callable(i)
9851049 func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan) = if (if ((type != SF_POOL))
9861050 then (type != WX_POOL)
9871051 else false)
9881052 then throw("Wrong type")
9891053 else {
990- let $t03282532919 = getPoolData(Address(fromBase58String(poolAddr)), type)
991- let aId = $t03282532919._1
992- let bId = $t03282532919._2
993- let aBal = $t03282532919._3
994- let bBal = $t03282532919._4
995- let shareId = $t03282532919._5
1054+ let $t03464834742 = getPoolData(Address(fromBase58String(poolAddr)), type)
1055+ let aId = $t03464834742._1
1056+ let bId = $t03464834742._2
1057+ let aBal = $t03464834742._3
1058+ let bBal = $t03464834742._4
1059+ let shareId = $t03464834742._5
9961060 [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr)]
9971061 }
9981062
9991063
10001064 @Verifier(tx)
10011065 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
10021066

github/deemru/w8io/026f985 
164.79 ms