tx · 7h3EJoYjUKWyNgMMNEdhmMtSrf82AhaC8DWqP4dUQSVr 3MsVsEgTUxTm6ETYkHGaqMhMhiY2Nb3yDN5: -0.02000000 Waves 2023.09.24 18:44 [2769680] smart account 3MsVsEgTUxTm6ETYkHGaqMhMhiY2Nb3yDN5 > SELF 0.00000000 Waves
{ "type": 13, "id": "7h3EJoYjUKWyNgMMNEdhmMtSrf82AhaC8DWqP4dUQSVr", "fee": 2000000, "feeAssetId": null, "timestamp": 1695570259532, "version": 2, "chainId": 84, "sender": "3MsVsEgTUxTm6ETYkHGaqMhMhiY2Nb3yDN5", "senderPublicKey": "2LmNyaN5YAXdg9C5vsXcTLU66hsW2KUNPsN7KcHBYhUo", "proofs": [ "3s87m6GqfosuAbrsZuzAJLQrEeQDq6WqiwW6RSUthTqqejfwfWxcdrqEKWTBpez7AaamfwaiVGcXTe18H7equFL9" ], "script": "base64:BgIgCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgIAAdWZXJzaW9uAgUxLjAuMAAOZEFwcFNpbmNlU3RhcnQAwPf3jKoxAAtsaXN0aW5nX2ZlZQCAnMmbBQAJa2V5MW93bmVyCQCnCAEBIC/MI9BPmHcpgjiz5B78lMslen9dOa5R2YaEtWjFpqZ7AAlrZXkyb3duZXIJAKcIAQEgL8wj0E+YdymCOLPkHvyUyyV6f105rlHZhoS1aMWmpnsACFRyZWFzdXJ5CQCnCAEBIM5I33N6c2d5KKDAZ8tN4OBxB27+QPlqeRoX3O6huCQBAApYVE5Bc3NldElEASAIZYS3D/CKahrz4mjoLgiQJMPTJ1gDzSz2Ll4L39oVpAEJY291bnRkYXlzAAQHVFNfRGlmZgkAZQIIBQlsYXN0QmxvY2sJdGltZXN0YW1wBQ5kQXBwU2luY2VTdGFydAQJZGF5bnVtYmVyCQBrAwABBQdUU19EaWZmAIC4mSkFCWRheW51bWJlcgYBaQEMUmVnaXN0ZXJQYWlyAQxFbnRlckFzc2V0SUQEBHBtdDEJAQV2Y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Bjb252ZXJ0IG9yIGxlc3MgdGhhbiAwLjAwMDAwMSBYVE4uAwkAZgIAAQUQVXNlckxQV29ydGhBc3NldAkAAgECXFlvdXIgTFAgVG9rZW4gY29udmVyc2lvbiBhbW91bnQgaXMgdmVyeSBsb3cgdG8gY29udmVydCBvciBsZXNzIHRoYW4gZnJhY3Rpb24gdmFsdWUgb2YgVG9rZW4uCQDMCAIJAQxJbnRlZ2VyRW50cnkCAhZXaXRoZHJhd19MUF9QZXJjZW50YWdlBRBVc2VyTFBQZXJjZW50YWdlCQDMCAIJAQRCdXJuAgUSUmVpc3N1ZWFibGVhc3NldElkCAUDcG10BmFtb3VudAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICAglUb3RhbF9MUF8FDEVudGVyQXNzZXRJRAUQTmV3TFBUb2tlbklzc3VlZAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICCQCsAgIJAKwCAgILQmFsYW5jZV9vZl8FDEVudGVyQXNzZXRJRAIBXwkA2AQBBQpYVE5Bc3NldElEBRNOZXdYVE5Ib2xkaW5nSW5QYWlyCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJAKwCAgkArAICAgtCYWxhbmNlX29mXwkA2AQBBQpYVE5Bc3NldElEAgFfBQxFbnRlckFzc2V0SUQFFU5ld0Fzc2V0SG9sZGluZ0luUGFpcgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFDlVzZXJMUFdvcnRoWFROBQpYVE5Bc3NldElECQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUQVXNlckxQV29ydGhBc3NldAkA2QQBBQxFbnRlckFzc2V0SUQFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnemA7a", "height": 2769680, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GTvNtkdhFhoMg1MgXEyptAGAvMfsgsu2LvMJBMyWh2S5 Next: ToThwJgFk2UtJEuvRSfk8YYzMEyDoYYRiXneHfGkB41 Diff:
Old | New | Differences | |
---|---|---|---|
60 | 60 | ||
61 | 61 | ||
62 | 62 | @Callable(k) | |
63 | - | func | |
63 | + | func oldAddLiquidity (l) = { | |
64 | 64 | let C = toBase58String(k.caller.bytes) | |
65 | - | let | |
66 | - | | |
67 | - | | |
68 | - | let E = getString(this, (" | |
65 | + | let m = value(k.payments[0]) | |
66 | + | let n = value(k.payments[1]) | |
67 | + | let D = getString(this, ("Pair_UV_" + l)) | |
68 | + | let E = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + l)), "LP Token is Missing or May be not Generated.")) | |
69 | 69 | let F = getIntegerValue(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
70 | 70 | let G = getIntegerValue(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
71 | - | let H = fraction(F, G, (G + D.amount)) | |
72 | - | let I = (F - H) | |
73 | - | let J = 5 | |
74 | - | let K = h() | |
75 | - | let L = ((I * J) / 1000) | |
76 | - | let M = ((I - L) - L) | |
77 | - | let N = { | |
78 | - | let O = getInteger(this, ((("Total_Swap_Fee_Collected_" + l) + "_") + toBase58String(g))) | |
79 | - | if ($isInstanceOf(O, "Int")) | |
71 | + | let H = valueOrErrorMessage(assetInfo(fromBase58String(l)), (("Asset " + l) + " doesn't exist")) | |
72 | + | let v = H.decimals | |
73 | + | let I = F | |
74 | + | let J = G | |
75 | + | let K = pow((((I * 1000000) / J) * pow(10, 0, v, 0, 0, CEILING)), 0, 1, 0, 0, CEILING) | |
76 | + | let L = (6 + v) | |
77 | + | let M = (L / 2) | |
78 | + | let N = fraction(K, m.amount, pow(10, 0, L, 0, 0, CEILING)) | |
79 | + | let O = pow((fraction(m.amount, 1, pow(10, 0, v, 0, 0, CEILING)) * fraction(n.amount, 1, pow(10, 0, 6, 0, 0, CEILING))), 0, 5, 1, M, DOWN) | |
80 | + | let P = { | |
81 | + | let Q = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
82 | + | if ($isInstanceOf(Q, "Int")) | |
80 | 83 | then { | |
81 | - | let | |
82 | - | | |
84 | + | let R = Q | |
85 | + | R | |
83 | 86 | } | |
84 | 87 | else 0 | |
85 | 88 | } | |
86 | - | let | |
87 | - | let | |
88 | - | let | |
89 | - | if ($isInstanceOf( | |
89 | + | let S = (P + n.amount) | |
90 | + | let T = { | |
91 | + | let Q = getInteger(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
92 | + | if ($isInstanceOf(Q, "Int")) | |
90 | 93 | then { | |
91 | - | let | |
92 | - | | |
94 | + | let R = Q | |
95 | + | R | |
93 | 96 | } | |
94 | 97 | else 0 | |
95 | 98 | } | |
96 | - | let | |
97 | - | let | |
98 | - | let | |
99 | - | if ($isInstanceOf( | |
99 | + | let U = (T + m.amount) | |
100 | + | let V = { | |
101 | + | let Q = getIntegerValue(this, ("Total_LP_" + l)) | |
102 | + | if ($isInstanceOf(Q, "Int")) | |
100 | 103 | then { | |
101 | - | let | |
102 | - | | |
104 | + | let R = Q | |
105 | + | R | |
103 | 106 | } | |
104 | 107 | else 0 | |
105 | 108 | } | |
106 | - | let U = ((F - I) + L) | |
107 | - | let V = { | |
108 | - | let O = getIntegerValue(this, ("Total_of_Pair_Txns_" + l)) | |
109 | - | if ($isInstanceOf(O, "Int")) | |
109 | + | let W = (V + O) | |
110 | + | if ((D != l)) | |
111 | + | then throw("Pair is not available in Whitelisted Asset.") | |
112 | + | else if ((l == toBase58String(g))) | |
113 | + | then throw("Input can Never be a USDC AssetID. Enter Whitelisted AssetID in input as well as in payment[1] & Attach USDC as an attachment Token in payment[2].") | |
114 | + | else if ((size(k.payments) != 2)) | |
115 | + | then throw("Two attached assets expected as payment in 50%-50%. Kindly Attach payment1 = Token you want to add for Liquidity & payment2 = Equivalent Amount of USDC Token.") | |
116 | + | else if ((m.assetId == g)) | |
117 | + | then throw("You Attached USDC asset in payment[1], please attach only whitelisted Token in payment[1] along with USDC in payment[2].") | |
118 | + | else if ((m.assetId != fromBase58String(l))) | |
119 | + | then throw("Incorrect asset attached for Liquidity in payment[1], please attach String Asset or Whitelisted Token only.") | |
120 | + | else if ((m.assetId != fromBase58String(l))) | |
121 | + | then throw("Incorrect asset attached for Liquidity in payment[1], please attach String Asset or Whitelisted Token only.") | |
122 | + | else if ((n.assetId != g)) | |
123 | + | then throw("Wrong Asset Attached in payments[2], Please attach payment[1] = Liquidity Token & payment[2] = USDC Token.") | |
124 | + | else if ((5000000 > n.amount)) | |
125 | + | then throw("please attach atleast 5 USDC in payment[2] & Equivalent worth of Token in payment[1]") | |
126 | + | else if ((n.amount != N)) | |
127 | + | then throw((((((("Attached payment[2] qty is not matching as per attached payment[1].payment[2] must be as int [" + toString(N)) + "] or ") + toString(fraction(N, 1, 1000000))) + ".") + takeRight(toString(N), 6)) + " USDC.")) | |
128 | + | else if ((1 > O)) | |
129 | + | then throw((("LP Token Outcome is going below " + toString(M)) + " Decimals. Please Attach min. 1 LP token or 5 USDC Atleast.")) | |
130 | + | else [IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), S), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), U), IntegerEntry(("Total_LP_" + l), W), Reissue(E, O, true), ScriptTransfer(k.caller, O, E)] | |
131 | + | } | |
132 | + | ||
133 | + | ||
134 | + | ||
135 | + | @Callable(k) | |
136 | + | func SwapAssetToXTNPairEntry (l) = { | |
137 | + | let C = toBase58String(k.caller.bytes) | |
138 | + | let X = if ((size(k.payments) == 1)) | |
139 | + | then k.payments[0] | |
140 | + | else throw("Whitelisted Token is required as Attached payment[1].") | |
141 | + | let D = getString(this, ("Pair_UV_" + l)) | |
142 | + | let Y = getIntegerValue(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
143 | + | let G = getIntegerValue(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
144 | + | let Z = fraction(Y, G, (G + X.amount)) | |
145 | + | let aa = (Y - Z) | |
146 | + | let ab = 5 | |
147 | + | let ac = h() | |
148 | + | let ad = ((aa * ab) / 1000) | |
149 | + | let ae = ((aa - ad) - ad) | |
150 | + | let af = { | |
151 | + | let Q = getInteger(this, ((("Total_Swap_Fee_Collected_" + l) + "_") + toBase58String(g))) | |
152 | + | if ($isInstanceOf(Q, "Int")) | |
110 | 153 | then { | |
111 | - | let | |
112 | - | | |
154 | + | let R = Q | |
155 | + | R | |
113 | 156 | } | |
114 | 157 | else 0 | |
115 | 158 | } | |
116 | - | let W = (V + 1) | |
159 | + | let ag = ((af + ad) + ad) | |
160 | + | let ah = { | |
161 | + | let Q = getInteger(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
162 | + | if ($isInstanceOf(Q, "Int")) | |
163 | + | then { | |
164 | + | let R = Q | |
165 | + | R | |
166 | + | } | |
167 | + | else 0 | |
168 | + | } | |
169 | + | let ai = (G + X.amount) | |
170 | + | let aj = { | |
171 | + | let Q = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
172 | + | if ($isInstanceOf(Q, "Int")) | |
173 | + | then { | |
174 | + | let R = Q | |
175 | + | R | |
176 | + | } | |
177 | + | else 0 | |
178 | + | } | |
179 | + | let ak = ((Y - aa) + ad) | |
180 | + | let al = { | |
181 | + | let Q = getIntegerValue(this, ("Total_of_Pair_Txns_" + l)) | |
182 | + | if ($isInstanceOf(Q, "Int")) | |
183 | + | then { | |
184 | + | let R = Q | |
185 | + | R | |
186 | + | } | |
187 | + | else 0 | |
188 | + | } | |
189 | + | let am = (al + 1) | |
117 | 190 | if ((l == toBase58String(g))) | |
118 | 191 | then throw("Input can Never be a XTN AssetID. Enter Whitelisted AssetID in input & Attach Whitelisted Asset as an attachment Token in payment[1].") | |
119 | - | else if (( | |
192 | + | else if ((D != l)) | |
120 | 193 | then throw("Pair is not available in Whitelisted Asset.") | |
121 | - | else if (( | |
194 | + | else if ((X.assetId == g)) | |
122 | 195 | then throw("You can't Attach XTN as an Attached Payment. Only Whitelisted Tokens are accepted.") | |
123 | - | else if (( | |
196 | + | else if ((X.assetId != fromBase58String(l))) | |
124 | 197 | then throw(("Incorrect asset attached, please attach or send " + l)) | |
125 | - | else if (( | |
198 | + | else if ((Y == 0)) | |
126 | 199 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
127 | 200 | else if ((G == 0)) | |
128 | 201 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
129 | - | else if ((100000 > | |
202 | + | else if ((100000 > aa)) | |
130 | 203 | then throw((("Your Attached Asset Amount is very low. Attach More " + l) + " Tokens to Claim the minimum Amount of 0.1 dollar atleast.")) | |
131 | - | else if (( | |
132 | - | then throw((("Pool Only has a Liquidity of " + toString(( | |
133 | - | else [IntegerEntry(((("Total_Swap_Fee_Collected_" + l) + "_") + toBase58String(g)), | |
204 | + | else if ((aa > Y)) | |
205 | + | then throw((("Pool Only has a Liquidity of " + toString((Y / pow(10, 0, 6, 0, 0, CEILING)))) + " XTN. Add Liquidity into Pool.")) | |
206 | + | else [IntegerEntry(((("Total_Swap_Fee_Collected_" + l) + "_") + toBase58String(g)), ag), IntegerEntry("Current_Day", ac), IntegerEntry(("Total_of_Pair_Txns_" + l), am), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), ai), IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), ak), ScriptTransfer(k.caller, ae, g), ScriptTransfer(d, fraction(ad, 1, 3), g), ScriptTransfer(e, fraction(ad, 1, 3), g), ScriptTransfer(f, fraction(ad, 1, 3), g)] | |
134 | 207 | } | |
135 | 208 | ||
136 | 209 | ||
138 | 211 | @Callable(k) | |
139 | 212 | func SwapXTNToAssetPairEntry (l) = { | |
140 | 213 | let C = toBase58String(k.caller.bytes) | |
141 | - | let | |
214 | + | let X = if ((size(k.payments) == 1)) | |
142 | 215 | then k.payments[0] | |
143 | 216 | else throw((("Only " + toBase58String(g)) + " XTN Token is required as an Attached payment[1].")) | |
144 | - | let | |
217 | + | let Y = getIntegerValue(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
145 | 218 | let G = getIntegerValue(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
146 | - | let | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | if ($isInstanceOf( | |
219 | + | let an = fraction(Y, G, (Y + X.amount)) | |
220 | + | let aa = (G - an) | |
221 | + | let D = getString(this, ("Pair_UV_" + l)) | |
222 | + | let ab = 5 | |
223 | + | let ac = h() | |
224 | + | let ad = ((aa * ab) / 1000) | |
225 | + | let ae = ((aa - ad) - ad) | |
226 | + | let ao = { | |
227 | + | let Q = getInteger(this, ("Total_Swap_Fee_Collected_" + l)) | |
228 | + | if ($isInstanceOf(Q, "Int")) | |
156 | 229 | then { | |
157 | - | let | |
158 | - | | |
230 | + | let R = Q | |
231 | + | R | |
159 | 232 | } | |
160 | 233 | else 0 | |
161 | 234 | } | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | if ($isInstanceOf( | |
235 | + | let ap = ((ao + ad) + ad) | |
236 | + | let ah = { | |
237 | + | let Q = getInteger(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
238 | + | if ($isInstanceOf(Q, "Int")) | |
166 | 239 | then { | |
167 | - | let | |
168 | - | | |
240 | + | let R = Q | |
241 | + | R | |
169 | 242 | } | |
170 | 243 | else 0 | |
171 | 244 | } | |
172 | - | let | |
173 | - | let | |
174 | - | let | |
175 | - | if ($isInstanceOf( | |
245 | + | let ai = ((G - aa) + ad) | |
246 | + | let aj = { | |
247 | + | let Q = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
248 | + | if ($isInstanceOf(Q, "Int")) | |
176 | 249 | then { | |
177 | - | let | |
178 | - | | |
250 | + | let R = Q | |
251 | + | R | |
179 | 252 | } | |
180 | 253 | else 0 | |
181 | 254 | } | |
182 | - | let | |
183 | - | let | |
184 | - | let | |
185 | - | if ($isInstanceOf( | |
255 | + | let ak = (Y + X.amount) | |
256 | + | let al = { | |
257 | + | let Q = getIntegerValue(this, ("Total_of_Pair_Txns_" + l)) | |
258 | + | if ($isInstanceOf(Q, "Int")) | |
186 | 259 | then { | |
187 | - | let | |
188 | - | | |
260 | + | let R = Q | |
261 | + | R | |
189 | 262 | } | |
190 | 263 | else 0 | |
191 | 264 | } | |
192 | - | let | |
193 | - | if (( | |
265 | + | let am = (al + 1) | |
266 | + | if ((D != l)) | |
194 | 267 | then throw("Pair is not available in Whitelisted Asset.") | |
195 | 268 | else if ((l == toBase58String(g))) | |
196 | 269 | then throw("Input can Never be a XTN AssetID. Enter Whitelisted AssetID in input & Attach XTN as an attachment Token in payment[1].") | |
197 | - | else if (( | |
270 | + | else if ((X.assetId != g)) | |
198 | 271 | then throw((("You can Attach " + toBase58String(g)) + " as an Attached Payment[1] to Swap XTN To Required Token. Any other asset else than XTN will be rejected.")) | |
199 | - | else if ((100000 > | |
272 | + | else if ((100000 > X.amount)) | |
200 | 273 | then throw("Your Attached XTN Amount is very low. Attach Atleast 0.1 XTN to Claim the minimum Tokens.") | |
201 | - | else if (( | |
274 | + | else if ((Y == 0)) | |
202 | 275 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
203 | 276 | else if ((G == 0)) | |
204 | 277 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
205 | - | else if (( | |
278 | + | else if ((aa > G)) | |
206 | 279 | then throw((("Pool Only has a Liquidity of " + toString(G)) + " Tokens. Add Liquidity into Pool.")) | |
207 | - | else [IntegerEntry(("Total_Swap_Fee_Collected_" + l), | |
280 | + | else [IntegerEntry(("Total_Swap_Fee_Collected_" + l), ap), IntegerEntry("Current_Day", ac), IntegerEntry(("Total_of_Pair_Txns_" + l), am), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), ai), IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), ak), ScriptTransfer(k.caller, ae, fromBase58String(l)), ScriptTransfer(d, fraction(ad, 1, 3), fromBase58String(l)), ScriptTransfer(e, fraction(ad, 1, 3), fromBase58String(l)), ScriptTransfer(f, fraction(ad, 1, 3), fromBase58String(l))] | |
208 | 281 | } | |
209 | 282 | ||
210 | 283 | ||
214 | 287 | let C = toBase58String(k.caller.bytes) | |
215 | 288 | let m = value(k.payments[0]) | |
216 | 289 | let n = value(k.payments[1]) | |
217 | - | let | |
218 | - | let | |
219 | - | let | |
290 | + | let D = getString(this, ("Pair_UV_" + l)) | |
291 | + | let E = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + l)), "LP Token is Missing or May be not Generated.")) | |
292 | + | let Y = getIntegerValue(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
220 | 293 | let G = getIntegerValue(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
221 | - | let | |
222 | - | let v = | |
294 | + | let H = valueOrErrorMessage(assetInfo(fromBase58String(l)), (("Asset " + l) + " doesn't exist")) | |
295 | + | let v = H.decimals | |
223 | 296 | let w = fraction((v + 6), 1, 2) | |
224 | 297 | let x = (1 * pow(10, 0, w, 0, 0, CEILING)) | |
225 | 298 | let y = fraction(m.amount, n.amount, x) | |
226 | 299 | let z = sqrt(y, w, w, CEILING) | |
227 | - | let ac = { | |
228 | - | let O = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
229 | - | if ($isInstanceOf(O, "Int")) | |
300 | + | let aq = pow(10, 0, v, 0, 0, CEILING) | |
301 | + | let ar = fraction(Y, aq, G) | |
302 | + | let as = { | |
303 | + | let Q = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
304 | + | if ($isInstanceOf(Q, "Int")) | |
230 | 305 | then { | |
231 | - | let | |
232 | - | | |
306 | + | let R = Q | |
307 | + | R | |
233 | 308 | } | |
234 | 309 | else 0 | |
235 | 310 | } | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | if ($isInstanceOf( | |
311 | + | let at = (as + n.amount) | |
312 | + | let T = { | |
313 | + | let Q = getInteger(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
314 | + | if ($isInstanceOf(Q, "Int")) | |
240 | 315 | then { | |
241 | - | let | |
242 | - | | |
316 | + | let R = Q | |
317 | + | R | |
243 | 318 | } | |
244 | 319 | else 0 | |
245 | 320 | } | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | if ($isInstanceOf( | |
321 | + | let U = (T + m.amount) | |
322 | + | let V = { | |
323 | + | let Q = getIntegerValue(this, ("Total_LP_" + l)) | |
324 | + | if ($isInstanceOf(Q, "Int")) | |
250 | 325 | then { | |
251 | - | let | |
252 | - | | |
326 | + | let R = Q | |
327 | + | R | |
253 | 328 | } | |
254 | 329 | else 0 | |
255 | 330 | } | |
256 | - | let | |
257 | - | if (( | |
331 | + | let W = (V + z) | |
332 | + | if ((D != l)) | |
258 | 333 | then throw("Pair is not available in Whitelisted Asset.") | |
259 | 334 | else if ((l == toBase58String(g))) | |
260 | 335 | then throw("Input can Never be a XTN AssetID. Enter Whitelisted AssetID in input as well as in payment[1] & Attach XTN as an attachment Token in payment[2].") | |
270 | 345 | then throw("please attach atleast 0.1 XTN in payment[2] & Equivalent worth of Token in payment[1]") | |
271 | 346 | else if ((1 > z)) | |
272 | 347 | then throw("LP Token Outcome is going below 1 in Fractional. Please Attach more amount.") | |
273 | - | else [IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), | |
348 | + | else [IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), at), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), U), IntegerEntry(("Total_LP_" + l), W), IntegerEntry("Token_Price", ar), Reissue(E, z, true), ScriptTransfer(k.caller, z, E)] | |
274 | 349 | } | |
275 | 350 | ||
276 | 351 | ||
278 | 353 | @Callable(k) | |
279 | 354 | func RemoveLiquidity (l) = { | |
280 | 355 | let C = toBase58String(k.caller.bytes) | |
281 | - | let | |
356 | + | let X = if ((size(k.payments) == 1)) | |
282 | 357 | then k.payments[0] | |
283 | 358 | else throw("No payment attached, Please Attach LP Token as payment[1].") | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | let v = | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
359 | + | let D = getString(this, ("Pair_UV_" + l)) | |
360 | + | let au = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + l)), "LP Token is Missing or not Generated.")) | |
361 | + | let H = valueOrErrorMessage(assetInfo(fromBase58String(l)), (("Asset " + l) + " doesn't exist")) | |
362 | + | let v = H.decimals | |
363 | + | let L = (6 + v) | |
364 | + | let M = (L / 2) | |
365 | + | let av = getIntegerValue(this, ("Total_LP_" + l)) | |
366 | + | let aw = pow(fraction(X.amount, pow(10, 0, 8, 0, 0, CEILING), av), 6, 1, 0, 6, CEILING) | |
367 | + | let Y = getIntegerValue(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
293 | 368 | let G = getIntegerValue(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | if ($isInstanceOf( | |
369 | + | let ax = fraction(Y, aw, pow(10, 0, 8, 0, 0, CEILING)) | |
370 | + | let ay = fraction(G, aw, pow(10, 0, 8, 0, 0, CEILING)) | |
371 | + | let as = { | |
372 | + | let Q = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
373 | + | if ($isInstanceOf(Q, "Int")) | |
299 | 374 | then { | |
300 | - | let | |
301 | - | | |
375 | + | let R = Q | |
376 | + | R | |
302 | 377 | } | |
303 | 378 | else 0 | |
304 | 379 | } | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | if ($isInstanceOf( | |
380 | + | let at = (as - ax) | |
381 | + | let T = { | |
382 | + | let Q = getInteger(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
383 | + | if ($isInstanceOf(Q, "Int")) | |
309 | 384 | then { | |
310 | - | let | |
311 | - | | |
385 | + | let R = Q | |
386 | + | R | |
312 | 387 | } | |
313 | 388 | else 0 | |
314 | 389 | } | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | if ($isInstanceOf( | |
390 | + | let U = (T - ay) | |
391 | + | let V = { | |
392 | + | let Q = getIntegerValue(this, ("Total_LP_" + l)) | |
393 | + | if ($isInstanceOf(Q, "Int")) | |
319 | 394 | then { | |
320 | - | let | |
321 | - | | |
395 | + | let R = Q | |
396 | + | R | |
322 | 397 | } | |
323 | 398 | else 0 | |
324 | 399 | } | |
325 | - | let | |
326 | - | if (( | |
400 | + | let W = (V - X.amount) | |
401 | + | if ((D != l)) | |
327 | 402 | then throw("Pair is not available in Whitelist.") | |
328 | 403 | else if ((fromBase58String(l) == g)) | |
329 | 404 | then throw("Don't choose XTN AssetID as Input, Only Whitelisted Asset as Input String & Attach LP Tokens as payment[1]") | |
330 | - | else if (( | |
405 | + | else if ((X.assetId != au)) | |
331 | 406 | then throw("Wrong Asset is attached in payment[1] or LP Token Not Found or Missing.") | |
332 | - | else if ((1 > | |
407 | + | else if ((1 > aw)) | |
333 | 408 | then throw("Your LP Token amount % is very low to convert.") | |
334 | - | else if ((1 > | |
409 | + | else if ((1 > ax)) | |
335 | 410 | then throw("Your LP Token conversion amount is very low to convert or less than 0.000001 XTN.") | |
336 | - | else if ((1 > | |
411 | + | else if ((1 > ay)) | |
337 | 412 | then throw("Your LP Token conversion amount is very low to convert or less than fraction value of Token.") | |
338 | - | else [IntegerEntry("Withdraw_LP_Percentage", | |
413 | + | else [IntegerEntry("Withdraw_LP_Percentage", aw), Burn(au, X.amount), IntegerEntry(("Total_LP_" + l), W), IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), at), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), U), ScriptTransfer(k.caller, ax, g), ScriptTransfer(k.caller, ay, fromBase58String(l))] | |
339 | 414 | } | |
340 | 415 | ||
341 | 416 | ||
342 | - | @Verifier( | |
343 | - | func | |
417 | + | @Verifier(az) | |
418 | + | func aA () = sigVerify(az.bodyBytes, az.proofs[0], az.senderPublicKey) | |
344 | 419 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "1.0.0" | |
5 | 5 | ||
6 | 6 | let b = 1694928600000 | |
7 | 7 | ||
8 | 8 | let c = 1400000000 | |
9 | 9 | ||
10 | 10 | let d = addressFromPublicKey(base58'4Dahqn4MYNrieo9AX8qLWNCseBQNc9skQY81h4DFoote') | |
11 | 11 | ||
12 | 12 | let e = addressFromPublicKey(base58'4Dahqn4MYNrieo9AX8qLWNCseBQNc9skQY81h4DFoote') | |
13 | 13 | ||
14 | 14 | let f = addressFromPublicKey(base58'EtFSDsn89XfmXQvuQXPQMbLDbaAZ1YWYZHksptpQH4gp') | |
15 | 15 | ||
16 | 16 | let g = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' | |
17 | 17 | ||
18 | 18 | func h () = { | |
19 | 19 | let i = (lastBlock.timestamp - b) | |
20 | 20 | let j = fraction(1, i, 86400000) | |
21 | 21 | j | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Callable(k) | |
26 | 26 | func RegisterPair (l) = { | |
27 | 27 | let m = value(k.payments[0]) | |
28 | 28 | let n = value(k.payments[1]) | |
29 | 29 | let o = value(k.payments[2]) | |
30 | 30 | let p = toBase58String(k.caller.bytes) | |
31 | 31 | let q = !(isDefined(n.assetId)) | |
32 | 32 | let r = getString(this, ("Pair_UV_" + l)) | |
33 | 33 | let s = fromBase58String(l) | |
34 | 34 | let t = valueOrErrorMessage(assetInfo(fromBase58String(l)), (("Asset " + l) + " doesn't exist")) | |
35 | 35 | let u = t.name | |
36 | 36 | let v = t.decimals | |
37 | 37 | let w = fraction((v + 6), 1, 2) | |
38 | 38 | let x = (1 * pow(10, 0, w, 0, 0, CEILING)) | |
39 | 39 | let y = fraction(m.amount, n.amount, x) | |
40 | 40 | let z = sqrt(y, w, w, CEILING) | |
41 | 41 | let A = Issue((("LP-" + take(u, 8)) + "-XTN"), (((("LP-" + u) + "-XTN") + " is a Liquidity Provider Token Issued Against ") + l), z, w, true) | |
42 | 42 | let B = calculateAssetId(A) | |
43 | 43 | if ((r == l)) | |
44 | 44 | then throw("Pair Already Exist in List.") | |
45 | 45 | else if ((size(k.payments) != 3)) | |
46 | 46 | then throw((("Two attached assets expected as payment. Kindly Attach payment1 = XTN Token & payment2 = Token you want to List & payment3 = [" + toString(c)) + "/10^8] Waves.")) | |
47 | 47 | else if ((m.assetId != g)) | |
48 | 48 | then throw("Incorrect asset attached as payment[1], please attach XTN only.") | |
49 | 49 | else if ((100000 > m.amount)) | |
50 | 50 | then throw("Attached payment[1] amount is less than 0.1 XTN, please attach 0.1 XTN Minimum.") | |
51 | 51 | else if ((n.assetId != s)) | |
52 | 52 | then throw("Input String & Attached AssetID in payment2 is not matching.") | |
53 | 53 | else if ((o.amount != c)) | |
54 | 54 | then throw((("Attached payment[3] amount has to be exact [" + toString(c)) + "/10^8] WAVES.")) | |
55 | 55 | else if ((q == true)) | |
56 | 56 | then throw("You Attached WAVES Asset ID for Listing, please attach Tokens You want to list in payment[2].") | |
57 | 57 | else [StringEntry(("Pair_UV_" + l), l), IntegerEntry(("Listing_Fee_" + l), o.amount), IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), m.amount), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), n.amount), IntegerEntry(("Total_of_Pair_Txns_" + l), 0), IntegerEntry(((("Total_Swap_Fee_Collected_" + l) + "_") + toBase58String(g)), 0), IntegerEntry(("Total_Swap_Fee_Collected_" + l), 0), A, ScriptTransfer(k.caller, z, B), ScriptTransfer(d, fraction(c, 1, 2), unit), ScriptTransfer(e, fraction(c, 1, 2), unit), StringEntry(("LP_" + l), toBase58String(B)), IntegerEntry(("Total_LP_" + l), z)] | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | ||
62 | 62 | @Callable(k) | |
63 | - | func | |
63 | + | func oldAddLiquidity (l) = { | |
64 | 64 | let C = toBase58String(k.caller.bytes) | |
65 | - | let | |
66 | - | | |
67 | - | | |
68 | - | let E = getString(this, (" | |
65 | + | let m = value(k.payments[0]) | |
66 | + | let n = value(k.payments[1]) | |
67 | + | let D = getString(this, ("Pair_UV_" + l)) | |
68 | + | let E = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + l)), "LP Token is Missing or May be not Generated.")) | |
69 | 69 | let F = getIntegerValue(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
70 | 70 | let G = getIntegerValue(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
71 | - | let H = fraction(F, G, (G + D.amount)) | |
72 | - | let I = (F - H) | |
73 | - | let J = 5 | |
74 | - | let K = h() | |
75 | - | let L = ((I * J) / 1000) | |
76 | - | let M = ((I - L) - L) | |
77 | - | let N = { | |
78 | - | let O = getInteger(this, ((("Total_Swap_Fee_Collected_" + l) + "_") + toBase58String(g))) | |
79 | - | if ($isInstanceOf(O, "Int")) | |
71 | + | let H = valueOrErrorMessage(assetInfo(fromBase58String(l)), (("Asset " + l) + " doesn't exist")) | |
72 | + | let v = H.decimals | |
73 | + | let I = F | |
74 | + | let J = G | |
75 | + | let K = pow((((I * 1000000) / J) * pow(10, 0, v, 0, 0, CEILING)), 0, 1, 0, 0, CEILING) | |
76 | + | let L = (6 + v) | |
77 | + | let M = (L / 2) | |
78 | + | let N = fraction(K, m.amount, pow(10, 0, L, 0, 0, CEILING)) | |
79 | + | let O = pow((fraction(m.amount, 1, pow(10, 0, v, 0, 0, CEILING)) * fraction(n.amount, 1, pow(10, 0, 6, 0, 0, CEILING))), 0, 5, 1, M, DOWN) | |
80 | + | let P = { | |
81 | + | let Q = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
82 | + | if ($isInstanceOf(Q, "Int")) | |
80 | 83 | then { | |
81 | - | let | |
82 | - | | |
84 | + | let R = Q | |
85 | + | R | |
83 | 86 | } | |
84 | 87 | else 0 | |
85 | 88 | } | |
86 | - | let | |
87 | - | let | |
88 | - | let | |
89 | - | if ($isInstanceOf( | |
89 | + | let S = (P + n.amount) | |
90 | + | let T = { | |
91 | + | let Q = getInteger(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
92 | + | if ($isInstanceOf(Q, "Int")) | |
90 | 93 | then { | |
91 | - | let | |
92 | - | | |
94 | + | let R = Q | |
95 | + | R | |
93 | 96 | } | |
94 | 97 | else 0 | |
95 | 98 | } | |
96 | - | let | |
97 | - | let | |
98 | - | let | |
99 | - | if ($isInstanceOf( | |
99 | + | let U = (T + m.amount) | |
100 | + | let V = { | |
101 | + | let Q = getIntegerValue(this, ("Total_LP_" + l)) | |
102 | + | if ($isInstanceOf(Q, "Int")) | |
100 | 103 | then { | |
101 | - | let | |
102 | - | | |
104 | + | let R = Q | |
105 | + | R | |
103 | 106 | } | |
104 | 107 | else 0 | |
105 | 108 | } | |
106 | - | let U = ((F - I) + L) | |
107 | - | let V = { | |
108 | - | let O = getIntegerValue(this, ("Total_of_Pair_Txns_" + l)) | |
109 | - | if ($isInstanceOf(O, "Int")) | |
109 | + | let W = (V + O) | |
110 | + | if ((D != l)) | |
111 | + | then throw("Pair is not available in Whitelisted Asset.") | |
112 | + | else if ((l == toBase58String(g))) | |
113 | + | then throw("Input can Never be a USDC AssetID. Enter Whitelisted AssetID in input as well as in payment[1] & Attach USDC as an attachment Token in payment[2].") | |
114 | + | else if ((size(k.payments) != 2)) | |
115 | + | then throw("Two attached assets expected as payment in 50%-50%. Kindly Attach payment1 = Token you want to add for Liquidity & payment2 = Equivalent Amount of USDC Token.") | |
116 | + | else if ((m.assetId == g)) | |
117 | + | then throw("You Attached USDC asset in payment[1], please attach only whitelisted Token in payment[1] along with USDC in payment[2].") | |
118 | + | else if ((m.assetId != fromBase58String(l))) | |
119 | + | then throw("Incorrect asset attached for Liquidity in payment[1], please attach String Asset or Whitelisted Token only.") | |
120 | + | else if ((m.assetId != fromBase58String(l))) | |
121 | + | then throw("Incorrect asset attached for Liquidity in payment[1], please attach String Asset or Whitelisted Token only.") | |
122 | + | else if ((n.assetId != g)) | |
123 | + | then throw("Wrong Asset Attached in payments[2], Please attach payment[1] = Liquidity Token & payment[2] = USDC Token.") | |
124 | + | else if ((5000000 > n.amount)) | |
125 | + | then throw("please attach atleast 5 USDC in payment[2] & Equivalent worth of Token in payment[1]") | |
126 | + | else if ((n.amount != N)) | |
127 | + | then throw((((((("Attached payment[2] qty is not matching as per attached payment[1].payment[2] must be as int [" + toString(N)) + "] or ") + toString(fraction(N, 1, 1000000))) + ".") + takeRight(toString(N), 6)) + " USDC.")) | |
128 | + | else if ((1 > O)) | |
129 | + | then throw((("LP Token Outcome is going below " + toString(M)) + " Decimals. Please Attach min. 1 LP token or 5 USDC Atleast.")) | |
130 | + | else [IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), S), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), U), IntegerEntry(("Total_LP_" + l), W), Reissue(E, O, true), ScriptTransfer(k.caller, O, E)] | |
131 | + | } | |
132 | + | ||
133 | + | ||
134 | + | ||
135 | + | @Callable(k) | |
136 | + | func SwapAssetToXTNPairEntry (l) = { | |
137 | + | let C = toBase58String(k.caller.bytes) | |
138 | + | let X = if ((size(k.payments) == 1)) | |
139 | + | then k.payments[0] | |
140 | + | else throw("Whitelisted Token is required as Attached payment[1].") | |
141 | + | let D = getString(this, ("Pair_UV_" + l)) | |
142 | + | let Y = getIntegerValue(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
143 | + | let G = getIntegerValue(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
144 | + | let Z = fraction(Y, G, (G + X.amount)) | |
145 | + | let aa = (Y - Z) | |
146 | + | let ab = 5 | |
147 | + | let ac = h() | |
148 | + | let ad = ((aa * ab) / 1000) | |
149 | + | let ae = ((aa - ad) - ad) | |
150 | + | let af = { | |
151 | + | let Q = getInteger(this, ((("Total_Swap_Fee_Collected_" + l) + "_") + toBase58String(g))) | |
152 | + | if ($isInstanceOf(Q, "Int")) | |
110 | 153 | then { | |
111 | - | let | |
112 | - | | |
154 | + | let R = Q | |
155 | + | R | |
113 | 156 | } | |
114 | 157 | else 0 | |
115 | 158 | } | |
116 | - | let W = (V + 1) | |
159 | + | let ag = ((af + ad) + ad) | |
160 | + | let ah = { | |
161 | + | let Q = getInteger(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
162 | + | if ($isInstanceOf(Q, "Int")) | |
163 | + | then { | |
164 | + | let R = Q | |
165 | + | R | |
166 | + | } | |
167 | + | else 0 | |
168 | + | } | |
169 | + | let ai = (G + X.amount) | |
170 | + | let aj = { | |
171 | + | let Q = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
172 | + | if ($isInstanceOf(Q, "Int")) | |
173 | + | then { | |
174 | + | let R = Q | |
175 | + | R | |
176 | + | } | |
177 | + | else 0 | |
178 | + | } | |
179 | + | let ak = ((Y - aa) + ad) | |
180 | + | let al = { | |
181 | + | let Q = getIntegerValue(this, ("Total_of_Pair_Txns_" + l)) | |
182 | + | if ($isInstanceOf(Q, "Int")) | |
183 | + | then { | |
184 | + | let R = Q | |
185 | + | R | |
186 | + | } | |
187 | + | else 0 | |
188 | + | } | |
189 | + | let am = (al + 1) | |
117 | 190 | if ((l == toBase58String(g))) | |
118 | 191 | then throw("Input can Never be a XTN AssetID. Enter Whitelisted AssetID in input & Attach Whitelisted Asset as an attachment Token in payment[1].") | |
119 | - | else if (( | |
192 | + | else if ((D != l)) | |
120 | 193 | then throw("Pair is not available in Whitelisted Asset.") | |
121 | - | else if (( | |
194 | + | else if ((X.assetId == g)) | |
122 | 195 | then throw("You can't Attach XTN as an Attached Payment. Only Whitelisted Tokens are accepted.") | |
123 | - | else if (( | |
196 | + | else if ((X.assetId != fromBase58String(l))) | |
124 | 197 | then throw(("Incorrect asset attached, please attach or send " + l)) | |
125 | - | else if (( | |
198 | + | else if ((Y == 0)) | |
126 | 199 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
127 | 200 | else if ((G == 0)) | |
128 | 201 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
129 | - | else if ((100000 > | |
202 | + | else if ((100000 > aa)) | |
130 | 203 | then throw((("Your Attached Asset Amount is very low. Attach More " + l) + " Tokens to Claim the minimum Amount of 0.1 dollar atleast.")) | |
131 | - | else if (( | |
132 | - | then throw((("Pool Only has a Liquidity of " + toString(( | |
133 | - | else [IntegerEntry(((("Total_Swap_Fee_Collected_" + l) + "_") + toBase58String(g)), | |
204 | + | else if ((aa > Y)) | |
205 | + | then throw((("Pool Only has a Liquidity of " + toString((Y / pow(10, 0, 6, 0, 0, CEILING)))) + " XTN. Add Liquidity into Pool.")) | |
206 | + | else [IntegerEntry(((("Total_Swap_Fee_Collected_" + l) + "_") + toBase58String(g)), ag), IntegerEntry("Current_Day", ac), IntegerEntry(("Total_of_Pair_Txns_" + l), am), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), ai), IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), ak), ScriptTransfer(k.caller, ae, g), ScriptTransfer(d, fraction(ad, 1, 3), g), ScriptTransfer(e, fraction(ad, 1, 3), g), ScriptTransfer(f, fraction(ad, 1, 3), g)] | |
134 | 207 | } | |
135 | 208 | ||
136 | 209 | ||
137 | 210 | ||
138 | 211 | @Callable(k) | |
139 | 212 | func SwapXTNToAssetPairEntry (l) = { | |
140 | 213 | let C = toBase58String(k.caller.bytes) | |
141 | - | let | |
214 | + | let X = if ((size(k.payments) == 1)) | |
142 | 215 | then k.payments[0] | |
143 | 216 | else throw((("Only " + toBase58String(g)) + " XTN Token is required as an Attached payment[1].")) | |
144 | - | let | |
217 | + | let Y = getIntegerValue(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
145 | 218 | let G = getIntegerValue(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
146 | - | let | |
147 | - | let | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
155 | - | if ($isInstanceOf( | |
219 | + | let an = fraction(Y, G, (Y + X.amount)) | |
220 | + | let aa = (G - an) | |
221 | + | let D = getString(this, ("Pair_UV_" + l)) | |
222 | + | let ab = 5 | |
223 | + | let ac = h() | |
224 | + | let ad = ((aa * ab) / 1000) | |
225 | + | let ae = ((aa - ad) - ad) | |
226 | + | let ao = { | |
227 | + | let Q = getInteger(this, ("Total_Swap_Fee_Collected_" + l)) | |
228 | + | if ($isInstanceOf(Q, "Int")) | |
156 | 229 | then { | |
157 | - | let | |
158 | - | | |
230 | + | let R = Q | |
231 | + | R | |
159 | 232 | } | |
160 | 233 | else 0 | |
161 | 234 | } | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | if ($isInstanceOf( | |
235 | + | let ap = ((ao + ad) + ad) | |
236 | + | let ah = { | |
237 | + | let Q = getInteger(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
238 | + | if ($isInstanceOf(Q, "Int")) | |
166 | 239 | then { | |
167 | - | let | |
168 | - | | |
240 | + | let R = Q | |
241 | + | R | |
169 | 242 | } | |
170 | 243 | else 0 | |
171 | 244 | } | |
172 | - | let | |
173 | - | let | |
174 | - | let | |
175 | - | if ($isInstanceOf( | |
245 | + | let ai = ((G - aa) + ad) | |
246 | + | let aj = { | |
247 | + | let Q = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
248 | + | if ($isInstanceOf(Q, "Int")) | |
176 | 249 | then { | |
177 | - | let | |
178 | - | | |
250 | + | let R = Q | |
251 | + | R | |
179 | 252 | } | |
180 | 253 | else 0 | |
181 | 254 | } | |
182 | - | let | |
183 | - | let | |
184 | - | let | |
185 | - | if ($isInstanceOf( | |
255 | + | let ak = (Y + X.amount) | |
256 | + | let al = { | |
257 | + | let Q = getIntegerValue(this, ("Total_of_Pair_Txns_" + l)) | |
258 | + | if ($isInstanceOf(Q, "Int")) | |
186 | 259 | then { | |
187 | - | let | |
188 | - | | |
260 | + | let R = Q | |
261 | + | R | |
189 | 262 | } | |
190 | 263 | else 0 | |
191 | 264 | } | |
192 | - | let | |
193 | - | if (( | |
265 | + | let am = (al + 1) | |
266 | + | if ((D != l)) | |
194 | 267 | then throw("Pair is not available in Whitelisted Asset.") | |
195 | 268 | else if ((l == toBase58String(g))) | |
196 | 269 | then throw("Input can Never be a XTN AssetID. Enter Whitelisted AssetID in input & Attach XTN as an attachment Token in payment[1].") | |
197 | - | else if (( | |
270 | + | else if ((X.assetId != g)) | |
198 | 271 | then throw((("You can Attach " + toBase58String(g)) + " as an Attached Payment[1] to Swap XTN To Required Token. Any other asset else than XTN will be rejected.")) | |
199 | - | else if ((100000 > | |
272 | + | else if ((100000 > X.amount)) | |
200 | 273 | then throw("Your Attached XTN Amount is very low. Attach Atleast 0.1 XTN to Claim the minimum Tokens.") | |
201 | - | else if (( | |
274 | + | else if ((Y == 0)) | |
202 | 275 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
203 | 276 | else if ((G == 0)) | |
204 | 277 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
205 | - | else if (( | |
278 | + | else if ((aa > G)) | |
206 | 279 | then throw((("Pool Only has a Liquidity of " + toString(G)) + " Tokens. Add Liquidity into Pool.")) | |
207 | - | else [IntegerEntry(("Total_Swap_Fee_Collected_" + l), | |
280 | + | else [IntegerEntry(("Total_Swap_Fee_Collected_" + l), ap), IntegerEntry("Current_Day", ac), IntegerEntry(("Total_of_Pair_Txns_" + l), am), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), ai), IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), ak), ScriptTransfer(k.caller, ae, fromBase58String(l)), ScriptTransfer(d, fraction(ad, 1, 3), fromBase58String(l)), ScriptTransfer(e, fraction(ad, 1, 3), fromBase58String(l)), ScriptTransfer(f, fraction(ad, 1, 3), fromBase58String(l))] | |
208 | 281 | } | |
209 | 282 | ||
210 | 283 | ||
211 | 284 | ||
212 | 285 | @Callable(k) | |
213 | 286 | func AddLiquidity (l) = { | |
214 | 287 | let C = toBase58String(k.caller.bytes) | |
215 | 288 | let m = value(k.payments[0]) | |
216 | 289 | let n = value(k.payments[1]) | |
217 | - | let | |
218 | - | let | |
219 | - | let | |
290 | + | let D = getString(this, ("Pair_UV_" + l)) | |
291 | + | let E = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + l)), "LP Token is Missing or May be not Generated.")) | |
292 | + | let Y = getIntegerValue(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
220 | 293 | let G = getIntegerValue(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
221 | - | let | |
222 | - | let v = | |
294 | + | let H = valueOrErrorMessage(assetInfo(fromBase58String(l)), (("Asset " + l) + " doesn't exist")) | |
295 | + | let v = H.decimals | |
223 | 296 | let w = fraction((v + 6), 1, 2) | |
224 | 297 | let x = (1 * pow(10, 0, w, 0, 0, CEILING)) | |
225 | 298 | let y = fraction(m.amount, n.amount, x) | |
226 | 299 | let z = sqrt(y, w, w, CEILING) | |
227 | - | let ac = { | |
228 | - | let O = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
229 | - | if ($isInstanceOf(O, "Int")) | |
300 | + | let aq = pow(10, 0, v, 0, 0, CEILING) | |
301 | + | let ar = fraction(Y, aq, G) | |
302 | + | let as = { | |
303 | + | let Q = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
304 | + | if ($isInstanceOf(Q, "Int")) | |
230 | 305 | then { | |
231 | - | let | |
232 | - | | |
306 | + | let R = Q | |
307 | + | R | |
233 | 308 | } | |
234 | 309 | else 0 | |
235 | 310 | } | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | if ($isInstanceOf( | |
311 | + | let at = (as + n.amount) | |
312 | + | let T = { | |
313 | + | let Q = getInteger(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
314 | + | if ($isInstanceOf(Q, "Int")) | |
240 | 315 | then { | |
241 | - | let | |
242 | - | | |
316 | + | let R = Q | |
317 | + | R | |
243 | 318 | } | |
244 | 319 | else 0 | |
245 | 320 | } | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | if ($isInstanceOf( | |
321 | + | let U = (T + m.amount) | |
322 | + | let V = { | |
323 | + | let Q = getIntegerValue(this, ("Total_LP_" + l)) | |
324 | + | if ($isInstanceOf(Q, "Int")) | |
250 | 325 | then { | |
251 | - | let | |
252 | - | | |
326 | + | let R = Q | |
327 | + | R | |
253 | 328 | } | |
254 | 329 | else 0 | |
255 | 330 | } | |
256 | - | let | |
257 | - | if (( | |
331 | + | let W = (V + z) | |
332 | + | if ((D != l)) | |
258 | 333 | then throw("Pair is not available in Whitelisted Asset.") | |
259 | 334 | else if ((l == toBase58String(g))) | |
260 | 335 | then throw("Input can Never be a XTN AssetID. Enter Whitelisted AssetID in input as well as in payment[1] & Attach XTN as an attachment Token in payment[2].") | |
261 | 336 | else if ((size(k.payments) != 2)) | |
262 | 337 | then throw("Two attached assets are expected in payment. Kindly Attach payment1 = Token you want to add for Liquidity & payment2 = Amount of XTN Token.") | |
263 | 338 | else if ((m.assetId == g)) | |
264 | 339 | then throw("You Attached XTN asset in payment[1], please attach only whitelisted Token in payment[1] along with XTN in payment[2].") | |
265 | 340 | else if ((m.assetId != fromBase58String(l))) | |
266 | 341 | then throw("Incorrect asset attached for Liquidity in payment[1], please attach String Asset or Whitelisted Token only.") | |
267 | 342 | else if ((n.assetId != g)) | |
268 | 343 | then throw("Wrong Asset Attached in payments[2], Please attach payment[1] = Liquidity Token & payment[2] = XTN Token.") | |
269 | 344 | else if ((100000 > n.amount)) | |
270 | 345 | then throw("please attach atleast 0.1 XTN in payment[2] & Equivalent worth of Token in payment[1]") | |
271 | 346 | else if ((1 > z)) | |
272 | 347 | then throw("LP Token Outcome is going below 1 in Fractional. Please Attach more amount.") | |
273 | - | else [IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), | |
348 | + | else [IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), at), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), U), IntegerEntry(("Total_LP_" + l), W), IntegerEntry("Token_Price", ar), Reissue(E, z, true), ScriptTransfer(k.caller, z, E)] | |
274 | 349 | } | |
275 | 350 | ||
276 | 351 | ||
277 | 352 | ||
278 | 353 | @Callable(k) | |
279 | 354 | func RemoveLiquidity (l) = { | |
280 | 355 | let C = toBase58String(k.caller.bytes) | |
281 | - | let | |
356 | + | let X = if ((size(k.payments) == 1)) | |
282 | 357 | then k.payments[0] | |
283 | 358 | else throw("No payment attached, Please Attach LP Token as payment[1].") | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | let v = | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
359 | + | let D = getString(this, ("Pair_UV_" + l)) | |
360 | + | let au = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + l)), "LP Token is Missing or not Generated.")) | |
361 | + | let H = valueOrErrorMessage(assetInfo(fromBase58String(l)), (("Asset " + l) + " doesn't exist")) | |
362 | + | let v = H.decimals | |
363 | + | let L = (6 + v) | |
364 | + | let M = (L / 2) | |
365 | + | let av = getIntegerValue(this, ("Total_LP_" + l)) | |
366 | + | let aw = pow(fraction(X.amount, pow(10, 0, 8, 0, 0, CEILING), av), 6, 1, 0, 6, CEILING) | |
367 | + | let Y = getIntegerValue(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
293 | 368 | let G = getIntegerValue(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | if ($isInstanceOf( | |
369 | + | let ax = fraction(Y, aw, pow(10, 0, 8, 0, 0, CEILING)) | |
370 | + | let ay = fraction(G, aw, pow(10, 0, 8, 0, 0, CEILING)) | |
371 | + | let as = { | |
372 | + | let Q = getInteger(this, ((("Balance_of_" + l) + "_") + toBase58String(g))) | |
373 | + | if ($isInstanceOf(Q, "Int")) | |
299 | 374 | then { | |
300 | - | let | |
301 | - | | |
375 | + | let R = Q | |
376 | + | R | |
302 | 377 | } | |
303 | 378 | else 0 | |
304 | 379 | } | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | if ($isInstanceOf( | |
380 | + | let at = (as - ax) | |
381 | + | let T = { | |
382 | + | let Q = getInteger(this, ((("Balance_of_" + toBase58String(g)) + "_") + l)) | |
383 | + | if ($isInstanceOf(Q, "Int")) | |
309 | 384 | then { | |
310 | - | let | |
311 | - | | |
385 | + | let R = Q | |
386 | + | R | |
312 | 387 | } | |
313 | 388 | else 0 | |
314 | 389 | } | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | if ($isInstanceOf( | |
390 | + | let U = (T - ay) | |
391 | + | let V = { | |
392 | + | let Q = getIntegerValue(this, ("Total_LP_" + l)) | |
393 | + | if ($isInstanceOf(Q, "Int")) | |
319 | 394 | then { | |
320 | - | let | |
321 | - | | |
395 | + | let R = Q | |
396 | + | R | |
322 | 397 | } | |
323 | 398 | else 0 | |
324 | 399 | } | |
325 | - | let | |
326 | - | if (( | |
400 | + | let W = (V - X.amount) | |
401 | + | if ((D != l)) | |
327 | 402 | then throw("Pair is not available in Whitelist.") | |
328 | 403 | else if ((fromBase58String(l) == g)) | |
329 | 404 | then throw("Don't choose XTN AssetID as Input, Only Whitelisted Asset as Input String & Attach LP Tokens as payment[1]") | |
330 | - | else if (( | |
405 | + | else if ((X.assetId != au)) | |
331 | 406 | then throw("Wrong Asset is attached in payment[1] or LP Token Not Found or Missing.") | |
332 | - | else if ((1 > | |
407 | + | else if ((1 > aw)) | |
333 | 408 | then throw("Your LP Token amount % is very low to convert.") | |
334 | - | else if ((1 > | |
409 | + | else if ((1 > ax)) | |
335 | 410 | then throw("Your LP Token conversion amount is very low to convert or less than 0.000001 XTN.") | |
336 | - | else if ((1 > | |
411 | + | else if ((1 > ay)) | |
337 | 412 | then throw("Your LP Token conversion amount is very low to convert or less than fraction value of Token.") | |
338 | - | else [IntegerEntry("Withdraw_LP_Percentage", | |
413 | + | else [IntegerEntry("Withdraw_LP_Percentage", aw), Burn(au, X.amount), IntegerEntry(("Total_LP_" + l), W), IntegerEntry(((("Balance_of_" + l) + "_") + toBase58String(g)), at), IntegerEntry(((("Balance_of_" + toBase58String(g)) + "_") + l), U), ScriptTransfer(k.caller, ax, g), ScriptTransfer(k.caller, ay, fromBase58String(l))] | |
339 | 414 | } | |
340 | 415 | ||
341 | 416 | ||
342 | - | @Verifier( | |
343 | - | func | |
417 | + | @Verifier(az) | |
418 | + | func aA () = sigVerify(az.bodyBytes, az.proofs[0], az.senderPublicKey) | |
344 | 419 |
github/deemru/w8io/169f3d6 189.75 ms ◑