tx · E4JbTH1etik8Tm6bawmhHKCoR52xS4vkaSTGmzFBSynb

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.22000000 Waves

2023.04.13 17:52 [2532925] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "E4JbTH1etik8Tm6bawmhHKCoR52xS4vkaSTGmzFBSynb", "fee": 22000000, "feeAssetId": null, "timestamp": 1681397519655, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "x3nBtjAKSEfMaAjFQjV1JeCdyFY6yDuYegu8fLu6AbAFkyryFWcczjnN7AC2z66uk2EbPXdARM6AvmZGM59Wrr7" ], "script": "base64:BgJOCAISBQoDCAEIEgMKAQgSBAoCCAESAwoBCBIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEgcKBQgIAQEBQQAHU0ZfUE9PTAICU0YAB1dYX1BPT0wCAldYAAdDQVBfRkVFAgNjYXAACExPQU5fRkVFAgRsb2FuAAtOT19MT0FOX0ZFRQIGbm9Mb2FuAAZTQ0FMRTgAgMLXLwAHU0NBTEUxMACAyK+gJQAKRkVFX1NDQUxFNgDAhD0AFGtTRlBvb2xBQXNzZXRCYWxhbmNlAg9BX2Fzc2V0X2JhbGFuY2UAFGtTRlBvb2xCQXNzZXRCYWxhbmNlAg9CX2Fzc2V0X2JhbGFuY2UAD2tTRlBvb2xBQXNzZXRJZAIKQV9hc3NldF9pZAAPa1NGUG9vbEJBc3NldElkAgpCX2Fzc2V0X2lkAA5rU0ZQb29sU2hhcmVJZAIOc2hhcmVfYXNzZXRfaWQACmtTRlBvb2xGZWUCCmNvbW1pc3Npb24ADWtVc2VyUG9zaXRpb24CDl91c2VyX3Bvc2l0aW9uABFrVXNlckJvc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M5qJEQbwNfWm9FzAkkd3nFTk Next: GYdffmNVVoYBErKVNcB3yS4uoSchwfGouQ9cwuaPd5QD Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let SF_POS_TYPE = "SF"
4+let SF_POOL = "SF"
55
6-let WX_POS_TYPE = "WX"
6+let WX_POOL = "WX"
77
88 let CAP_FEE = "cap"
99
2727
2828 let kSFPoolShareId = "share_asset_id"
2929
30+let kSFPoolFee = "commission"
31+
3032 let kUserPosition = "_user_position"
3133
3234 let kUserBorrowAmount = "_user_position_borrow_amount"
3335
3436 let kUserBorrowAssetId = "_user_position_borrow_asset_id"
35-
36-let kUserPositionType = "_user_position_type"
3737
3838 let kUserPositionNum = "_user_position_number"
3939
6565
6666 let kPriceOracle = "price_oracle"
6767
68-let kExContract = "exchangeContract"
68+let kExContract = "exchange_contract"
69+
70+let kWxSwapContract = "wx_swap_contract"
6971
7072 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
7173
7274 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
7375
7476 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
77+
78+let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
7579
7680 let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
7781
123127 }
124128
125129
126-func getPoolData (poolAddr,type) = if ((type == SF_POS_TYPE))
130+func getPoolData (poolAddr,type) = if ((type == SF_POOL))
127131 then getSFPoolData(poolAddr)
128- else if ((type == WX_POS_TYPE))
132+ else if ((type == WX_POOL))
129133 then getWXPoolData(poolAddr)
130134 else throw("Wrong pool type")
131135
190194 let poolAddr = Address(fromBase58String(pool))
191195 let ratioA = fraction(SCALE8, pmtA, balA)
192196 let ratioB = fraction(SCALE8, pmtB, balB)
193- let $t063656657 = if ((ratioB > ratioA))
197+ let $t063976689 = if ((ratioB > ratioA))
194198 then {
195199 let pmt = fraction(balB, ratioA, SCALE8, CEILING)
196200 $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
199203 let pmt = fraction(balA, ratioB, SCALE8, CEILING)
200204 $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
201205 }
202- let pmtAmountA = $t063656657._1
203- let pmtAmountB = $t063656657._2
204- let change = $t063656657._3
205- let changeAssetId = $t063656657._4
206+ let pmtAmountA = $t063976689._1
207+ let pmtAmountB = $t063976689._2
208+ let change = $t063976689._3
209+ let changeAssetId = $t063976689._4
206210 let inv1 = if (if ((pmtAmountA > 0))
207211 then (pmtAmountB > 0)
208212 else false)
245249
246250 func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = {
247251 let poolAddr = Address(fromBase58String(pool))
248- let $t081088957 = if (if ((pmtA > 0))
252+ let $t081408989 = if (if ((pmtA > 0))
249253 then (pmtB > 0)
250254 else false)
251255 then {
286290 else if ((pmtB > 0))
287291 then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB)
288292 else throw("pmts must be > 0")
289- let pmtAmountA = $t081088957._1
290- let pmtAmountB = $t081088957._2
291- let change = $t081088957._3
292- let changeAssetId = $t081088957._4
293+ let pmtAmountA = $t081408989._1
294+ let pmtAmountB = $t081408989._2
295+ let change = $t081408989._3
296+ let changeAssetId = $t081408989._4
293297 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
294298 if ((shareBalanceBefore == shareBalanceBefore))
295299 then {
335339 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type) = {
336340 let totalAmount = getPoolTotalShare(pool)
337341 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))]
342+[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
339343 }
340344
341345
342-func claimFarmed (type,pool) = if ((type == SF_POS_TYPE))
346+func claimFarmed (type,pool) = if ((type == SF_POOL))
343347 then {
344348 let balBefore = accountBalance(SWOPID)
345349 if ((balBefore == balBefore))
354358 }
355359 else throw("Strict value is not equal to itself.")
356360 }
357- else if ((type == WX_POS_TYPE))
361+ else if ((type == WX_POOL))
358362 then {
359363 let balBefore = accountBalance(WXID)
360364 if ((balBefore == balBefore))
413417
414418 func capitalize (pool,type,tokenId,tokenAmount) = {
415419 let poolAddr = Address(fromBase58String(pool))
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))
420+ let $t01319013268 = getPoolData(poolAddr, type)
421+ let AId = $t01319013268._1
422+ let BId = $t01319013268._2
423+ let balA = $t01319013268._3
424+ let balB = $t01319013268._4
425+ let shareId = $t01319013268._5
426+ let $t01327113351 = if ((tokenId == AId))
423427 then $Tuple2(tokenAmount, 0)
424428 else $Tuple2(0, tokenAmount)
425- let pmtA = $t01333513415._1
426- let pmtB = $t01333513415._2
427- let $t01341813783 = if ((type == SF_POS_TYPE))
429+ let pmtA = $t01327113351._1
430+ let pmtB = $t01327113351._2
431+ let $t01335413715 = if ((type == SF_POOL))
428432 then replenishSwopFi(pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
429433 else replenishWX(pool, CAP_FEE, pmtA, AId, pmtB, BId, shareId)
430- let stakedAmount = $t01341813783._1
431- let axlyFee = $t01341813783._2
434+ let stakedAmount = $t01335413715._1
435+ let axlyFee = $t01335413715._2
432436 let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
433437 let totalShareAmount = getPoolTotalShare(pool)
434438 let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount))
435439 [IntegerEntry((pool + kPoolInterest), newInterest), ScriptTransfer(moneyBox, axlyFee, fromBase58String(shareId))]
436440 }
441+
442+
443+func exchangeDirectlySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
444+ let poolAddr = Address(fromBase58String(pool))
445+ let feeScale6 = 1000000
446+ let fee = getIntegerValue(poolAddr, kSFPoolFee)
447+ let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
448+ let $t01440814696 = if ((assetTokenToGet == assetIdA))
449+ then {
450+ let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
451+ $Tuple2(amountToPay, assetIdB)
452+ }
453+ else {
454+ let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
455+ $Tuple2(amountToPay, assetIdA)
456+ }
457+ let amountToPay = $t01440814696._1
458+ let assetToPay = $t01440814696._2
459+ invoke(poolAddr, "callFunction", ["exchange", "1"], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
460+ }
461+
462+
463+func exchangeDirectlyWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
464+ let poolAddr = Address(fromBase58String(pool))
465+ let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
466+ let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
467+ let feeScale = toBigInt(100000000)
468+ let $t01517315481 = if ((assetTokenToGet == assetIdA))
469+ then {
470+ let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
471+ $Tuple2(amountToPay, assetIdB)
472+ }
473+ else {
474+ let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
475+ $Tuple2(amountToPay, assetIdA)
476+ }
477+ let amountToPay = $t01517315481._1
478+ let assetToPay = $t01517315481._2
479+ let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
480+ invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)])
481+ }
482+
483+
484+func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
485+ then exchangeDirectlySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
486+ else exchangeDirectlyWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
437487
438488
439489 @Callable(i)
443493 then throw("Leverage can't be <100 and >300")
444494 else {
445495 let type = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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))
496+ let $t01638216471 = getPoolData(Address(fromBase58String(pool)), type)
497+ let AId = $t01638216471._1
498+ let BId = $t01638216471._2
499+ let balA = $t01638216471._3
500+ let balB = $t01638216471._4
501+ let shareId = $t01638216471._5
502+ let $t01647417111 = if ((size(i.payments) == 2))
453503 then if ((assetIdToStr(i.payments[0].assetId) != AId))
454504 then throw("Wrong payment asset A")
455505 else if ((assetIdToStr(i.payments[1].assetId) != BId))
462512 then $Tuple4(0, AId, i.payments[0].amount, BId)
463513 else throw("Wrong payment")
464514 else throw("One or two payments expected")
465- let pmtA = $t01448015117._1
466- let pmtAssetA = $t01448015117._2
467- let pmtB = $t01448015117._3
468- let pmtAssetB = $t01448015117._4
515+ let pmtA = $t01647417111._1
516+ let pmtAssetA = $t01647417111._2
517+ let pmtB = $t01647417111._3
518+ let pmtAssetB = $t01647417111._4
469519 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
470520 if ((leverage > 100))
471521 then {
484534 let @ = invoke(this, "createNewRequest", [request], nil)
485535 if ($isInstanceOf(@, "Int"))
486536 then @
487- else unit
537+ else throw(($getType(@) + " couldn't be cast to Int"))
488538 }
489539 if ((newRequestId == newRequestId))
490540 then {
497547 else throw("Strict value is not equal to itself.")
498548 }
499549 else {
500- let $t01645316848 = if ((type == SF_POS_TYPE))
550+ let $t01845218843 = if ((type == SF_POOL))
501551 then replenishSwopFi(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, balA, balB, shareId)
502552 else replenishWX(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, shareId)
503- let userStaked = $t01645316848._1
504- let axlyFee = $t01645316848._2
553+ let userStaked = $t01845218843._1
554+ let axlyFee = $t01845218843._2
505555 replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, type)
506556 }
507557 }
528578 let user = request[1]
529579 let shareId = request[9]
530580 let posNum = parseIntValue(request[12])
531- let $t01780618329 = if ((request[0] == SF_POS_TYPE))
581+ let $t01980120316 = if ((request[0] == SF_POOL))
532582 then replenishSwopFi(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], parseIntValue(request[7]), parseIntValue(request[8]), shareId)
533- else if ((request[0] == WX_POS_TYPE))
583+ else if ((request[0] == WX_POOL))
534584 then replenishWX(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], shareId)
535585 else throw("Wrong request type")
536- let userStaked = $t01780618329._1
537- let axlyFee = $t01780618329._2
586+ let userStaked = $t01980120316._1
587+ let axlyFee = $t01980120316._2
538588 let borrowEntries = [IntegerEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAmount), i.payments[0].amount), StringEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAssetId), request[10])]
539589 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, request[0])
540590 $Tuple2(((entries ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
546596 @Callable(i)
547597 func withdraw (pool,posId) = {
548598 let user = toString(i.caller)
549- let pType = valueOrErrorMessage(getString(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionType)), "Can't find position")
550- let pAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition))
599+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
600+ let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), "Unknown position")
551601 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest))
552602 let poolInterst = getIntegerValue(this, (pool + kPoolInterest))
553- let poolTotalShare = getIntegerValue(this, (pool + kPoolTotal))
603+ let poolTotalShare = getPoolTotalShare(pool)
554604 let userCanWithdraw = (pAmount + fraction(pAmount, (poolInterst - userInterest), SCALE10))
555605 let poolAddr = Address(fromBase58String(pool))
556606 let userAddr = Address(fromBase58String(user))
557607 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAmount))
558608 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAssetId))
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
609+ let $t02166221762 = getPoolData(Address(fromBase58String(pool)), pType)
610+ let assetIdA = $t02166221762._1
611+ let assetIdB = $t02166221762._2
612+ let balA = $t02166221762._3
613+ let balB = $t02166221762._4
614+ let shareId = $t02166221762._5
565615 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
566616 if ((cBalABefore == cBalABefore))
567617 then {
568618 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
569619 if ((cBalBBefore == cBalBBefore))
570620 then {
571- let inv = if ((pType == SF_POS_TYPE))
621+ let inv = if ((pType == SF_POOL))
572622 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
573- else if ((pType == WX_POS_TYPE))
623+ else if ((pType == WX_POOL))
574624 then invoke(poolAddr, "unstakeAndGet", [userCanWithdraw], nil)
575625 else throw("Wrong position type")
576626 if ((inv == inv))
577627 then {
578628 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
579629 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
580- let $t02033320422 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
581- let tokensAmountA = $t02033320422._1
582- let tokensAmountB = $t02033320422._2
583-[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))]
630+ let $t02227422363 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
631+ let tokensAmountA = $t02227422363._1
632+ let tokensAmountB = $t02227422363._2
633+ let $t02236623358 = if ((borrowAmount > 0))
634+ then {
635+ let debt = {
636+ let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((((pool + "_") + user) + "_") + toString(posId)), borrowAsset], nil)
637+ if ($isInstanceOf(@, "Int"))
638+ then @
639+ else throw(($getType(@) + " couldn't be cast to Int"))
640+ }
641+ let amountToGetEx = if (if ((borrowAsset == assetIdA))
642+ then (debt > tokensAmountA)
643+ else false)
644+ then (debt - tokensAmountA)
645+ else if (if ((borrowAsset == assetIdB))
646+ then (debt > tokensAmountB)
647+ else false)
648+ then (debt - tokensAmountB)
649+ else 0
650+ let exInv = if ((amountToGetEx > 0))
651+ then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset)
652+ else 0
653+ if ((exInv == exInv))
654+ then {
655+ let closeDbtInv = invoke(getLendSrvAddr(), "repay", [((user + "_") + toString(posId))], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
656+ if ((closeDbtInv == closeDbtInv))
657+ then {
658+ let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
659+ let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
660+ $Tuple2((cBalAAfterRepay - cBalABefore), (cBalBAfterRepay - cBalBBefore))
661+ }
662+ else throw("Strict value is not equal to itself.")
663+ }
664+ else throw("Strict value is not equal to itself.")
665+ }
666+ else $Tuple2(tokensAmountA, tokensAmountB)
667+ let toUserAmountA = $t02236623358._1
668+ let toUserAmountB = $t02236623358._2
669+[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))]
584670 }
585671 else throw("Strict value is not equal to itself.")
586672 }
601687
602688 @Callable(i)
603689 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
604- let $t02161321811 = if (claim)
690+ let $t02446724661 = if (claim)
605691 then claimFarmed(type, pool)
606692 else {
607- let claimedAsset = if ((type == SF_POS_TYPE))
693+ let claimedAsset = if ((type == SF_POOL))
608694 then SWOPID
609695 else WXID
610696 $Tuple2(amountToExchange, claimedAsset)
611697 }
612- let claimedAmount = $t02161321811._1
613- let claimedAsset = $t02161321811._2
698+ let claimedAmount = $t02446724661._1
699+ let claimedAsset = $t02446724661._2
614700 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
615701 let change = (claimedAmount - amountToExchange)
616702 let changeEntry = if ((change > 0))
623709
624710 @Callable(i)
625711 func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
626- let $t02246722665 = if (claim)
712+ let $t02531725511 = if (claim)
627713 then claimFarmed(type, pool)
628714 else {
629- let claimedAsset = if ((type == SF_POS_TYPE))
715+ let claimedAsset = if ((type == SF_POOL))
630716 then SWOPID
631717 else WXID
632718 $Tuple2(amountToExchange, claimedAsset)
633719 }
634- let claimedAmount = $t02246722665._1
635- let claimedAsset = $t02246722665._2
720+ let claimedAmount = $t02531725511._1
721+ let claimedAsset = $t02531725511._2
636722 let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
637723 let change = (claimedAmount - amountToExchange)
638724 let changeEntry = if ((change > 0))
645731
646732 @Callable(i)
647733 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
648- let $t02338823586 = if (claim)
734+ let $t02623426428 = if (claim)
649735 then claimFarmed(type, pool)
650736 else {
651- let claimedAsset = if ((type == SF_POS_TYPE))
737+ let claimedAsset = if ((type == SF_POOL))
652738 then SWOPID
653739 else WXID
654740 $Tuple2(amountToExchange, claimedAsset)
655741 }
656- let claimedAmount = $t02338823586._1
657- let claimedAsset = $t02338823586._2
742+ let claimedAmount = $t02623426428._1
743+ let claimedAsset = $t02623426428._2
658744 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
659745 let change = (claimedAmount - amountToExchange)
660746 let changeEntry = if ((change > 0))
666752
667753
668754 @Callable(i)
669-func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFee) = if (if ((type != SF_POS_TYPE))
670- then (type != WX_POS_TYPE)
755+func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFee) = if (if ((type != SF_POOL))
756+ then (type != WX_POOL)
671757 else false)
672758 then throw("Wrong type")
673759 else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyCapFee), capFee), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type)]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let SF_POS_TYPE = "SF"
4+let SF_POOL = "SF"
55
6-let WX_POS_TYPE = "WX"
6+let WX_POOL = "WX"
77
88 let CAP_FEE = "cap"
99
1010 let LOAN_FEE = "loan"
1111
1212 let NO_LOAN_FEE = "noLoan"
1313
1414 let SCALE8 = 100000000
1515
1616 let SCALE10 = 10000000000
1717
1818 let FEE_SCALE6 = 1000000
1919
2020 let kSFPoolAAssetBalance = "A_asset_balance"
2121
2222 let kSFPoolBAssetBalance = "B_asset_balance"
2323
2424 let kSFPoolAAssetId = "A_asset_id"
2525
2626 let kSFPoolBAssetId = "B_asset_id"
2727
2828 let kSFPoolShareId = "share_asset_id"
2929
30+let kSFPoolFee = "commission"
31+
3032 let kUserPosition = "_user_position"
3133
3234 let kUserBorrowAmount = "_user_position_borrow_amount"
3335
3436 let kUserBorrowAssetId = "_user_position_borrow_asset_id"
35-
36-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
68-let kExContract = "exchangeContract"
68+let kExContract = "exchange_contract"
69+
70+let kWxSwapContract = "wx_swap_contract"
6971
7072 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
7173
7274 let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address")))
7375
7476 let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address")))
77+
78+let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address")))
7579
7680 let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp'
7781
7882 let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
7983
8084 func isSelfCall (i) = if ((i.caller == this))
8185 then unit
8286 else throw("Only contract itself can call this function")
8387
8488
8589 func accountBalance (assetId) = match assetId {
8690 case id: ByteVector =>
8791 assetBalance(this, id)
8892 case waves: Unit =>
8993 wavesBalance(this).available
9094 case _ =>
9195 throw("Match error")
9296 }
9397
9498
9599 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"))
96100
97101
98102 func getWXPoolData (poolAddr) = {
99103 let cfg = {
100104 let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil)
101105 if ($isInstanceOf(@, "List[Any]"))
102106 then @
103107 else throw(($getType(@) + " couldn't be cast to List[Any]"))
104108 }
105109 if ((cfg == cfg))
106110 then $Tuple5(valueOrErrorMessage({
107111 let @ = cfg[4]
108112 if ($isInstanceOf(@, "String"))
109113 then @
110114 else unit
111115 }, "Can't get pool A asset id"), valueOrErrorMessage({
112116 let @ = cfg[5]
113117 if ($isInstanceOf(@, "String"))
114118 then @
115119 else unit
116120 }, "Can't get pool B asset id"), 0, 0, valueOrErrorMessage({
117121 let @ = cfg[3]
118122 if ($isInstanceOf(@, "String"))
119123 then @
120124 else unit
121125 }, "Can't get pool LP asset id"))
122126 else throw("Strict value is not equal to itself.")
123127 }
124128
125129
126-func getPoolData (poolAddr,type) = if ((type == SF_POS_TYPE))
130+func getPoolData (poolAddr,type) = if ((type == SF_POOL))
127131 then getSFPoolData(poolAddr)
128- else if ((type == WX_POS_TYPE))
132+ else if ((type == WX_POOL))
129133 then getWXPoolData(poolAddr)
130134 else throw("Wrong pool type")
131135
132136
133137 func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0)
134138
135139
136140 func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (((pool + "_") + user) + kUserPositionNum)), 0) + 1)
137141
138142
139143 func getAxlyFee (pool,feeType) = if ((feeType == "cap"))
140144 then getIntegerValue(this, (pool + kAxlyCapFee))
141145 else if ((feeType == "loan"))
142146 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
143147 else if ((feeType == "noLoan"))
144148 then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
145149 else throw("Wrong fee type")
146150
147151
148152 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
149153
150154
151155 func getWXFarmingAddr (poolAddr) = {
152156 let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr")))
153157 let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__")
154158 Address(fromBase58String(factroyCfg[1]))
155159 }
156160
157161
158162 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
159163
160164
161165 func assetIdToStr (assetId) = match assetId {
162166 case id: ByteVector =>
163167 toBase58String(id)
164168 case waves: Unit =>
165169 "WAVES"
166170 case _ =>
167171 throw("Match error")
168172 }
169173
170174
171175 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
172176 then unit
173177 else fromBase58String(assetId)
174178
175179
176180 func getAssetDecimals (assetId) = if ((assetId == "WAVES"))
177181 then 8
178182 else match assetInfo(fromBase58String(assetId)) {
179183 case asset: Asset =>
180184 asset.decimals
181185 case _ =>
182186 throw("Can't find asset")
183187 }
184188
185189
186190 func replenishSwopFi (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId) = {
187191 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
188192 if ((shareBalanceBefore == shareBalanceBefore))
189193 then {
190194 let poolAddr = Address(fromBase58String(pool))
191195 let ratioA = fraction(SCALE8, pmtA, balA)
192196 let ratioB = fraction(SCALE8, pmtB, balB)
193- let $t063656657 = if ((ratioB > ratioA))
197+ let $t063976689 = if ((ratioB > ratioA))
194198 then {
195199 let pmt = fraction(balB, ratioA, SCALE8, CEILING)
196200 $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
197201 }
198202 else {
199203 let pmt = fraction(balA, ratioB, SCALE8, CEILING)
200204 $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
201205 }
202- let pmtAmountA = $t063656657._1
203- let pmtAmountB = $t063656657._2
204- let change = $t063656657._3
205- let changeAssetId = $t063656657._4
206+ let pmtAmountA = $t063976689._1
207+ let pmtAmountB = $t063976689._2
208+ let change = $t063976689._3
209+ let changeAssetId = $t063976689._4
206210 let inv1 = if (if ((pmtAmountA > 0))
207211 then (pmtAmountB > 0)
208212 else false)
209213 then {
210214 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
211215 invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
212216 }
213217 else 0
214218 if ((inv1 == inv1))
215219 then {
216220 let inv2 = if ((change > 0))
217221 then {
218222 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
219223 let vars = ["0", "false", "0"]
220224 invoke(poolAddr, "callFunction", ["replenishWithOneToken", vars], payments)
221225 }
222226 else 0
223227 if ((inv2 == inv2))
224228 then {
225229 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
226230 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
227231 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
228232 let userShareForStake = (totalStaked - axlyFeeAmount)
229233 if ((0 >= userShareForStake))
230234 then throw("amount of staked sharetokens must be > 0")
231235 else {
232236 let inv3 = invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], [AttachedPayment(fromBase58String(shareId), userShareForStake)])
233237 if ((inv3 == inv3))
234238 then $Tuple2(userShareForStake, axlyFeeAmount)
235239 else throw("Strict value is not equal to itself.")
236240 }
237241 }
238242 else throw("Strict value is not equal to itself.")
239243 }
240244 else throw("Strict value is not equal to itself.")
241245 }
242246 else throw("Strict value is not equal to itself.")
243247 }
244248
245249
246250 func replenishWX (pool,feeType,pmtA,pmtAssetA,pmtB,pmtAssetB,shareId) = {
247251 let poolAddr = Address(fromBase58String(pool))
248- let $t081088957 = if (if ((pmtA > 0))
252+ let $t081408989 = if (if ((pmtA > 0))
249253 then (pmtB > 0)
250254 else false)
251255 then {
252256 let evalPutInA = split({
253257 let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil)
254258 if ($isInstanceOf(@, "String"))
255259 then @
256260 else throw(($getType(@) + " couldn't be cast to String"))
257261 }, "__")
258262 if ((evalPutInA == evalPutInA))
259263 then {
260264 let evalPutInB = split({
261265 let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil)
262266 if ($isInstanceOf(@, "String"))
263267 then @
264268 else throw(($getType(@) + " couldn't be cast to String"))
265269 }, "__")
266270 if ((evalPutInB == evalPutInB))
267271 then {
268272 let lpInA = parseIntValue(evalPutInA[1])
269273 let lpInB = parseIntValue(evalPutInB[1])
270274 if ((lpInB > lpInA))
271275 then {
272276 let pmtInB = parseIntValue(evalPutInA[8])
273277 $Tuple4(pmtA, pmtInB, (pmtB - pmtInB), pmtAssetB)
274278 }
275279 else {
276280 let pmtInA = parseIntValue(evalPutInB[7])
277281 $Tuple4(pmtInA, pmtB, (pmtA - pmtInA), pmtAssetA)
278282 }
279283 }
280284 else throw("Strict value is not equal to itself.")
281285 }
282286 else throw("Strict value is not equal to itself.")
283287 }
284288 else if ((pmtA > 0))
285289 then $Tuple4(pmtA, pmtB, pmtA, pmtAssetA)
286290 else if ((pmtB > 0))
287291 then $Tuple4(pmtA, pmtB, pmtB, pmtAssetB)
288292 else throw("pmts must be > 0")
289- let pmtAmountA = $t081088957._1
290- let pmtAmountB = $t081088957._2
291- let change = $t081088957._3
292- let changeAssetId = $t081088957._4
293+ let pmtAmountA = $t081408989._1
294+ let pmtAmountB = $t081408989._2
295+ let change = $t081408989._3
296+ let changeAssetId = $t081408989._4
293297 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
294298 if ((shareBalanceBefore == shareBalanceBefore))
295299 then {
296300 let inv1 = if (if ((pmtAmountA > 0))
297301 then (pmtAmountB > 0)
298302 else false)
299303 then {
300304 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
301305 invoke(poolAddr, "put", [1000000, false], payments)
302306 }
303307 else 0
304308 if ((inv1 == inv1))
305309 then {
306310 let inv2 = if ((change > 0))
307311 then {
308312 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
309313 invoke(poolAddr, "putOneTkn", [0, false], payments)
310314 }
311315 else 0
312316 if ((inv2 == inv2))
313317 then {
314318 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
315319 let totalStaked = (shareBalanceAfter - shareBalanceBefore)
316320 let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6)
317321 let userShareForStake = (totalStaked - axlyFeeAmount)
318322 if ((0 >= userShareForStake))
319323 then throw("amount of staked sharetokens must be > 0")
320324 else {
321325 let inv3 = invoke(getWXFarmingAddr(poolAddr), "stake", nil, [AttachedPayment(fromBase58String(shareId), userShareForStake)])
322326 if ((inv3 == inv3))
323327 then $Tuple2(userShareForStake, axlyFeeAmount)
324328 else throw("Strict value is not equal to itself.")
325329 }
326330 }
327331 else throw("Strict value is not equal to itself.")
328332 }
329333 else throw("Strict value is not equal to itself.")
330334 }
331335 else throw("Strict value is not equal to itself.")
332336 }
333337
334338
335339 func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type) = {
336340 let totalAmount = getPoolTotalShare(pool)
337341 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))]
342+[IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), IntegerEntry((((pool + "_") + user) + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))]
339343 }
340344
341345
342-func claimFarmed (type,pool) = if ((type == SF_POS_TYPE))
346+func claimFarmed (type,pool) = if ((type == SF_POOL))
343347 then {
344348 let balBefore = accountBalance(SWOPID)
345349 if ((balBefore == balBefore))
346350 then {
347351 let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil)
348352 if ((inv == inv))
349353 then {
350354 let balAfter = accountBalance(SWOPID)
351355 $Tuple2((balAfter - balBefore), SWOPID)
352356 }
353357 else throw("Strict value is not equal to itself.")
354358 }
355359 else throw("Strict value is not equal to itself.")
356360 }
357- else if ((type == WX_POS_TYPE))
361+ else if ((type == WX_POOL))
358362 then {
359363 let balBefore = accountBalance(WXID)
360364 if ((balBefore == balBefore))
361365 then {
362366 let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil)
363367 if ((inv == inv))
364368 then {
365369 let balAfter = accountBalance(WXID)
366370 $Tuple2((balAfter - balBefore), WXID)
367371 }
368372 else throw("Strict value is not equal to itself.")
369373 }
370374 else throw("Strict value is not equal to itself.")
371375 }
372376 else throw("Wrong pool type")
373377
374378
375379 func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
376380 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
377381 if ((tokenBalanceBefore == tokenBalanceBefore))
378382 then {
379383 let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)])
380384 if ((inv == inv))
381385 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
382386 else throw("Strict value is not equal to itself.")
383387 }
384388 else throw("Strict value is not equal to itself.")
385389 }
386390
387391
388392 func exchangePazzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = {
389393 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
390394 if ((tokenBalanceBefore == tokenBalanceBefore))
391395 then {
392396 let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
393397 if ((inv == inv))
394398 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
395399 else throw("Strict value is not equal to itself.")
396400 }
397401 else throw("Strict value is not equal to itself.")
398402 }
399403
400404
401405 func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
402406 let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken))
403407 if ((tokenBalanceBefore == tokenBalanceBefore))
404408 then {
405409 let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)])
406410 if ((inv == inv))
407411 then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore)
408412 else throw("Strict value is not equal to itself.")
409413 }
410414 else throw("Strict value is not equal to itself.")
411415 }
412416
413417
414418 func capitalize (pool,type,tokenId,tokenAmount) = {
415419 let poolAddr = Address(fromBase58String(pool))
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))
420+ let $t01319013268 = getPoolData(poolAddr, type)
421+ let AId = $t01319013268._1
422+ let BId = $t01319013268._2
423+ let balA = $t01319013268._3
424+ let balB = $t01319013268._4
425+ let shareId = $t01319013268._5
426+ let $t01327113351 = if ((tokenId == AId))
423427 then $Tuple2(tokenAmount, 0)
424428 else $Tuple2(0, tokenAmount)
425- let pmtA = $t01333513415._1
426- let pmtB = $t01333513415._2
427- let $t01341813783 = if ((type == SF_POS_TYPE))
429+ let pmtA = $t01327113351._1
430+ let pmtB = $t01327113351._2
431+ let $t01335413715 = if ((type == SF_POOL))
428432 then replenishSwopFi(pool, CAP_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId)
429433 else replenishWX(pool, CAP_FEE, pmtA, AId, pmtB, BId, shareId)
430- let stakedAmount = $t01341813783._1
431- let axlyFee = $t01341813783._2
434+ let stakedAmount = $t01335413715._1
435+ let axlyFee = $t01335413715._2
432436 let curPoolInterest = valueOrElse(getInteger(this, (pool + kPoolInterest)), 0)
433437 let totalShareAmount = getPoolTotalShare(pool)
434438 let newInterest = (curPoolInterest + fraction(stakedAmount, SCALE10, totalShareAmount))
435439 [IntegerEntry((pool + kPoolInterest), newInterest), ScriptTransfer(moneyBox, axlyFee, fromBase58String(shareId))]
436440 }
441+
442+
443+func exchangeDirectlySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
444+ let poolAddr = Address(fromBase58String(pool))
445+ let feeScale6 = 1000000
446+ let fee = getIntegerValue(poolAddr, kSFPoolFee)
447+ let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee))
448+ let $t01440814696 = if ((assetTokenToGet == assetIdA))
449+ then {
450+ let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee))
451+ $Tuple2(amountToPay, assetIdB)
452+ }
453+ else {
454+ let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee))
455+ $Tuple2(amountToPay, assetIdA)
456+ }
457+ let amountToPay = $t01440814696._1
458+ let assetToPay = $t01440814696._2
459+ invoke(poolAddr, "callFunction", ["exchange", "1"], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)])
460+ }
461+
462+
463+func exchangeDirectlyWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = {
464+ let poolAddr = Address(fromBase58String(pool))
465+ let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee")
466+ let pFee = getIntegerValue(wxSwapContract, "%s__poolFee")
467+ let feeScale = toBigInt(100000000)
468+ let $t01517315481 = if ((assetTokenToGet == assetIdA))
469+ then {
470+ let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet))
471+ $Tuple2(amountToPay, assetIdB)
472+ }
473+ else {
474+ let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet))
475+ $Tuple2(amountToPay, assetIdA)
476+ }
477+ let amountToPay = $t01517315481._1
478+ let assetToPay = $t01517315481._2
479+ let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee)))))
480+ invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPayWithFee)])
481+ }
482+
483+
484+func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL))
485+ then exchangeDirectlySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
486+ else exchangeDirectlyWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet)
437487
438488
439489 @Callable(i)
440490 func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage))
441491 then true
442492 else (leverage > 300))
443493 then throw("Leverage can't be <100 and >300")
444494 else {
445495 let type = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
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))
496+ let $t01638216471 = getPoolData(Address(fromBase58String(pool)), type)
497+ let AId = $t01638216471._1
498+ let BId = $t01638216471._2
499+ let balA = $t01638216471._3
500+ let balB = $t01638216471._4
501+ let shareId = $t01638216471._5
502+ let $t01647417111 = if ((size(i.payments) == 2))
453503 then if ((assetIdToStr(i.payments[0].assetId) != AId))
454504 then throw("Wrong payment asset A")
455505 else if ((assetIdToStr(i.payments[1].assetId) != BId))
456506 then throw("Wrong payment asset B")
457507 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
458508 else if ((size(i.payments) == 1))
459509 then if ((assetIdToStr(i.payments[0].assetId) == AId))
460510 then $Tuple4(i.payments[0].amount, AId, 0, BId)
461511 else if ((assetIdToStr(i.payments[0].assetId) == BId))
462512 then $Tuple4(0, AId, i.payments[0].amount, BId)
463513 else throw("Wrong payment")
464514 else throw("One or two payments expected")
465- let pmtA = $t01448015117._1
466- let pmtAssetA = $t01448015117._2
467- let pmtB = $t01448015117._3
468- let pmtAssetB = $t01448015117._4
515+ let pmtA = $t01647417111._1
516+ let pmtAssetA = $t01647417111._2
517+ let pmtB = $t01647417111._3
518+ let pmtAssetB = $t01647417111._4
469519 let newPosNum = getNewUserPositionNumber(pool, toString(i.caller))
470520 if ((leverage > 100))
471521 then {
472522 let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil)
473523 if ($isInstanceOf(@, "(Int, Int)"))
474524 then @
475525 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
476526 let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil)
477527 if ($isInstanceOf(@, "(Int, Int)"))
478528 then @
479529 else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1
480530 let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN)))
481531 let borrowAmount = fraction(paydInDollar, (leverage - 100), 100)
482532 let request = makeString([type, toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount), toString(newPosNum)], ",")
483533 let newRequestId = {
484534 let @ = invoke(this, "createNewRequest", [request], nil)
485535 if ($isInstanceOf(@, "Int"))
486536 then @
487- else unit
537+ else throw(($getType(@) + " couldn't be cast to Int"))
488538 }
489539 if ((newRequestId == newRequestId))
490540 then {
491541 let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
492542 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
493543 if ((inv == inv))
494544 then nil
495545 else throw("Strict value is not equal to itself.")
496546 }
497547 else throw("Strict value is not equal to itself.")
498548 }
499549 else {
500- let $t01645316848 = if ((type == SF_POS_TYPE))
550+ let $t01845218843 = if ((type == SF_POOL))
501551 then replenishSwopFi(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, balA, balB, shareId)
502552 else replenishWX(pool, NO_LOAN_FEE, pmtA, pmtAssetA, pmtB, pmtAssetB, shareId)
503- let userStaked = $t01645316848._1
504- let axlyFee = $t01645316848._2
553+ let userStaked = $t01845218843._1
554+ let axlyFee = $t01845218843._2
505555 replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, type)
506556 }
507557 }
508558
509559
510560
511561 @Callable(i)
512562 func replenishFromLand (requestId) = {
513563 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
514564 if ((size(i.payments) != 1))
515565 then throw("Wrong payment size")
516566 else if (if ((assetIdToStr(i.payments[0].assetId) != request[10]))
517567 then true
518568 else (i.payments[0].amount != parseIntValue(request[11])))
519569 then throw("Wrong payment")
520570 else {
521571 let pmtA = if ((request[4] == assetIdToStr(i.payments[0].assetId)))
522572 then (parseIntValue(request[3]) + i.payments[0].amount)
523573 else parseIntValue(request[3])
524574 let pmtB = if ((request[6] == assetIdToStr(i.payments[0].assetId)))
525575 then (parseIntValue(request[5]) + i.payments[0].amount)
526576 else parseIntValue(request[3])
527577 let pool = request[2]
528578 let user = request[1]
529579 let shareId = request[9]
530580 let posNum = parseIntValue(request[12])
531- let $t01780618329 = if ((request[0] == SF_POS_TYPE))
581+ let $t01980120316 = if ((request[0] == SF_POOL))
532582 then replenishSwopFi(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], parseIntValue(request[7]), parseIntValue(request[8]), shareId)
533- else if ((request[0] == WX_POS_TYPE))
583+ else if ((request[0] == WX_POOL))
534584 then replenishWX(pool, LOAN_FEE, pmtA, request[4], pmtB, request[6], shareId)
535585 else throw("Wrong request type")
536- let userStaked = $t01780618329._1
537- let axlyFee = $t01780618329._2
586+ let userStaked = $t01980120316._1
587+ let axlyFee = $t01980120316._2
538588 let borrowEntries = [IntegerEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAmount), i.payments[0].amount), StringEntry((((((request[2] + "_") + request[1]) + "_") + request[12]) + kUserBorrowAssetId), request[10])]
539589 let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, request[0])
540590 $Tuple2(((entries ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked)
541591 }
542592 }
543593
544594
545595
546596 @Callable(i)
547597 func withdraw (pool,posId) = {
548598 let user = toString(i.caller)
549- let pType = valueOrErrorMessage(getString(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionType)), "Can't find position")
550- let pAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition))
599+ let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool")
600+ let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPosition)), "Unknown position")
551601 let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserPositionInterest))
552602 let poolInterst = getIntegerValue(this, (pool + kPoolInterest))
553- let poolTotalShare = getIntegerValue(this, (pool + kPoolTotal))
603+ let poolTotalShare = getPoolTotalShare(pool)
554604 let userCanWithdraw = (pAmount + fraction(pAmount, (poolInterst - userInterest), SCALE10))
555605 let poolAddr = Address(fromBase58String(pool))
556606 let userAddr = Address(fromBase58String(user))
557607 let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAmount))
558608 let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + toString(posId)) + kUserBorrowAssetId))
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
609+ let $t02166221762 = getPoolData(Address(fromBase58String(pool)), pType)
610+ let assetIdA = $t02166221762._1
611+ let assetIdB = $t02166221762._2
612+ let balA = $t02166221762._3
613+ let balB = $t02166221762._4
614+ let shareId = $t02166221762._5
565615 let cBalABefore = accountBalance(assetIdFromStr(assetIdA))
566616 if ((cBalABefore == cBalABefore))
567617 then {
568618 let cBalBBefore = accountBalance(assetIdFromStr(assetIdB))
569619 if ((cBalBBefore == cBalBBefore))
570620 then {
571- let inv = if ((pType == SF_POS_TYPE))
621+ let inv = if ((pType == SF_POOL))
572622 then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil)
573- else if ((pType == WX_POS_TYPE))
623+ else if ((pType == WX_POOL))
574624 then invoke(poolAddr, "unstakeAndGet", [userCanWithdraw], nil)
575625 else throw("Wrong position type")
576626 if ((inv == inv))
577627 then {
578628 let cBalAAfter = accountBalance(assetIdFromStr(assetIdA))
579629 let cBalBAfter = accountBalance(assetIdFromStr(assetIdB))
580- let $t02033320422 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
581- let tokensAmountA = $t02033320422._1
582- let tokensAmountB = $t02033320422._2
583-[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))]
630+ let $t02227422363 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore))
631+ let tokensAmountA = $t02227422363._1
632+ let tokensAmountB = $t02227422363._2
633+ let $t02236623358 = if ((borrowAmount > 0))
634+ then {
635+ let debt = {
636+ let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((((pool + "_") + user) + "_") + toString(posId)), borrowAsset], nil)
637+ if ($isInstanceOf(@, "Int"))
638+ then @
639+ else throw(($getType(@) + " couldn't be cast to Int"))
640+ }
641+ let amountToGetEx = if (if ((borrowAsset == assetIdA))
642+ then (debt > tokensAmountA)
643+ else false)
644+ then (debt - tokensAmountA)
645+ else if (if ((borrowAsset == assetIdB))
646+ then (debt > tokensAmountB)
647+ else false)
648+ then (debt - tokensAmountB)
649+ else 0
650+ let exInv = if ((amountToGetEx > 0))
651+ then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset)
652+ else 0
653+ if ((exInv == exInv))
654+ then {
655+ let closeDbtInv = invoke(getLendSrvAddr(), "repay", [((user + "_") + toString(posId))], [AttachedPayment(assetIdFromStr(borrowAsset), debt)])
656+ if ((closeDbtInv == closeDbtInv))
657+ then {
658+ let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA))
659+ let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB))
660+ $Tuple2((cBalAAfterRepay - cBalABefore), (cBalBAfterRepay - cBalBBefore))
661+ }
662+ else throw("Strict value is not equal to itself.")
663+ }
664+ else throw("Strict value is not equal to itself.")
665+ }
666+ else $Tuple2(tokensAmountA, tokensAmountB)
667+ let toUserAmountA = $t02236623358._1
668+ let toUserAmountB = $t02236623358._2
669+[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))]
584670 }
585671 else throw("Strict value is not equal to itself.")
586672 }
587673 else throw("Strict value is not equal to itself.")
588674 }
589675 else throw("Strict value is not equal to itself.")
590676 }
591677
592678
593679
594680 @Callable(i)
595681 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
596682 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
597683 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId)
598684 })
599685
600686
601687
602688 @Callable(i)
603689 func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = {
604- let $t02161321811 = if (claim)
690+ let $t02446724661 = if (claim)
605691 then claimFarmed(type, pool)
606692 else {
607- let claimedAsset = if ((type == SF_POS_TYPE))
693+ let claimedAsset = if ((type == SF_POOL))
608694 then SWOPID
609695 else WXID
610696 $Tuple2(amountToExchange, claimedAsset)
611697 }
612- let claimedAmount = $t02161321811._1
613- let claimedAsset = $t02161321811._2
698+ let claimedAmount = $t02446724661._1
699+ let claimedAsset = $t02446724661._2
614700 let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options)
615701 let change = (claimedAmount - amountToExchange)
616702 let changeEntry = if ((change > 0))
617703 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
618704 else nil
619705 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
620706 }
621707
622708
623709
624710 @Callable(i)
625711 func capitalizeExPazzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = {
626- let $t02246722665 = if (claim)
712+ let $t02531725511 = if (claim)
627713 then claimFarmed(type, pool)
628714 else {
629- let claimedAsset = if ((type == SF_POS_TYPE))
715+ let claimedAsset = if ((type == SF_POOL))
630716 then SWOPID
631717 else WXID
632718 $Tuple2(amountToExchange, claimedAsset)
633719 }
634- let claimedAmount = $t02246722665._1
635- let claimedAsset = $t02246722665._2
720+ let claimedAmount = $t02531725511._1
721+ let claimedAsset = $t02531725511._2
636722 let exchangedAmount = exchangePazzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options)
637723 let change = (claimedAmount - amountToExchange)
638724 let changeEntry = if ((change > 0))
639725 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
640726 else nil
641727 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
642728 }
643729
644730
645731
646732 @Callable(i)
647733 func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = {
648- let $t02338823586 = if (claim)
734+ let $t02623426428 = if (claim)
649735 then claimFarmed(type, pool)
650736 else {
651- let claimedAsset = if ((type == SF_POS_TYPE))
737+ let claimedAsset = if ((type == SF_POOL))
652738 then SWOPID
653739 else WXID
654740 $Tuple2(amountToExchange, claimedAsset)
655741 }
656- let claimedAmount = $t02338823586._1
657- let claimedAsset = $t02338823586._2
742+ let claimedAmount = $t02623426428._1
743+ let claimedAsset = $t02623426428._2
658744 let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options)
659745 let change = (claimedAmount - amountToExchange)
660746 let changeEntry = if ((change > 0))
661747 then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))]
662748 else nil
663749 (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry)
664750 }
665751
666752
667753
668754 @Callable(i)
669-func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFee) = if (if ((type != SF_POS_TYPE))
670- then (type != WX_POS_TYPE)
755+func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFee) = if (if ((type != SF_POOL))
756+ then (type != WX_POOL)
671757 else false)
672758 then throw("Wrong type")
673759 else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyCapFee), capFee), IntegerEntry((poolAddr + kPoolInterest), 0), StringEntry((kPool + poolAddr), type)]
674760
675761
676762 @Verifier(tx)
677763 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
678764

github/deemru/w8io/026f985 
106.29 ms