tx · JDJUwqzx3X8AZzceH5WkHVYC7py7GgEWMUHWASuwdeaa

3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS:  -0.01000000 Waves

2023.03.24 21:10 [2504438] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves

{ "type": 13, "id": "JDJUwqzx3X8AZzceH5WkHVYC7py7GgEWMUHWASuwdeaa", "fee": 1000000, "feeAssetId": null, "timestamp": 1679681405543, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "4XLRFURLQkSG1jQvTb38vgMdafk4KLJbs11JjstW7LmEfzVJwBZGzwKZ213BQWWafA137j7bJ8dLJzvEuxpw8pSk" ], "script": "base64:BgIeCAISBwoFCAEIAQESAwoBCBIDCgEIEgcKBQgIAQEBJgALU0ZfUE9TX1RZUEUCAlNGAAtXWF9QT1NfVFlQRQICV1gABlNDQUxFOACAwtcvAApGRUVfU0NBTEU2AMCEPQAUa1NGUG9vbEFBc3NldEJhbGFuY2UCD0FfYXNzZXRfYmFsYW5jZQAUa1NGUG9vbEJBc3NldEJhbGFuY2UCD0JfYXNzZXRfYmFsYW5jZQAPa1NGUG9vbEFBc3NldElkAgpBX2Fzc2V0X2lkAA9rU0ZQb29sQkFzc2V0SWQCCkJfYXNzZXRfaWQADmtTRlBvb2xTaGFyZUlkAg5zaGFyZV9hc3NldF9pZAAOa1NGUG9vbFZlcnNpb24CB3ZlcnNpb24AEGtTRkZhcm1pbmdTdGFrZWQCFF9zaGFyZV90b2tlbnNfbG9ja2VkAA1rVXNlclBvc2l0aW9uAg5fdXNlcl9wb3NpdGlvbgARa1VzZXJQb3NpdGlvblR5cGUCE191c2VyX3Bvc2l0aW9uX3R5cGUAEGtVc2VyUG9zaXRpb25OdW0CFV91c2VyX3Bvc2l0aW9uX251bWJl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RmVlAwMJAQIhPQIFBHR5cGUFC1NGX1BPU19UWVBFCQECIT0CBQR0eXBlBQtXWF9QT1NfVFlQRQcJAAIBAgpXcm9uZyB0eXBlCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRVrQXhseUluRmVlV2l0aG91dExvYW4FC2luRmVlTm9Mb2FuCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRJrQXhseUluRmVlV2l0aExvYW4FCWluRmVlTG9hbgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQhwb29sQWRkcgULa0F4bHlDYXBGZWUFBmNhcEZlZQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBWtQb29sBQhwb29sQWRkcgUEdHlwZQUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleYA9WjQ=", "height": 2504438, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EUVo8k9EQrbzF22FqGngLPXDXhqEffZU92rX9pjgTR3Z Next: D2biWyQf9VrsL32KB9iTKx9sCPWYcA114RHun7hZkfzv Diff:
OldNewDifferences
142142 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
143143 if ((poolVersion == "1.0.0"))
144144 then {
145- let vars = [toString(virtualSwapTokenPay), toString(virtualSwapTokenGet), "false", "0"]
145+ let vars = ["0", "false", "0"]
146146 invoke(poolAddr, "callFunction", ["replenishWithOneToken", vars], payments)
147147 }
148148 else if ((poolVersion == "2.0.0"))
184184 @Callable(i)
185185 func replanish (pool,borrowAmount,borrowAssetId,virtualSwapTokenPay,virtualSwapTokenGet) = {
186186 let type = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
187- let $t076537904 = if ((type == SF_POS_TYPE))
187+ let $t075837834 = if ((type == SF_POS_TYPE))
188188 then getSFPoolData(Address(fromBase58String(pool)))
189189 else if ((type == WX_POS_TYPE))
190190 then getWXPoolData(Address(fromBase58String(pool)))
191191 else throw("Wrong pool type")
192- let AId = $t076537904._1
193- let BId = $t076537904._2
194- let balA = $t076537904._3
195- let balB = $t076537904._4
196- let shareId = $t076537904._5
197- let $t079088545 = if ((size(i.payments) == 2))
192+ let AId = $t075837834._1
193+ let BId = $t075837834._2
194+ let balA = $t075837834._3
195+ let balB = $t075837834._4
196+ let shareId = $t075837834._5
197+ let $t078388475 = if ((size(i.payments) == 2))
198198 then if ((assetIdToStr(i.payments[0].assetId) != AId))
199199 then throw("Wrong payment asset A")
200200 else if ((assetIdToStr(i.payments[1].assetId) != BId))
207207 then $Tuple4(0, AId, i.payments[0].amount, BId)
208208 else throw("Wrong payment")
209209 else throw("One or two payments expected")
210- let pmtA = $t079088545._1
211- let pmtAssetA = $t079088545._2
212- let pmtB = $t079088545._3
213- let pmtAssetB = $t079088545._4
210+ let pmtA = $t078388475._1
211+ let pmtAssetA = $t078388475._2
212+ let pmtB = $t078388475._3
213+ let pmtAssetB = $t078388475._4
214214 if ((borrowAmount > 0))
215215 then {
216216 let request = makeString([type, toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, toString(virtualSwapTokenPay), toString(virtualSwapTokenGet)], ",")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SF_POS_TYPE = "SF"
55
66 let WX_POS_TYPE = "WX"
77
88 let SCALE8 = 100000000
99
1010 let FEE_SCALE6 = 1000000
1111
1212 let kSFPoolAAssetBalance = "A_asset_balance"
1313
1414 let kSFPoolBAssetBalance = "B_asset_balance"
1515
1616 let kSFPoolAAssetId = "A_asset_id"
1717
1818 let kSFPoolBAssetId = "B_asset_id"
1919
2020 let kSFPoolShareId = "share_asset_id"
2121
2222 let kSFPoolVersion = "version"
2323
2424 let kSFFarmingStaked = "_share_tokens_locked"
2525
2626 let kUserPosition = "_user_position"
2727
2828 let kUserPositionType = "_user_position_type"
2929
3030 let kUserPositionNum = "_user_position_number"
3131
3232 let kTotalPosition = "_total_position"
3333
3434 let kAxlyInFeeWithoutLoan = "_axly_fee_without_loan"
3535
3636 let kAxlyInFeeWithLoan = "_axly_fee_with_loan"
3737
3838 let kAxlyCapFee = "_axly_fee_cap"
3939
4040 let kRequestId = "_request_id"
4141
4242 let kRequestIter = "requests_iter"
4343
4444 let kPool = "pool_"
4545
4646 let kMoneyBox = "axly_money_box"
4747
4848 let kSFFarmingAddr = "swopfi_farming_addr"
4949
5050 let kLendService = "lend_service_addr"
5151
5252 let moneyBox = Address(fromBase58String(valueOrErrorMessage(getString(this, kMoneyBox), "No axly moneyBox address")))
5353
5454 func isSelfCall (i) = if ((i.caller == this))
5555 then unit
5656 else throw("Only contract itself can call this function")
5757
5858
5959 func accountBalance (assetId) = match assetId {
6060 case id: ByteVector =>
6161 assetBalance(this, id)
6262 case waves: Unit =>
6363 wavesBalance(this).available
6464 case _ =>
6565 throw("Match error")
6666 }
6767
6868
6969 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"))
7070
7171
7272 func getWXPoolData (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"))
7373
7474
7575 func getAxlyTotalPosition (pool) = valueOrElse(getInteger(this, (pool + kTotalPosition)), 0)
7676
7777
7878 func getNewUserPositionNumber (pool,user) = (valueOrElse(getInteger(this, (((pool + "_") + user) + kUserPositionNum)), 0) + 1)
7979
8080
8181 func getAxlyInFee (pool,withLoan) = if (withLoan)
8282 then getIntegerValue(this, (pool + kAxlyInFeeWithLoan))
8383 else getIntegerValue(this, (pool + kAxlyInFeeWithoutLoan))
8484
8585
8686 func getSFFarmingAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kSFFarmingAddr), "Can't get swopfi farming addr")))
8787
8888
8989 func getLendSrvAddr () = Address(fromBase58String(valueOrErrorMessage(getString(this, kLendService), "Can't get lend service addr")))
9090
9191
9292 func assetIdToStr (assetId) = match assetId {
9393 case id: ByteVector =>
9494 toBase58String(id)
9595 case waves: Unit =>
9696 "WAVES"
9797 case _ =>
9898 throw("Match error")
9999 }
100100
101101
102102 func assetIdFromStr (assetId) = if ((assetId == "WAVES"))
103103 then unit
104104 else fromBase58String(assetId)
105105
106106
107107 func replanishSwopFi (user,pool,withLoan,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId,virtualSwapTokenPay,virtualSwapTokenGet) = {
108108 let shareBalanceBefore = accountBalance(fromBase58String(shareId))
109109 let poolAddr = Address(fromBase58String(pool))
110110 let ratioA = fraction(SCALE8, pmtA, balA)
111111 let ratioB = fraction(SCALE8, pmtB, balB)
112112 let $t045444837 = if ((ratioB > ratioA))
113113 then {
114114 let pmt = fraction(balB, ratioA, SCALE8, CEILING)
115115 $Tuple4(pmtA, pmt, (pmtB - pmt), pmtAssetB)
116116 }
117117 else {
118118 let pmt = fraction(balA, ratioB, SCALE8, CEILING)
119119 $Tuple4(pmt, pmtB, (pmtA - pmt), pmtAssetA)
120120 }
121121 let pmtAmountA = $t045444837._1
122122 let pmtAmountB = $t045444837._2
123123 let change = $t045444837._3
124124 let changeAssetId = $t045444837._4
125125 let poolVersion = getStringValue(poolAddr, "version")
126126 let inv1 = if (if ((pmtAmountA > 0))
127127 then (pmtAmountB > 0)
128128 else false)
129129 then {
130130 let payments = [AttachedPayment(assetIdFromStr(pmtAssetA), pmtAmountA), AttachedPayment(assetIdFromStr(pmtAssetB), pmtAmountB)]
131131 if ((poolVersion == "1.0.0"))
132132 then invoke(poolAddr, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], payments)
133133 else if ((poolVersion == "2.0.0"))
134134 then invoke(poolAddr, "replenishWithTwoTokensV2", [false, 0], payments)
135135 else throw("Wrong pool type")
136136 }
137137 else 0
138138 if ((inv1 == inv1))
139139 then {
140140 let inv2 = if ((change > 0))
141141 then {
142142 let payments = [AttachedPayment(assetIdFromStr(changeAssetId), change)]
143143 if ((poolVersion == "1.0.0"))
144144 then {
145- let vars = [toString(virtualSwapTokenPay), toString(virtualSwapTokenGet), "false", "0"]
145+ let vars = ["0", "false", "0"]
146146 invoke(poolAddr, "callFunction", ["replenishWithOneToken", vars], payments)
147147 }
148148 else if ((poolVersion == "2.0.0"))
149149 then {
150150 let vars = [virtualSwapTokenPay, virtualSwapTokenGet, false, 0]
151151 invoke(poolAddr, "replenishWithOneTokenV2", [false, 0], payments)
152152 }
153153 else throw("Wrong pool type")
154154 }
155155 else 0
156156 if ((inv2 == inv2))
157157 then {
158158 let shareBalanceAfter = accountBalance(fromBase58String(shareId))
159159 let totalShare = (shareBalanceAfter - shareBalanceBefore)
160160 let axlyInFee = fraction(totalShare, (FEE_SCALE6 - getAxlyInFee(pool, withLoan)), FEE_SCALE6)
161161 let userShareForStake = (totalShare - axlyInFee)
162162 if ((0 >= userShareForStake))
163163 then throw("amount of staked sharetokens must be > 0")
164164 else {
165165 let inv3 = invoke(getSFFarmingAddr(), "lockShareTokens", [pool, 0], [AttachedPayment(fromBase58String(shareId), userShareForStake)])
166166 if ((inv3 == inv3))
167167 then {
168168 let totalAmount = getAxlyTotalPosition(pool)
169169 let newPosNum = getNewUserPositionNumber(pool, user)
170170 [IntegerEntry((pool + kTotalPosition), (totalAmount + userShareForStake)), IntegerEntry((((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPosition), userShareForStake), StringEntry((((((pool + "_") + user) + "_") + toString(newPosNum)) + kUserPositionType), SF_POS_TYPE), IntegerEntry((((pool + "_") + user) + kUserPositionNum), newPosNum), ScriptTransfer(moneyBox, axlyInFee, fromBase58String(shareId))]
171171 }
172172 else throw("Strict value is not equal to itself.")
173173 }
174174 }
175175 else throw("Strict value is not equal to itself.")
176176 }
177177 else throw("Strict value is not equal to itself.")
178178 }
179179
180180
181181 func replanishWX (user,pool,withLoan,pmtA,pmtAssetA,pmtB,pmtAssetB,balA,balB,shareId,virtualSwapTokenPay,virtualSwapTokenGet) = nil
182182
183183
184184 @Callable(i)
185185 func replanish (pool,borrowAmount,borrowAssetId,virtualSwapTokenPay,virtualSwapTokenGet) = {
186186 let type = valueOrErrorMessage(getString(this, (kPool + pool)), "Pool is not inited")
187- let $t076537904 = if ((type == SF_POS_TYPE))
187+ let $t075837834 = if ((type == SF_POS_TYPE))
188188 then getSFPoolData(Address(fromBase58String(pool)))
189189 else if ((type == WX_POS_TYPE))
190190 then getWXPoolData(Address(fromBase58String(pool)))
191191 else throw("Wrong pool type")
192- let AId = $t076537904._1
193- let BId = $t076537904._2
194- let balA = $t076537904._3
195- let balB = $t076537904._4
196- let shareId = $t076537904._5
197- let $t079088545 = if ((size(i.payments) == 2))
192+ let AId = $t075837834._1
193+ let BId = $t075837834._2
194+ let balA = $t075837834._3
195+ let balB = $t075837834._4
196+ let shareId = $t075837834._5
197+ let $t078388475 = if ((size(i.payments) == 2))
198198 then if ((assetIdToStr(i.payments[0].assetId) != AId))
199199 then throw("Wrong payment asset A")
200200 else if ((assetIdToStr(i.payments[1].assetId) != BId))
201201 then throw("Wrong payment asset B")
202202 else $Tuple4(i.payments[0].amount, AId, i.payments[1].amount, BId)
203203 else if ((size(i.payments) == 1))
204204 then if ((assetIdToStr(i.payments[0].assetId) == AId))
205205 then $Tuple4(i.payments[0].amount, AId, 0, BId)
206206 else if ((assetIdToStr(i.payments[0].assetId) == BId))
207207 then $Tuple4(0, AId, i.payments[0].amount, BId)
208208 else throw("Wrong payment")
209209 else throw("One or two payments expected")
210- let pmtA = $t079088545._1
211- let pmtAssetA = $t079088545._2
212- let pmtB = $t079088545._3
213- let pmtAssetB = $t079088545._4
210+ let pmtA = $t078388475._1
211+ let pmtAssetA = $t078388475._2
212+ let pmtB = $t078388475._3
213+ let pmtAssetB = $t078388475._4
214214 if ((borrowAmount > 0))
215215 then {
216216 let request = makeString([type, toString(i.caller), pool, toString(pmtA), pmtAssetA, toString(pmtB), pmtAssetB, toString(balA), toString(balB), shareId, toString(virtualSwapTokenPay), toString(virtualSwapTokenGet)], ",")
217217 let newRequestId = {
218218 let @ = invoke(this, "createNewRequest", [request], nil)
219219 if ($isInstanceOf(@, "Int"))
220220 then @
221221 else unit
222222 }
223223 if ((newRequestId == newRequestId))
224224 then {
225225 let args = [toString(i.caller), shareId, borrowAssetId, borrowAmount, toString(this), "replanishFromLand", toString(valueOrErrorMessage(newRequestId, "Can't create new request"))]
226226 let inv = reentrantInvoke(getLendSrvAddr(), "flashPosition", args, nil)
227227 nil
228228 }
229229 else throw("Strict value is not equal to itself.")
230230 }
231231 else if ((type == SF_POS_TYPE))
232232 then replanishSwopFi(toString(i.caller), pool, false, pmtA, pmtAssetA, pmtB, pmtAssetB, balA, balB, shareId, virtualSwapTokenPay, virtualSwapTokenGet)
233233 else throw("Cant wx")
234234 }
235235
236236
237237
238238 @Callable(i)
239239 func replanishFromLand (requestId) = {
240240 let request = split(valueOrErrorMessage(getString(this, (requestId + kRequestId)), ("No request with id " + requestId)), ",")
241241 if ((request[0] == SF_POS_TYPE))
242242 then replanishSwopFi(request[1], request[2], true, parseIntValue(request[3]), request[4], parseIntValue(request[5]), request[6], parseIntValue(request[7]), parseIntValue(request[8]), request[9], parseIntValue(request[10]), parseIntValue(request[11]))
243243 else throw("Cant wx")
244244 }
245245
246246
247247
248248 @Callable(i)
249249 func createNewRequest (params) = valueOrElse(isSelfCall(i), {
250250 let newRequestId = (valueOrElse(getInteger(this, kRequestIter), 0) + 1)
251251 $Tuple2([StringEntry((toString(newRequestId) + kRequestId), params)], newRequestId)
252252 })
253253
254254
255255
256256 @Callable(i)
257257 func initNewPool (type,poolAddr,inFeeNoLoan,inFeeLoan,capFee) = if (if ((type != SF_POS_TYPE))
258258 then (type != WX_POS_TYPE)
259259 else false)
260260 then throw("Wrong type")
261261 else [IntegerEntry((poolAddr + kAxlyInFeeWithoutLoan), inFeeNoLoan), IntegerEntry((poolAddr + kAxlyInFeeWithLoan), inFeeLoan), IntegerEntry((poolAddr + kAxlyCapFee), capFee), StringEntry((kPool + poolAddr), type)]
262262
263263
264264 @Verifier(tx)
265265 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
266266

github/deemru/w8io/169f3d6 
44.50 ms