tx · Aq9rgWi2mwPYDvYJCBBzePsGTRKr4TRyoEkeFVARqTWG 3Mp8Ho5tMT8763ehdYqbi7zPtbGDuqC6Wsd: -0.03200000 Waves 2022.12.20 11:02 [2368346] smart account 3Mp8Ho5tMT8763ehdYqbi7zPtbGDuqC6Wsd > SELF 0.00000000 Waves
{ "type": 13, "id": "Aq9rgWi2mwPYDvYJCBBzePsGTRKr4TRyoEkeFVARqTWG", "fee": 3200000, "feeAssetId": null, "timestamp": 1671523363001, "version": 2, "chainId": 84, "sender": "3Mp8Ho5tMT8763ehdYqbi7zPtbGDuqC6Wsd", "senderPublicKey": "AKGrXfFfmMqNYsJJoMcL5YZHfRhxau4pkJbVGKhx468Q", "proofs": [ "5bmohjFP82XnqtYhxVznVx7c1mTN2gFkWwVTKuiVEm981Cmpt4awoo9pZ3PMGsVN1QoAXQLPBU7tdra9X4YN2M1b" ], "script": "base64:BgI3CAISAwoBARIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASABIAEgASAEMABnd4UG9vbAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM1BQWldnRk5SS0hMdk01MXB3UzkzNEM4Vlo3ZDJGNFo1OGcAC3VzZG5Bc3NldElkASC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QARdXNkbkFzc2V0SWRTdHJpbmcCLERHMnhGa1BkRHdLVW9Ca3pHQWhRdExwU0d6ZlhMaUNZUEV6ZUtIMkFkMjRwABd1c2RuV2F2ZXNMUFRva2VuQXNzZXRJZAEgXedtbkamxzmxtK4hQ1NqaJeqmQ+fWxX6vGpRDRxJGSAAEXJvdXRpbmdQdXp6bGVQb29sCQERQGV4dHJOYXRpdmUoMTA2MikBAiMzUEdGSHpWR1Q0TlRpZ3dDS1AxTmN3b1hrb2RWWnd2QnV1VQAUbm9uUm91dGluZ1B1enpsZVBvb2wJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNQRHJZUEY2aXp6YTJzWFdmZnpUUEY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vT25Td29wCQD8BwQFDXN3b3BQbHV0b1Bvb2wCCGV4Y2hhbmdlCQDMCAIAAQUDbmlsCQDMCAIJAQ9BdHRhY2hlZFBheW1lbnQCBQt1c2RuQXNzZXRJZAkAaAIFAWEAwIQ9BQNuaWwEDnBsdXRvQmFsVG9Td2FwCQDwBwIFBHRoaXMFDHBsdXRvQXNzZXRJZAQRc2VsbFBsdXRvT25QdXp6bGUJAPwHBAUPcHV6emxlUGx1dG9Qb29sAgRzd2FwCQDMCAIFEXVzZG5Bc3NldElkU3RyaW5nCQDMCAIAAQUDbmlsCQDMCAIJAQ9BdHRhY2hlZFBheW1lbnQCBQxwbHV0b0Fzc2V0SWQFDnBsdXRvQmFsVG9Td2FwBQNuaWwEEHVzZG5CYWxhbmNlQWZ0ZXIJAPAHAgUEdGhpcwULdXNkbkFzc2V0SWQDCQBnAgAACQBlAgUQdXNkbkJhbGFuY2VBZnRlcgURdXNkbkJhbGFuY2VCZWZvcmUJAAIBAhxQTFVUTyBTV09QIC0+IFBVWlpMRSBbKCRfJCldBQNuaWwBAnR4AQZ2ZXJpZnkACQDIEwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V57IBfjw==", "height": 2368346, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7L3dhQVGXzSsRTFUW61kr62vf3336iu51nwakQudTuy4 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
148 | 148 | then throw("you are not allowed to arb!") | |
149 | 149 | else { | |
150 | 150 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
151 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
152 | - | then { | |
153 | - | let wavesBalanceBefore = wavesBalance(this).available | |
154 | - | if ((wavesBalanceBefore == wavesBalanceBefore)) | |
155 | - | then { | |
156 | - | let buyOnPuzzle = invoke(nonRoutingPuzzlePool, "swap", ["WAVES", 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
157 | - | if ((buyOnPuzzle == buyOnPuzzle)) | |
158 | - | then { | |
159 | - | let wavesBalToSwap = (wavesBalance(this).available - wavesBalanceBefore) | |
160 | - | if ((0 >= wavesBalToSwap)) | |
161 | - | then throw("nothing to arb") | |
162 | - | else { | |
163 | - | let putTheTokenInThePool = invoke(wxPool, "putOneTkn", [1, false], [AttachedPayment(unit, wavesBalToSwap)]) | |
164 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
165 | - | then { | |
166 | - | let lpTokenBalance = assetBalance(this, usdnWavesLPTokenAssetId) | |
167 | - | if ((lpTokenBalance == lpTokenBalance)) | |
168 | - | then { | |
169 | - | let sellPoolToken = invoke(wxPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(usdnWavesLPTokenAssetId, lpTokenBalance)]) | |
170 | - | if ((sellPoolToken == sellPoolToken)) | |
171 | - | then { | |
172 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
173 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
174 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
175 | - | then throw("WU PUZZLE -> WX [($_$)]") | |
176 | - | else nil | |
177 | - | else throw("Strict value is not equal to itself.") | |
178 | - | } | |
179 | - | else throw("Strict value is not equal to itself.") | |
180 | - | } | |
181 | - | else throw("Strict value is not equal to itself.") | |
182 | - | } | |
183 | - | else throw("Strict value is not equal to itself.") | |
184 | - | } | |
185 | - | } | |
186 | - | else throw("Strict value is not equal to itself.") | |
187 | - | } | |
188 | - | else throw("Strict value is not equal to itself.") | |
151 | + | let wavesBalanceBefore = wavesBalance(this).available | |
152 | + | let buyOnPuzzle = invoke(nonRoutingPuzzlePool, "swap", ["WAVES", 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
153 | + | let wavesBalToSwap = (wavesBalance(this).available - wavesBalanceBefore) | |
154 | + | if ((0 >= wavesBalToSwap)) | |
155 | + | then throw("nothing to arb") | |
156 | + | else { | |
157 | + | let putTheTokenInThePool = invoke(wxPool, "putOneTkn", [1, false], [AttachedPayment(unit, wavesBalToSwap)]) | |
158 | + | let lpTokenBalance = assetBalance(this, usdnWavesLPTokenAssetId) | |
159 | + | let sellPoolToken = invoke(wxPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(usdnWavesLPTokenAssetId, lpTokenBalance)]) | |
160 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
161 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
162 | + | then throw("WU PUZZLE -> WX [($_$)]") | |
163 | + | else nil | |
189 | 164 | } | |
190 | - | else throw("Strict value is not equal to itself.") | |
191 | 165 | } | |
192 | 166 | ||
193 | 167 | ||
197 | 171 | then throw("you are not allowed to arb!") | |
198 | 172 | else { | |
199 | 173 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
200 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
201 | - | then { | |
202 | - | let wavesBalanceBefore = wavesBalance(this).available | |
203 | - | if ((wavesBalanceBefore == wavesBalanceBefore)) | |
204 | - | then { | |
205 | - | let putTheTokenInThePool = invoke(wxPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
206 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
207 | - | then { | |
208 | - | let lpTokenBalance = assetBalance(this, usdnWavesLPTokenAssetId) | |
209 | - | if ((lpTokenBalance == lpTokenBalance)) | |
210 | - | then { | |
211 | - | let sellPoolToken = invoke(wxPool, "getOneTkn", ["WAVES", 1], [AttachedPayment(usdnWavesLPTokenAssetId, lpTokenBalance)]) | |
212 | - | if ((sellPoolToken == sellPoolToken)) | |
213 | - | then { | |
214 | - | let wavesBalToSwap = (wavesBalance(this).available - wavesBalanceBefore) | |
215 | - | if ((0 >= wavesBalToSwap)) | |
216 | - | then throw("nothing to arb") | |
217 | - | else { | |
218 | - | let buyOnPuzzle = invoke(nonRoutingPuzzlePool, "swap", [usdnAssetIdString, 1], [AttachedPayment(unit, wavesBalToSwap)]) | |
219 | - | if ((buyOnPuzzle == buyOnPuzzle)) | |
220 | - | then { | |
221 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
222 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
223 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
224 | - | then throw("WU WX -> PUZZLE [($_$)]") | |
225 | - | else nil | |
226 | - | else throw("Strict value is not equal to itself.") | |
227 | - | } | |
228 | - | else throw("Strict value is not equal to itself.") | |
229 | - | } | |
230 | - | } | |
231 | - | else throw("Strict value is not equal to itself.") | |
232 | - | } | |
233 | - | else throw("Strict value is not equal to itself.") | |
234 | - | } | |
235 | - | else throw("Strict value is not equal to itself.") | |
236 | - | } | |
237 | - | else throw("Strict value is not equal to itself.") | |
174 | + | let wavesBalanceBefore = wavesBalance(this).available | |
175 | + | let putTheTokenInThePool = invoke(wxPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
176 | + | let lpTokenBalance = assetBalance(this, usdnWavesLPTokenAssetId) | |
177 | + | let sellPoolToken = invoke(wxPool, "getOneTkn", ["WAVES", 1], [AttachedPayment(usdnWavesLPTokenAssetId, lpTokenBalance)]) | |
178 | + | let wavesBalToSwap = (wavesBalance(this).available - wavesBalanceBefore) | |
179 | + | if ((0 >= wavesBalToSwap)) | |
180 | + | then throw("nothing to arb") | |
181 | + | else { | |
182 | + | let buyOnPuzzle = invoke(nonRoutingPuzzlePool, "swap", [usdnAssetIdString, 1], [AttachedPayment(unit, wavesBalToSwap)]) | |
183 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
184 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
185 | + | then throw("WU WX -> PUZZLE [($_$)]") | |
186 | + | else nil | |
238 | 187 | } | |
239 | - | else throw("Strict value is not equal to itself.") | |
240 | 188 | } | |
241 | 189 | ||
242 | 190 | ||
246 | 194 | then throw("you are not allowed to arb!") | |
247 | 195 | else { | |
248 | 196 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
249 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
250 | - | then { | |
251 | - | let buySurfOnPuzzle = invoke(nonRoutingPuzzleSurfPool, "swap", [surfAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
252 | - | if ((buySurfOnPuzzle == buySurfOnPuzzle)) | |
253 | - | then { | |
254 | - | let surfBalToSwap = assetBalance(this, surfAssetId) | |
255 | - | let swapSurfOnSwop = invoke(swopSurfPool, "exchange", [1], [AttachedPayment(surfAssetId, surfBalToSwap)]) | |
256 | - | if ((swapSurfOnSwop == swapSurfOnSwop)) | |
257 | - | then { | |
258 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
259 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
260 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
261 | - | then throw("SURF PUZZLE -> SWOP [($_$)]") | |
262 | - | else nil | |
263 | - | else throw("Strict value is not equal to itself.") | |
264 | - | } | |
265 | - | else throw("Strict value is not equal to itself.") | |
266 | - | } | |
267 | - | else throw("Strict value is not equal to itself.") | |
268 | - | } | |
269 | - | else throw("Strict value is not equal to itself.") | |
197 | + | let buySurfOnPuzzle = invoke(nonRoutingPuzzleSurfPool, "swap", [surfAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
198 | + | let surfBalToSwap = assetBalance(this, surfAssetId) | |
199 | + | let swapSurfOnSwop = invoke(swopSurfPool, "exchange", [1], [AttachedPayment(surfAssetId, surfBalToSwap)]) | |
200 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
201 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
202 | + | then throw("SURF PUZZLE -> SWOP [($_$)]") | |
203 | + | else nil | |
270 | 204 | } | |
271 | 205 | ||
272 | 206 | ||
276 | 210 | then throw("you are not allowed to arb!") | |
277 | 211 | else { | |
278 | 212 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
279 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
280 | - | then { | |
281 | - | let swapToSurfOnSwop = invoke(swopSurfPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
282 | - | if ((swapToSurfOnSwop == swapToSurfOnSwop)) | |
283 | - | then { | |
284 | - | let surfBalToSwap = assetBalance(this, surfAssetId) | |
285 | - | let sellSurfOnPuzzle = invoke(nonRoutingPuzzleSurfPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(surfAssetId, surfBalToSwap)]) | |
286 | - | if ((sellSurfOnPuzzle == sellSurfOnPuzzle)) | |
287 | - | then { | |
288 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
289 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
290 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
291 | - | then throw("SURF SWOP -> PUZZLE [($_$)]") | |
292 | - | else nil | |
293 | - | else throw("Strict value is not equal to itself.") | |
294 | - | } | |
295 | - | else throw("Strict value is not equal to itself.") | |
296 | - | } | |
297 | - | else throw("Strict value is not equal to itself.") | |
298 | - | } | |
299 | - | else throw("Strict value is not equal to itself.") | |
213 | + | let swapToSurfOnSwop = invoke(swopSurfPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
214 | + | let surfBalToSwap = assetBalance(this, surfAssetId) | |
215 | + | let sellSurfOnPuzzle = invoke(nonRoutingPuzzleSurfPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(surfAssetId, surfBalToSwap)]) | |
216 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
217 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
218 | + | then throw("SURF SWOP -> PUZZLE [($_$)]") | |
219 | + | else nil | |
300 | 220 | } | |
301 | 221 | ||
302 | 222 | ||
306 | 226 | then throw("you are not allowed to arb!") | |
307 | 227 | else { | |
308 | 228 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
309 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
310 | - | then { | |
311 | - | let putTheTokenInThePool = invoke(wxWxPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
312 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
313 | - | then { | |
314 | - | let lpTokenBalance = assetBalance(this, usdnWxLPTokenAssetId) | |
315 | - | if ((lpTokenBalance == lpTokenBalance)) | |
316 | - | then { | |
317 | - | let sellPoolToken = invoke(wxWxPool, "getOneTkn", [wxAssetIdString, 1], [AttachedPayment(usdnWxLPTokenAssetId, lpTokenBalance)]) | |
318 | - | if ((sellPoolToken == sellPoolToken)) | |
319 | - | then { | |
320 | - | let wxBalToSwap = assetBalance(this, wxAssetId) | |
321 | - | let swapWxOnSwop = invoke(swopWxPool, "exchange", [1], [AttachedPayment(wxAssetId, wxBalToSwap)]) | |
322 | - | if ((swapWxOnSwop == swapWxOnSwop)) | |
323 | - | then { | |
324 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
325 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
326 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
327 | - | then throw("WX WX -> SWOP [($_$)]") | |
328 | - | else nil | |
329 | - | else throw("Strict value is not equal to itself.") | |
330 | - | } | |
331 | - | else throw("Strict value is not equal to itself.") | |
332 | - | } | |
333 | - | else throw("Strict value is not equal to itself.") | |
334 | - | } | |
335 | - | else throw("Strict value is not equal to itself.") | |
336 | - | } | |
337 | - | else throw("Strict value is not equal to itself.") | |
338 | - | } | |
339 | - | else throw("Strict value is not equal to itself.") | |
229 | + | let putTheTokenInThePool = invoke(wxWxPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
230 | + | let lpTokenBalance = assetBalance(this, usdnWxLPTokenAssetId) | |
231 | + | let sellPoolToken = invoke(wxWxPool, "getOneTkn", [wxAssetIdString, 1], [AttachedPayment(usdnWxLPTokenAssetId, lpTokenBalance)]) | |
232 | + | let wxBalToSwap = assetBalance(this, wxAssetId) | |
233 | + | let swapWxOnSwop = invoke(swopWxPool, "exchange", [1], [AttachedPayment(wxAssetId, wxBalToSwap)]) | |
234 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
235 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
236 | + | then throw("WX WX -> SWOP [($_$)]") | |
237 | + | else nil | |
340 | 238 | } | |
341 | 239 | ||
342 | 240 | ||
346 | 244 | then throw("you are not allowed to arb!") | |
347 | 245 | else { | |
348 | 246 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
349 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
350 | - | then { | |
351 | - | let swapToWxOnSwop = invoke(swopWxPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
352 | - | if ((swapToWxOnSwop == swapToWxOnSwop)) | |
353 | - | then { | |
354 | - | let wxBalToSwap = assetBalance(this, wxAssetId) | |
355 | - | let putTheTokenInThePool = invoke(wxWxPool, "putOneTkn", [1, false], [AttachedPayment(wxAssetId, wxBalToSwap)]) | |
356 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
357 | - | then { | |
358 | - | let lpTokenBalance = assetBalance(this, usdnWxLPTokenAssetId) | |
359 | - | if ((lpTokenBalance == lpTokenBalance)) | |
360 | - | then { | |
361 | - | let sellPoolToken = invoke(wxWxPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(usdnWxLPTokenAssetId, lpTokenBalance)]) | |
362 | - | if ((sellPoolToken == sellPoolToken)) | |
363 | - | then { | |
364 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
365 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
366 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
367 | - | then throw("WX SWOP -> WX [($_$)]") | |
368 | - | else nil | |
369 | - | else throw("Strict value is not equal to itself.") | |
370 | - | } | |
371 | - | else throw("Strict value is not equal to itself.") | |
372 | - | } | |
373 | - | else throw("Strict value is not equal to itself.") | |
374 | - | } | |
375 | - | else throw("Strict value is not equal to itself.") | |
376 | - | } | |
377 | - | else throw("Strict value is not equal to itself.") | |
378 | - | } | |
379 | - | else throw("Strict value is not equal to itself.") | |
247 | + | let swapToWxOnSwop = invoke(swopWxPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
248 | + | let wxBalToSwap = assetBalance(this, wxAssetId) | |
249 | + | let putTheTokenInThePool = invoke(wxWxPool, "putOneTkn", [1, false], [AttachedPayment(wxAssetId, wxBalToSwap)]) | |
250 | + | let lpTokenBalance = assetBalance(this, usdnWxLPTokenAssetId) | |
251 | + | let sellPoolToken = invoke(wxWxPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(usdnWxLPTokenAssetId, lpTokenBalance)]) | |
252 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
253 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
254 | + | then throw("WX SWOP -> WX [($_$)]") | |
255 | + | else nil | |
380 | 256 | } | |
381 | 257 | ||
382 | 258 | ||
386 | 262 | then throw("you are not allowed to arb!") | |
387 | 263 | else { | |
388 | 264 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
389 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
390 | - | then { | |
391 | - | let buyUsdcOnPuzzle = invoke(puzzleUsdcPool, "swap", [usdcAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
392 | - | if ((buyUsdcOnPuzzle == buyUsdcOnPuzzle)) | |
393 | - | then { | |
394 | - | let usdcBalToSwap = assetBalance(this, usdcAssetId) | |
395 | - | if ((usdcBalToSwap == usdcBalToSwap)) | |
396 | - | then { | |
397 | - | let putTheTokenInThePool = invoke(wxUsdcPool, "putOneTknV2", [1, false], [AttachedPayment(usdcAssetId, usdcBalToSwap)]) | |
398 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
399 | - | then { | |
400 | - | let lpTokenBalance = assetBalance(this, usdcWxLPTokenAssetId) | |
401 | - | if ((lpTokenBalance == lpTokenBalance)) | |
402 | - | then { | |
403 | - | let sellPoolToken = invoke(wxUsdcPool, "getOneTknV2", [usdnAssetIdString, 1], [AttachedPayment(usdcWxLPTokenAssetId, lpTokenBalance)]) | |
404 | - | if ((sellPoolToken == sellPoolToken)) | |
405 | - | then { | |
406 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
407 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
408 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
409 | - | then throw("USDC PUZZLE -> WX [($_$)]") | |
410 | - | else nil | |
411 | - | else throw("Strict value is not equal to itself.") | |
412 | - | } | |
413 | - | else throw("Strict value is not equal to itself.") | |
414 | - | } | |
415 | - | else throw("Strict value is not equal to itself.") | |
416 | - | } | |
417 | - | else throw("Strict value is not equal to itself.") | |
418 | - | } | |
419 | - | else throw("Strict value is not equal to itself.") | |
420 | - | } | |
421 | - | else throw("Strict value is not equal to itself.") | |
422 | - | } | |
423 | - | else throw("Strict value is not equal to itself.") | |
265 | + | let buyUsdcOnPuzzle = invoke(puzzleUsdcPool, "swap", [usdcAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
266 | + | let usdcBalToSwap = assetBalance(this, usdcAssetId) | |
267 | + | let putTheTokenInThePool = invoke(wxUsdcPool, "putOneTknV2", [1, false], [AttachedPayment(usdcAssetId, usdcBalToSwap)]) | |
268 | + | let lpTokenBalance = assetBalance(this, usdcWxLPTokenAssetId) | |
269 | + | let sellPoolToken = invoke(wxUsdcPool, "getOneTknV2", [usdnAssetIdString, 1], [AttachedPayment(usdcWxLPTokenAssetId, lpTokenBalance)]) | |
270 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
271 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
272 | + | then throw("USDC PUZZLE -> WX [($_$)]") | |
273 | + | else nil | |
424 | 274 | } | |
425 | 275 | ||
426 | 276 | ||
430 | 280 | then throw("you are not allowed to arb!") | |
431 | 281 | else { | |
432 | 282 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
433 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
434 | - | then { | |
435 | - | let putTheTokenInThePool = invoke(wxUsdcPool, "putOneTknV2", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
436 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
437 | - | then { | |
438 | - | let lpTokenBalance = assetBalance(this, usdcWxLPTokenAssetId) | |
439 | - | if ((lpTokenBalance == lpTokenBalance)) | |
440 | - | then { | |
441 | - | let sellPoolToken = invoke(wxUsdcPool, "getOneTknV2", [usdcAssetIdString, 1], [AttachedPayment(usdcWxLPTokenAssetId, lpTokenBalance)]) | |
442 | - | if ((sellPoolToken == sellPoolToken)) | |
443 | - | then { | |
444 | - | let usdcBalToSwap = assetBalance(this, usdcAssetId) | |
445 | - | if ((usdcBalToSwap == usdcBalToSwap)) | |
446 | - | then { | |
447 | - | let sellUsdcOnPuzzle = invoke(puzzleUsdcPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(usdcAssetId, usdcBalToSwap)]) | |
448 | - | if ((sellUsdcOnPuzzle == sellUsdcOnPuzzle)) | |
449 | - | then { | |
450 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
451 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
452 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
453 | - | then throw("USDC WX -> PUZZLE [($_$)]") | |
454 | - | else nil | |
455 | - | else throw("Strict value is not equal to itself.") | |
456 | - | } | |
457 | - | else throw("Strict value is not equal to itself.") | |
458 | - | } | |
459 | - | else throw("Strict value is not equal to itself.") | |
460 | - | } | |
461 | - | else throw("Strict value is not equal to itself.") | |
462 | - | } | |
463 | - | else throw("Strict value is not equal to itself.") | |
464 | - | } | |
465 | - | else throw("Strict value is not equal to itself.") | |
466 | - | } | |
467 | - | else throw("Strict value is not equal to itself.") | |
283 | + | let putTheTokenInThePool = invoke(wxUsdcPool, "putOneTknV2", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
284 | + | let lpTokenBalance = assetBalance(this, usdcWxLPTokenAssetId) | |
285 | + | let sellPoolToken = invoke(wxUsdcPool, "getOneTknV2", [usdcAssetIdString, 1], [AttachedPayment(usdcWxLPTokenAssetId, lpTokenBalance)]) | |
286 | + | let usdcBalToSwap = assetBalance(this, usdcAssetId) | |
287 | + | let sellUsdcOnPuzzle = invoke(puzzleUsdcPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(usdcAssetId, usdcBalToSwap)]) | |
288 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
289 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
290 | + | then throw("USDC WX -> PUZZLE [($_$)]") | |
291 | + | else nil | |
468 | 292 | } | |
469 | 293 | ||
470 | 294 | ||
474 | 298 | then throw("you are not allowed to arb!") | |
475 | 299 | else { | |
476 | 300 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
477 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
478 | - | then { | |
479 | - | let buyUsdtOnPuzzle = invoke(puzzleUsdtPool, "swap", [usdtAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
480 | - | if ((buyUsdtOnPuzzle == buyUsdtOnPuzzle)) | |
481 | - | then { | |
482 | - | let usdtBalToSwap = assetBalance(this, usdtAssetId) | |
483 | - | if ((usdtBalToSwap == usdtBalToSwap)) | |
484 | - | then { | |
485 | - | let putTheTokenInThePool = invoke(wxUsdtPool, "putOneTknV2", [1, false], [AttachedPayment(usdtAssetId, usdtBalToSwap)]) | |
486 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
487 | - | then { | |
488 | - | let lpTokenBalance = assetBalance(this, usdtWxLPTokenAssetId) | |
489 | - | if ((lpTokenBalance == lpTokenBalance)) | |
490 | - | then { | |
491 | - | let sellPoolToken = invoke(wxUsdtPool, "getOneTknV2", [usdnAssetIdString, 1], [AttachedPayment(usdtWxLPTokenAssetId, lpTokenBalance)]) | |
492 | - | if ((sellPoolToken == sellPoolToken)) | |
493 | - | then { | |
494 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
495 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
496 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
497 | - | then throw("USDT PUZZLE -> WX [($_$)]") | |
498 | - | else nil | |
499 | - | else throw("Strict value is not equal to itself.") | |
500 | - | } | |
501 | - | else throw("Strict value is not equal to itself.") | |
502 | - | } | |
503 | - | else throw("Strict value is not equal to itself.") | |
504 | - | } | |
505 | - | else throw("Strict value is not equal to itself.") | |
506 | - | } | |
507 | - | else throw("Strict value is not equal to itself.") | |
508 | - | } | |
509 | - | else throw("Strict value is not equal to itself.") | |
510 | - | } | |
511 | - | else throw("Strict value is not equal to itself.") | |
301 | + | let buyUsdtOnPuzzle = invoke(puzzleUsdtPool, "swap", [usdtAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
302 | + | let usdtBalToSwap = assetBalance(this, usdtAssetId) | |
303 | + | let putTheTokenInThePool = invoke(wxUsdtPool, "putOneTknV2", [1, false], [AttachedPayment(usdtAssetId, usdtBalToSwap)]) | |
304 | + | let lpTokenBalance = assetBalance(this, usdtWxLPTokenAssetId) | |
305 | + | let sellPoolToken = invoke(wxUsdtPool, "getOneTknV2", [usdnAssetIdString, 1], [AttachedPayment(usdtWxLPTokenAssetId, lpTokenBalance)]) | |
306 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
307 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
308 | + | then throw("USDT PUZZLE -> WX [($_$)]") | |
309 | + | else nil | |
512 | 310 | } | |
513 | 311 | ||
514 | 312 | ||
518 | 316 | then throw("you are not allowed to arb!") | |
519 | 317 | else { | |
520 | 318 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
521 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
522 | - | then { | |
523 | - | let putTheTokenInThePool = invoke(wxUsdtPool, "putOneTknV2", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
524 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
525 | - | then { | |
526 | - | let lpTokenBalance = assetBalance(this, usdtWxLPTokenAssetId) | |
527 | - | if ((lpTokenBalance == lpTokenBalance)) | |
528 | - | then { | |
529 | - | let sellPoolToken = invoke(wxUsdtPool, "getOneTknV2", [usdtAssetIdString, 1], [AttachedPayment(usdtWxLPTokenAssetId, lpTokenBalance)]) | |
530 | - | if ((sellPoolToken == sellPoolToken)) | |
531 | - | then { | |
532 | - | let usdtBalToSwap = assetBalance(this, usdtAssetId) | |
533 | - | if ((usdtBalToSwap == usdtBalToSwap)) | |
534 | - | then { | |
535 | - | let sellUsdtOnPuzzle = invoke(puzzleUsdtPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(usdtAssetId, usdtBalToSwap)]) | |
536 | - | if ((sellUsdtOnPuzzle == sellUsdtOnPuzzle)) | |
537 | - | then { | |
538 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
539 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
540 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
541 | - | then throw("USDT WX -> PUZZLE [($_$)]") | |
542 | - | else nil | |
543 | - | else throw("Strict value is not equal to itself.") | |
544 | - | } | |
545 | - | else throw("Strict value is not equal to itself.") | |
546 | - | } | |
547 | - | else throw("Strict value is not equal to itself.") | |
548 | - | } | |
549 | - | else throw("Strict value is not equal to itself.") | |
550 | - | } | |
551 | - | else throw("Strict value is not equal to itself.") | |
552 | - | } | |
553 | - | else throw("Strict value is not equal to itself.") | |
554 | - | } | |
555 | - | else throw("Strict value is not equal to itself.") | |
319 | + | let putTheTokenInThePool = invoke(wxUsdtPool, "putOneTknV2", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
320 | + | let lpTokenBalance = assetBalance(this, usdtWxLPTokenAssetId) | |
321 | + | let sellPoolToken = invoke(wxUsdtPool, "getOneTknV2", [usdtAssetIdString, 1], [AttachedPayment(usdtWxLPTokenAssetId, lpTokenBalance)]) | |
322 | + | let usdtBalToSwap = assetBalance(this, usdtAssetId) | |
323 | + | let sellUsdtOnPuzzle = invoke(puzzleUsdtPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(usdtAssetId, usdtBalToSwap)]) | |
324 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
325 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
326 | + | then throw("USDT WX -> PUZZLE [($_$)]") | |
327 | + | else nil | |
556 | 328 | } | |
557 | 329 | ||
558 | 330 | ||
562 | 334 | then throw("you are not allowed to arb!") | |
563 | 335 | else { | |
564 | 336 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
565 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
566 | - | then { | |
567 | - | let buyTsnOnPuzzle = invoke(puzzleTsnPool, "swap", [tsnAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
568 | - | if ((buyTsnOnPuzzle == buyTsnOnPuzzle)) | |
569 | - | then { | |
570 | - | let tsnBalToSwap = assetBalance(this, tsnAssetId) | |
571 | - | if ((tsnBalToSwap == tsnBalToSwap)) | |
572 | - | then { | |
573 | - | let putTheTokenInThePool = invoke(wxTsnPool, "putOneTkn", [1, false], [AttachedPayment(tsnAssetId, tsnBalToSwap)]) | |
574 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
575 | - | then { | |
576 | - | let lpTokenBalance = assetBalance(this, tsnWxLPTokenAssetId) | |
577 | - | if ((lpTokenBalance == lpTokenBalance)) | |
578 | - | then { | |
579 | - | let sellPoolToken = invoke(wxTsnPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(tsnWxLPTokenAssetId, lpTokenBalance)]) | |
580 | - | if ((sellPoolToken == sellPoolToken)) | |
581 | - | then { | |
582 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
583 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
584 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
585 | - | then throw("TSN PUZZLE -> WX [($_$)]") | |
586 | - | else nil | |
587 | - | else throw("Strict value is not equal to itself.") | |
588 | - | } | |
589 | - | else throw("Strict value is not equal to itself.") | |
590 | - | } | |
591 | - | else throw("Strict value is not equal to itself.") | |
592 | - | } | |
593 | - | else throw("Strict value is not equal to itself.") | |
594 | - | } | |
595 | - | else throw("Strict value is not equal to itself.") | |
596 | - | } | |
597 | - | else throw("Strict value is not equal to itself.") | |
598 | - | } | |
599 | - | else throw("Strict value is not equal to itself.") | |
337 | + | let buyTsnOnPuzzle = invoke(puzzleTsnPool, "swap", [tsnAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
338 | + | let tsnBalToSwap = assetBalance(this, tsnAssetId) | |
339 | + | let putTheTokenInThePool = invoke(wxTsnPool, "putOneTkn", [1, false], [AttachedPayment(tsnAssetId, tsnBalToSwap)]) | |
340 | + | let lpTokenBalance = assetBalance(this, tsnWxLPTokenAssetId) | |
341 | + | let sellPoolToken = invoke(wxTsnPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(tsnWxLPTokenAssetId, lpTokenBalance)]) | |
342 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
343 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
344 | + | then throw("TSN PUZZLE -> WX [($_$)]") | |
345 | + | else nil | |
600 | 346 | } | |
601 | 347 | ||
602 | 348 | ||
606 | 352 | then throw("you are not allowed to arb!") | |
607 | 353 | else { | |
608 | 354 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
609 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
610 | - | then { | |
611 | - | let putTheTokenInThePool = invoke(wxTsnPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
612 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
613 | - | then { | |
614 | - | let lpTokenBalance = assetBalance(this, tsnWxLPTokenAssetId) | |
615 | - | if ((lpTokenBalance == lpTokenBalance)) | |
616 | - | then { | |
617 | - | let sellPoolToken = invoke(wxTsnPool, "getOneTkn", [tsnAssetIdString, 1], [AttachedPayment(tsnWxLPTokenAssetId, lpTokenBalance)]) | |
618 | - | if ((sellPoolToken == sellPoolToken)) | |
619 | - | then { | |
620 | - | let tsnBalToSwap = assetBalance(this, tsnAssetId) | |
621 | - | if ((tsnBalToSwap == tsnBalToSwap)) | |
622 | - | then { | |
623 | - | let selltsnOnPuzzle = invoke(puzzleTsnPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(tsnAssetId, tsnBalToSwap)]) | |
624 | - | if ((selltsnOnPuzzle == selltsnOnPuzzle)) | |
625 | - | then { | |
626 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
627 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
628 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
629 | - | then throw("TSN WX -> PUZZLE [($_$)]") | |
630 | - | else nil | |
631 | - | else throw("Strict value is not equal to itself.") | |
632 | - | } | |
633 | - | else throw("Strict value is not equal to itself.") | |
634 | - | } | |
635 | - | else throw("Strict value is not equal to itself.") | |
636 | - | } | |
637 | - | else throw("Strict value is not equal to itself.") | |
638 | - | } | |
639 | - | else throw("Strict value is not equal to itself.") | |
640 | - | } | |
641 | - | else throw("Strict value is not equal to itself.") | |
642 | - | } | |
643 | - | else throw("Strict value is not equal to itself.") | |
355 | + | let putTheTokenInThePool = invoke(wxTsnPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
356 | + | let lpTokenBalance = assetBalance(this, tsnWxLPTokenAssetId) | |
357 | + | let sellPoolToken = invoke(wxTsnPool, "getOneTkn", [tsnAssetIdString, 1], [AttachedPayment(tsnWxLPTokenAssetId, lpTokenBalance)]) | |
358 | + | let tsnBalToSwap = assetBalance(this, tsnAssetId) | |
359 | + | let selltsnOnPuzzle = invoke(puzzleTsnPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(tsnAssetId, tsnBalToSwap)]) | |
360 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
361 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
362 | + | then throw("TSN WX -> PUZZLE [($_$)]") | |
363 | + | else nil | |
644 | 364 | } | |
645 | 365 | ||
646 | 366 | ||
650 | 370 | then throw("you are not allowed to arb!") | |
651 | 371 | else { | |
652 | 372 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
653 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
654 | - | then { | |
655 | - | let putTheTokenInThePool = invoke(wxBtcPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
656 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
657 | - | then { | |
658 | - | let lpTokenBalance = assetBalance(this, btcWxLPTokenAssetId) | |
659 | - | if ((lpTokenBalance == lpTokenBalance)) | |
660 | - | then { | |
661 | - | let sellPoolToken = invoke(wxBtcPool, "getOneTkn", [btcAssetIdString, 1], [AttachedPayment(btcWxLPTokenAssetId, lpTokenBalance)]) | |
662 | - | if ((sellPoolToken == sellPoolToken)) | |
663 | - | then { | |
664 | - | let btcBalToSwap = assetBalance(this, btcAssetId) | |
665 | - | let swapBtcOnSwop = invoke(swopBtcPool, "exchange", [1], [AttachedPayment(btcAssetId, btcBalToSwap)]) | |
666 | - | if ((swapBtcOnSwop == swapBtcOnSwop)) | |
667 | - | then { | |
668 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
669 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
670 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
671 | - | then throw("BTC WX -> SWOP [($_$)]") | |
672 | - | else nil | |
673 | - | else throw("Strict value is not equal to itself.") | |
674 | - | } | |
675 | - | else throw("Strict value is not equal to itself.") | |
676 | - | } | |
677 | - | else throw("Strict value is not equal to itself.") | |
678 | - | } | |
679 | - | else throw("Strict value is not equal to itself.") | |
680 | - | } | |
681 | - | else throw("Strict value is not equal to itself.") | |
682 | - | } | |
683 | - | else throw("Strict value is not equal to itself.") | |
373 | + | let putTheTokenInThePool = invoke(wxBtcPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
374 | + | let lpTokenBalance = assetBalance(this, btcWxLPTokenAssetId) | |
375 | + | let sellPoolToken = invoke(wxBtcPool, "getOneTkn", [btcAssetIdString, 1], [AttachedPayment(btcWxLPTokenAssetId, lpTokenBalance)]) | |
376 | + | let btcBalToSwap = assetBalance(this, btcAssetId) | |
377 | + | let swapBtcOnSwop = invoke(swopBtcPool, "exchange", [1], [AttachedPayment(btcAssetId, btcBalToSwap)]) | |
378 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
379 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
380 | + | then throw("BTC WX -> SWOP [($_$)]") | |
381 | + | else nil | |
684 | 382 | } | |
685 | 383 | ||
686 | 384 | ||
690 | 388 | then throw("you are not allowed to arb!") | |
691 | 389 | else { | |
692 | 390 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
693 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
694 | - | then { | |
695 | - | let swapToBtcOnSwop = invoke(swopBtcPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
696 | - | if ((swapToBtcOnSwop == swapToBtcOnSwop)) | |
697 | - | then { | |
698 | - | let btcBalToSwap = assetBalance(this, btcAssetId) | |
699 | - | let putTheTokenInThePool = invoke(wxBtcPool, "putOneTkn", [1, false], [AttachedPayment(btcAssetId, btcBalToSwap)]) | |
700 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
701 | - | then { | |
702 | - | let lpTokenBalance = assetBalance(this, btcWxLPTokenAssetId) | |
703 | - | if ((lpTokenBalance == lpTokenBalance)) | |
704 | - | then { | |
705 | - | let sellPoolToken = invoke(wxBtcPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(btcWxLPTokenAssetId, lpTokenBalance)]) | |
706 | - | if ((sellPoolToken == sellPoolToken)) | |
707 | - | then { | |
708 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
709 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
710 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
711 | - | then throw("BTC SWOP -> WX [($_$)]") | |
712 | - | else nil | |
713 | - | else throw("Strict value is not equal to itself.") | |
714 | - | } | |
715 | - | else throw("Strict value is not equal to itself.") | |
716 | - | } | |
717 | - | else throw("Strict value is not equal to itself.") | |
718 | - | } | |
719 | - | else throw("Strict value is not equal to itself.") | |
720 | - | } | |
721 | - | else throw("Strict value is not equal to itself.") | |
722 | - | } | |
723 | - | else throw("Strict value is not equal to itself.") | |
391 | + | let swapToBtcOnSwop = invoke(swopBtcPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
392 | + | let btcBalToSwap = assetBalance(this, btcAssetId) | |
393 | + | let putTheTokenInThePool = invoke(wxBtcPool, "putOneTkn", [1, false], [AttachedPayment(btcAssetId, btcBalToSwap)]) | |
394 | + | let lpTokenBalance = assetBalance(this, btcWxLPTokenAssetId) | |
395 | + | let sellPoolToken = invoke(wxBtcPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(btcWxLPTokenAssetId, lpTokenBalance)]) | |
396 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
397 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
398 | + | then throw("BTC SWOP -> WX [($_$)]") | |
399 | + | else nil | |
724 | 400 | } | |
725 | 401 | ||
726 | 402 | ||
730 | 406 | then throw("you are not allowed to arb!") | |
731 | 407 | else { | |
732 | 408 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
733 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
734 | - | then { | |
735 | - | let putTheTokenInThePool = invoke(wxEthPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
736 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
737 | - | then { | |
738 | - | let lpTokenBalance = assetBalance(this, ethWxLPTokenAssetId) | |
739 | - | if ((lpTokenBalance == lpTokenBalance)) | |
740 | - | then { | |
741 | - | let sellPoolToken = invoke(wxEthPool, "getOneTkn", [ethAssetIdString, 1], [AttachedPayment(ethWxLPTokenAssetId, lpTokenBalance)]) | |
742 | - | if ((sellPoolToken == sellPoolToken)) | |
743 | - | then { | |
744 | - | let ethBalToSwap = assetBalance(this, ethAssetId) | |
745 | - | let swapEthOnSwop = invoke(swopEthPool, "exchange", [1], [AttachedPayment(ethAssetId, ethBalToSwap)]) | |
746 | - | if ((swapEthOnSwop == swapEthOnSwop)) | |
747 | - | then { | |
748 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
749 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
750 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
751 | - | then throw("ETH WX -> SWOP [($_$)]") | |
752 | - | else nil | |
753 | - | else throw("Strict value is not equal to itself.") | |
754 | - | } | |
755 | - | else throw("Strict value is not equal to itself.") | |
756 | - | } | |
757 | - | else throw("Strict value is not equal to itself.") | |
758 | - | } | |
759 | - | else throw("Strict value is not equal to itself.") | |
760 | - | } | |
761 | - | else throw("Strict value is not equal to itself.") | |
762 | - | } | |
763 | - | else throw("Strict value is not equal to itself.") | |
409 | + | let putTheTokenInThePool = invoke(wxEthPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
410 | + | let lpTokenBalance = assetBalance(this, ethWxLPTokenAssetId) | |
411 | + | let sellPoolToken = invoke(wxEthPool, "getOneTkn", [ethAssetIdString, 1], [AttachedPayment(ethWxLPTokenAssetId, lpTokenBalance)]) | |
412 | + | let ethBalToSwap = assetBalance(this, ethAssetId) | |
413 | + | let swapEthOnSwop = invoke(swopEthPool, "exchange", [1], [AttachedPayment(ethAssetId, ethBalToSwap)]) | |
414 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
415 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
416 | + | then throw("ETH WX -> SWOP [($_$)]") | |
417 | + | else nil | |
764 | 418 | } | |
765 | 419 | ||
766 | 420 | ||
770 | 424 | then throw("you are not allowed to arb!") | |
771 | 425 | else { | |
772 | 426 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
773 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
774 | - | then { | |
775 | - | let swapToEthOnSwop = invoke(swopEthPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
776 | - | if ((swapToEthOnSwop == swapToEthOnSwop)) | |
777 | - | then { | |
778 | - | let ethBalToSwap = assetBalance(this, ethAssetId) | |
779 | - | let putTheTokenInThePool = invoke(wxEthPool, "putOneTkn", [1, false], [AttachedPayment(ethAssetId, ethBalToSwap)]) | |
780 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
781 | - | then { | |
782 | - | let lpTokenBalance = assetBalance(this, ethWxLPTokenAssetId) | |
783 | - | if ((lpTokenBalance == lpTokenBalance)) | |
784 | - | then { | |
785 | - | let sellPoolToken = invoke(wxEthPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(ethWxLPTokenAssetId, lpTokenBalance)]) | |
786 | - | if ((sellPoolToken == sellPoolToken)) | |
787 | - | then { | |
788 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
789 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
790 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
791 | - | then throw("ETH SWOP -> WX [($_$)]") | |
792 | - | else nil | |
793 | - | else throw("Strict value is not equal to itself.") | |
794 | - | } | |
795 | - | else throw("Strict value is not equal to itself.") | |
796 | - | } | |
797 | - | else throw("Strict value is not equal to itself.") | |
798 | - | } | |
799 | - | else throw("Strict value is not equal to itself.") | |
800 | - | } | |
801 | - | else throw("Strict value is not equal to itself.") | |
802 | - | } | |
803 | - | else throw("Strict value is not equal to itself.") | |
427 | + | let swapToEthOnSwop = invoke(swopEthPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
428 | + | let ethBalToSwap = assetBalance(this, ethAssetId) | |
429 | + | let putTheTokenInThePool = invoke(wxEthPool, "putOneTkn", [1, false], [AttachedPayment(ethAssetId, ethBalToSwap)]) | |
430 | + | let lpTokenBalance = assetBalance(this, ethWxLPTokenAssetId) | |
431 | + | let sellPoolToken = invoke(wxEthPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(ethWxLPTokenAssetId, lpTokenBalance)]) | |
432 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
433 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
434 | + | then throw("ETH SWOP -> WX [($_$)]") | |
435 | + | else nil | |
804 | 436 | } | |
805 | 437 | ||
806 | 438 | ||
810 | 442 | then throw("you are not allowed to arb!") | |
811 | 443 | else { | |
812 | 444 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
813 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
814 | - | then { | |
815 | - | let putTheTokenInThePool = invoke(wxLtcPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
816 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
817 | - | then { | |
818 | - | let lpTokenBalance = assetBalance(this, ltcWxLPTokenAssetId) | |
819 | - | if ((lpTokenBalance == lpTokenBalance)) | |
820 | - | then { | |
821 | - | let sellPoolToken = invoke(wxLtcPool, "getOneTkn", [ltcAssetIdString, 1], [AttachedPayment(ltcWxLPTokenAssetId, lpTokenBalance)]) | |
822 | - | if ((sellPoolToken == sellPoolToken)) | |
823 | - | then { | |
824 | - | let ltcBalToSwap = assetBalance(this, ltcAssetId) | |
825 | - | let swapLtcOnSwop = invoke(swopLtcPool, "exchange", [1], [AttachedPayment(ltcAssetId, ltcBalToSwap)]) | |
826 | - | if ((swapLtcOnSwop == swapLtcOnSwop)) | |
827 | - | then { | |
828 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
829 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
830 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
831 | - | then throw("LTC WX -> SWOP [($_$)]") | |
832 | - | else nil | |
833 | - | else throw("Strict value is not equal to itself.") | |
834 | - | } | |
835 | - | else throw("Strict value is not equal to itself.") | |
836 | - | } | |
837 | - | else throw("Strict value is not equal to itself.") | |
838 | - | } | |
839 | - | else throw("Strict value is not equal to itself.") | |
840 | - | } | |
841 | - | else throw("Strict value is not equal to itself.") | |
842 | - | } | |
843 | - | else throw("Strict value is not equal to itself.") | |
445 | + | let putTheTokenInThePool = invoke(wxLtcPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
446 | + | let lpTokenBalance = assetBalance(this, ltcWxLPTokenAssetId) | |
447 | + | let sellPoolToken = invoke(wxLtcPool, "getOneTkn", [ltcAssetIdString, 1], [AttachedPayment(ltcWxLPTokenAssetId, lpTokenBalance)]) | |
448 | + | let ltcBalToSwap = assetBalance(this, ltcAssetId) | |
449 | + | let swapLtcOnSwop = invoke(swopLtcPool, "exchange", [1], [AttachedPayment(ltcAssetId, ltcBalToSwap)]) | |
450 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
451 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
452 | + | then throw("LTC WX -> SWOP [($_$)]") | |
453 | + | else nil | |
844 | 454 | } | |
845 | 455 | ||
846 | 456 | ||
850 | 460 | then throw("you are not allowed to arb!") | |
851 | 461 | else { | |
852 | 462 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
853 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
854 | - | then { | |
855 | - | let swapToLtcOnSwop = invoke(swopLtcPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
856 | - | if ((swapToLtcOnSwop == swapToLtcOnSwop)) | |
857 | - | then { | |
858 | - | let ltcBalToSwap = assetBalance(this, ltcAssetId) | |
859 | - | let putTheTokenInThePool = invoke(wxLtcPool, "putOneTkn", [1, false], [AttachedPayment(ltcAssetId, ltcBalToSwap)]) | |
860 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
861 | - | then { | |
862 | - | let lpTokenBalance = assetBalance(this, ltcWxLPTokenAssetId) | |
863 | - | if ((lpTokenBalance == lpTokenBalance)) | |
864 | - | then { | |
865 | - | let sellPoolToken = invoke(wxLtcPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(ltcWxLPTokenAssetId, lpTokenBalance)]) | |
866 | - | if ((sellPoolToken == sellPoolToken)) | |
867 | - | then { | |
868 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
869 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
870 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
871 | - | then throw("LTC SWOP -> WX [($_$)]") | |
872 | - | else nil | |
873 | - | else throw("Strict value is not equal to itself.") | |
874 | - | } | |
875 | - | else throw("Strict value is not equal to itself.") | |
876 | - | } | |
877 | - | else throw("Strict value is not equal to itself.") | |
878 | - | } | |
879 | - | else throw("Strict value is not equal to itself.") | |
880 | - | } | |
881 | - | else throw("Strict value is not equal to itself.") | |
882 | - | } | |
883 | - | else throw("Strict value is not equal to itself.") | |
463 | + | let swapToLtcOnSwop = invoke(swopLtcPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
464 | + | let ltcBalToSwap = assetBalance(this, ltcAssetId) | |
465 | + | let putTheTokenInThePool = invoke(wxLtcPool, "putOneTkn", [1, false], [AttachedPayment(ltcAssetId, ltcBalToSwap)]) | |
466 | + | let lpTokenBalance = assetBalance(this, ltcWxLPTokenAssetId) | |
467 | + | let sellPoolToken = invoke(wxLtcPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(ltcWxLPTokenAssetId, lpTokenBalance)]) | |
468 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
469 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
470 | + | then throw("LTC SWOP -> WX [($_$)]") | |
471 | + | else nil | |
884 | 472 | } | |
885 | 473 | ||
886 | 474 | ||
890 | 478 | then throw("you are not allowed to arb!") | |
891 | 479 | else { | |
892 | 480 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
893 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
894 | - | then { | |
895 | - | let putTheTokenInThePool = invoke(wxWestPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
896 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
897 | - | then { | |
898 | - | let lpTokenBalance = assetBalance(this, westWxLPTokenAssetId) | |
899 | - | if ((lpTokenBalance == lpTokenBalance)) | |
900 | - | then { | |
901 | - | let sellPoolToken = invoke(wxWestPool, "getOneTkn", [westAssetIdString, 1], [AttachedPayment(westWxLPTokenAssetId, lpTokenBalance)]) | |
902 | - | if ((sellPoolToken == sellPoolToken)) | |
903 | - | then { | |
904 | - | let westBalToSwap = assetBalance(this, westAssetId) | |
905 | - | let swapWestOnSwop = invoke(swopWestPool, "exchange", [1], [AttachedPayment(westAssetId, westBalToSwap)]) | |
906 | - | if ((swapWestOnSwop == swapWestOnSwop)) | |
907 | - | then { | |
908 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
909 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
910 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
911 | - | then throw("WEST WX -> SWOP [($_$)]") | |
912 | - | else nil | |
913 | - | else throw("Strict value is not equal to itself.") | |
914 | - | } | |
915 | - | else throw("Strict value is not equal to itself.") | |
916 | - | } | |
917 | - | else throw("Strict value is not equal to itself.") | |
918 | - | } | |
919 | - | else throw("Strict value is not equal to itself.") | |
920 | - | } | |
921 | - | else throw("Strict value is not equal to itself.") | |
922 | - | } | |
923 | - | else throw("Strict value is not equal to itself.") | |
481 | + | let putTheTokenInThePool = invoke(wxWestPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
482 | + | let lpTokenBalance = assetBalance(this, westWxLPTokenAssetId) | |
483 | + | let sellPoolToken = invoke(wxWestPool, "getOneTkn", [westAssetIdString, 1], [AttachedPayment(westWxLPTokenAssetId, lpTokenBalance)]) | |
484 | + | let westBalToSwap = assetBalance(this, westAssetId) | |
485 | + | let swapWestOnSwop = invoke(swopWestPool, "exchange", [1], [AttachedPayment(westAssetId, westBalToSwap)]) | |
486 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
487 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
488 | + | then throw("WEST WX -> SWOP [($_$)]") | |
489 | + | else nil | |
924 | 490 | } | |
925 | 491 | ||
926 | 492 | ||
930 | 496 | then throw("you are not allowed to arb!") | |
931 | 497 | else { | |
932 | 498 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
933 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
934 | - | then { | |
935 | - | let swapToWestOnSwop = invoke(swopWestPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
936 | - | if ((swapToWestOnSwop == swapToWestOnSwop)) | |
937 | - | then { | |
938 | - | let westBalToSwap = assetBalance(this, westAssetId) | |
939 | - | let putTheTokenInThePool = invoke(wxWestPool, "putOneTkn", [1, false], [AttachedPayment(westAssetId, westBalToSwap)]) | |
940 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
941 | - | then { | |
942 | - | let lpTokenBalance = assetBalance(this, westWxLPTokenAssetId) | |
943 | - | if ((lpTokenBalance == lpTokenBalance)) | |
944 | - | then { | |
945 | - | let sellPoolToken = invoke(wxWestPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(westWxLPTokenAssetId, lpTokenBalance)]) | |
946 | - | if ((sellPoolToken == sellPoolToken)) | |
947 | - | then { | |
948 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
949 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
950 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
951 | - | then throw("WEST SWOP -> WX [($_$)]") | |
952 | - | else nil | |
953 | - | else throw("Strict value is not equal to itself.") | |
954 | - | } | |
955 | - | else throw("Strict value is not equal to itself.") | |
956 | - | } | |
957 | - | else throw("Strict value is not equal to itself.") | |
958 | - | } | |
959 | - | else throw("Strict value is not equal to itself.") | |
960 | - | } | |
961 | - | else throw("Strict value is not equal to itself.") | |
962 | - | } | |
963 | - | else throw("Strict value is not equal to itself.") | |
499 | + | let swapToWestOnSwop = invoke(swopWestPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
500 | + | let westBalToSwap = assetBalance(this, westAssetId) | |
501 | + | let putTheTokenInThePool = invoke(wxWestPool, "putOneTkn", [1, false], [AttachedPayment(westAssetId, westBalToSwap)]) | |
502 | + | let lpTokenBalance = assetBalance(this, westWxLPTokenAssetId) | |
503 | + | let sellPoolToken = invoke(wxWestPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(westWxLPTokenAssetId, lpTokenBalance)]) | |
504 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
505 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
506 | + | then throw("WEST SWOP -> WX [($_$)]") | |
507 | + | else nil | |
964 | 508 | } | |
965 | 509 | ||
966 | 510 | ||
970 | 514 | then throw("you are not allowed to arb!") | |
971 | 515 | else { | |
972 | 516 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
973 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
974 | - | then { | |
975 | - | let putTheTokenInThePool = invoke(wxEggPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
976 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
977 | - | then { | |
978 | - | let lpTokenBalance = assetBalance(this, eggWxLPTokenAssetId) | |
979 | - | if ((lpTokenBalance == lpTokenBalance)) | |
980 | - | then { | |
981 | - | let sellPoolToken = invoke(wxEggPool, "getOneTkn", [eggAssetIdString, 1], [AttachedPayment(eggWxLPTokenAssetId, lpTokenBalance)]) | |
982 | - | if ((sellPoolToken == sellPoolToken)) | |
983 | - | then { | |
984 | - | let eggBalToSwap = assetBalance(this, eggAssetId) | |
985 | - | let swapEggOnSwop = invoke(swopEggPool, "exchange", [1], [AttachedPayment(eggAssetId, eggBalToSwap)]) | |
986 | - | if ((swapEggOnSwop == swapEggOnSwop)) | |
987 | - | then { | |
988 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
989 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
990 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
991 | - | then throw("EGG WX -> SWOP [($_$)]") | |
992 | - | else nil | |
993 | - | else throw("Strict value is not equal to itself.") | |
994 | - | } | |
995 | - | else throw("Strict value is not equal to itself.") | |
996 | - | } | |
997 | - | else throw("Strict value is not equal to itself.") | |
998 | - | } | |
999 | - | else throw("Strict value is not equal to itself.") | |
1000 | - | } | |
1001 | - | else throw("Strict value is not equal to itself.") | |
1002 | - | } | |
1003 | - | else throw("Strict value is not equal to itself.") | |
517 | + | let putTheTokenInThePool = invoke(wxEggPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
518 | + | let lpTokenBalance = assetBalance(this, eggWxLPTokenAssetId) | |
519 | + | let sellPoolToken = invoke(wxEggPool, "getOneTkn", [eggAssetIdString, 1], [AttachedPayment(eggWxLPTokenAssetId, lpTokenBalance)]) | |
520 | + | let eggBalToSwap = assetBalance(this, eggAssetId) | |
521 | + | let swapEggOnSwop = invoke(swopEggPool, "exchange", [1], [AttachedPayment(eggAssetId, eggBalToSwap)]) | |
522 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
523 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
524 | + | then throw("EGG WX -> SWOP [($_$)]") | |
525 | + | else nil | |
1004 | 526 | } | |
1005 | 527 | ||
1006 | 528 | ||
1010 | 532 | then throw("you are not allowed to arb!") | |
1011 | 533 | else { | |
1012 | 534 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
1013 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
1014 | - | then { | |
1015 | - | let swapToEggOnSwop = invoke(swopEggPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
1016 | - | if ((swapToEggOnSwop == swapToEggOnSwop)) | |
1017 | - | then { | |
1018 | - | let eggBalToSwap = assetBalance(this, eggAssetId) | |
1019 | - | let putTheTokenInThePool = invoke(wxEggPool, "putOneTkn", [1, false], [AttachedPayment(eggAssetId, eggBalToSwap)]) | |
1020 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
1021 | - | then { | |
1022 | - | let lpTokenBalance = assetBalance(this, eggWxLPTokenAssetId) | |
1023 | - | if ((lpTokenBalance == lpTokenBalance)) | |
1024 | - | then { | |
1025 | - | let sellPoolToken = invoke(wxEggPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(eggWxLPTokenAssetId, lpTokenBalance)]) | |
1026 | - | if ((sellPoolToken == sellPoolToken)) | |
1027 | - | then { | |
1028 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
1029 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
1030 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
1031 | - | then throw("EGG SWOP -> WX [($_$)]") | |
1032 | - | else nil | |
1033 | - | else throw("Strict value is not equal to itself.") | |
1034 | - | } | |
1035 | - | else throw("Strict value is not equal to itself.") | |
1036 | - | } | |
1037 | - | else throw("Strict value is not equal to itself.") | |
1038 | - | } | |
1039 | - | else throw("Strict value is not equal to itself.") | |
1040 | - | } | |
1041 | - | else throw("Strict value is not equal to itself.") | |
1042 | - | } | |
1043 | - | else throw("Strict value is not equal to itself.") | |
535 | + | let swapToEggOnSwop = invoke(swopEggPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
536 | + | let eggBalToSwap = assetBalance(this, eggAssetId) | |
537 | + | let putTheTokenInThePool = invoke(wxEggPool, "putOneTkn", [1, false], [AttachedPayment(eggAssetId, eggBalToSwap)]) | |
538 | + | let lpTokenBalance = assetBalance(this, eggWxLPTokenAssetId) | |
539 | + | let sellPoolToken = invoke(wxEggPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(eggWxLPTokenAssetId, lpTokenBalance)]) | |
540 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
541 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
542 | + | then throw("EGG SWOP -> WX [($_$)]") | |
543 | + | else nil | |
1044 | 544 | } | |
1045 | 545 | ||
1046 | 546 | ||
1050 | 550 | then throw("you are not allowed to arb!") | |
1051 | 551 | else { | |
1052 | 552 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
1053 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
1054 | - | then { | |
1055 | - | let buyPlutoOnPuzzle = invoke(puzzlePlutoPool, "swap", [plutoAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
1056 | - | if ((buyPlutoOnPuzzle == buyPlutoOnPuzzle)) | |
1057 | - | then { | |
1058 | - | let plutoBalToSwap = assetBalance(this, plutoAssetId) | |
1059 | - | let swapPlutoOnSwop = invoke(swopPlutoPool, "exchange", [1], [AttachedPayment(plutoAssetId, plutoBalToSwap)]) | |
1060 | - | if ((swapPlutoOnSwop == swapPlutoOnSwop)) | |
1061 | - | then { | |
1062 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
1063 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
1064 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
1065 | - | then throw("PLUTO PUZZLE -> SWOP [($_$)]") | |
1066 | - | else nil | |
1067 | - | else throw("Strict value is not equal to itself.") | |
1068 | - | } | |
1069 | - | else throw("Strict value is not equal to itself.") | |
1070 | - | } | |
1071 | - | else throw("Strict value is not equal to itself.") | |
1072 | - | } | |
1073 | - | else throw("Strict value is not equal to itself.") | |
553 | + | let buyPlutoOnPuzzle = invoke(puzzlePlutoPool, "swap", [plutoAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
554 | + | let plutoBalToSwap = assetBalance(this, plutoAssetId) | |
555 | + | let swapPlutoOnSwop = invoke(swopPlutoPool, "exchange", [1], [AttachedPayment(plutoAssetId, plutoBalToSwap)]) | |
556 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
557 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
558 | + | then throw("PLUTO PUZZLE -> SWOP [($_$)]") | |
559 | + | else nil | |
1074 | 560 | } | |
1075 | 561 | ||
1076 | 562 | ||
1080 | 566 | then throw("you are not allowed to arb!") | |
1081 | 567 | else { | |
1082 | 568 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
1083 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
1084 | - | then { | |
1085 | - | let swapToPlutoOnSwop = invoke(swopPlutoPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
1086 | - | if ((swapToPlutoOnSwop == swapToPlutoOnSwop)) | |
1087 | - | then { | |
1088 | - | let plutoBalToSwap = assetBalance(this, plutoAssetId) | |
1089 | - | let sellPlutoOnPuzzle = invoke(puzzlePlutoPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(plutoAssetId, plutoBalToSwap)]) | |
1090 | - | if ((sellPlutoOnPuzzle == sellPlutoOnPuzzle)) | |
1091 | - | then { | |
1092 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
1093 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
1094 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
1095 | - | then throw("PLUTO SWOP -> PUZZLE [($_$)]") | |
1096 | - | else nil | |
1097 | - | else throw("Strict value is not equal to itself.") | |
1098 | - | } | |
1099 | - | else throw("Strict value is not equal to itself.") | |
1100 | - | } | |
1101 | - | else throw("Strict value is not equal to itself.") | |
1102 | - | } | |
1103 | - | else throw("Strict value is not equal to itself.") | |
569 | + | let swapToPlutoOnSwop = invoke(swopPlutoPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
570 | + | let plutoBalToSwap = assetBalance(this, plutoAssetId) | |
571 | + | let sellPlutoOnPuzzle = invoke(puzzlePlutoPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(plutoAssetId, plutoBalToSwap)]) | |
572 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
573 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
574 | + | then throw("PLUTO SWOP -> PUZZLE [($_$)]") | |
575 | + | else nil | |
1104 | 576 | } | |
1105 | 577 | ||
1106 | 578 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let wxPool = addressFromStringValue("3PPZWgFNRKHLvM51pwS934C8VZ7d2F4Z58g") | |
5 | 5 | ||
6 | 6 | let usdnAssetId = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
7 | 7 | ||
8 | 8 | let usdnAssetIdString = "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p" | |
9 | 9 | ||
10 | 10 | let usdnWavesLPTokenAssetId = base58'7KZbJrVopwJhkdwbe1eFDBbex4dkY63MxjTNjqXtrzj1' | |
11 | 11 | ||
12 | 12 | let routingPuzzlePool = addressFromStringValue("3PGFHzVGT4NTigwCKP1NcwoXkodVZwvBuuU") | |
13 | 13 | ||
14 | 14 | let nonRoutingPuzzlePool = addressFromStringValue("3PDrYPF6izza2sXWffzTPF7e2Fcir2CMpki") | |
15 | 15 | ||
16 | 16 | let surfAssetId = base58'At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL' | |
17 | 17 | ||
18 | 18 | let surfAssetIdString = "At8D6NFFpheCbvKVnjVoeLL84Eo8NZn6ovManxfLaFWL" | |
19 | 19 | ||
20 | 20 | let nonRoutingPuzzleSurfPool = addressFromStringValue("3P7r93vXHuusageNJVGwzqaz3WMotAu49Yz") | |
21 | 21 | ||
22 | 22 | let swopSurfPool = addressFromStringValue("3PLp9KrdrbWAvSFHGJVEaszUubquz3M6mfe") | |
23 | 23 | ||
24 | 24 | let wxAssetId = base58'Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on' | |
25 | 25 | ||
26 | 26 | let wxAssetIdString = "Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on" | |
27 | 27 | ||
28 | 28 | let swopWxPool = addressFromStringValue("3PKi4G3VX2k42ZSmNNrmvgdDH7JzRaUhY7R") | |
29 | 29 | ||
30 | 30 | let wxWxPool = addressFromStringValue("3PCENpEKe8atwELZ7oCSmcdEfcRuKTrUx99") | |
31 | 31 | ||
32 | 32 | let usdnWxLPTokenAssetId = base58'F2AKkA513k5yHEJkLsU6vWxCYYk811GpjLhwEv2WGwZ9' | |
33 | 33 | ||
34 | 34 | let wxUsdcPool = addressFromStringValue("3PC3HtupBxBmy4WtZf1Tym1vrxg9MwbZRK1") | |
35 | 35 | ||
36 | 36 | let usdcAssetIdString = "6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ" | |
37 | 37 | ||
38 | 38 | let usdcAssetId = base58'6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ' | |
39 | 39 | ||
40 | 40 | let usdcWxLPTokenAssetId = base58'EK6N7S38xbtBT3SxAqoGdDLCiX6rojX6G169CnSyuE5' | |
41 | 41 | ||
42 | 42 | let puzzleUsdcPool = addressFromStringValue("3P93Kqz8PUbCudvMyjbci54WxQrtBtw4dbZ") | |
43 | 43 | ||
44 | 44 | let wxUsdtPool = addressFromStringValue("3P8KMyAJCPWNcyedqrmymxaeWonvmkhGauz") | |
45 | 45 | ||
46 | 46 | let usdtAssetIdString = "34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ" | |
47 | 47 | ||
48 | 48 | let usdtAssetId = base58'34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ' | |
49 | 49 | ||
50 | 50 | let usdtWxLPTokenAssetId = base58'97zHFp1C3cB7qfvx8Xv5f2rWp9nUSG5UnAamfPcW6txf' | |
51 | 51 | ||
52 | 52 | let puzzleUsdtPool = addressFromStringValue("3P93Kqz8PUbCudvMyjbci54WxQrtBtw4dbZ") | |
53 | 53 | ||
54 | 54 | let wxTsnPool = addressFromStringValue("3PH832eKnw67PFvJfUg9Knz6BHM87QvjMeL") | |
55 | 55 | ||
56 | 56 | let tsnAssetIdString = "8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91" | |
57 | 57 | ||
58 | 58 | let tsnAssetId = base58'8t4DPWTwPzpatHA9AkTxWAB47THnYzBsDnoY7fQqbG91' | |
59 | 59 | ||
60 | 60 | let tsnWxLPTokenAssetId = base58'EbwpqrZjrvi7XLowkM5Z2rg7xVdzfg6S5ec9asarpAU9' | |
61 | 61 | ||
62 | 62 | let puzzleTsnPool = addressFromStringValue("3PN1eJpdhJyRptcN9iLTarsJBtR2Kb3NXSU") | |
63 | 63 | ||
64 | 64 | let wxBtcPool = addressFromStringValue("3PCBWDTA6jrFswd7gQgaE3Xk7gLM5RKofvp") | |
65 | 65 | ||
66 | 66 | let swopBtcPool = addressFromStringValue("3PACj2DLTw3uUhsUmT98zHU5M4hPufbHKav") | |
67 | 67 | ||
68 | 68 | let btcAssetIdString = "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS" | |
69 | 69 | ||
70 | 70 | let btcAssetId = base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS' | |
71 | 71 | ||
72 | 72 | let btcWxLPTokenAssetId = base58'8WhH5CCJ6NakPvEvAJcizqqD7H6axhupdYHDFumSDwsy' | |
73 | 73 | ||
74 | 74 | let btcSwopLpToken = base58'58RNQJqLQ3tYYpkjuJujWzLzMX3nzpGn6bTC8LfLtgAM' | |
75 | 75 | ||
76 | 76 | let wxEthPool = addressFromStringValue("3PEMqetsaJDbYMw1XGovmE37FB8VUhGnX9A") | |
77 | 77 | ||
78 | 78 | let ethAssetIdString = "474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu" | |
79 | 79 | ||
80 | 80 | let ethAssetId = base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu' | |
81 | 81 | ||
82 | 82 | let ethWxLPTokenAssetId = base58'6gtgBD12xZkUTnzGofoFJpMg5gYG1FP6PaGyLviVQjbh' | |
83 | 83 | ||
84 | 84 | let swopEthPool = addressFromStringValue("3PNEC4YKqZiMMytFrYRVtpW2ujvi3aGXRPm") | |
85 | 85 | ||
86 | 86 | let ethSwopLpToken = base58'H8wRVSgq82j6YU1K7jXVpDXHpd5m91t3bmCzRR7uFGc7' | |
87 | 87 | ||
88 | 88 | let wxLtcPool = addressFromStringValue("3P94wvu5gA7VhjPgAB3twaeqdwHCwNK2vsn") | |
89 | 89 | ||
90 | 90 | let ltcAssetIdString = "HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk" | |
91 | 91 | ||
92 | 92 | let ltcAssetId = base58'HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk' | |
93 | 93 | ||
94 | 94 | let ltcWxLPTokenAssetId = base58'CNkqC6GPi888WdJ1EuVtu9JGZ9VHpAn8eTHwR8YZxXbv' | |
95 | 95 | ||
96 | 96 | let swopLtcPool = addressFromStringValue("3P32Rjpo9YHoHaorLSxvnV6CkKFXyfDCkJh") | |
97 | 97 | ||
98 | 98 | let ltcSwopLpToken = base58'2npCQ21bzjEgBYWMepyd95aA3vwXaQpPBXnHtmmXadXF' | |
99 | 99 | ||
100 | 100 | let wxWestPool = addressFromStringValue("3PFxchXqKNjgP1CcbgFZjHyrEj9xMbSeLU3") | |
101 | 101 | ||
102 | 102 | let westAssetIdString = "4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8" | |
103 | 103 | ||
104 | 104 | let westAssetId = base58'4LHHvYGNKJUg5hj65aGD5vgScvCBmLpdRFtjokvCjSL8' | |
105 | 105 | ||
106 | 106 | let westWxLPTokenAssetId = base58'CaryXC3PhVr1rTxUGk8Bx7CcoxPX9ea3F5RGFiCe98Jr' | |
107 | 107 | ||
108 | 108 | let swopWestPool = addressFromStringValue("3P6DLdJTP2EySq9MFdJu6beUevrQd2sVVBh") | |
109 | 109 | ||
110 | 110 | let westSwopLpToken = base58'8g1Ki9cvjjhLUTyNwd4MaZ4fNfNTVc92Cb6f8My4qb1A' | |
111 | 111 | ||
112 | 112 | let wxEggPool = addressFromStringValue("3P3Y38zymCHoTM6qcE9JcEA8rhaGTQbVMgu") | |
113 | 113 | ||
114 | 114 | let eggAssetIdString = "C1iWsKGqLwjHUndiQ7iXpdmPum9PeCDFfyXBdJJosDRS" | |
115 | 115 | ||
116 | 116 | let eggAssetId = base58'C1iWsKGqLwjHUndiQ7iXpdmPum9PeCDFfyXBdJJosDRS' | |
117 | 117 | ||
118 | 118 | let eggWxLPTokenAssetId = base58'EsGs3xQLW8QSRiABfztfVLe8u5a2pvNfkdti4VYes1ms' | |
119 | 119 | ||
120 | 120 | let swopEggPool = addressFromStringValue("3PEeJQRJT4v4XvSUBPmxhdWKz439nae7KtQ") | |
121 | 121 | ||
122 | 122 | let eggSwopLpToken = base58'2wk64hhVqjC3DgJa9HE9bcV7dCazuRtCSs6giqBAbBak' | |
123 | 123 | ||
124 | 124 | let swopPlutoPool = addressFromStringValue("3PDSXwwA2xAtmxeo2bebDP3AA5ynZ2Krgnw") | |
125 | 125 | ||
126 | 126 | let plutoSwopLpToken = base58'CBFNT7ti8bGzESndbsNB376Ug4fQ2ZyhXzdY892edTqq' | |
127 | 127 | ||
128 | 128 | let plutoAssetIdString = "Ajso6nTTjptu2UHLx6hfSXVtHFtRBJCkKYd5SAyj7zf5" | |
129 | 129 | ||
130 | 130 | let plutoAssetId = base58'Ajso6nTTjptu2UHLx6hfSXVtHFtRBJCkKYd5SAyj7zf5' | |
131 | 131 | ||
132 | 132 | let puzzlePlutoPool = addressFromStringValue("3P93Kqz8PUbCudvMyjbci54WxQrtBtw4dbZ") | |
133 | 133 | ||
134 | 134 | func getIntegerByKey (key) = valueOrElse(getInteger(this, key), 35) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | let a = getIntegerByKey("montant") | |
138 | 138 | ||
139 | 139 | @Callable(i) | |
140 | 140 | func set (a) = if ((i.caller != this)) | |
141 | 141 | then throw("you are not allowed to set!") | |
142 | 142 | else [IntegerEntry("montant", a)] | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | ||
146 | 146 | @Callable(i) | |
147 | 147 | func a1 () = if ((i.caller != this)) | |
148 | 148 | then throw("you are not allowed to arb!") | |
149 | 149 | else { | |
150 | 150 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
151 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
152 | - | then { | |
153 | - | let wavesBalanceBefore = wavesBalance(this).available | |
154 | - | if ((wavesBalanceBefore == wavesBalanceBefore)) | |
155 | - | then { | |
156 | - | let buyOnPuzzle = invoke(nonRoutingPuzzlePool, "swap", ["WAVES", 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
157 | - | if ((buyOnPuzzle == buyOnPuzzle)) | |
158 | - | then { | |
159 | - | let wavesBalToSwap = (wavesBalance(this).available - wavesBalanceBefore) | |
160 | - | if ((0 >= wavesBalToSwap)) | |
161 | - | then throw("nothing to arb") | |
162 | - | else { | |
163 | - | let putTheTokenInThePool = invoke(wxPool, "putOneTkn", [1, false], [AttachedPayment(unit, wavesBalToSwap)]) | |
164 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
165 | - | then { | |
166 | - | let lpTokenBalance = assetBalance(this, usdnWavesLPTokenAssetId) | |
167 | - | if ((lpTokenBalance == lpTokenBalance)) | |
168 | - | then { | |
169 | - | let sellPoolToken = invoke(wxPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(usdnWavesLPTokenAssetId, lpTokenBalance)]) | |
170 | - | if ((sellPoolToken == sellPoolToken)) | |
171 | - | then { | |
172 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
173 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
174 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
175 | - | then throw("WU PUZZLE -> WX [($_$)]") | |
176 | - | else nil | |
177 | - | else throw("Strict value is not equal to itself.") | |
178 | - | } | |
179 | - | else throw("Strict value is not equal to itself.") | |
180 | - | } | |
181 | - | else throw("Strict value is not equal to itself.") | |
182 | - | } | |
183 | - | else throw("Strict value is not equal to itself.") | |
184 | - | } | |
185 | - | } | |
186 | - | else throw("Strict value is not equal to itself.") | |
187 | - | } | |
188 | - | else throw("Strict value is not equal to itself.") | |
151 | + | let wavesBalanceBefore = wavesBalance(this).available | |
152 | + | let buyOnPuzzle = invoke(nonRoutingPuzzlePool, "swap", ["WAVES", 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
153 | + | let wavesBalToSwap = (wavesBalance(this).available - wavesBalanceBefore) | |
154 | + | if ((0 >= wavesBalToSwap)) | |
155 | + | then throw("nothing to arb") | |
156 | + | else { | |
157 | + | let putTheTokenInThePool = invoke(wxPool, "putOneTkn", [1, false], [AttachedPayment(unit, wavesBalToSwap)]) | |
158 | + | let lpTokenBalance = assetBalance(this, usdnWavesLPTokenAssetId) | |
159 | + | let sellPoolToken = invoke(wxPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(usdnWavesLPTokenAssetId, lpTokenBalance)]) | |
160 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
161 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
162 | + | then throw("WU PUZZLE -> WX [($_$)]") | |
163 | + | else nil | |
189 | 164 | } | |
190 | - | else throw("Strict value is not equal to itself.") | |
191 | 165 | } | |
192 | 166 | ||
193 | 167 | ||
194 | 168 | ||
195 | 169 | @Callable(i) | |
196 | 170 | func a2 () = if ((i.caller != this)) | |
197 | 171 | then throw("you are not allowed to arb!") | |
198 | 172 | else { | |
199 | 173 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
200 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
201 | - | then { | |
202 | - | let wavesBalanceBefore = wavesBalance(this).available | |
203 | - | if ((wavesBalanceBefore == wavesBalanceBefore)) | |
204 | - | then { | |
205 | - | let putTheTokenInThePool = invoke(wxPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
206 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
207 | - | then { | |
208 | - | let lpTokenBalance = assetBalance(this, usdnWavesLPTokenAssetId) | |
209 | - | if ((lpTokenBalance == lpTokenBalance)) | |
210 | - | then { | |
211 | - | let sellPoolToken = invoke(wxPool, "getOneTkn", ["WAVES", 1], [AttachedPayment(usdnWavesLPTokenAssetId, lpTokenBalance)]) | |
212 | - | if ((sellPoolToken == sellPoolToken)) | |
213 | - | then { | |
214 | - | let wavesBalToSwap = (wavesBalance(this).available - wavesBalanceBefore) | |
215 | - | if ((0 >= wavesBalToSwap)) | |
216 | - | then throw("nothing to arb") | |
217 | - | else { | |
218 | - | let buyOnPuzzle = invoke(nonRoutingPuzzlePool, "swap", [usdnAssetIdString, 1], [AttachedPayment(unit, wavesBalToSwap)]) | |
219 | - | if ((buyOnPuzzle == buyOnPuzzle)) | |
220 | - | then { | |
221 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
222 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
223 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
224 | - | then throw("WU WX -> PUZZLE [($_$)]") | |
225 | - | else nil | |
226 | - | else throw("Strict value is not equal to itself.") | |
227 | - | } | |
228 | - | else throw("Strict value is not equal to itself.") | |
229 | - | } | |
230 | - | } | |
231 | - | else throw("Strict value is not equal to itself.") | |
232 | - | } | |
233 | - | else throw("Strict value is not equal to itself.") | |
234 | - | } | |
235 | - | else throw("Strict value is not equal to itself.") | |
236 | - | } | |
237 | - | else throw("Strict value is not equal to itself.") | |
174 | + | let wavesBalanceBefore = wavesBalance(this).available | |
175 | + | let putTheTokenInThePool = invoke(wxPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
176 | + | let lpTokenBalance = assetBalance(this, usdnWavesLPTokenAssetId) | |
177 | + | let sellPoolToken = invoke(wxPool, "getOneTkn", ["WAVES", 1], [AttachedPayment(usdnWavesLPTokenAssetId, lpTokenBalance)]) | |
178 | + | let wavesBalToSwap = (wavesBalance(this).available - wavesBalanceBefore) | |
179 | + | if ((0 >= wavesBalToSwap)) | |
180 | + | then throw("nothing to arb") | |
181 | + | else { | |
182 | + | let buyOnPuzzle = invoke(nonRoutingPuzzlePool, "swap", [usdnAssetIdString, 1], [AttachedPayment(unit, wavesBalToSwap)]) | |
183 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
184 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
185 | + | then throw("WU WX -> PUZZLE [($_$)]") | |
186 | + | else nil | |
238 | 187 | } | |
239 | - | else throw("Strict value is not equal to itself.") | |
240 | 188 | } | |
241 | 189 | ||
242 | 190 | ||
243 | 191 | ||
244 | 192 | @Callable(i) | |
245 | 193 | func a3 () = if ((i.caller != this)) | |
246 | 194 | then throw("you are not allowed to arb!") | |
247 | 195 | else { | |
248 | 196 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
249 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
250 | - | then { | |
251 | - | let buySurfOnPuzzle = invoke(nonRoutingPuzzleSurfPool, "swap", [surfAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
252 | - | if ((buySurfOnPuzzle == buySurfOnPuzzle)) | |
253 | - | then { | |
254 | - | let surfBalToSwap = assetBalance(this, surfAssetId) | |
255 | - | let swapSurfOnSwop = invoke(swopSurfPool, "exchange", [1], [AttachedPayment(surfAssetId, surfBalToSwap)]) | |
256 | - | if ((swapSurfOnSwop == swapSurfOnSwop)) | |
257 | - | then { | |
258 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
259 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
260 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
261 | - | then throw("SURF PUZZLE -> SWOP [($_$)]") | |
262 | - | else nil | |
263 | - | else throw("Strict value is not equal to itself.") | |
264 | - | } | |
265 | - | else throw("Strict value is not equal to itself.") | |
266 | - | } | |
267 | - | else throw("Strict value is not equal to itself.") | |
268 | - | } | |
269 | - | else throw("Strict value is not equal to itself.") | |
197 | + | let buySurfOnPuzzle = invoke(nonRoutingPuzzleSurfPool, "swap", [surfAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
198 | + | let surfBalToSwap = assetBalance(this, surfAssetId) | |
199 | + | let swapSurfOnSwop = invoke(swopSurfPool, "exchange", [1], [AttachedPayment(surfAssetId, surfBalToSwap)]) | |
200 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
201 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
202 | + | then throw("SURF PUZZLE -> SWOP [($_$)]") | |
203 | + | else nil | |
270 | 204 | } | |
271 | 205 | ||
272 | 206 | ||
273 | 207 | ||
274 | 208 | @Callable(i) | |
275 | 209 | func a4 () = if ((i.caller != this)) | |
276 | 210 | then throw("you are not allowed to arb!") | |
277 | 211 | else { | |
278 | 212 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
279 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
280 | - | then { | |
281 | - | let swapToSurfOnSwop = invoke(swopSurfPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
282 | - | if ((swapToSurfOnSwop == swapToSurfOnSwop)) | |
283 | - | then { | |
284 | - | let surfBalToSwap = assetBalance(this, surfAssetId) | |
285 | - | let sellSurfOnPuzzle = invoke(nonRoutingPuzzleSurfPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(surfAssetId, surfBalToSwap)]) | |
286 | - | if ((sellSurfOnPuzzle == sellSurfOnPuzzle)) | |
287 | - | then { | |
288 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
289 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
290 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
291 | - | then throw("SURF SWOP -> PUZZLE [($_$)]") | |
292 | - | else nil | |
293 | - | else throw("Strict value is not equal to itself.") | |
294 | - | } | |
295 | - | else throw("Strict value is not equal to itself.") | |
296 | - | } | |
297 | - | else throw("Strict value is not equal to itself.") | |
298 | - | } | |
299 | - | else throw("Strict value is not equal to itself.") | |
213 | + | let swapToSurfOnSwop = invoke(swopSurfPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
214 | + | let surfBalToSwap = assetBalance(this, surfAssetId) | |
215 | + | let sellSurfOnPuzzle = invoke(nonRoutingPuzzleSurfPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(surfAssetId, surfBalToSwap)]) | |
216 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
217 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
218 | + | then throw("SURF SWOP -> PUZZLE [($_$)]") | |
219 | + | else nil | |
300 | 220 | } | |
301 | 221 | ||
302 | 222 | ||
303 | 223 | ||
304 | 224 | @Callable(i) | |
305 | 225 | func a5 () = if ((i.caller != this)) | |
306 | 226 | then throw("you are not allowed to arb!") | |
307 | 227 | else { | |
308 | 228 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
309 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
310 | - | then { | |
311 | - | let putTheTokenInThePool = invoke(wxWxPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
312 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
313 | - | then { | |
314 | - | let lpTokenBalance = assetBalance(this, usdnWxLPTokenAssetId) | |
315 | - | if ((lpTokenBalance == lpTokenBalance)) | |
316 | - | then { | |
317 | - | let sellPoolToken = invoke(wxWxPool, "getOneTkn", [wxAssetIdString, 1], [AttachedPayment(usdnWxLPTokenAssetId, lpTokenBalance)]) | |
318 | - | if ((sellPoolToken == sellPoolToken)) | |
319 | - | then { | |
320 | - | let wxBalToSwap = assetBalance(this, wxAssetId) | |
321 | - | let swapWxOnSwop = invoke(swopWxPool, "exchange", [1], [AttachedPayment(wxAssetId, wxBalToSwap)]) | |
322 | - | if ((swapWxOnSwop == swapWxOnSwop)) | |
323 | - | then { | |
324 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
325 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
326 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
327 | - | then throw("WX WX -> SWOP [($_$)]") | |
328 | - | else nil | |
329 | - | else throw("Strict value is not equal to itself.") | |
330 | - | } | |
331 | - | else throw("Strict value is not equal to itself.") | |
332 | - | } | |
333 | - | else throw("Strict value is not equal to itself.") | |
334 | - | } | |
335 | - | else throw("Strict value is not equal to itself.") | |
336 | - | } | |
337 | - | else throw("Strict value is not equal to itself.") | |
338 | - | } | |
339 | - | else throw("Strict value is not equal to itself.") | |
229 | + | let putTheTokenInThePool = invoke(wxWxPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
230 | + | let lpTokenBalance = assetBalance(this, usdnWxLPTokenAssetId) | |
231 | + | let sellPoolToken = invoke(wxWxPool, "getOneTkn", [wxAssetIdString, 1], [AttachedPayment(usdnWxLPTokenAssetId, lpTokenBalance)]) | |
232 | + | let wxBalToSwap = assetBalance(this, wxAssetId) | |
233 | + | let swapWxOnSwop = invoke(swopWxPool, "exchange", [1], [AttachedPayment(wxAssetId, wxBalToSwap)]) | |
234 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
235 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
236 | + | then throw("WX WX -> SWOP [($_$)]") | |
237 | + | else nil | |
340 | 238 | } | |
341 | 239 | ||
342 | 240 | ||
343 | 241 | ||
344 | 242 | @Callable(i) | |
345 | 243 | func a6 () = if ((i.caller != this)) | |
346 | 244 | then throw("you are not allowed to arb!") | |
347 | 245 | else { | |
348 | 246 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
349 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
350 | - | then { | |
351 | - | let swapToWxOnSwop = invoke(swopWxPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
352 | - | if ((swapToWxOnSwop == swapToWxOnSwop)) | |
353 | - | then { | |
354 | - | let wxBalToSwap = assetBalance(this, wxAssetId) | |
355 | - | let putTheTokenInThePool = invoke(wxWxPool, "putOneTkn", [1, false], [AttachedPayment(wxAssetId, wxBalToSwap)]) | |
356 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
357 | - | then { | |
358 | - | let lpTokenBalance = assetBalance(this, usdnWxLPTokenAssetId) | |
359 | - | if ((lpTokenBalance == lpTokenBalance)) | |
360 | - | then { | |
361 | - | let sellPoolToken = invoke(wxWxPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(usdnWxLPTokenAssetId, lpTokenBalance)]) | |
362 | - | if ((sellPoolToken == sellPoolToken)) | |
363 | - | then { | |
364 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
365 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
366 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
367 | - | then throw("WX SWOP -> WX [($_$)]") | |
368 | - | else nil | |
369 | - | else throw("Strict value is not equal to itself.") | |
370 | - | } | |
371 | - | else throw("Strict value is not equal to itself.") | |
372 | - | } | |
373 | - | else throw("Strict value is not equal to itself.") | |
374 | - | } | |
375 | - | else throw("Strict value is not equal to itself.") | |
376 | - | } | |
377 | - | else throw("Strict value is not equal to itself.") | |
378 | - | } | |
379 | - | else throw("Strict value is not equal to itself.") | |
247 | + | let swapToWxOnSwop = invoke(swopWxPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
248 | + | let wxBalToSwap = assetBalance(this, wxAssetId) | |
249 | + | let putTheTokenInThePool = invoke(wxWxPool, "putOneTkn", [1, false], [AttachedPayment(wxAssetId, wxBalToSwap)]) | |
250 | + | let lpTokenBalance = assetBalance(this, usdnWxLPTokenAssetId) | |
251 | + | let sellPoolToken = invoke(wxWxPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(usdnWxLPTokenAssetId, lpTokenBalance)]) | |
252 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
253 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
254 | + | then throw("WX SWOP -> WX [($_$)]") | |
255 | + | else nil | |
380 | 256 | } | |
381 | 257 | ||
382 | 258 | ||
383 | 259 | ||
384 | 260 | @Callable(i) | |
385 | 261 | func a7 () = if ((i.caller != this)) | |
386 | 262 | then throw("you are not allowed to arb!") | |
387 | 263 | else { | |
388 | 264 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
389 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
390 | - | then { | |
391 | - | let buyUsdcOnPuzzle = invoke(puzzleUsdcPool, "swap", [usdcAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
392 | - | if ((buyUsdcOnPuzzle == buyUsdcOnPuzzle)) | |
393 | - | then { | |
394 | - | let usdcBalToSwap = assetBalance(this, usdcAssetId) | |
395 | - | if ((usdcBalToSwap == usdcBalToSwap)) | |
396 | - | then { | |
397 | - | let putTheTokenInThePool = invoke(wxUsdcPool, "putOneTknV2", [1, false], [AttachedPayment(usdcAssetId, usdcBalToSwap)]) | |
398 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
399 | - | then { | |
400 | - | let lpTokenBalance = assetBalance(this, usdcWxLPTokenAssetId) | |
401 | - | if ((lpTokenBalance == lpTokenBalance)) | |
402 | - | then { | |
403 | - | let sellPoolToken = invoke(wxUsdcPool, "getOneTknV2", [usdnAssetIdString, 1], [AttachedPayment(usdcWxLPTokenAssetId, lpTokenBalance)]) | |
404 | - | if ((sellPoolToken == sellPoolToken)) | |
405 | - | then { | |
406 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
407 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
408 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
409 | - | then throw("USDC PUZZLE -> WX [($_$)]") | |
410 | - | else nil | |
411 | - | else throw("Strict value is not equal to itself.") | |
412 | - | } | |
413 | - | else throw("Strict value is not equal to itself.") | |
414 | - | } | |
415 | - | else throw("Strict value is not equal to itself.") | |
416 | - | } | |
417 | - | else throw("Strict value is not equal to itself.") | |
418 | - | } | |
419 | - | else throw("Strict value is not equal to itself.") | |
420 | - | } | |
421 | - | else throw("Strict value is not equal to itself.") | |
422 | - | } | |
423 | - | else throw("Strict value is not equal to itself.") | |
265 | + | let buyUsdcOnPuzzle = invoke(puzzleUsdcPool, "swap", [usdcAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
266 | + | let usdcBalToSwap = assetBalance(this, usdcAssetId) | |
267 | + | let putTheTokenInThePool = invoke(wxUsdcPool, "putOneTknV2", [1, false], [AttachedPayment(usdcAssetId, usdcBalToSwap)]) | |
268 | + | let lpTokenBalance = assetBalance(this, usdcWxLPTokenAssetId) | |
269 | + | let sellPoolToken = invoke(wxUsdcPool, "getOneTknV2", [usdnAssetIdString, 1], [AttachedPayment(usdcWxLPTokenAssetId, lpTokenBalance)]) | |
270 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
271 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
272 | + | then throw("USDC PUZZLE -> WX [($_$)]") | |
273 | + | else nil | |
424 | 274 | } | |
425 | 275 | ||
426 | 276 | ||
427 | 277 | ||
428 | 278 | @Callable(i) | |
429 | 279 | func a8 () = if ((i.caller != this)) | |
430 | 280 | then throw("you are not allowed to arb!") | |
431 | 281 | else { | |
432 | 282 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
433 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
434 | - | then { | |
435 | - | let putTheTokenInThePool = invoke(wxUsdcPool, "putOneTknV2", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
436 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
437 | - | then { | |
438 | - | let lpTokenBalance = assetBalance(this, usdcWxLPTokenAssetId) | |
439 | - | if ((lpTokenBalance == lpTokenBalance)) | |
440 | - | then { | |
441 | - | let sellPoolToken = invoke(wxUsdcPool, "getOneTknV2", [usdcAssetIdString, 1], [AttachedPayment(usdcWxLPTokenAssetId, lpTokenBalance)]) | |
442 | - | if ((sellPoolToken == sellPoolToken)) | |
443 | - | then { | |
444 | - | let usdcBalToSwap = assetBalance(this, usdcAssetId) | |
445 | - | if ((usdcBalToSwap == usdcBalToSwap)) | |
446 | - | then { | |
447 | - | let sellUsdcOnPuzzle = invoke(puzzleUsdcPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(usdcAssetId, usdcBalToSwap)]) | |
448 | - | if ((sellUsdcOnPuzzle == sellUsdcOnPuzzle)) | |
449 | - | then { | |
450 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
451 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
452 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
453 | - | then throw("USDC WX -> PUZZLE [($_$)]") | |
454 | - | else nil | |
455 | - | else throw("Strict value is not equal to itself.") | |
456 | - | } | |
457 | - | else throw("Strict value is not equal to itself.") | |
458 | - | } | |
459 | - | else throw("Strict value is not equal to itself.") | |
460 | - | } | |
461 | - | else throw("Strict value is not equal to itself.") | |
462 | - | } | |
463 | - | else throw("Strict value is not equal to itself.") | |
464 | - | } | |
465 | - | else throw("Strict value is not equal to itself.") | |
466 | - | } | |
467 | - | else throw("Strict value is not equal to itself.") | |
283 | + | let putTheTokenInThePool = invoke(wxUsdcPool, "putOneTknV2", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
284 | + | let lpTokenBalance = assetBalance(this, usdcWxLPTokenAssetId) | |
285 | + | let sellPoolToken = invoke(wxUsdcPool, "getOneTknV2", [usdcAssetIdString, 1], [AttachedPayment(usdcWxLPTokenAssetId, lpTokenBalance)]) | |
286 | + | let usdcBalToSwap = assetBalance(this, usdcAssetId) | |
287 | + | let sellUsdcOnPuzzle = invoke(puzzleUsdcPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(usdcAssetId, usdcBalToSwap)]) | |
288 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
289 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
290 | + | then throw("USDC WX -> PUZZLE [($_$)]") | |
291 | + | else nil | |
468 | 292 | } | |
469 | 293 | ||
470 | 294 | ||
471 | 295 | ||
472 | 296 | @Callable(i) | |
473 | 297 | func a9 () = if ((i.caller != this)) | |
474 | 298 | then throw("you are not allowed to arb!") | |
475 | 299 | else { | |
476 | 300 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
477 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
478 | - | then { | |
479 | - | let buyUsdtOnPuzzle = invoke(puzzleUsdtPool, "swap", [usdtAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
480 | - | if ((buyUsdtOnPuzzle == buyUsdtOnPuzzle)) | |
481 | - | then { | |
482 | - | let usdtBalToSwap = assetBalance(this, usdtAssetId) | |
483 | - | if ((usdtBalToSwap == usdtBalToSwap)) | |
484 | - | then { | |
485 | - | let putTheTokenInThePool = invoke(wxUsdtPool, "putOneTknV2", [1, false], [AttachedPayment(usdtAssetId, usdtBalToSwap)]) | |
486 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
487 | - | then { | |
488 | - | let lpTokenBalance = assetBalance(this, usdtWxLPTokenAssetId) | |
489 | - | if ((lpTokenBalance == lpTokenBalance)) | |
490 | - | then { | |
491 | - | let sellPoolToken = invoke(wxUsdtPool, "getOneTknV2", [usdnAssetIdString, 1], [AttachedPayment(usdtWxLPTokenAssetId, lpTokenBalance)]) | |
492 | - | if ((sellPoolToken == sellPoolToken)) | |
493 | - | then { | |
494 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
495 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
496 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
497 | - | then throw("USDT PUZZLE -> WX [($_$)]") | |
498 | - | else nil | |
499 | - | else throw("Strict value is not equal to itself.") | |
500 | - | } | |
501 | - | else throw("Strict value is not equal to itself.") | |
502 | - | } | |
503 | - | else throw("Strict value is not equal to itself.") | |
504 | - | } | |
505 | - | else throw("Strict value is not equal to itself.") | |
506 | - | } | |
507 | - | else throw("Strict value is not equal to itself.") | |
508 | - | } | |
509 | - | else throw("Strict value is not equal to itself.") | |
510 | - | } | |
511 | - | else throw("Strict value is not equal to itself.") | |
301 | + | let buyUsdtOnPuzzle = invoke(puzzleUsdtPool, "swap", [usdtAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
302 | + | let usdtBalToSwap = assetBalance(this, usdtAssetId) | |
303 | + | let putTheTokenInThePool = invoke(wxUsdtPool, "putOneTknV2", [1, false], [AttachedPayment(usdtAssetId, usdtBalToSwap)]) | |
304 | + | let lpTokenBalance = assetBalance(this, usdtWxLPTokenAssetId) | |
305 | + | let sellPoolToken = invoke(wxUsdtPool, "getOneTknV2", [usdnAssetIdString, 1], [AttachedPayment(usdtWxLPTokenAssetId, lpTokenBalance)]) | |
306 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
307 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
308 | + | then throw("USDT PUZZLE -> WX [($_$)]") | |
309 | + | else nil | |
512 | 310 | } | |
513 | 311 | ||
514 | 312 | ||
515 | 313 | ||
516 | 314 | @Callable(i) | |
517 | 315 | func a10 () = if ((i.caller != this)) | |
518 | 316 | then throw("you are not allowed to arb!") | |
519 | 317 | else { | |
520 | 318 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
521 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
522 | - | then { | |
523 | - | let putTheTokenInThePool = invoke(wxUsdtPool, "putOneTknV2", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
524 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
525 | - | then { | |
526 | - | let lpTokenBalance = assetBalance(this, usdtWxLPTokenAssetId) | |
527 | - | if ((lpTokenBalance == lpTokenBalance)) | |
528 | - | then { | |
529 | - | let sellPoolToken = invoke(wxUsdtPool, "getOneTknV2", [usdtAssetIdString, 1], [AttachedPayment(usdtWxLPTokenAssetId, lpTokenBalance)]) | |
530 | - | if ((sellPoolToken == sellPoolToken)) | |
531 | - | then { | |
532 | - | let usdtBalToSwap = assetBalance(this, usdtAssetId) | |
533 | - | if ((usdtBalToSwap == usdtBalToSwap)) | |
534 | - | then { | |
535 | - | let sellUsdtOnPuzzle = invoke(puzzleUsdtPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(usdtAssetId, usdtBalToSwap)]) | |
536 | - | if ((sellUsdtOnPuzzle == sellUsdtOnPuzzle)) | |
537 | - | then { | |
538 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
539 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
540 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
541 | - | then throw("USDT WX -> PUZZLE [($_$)]") | |
542 | - | else nil | |
543 | - | else throw("Strict value is not equal to itself.") | |
544 | - | } | |
545 | - | else throw("Strict value is not equal to itself.") | |
546 | - | } | |
547 | - | else throw("Strict value is not equal to itself.") | |
548 | - | } | |
549 | - | else throw("Strict value is not equal to itself.") | |
550 | - | } | |
551 | - | else throw("Strict value is not equal to itself.") | |
552 | - | } | |
553 | - | else throw("Strict value is not equal to itself.") | |
554 | - | } | |
555 | - | else throw("Strict value is not equal to itself.") | |
319 | + | let putTheTokenInThePool = invoke(wxUsdtPool, "putOneTknV2", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
320 | + | let lpTokenBalance = assetBalance(this, usdtWxLPTokenAssetId) | |
321 | + | let sellPoolToken = invoke(wxUsdtPool, "getOneTknV2", [usdtAssetIdString, 1], [AttachedPayment(usdtWxLPTokenAssetId, lpTokenBalance)]) | |
322 | + | let usdtBalToSwap = assetBalance(this, usdtAssetId) | |
323 | + | let sellUsdtOnPuzzle = invoke(puzzleUsdtPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(usdtAssetId, usdtBalToSwap)]) | |
324 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
325 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
326 | + | then throw("USDT WX -> PUZZLE [($_$)]") | |
327 | + | else nil | |
556 | 328 | } | |
557 | 329 | ||
558 | 330 | ||
559 | 331 | ||
560 | 332 | @Callable(i) | |
561 | 333 | func a11 () = if ((i.caller != this)) | |
562 | 334 | then throw("you are not allowed to arb!") | |
563 | 335 | else { | |
564 | 336 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
565 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
566 | - | then { | |
567 | - | let buyTsnOnPuzzle = invoke(puzzleTsnPool, "swap", [tsnAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
568 | - | if ((buyTsnOnPuzzle == buyTsnOnPuzzle)) | |
569 | - | then { | |
570 | - | let tsnBalToSwap = assetBalance(this, tsnAssetId) | |
571 | - | if ((tsnBalToSwap == tsnBalToSwap)) | |
572 | - | then { | |
573 | - | let putTheTokenInThePool = invoke(wxTsnPool, "putOneTkn", [1, false], [AttachedPayment(tsnAssetId, tsnBalToSwap)]) | |
574 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
575 | - | then { | |
576 | - | let lpTokenBalance = assetBalance(this, tsnWxLPTokenAssetId) | |
577 | - | if ((lpTokenBalance == lpTokenBalance)) | |
578 | - | then { | |
579 | - | let sellPoolToken = invoke(wxTsnPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(tsnWxLPTokenAssetId, lpTokenBalance)]) | |
580 | - | if ((sellPoolToken == sellPoolToken)) | |
581 | - | then { | |
582 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
583 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
584 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
585 | - | then throw("TSN PUZZLE -> WX [($_$)]") | |
586 | - | else nil | |
587 | - | else throw("Strict value is not equal to itself.") | |
588 | - | } | |
589 | - | else throw("Strict value is not equal to itself.") | |
590 | - | } | |
591 | - | else throw("Strict value is not equal to itself.") | |
592 | - | } | |
593 | - | else throw("Strict value is not equal to itself.") | |
594 | - | } | |
595 | - | else throw("Strict value is not equal to itself.") | |
596 | - | } | |
597 | - | else throw("Strict value is not equal to itself.") | |
598 | - | } | |
599 | - | else throw("Strict value is not equal to itself.") | |
337 | + | let buyTsnOnPuzzle = invoke(puzzleTsnPool, "swap", [tsnAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
338 | + | let tsnBalToSwap = assetBalance(this, tsnAssetId) | |
339 | + | let putTheTokenInThePool = invoke(wxTsnPool, "putOneTkn", [1, false], [AttachedPayment(tsnAssetId, tsnBalToSwap)]) | |
340 | + | let lpTokenBalance = assetBalance(this, tsnWxLPTokenAssetId) | |
341 | + | let sellPoolToken = invoke(wxTsnPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(tsnWxLPTokenAssetId, lpTokenBalance)]) | |
342 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
343 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
344 | + | then throw("TSN PUZZLE -> WX [($_$)]") | |
345 | + | else nil | |
600 | 346 | } | |
601 | 347 | ||
602 | 348 | ||
603 | 349 | ||
604 | 350 | @Callable(i) | |
605 | 351 | func a12 () = if ((i.caller != this)) | |
606 | 352 | then throw("you are not allowed to arb!") | |
607 | 353 | else { | |
608 | 354 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
609 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
610 | - | then { | |
611 | - | let putTheTokenInThePool = invoke(wxTsnPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
612 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
613 | - | then { | |
614 | - | let lpTokenBalance = assetBalance(this, tsnWxLPTokenAssetId) | |
615 | - | if ((lpTokenBalance == lpTokenBalance)) | |
616 | - | then { | |
617 | - | let sellPoolToken = invoke(wxTsnPool, "getOneTkn", [tsnAssetIdString, 1], [AttachedPayment(tsnWxLPTokenAssetId, lpTokenBalance)]) | |
618 | - | if ((sellPoolToken == sellPoolToken)) | |
619 | - | then { | |
620 | - | let tsnBalToSwap = assetBalance(this, tsnAssetId) | |
621 | - | if ((tsnBalToSwap == tsnBalToSwap)) | |
622 | - | then { | |
623 | - | let selltsnOnPuzzle = invoke(puzzleTsnPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(tsnAssetId, tsnBalToSwap)]) | |
624 | - | if ((selltsnOnPuzzle == selltsnOnPuzzle)) | |
625 | - | then { | |
626 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
627 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
628 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
629 | - | then throw("TSN WX -> PUZZLE [($_$)]") | |
630 | - | else nil | |
631 | - | else throw("Strict value is not equal to itself.") | |
632 | - | } | |
633 | - | else throw("Strict value is not equal to itself.") | |
634 | - | } | |
635 | - | else throw("Strict value is not equal to itself.") | |
636 | - | } | |
637 | - | else throw("Strict value is not equal to itself.") | |
638 | - | } | |
639 | - | else throw("Strict value is not equal to itself.") | |
640 | - | } | |
641 | - | else throw("Strict value is not equal to itself.") | |
642 | - | } | |
643 | - | else throw("Strict value is not equal to itself.") | |
355 | + | let putTheTokenInThePool = invoke(wxTsnPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
356 | + | let lpTokenBalance = assetBalance(this, tsnWxLPTokenAssetId) | |
357 | + | let sellPoolToken = invoke(wxTsnPool, "getOneTkn", [tsnAssetIdString, 1], [AttachedPayment(tsnWxLPTokenAssetId, lpTokenBalance)]) | |
358 | + | let tsnBalToSwap = assetBalance(this, tsnAssetId) | |
359 | + | let selltsnOnPuzzle = invoke(puzzleTsnPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(tsnAssetId, tsnBalToSwap)]) | |
360 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
361 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
362 | + | then throw("TSN WX -> PUZZLE [($_$)]") | |
363 | + | else nil | |
644 | 364 | } | |
645 | 365 | ||
646 | 366 | ||
647 | 367 | ||
648 | 368 | @Callable(i) | |
649 | 369 | func a13 () = if ((i.caller != this)) | |
650 | 370 | then throw("you are not allowed to arb!") | |
651 | 371 | else { | |
652 | 372 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
653 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
654 | - | then { | |
655 | - | let putTheTokenInThePool = invoke(wxBtcPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
656 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
657 | - | then { | |
658 | - | let lpTokenBalance = assetBalance(this, btcWxLPTokenAssetId) | |
659 | - | if ((lpTokenBalance == lpTokenBalance)) | |
660 | - | then { | |
661 | - | let sellPoolToken = invoke(wxBtcPool, "getOneTkn", [btcAssetIdString, 1], [AttachedPayment(btcWxLPTokenAssetId, lpTokenBalance)]) | |
662 | - | if ((sellPoolToken == sellPoolToken)) | |
663 | - | then { | |
664 | - | let btcBalToSwap = assetBalance(this, btcAssetId) | |
665 | - | let swapBtcOnSwop = invoke(swopBtcPool, "exchange", [1], [AttachedPayment(btcAssetId, btcBalToSwap)]) | |
666 | - | if ((swapBtcOnSwop == swapBtcOnSwop)) | |
667 | - | then { | |
668 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
669 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
670 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
671 | - | then throw("BTC WX -> SWOP [($_$)]") | |
672 | - | else nil | |
673 | - | else throw("Strict value is not equal to itself.") | |
674 | - | } | |
675 | - | else throw("Strict value is not equal to itself.") | |
676 | - | } | |
677 | - | else throw("Strict value is not equal to itself.") | |
678 | - | } | |
679 | - | else throw("Strict value is not equal to itself.") | |
680 | - | } | |
681 | - | else throw("Strict value is not equal to itself.") | |
682 | - | } | |
683 | - | else throw("Strict value is not equal to itself.") | |
373 | + | let putTheTokenInThePool = invoke(wxBtcPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
374 | + | let lpTokenBalance = assetBalance(this, btcWxLPTokenAssetId) | |
375 | + | let sellPoolToken = invoke(wxBtcPool, "getOneTkn", [btcAssetIdString, 1], [AttachedPayment(btcWxLPTokenAssetId, lpTokenBalance)]) | |
376 | + | let btcBalToSwap = assetBalance(this, btcAssetId) | |
377 | + | let swapBtcOnSwop = invoke(swopBtcPool, "exchange", [1], [AttachedPayment(btcAssetId, btcBalToSwap)]) | |
378 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
379 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
380 | + | then throw("BTC WX -> SWOP [($_$)]") | |
381 | + | else nil | |
684 | 382 | } | |
685 | 383 | ||
686 | 384 | ||
687 | 385 | ||
688 | 386 | @Callable(i) | |
689 | 387 | func a14 () = if ((i.caller != this)) | |
690 | 388 | then throw("you are not allowed to arb!") | |
691 | 389 | else { | |
692 | 390 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
693 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
694 | - | then { | |
695 | - | let swapToBtcOnSwop = invoke(swopBtcPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
696 | - | if ((swapToBtcOnSwop == swapToBtcOnSwop)) | |
697 | - | then { | |
698 | - | let btcBalToSwap = assetBalance(this, btcAssetId) | |
699 | - | let putTheTokenInThePool = invoke(wxBtcPool, "putOneTkn", [1, false], [AttachedPayment(btcAssetId, btcBalToSwap)]) | |
700 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
701 | - | then { | |
702 | - | let lpTokenBalance = assetBalance(this, btcWxLPTokenAssetId) | |
703 | - | if ((lpTokenBalance == lpTokenBalance)) | |
704 | - | then { | |
705 | - | let sellPoolToken = invoke(wxBtcPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(btcWxLPTokenAssetId, lpTokenBalance)]) | |
706 | - | if ((sellPoolToken == sellPoolToken)) | |
707 | - | then { | |
708 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
709 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
710 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
711 | - | then throw("BTC SWOP -> WX [($_$)]") | |
712 | - | else nil | |
713 | - | else throw("Strict value is not equal to itself.") | |
714 | - | } | |
715 | - | else throw("Strict value is not equal to itself.") | |
716 | - | } | |
717 | - | else throw("Strict value is not equal to itself.") | |
718 | - | } | |
719 | - | else throw("Strict value is not equal to itself.") | |
720 | - | } | |
721 | - | else throw("Strict value is not equal to itself.") | |
722 | - | } | |
723 | - | else throw("Strict value is not equal to itself.") | |
391 | + | let swapToBtcOnSwop = invoke(swopBtcPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
392 | + | let btcBalToSwap = assetBalance(this, btcAssetId) | |
393 | + | let putTheTokenInThePool = invoke(wxBtcPool, "putOneTkn", [1, false], [AttachedPayment(btcAssetId, btcBalToSwap)]) | |
394 | + | let lpTokenBalance = assetBalance(this, btcWxLPTokenAssetId) | |
395 | + | let sellPoolToken = invoke(wxBtcPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(btcWxLPTokenAssetId, lpTokenBalance)]) | |
396 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
397 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
398 | + | then throw("BTC SWOP -> WX [($_$)]") | |
399 | + | else nil | |
724 | 400 | } | |
725 | 401 | ||
726 | 402 | ||
727 | 403 | ||
728 | 404 | @Callable(i) | |
729 | 405 | func a15 () = if ((i.caller != this)) | |
730 | 406 | then throw("you are not allowed to arb!") | |
731 | 407 | else { | |
732 | 408 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
733 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
734 | - | then { | |
735 | - | let putTheTokenInThePool = invoke(wxEthPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
736 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
737 | - | then { | |
738 | - | let lpTokenBalance = assetBalance(this, ethWxLPTokenAssetId) | |
739 | - | if ((lpTokenBalance == lpTokenBalance)) | |
740 | - | then { | |
741 | - | let sellPoolToken = invoke(wxEthPool, "getOneTkn", [ethAssetIdString, 1], [AttachedPayment(ethWxLPTokenAssetId, lpTokenBalance)]) | |
742 | - | if ((sellPoolToken == sellPoolToken)) | |
743 | - | then { | |
744 | - | let ethBalToSwap = assetBalance(this, ethAssetId) | |
745 | - | let swapEthOnSwop = invoke(swopEthPool, "exchange", [1], [AttachedPayment(ethAssetId, ethBalToSwap)]) | |
746 | - | if ((swapEthOnSwop == swapEthOnSwop)) | |
747 | - | then { | |
748 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
749 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
750 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
751 | - | then throw("ETH WX -> SWOP [($_$)]") | |
752 | - | else nil | |
753 | - | else throw("Strict value is not equal to itself.") | |
754 | - | } | |
755 | - | else throw("Strict value is not equal to itself.") | |
756 | - | } | |
757 | - | else throw("Strict value is not equal to itself.") | |
758 | - | } | |
759 | - | else throw("Strict value is not equal to itself.") | |
760 | - | } | |
761 | - | else throw("Strict value is not equal to itself.") | |
762 | - | } | |
763 | - | else throw("Strict value is not equal to itself.") | |
409 | + | let putTheTokenInThePool = invoke(wxEthPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
410 | + | let lpTokenBalance = assetBalance(this, ethWxLPTokenAssetId) | |
411 | + | let sellPoolToken = invoke(wxEthPool, "getOneTkn", [ethAssetIdString, 1], [AttachedPayment(ethWxLPTokenAssetId, lpTokenBalance)]) | |
412 | + | let ethBalToSwap = assetBalance(this, ethAssetId) | |
413 | + | let swapEthOnSwop = invoke(swopEthPool, "exchange", [1], [AttachedPayment(ethAssetId, ethBalToSwap)]) | |
414 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
415 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
416 | + | then throw("ETH WX -> SWOP [($_$)]") | |
417 | + | else nil | |
764 | 418 | } | |
765 | 419 | ||
766 | 420 | ||
767 | 421 | ||
768 | 422 | @Callable(i) | |
769 | 423 | func a16 () = if ((i.caller != this)) | |
770 | 424 | then throw("you are not allowed to arb!") | |
771 | 425 | else { | |
772 | 426 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
773 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
774 | - | then { | |
775 | - | let swapToEthOnSwop = invoke(swopEthPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
776 | - | if ((swapToEthOnSwop == swapToEthOnSwop)) | |
777 | - | then { | |
778 | - | let ethBalToSwap = assetBalance(this, ethAssetId) | |
779 | - | let putTheTokenInThePool = invoke(wxEthPool, "putOneTkn", [1, false], [AttachedPayment(ethAssetId, ethBalToSwap)]) | |
780 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
781 | - | then { | |
782 | - | let lpTokenBalance = assetBalance(this, ethWxLPTokenAssetId) | |
783 | - | if ((lpTokenBalance == lpTokenBalance)) | |
784 | - | then { | |
785 | - | let sellPoolToken = invoke(wxEthPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(ethWxLPTokenAssetId, lpTokenBalance)]) | |
786 | - | if ((sellPoolToken == sellPoolToken)) | |
787 | - | then { | |
788 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
789 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
790 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
791 | - | then throw("ETH SWOP -> WX [($_$)]") | |
792 | - | else nil | |
793 | - | else throw("Strict value is not equal to itself.") | |
794 | - | } | |
795 | - | else throw("Strict value is not equal to itself.") | |
796 | - | } | |
797 | - | else throw("Strict value is not equal to itself.") | |
798 | - | } | |
799 | - | else throw("Strict value is not equal to itself.") | |
800 | - | } | |
801 | - | else throw("Strict value is not equal to itself.") | |
802 | - | } | |
803 | - | else throw("Strict value is not equal to itself.") | |
427 | + | let swapToEthOnSwop = invoke(swopEthPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
428 | + | let ethBalToSwap = assetBalance(this, ethAssetId) | |
429 | + | let putTheTokenInThePool = invoke(wxEthPool, "putOneTkn", [1, false], [AttachedPayment(ethAssetId, ethBalToSwap)]) | |
430 | + | let lpTokenBalance = assetBalance(this, ethWxLPTokenAssetId) | |
431 | + | let sellPoolToken = invoke(wxEthPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(ethWxLPTokenAssetId, lpTokenBalance)]) | |
432 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
433 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
434 | + | then throw("ETH SWOP -> WX [($_$)]") | |
435 | + | else nil | |
804 | 436 | } | |
805 | 437 | ||
806 | 438 | ||
807 | 439 | ||
808 | 440 | @Callable(i) | |
809 | 441 | func a17 () = if ((i.caller != this)) | |
810 | 442 | then throw("you are not allowed to arb!") | |
811 | 443 | else { | |
812 | 444 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
813 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
814 | - | then { | |
815 | - | let putTheTokenInThePool = invoke(wxLtcPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
816 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
817 | - | then { | |
818 | - | let lpTokenBalance = assetBalance(this, ltcWxLPTokenAssetId) | |
819 | - | if ((lpTokenBalance == lpTokenBalance)) | |
820 | - | then { | |
821 | - | let sellPoolToken = invoke(wxLtcPool, "getOneTkn", [ltcAssetIdString, 1], [AttachedPayment(ltcWxLPTokenAssetId, lpTokenBalance)]) | |
822 | - | if ((sellPoolToken == sellPoolToken)) | |
823 | - | then { | |
824 | - | let ltcBalToSwap = assetBalance(this, ltcAssetId) | |
825 | - | let swapLtcOnSwop = invoke(swopLtcPool, "exchange", [1], [AttachedPayment(ltcAssetId, ltcBalToSwap)]) | |
826 | - | if ((swapLtcOnSwop == swapLtcOnSwop)) | |
827 | - | then { | |
828 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
829 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
830 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
831 | - | then throw("LTC WX -> SWOP [($_$)]") | |
832 | - | else nil | |
833 | - | else throw("Strict value is not equal to itself.") | |
834 | - | } | |
835 | - | else throw("Strict value is not equal to itself.") | |
836 | - | } | |
837 | - | else throw("Strict value is not equal to itself.") | |
838 | - | } | |
839 | - | else throw("Strict value is not equal to itself.") | |
840 | - | } | |
841 | - | else throw("Strict value is not equal to itself.") | |
842 | - | } | |
843 | - | else throw("Strict value is not equal to itself.") | |
445 | + | let putTheTokenInThePool = invoke(wxLtcPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
446 | + | let lpTokenBalance = assetBalance(this, ltcWxLPTokenAssetId) | |
447 | + | let sellPoolToken = invoke(wxLtcPool, "getOneTkn", [ltcAssetIdString, 1], [AttachedPayment(ltcWxLPTokenAssetId, lpTokenBalance)]) | |
448 | + | let ltcBalToSwap = assetBalance(this, ltcAssetId) | |
449 | + | let swapLtcOnSwop = invoke(swopLtcPool, "exchange", [1], [AttachedPayment(ltcAssetId, ltcBalToSwap)]) | |
450 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
451 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
452 | + | then throw("LTC WX -> SWOP [($_$)]") | |
453 | + | else nil | |
844 | 454 | } | |
845 | 455 | ||
846 | 456 | ||
847 | 457 | ||
848 | 458 | @Callable(i) | |
849 | 459 | func a18 () = if ((i.caller != this)) | |
850 | 460 | then throw("you are not allowed to arb!") | |
851 | 461 | else { | |
852 | 462 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
853 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
854 | - | then { | |
855 | - | let swapToLtcOnSwop = invoke(swopLtcPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
856 | - | if ((swapToLtcOnSwop == swapToLtcOnSwop)) | |
857 | - | then { | |
858 | - | let ltcBalToSwap = assetBalance(this, ltcAssetId) | |
859 | - | let putTheTokenInThePool = invoke(wxLtcPool, "putOneTkn", [1, false], [AttachedPayment(ltcAssetId, ltcBalToSwap)]) | |
860 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
861 | - | then { | |
862 | - | let lpTokenBalance = assetBalance(this, ltcWxLPTokenAssetId) | |
863 | - | if ((lpTokenBalance == lpTokenBalance)) | |
864 | - | then { | |
865 | - | let sellPoolToken = invoke(wxLtcPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(ltcWxLPTokenAssetId, lpTokenBalance)]) | |
866 | - | if ((sellPoolToken == sellPoolToken)) | |
867 | - | then { | |
868 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
869 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
870 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
871 | - | then throw("LTC SWOP -> WX [($_$)]") | |
872 | - | else nil | |
873 | - | else throw("Strict value is not equal to itself.") | |
874 | - | } | |
875 | - | else throw("Strict value is not equal to itself.") | |
876 | - | } | |
877 | - | else throw("Strict value is not equal to itself.") | |
878 | - | } | |
879 | - | else throw("Strict value is not equal to itself.") | |
880 | - | } | |
881 | - | else throw("Strict value is not equal to itself.") | |
882 | - | } | |
883 | - | else throw("Strict value is not equal to itself.") | |
463 | + | let swapToLtcOnSwop = invoke(swopLtcPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
464 | + | let ltcBalToSwap = assetBalance(this, ltcAssetId) | |
465 | + | let putTheTokenInThePool = invoke(wxLtcPool, "putOneTkn", [1, false], [AttachedPayment(ltcAssetId, ltcBalToSwap)]) | |
466 | + | let lpTokenBalance = assetBalance(this, ltcWxLPTokenAssetId) | |
467 | + | let sellPoolToken = invoke(wxLtcPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(ltcWxLPTokenAssetId, lpTokenBalance)]) | |
468 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
469 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
470 | + | then throw("LTC SWOP -> WX [($_$)]") | |
471 | + | else nil | |
884 | 472 | } | |
885 | 473 | ||
886 | 474 | ||
887 | 475 | ||
888 | 476 | @Callable(i) | |
889 | 477 | func a19 () = if ((i.caller != this)) | |
890 | 478 | then throw("you are not allowed to arb!") | |
891 | 479 | else { | |
892 | 480 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
893 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
894 | - | then { | |
895 | - | let putTheTokenInThePool = invoke(wxWestPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
896 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
897 | - | then { | |
898 | - | let lpTokenBalance = assetBalance(this, westWxLPTokenAssetId) | |
899 | - | if ((lpTokenBalance == lpTokenBalance)) | |
900 | - | then { | |
901 | - | let sellPoolToken = invoke(wxWestPool, "getOneTkn", [westAssetIdString, 1], [AttachedPayment(westWxLPTokenAssetId, lpTokenBalance)]) | |
902 | - | if ((sellPoolToken == sellPoolToken)) | |
903 | - | then { | |
904 | - | let westBalToSwap = assetBalance(this, westAssetId) | |
905 | - | let swapWestOnSwop = invoke(swopWestPool, "exchange", [1], [AttachedPayment(westAssetId, westBalToSwap)]) | |
906 | - | if ((swapWestOnSwop == swapWestOnSwop)) | |
907 | - | then { | |
908 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
909 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
910 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
911 | - | then throw("WEST WX -> SWOP [($_$)]") | |
912 | - | else nil | |
913 | - | else throw("Strict value is not equal to itself.") | |
914 | - | } | |
915 | - | else throw("Strict value is not equal to itself.") | |
916 | - | } | |
917 | - | else throw("Strict value is not equal to itself.") | |
918 | - | } | |
919 | - | else throw("Strict value is not equal to itself.") | |
920 | - | } | |
921 | - | else throw("Strict value is not equal to itself.") | |
922 | - | } | |
923 | - | else throw("Strict value is not equal to itself.") | |
481 | + | let putTheTokenInThePool = invoke(wxWestPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
482 | + | let lpTokenBalance = assetBalance(this, westWxLPTokenAssetId) | |
483 | + | let sellPoolToken = invoke(wxWestPool, "getOneTkn", [westAssetIdString, 1], [AttachedPayment(westWxLPTokenAssetId, lpTokenBalance)]) | |
484 | + | let westBalToSwap = assetBalance(this, westAssetId) | |
485 | + | let swapWestOnSwop = invoke(swopWestPool, "exchange", [1], [AttachedPayment(westAssetId, westBalToSwap)]) | |
486 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
487 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
488 | + | then throw("WEST WX -> SWOP [($_$)]") | |
489 | + | else nil | |
924 | 490 | } | |
925 | 491 | ||
926 | 492 | ||
927 | 493 | ||
928 | 494 | @Callable(i) | |
929 | 495 | func a20 () = if ((i.caller != this)) | |
930 | 496 | then throw("you are not allowed to arb!") | |
931 | 497 | else { | |
932 | 498 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
933 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
934 | - | then { | |
935 | - | let swapToWestOnSwop = invoke(swopWestPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
936 | - | if ((swapToWestOnSwop == swapToWestOnSwop)) | |
937 | - | then { | |
938 | - | let westBalToSwap = assetBalance(this, westAssetId) | |
939 | - | let putTheTokenInThePool = invoke(wxWestPool, "putOneTkn", [1, false], [AttachedPayment(westAssetId, westBalToSwap)]) | |
940 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
941 | - | then { | |
942 | - | let lpTokenBalance = assetBalance(this, westWxLPTokenAssetId) | |
943 | - | if ((lpTokenBalance == lpTokenBalance)) | |
944 | - | then { | |
945 | - | let sellPoolToken = invoke(wxWestPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(westWxLPTokenAssetId, lpTokenBalance)]) | |
946 | - | if ((sellPoolToken == sellPoolToken)) | |
947 | - | then { | |
948 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
949 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
950 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
951 | - | then throw("WEST SWOP -> WX [($_$)]") | |
952 | - | else nil | |
953 | - | else throw("Strict value is not equal to itself.") | |
954 | - | } | |
955 | - | else throw("Strict value is not equal to itself.") | |
956 | - | } | |
957 | - | else throw("Strict value is not equal to itself.") | |
958 | - | } | |
959 | - | else throw("Strict value is not equal to itself.") | |
960 | - | } | |
961 | - | else throw("Strict value is not equal to itself.") | |
962 | - | } | |
963 | - | else throw("Strict value is not equal to itself.") | |
499 | + | let swapToWestOnSwop = invoke(swopWestPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
500 | + | let westBalToSwap = assetBalance(this, westAssetId) | |
501 | + | let putTheTokenInThePool = invoke(wxWestPool, "putOneTkn", [1, false], [AttachedPayment(westAssetId, westBalToSwap)]) | |
502 | + | let lpTokenBalance = assetBalance(this, westWxLPTokenAssetId) | |
503 | + | let sellPoolToken = invoke(wxWestPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(westWxLPTokenAssetId, lpTokenBalance)]) | |
504 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
505 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
506 | + | then throw("WEST SWOP -> WX [($_$)]") | |
507 | + | else nil | |
964 | 508 | } | |
965 | 509 | ||
966 | 510 | ||
967 | 511 | ||
968 | 512 | @Callable(i) | |
969 | 513 | func a21 () = if ((i.caller != this)) | |
970 | 514 | then throw("you are not allowed to arb!") | |
971 | 515 | else { | |
972 | 516 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
973 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
974 | - | then { | |
975 | - | let putTheTokenInThePool = invoke(wxEggPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
976 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
977 | - | then { | |
978 | - | let lpTokenBalance = assetBalance(this, eggWxLPTokenAssetId) | |
979 | - | if ((lpTokenBalance == lpTokenBalance)) | |
980 | - | then { | |
981 | - | let sellPoolToken = invoke(wxEggPool, "getOneTkn", [eggAssetIdString, 1], [AttachedPayment(eggWxLPTokenAssetId, lpTokenBalance)]) | |
982 | - | if ((sellPoolToken == sellPoolToken)) | |
983 | - | then { | |
984 | - | let eggBalToSwap = assetBalance(this, eggAssetId) | |
985 | - | let swapEggOnSwop = invoke(swopEggPool, "exchange", [1], [AttachedPayment(eggAssetId, eggBalToSwap)]) | |
986 | - | if ((swapEggOnSwop == swapEggOnSwop)) | |
987 | - | then { | |
988 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
989 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
990 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
991 | - | then throw("EGG WX -> SWOP [($_$)]") | |
992 | - | else nil | |
993 | - | else throw("Strict value is not equal to itself.") | |
994 | - | } | |
995 | - | else throw("Strict value is not equal to itself.") | |
996 | - | } | |
997 | - | else throw("Strict value is not equal to itself.") | |
998 | - | } | |
999 | - | else throw("Strict value is not equal to itself.") | |
1000 | - | } | |
1001 | - | else throw("Strict value is not equal to itself.") | |
1002 | - | } | |
1003 | - | else throw("Strict value is not equal to itself.") | |
517 | + | let putTheTokenInThePool = invoke(wxEggPool, "putOneTkn", [1, false], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
518 | + | let lpTokenBalance = assetBalance(this, eggWxLPTokenAssetId) | |
519 | + | let sellPoolToken = invoke(wxEggPool, "getOneTkn", [eggAssetIdString, 1], [AttachedPayment(eggWxLPTokenAssetId, lpTokenBalance)]) | |
520 | + | let eggBalToSwap = assetBalance(this, eggAssetId) | |
521 | + | let swapEggOnSwop = invoke(swopEggPool, "exchange", [1], [AttachedPayment(eggAssetId, eggBalToSwap)]) | |
522 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
523 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
524 | + | then throw("EGG WX -> SWOP [($_$)]") | |
525 | + | else nil | |
1004 | 526 | } | |
1005 | 527 | ||
1006 | 528 | ||
1007 | 529 | ||
1008 | 530 | @Callable(i) | |
1009 | 531 | func a22 () = if ((i.caller != this)) | |
1010 | 532 | then throw("you are not allowed to arb!") | |
1011 | 533 | else { | |
1012 | 534 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
1013 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
1014 | - | then { | |
1015 | - | let swapToEggOnSwop = invoke(swopEggPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
1016 | - | if ((swapToEggOnSwop == swapToEggOnSwop)) | |
1017 | - | then { | |
1018 | - | let eggBalToSwap = assetBalance(this, eggAssetId) | |
1019 | - | let putTheTokenInThePool = invoke(wxEggPool, "putOneTkn", [1, false], [AttachedPayment(eggAssetId, eggBalToSwap)]) | |
1020 | - | if ((putTheTokenInThePool == putTheTokenInThePool)) | |
1021 | - | then { | |
1022 | - | let lpTokenBalance = assetBalance(this, eggWxLPTokenAssetId) | |
1023 | - | if ((lpTokenBalance == lpTokenBalance)) | |
1024 | - | then { | |
1025 | - | let sellPoolToken = invoke(wxEggPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(eggWxLPTokenAssetId, lpTokenBalance)]) | |
1026 | - | if ((sellPoolToken == sellPoolToken)) | |
1027 | - | then { | |
1028 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
1029 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
1030 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
1031 | - | then throw("EGG SWOP -> WX [($_$)]") | |
1032 | - | else nil | |
1033 | - | else throw("Strict value is not equal to itself.") | |
1034 | - | } | |
1035 | - | else throw("Strict value is not equal to itself.") | |
1036 | - | } | |
1037 | - | else throw("Strict value is not equal to itself.") | |
1038 | - | } | |
1039 | - | else throw("Strict value is not equal to itself.") | |
1040 | - | } | |
1041 | - | else throw("Strict value is not equal to itself.") | |
1042 | - | } | |
1043 | - | else throw("Strict value is not equal to itself.") | |
535 | + | let swapToEggOnSwop = invoke(swopEggPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
536 | + | let eggBalToSwap = assetBalance(this, eggAssetId) | |
537 | + | let putTheTokenInThePool = invoke(wxEggPool, "putOneTkn", [1, false], [AttachedPayment(eggAssetId, eggBalToSwap)]) | |
538 | + | let lpTokenBalance = assetBalance(this, eggWxLPTokenAssetId) | |
539 | + | let sellPoolToken = invoke(wxEggPool, "getOneTkn", [usdnAssetIdString, 1], [AttachedPayment(eggWxLPTokenAssetId, lpTokenBalance)]) | |
540 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
541 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
542 | + | then throw("EGG SWOP -> WX [($_$)]") | |
543 | + | else nil | |
1044 | 544 | } | |
1045 | 545 | ||
1046 | 546 | ||
1047 | 547 | ||
1048 | 548 | @Callable(i) | |
1049 | 549 | func a23 () = if ((i.caller != this)) | |
1050 | 550 | then throw("you are not allowed to arb!") | |
1051 | 551 | else { | |
1052 | 552 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
1053 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
1054 | - | then { | |
1055 | - | let buyPlutoOnPuzzle = invoke(puzzlePlutoPool, "swap", [plutoAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
1056 | - | if ((buyPlutoOnPuzzle == buyPlutoOnPuzzle)) | |
1057 | - | then { | |
1058 | - | let plutoBalToSwap = assetBalance(this, plutoAssetId) | |
1059 | - | let swapPlutoOnSwop = invoke(swopPlutoPool, "exchange", [1], [AttachedPayment(plutoAssetId, plutoBalToSwap)]) | |
1060 | - | if ((swapPlutoOnSwop == swapPlutoOnSwop)) | |
1061 | - | then { | |
1062 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
1063 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
1064 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
1065 | - | then throw("PLUTO PUZZLE -> SWOP [($_$)]") | |
1066 | - | else nil | |
1067 | - | else throw("Strict value is not equal to itself.") | |
1068 | - | } | |
1069 | - | else throw("Strict value is not equal to itself.") | |
1070 | - | } | |
1071 | - | else throw("Strict value is not equal to itself.") | |
1072 | - | } | |
1073 | - | else throw("Strict value is not equal to itself.") | |
553 | + | let buyPlutoOnPuzzle = invoke(puzzlePlutoPool, "swap", [plutoAssetIdString, 1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
554 | + | let plutoBalToSwap = assetBalance(this, plutoAssetId) | |
555 | + | let swapPlutoOnSwop = invoke(swopPlutoPool, "exchange", [1], [AttachedPayment(plutoAssetId, plutoBalToSwap)]) | |
556 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
557 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
558 | + | then throw("PLUTO PUZZLE -> SWOP [($_$)]") | |
559 | + | else nil | |
1074 | 560 | } | |
1075 | 561 | ||
1076 | 562 | ||
1077 | 563 | ||
1078 | 564 | @Callable(i) | |
1079 | 565 | func a24 () = if ((i.caller != this)) | |
1080 | 566 | then throw("you are not allowed to arb!") | |
1081 | 567 | else { | |
1082 | 568 | let usdnBalanceBefore = assetBalance(this, usdnAssetId) | |
1083 | - | if ((usdnBalanceBefore == usdnBalanceBefore)) | |
1084 | - | then { | |
1085 | - | let swapToPlutoOnSwop = invoke(swopPlutoPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
1086 | - | if ((swapToPlutoOnSwop == swapToPlutoOnSwop)) | |
1087 | - | then { | |
1088 | - | let plutoBalToSwap = assetBalance(this, plutoAssetId) | |
1089 | - | let sellPlutoOnPuzzle = invoke(puzzlePlutoPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(plutoAssetId, plutoBalToSwap)]) | |
1090 | - | if ((sellPlutoOnPuzzle == sellPlutoOnPuzzle)) | |
1091 | - | then { | |
1092 | - | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
1093 | - | if ((usdnBalanceAfter == usdnBalanceAfter)) | |
1094 | - | then if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
1095 | - | then throw("PLUTO SWOP -> PUZZLE [($_$)]") | |
1096 | - | else nil | |
1097 | - | else throw("Strict value is not equal to itself.") | |
1098 | - | } | |
1099 | - | else throw("Strict value is not equal to itself.") | |
1100 | - | } | |
1101 | - | else throw("Strict value is not equal to itself.") | |
1102 | - | } | |
1103 | - | else throw("Strict value is not equal to itself.") | |
569 | + | let swapToPlutoOnSwop = invoke(swopPlutoPool, "exchange", [1], [AttachedPayment(usdnAssetId, (a * 1000000))]) | |
570 | + | let plutoBalToSwap = assetBalance(this, plutoAssetId) | |
571 | + | let sellPlutoOnPuzzle = invoke(puzzlePlutoPool, "swap", [usdnAssetIdString, 1], [AttachedPayment(plutoAssetId, plutoBalToSwap)]) | |
572 | + | let usdnBalanceAfter = assetBalance(this, usdnAssetId) | |
573 | + | if ((0 >= (usdnBalanceAfter - usdnBalanceBefore))) | |
574 | + | then throw("PLUTO SWOP -> PUZZLE [($_$)]") | |
575 | + | else nil | |
1104 | 576 | } | |
1105 | 577 | ||
1106 | 578 | ||
1107 | 579 | @Verifier(tx) | |
1108 | 580 | func verify () = sigVerify_128Kb(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
1109 | 581 |
github/deemru/w8io/169f3d6 127.64 ms ◑