tx · AaN9zgsmfWemEe6dVPmDQDeSnmJEokExE2o5PHn2uPBu 3N34x67KgytTnPx5erPmhz1FD8nwAChtAsb: -0.01400000 Waves 2020.10.22 21:05 [1232118] smart account 3N34x67KgytTnPx5erPmhz1FD8nwAChtAsb > SELF 0.00000000 Waves
{ "type": 13, "id": "AaN9zgsmfWemEe6dVPmDQDeSnmJEokExE2o5PHn2uPBu", "fee": 1400000, "feeAssetId": null, "timestamp": 1603389967184, "version": 1, "sender": "3N34x67KgytTnPx5erPmhz1FD8nwAChtAsb", "senderPublicKey": "Ak3LEdYk7Nk1Z88WXht4DxTQRZsK6dYL5kZ4CjrXSQBu", "proofs": [ "4umhPBeiWhgDmti89f3fxsYLXP2Enb9Q5HKDASDUtXiVkYDuc7wnoBDuLRQGCtaMwkG59wnjh4SWqKw6PGkzcDrP" ], "script": "base64:AAIEAAAAAAAAAA8IAhIAEgASABIAEgMKAQEAAAAQAAAAAAhJZFRva2VuQQkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwIAAAANYXNzZXRJZFRva2VuQQAAAAAISWRUb2tlbkIJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMCAAAADWFzc2V0SWRUb2tlbkIAAAAADGFtb3VudFRva2VuQgkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAAMYW1vdW50VG9rZW5CAAAAAAxhbW91bnRUb2tlbkEJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAADGFtb3VudFRva2VuQQAAAAARYXNzZXRJZFRva2VuU2hhcmUJAQAAABFAZXh0ck5hdGl2ZSgxMDUyKQAAAAIFAAAABHRoaXMCAAAADnNoYXJlX3Rva2VuX2lkAAAAABB0b2tlblNoYXJlU3VwcGx5CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAABJzaGFyZV90b2tlbl9zdXBwbHk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ldElkVG9rZW5CCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAxhbW91bnRUb2tlbkEJAABkAAAAAgUAAAAMYW1vdW50VG9rZW5BBQAAABJ0b2tlblJlY2VpdmVBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADGFtb3VudFRva2VuQgkAAGUAAAACBQAAAAxhbW91bnRUb2tlbkIFAAAAD3Rva2VuU2VuZEFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAOZXhjaGFuZ2VfY291bnQJAABkAAAAAgUAAAAFY291bnQAAAAAAAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyBQAAAA90b2tlblNlbmRBbW91bnQFAAAAC2Fzc2V0SWRTZW50BQAAAANuaWwJAAACAAAAAQIAAAAUQXNzZXQgaXMgbm90IGFsbG93ZWQAAAAA2SK/xA==", "chainId": 84, "height": 1232118, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 3o1zMgN5rzALCFz58ngAbGpCFJCtVoRU1FzDdCCEjxWH Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let IdTokenA = getStringValue(this, "assetIdTokenA") | |
5 | + | ||
6 | + | let IdTokenB = getStringValue(this, "assetIdTokenB") | |
7 | + | ||
8 | + | let amountTokenB = getIntegerValue(this, "amountTokenB") | |
9 | + | ||
10 | + | let amountTokenA = getIntegerValue(this, "amountTokenA") | |
11 | + | ||
12 | + | let assetIdTokenShare = getBinaryValue(this, "share_token_id") | |
13 | + | ||
14 | + | let tokenShareSupply = getIntegerValue(this, "share_token_supply") | |
15 | + | ||
16 | + | let comission = 500 | |
17 | + | ||
18 | + | let comissionScaleDelimiter = 1000000 | |
19 | + | ||
20 | + | let version = "1.0.0" | |
21 | + | ||
22 | + | let scaleValue8 = 100000000 | |
23 | + | ||
24 | + | let ratioThresholdMax = 100000000 | |
25 | + | ||
26 | + | let ratioThresholdMin = 99999000 | |
27 | + | ||
28 | + | let scaleValue8Digits = 8 | |
29 | + | ||
30 | + | func assetId (asset) = if ((asset == "WAVES")) | |
31 | + | then unit | |
32 | + | else fromBase58String(asset) | |
33 | + | ||
34 | + | ||
35 | + | let assetIdTokenA = assetId(IdTokenA) | |
36 | + | ||
37 | + | let assetIdTokenB = assetId(IdTokenB) | |
38 | + | ||
39 | + | @Callable(contextObj) | |
40 | + | func fund () = { | |
41 | + | let paymentA = value(contextObj.payments[0]) | |
42 | + | let paymentB = value(contextObj.payments[1]) | |
43 | + | let assetIdReceivedA = paymentA.assetId | |
44 | + | let tokenReceiveAmountA = paymentA.amount | |
45 | + | let assetIdReceivedB = paymentB.assetId | |
46 | + | let tokenReceiveAmountB = paymentB.amount | |
47 | + | let digitTokenA = match assetIdReceivedA { | |
48 | + | case p: Unit => | |
49 | + | 8 | |
50 | + | case p: ByteVector => | |
51 | + | value(assetInfo(p)).decimals | |
52 | + | case _ => | |
53 | + | throw("Match error") | |
54 | + | } | |
55 | + | let digitTokenB = match assetIdReceivedB { | |
56 | + | case p: Unit => | |
57 | + | 8 | |
58 | + | case p: ByteVector => | |
59 | + | value(assetInfo(p)).decimals | |
60 | + | case _ => | |
61 | + | throw("Match error") | |
62 | + | } | |
63 | + | if (isDefined(getBoolean(this, "status"))) | |
64 | + | then throw("already active") | |
65 | + | else { | |
66 | + | let shareTokenName = ("ShareT_" + takeRight(toString(this), 5)) | |
67 | + | let digitsInShareToken = ((digitTokenA + digitTokenB) / 2) | |
68 | + | let shareTokenInitialAmount = fraction(pow(tokenReceiveAmountA, digitTokenA, 5, 1, digitTokenA, HALFDOWN), pow(tokenReceiveAmountB, digitTokenB, 5, 1, digitTokenB, HALFDOWN), pow(10, 0, digitsInShareToken, 0, 0, HALFDOWN)) | |
69 | + | let shareTokenAssetId = calculateAssetId(Issue(shareTokenName, shareTokenName, shareTokenInitialAmount, digitsInShareToken, true)) | |
70 | + | let assetIdTokenStringA = match assetIdReceivedA { | |
71 | + | case t: Unit => | |
72 | + | "WAVES" | |
73 | + | case t: ByteVector => | |
74 | + | toBase58String(value(assetIdReceivedA)) | |
75 | + | case _ => | |
76 | + | throw("Match error") | |
77 | + | } | |
78 | + | let assetIdTokenStringB = match assetIdReceivedB { | |
79 | + | case t: Unit => | |
80 | + | "WAVES" | |
81 | + | case t: ByteVector => | |
82 | + | toBase58String(value(assetIdReceivedB)) | |
83 | + | case _ => | |
84 | + | throw("Match error") | |
85 | + | } | |
86 | + | [IntegerEntry("amountTokenA", tokenReceiveAmountA), IntegerEntry("amountTokenB", tokenReceiveAmountB), StringEntry("assetIdTokenA", assetIdTokenStringA), StringEntry("assetIdTokenB", assetIdTokenStringB), IntegerEntry("exchange_count", 0), BooleanEntry("status", true), IntegerEntry("comission", comission), IntegerEntry("comissionScaleDelimiter", comissionScaleDelimiter), StringEntry("version", version), Issue(shareTokenName, shareTokenName, shareTokenInitialAmount, digitsInShareToken, true), ScriptTransfer(contextObj.caller, shareTokenInitialAmount, shareTokenAssetId), BinaryEntry("share_token_id", shareTokenAssetId), IntegerEntry("share_token_supply", shareTokenInitialAmount)] | |
87 | + | } | |
88 | + | } | |
89 | + | ||
90 | + | ||
91 | + | ||
92 | + | @Callable(contextObj) | |
93 | + | func replenishment () = { | |
94 | + | let paymentA = value(contextObj.payments[0]) | |
95 | + | let paymentB = value(contextObj.payments[1]) | |
96 | + | let assetIdReceivedA = paymentA.assetId | |
97 | + | let tokenReceiveAmountA = paymentA.amount | |
98 | + | let assetIdReceivedB = paymentB.assetId | |
99 | + | let tokenReceiveAmountB = paymentB.amount | |
100 | + | let dAppTokensAmountA = getIntegerValue(this, "amountTokenA") | |
101 | + | let dAppTokensAmountB = getIntegerValue(this, "amountTokenB") | |
102 | + | if (if ((assetIdReceivedA != assetIdTokenA)) | |
103 | + | then true | |
104 | + | else (assetIdReceivedB != assetIdTokenB)) | |
105 | + | then throw("incorrect assets") | |
106 | + | else { | |
107 | + | let tokenRatio = (fraction(tokenReceiveAmountA, (1000000000000 * 100000), dAppTokensAmountA) / fraction(dAppTokensAmountB, 1000000000000, tokenReceiveAmountB)) | |
108 | + | if (!(if ((tokenRatio > 99990)) | |
109 | + | then (100010 > tokenRatio) | |
110 | + | else false)) | |
111 | + | then throw("incorrect assets amount") | |
112 | + | else { | |
113 | + | let shareTokenToPayAmount = fraction(tokenReceiveAmountA, tokenShareSupply, dAppTokensAmountA) | |
114 | + | if ((shareTokenToPayAmount == 0)) | |
115 | + | then throw("you try replansish with very small amount") | |
116 | + | else [Reissue(assetIdTokenShare, shareTokenToPayAmount, true), ScriptTransfer(contextObj.caller, shareTokenToPayAmount, assetIdTokenShare), IntegerEntry("share_token_supply", (tokenShareSupply + shareTokenToPayAmount)), IntegerEntry("amountTokenA", (dAppTokensAmountA + tokenReceiveAmountA)), IntegerEntry("amountTokenB", (dAppTokensAmountB + tokenReceiveAmountB))] | |
117 | + | } | |
118 | + | } | |
119 | + | } | |
120 | + | ||
121 | + | ||
122 | + | ||
123 | + | @Callable(contextObj) | |
124 | + | func replanishmentWithOneToken () = { | |
125 | + | let payment = value(contextObj.payments[0]) | |
126 | + | let assetIdReceived = payment.assetId | |
127 | + | let tokenReceiveAmount = payment.amount | |
128 | + | if ((assetIdReceived == assetIdTokenA)) | |
129 | + | then { | |
130 | + | let newAmountTokenA = (amountTokenA + tokenReceiveAmount) | |
131 | + | let priceAtoBwith8digits = fraction(newAmountTokenA, scaleValue8, amountTokenB) | |
132 | + | let tokenAmountBNewPriceOldInvariant = pow(fraction(amountTokenA, amountTokenB, priceAtoBwith8digits), 0, 5, 1, 0, HALFDOWN) | |
133 | + | let newTokenShareSupply = fraction(amountTokenB, tokenShareSupply, tokenAmountBNewPriceOldInvariant) | |
134 | + | let shareTokenToPayAmount = (newTokenShareSupply - tokenShareSupply) | |
135 | + | [Reissue(assetIdTokenShare, shareTokenToPayAmount, true), ScriptTransfer(contextObj.caller, shareTokenToPayAmount, assetIdTokenShare), IntegerEntry("share_token_supply", (tokenShareSupply + shareTokenToPayAmount)), IntegerEntry("amountTokenA", newAmountTokenA)] | |
136 | + | } | |
137 | + | else if ((assetIdReceived == assetIdTokenB)) | |
138 | + | then { | |
139 | + | let newAmountTokenB = (amountTokenB + tokenReceiveAmount) | |
140 | + | let priceAtoBwith8digits = fraction(amountTokenA, scaleValue8, newAmountTokenB) | |
141 | + | let tokenAmountBNewPriceOldInvariant = pow(fraction(amountTokenA, amountTokenB, priceAtoBwith8digits), 0, 5, 1, 0, HALFDOWN) | |
142 | + | let newTokenShareSupply = fraction(amountTokenB, tokenShareSupply, tokenAmountBNewPriceOldInvariant) | |
143 | + | let shareTokenToPayAmount = (newTokenShareSupply - tokenShareSupply) | |
144 | + | [Reissue(assetIdTokenShare, shareTokenToPayAmount, true), ScriptTransfer(contextObj.caller, shareTokenToPayAmount, assetIdTokenShare), IntegerEntry("share_token_supply", (tokenShareSupply + shareTokenToPayAmount)), IntegerEntry("amountTokenB", newAmountTokenB)] | |
145 | + | } | |
146 | + | else throw("incorrect assets in payment") | |
147 | + | } | |
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | @Callable(contextObj) | |
152 | + | func withdraw () = { | |
153 | + | let dAppTokensAmountA = getIntegerValue(this, "amountTokenA") | |
154 | + | let dAppTokensAmountB = getIntegerValue(this, "amountTokenB") | |
155 | + | let payment = value(contextObj.payments[0]) | |
156 | + | let assetIdReceived = payment.assetId | |
157 | + | let tokenReceiveAmount = payment.amount | |
158 | + | if ((assetIdTokenShare != assetIdReceived)) | |
159 | + | then throw(("you need to attach share token for this dApp " + toBase58String(assetIdTokenShare))) | |
160 | + | else { | |
161 | + | let tokensToPayA = fraction(tokenReceiveAmount, dAppTokensAmountA, tokenShareSupply) | |
162 | + | let tokensToPayB = fraction(tokenReceiveAmount, dAppTokensAmountB, tokenShareSupply) | |
163 | + | [ScriptTransfer(contextObj.caller, tokensToPayA, assetIdTokenA), ScriptTransfer(contextObj.caller, tokensToPayB, assetIdTokenB), IntegerEntry("amountTokenA", (dAppTokensAmountA - tokensToPayA)), IntegerEntry("amountTokenB", (dAppTokensAmountB - tokensToPayB)), IntegerEntry("share_token_supply", (tokenShareSupply - tokenReceiveAmount)), Burn(assetIdTokenShare, tokenReceiveAmount)] | |
164 | + | } | |
165 | + | } | |
166 | + | ||
167 | + | ||
168 | + | ||
169 | + | @Callable(contextObj) | |
170 | + | func exchanger (minTokenRecieve) = { | |
171 | + | let payment = value(contextObj.payments[0]) | |
172 | + | let assetIdReceived = payment.assetId | |
173 | + | let tokenReceiveAmount = payment.amount | |
174 | + | let count = value(getInteger(this, "exchange_count")) | |
175 | + | if ((assetIdReceived == assetIdTokenB)) | |
176 | + | then { | |
177 | + | let tokenSendAmount = ((fraction(amountTokenA, tokenReceiveAmount, (tokenReceiveAmount + amountTokenB)) * (comissionScaleDelimiter - comission)) / comissionScaleDelimiter) | |
178 | + | if ((minTokenRecieve > tokenSendAmount)) | |
179 | + | then throw("Price has changed dramaticaly. Receiving token amount don't satisfy specified price level") | |
180 | + | else { | |
181 | + | let assetIdSent = assetIdTokenA | |
182 | + | [IntegerEntry("amountTokenA", (amountTokenA - tokenSendAmount)), IntegerEntry("amountTokenB", (amountTokenB + tokenReceiveAmount)), IntegerEntry("exchange_count", (count + 1)), ScriptTransfer(contextObj.caller, tokenSendAmount, assetIdSent)] | |
183 | + | } | |
184 | + | } | |
185 | + | else if ((assetIdReceived == assetIdTokenA)) | |
186 | + | then { | |
187 | + | let tokenSendAmount = ((fraction(amountTokenB, tokenReceiveAmount, (tokenReceiveAmount + amountTokenA)) * (comissionScaleDelimiter - comission)) / comissionScaleDelimiter) | |
188 | + | if ((minTokenRecieve > tokenSendAmount)) | |
189 | + | then throw("Price has changed dramaticaly. Receiving token amount don't satisfy specified price level") | |
190 | + | else { | |
191 | + | let assetIdSent = assetIdTokenB | |
192 | + | [IntegerEntry("amountTokenA", (amountTokenA + tokenReceiveAmount)), IntegerEntry("amountTokenB", (amountTokenB - tokenSendAmount)), IntegerEntry("exchange_count", (count + 1)), ScriptTransfer(contextObj.caller, tokenSendAmount, assetIdSent)] | |
193 | + | } | |
194 | + | } | |
195 | + | else throw("Asset is not allowed") | |
196 | + | } | |
197 | + | ||
198 | + |
github/deemru/w8io/026f985 18.52 ms ◑