tx · 89q6Ydr7DwQXxrD718oP7J1MR3oZoDhSoDQzZAstm9ut

3N69YR9dGN9tJnhxGrURt5cQycjAN1zbQ9t:  -0.05000000 Waves

2021.01.25 16:43 [1369101] smart account 3N69YR9dGN9tJnhxGrURt5cQycjAN1zbQ9t > SELF 0.00000000 Waves

{ "type": 13, "id": "89q6Ydr7DwQXxrD718oP7J1MR3oZoDhSoDQzZAstm9ut", "fee": 5000000, "feeAssetId": null, "timestamp": 1611582207829, "version": 2, "chainId": 84, "sender": "3N69YR9dGN9tJnhxGrURt5cQycjAN1zbQ9t", "senderPublicKey": "Bo16mjUNTGCeZDYvQc6gHh46P21B3DqYCHoDt9CyzxHf", "proofs": [ "3CqGQ4bXdLJWGjH4rf4XfZq3nQMTVJfDWCLNkALeNa8o5gca6kovyenKhKqXjQUP945poZiYDAUikvme4baWZLLZ" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAACgAAAAABZQAAAAAAEDPE1gAAAAAOa3dvdGFyb3dub3dhZ2kAAAAAF0h26AAAAAAABGJhemEJAABpAAAAAgUAAAAOa3dvdGFyb3dub3dhZ2kAAAAAAAAAAAIAAAAABnBvemlvbQAAAAALpDt0AAAAAAAKYmFsYW5zVVNETgAAAAAAAAAD6AAAAAAKYmFsYW5zVVNEVAAAAAAAAAAD6AEAAAACbG4AAAABAAAAAXgJAABtAAAABgUAAAABeAAAAAAAAAAACAUAAAABZQAAAAAAAAAACAAAAAAAAAAACAUAAAAERE9XTgEAAAADZXhwAAAAAQAAAAF4CQAAbAAAAAYFAAAAAWUAAAAAAAAAAAgFAAAAAXgAAAAAAAAAAAgAAAAAAAAAAAgFAAAABERPV04BAAAACG1ub3plbmllAAAAAgAAAAF4AAAAAXkJAABrAAAAAwUAAAABeAUAAAABeQAAAAAABfXhAAEAAAAJZHppZWxlbmllAAAAAgAAAAF4AAAAAXkJAABrAAAAAwUAAAABeAAAAAAABfXhAAUAAAABeQAAAAEAAAABaQEAAAAHd3ltaWFuYQAAAAAE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AAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAGUG96aW9tBQAAAApub3d5cG96aW9tBQAAAANuaWwEAAAAB3d5cGxhdGEJAABlAAAAAgUAAAAGcG96aW9tCQEAAAAJZHppZWxlbmllAAAAAgUAAAAGcG96aW9tCQEAAAADZXhwAAAAAQkBAAAACWR6aWVsZW5pZQAAAAIFAAAADGt3b3Rhd3ltaWFueQUAAAAEYmF6YQQAAAAKbm93eXBvemlvbQkAAGUAAAACBQAAAAZwb3ppb20FAAAAB3d5cGxhdGEJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAB1d5cGxhdGEFAAAAB3d5cGxhdGEJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAABlBvemlvbQUAAAAKbm93eXBvemlvbQUAAAADbmlsAAAAAPm5F3I=", "height": 1369101, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8H1EEfuNBjMxXF7GdoWQ8CpWhzk7FMsTBArzvzCd54o2 Next: ZXWLpKeCT8GQExSsuQWdG3q7DE2eEJZWRzYqPRrnYZo Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let e = 271828182
55
6-let kwotarownowagi = 1000
6+let kwotarownowagi = 100000000000
77
88 let baza = (kwotarownowagi / 2)
99
10-let poziom = 60000000000
10+let poziom = 50000000000
1111
1212 let balansUSDN = 1000
1313
2727
2828 @Callable(i)
2929 func wymiana () = {
30- let nowypoziom = (poziom + fraction(100000000, 100, 1))
3130 let kwotawymiany = 2000000000
32- let a = exp(ln(10000000))
33- if (false)
34- then {
35- let wyplata = fraction((baza * (ln(nowypoziom) - ln(poziom))), 1, 100)
36-[ScriptTransfer(i.caller, wyplata, base58''), IntegerEntry("Poziom", nowypoziom), IntegerEntry("int", wyplata)]
37- }
31+ if ((kwotawymiany > (kwotarownowagi - balansUSDT)))
32+ then if ((balansUSDT > 1000))
33+ then {
34+ let nowypoziom = (poziom + kwotawymiany)
35+ let wyplata = fraction(mnozenie(baza, (ln(nowypoziom) - ln(poziom))), 1, 100)
36+[IntegerEntry("Poziom", nowypoziom), IntegerEntry("Wyplata ", wyplata)]
37+ }
38+ else {
39+ let czesc1 = (1000 - balansUSDT)
40+ let czesc2 = (kwotawymiany - czesc1)
41+ let nowypoziom = czesc2
42+ let wyplata = ((fraction(mnozenie(baza, (ln(nowypoziom) - ln(baza))), 1, 100) + poziom) - dzielenie(poziom, exp(dzielenie(czesc1, baza))))
43+[IntegerEntry("Wypłata", wyplata), IntegerEntry("Poziom", nowypoziom)]
44+ }
3845 else {
39- let wyplata = (poziom - dzielenie(poziom, exp((kwotawymiany / baza))))
40-[IntegerEntry("int", wyplata)]
46+ let wyplata = (poziom - dzielenie(poziom, exp(dzielenie(kwotawymiany, baza))))
47+ let nowypoziom = (poziom - wyplata)
48+[IntegerEntry("Wyplata", wyplata), IntegerEntry("Poziom", nowypoziom)]
4149 }
4250 }
4351
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let e = 271828182
55
6-let kwotarownowagi = 1000
6+let kwotarownowagi = 100000000000
77
88 let baza = (kwotarownowagi / 2)
99
10-let poziom = 60000000000
10+let poziom = 50000000000
1111
1212 let balansUSDN = 1000
1313
1414 let balansUSDT = 1000
1515
1616 func ln (x) = log(x, 8, e, 8, 8, DOWN)
1717
1818
1919 func exp (x) = pow(e, 8, x, 8, 8, DOWN)
2020
2121
2222 func mnozenie (x,y) = fraction(x, y, 100000000)
2323
2424
2525 func dzielenie (x,y) = fraction(x, 100000000, y)
2626
2727
2828 @Callable(i)
2929 func wymiana () = {
30- let nowypoziom = (poziom + fraction(100000000, 100, 1))
3130 let kwotawymiany = 2000000000
32- let a = exp(ln(10000000))
33- if (false)
34- then {
35- let wyplata = fraction((baza * (ln(nowypoziom) - ln(poziom))), 1, 100)
36-[ScriptTransfer(i.caller, wyplata, base58''), IntegerEntry("Poziom", nowypoziom), IntegerEntry("int", wyplata)]
37- }
31+ if ((kwotawymiany > (kwotarownowagi - balansUSDT)))
32+ then if ((balansUSDT > 1000))
33+ then {
34+ let nowypoziom = (poziom + kwotawymiany)
35+ let wyplata = fraction(mnozenie(baza, (ln(nowypoziom) - ln(poziom))), 1, 100)
36+[IntegerEntry("Poziom", nowypoziom), IntegerEntry("Wyplata ", wyplata)]
37+ }
38+ else {
39+ let czesc1 = (1000 - balansUSDT)
40+ let czesc2 = (kwotawymiany - czesc1)
41+ let nowypoziom = czesc2
42+ let wyplata = ((fraction(mnozenie(baza, (ln(nowypoziom) - ln(baza))), 1, 100) + poziom) - dzielenie(poziom, exp(dzielenie(czesc1, baza))))
43+[IntegerEntry("Wypłata", wyplata), IntegerEntry("Poziom", nowypoziom)]
44+ }
3845 else {
39- let wyplata = (poziom - dzielenie(poziom, exp((kwotawymiany / baza))))
40-[IntegerEntry("int", wyplata)]
46+ let wyplata = (poziom - dzielenie(poziom, exp(dzielenie(kwotawymiany, baza))))
47+ let nowypoziom = (poziom - wyplata)
48+[IntegerEntry("Wyplata", wyplata), IntegerEntry("Poziom", nowypoziom)]
4149 }
4250 }
4351
4452

github/deemru/w8io/169f3d6 
29.25 ms