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