tx · DMoYJqDyse58FAcfkuB4fz6yK2ik4uYKBZ7Vd418inEJ 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.04400000 Waves 2023.06.08 13:22 [2613569] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "DMoYJqDyse58FAcfkuB4fz6yK2ik4uYKBZ7Vd418inEJ", "fee": 4400000, "feeAssetId": null, "timestamp": 1686219756473, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "2ESZy9vdvbtzToAZjSWF7xtCN3AV2hkJwAgRYNZ27CfMYk95B7YSDcnWwUZ46goEnUWopbJdNGdZRWwNnt7FPDcX" ], "script": "base64:BgKRAQgCEgcKBQgBCAEBEgMKAQgSBAoCCAgSBQoDCAEIEgMKAQgSBAoCCAESBgoEAQgIARIFCgMBCAgSAwoBCBIGCgQIAQgIEgUKAwgIARIOCgwICAgBBBEYGBEBARgSCgoICAgIAQQIARgSDgoMCAgIAQQYGBgYGAEYEgoKCAgIAQEBAQEBEgYKBAgICAESBAoCCAhfAAdTRl9QT09MAgJTRgAHV1hfUE9PTAICV1gAD0NBUF9GRUVfTk9fTE9BTgIJY2FwTm9Mb2FuAAxDQVBfRkVFX0xPQU4CB2NhcExvYW4AFFNUT1BMT1NTX0ZFRV9OT19MT0FOAg5zdG9wTG9zc05vTG9hbgANU1RPUExPU1NfTE9BTgIMc3RvcExvc3NMb2FuAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGTk9fRkVFAgVub0ZlZQAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZQIPQV9hc3NldF9iYWxhbmNlABRrU0Z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YWxhbmNlAQUGU1dPUElECQCUCgIFA25pbAkAlAoCCQBlAgUIYmFsQWZ0ZXIFCWJhbEJlZm9yZQUGU1dPUElECQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAwkAAAIFBHR5cGUFB1dYX1BPT0wECWJhbEJlZm9yZQkBDmFjY291bnRCYWxhbmNlAQUEV1hJRAMJAAACBQliYWxCZWZvcmUFCWJhbEJlZm9yZQQDaW52CQD8BwQJARBnZXRXWEZhcm1pbmdBZGRyAQkBB0FkZHJlc3MBCQDZBAEFBHBvb2wCB2NsYWltV1gJAMwIAgUEcG9vbAUDbmlsBQNuaWwDCQAAAgUDaW52BQNpbnYECGJhbEFmdGVyCQEOYWNjb3VudEJhbGFuY2UBBQRXWElECQCUCgIFA25pbAkAlAoCCQBlAgUIYmFsQWZ0ZXIFCWJhbEJlZm9yZQUEV1hJRAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECD1dyb25nIHBvb2wgdHlwZQECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXm9hC89", "height": 2613569, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9KeWseRcMJcyvzVk5MuBqBAb5JSZvq9yfLM7C3K29LTZ Next: BGomtYPrV286rKrxAvuJosNMjTpJkD5ebzq4H2RxHGqb Diff:
Old | New | Differences | |
---|---|---|---|
1069 | 1069 | let pmtAllA = $t03351733641._1 | |
1070 | 1070 | let pmtAllB = $t03351733641._2 | |
1071 | 1071 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1072 | - | let $ | |
1073 | - | let userStaked = $ | |
1074 | - | let axlyFee = $ | |
1072 | + | let $t03372333832 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1073 | + | let userStaked = $t03372333832._1 | |
1074 | + | let axlyFee = $t03372333832._2 | |
1075 | 1075 | let posNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
1076 | 1076 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1077 | 1077 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1135 | 1135 | func liquidate (user,posId,liquidateAmount) = { | |
1136 | 1136 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1137 | 1137 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1138 | - | let $ | |
1139 | - | let AId = $ | |
1140 | - | let BId = $ | |
1141 | - | let balA = $ | |
1142 | - | let balB = $ | |
1143 | - | let shareId = $ | |
1138 | + | let $t03661536705 = getPoolData(Address(fromBase58String(pool)), pType) | |
1139 | + | let AId = $t03661536705._1 | |
1140 | + | let BId = $t03661536705._2 | |
1141 | + | let balA = $t03661536705._3 | |
1142 | + | let balB = $t03661536705._4 | |
1143 | + | let shareId = $t03661536705._5 | |
1144 | 1144 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1145 | 1145 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1146 | 1146 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1154 | 1154 | ||
1155 | 1155 | @Callable(i) | |
1156 | 1156 | func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
1157 | - | let $ | |
1157 | + | let $t03794038134 = if (claim) | |
1158 | 1158 | then claimFarmed(type, pool) | |
1159 | 1159 | else { | |
1160 | 1160 | let claimedAsset = if ((type == SF_POOL)) | |
1162 | 1162 | else WXID | |
1163 | 1163 | $Tuple2(amountToExchange, claimedAsset) | |
1164 | 1164 | } | |
1165 | - | let claimedAmount = $ | |
1166 | - | let claimedAsset = $ | |
1165 | + | let claimedAmount = $t03794038134._1 | |
1166 | + | let claimedAsset = $t03794038134._2 | |
1167 | 1167 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1168 | 1168 | let change = (claimedAmount - amountToExchange) | |
1169 | 1169 | let changeEntry = if ((change > 0)) | |
1176 | 1176 | ||
1177 | 1177 | @Callable(i) | |
1178 | 1178 | func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = { | |
1179 | - | let $ | |
1179 | + | let $t03879138985 = if (claim) | |
1180 | 1180 | then claimFarmed(type, pool) | |
1181 | 1181 | else { | |
1182 | 1182 | let claimedAsset = if ((type == SF_POOL)) | |
1184 | 1184 | else WXID | |
1185 | 1185 | $Tuple2(amountToExchange, claimedAsset) | |
1186 | 1186 | } | |
1187 | - | let claimedAmount = $ | |
1188 | - | let claimedAsset = $ | |
1187 | + | let claimedAmount = $t03879138985._1 | |
1188 | + | let claimedAsset = $t03879138985._2 | |
1189 | 1189 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1190 | 1190 | let change = (claimedAmount - amountToExchange) | |
1191 | 1191 | let changeEntry = if ((change > 0)) | |
1198 | 1198 | ||
1199 | 1199 | @Callable(i) | |
1200 | 1200 | func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
1201 | - | let $ | |
1201 | + | let $t03970839902 = if (claim) | |
1202 | 1202 | then claimFarmed(type, pool) | |
1203 | 1203 | else { | |
1204 | 1204 | let claimedAsset = if ((type == SF_POOL)) | |
1206 | 1206 | else WXID | |
1207 | 1207 | $Tuple2(amountToExchange, claimedAsset) | |
1208 | 1208 | } | |
1209 | - | let claimedAmount = $ | |
1210 | - | let claimedAsset = $ | |
1209 | + | let claimedAmount = $t03970839902._1 | |
1210 | + | let claimedAsset = $t03970839902._2 | |
1211 | 1211 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1212 | 1212 | let change = (claimedAmount - amountToExchange) | |
1213 | 1213 | let changeEntry = if ((change > 0)) | |
1224 | 1224 | else false) | |
1225 | 1225 | then throw("Wrong type") | |
1226 | 1226 | else { | |
1227 | - | let $ | |
1228 | - | let aId = $ | |
1229 | - | let bId = $ | |
1230 | - | let aBal = $ | |
1231 | - | let bBal = $ | |
1232 | - | let shareId = $ | |
1227 | + | let $t04059540689 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1228 | + | let aId = $t04059540689._1 | |
1229 | + | let bId = $t04059540689._2 | |
1230 | + | let aBal = $t04059540689._3 | |
1231 | + | let bBal = $t04059540689._4 | |
1232 | + | let shareId = $t04059540689._5 | |
1233 | 1233 | [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr)] | |
1234 | 1234 | } | |
1235 | 1235 | ||
1238 | 1238 | @Callable(i) | |
1239 | 1239 | func capitalizeTest (pool,pType,tokenId,tokenAmount) = { | |
1240 | 1240 | let poolAddr = Address(fromBase58String(pool)) | |
1241 | - | let $ | |
1242 | - | let AId = $ | |
1243 | - | let BId = $ | |
1244 | - | let balA = $ | |
1245 | - | let balB = $ | |
1246 | - | let shareId = $ | |
1247 | - | let $ | |
1241 | + | let $t04148541564 = getPoolData(poolAddr, pType) | |
1242 | + | let AId = $t04148541564._1 | |
1243 | + | let BId = $t04148541564._2 | |
1244 | + | let balA = $t04148541564._3 | |
1245 | + | let balB = $t04148541564._4 | |
1246 | + | let shareId = $t04148541564._5 | |
1247 | + | let $t04156741647 = if ((tokenId == AId)) | |
1248 | 1248 | then $Tuple2(tokenAmount, 0) | |
1249 | 1249 | else $Tuple2(0, tokenAmount) | |
1250 | - | let pmtA = $ | |
1251 | - | let pmtB = $ | |
1252 | - | let $ | |
1253 | - | let stakedAmount = $ | |
1254 | - | let nf = $ | |
1250 | + | let pmtA = $t04156741647._1 | |
1251 | + | let pmtB = $t04156741647._2 | |
1252 | + | let $t04165041754 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1253 | + | let stakedAmount = $t04165041754._1 | |
1254 | + | let nf = $t04165041754._2 | |
1255 | 1255 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
1256 | 1256 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
1257 | 1257 | let totalShareAmount = getPoolTotalShare(pool) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SF_POOL = "SF" | |
5 | 5 | ||
6 | 6 | let WX_POOL = "WX" | |
7 | 7 | ||
8 | 8 | let CAP_FEE_NO_LOAN = "capNoLoan" | |
9 | 9 | ||
10 | 10 | let CAP_FEE_LOAN = "capLoan" | |
11 | 11 | ||
12 | 12 | let STOPLOSS_FEE_NO_LOAN = "stopLossNoLoan" | |
13 | 13 | ||
14 | 14 | let STOPLOSS_LOAN = "stopLossLoan" | |
15 | 15 | ||
16 | 16 | let LOAN_FEE = "loan" | |
17 | 17 | ||
18 | 18 | let NO_LOAN_FEE = "noLoan" | |
19 | 19 | ||
20 | 20 | let NO_FEE = "noFee" | |
21 | 21 | ||
22 | 22 | let SCALE8 = 100000000 | |
23 | 23 | ||
24 | 24 | let SCALE10 = 10000000000 | |
25 | 25 | ||
26 | 26 | let FEE_SCALE6 = 1000000 | |
27 | 27 | ||
28 | 28 | let kSFPoolAAssetBalance = "A_asset_balance" | |
29 | 29 | ||
30 | 30 | let kSFPoolBAssetBalance = "B_asset_balance" | |
31 | 31 | ||
32 | 32 | let kSFPoolAAssetId = "A_asset_id" | |
33 | 33 | ||
34 | 34 | let kSFPoolBAssetId = "B_asset_id" | |
35 | 35 | ||
36 | 36 | let kSFPoolShareId = "share_asset_id" | |
37 | 37 | ||
38 | 38 | let kSFPoolShareSupply = "share_asset_supply" | |
39 | 39 | ||
40 | 40 | let kSFPoolFee = "commission" | |
41 | 41 | ||
42 | 42 | let kUserPosition = "_user_position" | |
43 | 43 | ||
44 | 44 | let kUserPositionPool = "_user_position_pool" | |
45 | 45 | ||
46 | 46 | let kUserBorrowAmount = "_user_position_borrow_amount" | |
47 | 47 | ||
48 | 48 | let kUserBorrowAssetId = "_user_position_borrow_asset_id" | |
49 | 49 | ||
50 | 50 | let kUserPositionNum = "_user_position_number" | |
51 | 51 | ||
52 | 52 | let kUserPositionInterest = "_user_position_interest" | |
53 | 53 | ||
54 | 54 | let kPoolTotal = "_pool_total" | |
55 | 55 | ||
56 | 56 | let kPoolTotalLoan = "_pool_total_loan" | |
57 | 57 | ||
58 | 58 | let kPoolInterestLoan = "_pool_interest_loan" | |
59 | 59 | ||
60 | 60 | let kPoolInterestNoLoan = "_pool_interest_no_loan" | |
61 | 61 | ||
62 | 62 | let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan" | |
63 | 63 | ||
64 | 64 | let kAxlyInFeeWithLoan = "_axly_fee_with_loan" | |
65 | 65 | ||
66 | 66 | let kAxlyNoLoanCapFee = "_axly_fee_cap_with_loan" | |
67 | 67 | ||
68 | 68 | let kAxlyWithLoanCapFee = "_axly_fee_cap_no_loan" | |
69 | 69 | ||
70 | 70 | let kAxlyStopLossNoLoanFee = "_axly_fee_stoploss_with_loan" | |
71 | 71 | ||
72 | 72 | let kAxlyStopLossLoanFee = "_axly_fee_stoploss_no_loan" | |
73 | 73 | ||
74 | 74 | let kRequestId = "_request_id" | |
75 | 75 | ||
76 | 76 | let kRequestIter = "requests_iter" | |
77 | 77 | ||
78 | 78 | let kPool = "pool_" | |
79 | 79 | ||
80 | 80 | let kSharePool = "_pool_share_id" | |
81 | 81 | ||
82 | 82 | let kPoolCapChange = "_pool_cap_change" | |
83 | 83 | ||
84 | 84 | let kTokenLastPrice = "last_price" | |
85 | 85 | ||
86 | 86 | let kUserStopLoss = "_stop_loss" | |
87 | 87 | ||
88 | 88 | let kMoneyBox = "axly_money_box" | |
89 | 89 | ||
90 | 90 | let kSFFarmingAddr = "swopfi_farming_addr" | |
91 | 91 | ||
92 | 92 | let kLendService = "lend_service_addr" | |
93 | 93 | ||
94 | 94 | let kPriceOracle = "price_oracle" | |
95 | 95 | ||
96 | 96 | let kExContract = "exchange_contract" | |
97 | 97 | ||
98 | 98 | let kWxSwapContract = "wx_swap_contract" | |
99 | 99 | ||
100 | 100 | let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address"))) | |
101 | 101 | ||
102 | 102 | let exContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kExContract), "No exchange contract address"))) | |
103 | 103 | ||
104 | 104 | let priceOracleAddr = Address(fromBase58String(valueOrErrorMessage(getString(this, kPriceOracle), "No price oracle address"))) | |
105 | 105 | ||
106 | 106 | let wxSwapContract = Address(fromBase58String(valueOrErrorMessage(getString(this, kWxSwapContract), "No wx swap address"))) | |
107 | 107 | ||
108 | 108 | let SWOPID = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp' | |
109 | 109 | ||
110 | 110 | let WXID = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc' | |
111 | 111 | ||
112 | 112 | func isSelfCall (i) = if ((i.caller == this)) | |
113 | 113 | then unit | |
114 | 114 | else throw("Only contract itself can call this function") | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func accountBalance (assetId) = match assetId { | |
118 | 118 | case id: ByteVector => | |
119 | 119 | assetBalance(this, id) | |
120 | 120 | case waves: Unit => | |
121 | 121 | wavesBalance(this).available | |
122 | 122 | case _ => | |
123 | 123 | throw("Match error") | |
124 | 124 | } | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | 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")) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func getWXPoolData (poolAddr) = { | |
131 | 131 | let cfg = { | |
132 | 132 | let @ = invoke(poolAddr, "getPoolConfigWrapperREADONLY", nil, nil) | |
133 | 133 | if ($isInstanceOf(@, "List[Any]")) | |
134 | 134 | then @ | |
135 | 135 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
136 | 136 | } | |
137 | 137 | if ((cfg == cfg)) | |
138 | 138 | then { | |
139 | 139 | let aId = valueOrErrorMessage({ | |
140 | 140 | let @ = cfg[4] | |
141 | 141 | if ($isInstanceOf(@, "String")) | |
142 | 142 | then @ | |
143 | 143 | else unit | |
144 | 144 | }, "Can't get pool A asset id") | |
145 | 145 | let bId = valueOrErrorMessage({ | |
146 | 146 | let @ = cfg[5] | |
147 | 147 | if ($isInstanceOf(@, "String")) | |
148 | 148 | then @ | |
149 | 149 | else unit | |
150 | 150 | }, "Can't get pool B asset id") | |
151 | 151 | let shareId = valueOrErrorMessage({ | |
152 | 152 | let @ = cfg[3] | |
153 | 153 | if ($isInstanceOf(@, "String")) | |
154 | 154 | then @ | |
155 | 155 | else unit | |
156 | 156 | }, "Can't get pool LP asset id") | |
157 | 157 | let balA = { | |
158 | 158 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [aId], nil) | |
159 | 159 | if ($isInstanceOf(@, "Int")) | |
160 | 160 | then @ | |
161 | 161 | else throw(($getType(@) + " couldn't be cast to Int")) | |
162 | 162 | } | |
163 | 163 | if ((balA == balA)) | |
164 | 164 | then { | |
165 | 165 | let balB = { | |
166 | 166 | let @ = invoke(poolAddr, "getAccBalanceWrapperREADONLY", [bId], nil) | |
167 | 167 | if ($isInstanceOf(@, "Int")) | |
168 | 168 | then @ | |
169 | 169 | else throw(($getType(@) + " couldn't be cast to Int")) | |
170 | 170 | } | |
171 | 171 | if ((balB == balB)) | |
172 | 172 | then $Tuple5(aId, bId, balA, balB, shareId) | |
173 | 173 | else throw("Strict value is not equal to itself.") | |
174 | 174 | } | |
175 | 175 | else throw("Strict value is not equal to itself.") | |
176 | 176 | } | |
177 | 177 | else throw("Strict value is not equal to itself.") | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func getPoolData (poolAddr,type) = if ((type == SF_POOL)) | |
182 | 182 | then getSFPoolData(poolAddr) | |
183 | 183 | else if ((type == WX_POOL)) | |
184 | 184 | then getWXPoolData(poolAddr) | |
185 | 185 | else throw("Wrong pool type") | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func getShareSupply (poolAddr,type,shareId) = if ((type == SF_POOL)) | |
189 | 189 | then valueOrErrorMessage(getInteger(poolAddr, kSFPoolShareSupply), "Can't get share asset supply") | |
190 | 190 | else if ((type == WX_POOL)) | |
191 | 191 | then valueOrErrorMessage(assetInfo(fromBase58String(shareId)), "Wrong ShareId").quantity | |
192 | 192 | else throw("Wrong pool type") | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func getPoolTotalShare (pool) = valueOrElse(getInteger(this, (pool + kPoolTotal)), 0) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func getPoolTotalShareWithLoan (pool) = valueOrElse(getInteger(this, (pool + kPoolTotalLoan)), 0) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (user + kUserPositionNum)), 0) + 1) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func getAxlyFee (pool,feeType) = if ((feeType == CAP_FEE_LOAN)) | |
205 | 205 | then getIntegerValue(this, (pool + kAxlyWithLoanCapFee)) | |
206 | 206 | else if ((feeType == CAP_FEE_NO_LOAN)) | |
207 | 207 | then getIntegerValue(this, (pool + kAxlyNoLoanCapFee)) | |
208 | 208 | else if ((feeType == LOAN_FEE)) | |
209 | 209 | then getIntegerValue(this, (pool + kAxlyInFeeWithLoan)) | |
210 | 210 | else if ((feeType == NO_LOAN_FEE)) | |
211 | 211 | then getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan)) | |
212 | 212 | else if ((feeType == NO_FEE)) | |
213 | 213 | then 0 | |
214 | 214 | else throw("Wrong fee type") | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr"))) | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | func getWXFarmingAddr (poolAddr) = { | |
221 | 221 | let fContract = Address(fromBase58String(valueOrErrorMessage(getString(poolAddr, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
222 | 222 | let factroyCfg = split(valueOrErrorMessage(getString(fContract, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
223 | 223 | Address(fromBase58String(factroyCfg[1])) | |
224 | 224 | } | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr"))) | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func assetIdToStr (assetId) = match assetId { | |
231 | 231 | case id: ByteVector => | |
232 | 232 | toBase58String(id) | |
233 | 233 | case waves: Unit => | |
234 | 234 | "WAVES" | |
235 | 235 | case _ => | |
236 | 236 | throw("Match error") | |
237 | 237 | } | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func assetIdFromStr (assetId) = if ((assetId == "WAVES")) | |
241 | 241 | then unit | |
242 | 242 | else fromBase58String(assetId) | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func getAssetDecimals (assetId) = if ((assetId == "WAVES")) | |
246 | 246 | then 8 | |
247 | 247 | else match assetInfo(fromBase58String(assetId)) { | |
248 | 248 | case asset: Asset => | |
249 | 249 | asset.decimals | |
250 | 250 | case _ => | |
251 | 251 | throw("Can't find asset") | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func getAssetPrecition (assetId) = pow(10, 0, getAssetDecimals(assetId), 0, 0, DOWN) | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func getAssetsPrice (assetIds) = { | |
259 | 259 | func getPrices (a,assetId) = { | |
260 | 260 | let assetPrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil) | |
261 | 261 | if ($isInstanceOf(@, "(Int, Int)")) | |
262 | 262 | then @ | |
263 | 263 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
264 | 264 | (a :+ assetPrice) | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | let $l = assetIds | |
268 | 268 | let $s = size($l) | |
269 | 269 | let $acc0 = nil | |
270 | 270 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
271 | 271 | then $a | |
272 | 272 | else getPrices($a, $l[$i]) | |
273 | 273 | ||
274 | 274 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
275 | 275 | then $a | |
276 | 276 | else throw("List size exceeds 100") | |
277 | 277 | ||
278 | 278 | $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) | |
279 | 279 | } | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | func getSharePrice (shareIds) = { | |
283 | 283 | func getPrices (a,shareId) = { | |
284 | 284 | let pool = valueOrErrorMessage(getString(this, (shareId + kSharePool)), "Can't find pool addr by share id") | |
285 | 285 | let poolAddr = Address(fromBase58String(pool)) | |
286 | 286 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
287 | 287 | let $t084288493 = getPoolData(poolAddr, pType) | |
288 | 288 | let aId = $t084288493._1 | |
289 | 289 | let bId = $t084288493._2 | |
290 | 290 | let aBalance = $t084288493._3 | |
291 | 291 | let bBalance = $t084288493._4 | |
292 | 292 | let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [aId, false], nil) | |
293 | 293 | if ($isInstanceOf(@, "(Int, Int)")) | |
294 | 294 | then @ | |
295 | 295 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
296 | 296 | let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [bId, false], nil) | |
297 | 297 | if ($isInstanceOf(@, "(Int, Int)")) | |
298 | 298 | then @ | |
299 | 299 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
300 | 300 | let shareSupply = getShareSupply(poolAddr, pType, shareId) | |
301 | 301 | let APrecision = pow(10, 0, getAssetDecimals(aId), 0, 0, DOWN) | |
302 | 302 | let BPrecision = pow(10, 0, getAssetDecimals(bId), 0, 0, DOWN) | |
303 | 303 | let sharePrecision = pow(10, 0, getAssetDecimals(shareId), 0, 0, DOWN) | |
304 | 304 | let sum = (fraction(aBalance, dPriceA, APrecision) + fraction(bBalance, dPriceB, BPrecision)) | |
305 | 305 | let sharePrice = fraction(sum, sharePrecision, shareSupply) | |
306 | 306 | (a :+ sharePrice) | |
307 | 307 | } | |
308 | 308 | ||
309 | 309 | let $l = shareIds | |
310 | 310 | let $s = size($l) | |
311 | 311 | let $acc0 = nil | |
312 | 312 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
313 | 313 | then $a | |
314 | 314 | else getPrices($a, $l[$i]) | |
315 | 315 | ||
316 | 316 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
317 | 317 | then $a | |
318 | 318 | else throw("List size exceeds 50") | |
319 | 319 | ||
320 | 320 | $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) | |
321 | 321 | } | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | func getCursEntries (aId,bId,shareId) = { | |
325 | 325 | let assetsPrices = getAssetsPrice([aId, bId]) | |
326 | 326 | let sharePrice = getSharePrice([shareId]) | |
327 | 327 | let prices = [toString(assetsPrices[0]), toString(assetsPrices[1]), toString(sharePrice[0])] | |
328 | 328 | [StringEntry(kTokenLastPrice, makeString(prices, ","))] | |
329 | 329 | } | |
330 | 330 | ||
331 | 331 | ||
332 | 332 | func calcReplenishByTwoTokens (pType,poolAddr,pmtA,aId,pmtB,bId,balA,balB) = { | |
333 | 333 | let $t096459950 = if ((pType == SF_POOL)) | |
334 | 334 | then $Tuple2(nil, nil) | |
335 | 335 | else $Tuple2(split({ | |
336 | 336 | let @ = invoke(poolAddr, "evaluatePutByAmountAssetREADONLY", [pmtA], nil) | |
337 | 337 | if ($isInstanceOf(@, "String")) | |
338 | 338 | then @ | |
339 | 339 | else throw(($getType(@) + " couldn't be cast to String")) | |
340 | 340 | }, "__"), split({ | |
341 | 341 | let @ = invoke(poolAddr, "evaluatePutByPriceAssetREADONLY", [pmtB], nil) | |
342 | 342 | if ($isInstanceOf(@, "String")) | |
343 | 343 | then @ | |
344 | 344 | else throw(($getType(@) + " couldn't be cast to String")) | |
345 | 345 | }, "__")) | |
346 | 346 | if (($t096459950 == $t096459950)) | |
347 | 347 | then { | |
348 | 348 | let evalPutInB = $t096459950._2 | |
349 | 349 | let evalPutInA = $t096459950._1 | |
350 | 350 | let $t0996010156 = if ((pType == SF_POOL)) | |
351 | 351 | then $Tuple2(fraction(SCALE8, pmtA, balA), fraction(SCALE8, pmtB, balB)) | |
352 | 352 | else $Tuple2(parseIntValue(evalPutInA[1]), parseIntValue(evalPutInB[1])) | |
353 | 353 | let ratioA = $t0996010156._1 | |
354 | 354 | let ratioB = $t0996010156._2 | |
355 | 355 | let $t01016210644 = if ((ratioB > ratioA)) | |
356 | 356 | then { | |
357 | 357 | let pmt = if ((pType == SF_POOL)) | |
358 | 358 | then fraction(balB, ratioA, SCALE8, CEILING) | |
359 | 359 | else parseIntValue(evalPutInA[8]) | |
360 | 360 | $Tuple5(pmtA, pmt, (pmtB - pmt), bId, ratioB) | |
361 | 361 | } | |
362 | 362 | else { | |
363 | 363 | let pmt = if ((pType == SF_POOL)) | |
364 | 364 | then fraction(balA, ratioB, SCALE8, CEILING) | |
365 | 365 | else parseIntValue(evalPutInB[7]) | |
366 | 366 | $Tuple5(pmt, pmtB, (pmtA - pmt), aId, ratioA) | |
367 | 367 | } | |
368 | 368 | let pmtInA = $t01016210644._1 | |
369 | 369 | let pmtInB = $t01016210644._2 | |
370 | 370 | let change = $t01016210644._3 | |
371 | 371 | let changeAssetId = $t01016210644._4 | |
372 | 372 | let lp = $t01016210644._5 | |
373 | 373 | $Tuple5(pmtInA, pmtInB, change, changeAssetId, lp) | |
374 | 374 | } | |
375 | 375 | else throw("Strict value is not equal to itself.") | |
376 | 376 | } | |
377 | 377 | ||
378 | 378 | ||
379 | 379 | func replenishTwoTokensByType (poolAddr,pType,pmtA,aId,pmtB,bId) = { | |
380 | 380 | let payments = [AttachedPayment(assetIdFromStr(aId), pmtA), AttachedPayment(assetIdFromStr(bId), pmtB)] | |
381 | 381 | if ((pType == SF_POOL)) | |
382 | 382 | then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments) | |
383 | 383 | else invoke(poolAddr, "put", [1000000, false], payments) | |
384 | 384 | } | |
385 | 385 | ||
386 | 386 | ||
387 | 387 | func replenishOneTokenByType (poolAddr,pType,pmt,pmtId) = { | |
388 | 388 | let payments = [AttachedPayment(assetIdFromStr(pmtId), pmt)] | |
389 | 389 | if ((pType == SF_POOL)) | |
390 | 390 | then invoke(poolAddr, "callFunction", ["replenishWithOneToken", ["0", "false", "0"]], payments) | |
391 | 391 | else invoke(poolAddr, "putOneTkn", [0, false], payments) | |
392 | 392 | } | |
393 | 393 | ||
394 | 394 | ||
395 | 395 | func stakeLP (pool,pType,shareId,amount) = { | |
396 | 396 | let payments = [AttachedPayment(fromBase58String(shareId), amount)] | |
397 | 397 | if ((pType == SF_POOL)) | |
398 | 398 | then invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], payments) | |
399 | 399 | else invoke(getWXFarmingAddr(addressFromStringValue(pool)), "stake", nil, payments) | |
400 | 400 | } | |
401 | 401 | ||
402 | 402 | ||
403 | 403 | func unstakeLP (pool,pType,shareId,amount) = { | |
404 | 404 | let $t01187412231 = if ((pType == SF_POOL)) | |
405 | 405 | then $Tuple3(getSFFarmingAddr(), "withdrawShareTokens", [pool, amount]) | |
406 | 406 | else if ((pType == WX_POOL)) | |
407 | 407 | then $Tuple3(getWXFarmingAddr(Address(fromBase58String(pool))), "unstake", [shareId, amount]) | |
408 | 408 | else throw("Wrong pool type") | |
409 | 409 | let farmAddr = $t01187412231._1 | |
410 | 410 | let fName = $t01187412231._2 | |
411 | 411 | let params = $t01187412231._3 | |
412 | 412 | let inv = invoke(farmAddr, fName, params, nil) | |
413 | 413 | if ((inv == inv)) | |
414 | 414 | then amount | |
415 | 415 | else throw("Strict value is not equal to itself.") | |
416 | 416 | } | |
417 | 417 | ||
418 | 418 | ||
419 | 419 | func calcAmountToPaySF (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
420 | 420 | let poolAddr = Address(fromBase58String(pool)) | |
421 | 421 | let feeScale6 = 1000000 | |
422 | 422 | let fee = getIntegerValue(poolAddr, kSFPoolFee) | |
423 | 423 | let amntGetNoFee = fraction(amountTokenToGet, feeScale6, (feeScale6 - fee)) | |
424 | 424 | let $t01264412932 = if ((assetTokenToGet == assetIdA)) | |
425 | 425 | then { | |
426 | 426 | let amountToPay = fraction(balA, amntGetNoFee, (balB - amntGetNoFee)) | |
427 | 427 | $Tuple2(amountToPay, assetIdB) | |
428 | 428 | } | |
429 | 429 | else { | |
430 | 430 | let amountToPay = fraction(balB, amntGetNoFee, (balA - amntGetNoFee)) | |
431 | 431 | $Tuple2(amountToPay, assetIdA) | |
432 | 432 | } | |
433 | 433 | let amountToPay = $t01264412932._1 | |
434 | 434 | let assetToPay = $t01264412932._2 | |
435 | 435 | $Tuple2(assetToPay, amountToPay) | |
436 | 436 | } | |
437 | 437 | ||
438 | 438 | ||
439 | 439 | func calcAmountToPayWX (pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = { | |
440 | 440 | let prFee = getIntegerValue(wxSwapContract, "%s__protocolFee") | |
441 | 441 | let pFee = getIntegerValue(wxSwapContract, "%s__poolFee") | |
442 | 442 | let feeScale = toBigInt(100000000) | |
443 | 443 | let $t01327113579 = if ((assetTokenToGet == assetIdA)) | |
444 | 444 | then { | |
445 | 445 | let amountToPay = fraction(balA, amountTokenToGet, (balB - amountTokenToGet)) | |
446 | 446 | $Tuple2(amountToPay, assetIdB) | |
447 | 447 | } | |
448 | 448 | else { | |
449 | 449 | let amountToPay = fraction(balB, amountTokenToGet, (balA - amountTokenToGet)) | |
450 | 450 | $Tuple2(amountToPay, assetIdA) | |
451 | 451 | } | |
452 | 452 | let amountToPay = $t01327113579._1 | |
453 | 453 | let assetToPay = $t01327113579._2 | |
454 | 454 | let amountToPayWithFee = toInt(fraction(toBigInt(amountToPay), feeScale, (feeScale - toBigInt((prFee + pFee))))) | |
455 | 455 | $Tuple2(assetToPay, amountToPayWithFee) | |
456 | 456 | } | |
457 | 457 | ||
458 | 458 | ||
459 | 459 | func exchangeDirectly (type,pool,assetIdA,assetIdB,balA,balB,amountTokenToGet,assetTokenToGet) = if ((type == SF_POOL)) | |
460 | 460 | then { | |
461 | 461 | let $t01391714039 = calcAmountToPaySF(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
462 | 462 | let assetToPay = $t01391714039._1 | |
463 | 463 | let amountToPay = $t01391714039._2 | |
464 | 464 | invoke(addressFromStringValue(pool), "callFunction", ["exchange", ["1"]], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
465 | 465 | } | |
466 | 466 | else { | |
467 | 467 | let $t01419014312 = calcAmountToPayWX(pool, assetIdA, assetIdB, balA, balB, amountTokenToGet, assetTokenToGet) | |
468 | 468 | let assetToPay = $t01419014312._1 | |
469 | 469 | let amountToPay = $t01419014312._2 | |
470 | 470 | invoke(wxSwapContract, "swap", [1, assetTokenToGet, toString(this)], [AttachedPayment(assetIdFromStr(assetToPay), amountToPay)]) | |
471 | 471 | } | |
472 | 472 | ||
473 | 473 | ||
474 | 474 | func calcReplenishLPVirt (pType,pool,pmtA,aId,pmtB,bId,balA,balB) = { | |
475 | 475 | let poolAddr = addressFromStringValue(pool) | |
476 | 476 | if ((pType == SF_POOL)) | |
477 | 477 | then { | |
478 | 478 | let inv = { | |
479 | 479 | let @ = invoke(poolAddr, "callFunction", ["calcLPReplenishDiffPropREADONLY", [toString(pmtA), toString(pmtB), "0"]], nil) | |
480 | 480 | if ($isInstanceOf(@, "List[Any]")) | |
481 | 481 | then @ | |
482 | 482 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
483 | 483 | } | |
484 | 484 | if ((inv == inv)) | |
485 | 485 | then { | |
486 | 486 | let @ = inv[0] | |
487 | 487 | if ($isInstanceOf(@, "Int")) | |
488 | 488 | then @ | |
489 | 489 | else throw(($getType(@) + " couldn't be cast to Int")) | |
490 | 490 | } | |
491 | 491 | else throw("Strict value is not equal to itself.") | |
492 | 492 | } | |
493 | 493 | else if ((pType == WX_POOL)) | |
494 | 494 | then { | |
495 | 495 | let $t01487715218 = if (if ((pmtA > 0)) | |
496 | 496 | then (pmtB > 0) | |
497 | 497 | else false) | |
498 | 498 | then { | |
499 | 499 | let $t01495815084 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
500 | 500 | let pmtInA = $t01495815084._1 | |
501 | 501 | let pmtInB = $t01495815084._2 | |
502 | 502 | let change = $t01495815084._3 | |
503 | 503 | let changeId = $t01495815084._4 | |
504 | 504 | let lpAmount = $t01495815084._5 | |
505 | 505 | $Tuple3(change, changeId, lpAmount) | |
506 | 506 | } | |
507 | 507 | else if ((pmtA > 0)) | |
508 | 508 | then $Tuple3(pmtA, aId, 0) | |
509 | 509 | else $Tuple3(pmtB, bId, 0) | |
510 | 510 | let change = $t01487715218._1 | |
511 | 511 | let changeId = $t01487715218._2 | |
512 | 512 | let lpTwo = $t01487715218._3 | |
513 | 513 | let lpOne = if ((change > 0)) | |
514 | 514 | then { | |
515 | 515 | let inv = { | |
516 | 516 | let @ = invoke(poolAddr, "putOneTknREADONLY", [changeId, change], nil) | |
517 | 517 | if ($isInstanceOf(@, "(Int, Int, Int)")) | |
518 | 518 | then @ | |
519 | 519 | else throw(($getType(@) + " couldn't be cast to (Int, Int, Int)")) | |
520 | 520 | } | |
521 | 521 | if ((inv == inv)) | |
522 | 522 | then inv._1 | |
523 | 523 | else throw("Strict value is not equal to itself.") | |
524 | 524 | } | |
525 | 525 | else 0 | |
526 | 526 | (lpTwo + lpOne) | |
527 | 527 | } | |
528 | 528 | else throw("Wrong pool type") | |
529 | 529 | } | |
530 | 530 | ||
531 | 531 | ||
532 | 532 | func calcWithdrawLPVirt (pType,pool,lpAmount,shareId,aId,bId,balA,balB,borrowAmount,borrowAssetId) = { | |
533 | 533 | let poolAddr = addressFromStringValue(pool) | |
534 | 534 | let $t01570416170 = if ((pType == SF_POOL)) | |
535 | 535 | then { | |
536 | 536 | let inv = { | |
537 | 537 | let @ = invoke(poolAddr, "callFunction", ["withdrawREADONLY", [toString(lpAmount)]], nil) | |
538 | 538 | if ($isInstanceOf(@, "List[Any]")) | |
539 | 539 | then @ | |
540 | 540 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
541 | 541 | } | |
542 | 542 | if ((inv == inv)) | |
543 | 543 | then $Tuple2({ | |
544 | 544 | let @ = inv[0] | |
545 | 545 | if ($isInstanceOf(@, "Int")) | |
546 | 546 | then @ | |
547 | 547 | else throw(($getType(@) + " couldn't be cast to Int")) | |
548 | 548 | }, { | |
549 | 549 | let @ = inv[1] | |
550 | 550 | if ($isInstanceOf(@, "Int")) | |
551 | 551 | then @ | |
552 | 552 | else throw(($getType(@) + " couldn't be cast to Int")) | |
553 | 553 | }) | |
554 | 554 | else throw("Strict value is not equal to itself.") | |
555 | 555 | } | |
556 | 556 | else if ((pType == WX_POOL)) | |
557 | 557 | then { | |
558 | 558 | let get = split({ | |
559 | 559 | let @ = invoke(poolAddr, "evaluateGetREADONLY", [shareId, lpAmount], nil) | |
560 | 560 | if ($isInstanceOf(@, "String")) | |
561 | 561 | then @ | |
562 | 562 | else throw(($getType(@) + " couldn't be cast to String")) | |
563 | 563 | }, "__") | |
564 | 564 | if ((get == get)) | |
565 | 565 | then $Tuple2(parseIntValue(get[1]), parseIntValue(get[2])) | |
566 | 566 | else throw("Strict value is not equal to itself.") | |
567 | 567 | } | |
568 | 568 | else throw("Wrong pool type") | |
569 | 569 | let getAmountA = $t01570416170._1 | |
570 | 570 | let getAmountB = $t01570416170._2 | |
571 | 571 | if ((borrowAmount > 0)) | |
572 | 572 | then { | |
573 | 573 | let amountToGetEx = if (if ((borrowAssetId == aId)) | |
574 | 574 | then (borrowAmount > getAmountA) | |
575 | 575 | else false) | |
576 | 576 | then (borrowAmount - getAmountA) | |
577 | 577 | else if (if ((borrowAssetId == bId)) | |
578 | 578 | then (borrowAmount > getAmountB) | |
579 | 579 | else false) | |
580 | 580 | then (borrowAmount - getAmountB) | |
581 | 581 | else 0 | |
582 | 582 | let $t01647316788 = if ((amountToGetEx > 0)) | |
583 | 583 | then if ((pType == SF_POOL)) | |
584 | 584 | then calcAmountToPaySF(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId) | |
585 | 585 | else calcAmountToPayWX(pool, aId, bId, balA, balB, amountToGetEx, borrowAssetId) | |
586 | 586 | else $Tuple2("", 0) | |
587 | 587 | let assetToPay = $t01647316788._1 | |
588 | 588 | let amountToPay = $t01647316788._2 | |
589 | 589 | if ((borrowAssetId == aId)) | |
590 | 590 | then $Tuple2(((getAmountA + amountToGetEx) - borrowAmount), (getAmountB - amountToPay)) | |
591 | 591 | else $Tuple2((getAmountA - amountToPay), ((getAmountB + amountToGetEx) - borrowAmount)) | |
592 | 592 | } | |
593 | 593 | else $Tuple2(getAmountA, getAmountB) | |
594 | 594 | } | |
595 | 595 | ||
596 | 596 | ||
597 | 597 | func claimFarmed (type,pool) = if ((type == SF_POOL)) | |
598 | 598 | then { | |
599 | 599 | let balBefore = accountBalance(SWOPID) | |
600 | 600 | if ((balBefore == balBefore)) | |
601 | 601 | then { | |
602 | 602 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
603 | 603 | if ((inv == inv)) | |
604 | 604 | then { | |
605 | 605 | let balAfter = accountBalance(SWOPID) | |
606 | 606 | $Tuple2((balAfter - balBefore), SWOPID) | |
607 | 607 | } | |
608 | 608 | else throw("Strict value is not equal to itself.") | |
609 | 609 | } | |
610 | 610 | else throw("Strict value is not equal to itself.") | |
611 | 611 | } | |
612 | 612 | else if ((type == WX_POOL)) | |
613 | 613 | then { | |
614 | 614 | let balBefore = accountBalance(WXID) | |
615 | 615 | if ((balBefore == balBefore)) | |
616 | 616 | then { | |
617 | 617 | let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil) | |
618 | 618 | if ((inv == inv)) | |
619 | 619 | then { | |
620 | 620 | let balAfter = accountBalance(WXID) | |
621 | 621 | $Tuple2((balAfter - balBefore), WXID) | |
622 | 622 | } | |
623 | 623 | else throw("Strict value is not equal to itself.") | |
624 | 624 | } | |
625 | 625 | else throw("Strict value is not equal to itself.") | |
626 | 626 | } | |
627 | 627 | else throw("Wrong pool type") | |
628 | 628 | ||
629 | 629 | ||
630 | 630 | func replenishByType (pType,pool,feeType,pmtA,aId,pmtB,bId,balA,balB,LPId) = { | |
631 | 631 | let lpBalanceBefore = accountBalance(fromBase58String(LPId)) | |
632 | 632 | if ((lpBalanceBefore == lpBalanceBefore)) | |
633 | 633 | then { | |
634 | 634 | let poolAddr = addressFromStringValue(pool) | |
635 | 635 | let $t01799718413 = if (if ((pmtA > 0)) | |
636 | 636 | then (pmtB > 0) | |
637 | 637 | else false) | |
638 | 638 | then { | |
639 | 639 | let $t01806318179 = calcReplenishByTwoTokens(pType, poolAddr, pmtA, aId, pmtB, bId, balA, balB) | |
640 | 640 | let pmtInA = $t01806318179._1 | |
641 | 641 | let pmtInB = $t01806318179._2 | |
642 | 642 | let change = $t01806318179._3 | |
643 | 643 | let changeId = $t01806318179._4 | |
644 | 644 | let inv = replenishTwoTokensByType(poolAddr, pType, pmtInA, aId, pmtInB, bId) | |
645 | 645 | if ((inv == inv)) | |
646 | 646 | then $Tuple2(change, changeId) | |
647 | 647 | else throw("Strict value is not equal to itself.") | |
648 | 648 | } | |
649 | 649 | else if ((pmtA > 0)) | |
650 | 650 | then $Tuple2(pmtA, aId) | |
651 | 651 | else if ((pmtB > 0)) | |
652 | 652 | then $Tuple2(pmtB, bId) | |
653 | 653 | else throw("pmts must be > 0") | |
654 | 654 | let change = $t01799718413._1 | |
655 | 655 | let changeId = $t01799718413._2 | |
656 | 656 | let inv = if ((change > 0)) | |
657 | 657 | then replenishOneTokenByType(poolAddr, pType, change, changeId) | |
658 | 658 | else nil | |
659 | 659 | if ((inv == inv)) | |
660 | 660 | then { | |
661 | 661 | let lpBalanceAfter = accountBalance(fromBase58String(LPId)) | |
662 | 662 | let totalStaked = (lpBalanceAfter - lpBalanceBefore) | |
663 | 663 | let axlyFeeAmount = fraction(totalStaked, getAxlyFee(pool, feeType), FEE_SCALE6) | |
664 | 664 | let userShareForStake = (totalStaked - axlyFeeAmount) | |
665 | 665 | if ((0 >= userShareForStake)) | |
666 | 666 | then throw("amount of staked sharetokens must be > 0") | |
667 | 667 | else { | |
668 | 668 | let invLP = stakeLP(pool, pType, LPId, userShareForStake) | |
669 | 669 | if ((invLP == invLP)) | |
670 | 670 | then $Tuple2(userShareForStake, axlyFeeAmount) | |
671 | 671 | else throw("Strict value is not equal to itself.") | |
672 | 672 | } | |
673 | 673 | } | |
674 | 674 | else throw("Strict value is not equal to itself.") | |
675 | 675 | } | |
676 | 676 | else throw("Strict value is not equal to itself.") | |
677 | 677 | } | |
678 | 678 | ||
679 | 679 | ||
680 | 680 | func replenishEntries (pool,user,stakedAmount,axlyFeeAmount,posNum,shareId,type,withLoan) = { | |
681 | 681 | let totalAmount = getPoolTotalShare(pool) | |
682 | 682 | let totalAmountLoan = getPoolTotalShareWithLoan(pool) | |
683 | 683 | let $t01927119509 = if (withLoan) | |
684 | 684 | then $Tuple2(getIntegerValue(this, (pool + kPoolInterestLoan)), (totalAmountLoan + stakedAmount)) | |
685 | 685 | else $Tuple2(getIntegerValue(this, (pool + kPoolInterestNoLoan)), totalAmountLoan) | |
686 | 686 | let curPoolInterest = $t01927119509._1 | |
687 | 687 | let totalStakedWithLoan = $t01927119509._2 | |
688 | 688 | [IntegerEntry((pool + kPoolTotal), (totalAmount + stakedAmount)), IntegerEntry((pool + kPoolTotalLoan), totalStakedWithLoan), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPosition), stakedAmount), IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserPositionInterest), curPoolInterest), StringEntry((((user + "_") + toString(posNum)) + kUserPositionPool), pool), IntegerEntry((user + kUserPositionNum), posNum), ScriptTransfer(moneyBox, axlyFeeAmount, fromBase58String(shareId))] | |
689 | 689 | } | |
690 | 690 | ||
691 | 691 | ||
692 | 692 | func exchangeKeeper (toToken,pmtAmount,pmtAsset,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
693 | 693 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
694 | 694 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
695 | 695 | then { | |
696 | 696 | let inv = invoke(exContract, "swap", [amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
697 | 697 | if ((inv == inv)) | |
698 | 698 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
699 | 699 | else throw("Strict value is not equal to itself.") | |
700 | 700 | } | |
701 | 701 | else throw("Strict value is not equal to itself.") | |
702 | 702 | } | |
703 | 703 | ||
704 | 704 | ||
705 | 705 | func exchangePuzzle (toToken,pmtAmount,pmtAsset,routesStr,minToReceive,options) = { | |
706 | 706 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
707 | 707 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
708 | 708 | then { | |
709 | 709 | let inv = invoke(exContract, "puzzleSwap", [routesStr, minToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
710 | 710 | if ((inv == inv)) | |
711 | 711 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
712 | 712 | else throw("Strict value is not equal to itself.") | |
713 | 713 | } | |
714 | 714 | else throw("Strict value is not equal to itself.") | |
715 | 715 | } | |
716 | 716 | ||
717 | 717 | ||
718 | 718 | func exchangeSwopFi (toToken,pmtAmount,pmtAsset,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
719 | 719 | let tokenBalanceBefore = accountBalance(assetIdFromStr(toToken)) | |
720 | 720 | if ((tokenBalanceBefore == tokenBalanceBefore)) | |
721 | 721 | then { | |
722 | 722 | let inv = invoke(exContract, "swopfiSwap", [exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options], [AttachedPayment(pmtAsset, pmtAmount)]) | |
723 | 723 | if ((inv == inv)) | |
724 | 724 | then (accountBalance(assetIdFromStr(toToken)) - tokenBalanceBefore) | |
725 | 725 | else throw("Strict value is not equal to itself.") | |
726 | 726 | } | |
727 | 727 | else throw("Strict value is not equal to itself.") | |
728 | 728 | } | |
729 | 729 | ||
730 | 730 | ||
731 | 731 | func capitalize (pool,pType,tokenId,tokenAmount) = { | |
732 | 732 | let poolAddr = Address(fromBase58String(pool)) | |
733 | 733 | let $t02186021939 = getPoolData(poolAddr, pType) | |
734 | 734 | let AId = $t02186021939._1 | |
735 | 735 | let BId = $t02186021939._2 | |
736 | 736 | let balA = $t02186021939._3 | |
737 | 737 | let balB = $t02186021939._4 | |
738 | 738 | let shareId = $t02186021939._5 | |
739 | 739 | let $t02194222022 = if ((tokenId == AId)) | |
740 | 740 | then $Tuple2(tokenAmount, 0) | |
741 | 741 | else $Tuple2(0, tokenAmount) | |
742 | 742 | let pmtA = $t02194222022._1 | |
743 | 743 | let pmtB = $t02194222022._2 | |
744 | 744 | let $t02202522129 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
745 | 745 | let stakedAmount = $t02202522129._1 | |
746 | 746 | let nf = $t02202522129._2 | |
747 | 747 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
748 | 748 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
749 | 749 | let totalShareAmount = getPoolTotalShare(pool) | |
750 | 750 | let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool) | |
751 | 751 | let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount) | |
752 | 752 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
753 | 753 | let stakedNoLoan = (stakedAmount - stakedLoan) | |
754 | 754 | let newInterestLoan = if ((totalShareAmountWithLoan > 0)) | |
755 | 755 | then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan)) | |
756 | 756 | else 0 | |
757 | 757 | let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0)) | |
758 | 758 | then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan))) | |
759 | 759 | else 0 | |
760 | 760 | let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
761 | 761 | let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
762 | 762 | let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan)) | |
763 | 763 | if ((axlyFee == axlyFee)) | |
764 | 764 | then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId)) | |
765 | 765 | else throw("Strict value is not equal to itself.") | |
766 | 766 | } | |
767 | 767 | ||
768 | 768 | ||
769 | 769 | func withdrawAmountCalc (pool,userCanWithdraw,debt,borrowAsset) = { | |
770 | 770 | let poolAddr = Address(fromBase58String(pool)) | |
771 | 771 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
772 | 772 | let $t02389723973 = getPoolData(poolAddr, pType) | |
773 | 773 | let assetIdA = $t02389723973._1 | |
774 | 774 | let assetIdB = $t02389723973._2 | |
775 | 775 | let balA = $t02389723973._3 | |
776 | 776 | let balB = $t02389723973._4 | |
777 | 777 | let shareId = $t02389723973._5 | |
778 | 778 | let cBalABefore = accountBalance(assetIdFromStr(assetIdA)) | |
779 | 779 | if ((cBalABefore == cBalABefore)) | |
780 | 780 | then { | |
781 | 781 | let cBalBBefore = accountBalance(assetIdFromStr(assetIdB)) | |
782 | 782 | if ((cBalBBefore == cBalBBefore)) | |
783 | 783 | then { | |
784 | 784 | let inv = if ((pType == SF_POOL)) | |
785 | 785 | then invoke(poolAddr, "callFunction", ["withdraw", [toString(userCanWithdraw)]], nil) | |
786 | 786 | else { | |
787 | 787 | let inv = unstakeLP(pool, pType, shareId, userCanWithdraw) | |
788 | 788 | if ((inv == inv)) | |
789 | 789 | then invoke(poolAddr, "get", nil, [AttachedPayment(assetIdFromStr(shareId), userCanWithdraw)]) | |
790 | 790 | else throw("Strict value is not equal to itself.") | |
791 | 791 | } | |
792 | 792 | if ((inv == inv)) | |
793 | 793 | then { | |
794 | 794 | let cBalAAfter = accountBalance(assetIdFromStr(assetIdA)) | |
795 | 795 | let cBalBAfter = accountBalance(assetIdFromStr(assetIdB)) | |
796 | 796 | let $t02453624625 = $Tuple2((cBalAAfter - cBalABefore), (cBalBAfter - cBalBBefore)) | |
797 | 797 | let tokensAmountA = $t02453624625._1 | |
798 | 798 | let tokensAmountB = $t02453624625._2 | |
799 | 799 | let $t02462825324 = if ((debt > 0)) | |
800 | 800 | then { | |
801 | 801 | let amountToGetEx = if (if ((borrowAsset == assetIdA)) | |
802 | 802 | then (debt > tokensAmountA) | |
803 | 803 | else false) | |
804 | 804 | then (debt - tokensAmountA) | |
805 | 805 | else if (if ((borrowAsset == assetIdB)) | |
806 | 806 | then (debt > tokensAmountB) | |
807 | 807 | else false) | |
808 | 808 | then (debt - tokensAmountB) | |
809 | 809 | else 0 | |
810 | 810 | let exInv = if ((amountToGetEx > 0)) | |
811 | 811 | then exchangeDirectly(pType, pool, assetIdA, assetIdB, balA, balB, amountToGetEx, borrowAsset) | |
812 | 812 | else 0 | |
813 | 813 | if ((exInv == exInv)) | |
814 | 814 | then { | |
815 | 815 | let cBalAAfterRepay = accountBalance(assetIdFromStr(assetIdA)) | |
816 | 816 | let cBalBAfterRepay = accountBalance(assetIdFromStr(assetIdB)) | |
817 | 817 | $Tuple2((cBalAAfterRepay - cBalABefore), (cBalBAfterRepay - cBalBBefore)) | |
818 | 818 | } | |
819 | 819 | else throw("Strict value is not equal to itself.") | |
820 | 820 | } | |
821 | 821 | else $Tuple2(tokensAmountA, tokensAmountB) | |
822 | 822 | let toUserAmountA = $t02462825324._1 | |
823 | 823 | let toUserAmountB = $t02462825324._2 | |
824 | 824 | $Tuple7(toUserAmountA, assetIdA, toUserAmountB, assetIdB, cBalAAfter, cBalBAfter, shareId) | |
825 | 825 | } | |
826 | 826 | else throw("Strict value is not equal to itself.") | |
827 | 827 | } | |
828 | 828 | else throw("Strict value is not equal to itself.") | |
829 | 829 | } | |
830 | 830 | else throw("Strict value is not equal to itself.") | |
831 | 831 | } | |
832 | 832 | ||
833 | 833 | ||
834 | 834 | func userCanWithdrawShareCalc (user,pool,posId,borrowed) = { | |
835 | 835 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
836 | 836 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)) | |
837 | 837 | let poolInterest = if (borrowed) | |
838 | 838 | then getIntegerValue(this, (pool + kPoolInterestLoan)) | |
839 | 839 | else getIntegerValue(this, (pool + kPoolInterestNoLoan)) | |
840 | 840 | (pAmount + fraction(pAmount, (poolInterest - userInterest), SCALE10)) | |
841 | 841 | } | |
842 | 842 | ||
843 | 843 | ||
844 | 844 | func withdrawToUser (user,pool,posId,stopLoss) = { | |
845 | 845 | let pAmount = valueOrErrorMessage(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserPosition)), "Unknown position") | |
846 | 846 | let userInterest = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)) | |
847 | 847 | let borrowAmount = valueOrElse(getInteger(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)), 0) | |
848 | 848 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
849 | 849 | let poolTotalShare = getPoolTotalShare(pool) | |
850 | 850 | let userAddr = Address(fromBase58String(user)) | |
851 | 851 | let borrowAsset = valueOrElse(getString(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)), "") | |
852 | 852 | let debt = if ((borrowAmount > 0)) | |
853 | 853 | then { | |
854 | 854 | let @ = invoke(getLendSrvAddr(), "getAssetDebt", [false, ((((pool + "_") + user) + "_") + posId), borrowAsset], nil) | |
855 | 855 | if ($isInstanceOf(@, "Int")) | |
856 | 856 | then @ | |
857 | 857 | else throw(($getType(@) + " couldn't be cast to Int")) | |
858 | 858 | } | |
859 | 859 | else 0 | |
860 | 860 | let $t02683626989 = withdrawAmountCalc(pool, userCanWithdraw, debt, borrowAsset) | |
861 | 861 | if (($t02683626989 == $t02683626989)) | |
862 | 862 | then { | |
863 | 863 | let shareId = $t02683626989._7 | |
864 | 864 | let cBalBAfter = $t02683626989._6 | |
865 | 865 | let cBalAAfter = $t02683626989._5 | |
866 | 866 | let assetIdB = $t02683626989._4 | |
867 | 867 | let toUserAmountB = $t02683626989._3 | |
868 | 868 | let assetIdA = $t02683626989._2 | |
869 | 869 | let toUserAmountA = $t02683626989._1 | |
870 | 870 | let closeDbtInv = if ((debt > 0)) | |
871 | 871 | then invoke(getLendSrvAddr(), "repayFor", [((user + "_") + posId)], [AttachedPayment(assetIdFromStr(borrowAsset), debt)]) | |
872 | 872 | else 0 | |
873 | 873 | if ((closeDbtInv == closeDbtInv)) | |
874 | 874 | then ([DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition)), DeleteEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest)), IntegerEntry((pool + kPoolTotal), (poolTotalShare - userCanWithdraw)), ScriptTransfer(userAddr, toUserAmountA, assetIdFromStr(assetIdA)), ScriptTransfer(userAddr, toUserAmountB, assetIdFromStr(assetIdB))] ++ getCursEntries(assetIdA, assetIdB, shareId)) | |
875 | 875 | else throw("Strict value is not equal to itself.") | |
876 | 876 | } | |
877 | 877 | else throw("Strict value is not equal to itself.") | |
878 | 878 | } | |
879 | 879 | ||
880 | 880 | ||
881 | 881 | func parseRequest (requestId) = { | |
882 | 882 | let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",") | |
883 | 883 | let user = request[0] | |
884 | 884 | let pool = request[1] | |
885 | 885 | let pmtA = parseIntValue(request[2]) | |
886 | 886 | let AId = request[3] | |
887 | 887 | let pmtB = parseIntValue(request[4]) | |
888 | 888 | let BId = request[5] | |
889 | 889 | let balA = parseIntValue(request[6]) | |
890 | 890 | let balB = parseIntValue(request[7]) | |
891 | 891 | let shareId = request[8] | |
892 | 892 | let bwAsset = request[9] | |
893 | 893 | let bwAmount = parseIntValue(request[10]) | |
894 | 894 | $Tuple11(user, pool, pmtA, AId, pmtB, BId, balA, balB, shareId, bwAsset, bwAmount) | |
895 | 895 | } | |
896 | 896 | ||
897 | 897 | ||
898 | 898 | @Callable(i) | |
899 | 899 | func replenishEVALONLY (pool,leverage,borrowAssetId,pmtA,pmtB) = if (if ((100 > leverage)) | |
900 | 900 | then true | |
901 | 901 | else (leverage > 300)) | |
902 | 902 | then throw("Leverage can't be <100 and >300") | |
903 | 903 | else { | |
904 | 904 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
905 | 905 | let $t02850128591 = getPoolData(Address(fromBase58String(pool)), pType) | |
906 | 906 | let AId = $t02850128591._1 | |
907 | 907 | let BId = $t02850128591._2 | |
908 | 908 | let balA = $t02850128591._3 | |
909 | 909 | let balB = $t02850128591._4 | |
910 | 910 | let shareId = $t02850128591._5 | |
911 | 911 | let borrowAmount = if ((leverage > 100)) | |
912 | 912 | then { | |
913 | 913 | let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [AId, false], nil) | |
914 | 914 | if ($isInstanceOf(@, "(Int, Int)")) | |
915 | 915 | then @ | |
916 | 916 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
917 | 917 | let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [BId, false], nil) | |
918 | 918 | if ($isInstanceOf(@, "(Int, Int)")) | |
919 | 919 | then @ | |
920 | 920 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
921 | 921 | let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(AId), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(BId), 0, 0, DOWN))) | |
922 | 922 | let borrowPrice = if ((borrowAssetId == AId)) | |
923 | 923 | then dPriceA | |
924 | 924 | else dPriceB | |
925 | 925 | (fraction(paydInDollar, (leverage - 100), 100) / borrowPrice) | |
926 | 926 | } | |
927 | 927 | else 0 | |
928 | 928 | let $t02916029272 = if ((borrowAssetId == AId)) | |
929 | 929 | then $Tuple2((pmtA + borrowAmount), pmtB) | |
930 | 930 | else $Tuple2(pmtA, (pmtB + borrowAmount)) | |
931 | 931 | let payInA = $t02916029272._1 | |
932 | 932 | let payInB = $t02916029272._2 | |
933 | 933 | let lpAmount = calcReplenishLPVirt(pType, pool, pmtA, AId, pmtB, BId, balA, balB) | |
934 | 934 | let newBalA = (balA + payInA) | |
935 | 935 | let newBalB = (balB + payInB) | |
936 | 936 | let $t02942529566 = calcWithdrawLPVirt(pType, pool, lpAmount, shareId, AId, BId, newBalA, newBalB, borrowAmount, borrowAssetId) | |
937 | 937 | if (($t02942529566 == $t02942529566)) | |
938 | 938 | then { | |
939 | 939 | let amountGetB = $t02942529566._2 | |
940 | 940 | let amountGetA = $t02942529566._1 | |
941 | 941 | let ratioBefore = fraction(balB, SCALE8, balA) | |
942 | 942 | let ratioAfter = fraction((newBalB - amountGetB), SCALE8, (newBalA - amountGetA)) | |
943 | 943 | let impact = (SCALE8 - fraction(ratioBefore, SCALE8, ratioAfter)) | |
944 | 944 | let impactMod = if ((0 > impact)) | |
945 | 945 | then (impact * -1) | |
946 | 946 | else impact | |
947 | 947 | $Tuple2(nil, [amountGetA, amountGetB, impactMod]) | |
948 | 948 | } | |
949 | 949 | else throw("Strict value is not equal to itself.") | |
950 | 950 | } | |
951 | 951 | ||
952 | 952 | ||
953 | 953 | ||
954 | 954 | @Callable(i) | |
955 | 955 | func getShareAssetPriceREADONLY (shareId) = { | |
956 | 956 | let sharePrices = getSharePrice([shareId]) | |
957 | 957 | $Tuple2(nil, sharePrices[0]) | |
958 | 958 | } | |
959 | 959 | ||
960 | 960 | ||
961 | 961 | ||
962 | 962 | @Callable(i) | |
963 | 963 | func getUserPositionShareAmountREADONLY (user,posNum) = { | |
964 | 964 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posNum) + kUserPositionPool)), "Unknown position") | |
965 | 965 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posNum) + kUserBorrowAmount)) | |
966 | 966 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posNum, (borrowAmount > 0)) | |
967 | 967 | $Tuple2(nil, userCanWithdraw) | |
968 | 968 | } | |
969 | 969 | ||
970 | 970 | ||
971 | 971 | ||
972 | 972 | @Callable(i) | |
973 | 973 | func replenish (pool,leverage,borrowAssetId) = if (if ((100 > leverage)) | |
974 | 974 | then true | |
975 | 975 | else (leverage > 300)) | |
976 | 976 | then throw("Leverage can't be <100 and >300") | |
977 | 977 | else { | |
978 | 978 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
979 | 979 | let $t03072030810 = getPoolData(Address(fromBase58String(pool)), pType) | |
980 | 980 | let AId = $t03072030810._1 | |
981 | 981 | let BId = $t03072030810._2 | |
982 | 982 | let balA = $t03072030810._3 | |
983 | 983 | let balB = $t03072030810._4 | |
984 | 984 | let shareId = $t03072030810._5 | |
985 | 985 | let $t03081331450 = if ((size(i.payments) == 2)) | |
986 | 986 | then if ((assetIdToStr(i.payments[0].assetId) != AId)) | |
987 | 987 | then throw("Wrong payment asset A") | |
988 | 988 | else if ((assetIdToStr(i.payments[1].assetId) != BId)) | |
989 | 989 | then throw("Wrong payment asset B") | |
990 | 990 | else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId) | |
991 | 991 | else if ((size(i.payments) == 1)) | |
992 | 992 | then if ((assetIdToStr(i.payments[0].assetId) == AId)) | |
993 | 993 | then $Tuple4(i.payments[0].amount, AId, 0, BId) | |
994 | 994 | else if ((assetIdToStr(i.payments[0].assetId) == BId)) | |
995 | 995 | then $Tuple4(0, AId, i.payments[0].amount, BId) | |
996 | 996 | else throw("Wrong payment") | |
997 | 997 | else throw("One or two payments expected") | |
998 | 998 | let pmtA = $t03081331450._1 | |
999 | 999 | let pmtAssetA = $t03081331450._2 | |
1000 | 1000 | let pmtB = $t03081331450._3 | |
1001 | 1001 | let pmtAssetB = $t03081331450._4 | |
1002 | 1002 | let newPosNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
1003 | 1003 | if ((leverage > 100)) | |
1004 | 1004 | then { | |
1005 | 1005 | let dPriceA = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetA, false], nil) | |
1006 | 1006 | if ($isInstanceOf(@, "(Int, Int)")) | |
1007 | 1007 | then @ | |
1008 | 1008 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
1009 | 1009 | let dPriceB = ( let @ = invoke(priceOracleAddr, "getTWAP60", [pmtAssetB, false], nil) | |
1010 | 1010 | if ($isInstanceOf(@, "(Int, Int)")) | |
1011 | 1011 | then @ | |
1012 | 1012 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._2 | |
1013 | 1013 | let paydInDollar = (fraction(dPriceA, pmtA, pow(10, 0, getAssetDecimals(pmtAssetA), 0, 0, DOWN)) + fraction(dPriceB, pmtB, pow(10, 0, getAssetDecimals(pmtAssetB), 0, 0, DOWN))) | |
1014 | 1014 | let borrowPrice = if ((borrowAssetId == AId)) | |
1015 | 1015 | then dPriceA | |
1016 | 1016 | else dPriceB | |
1017 | 1017 | let borrowAmount = fraction(fraction(paydInDollar, (leverage - 100), 100), pow(10, 0, getAssetDecimals(borrowAssetId), 0, 0, DOWN), borrowPrice) | |
1018 | 1018 | let request = makeString([toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, borrowAssetId, toString(borrowAmount)], ",") | |
1019 | 1019 | let newRequestId = { | |
1020 | 1020 | let @ = invoke(this, "createNewRequest", [request], nil) | |
1021 | 1021 | if ($isInstanceOf(@, "Int")) | |
1022 | 1022 | then @ | |
1023 | 1023 | else throw(($getType(@) + " couldn't be cast to Int")) | |
1024 | 1024 | } | |
1025 | 1025 | if ((newRequestId == newRequestId)) | |
1026 | 1026 | then { | |
1027 | 1027 | let args = [((toString(i.caller) + "_") + toString(newPosNum)), shareId, borrowAssetId, borrowAmount, toString(this), "replenishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))] | |
1028 | 1028 | let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil) | |
1029 | 1029 | if ((inv == inv)) | |
1030 | 1030 | then nil | |
1031 | 1031 | else throw("Strict value is not equal to itself.") | |
1032 | 1032 | } | |
1033 | 1033 | else throw("Strict value is not equal to itself.") | |
1034 | 1034 | } | |
1035 | 1035 | else { | |
1036 | 1036 | let $t03290033012 = replenishByType(pType, pool, NO_LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1037 | 1037 | let userStaked = $t03290033012._1 | |
1038 | 1038 | let axlyFee = $t03290033012._2 | |
1039 | 1039 | (replenishEntries(pool, toString(i.caller), userStaked, axlyFee, newPosNum, shareId, pType, false) ++ getCursEntries(AId, BId, shareId)) | |
1040 | 1040 | } | |
1041 | 1041 | } | |
1042 | 1042 | ||
1043 | 1043 | ||
1044 | 1044 | ||
1045 | 1045 | @Callable(i) | |
1046 | 1046 | func replenishFromLand (requestId) = { | |
1047 | 1047 | let $t03322333327 = parseRequest(requestId) | |
1048 | 1048 | let user = $t03322333327._1 | |
1049 | 1049 | let pool = $t03322333327._2 | |
1050 | 1050 | let pmtA = $t03322333327._3 | |
1051 | 1051 | let AId = $t03322333327._4 | |
1052 | 1052 | let pmtB = $t03322333327._5 | |
1053 | 1053 | let BId = $t03322333327._6 | |
1054 | 1054 | let balA = $t03322333327._7 | |
1055 | 1055 | let balB = $t03322333327._8 | |
1056 | 1056 | let shareId = $t03322333327._9 | |
1057 | 1057 | let bwAsset = $t03322333327._10 | |
1058 | 1058 | let bwAmount = $t03322333327._11 | |
1059 | 1059 | if ((size(i.payments) != 1)) | |
1060 | 1060 | then throw("Wrong payment size") | |
1061 | 1061 | else if (if ((assetIdToStr(i.payments[0].assetId) != bwAsset)) | |
1062 | 1062 | then true | |
1063 | 1063 | else (i.payments[0].amount != bwAmount)) | |
1064 | 1064 | then throw("Wrong payment") | |
1065 | 1065 | else { | |
1066 | 1066 | let $t03351733641 = if ((AId == bwAsset)) | |
1067 | 1067 | then $Tuple2((pmtA + i.payments[0].amount), pmtB) | |
1068 | 1068 | else $Tuple2(pmtA, (pmtB + i.payments[0].amount)) | |
1069 | 1069 | let pmtAllA = $t03351733641._1 | |
1070 | 1070 | let pmtAllB = $t03351733641._2 | |
1071 | 1071 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Unknown pool") | |
1072 | - | let $ | |
1073 | - | let userStaked = $ | |
1074 | - | let axlyFee = $ | |
1072 | + | let $t03372333832 = replenishByType(pType, pool, LOAN_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1073 | + | let userStaked = $t03372333832._1 | |
1074 | + | let axlyFee = $t03372333832._2 | |
1075 | 1075 | let posNum = getNewUserPositionNumber(pool, toString(i.caller)) | |
1076 | 1076 | let borrowEntries = [IntegerEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAmount), bwAmount), StringEntry((((((pool + "_") + user) + "_") + toString(posNum)) + kUserBorrowAssetId), bwAsset)] | |
1077 | 1077 | let entries = replenishEntries(pool, user, userStaked, axlyFee, posNum, shareId, pType, true) | |
1078 | 1078 | $Tuple2((((entries ++ getCursEntries(AId, BId, shareId)) ++ borrowEntries) :+ DeleteEntry((requestId + kRequestId))), userStaked) | |
1079 | 1079 | } | |
1080 | 1080 | } | |
1081 | 1081 | ||
1082 | 1082 | ||
1083 | 1083 | ||
1084 | 1084 | @Callable(i) | |
1085 | 1085 | func withdraw (pool,posId) = withdrawToUser(toString(i.caller), pool, toString(posId), false) | |
1086 | 1086 | ||
1087 | 1087 | ||
1088 | 1088 | ||
1089 | 1089 | @Callable(i) | |
1090 | 1090 | func createUpdateStopLoss (posId,poolId,assetId,price) = { | |
1091 | 1091 | let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil) | |
1092 | 1092 | if ($isInstanceOf(@, "(Int, Int)")) | |
1093 | 1093 | then @ | |
1094 | 1094 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1 | |
1095 | 1095 | if (!(isDefined(getInteger(this, (((((poolId + "_") + toString(i.caller)) + "_") + toString(posId)) + kUserPosition))))) | |
1096 | 1096 | then throw("There are no user position") | |
1097 | 1097 | else if ((0 >= price)) | |
1098 | 1098 | then throw("Price must be greater than 0") | |
1099 | 1099 | else if ((price > tokenOraclePrice)) | |
1100 | 1100 | then throw("Price must be less than current token price") | |
1101 | 1101 | else [IntegerEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss), price)] | |
1102 | 1102 | } | |
1103 | 1103 | ||
1104 | 1104 | ||
1105 | 1105 | ||
1106 | 1106 | @Callable(i) | |
1107 | 1107 | func deleteStopLoss (posId,poolId,assetId) = if (!(isDefined(getInteger(this, (((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))))) | |
1108 | 1108 | then throw("No entry") | |
1109 | 1109 | else [DeleteEntry((((((((toString(i.caller) + "_") + toString(posId)) + "_") + poolId) + "_") + assetId) + kUserStopLoss))] | |
1110 | 1110 | ||
1111 | 1111 | ||
1112 | 1112 | ||
1113 | 1113 | @Callable(i) | |
1114 | 1114 | func createNewRequest (params) = valueOrElse(isSelfCall(i), { | |
1115 | 1115 | let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1) | |
1116 | 1116 | $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params), IntegerEntry(kRequestIter, newRequestId)], newRequestId) | |
1117 | 1117 | }) | |
1118 | 1118 | ||
1119 | 1119 | ||
1120 | 1120 | ||
1121 | 1121 | @Callable(i) | |
1122 | 1122 | func stopLoss (user,posId,pool,assetId) = { | |
1123 | 1123 | let tokenOraclePrice = ( let @ = invoke(priceOracleAddr, "getTWAP60", [assetId, false], nil) | |
1124 | 1124 | if ($isInstanceOf(@, "(Int, Int)")) | |
1125 | 1125 | then @ | |
1126 | 1126 | else throw(($getType(@) + " couldn't be cast to (Int, Int)")))._1 | |
1127 | 1127 | if (!(isDefined(getInteger(this, (((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))))) | |
1128 | 1128 | then throw("No entry") | |
1129 | 1129 | else (withdrawToUser(toString(i.caller), pool, toString(posId), true) :+ DeleteEntry((((((((user + "_") + toString(posId)) + "_") + pool) + "_") + assetId) + kUserStopLoss))) | |
1130 | 1130 | } | |
1131 | 1131 | ||
1132 | 1132 | ||
1133 | 1133 | ||
1134 | 1134 | @Callable(i) | |
1135 | 1135 | func liquidate (user,posId,liquidateAmount) = { | |
1136 | 1136 | let pool = valueOrErrorMessage(getString(this, (((user + "_") + posId) + kUserPositionPool)), "no position") | |
1137 | 1137 | let pType = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited") | |
1138 | - | let $ | |
1139 | - | let AId = $ | |
1140 | - | let BId = $ | |
1141 | - | let balA = $ | |
1142 | - | let balB = $ | |
1143 | - | let shareId = $ | |
1138 | + | let $t03661536705 = getPoolData(Address(fromBase58String(pool)), pType) | |
1139 | + | let AId = $t03661536705._1 | |
1140 | + | let BId = $t03661536705._2 | |
1141 | + | let balA = $t03661536705._3 | |
1142 | + | let balB = $t03661536705._4 | |
1143 | + | let shareId = $t03661536705._5 | |
1144 | 1144 | let amount = unstakeLP(pool, pType, shareId, liquidateAmount) | |
1145 | 1145 | let borrowAmount = getIntegerValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAmount)) | |
1146 | 1146 | let borrowAsset = getStringValue(this, (((((pool + "_") + user) + "_") + posId) + kUserBorrowAssetId)) | |
1147 | 1147 | let userCanWithdraw = userCanWithdrawShareCalc(user, pool, posId, (borrowAmount > 0)) | |
1148 | 1148 | if ((borrowAmount == 0)) | |
1149 | 1149 | then throw("You can't liquidate position without borrow") | |
1150 | 1150 | else [IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPositionInterest), getIntegerValue(this, (pool + kPoolInterestLoan))), IntegerEntry((pool + kPoolTotalLoan), (getPoolTotalShareWithLoan(pool) - liquidateAmount)), IntegerEntry((pool + kPoolTotal), (getPoolTotalShare(pool) - liquidateAmount)), IntegerEntry((((((pool + "_") + user) + "_") + posId) + kUserPosition), (userCanWithdraw - liquidateAmount)), ScriptTransfer(i.caller, amount, fromBase58String(shareId))] | |
1151 | 1151 | } | |
1152 | 1152 | ||
1153 | 1153 | ||
1154 | 1154 | ||
1155 | 1155 | @Callable(i) | |
1156 | 1156 | func capitalizeExKeeper (pool,type,tokenToId,amountToExchange,claim,amountsIn,addresses,assetsToReceive,estReceived,slippageTolerance,minReceived,options) = { | |
1157 | - | let $ | |
1157 | + | let $t03794038134 = if (claim) | |
1158 | 1158 | then claimFarmed(type, pool) | |
1159 | 1159 | else { | |
1160 | 1160 | let claimedAsset = if ((type == SF_POOL)) | |
1161 | 1161 | then SWOPID | |
1162 | 1162 | else WXID | |
1163 | 1163 | $Tuple2(amountToExchange, claimedAsset) | |
1164 | 1164 | } | |
1165 | - | let claimedAmount = $ | |
1166 | - | let claimedAsset = $ | |
1165 | + | let claimedAmount = $t03794038134._1 | |
1166 | + | let claimedAsset = $t03794038134._2 | |
1167 | 1167 | let exchangedAmount = exchangeKeeper(tokenToId, amountToExchange, claimedAsset, amountsIn, addresses, assetsToReceive, estReceived, slippageTolerance, minReceived, options) | |
1168 | 1168 | let change = (claimedAmount - amountToExchange) | |
1169 | 1169 | let changeEntry = if ((change > 0)) | |
1170 | 1170 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1171 | 1171 | else nil | |
1172 | 1172 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1173 | 1173 | } | |
1174 | 1174 | ||
1175 | 1175 | ||
1176 | 1176 | ||
1177 | 1177 | @Callable(i) | |
1178 | 1178 | func capitalizeExPuzzle (pool,type,tokenToId,amountToExchange,claim,routesStr,minToReceive,options) = { | |
1179 | - | let $ | |
1179 | + | let $t03879138985 = if (claim) | |
1180 | 1180 | then claimFarmed(type, pool) | |
1181 | 1181 | else { | |
1182 | 1182 | let claimedAsset = if ((type == SF_POOL)) | |
1183 | 1183 | then SWOPID | |
1184 | 1184 | else WXID | |
1185 | 1185 | $Tuple2(amountToExchange, claimedAsset) | |
1186 | 1186 | } | |
1187 | - | let claimedAmount = $ | |
1188 | - | let claimedAsset = $ | |
1187 | + | let claimedAmount = $t03879138985._1 | |
1188 | + | let claimedAsset = $t03879138985._2 | |
1189 | 1189 | let exchangedAmount = exchangePuzzle(tokenToId, amountToExchange, claimedAsset, routesStr, minToReceive, options) | |
1190 | 1190 | let change = (claimedAmount - amountToExchange) | |
1191 | 1191 | let changeEntry = if ((change > 0)) | |
1192 | 1192 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1193 | 1193 | else nil | |
1194 | 1194 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1195 | 1195 | } | |
1196 | 1196 | ||
1197 | 1197 | ||
1198 | 1198 | ||
1199 | 1199 | @Callable(i) | |
1200 | 1200 | func capitalizeExSwopFi (pool,type,tokenToId,amountToExchange,claim,exchangers,exchangersType,args1,args2,routingAssetsKeys,minAmountToReceive,options) = { | |
1201 | - | let $ | |
1201 | + | let $t03970839902 = if (claim) | |
1202 | 1202 | then claimFarmed(type, pool) | |
1203 | 1203 | else { | |
1204 | 1204 | let claimedAsset = if ((type == SF_POOL)) | |
1205 | 1205 | then SWOPID | |
1206 | 1206 | else WXID | |
1207 | 1207 | $Tuple2(amountToExchange, claimedAsset) | |
1208 | 1208 | } | |
1209 | - | let claimedAmount = $ | |
1210 | - | let claimedAsset = $ | |
1209 | + | let claimedAmount = $t03970839902._1 | |
1210 | + | let claimedAsset = $t03970839902._2 | |
1211 | 1211 | let exchangedAmount = exchangeSwopFi(tokenToId, amountToExchange, claimedAsset, exchangers, exchangersType, args1, args2, routingAssetsKeys, minAmountToReceive, options) | |
1212 | 1212 | let change = (claimedAmount - amountToExchange) | |
1213 | 1213 | let changeEntry = if ((change > 0)) | |
1214 | 1214 | then [IntegerEntry((pool + kPoolCapChange), (change + valueOrElse(getInteger(this, (pool + kPoolCapChange)), 0)))] | |
1215 | 1215 | else nil | |
1216 | 1216 | (capitalize(pool, type, tokenToId, exchangedAmount) ++ changeEntry) | |
1217 | 1217 | } | |
1218 | 1218 | ||
1219 | 1219 | ||
1220 | 1220 | ||
1221 | 1221 | @Callable(i) | |
1222 | 1222 | func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFeeNoLoan,capFeeWithLoan,stoplossFeeNoLoan,stoplossFeeWithLoan) = if (if ((type != SF_POOL)) | |
1223 | 1223 | then (type != WX_POOL) | |
1224 | 1224 | else false) | |
1225 | 1225 | then throw("Wrong type") | |
1226 | 1226 | else { | |
1227 | - | let $ | |
1228 | - | let aId = $ | |
1229 | - | let bId = $ | |
1230 | - | let aBal = $ | |
1231 | - | let bBal = $ | |
1232 | - | let shareId = $ | |
1227 | + | let $t04059540689 = getPoolData(Address(fromBase58String(poolAddr)), type) | |
1228 | + | let aId = $t04059540689._1 | |
1229 | + | let bId = $t04059540689._2 | |
1230 | + | let aBal = $t04059540689._3 | |
1231 | + | let bBal = $t04059540689._4 | |
1232 | + | let shareId = $t04059540689._5 | |
1233 | 1233 | [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyNoLoanCapFee), capFeeNoLoan), IntegerEntry((poolAddr + kAxlyWithLoanCapFee), capFeeWithLoan), IntegerEntry((poolAddr + kAxlyStopLossNoLoanFee), stoplossFeeNoLoan), IntegerEntry((poolAddr + kAxlyStopLossLoanFee), stoplossFeeWithLoan), IntegerEntry((poolAddr + kPoolInterestLoan), 0), IntegerEntry((poolAddr + kPoolInterestNoLoan), 0), StringEntry((kPool + poolAddr), type), StringEntry((shareId + kSharePool), poolAddr)] | |
1234 | 1234 | } | |
1235 | 1235 | ||
1236 | 1236 | ||
1237 | 1237 | ||
1238 | 1238 | @Callable(i) | |
1239 | 1239 | func capitalizeTest (pool,pType,tokenId,tokenAmount) = { | |
1240 | 1240 | let poolAddr = Address(fromBase58String(pool)) | |
1241 | - | let $ | |
1242 | - | let AId = $ | |
1243 | - | let BId = $ | |
1244 | - | let balA = $ | |
1245 | - | let balB = $ | |
1246 | - | let shareId = $ | |
1247 | - | let $ | |
1241 | + | let $t04148541564 = getPoolData(poolAddr, pType) | |
1242 | + | let AId = $t04148541564._1 | |
1243 | + | let BId = $t04148541564._2 | |
1244 | + | let balA = $t04148541564._3 | |
1245 | + | let balB = $t04148541564._4 | |
1246 | + | let shareId = $t04148541564._5 | |
1247 | + | let $t04156741647 = if ((tokenId == AId)) | |
1248 | 1248 | then $Tuple2(tokenAmount, 0) | |
1249 | 1249 | else $Tuple2(0, tokenAmount) | |
1250 | - | let pmtA = $ | |
1251 | - | let pmtB = $ | |
1252 | - | let $ | |
1253 | - | let stakedAmount = $ | |
1254 | - | let nf = $ | |
1250 | + | let pmtA = $t04156741647._1 | |
1251 | + | let pmtB = $t04156741647._2 | |
1252 | + | let $t04165041754 = replenishByType(pType, pool, NO_FEE, pmtA, AId, pmtB, BId, balA, balB, shareId) | |
1253 | + | let stakedAmount = $t04165041754._1 | |
1254 | + | let nf = $t04165041754._2 | |
1255 | 1255 | let curPoolInterestLoan = valueOrElse(getInteger(this, (pool + kPoolInterestLoan)), 0) | |
1256 | 1256 | let curPoolInterestNoLoan = valueOrElse(getInteger(this, (pool + kPoolInterestNoLoan)), 0) | |
1257 | 1257 | let totalShareAmount = getPoolTotalShare(pool) | |
1258 | 1258 | let totalShareAmountWithLoan = getPoolTotalShareWithLoan(pool) | |
1259 | 1259 | let loanPercent = fraction(totalShareAmountWithLoan, SCALE8, totalShareAmount) | |
1260 | 1260 | let stakedLoan = fraction(stakedAmount, loanPercent, SCALE8) | |
1261 | 1261 | let stakedNoLoan = (stakedAmount - stakedLoan) | |
1262 | 1262 | let newInterestLoan = if ((totalShareAmountWithLoan > 0)) | |
1263 | 1263 | then (curPoolInterestLoan + fraction(stakedLoan, SCALE10, totalShareAmountWithLoan)) | |
1264 | 1264 | else 0 | |
1265 | 1265 | let newInterestNoLoan = if (((totalShareAmount - totalShareAmountWithLoan) > 0)) | |
1266 | 1266 | then (curPoolInterestNoLoan + fraction(stakedNoLoan, SCALE10, (totalShareAmount - totalShareAmountWithLoan))) | |
1267 | 1267 | else 0 | |
1268 | 1268 | let axlyFeeLoan = fraction(stakedLoan, getAxlyFee(pool, CAP_FEE_LOAN), FEE_SCALE6) | |
1269 | 1269 | let axlyFeeNoLoan = fraction(stakedNoLoan, getAxlyFee(pool, CAP_FEE_NO_LOAN), FEE_SCALE6) | |
1270 | 1270 | let axlyFee = unstakeLP(pool, pType, shareId, (axlyFeeLoan + axlyFeeNoLoan)) | |
1271 | 1271 | if ((axlyFee == axlyFee)) | |
1272 | 1272 | then ([IntegerEntry((pool + kPoolInterestLoan), newInterestLoan), IntegerEntry((pool + kPoolInterestNoLoan), newInterestNoLoan), IntegerEntry((pool + kPoolTotal), ((totalShareAmount + stakedAmount) - axlyFee)), IntegerEntry((pool + kPoolTotalLoan), ((totalShareAmountWithLoan + stakedLoan) - axlyFeeLoan)), ScriptTransfer(moneyBox, (axlyFeeLoan + axlyFeeNoLoan), fromBase58String(shareId))] ++ getCursEntries(AId, BId, shareId)) | |
1273 | 1273 | else throw("Strict value is not equal to itself.") | |
1274 | 1274 | } | |
1275 | 1275 | ||
1276 | 1276 | ||
1277 | 1277 | ||
1278 | 1278 | @Callable(i) | |
1279 | 1279 | func claimFarmedTest (type,pool) = if ((type == SF_POOL)) | |
1280 | 1280 | then { | |
1281 | 1281 | let balBefore = accountBalance(SWOPID) | |
1282 | 1282 | if ((balBefore == balBefore)) | |
1283 | 1283 | then { | |
1284 | 1284 | let inv = invoke(getSFFarmingAddr(), "claim", [pool], nil) | |
1285 | 1285 | if ((inv == inv)) | |
1286 | 1286 | then { | |
1287 | 1287 | let balAfter = accountBalance(SWOPID) | |
1288 | 1288 | $Tuple2(nil, $Tuple2((balAfter - balBefore), SWOPID)) | |
1289 | 1289 | } | |
1290 | 1290 | else throw("Strict value is not equal to itself.") | |
1291 | 1291 | } | |
1292 | 1292 | else throw("Strict value is not equal to itself.") | |
1293 | 1293 | } | |
1294 | 1294 | else if ((type == WX_POOL)) | |
1295 | 1295 | then { | |
1296 | 1296 | let balBefore = accountBalance(WXID) | |
1297 | 1297 | if ((balBefore == balBefore)) | |
1298 | 1298 | then { | |
1299 | 1299 | let inv = invoke(getWXFarmingAddr(Address(fromBase58String(pool))), "claimWX", [pool], nil) | |
1300 | 1300 | if ((inv == inv)) | |
1301 | 1301 | then { | |
1302 | 1302 | let balAfter = accountBalance(WXID) | |
1303 | 1303 | $Tuple2(nil, $Tuple2((balAfter - balBefore), WXID)) | |
1304 | 1304 | } | |
1305 | 1305 | else throw("Strict value is not equal to itself.") | |
1306 | 1306 | } | |
1307 | 1307 | else throw("Strict value is not equal to itself.") | |
1308 | 1308 | } | |
1309 | 1309 | else throw("Wrong pool type") | |
1310 | 1310 | ||
1311 | 1311 | ||
1312 | 1312 | @Verifier(tx) | |
1313 | 1313 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1314 | 1314 |
github/deemru/w8io/026f985 141.63 ms ◑