tx · GADbVoVcXEzVvRjBXs1dqJdYCqk7KGnMrdPLNixo71oE 3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW: -0.01400000 Waves 2021.07.16 17:16 [1616269] smart account 3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW > SELF 0.00000000 Waves
{ "type": 13, "id": "GADbVoVcXEzVvRjBXs1dqJdYCqk7KGnMrdPLNixo71oE", "fee": 1400000, "feeAssetId": null, "timestamp": 1626445000013, "version": 2, "chainId": 84, "sender": "3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW", "senderPublicKey": "DfbjpZJBbZwnUKysUkxCbWTE1ZWuoUb6Y6BZdu5iAE8j", "proofs": [ "5A7zqAB1S7yCjQVNGacwLPYmctgYXUmNhAmH2912oT9XW6C9DrcPQ7S9zZVMFQNvsdDS4kYfcAn82eq21sVrxB7b", "4gnnCv8w8NJKcC4aGN8ZPGcXu9pXoqLrCwDpfoErSsMVnHGJGoaMBgS4ai1XbCwZqHanvBvXZCURJjwMUNzeAW4u" ], "script": "base64:AAIFAAAAAAAAACAIAhIAEgMKAQESBAoCAQESABIECgIBARIAEgASAwoBAQAAAEwAAAAAB3ZlcnNpb24CAAAABTIuMC4wAAAAAAhrVmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAHa0FjdGl2ZQIAAAAGYWN0aXZlAAAAAAlrQXNzZXRJZEECAAAACkFfYXNzZXRfaWQAAAAACWtBc3NldElkQgIAAAAKQl9hc3NldF9pZAAAAAAJa0JhbGFuY2VBAgAAAA9BX2Fzc2V0X2JhbGFuY2UAAAAACWtCYWxhbmNlQgIAAAAPQl9hc3NldF9iYWxhbmNlAAAAAA1rU2hhcmVBc3NldElkAgAAAA5zaGFyZV9hc3NldF9pZAAAAAARa1NoYXJlQXNzZXRTdXBwbHkCAAAAEnNoYXJlX2Fzc2V0X3N1cHBseQAAAAAEa0ZlZQIAAAAKY29tbWlzc2lvbgAAAAASa0ZlZVNjYWxlRGVsaW1pdGVyAgAAABpjb21ta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nByb29mcwAAAAAAAAAAAQUAAAAEYWRtMgAAAAAAAAAAAQAAAAAAAAAAAAQAAAAKYWRtM1NpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAARhZG0zAAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAAAphZG0xU2lnbmVkBQAAAAphZG0yU2lnbmVkBQAAAAphZG0zU2lnbmVkAAAAAAAAAAACPWbLFg==", "height": 1616269, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6UaHeWxEAx8XJ8ybNvPUp9RuJDRBhVxqNJdMQAbpQnen Next: BHvH5taeqL5X55pg7EeSSuZVnBXFB7xbC6mPhodf7QPF Diff:
Old | New | Differences | |
---|---|---|---|
592 | 592 | then (assetIdA == USDN) | |
593 | 593 | else false) | |
594 | 594 | then true | |
595 | - | else if ((assetIdB == USDN)) | |
595 | + | else if (if ((assetIdB == USDN)) | |
596 | + | then (size(inv.payments) == 1) | |
597 | + | else false) | |
596 | 598 | then (inv.payments[0].assetId == USDN) | |
597 | 599 | else false | |
598 | 600 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adm1)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = "2.0.0" | |
5 | 5 | ||
6 | 6 | let kVersion = "version" | |
7 | 7 | ||
8 | 8 | let kActive = "active" | |
9 | 9 | ||
10 | 10 | let kAssetIdA = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let kAssetIdB = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let kBalanceA = "A_asset_balance" | |
15 | 15 | ||
16 | 16 | let kBalanceB = "B_asset_balance" | |
17 | 17 | ||
18 | 18 | let kShareAssetId = "share_asset_id" | |
19 | 19 | ||
20 | 20 | let kShareAssetSupply = "share_asset_supply" | |
21 | 21 | ||
22 | 22 | let kFee = "commission" | |
23 | 23 | ||
24 | 24 | let kFeeScaleDelimiter = "commission_scale_delimiter" | |
25 | 25 | ||
26 | 26 | let kInvariant = "invariant" | |
27 | 27 | ||
28 | 28 | let kCause = "shutdown_cause" | |
29 | 29 | ||
30 | 30 | let keyAdminPubKey1 = "admin_pub_1" | |
31 | 31 | ||
32 | 32 | let keyAdminPubKey2 = "admin_pub_2" | |
33 | 33 | ||
34 | 34 | let keyAdminPubKey3 = "admin_pub_3" | |
35 | 35 | ||
36 | 36 | let USDNToWavesExchanger = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37') | |
37 | 37 | ||
38 | 38 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
39 | 39 | ||
40 | 40 | func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) { | |
41 | 41 | case string: String => | |
42 | 42 | fromBase58String(string) | |
43 | 43 | case nothing => | |
44 | 44 | throw("Admin public key is empty") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let adm1 = getAdminPub(keyAdminPubKey1) | |
49 | 49 | ||
50 | 50 | let adm2 = getAdminPub(keyAdminPubKey2) | |
51 | 51 | ||
52 | 52 | let adm3 = getAdminPub(keyAdminPubKey3) | |
53 | 53 | ||
54 | 54 | let admStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
55 | 55 | ||
56 | 56 | let admStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
57 | 57 | ||
58 | 58 | let govAddr = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
59 | 59 | ||
60 | 60 | let stakingAddress = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg') | |
61 | 61 | ||
62 | 62 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
63 | 63 | ||
64 | 64 | let stakingFeeInUSDN = 270000 | |
65 | 65 | ||
66 | 66 | let isActive = getBooleanValue(this, kActive) | |
67 | 67 | ||
68 | 68 | let strAssetIdA = getStringValue(this, kAssetIdA) | |
69 | 69 | ||
70 | 70 | let strAssetIdB = getStringValue(this, kAssetIdB) | |
71 | 71 | ||
72 | 72 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
73 | 73 | then unit | |
74 | 74 | else fromBase58String(strAssetIdA) | |
75 | 75 | ||
76 | 76 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
77 | 77 | then unit | |
78 | 78 | else fromBase58String(strAssetIdB) | |
79 | 79 | ||
80 | 80 | let assetNameA = match assetIdA { | |
81 | 81 | case id: ByteVector => | |
82 | 82 | value(assetInfo(id)).name | |
83 | 83 | case waves: Unit => | |
84 | 84 | "WAVES" | |
85 | 85 | case _ => | |
86 | 86 | throw("Match error") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | let assetNameB = match assetIdB { | |
90 | 90 | case id: ByteVector => | |
91 | 91 | value(assetInfo(id)).name | |
92 | 92 | case waves: Unit => | |
93 | 93 | "WAVES" | |
94 | 94 | case _ => | |
95 | 95 | throw("Match error") | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | let balanceA = getIntegerValue(this, kBalanceA) | |
99 | 99 | ||
100 | 100 | let balanceB = getIntegerValue(this, kBalanceB) | |
101 | 101 | ||
102 | 102 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
103 | 103 | ||
104 | 104 | let shareAssetSupply = getIntegerValue(this, kShareAssetSupply) | |
105 | 105 | ||
106 | 106 | let invariant = getIntegerValue(this, kInvariant) | |
107 | 107 | ||
108 | 108 | let fee = 500 | |
109 | 109 | ||
110 | 110 | let feeGovernance = 200 | |
111 | 111 | ||
112 | 112 | let feeScale6 = 1000000 | |
113 | 113 | ||
114 | 114 | let scale3 = 1000 | |
115 | 115 | ||
116 | 116 | let scale8 = 100000000 | |
117 | 117 | ||
118 | 118 | let scale12 = 1000000000000 | |
119 | 119 | ||
120 | 120 | let slippageScale3 = 1000 | |
121 | 121 | ||
122 | 122 | let digits8 = 8 | |
123 | 123 | ||
124 | 124 | let dAppThreshold = 50 | |
125 | 125 | ||
126 | 126 | let dAppThresholdScale2 = 100 | |
127 | 127 | ||
128 | 128 | let exchangeRatioLimitMin = 90000000 | |
129 | 129 | ||
130 | 130 | let exchangeRatioLimitMax = 110000000 | |
131 | 131 | ||
132 | 132 | let alpha = 50 | |
133 | 133 | ||
134 | 134 | let alphaDigits = 2 | |
135 | 135 | ||
136 | 136 | let beta = 46000000 | |
137 | 137 | ||
138 | 138 | func accountBalance (assetId) = match assetId { | |
139 | 139 | case id: ByteVector => | |
140 | 140 | assetBalance(this, id) | |
141 | 141 | case waves: Unit => | |
142 | 142 | wavesBalance(this).available | |
143 | 143 | case _ => | |
144 | 144 | throw("Match error") | |
145 | 145 | } | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | let stakedAmountUSDN = match getInteger(stakingAddress, ((("rpd_balance_" + toBase58String(USDN)) + "_") + toString(this))) { | |
149 | 149 | case staked: Int => | |
150 | 150 | staked | |
151 | 151 | case nothing: Unit => | |
152 | 152 | 0 | |
153 | 153 | case _ => | |
154 | 154 | throw("Match error") | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | let availableBalanceA = (balanceA - (if ((assetIdA == USDN)) | |
158 | 158 | then stakedAmountUSDN | |
159 | 159 | else 0)) | |
160 | 160 | ||
161 | 161 | let availableBalanceB = (balanceB - (if ((assetIdB == USDN)) | |
162 | 162 | then stakedAmountUSDN | |
163 | 163 | else 0)) | |
164 | 164 | ||
165 | 165 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + (if ((assetIdA == USDN)) | |
166 | 166 | then stakedAmountUSDN | |
167 | 167 | else 0)) | |
168 | 168 | ||
169 | 169 | let accountBalanceWithStakedB = (accountBalance(assetIdB) + (if ((assetIdB == USDN)) | |
170 | 170 | then stakedAmountUSDN | |
171 | 171 | else 0)) | |
172 | 172 | ||
173 | 173 | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
174 | 174 | then (accountBalanceWithStakedB >= balanceB) | |
175 | 175 | else false | |
176 | 176 | ||
177 | 177 | func skewness (x,y) = (((fraction(scale12, x, y) + fraction(scale12, y, x)) / 2) / 10000) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func invariantCalc (x,y) = { | |
181 | 181 | let sk = skewness(x, y) | |
182 | 182 | (fraction((x + y), scale8, pow(sk, digits8, alpha, alphaDigits, digits8, CEILING)) + (2 * fraction(pow(fraction(x, y, scale8), 0, 5, 1, (digits8 / 2), DOWN), pow((sk - beta), digits8, alpha, alphaDigits, digits8, DOWN), scale8))) | |
183 | 183 | } | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func calculateSendAmount (amountToSendEstimated,minTokenReceiveAmount,tokenReceiveAmount,tokenId) = { | |
187 | 187 | let slippageValue = (scale8 - ((scale8 * 1) / 10000000)) | |
188 | 188 | let deltaBetweenMaxAndMinSendValue = (amountToSendEstimated - minTokenReceiveAmount) | |
189 | 189 | let x = (balanceA + tokenReceiveAmount) | |
190 | 190 | let y = (balanceB + tokenReceiveAmount) | |
191 | 191 | let invariantNew = if ((tokenId == assetIdA)) | |
192 | 192 | then invariantCalc(x, (balanceB - amountToSendEstimated)) | |
193 | 193 | else if ((tokenId == assetIdB)) | |
194 | 194 | then invariantCalc((balanceA - amountToSendEstimated), y) | |
195 | 195 | else throw("Wrong asset in payment") | |
196 | 196 | let invariantEstimatedRatio = fraction(scale8, invariant, invariantNew) | |
197 | 197 | func getStepAmount (acc,step) = if ((acc == -1)) | |
198 | 198 | then { | |
199 | 199 | let amountToSend = (amountToSendEstimated - ((step * deltaBetweenMaxAndMinSendValue) / 5)) | |
200 | 200 | let stepInvariant = if ((tokenId == assetIdA)) | |
201 | 201 | then invariantCalc(x, (balanceB - amountToSend)) | |
202 | 202 | else invariantCalc((balanceA - amountToSend), y) | |
203 | 203 | if ((stepInvariant > invariant)) | |
204 | 204 | then amountToSend | |
205 | 205 | else -1 | |
206 | 206 | } | |
207 | 207 | else acc | |
208 | 208 | ||
209 | 209 | let stepAmount = { | |
210 | 210 | let $list60256068 = [1, 2, 3, 4, 5] | |
211 | 211 | let $size60256068 = size($list60256068) | |
212 | 212 | let $acc060256068 = -1 | |
213 | 213 | if (($size60256068 == 0)) | |
214 | 214 | then $acc060256068 | |
215 | 215 | else { | |
216 | 216 | let $acc160256068 = getStepAmount($acc060256068, $list60256068[0]) | |
217 | 217 | if (($size60256068 == 1)) | |
218 | 218 | then $acc160256068 | |
219 | 219 | else { | |
220 | 220 | let $acc260256068 = getStepAmount($acc160256068, $list60256068[1]) | |
221 | 221 | if (($size60256068 == 2)) | |
222 | 222 | then $acc260256068 | |
223 | 223 | else { | |
224 | 224 | let $acc360256068 = getStepAmount($acc260256068, $list60256068[2]) | |
225 | 225 | if (($size60256068 == 3)) | |
226 | 226 | then $acc360256068 | |
227 | 227 | else { | |
228 | 228 | let $acc460256068 = getStepAmount($acc360256068, $list60256068[3]) | |
229 | 229 | if (($size60256068 == 4)) | |
230 | 230 | then $acc460256068 | |
231 | 231 | else { | |
232 | 232 | let $acc560256068 = getStepAmount($acc460256068, $list60256068[4]) | |
233 | 233 | if (($size60256068 == 5)) | |
234 | 234 | then $acc560256068 | |
235 | 235 | else { | |
236 | 236 | let $acc660256068 = getStepAmount($acc560256068, $list60256068[5]) | |
237 | 237 | throw("List size exceed 5") | |
238 | 238 | } | |
239 | 239 | } | |
240 | 240 | } | |
241 | 241 | } | |
242 | 242 | } | |
243 | 243 | } | |
244 | 244 | } | |
245 | 245 | if ((0 > stepAmount)) | |
246 | 246 | then throw("something went wrong while working with amountToSend") | |
247 | 247 | else if (if ((invariantEstimatedRatio > slippageValue)) | |
248 | 248 | then (invariantNew > invariant) | |
249 | 249 | else false) | |
250 | 250 | then amountToSendEstimated | |
251 | 251 | else stepAmount | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func getAssetInfo (assetId) = match assetId { | |
256 | 256 | case id: ByteVector => | |
257 | 257 | let stringId = toBase58String(id) | |
258 | 258 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
259 | 259 | $Tuple3(stringId, info.name, info.decimals) | |
260 | 260 | case waves: Unit => | |
261 | 261 | $Tuple3("WAVES", "WAVES", 8) | |
262 | 262 | case _ => | |
263 | 263 | throw("Match error") | |
264 | 264 | } | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func deductStakingFee (amount,assetId) = if ((assetId == USDN)) | |
271 | 271 | then { | |
272 | 272 | let result = (amount - stakingFeeInUSDN) | |
273 | 273 | if ((0 >= result)) | |
274 | 274 | then throw((((("Insufficient amount " + toString(amount)) + " to deduct staking fee ") + toString(stakingFeeInUSDN)) + " USD-N")) | |
275 | 275 | else result | |
276 | 276 | } | |
277 | 277 | else amount | |
278 | 278 | ||
279 | 279 | ||
280 | 280 | func throwIsActive () = throw("DApp is already active") | |
281 | 281 | ||
282 | 282 | ||
283 | 283 | func throwIsInactive () = throw("DApp is inactive at this moment") | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | func throwOnlyAdmin () = throw("Only admin can call this function") | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | func throwAssets () = throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
290 | 290 | ||
291 | 291 | ||
292 | 292 | func throwThreshold (threshold,amountA,amountB) = throw(((((((((("New balance in assets of the DApp is less than threshold " + toString(threshold)) + ": ") + toString(amountA)) + " ") + assetNameA) + ", ") + toString(amountB)) + " ") + assetNameB)) | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | func throwInsufficientAvailableBalance (amount,available,assetName) = throw((((((((("Insufficient DApp balance to pay " + toString(amount)) + " ") + assetName) + " due to staking. Available: ") + toString(available)) + " ") + assetName) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
296 | 296 | ||
297 | 297 | ||
298 | 298 | func throwInsufficientAvailableBalances (amountA,amountB) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(amountA)) + " ") + assetNameA) + " and ") + toString(amountB)) + " ") + assetNameB) + " due to staking. Available: ") + toString(availableBalanceA)) + " ") + assetNameA) + " and ") + toString(availableBalanceB)) + " ") + assetNameB) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
299 | 299 | ||
300 | 300 | ||
301 | 301 | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | @Callable(i) | |
305 | 305 | func init () = { | |
306 | 306 | let $t087448821 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
307 | 307 | let pmtAmountA = $t087448821._1 | |
308 | 308 | let pmtAssetIdA = $t087448821._2 | |
309 | 309 | let $t088268903 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
310 | 310 | let pmtAmountB = $t088268903._1 | |
311 | 311 | let pmtAssetIdB = $t088268903._2 | |
312 | 312 | let $t089088985 = getAssetInfo(pmtAssetIdA) | |
313 | 313 | let pmtStrAssetIdA = $t089088985._1 | |
314 | 314 | let pmtAssetNameA = $t089088985._2 | |
315 | 315 | let pmtDecimalsA = $t089088985._3 | |
316 | 316 | let $t089909067 = getAssetInfo(pmtAssetIdB) | |
317 | 317 | let pmtStrAssetIdB = $t089909067._1 | |
318 | 318 | let pmtAssetNameB = $t089909067._2 | |
319 | 319 | let pmtDecimalsB = $t089909067._3 | |
320 | 320 | if (isDefined(getBoolean(this, kActive))) | |
321 | 321 | then throwIsActive() | |
322 | 322 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
323 | 323 | then throw("Assets must be different") | |
324 | 324 | else { | |
325 | 325 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
326 | 326 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
327 | 327 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
328 | 328 | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
329 | 329 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
330 | 330 | let shareIssueId = calculateAssetId(shareIssue) | |
331 | 331 | let invariantCalculated = invariantCalc(pmtAmountA, pmtAmountB) | |
332 | 332 | [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kInvariant, invariantCalculated), IntegerEntry(kFee, fee), IntegerEntry(kFeeScaleDelimiter, feeScale6), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
333 | 333 | } | |
334 | 334 | } | |
335 | 335 | ||
336 | 336 | ||
337 | 337 | ||
338 | 338 | @Callable(i) | |
339 | 339 | func replenishWithTwoTokens (slippageTolerance) = { | |
340 | 340 | let pmtAssetIdA = i.payments[0].assetId | |
341 | 341 | let pmtAssetIdB = i.payments[1].assetId | |
342 | 342 | let pmtAmountA = deductStakingFee(i.payments[0].amount, pmtAssetIdA) | |
343 | 343 | let pmtAmountB = deductStakingFee(i.payments[1].amount, pmtAssetIdB) | |
344 | 344 | let tokenRatio = fraction(fraction(scale8, balanceA, pmtAmountA), scale3, fraction(scale8, balanceB, pmtAmountB)) | |
345 | 345 | let ratioShareTokensInA = fraction(scale8, pmtAmountA, balanceA) | |
346 | 346 | let ratioShareTokensInB = fraction(scale8, pmtAmountB, balanceB) | |
347 | 347 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8) | |
348 | 348 | let invariantCalculated = invariantCalc((balanceA + pmtAmountA), (balanceB + pmtAmountB)) | |
349 | 349 | if (!(isActive)) | |
350 | 350 | then throwIsInactive() | |
351 | 351 | else if (if ((0 > slippageTolerance)) | |
352 | 352 | then true | |
353 | 353 | else (slippageTolerance > 10)) | |
354 | 354 | then throw("Slippage tolerance must be <= 1%") | |
355 | 355 | else if ((size(i.payments) != 2)) | |
356 | 356 | then throw("Two attached assets expected") | |
357 | 357 | else if (if ((pmtAssetIdA != assetIdA)) | |
358 | 358 | then true | |
359 | 359 | else (pmtAssetIdB != assetIdB)) | |
360 | 360 | then throwAssets() | |
361 | 361 | else if (if ((((scale3 * (slippageScale3 - slippageTolerance)) / slippageScale3) > tokenRatio)) | |
362 | 362 | then true | |
363 | 363 | else (tokenRatio > ((scale3 * (slippageScale3 + slippageTolerance)) / slippageScale3))) | |
364 | 364 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
365 | 365 | else if ((shareTokenToPayAmount == 0)) | |
366 | 366 | then throw("Too small amount to replenish") | |
367 | 367 | else if (!(hasEnoughBalance)) | |
368 | 368 | then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious()) | |
369 | 369 | else [IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), IntegerEntry(kInvariant, invariantCalculated), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
370 | 370 | } | |
371 | 371 | ||
372 | 372 | ||
373 | 373 | ||
374 | 374 | @Callable(i) | |
375 | 375 | func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = { | |
376 | 376 | let $t01341013485 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
377 | 377 | let pmtAmount = $t01341013485._1 | |
378 | 378 | let pmtAssetId = $t01341013485._2 | |
379 | 379 | let pmtMinThreshold = 5000000 | |
380 | 380 | let thresholdValueForMinTolerance = 50000000 | |
381 | 381 | let tolerance = if ((thresholdValueForMinTolerance > pmtAmount)) | |
382 | 382 | then 100000 | |
383 | 383 | else 1 | |
384 | 384 | let slippageValueMinForReplenish = (scale8 - ((scale8 * tolerance) / 10000000)) | |
385 | 385 | let slippageValueMaxForReplenish = (scale8 + ((scale8 * tolerance) / 10000000)) | |
386 | 386 | let slippageValueMinForSwap = (scale8 - ((scale8 * 1) / 10000000)) | |
387 | 387 | if (!(isActive)) | |
388 | 388 | then throwIsInactive() | |
389 | 389 | else if ((pmtMinThreshold > pmtAmount)) | |
390 | 390 | then throw((((("Payment amount " + toString(pmtAmount)) + " does not exceed the minimum amount of ") + toString(pmtMinThreshold)) + " tokens")) | |
391 | 391 | else if ((size(i.payments) != 1)) | |
392 | 392 | then throw("One attached payment expected") | |
393 | 393 | else if (!(hasEnoughBalance)) | |
394 | 394 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
395 | 395 | else if (if ((pmtAssetId != assetIdA)) | |
396 | 396 | then (pmtAssetId != assetIdB) | |
397 | 397 | else false) | |
398 | 398 | then throwAssets() | |
399 | 399 | else { | |
400 | 400 | let $t01449715262 = if ((pmtAssetId == assetIdA)) | |
401 | 401 | then $Tuple7((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), invariantCalc((balanceA + pmtAmount), balanceB), (balanceA + pmtAmount), balanceB) | |
402 | 402 | else $Tuple7(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), invariantCalc(balanceA, (balanceB + pmtAmount)), balanceA, (balanceB + pmtAmount)) | |
403 | 403 | let virtualReplenishA = $t01449715262._1 | |
404 | 404 | let virtualReplenishB = $t01449715262._2 | |
405 | 405 | let balanceAfterSwapA = $t01449715262._3 | |
406 | 406 | let balanceAfterSwapB = $t01449715262._4 | |
407 | 407 | let invariantCalculated = $t01449715262._5 | |
408 | 408 | let newBalanceA = $t01449715262._6 | |
409 | 409 | let newBalanceB = $t01449715262._7 | |
410 | 410 | let newBalanceEntry = if ((pmtAssetId == assetIdA)) | |
411 | 411 | then IntegerEntry(kBalanceA, newBalanceA) | |
412 | 412 | else IntegerEntry(kBalanceB, newBalanceB) | |
413 | 413 | let invariantNew = invariantCalc(balanceAfterSwapA, balanceAfterSwapB) | |
414 | 414 | let invariantEstimatedRatio = fraction(scale8, invariant, invariantNew) | |
415 | 415 | let ratioVirtualBalanceToVirtualReplenish = (fraction((scale8 * scale8), balanceAfterSwapA, balanceAfterSwapB) / fraction(scale8, virtualReplenishA, virtualReplenishB)) | |
416 | 416 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
417 | 417 | if (if ((slippageValueMinForSwap >= invariantEstimatedRatio)) | |
418 | 418 | then true | |
419 | 419 | else (invariant > invariantNew)) | |
420 | 420 | then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value") | |
421 | 421 | else if (if ((slippageValueMinForReplenish > ratioVirtualBalanceToVirtualReplenish)) | |
422 | 422 | then true | |
423 | 423 | else (ratioVirtualBalanceToVirtualReplenish > slippageValueMaxForReplenish)) | |
424 | 424 | then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect") | |
425 | 425 | else if (if ((dAppThresholdAmount > newBalanceA)) | |
426 | 426 | then true | |
427 | 427 | else (dAppThresholdAmount > newBalanceB)) | |
428 | 428 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
429 | 429 | else { | |
430 | 430 | let ratioShareTokensInA = fraction(deductStakingFee(virtualReplenishA, assetIdA), scale8, balanceAfterSwapA) | |
431 | 431 | let ratioShareTokensInB = fraction(deductStakingFee(virtualReplenishB, assetIdB), scale8, balanceAfterSwapB) | |
432 | 432 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8) | |
433 | 433 | [Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), newBalanceEntry, IntegerEntry(kInvariant, invariantCalculated)] | |
434 | 434 | } | |
435 | 435 | } | |
436 | 436 | } | |
437 | 437 | ||
438 | 438 | ||
439 | 439 | ||
440 | 440 | @Callable(i) | |
441 | 441 | func withdraw () = { | |
442 | 442 | let $t01740717550 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
443 | 443 | let pmtAmount = $t01740717550._1 | |
444 | 444 | let pmtAssetId = $t01740717550._2 | |
445 | 445 | let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA) | |
446 | 446 | let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB) | |
447 | 447 | let invariantCalculated = invariantCalc((balanceA - amountToPayA), (balanceB - amountToPayB)) | |
448 | 448 | if (!(isActive)) | |
449 | 449 | then throwIsInactive() | |
450 | 450 | else if ((size(i.payments) != 1)) | |
451 | 451 | then throw("One attached payment expected") | |
452 | 452 | else if ((pmtAssetId != shareAssetId)) | |
453 | 453 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
454 | 454 | else if (!(hasEnoughBalance)) | |
455 | 455 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
456 | 456 | else if (if ((amountToPayA > availableBalanceA)) | |
457 | 457 | then true | |
458 | 458 | else (amountToPayB > availableBalanceB)) | |
459 | 459 | then throwInsufficientAvailableBalances(amountToPayA, amountToPayB) | |
460 | 460 | else [IntegerEntry(kBalanceA, (balanceA - amountToPayA)), IntegerEntry(kBalanceB, (balanceB - amountToPayB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply - pmtAmount)), IntegerEntry(kInvariant, invariantCalculated), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)] | |
461 | 461 | } | |
462 | 462 | ||
463 | 463 | ||
464 | 464 | ||
465 | 465 | @Callable(i) | |
466 | 466 | func exchange (estimatedAmountToReceive,minAmountToReceive) = { | |
467 | 467 | let $t01890818983 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
468 | 468 | let pmtAmount = $t01890818983._1 | |
469 | 469 | let pmtAssetId = $t01890818983._2 | |
470 | 470 | if (!(isActive)) | |
471 | 471 | then throwIsInactive() | |
472 | 472 | else if ((0 >= estimatedAmountToReceive)) | |
473 | 473 | then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive))) | |
474 | 474 | else if ((minAmountToReceive > estimatedAmountToReceive)) | |
475 | 475 | then throw(((("Minimal amount can't be greater than estimated. Estimated: " + toString(estimatedAmountToReceive)) + ". Minimal: ") + toString(minAmountToReceive))) | |
476 | 476 | else if ((size(i.payments) != 1)) | |
477 | 477 | then throw("One attached payment expected") | |
478 | 478 | else if (!(hasEnoughBalance)) | |
479 | 479 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
480 | 480 | else if (if ((pmtAssetId != assetIdA)) | |
481 | 481 | then (pmtAssetId != assetIdB) | |
482 | 482 | else false) | |
483 | 483 | then throwAssets() | |
484 | 484 | else if ((10000000 > pmtAmount)) | |
485 | 485 | then throw("Only swap of 10.000000 or more tokens is allowed") | |
486 | 486 | else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount))) | |
487 | 487 | then true | |
488 | 488 | else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax)) | |
489 | 489 | then throw("Incorrect args and pmt ratio") | |
490 | 490 | else { | |
491 | 491 | let sendAssetId = if ((pmtAssetId == assetIdA)) | |
492 | 492 | then assetIdB | |
493 | 493 | else assetIdA | |
494 | 494 | let amount = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId) | |
495 | 495 | let governanceReward = fraction(amount, feeGovernance, feeScale6) | |
496 | 496 | let amountMinusFee = fraction(amount, (feeScale6 - fee), feeScale6) | |
497 | 497 | let $t02040520667 = if ((pmtAssetId == assetIdA)) | |
498 | 498 | then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward)) | |
499 | 499 | else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount)) | |
500 | 500 | let newBalanceA = $t02040520667._1 | |
501 | 501 | let newBalanceB = $t02040520667._2 | |
502 | 502 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
503 | 503 | if (if ((dAppThresholdAmount > newBalanceA)) | |
504 | 504 | then true | |
505 | 505 | else (dAppThresholdAmount > newBalanceB)) | |
506 | 506 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
507 | 507 | else if (if (if ((assetIdA == USDN)) | |
508 | 508 | then (sendAssetId == assetIdA) | |
509 | 509 | else false) | |
510 | 510 | then (stakedAmountUSDN >= newBalanceA) | |
511 | 511 | else false) | |
512 | 512 | then throwInsufficientAvailableBalance(amountMinusFee, availableBalanceA, assetNameA) | |
513 | 513 | else if (if (if ((assetIdB == USDN)) | |
514 | 514 | then (sendAssetId == assetIdB) | |
515 | 515 | else false) | |
516 | 516 | then (stakedAmountUSDN >= newBalanceB) | |
517 | 517 | else false) | |
518 | 518 | then throwInsufficientAvailableBalance(amountMinusFee, availableBalanceB, assetNameB) | |
519 | 519 | else [IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountMinusFee, sendAssetId), ScriptTransfer(govAddr, governanceReward, sendAssetId)] | |
520 | 520 | } | |
521 | 521 | } | |
522 | 522 | ||
523 | 523 | ||
524 | 524 | ||
525 | 525 | @Callable(i) | |
526 | 526 | func shutdown () = if (!(isActive)) | |
527 | 527 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
528 | 528 | else if (!(containsElement([adm1, adm2, adm3, admStartStop], i.callerPublicKey))) | |
529 | 529 | then throwOnlyAdmin() | |
530 | 530 | else suspend("Paused by admin") | |
531 | 531 | ||
532 | 532 | ||
533 | 533 | ||
534 | 534 | @Callable(i) | |
535 | 535 | func activate () = if (isActive) | |
536 | 536 | then throwIsActive() | |
537 | 537 | else if (!(containsElement([adm1, adm2, adm3, admStartStop], i.callerPublicKey))) | |
538 | 538 | then throwOnlyAdmin() | |
539 | 539 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)] | |
540 | 540 | ||
541 | 541 | ||
542 | 542 | ||
543 | 543 | @Callable(i) | |
544 | 544 | func takeIntoAccountExtraFunds (amountLeave) = { | |
545 | 545 | let uncountableA = (accountBalanceWithStakedA - balanceA) | |
546 | 546 | let uncountableB = (accountBalanceWithStakedB - balanceB) | |
547 | 547 | let amountEnrollA = (uncountableA - (if ((assetIdA == unit)) | |
548 | 548 | then amountLeave | |
549 | 549 | else 0)) | |
550 | 550 | let amountEnrollB = (uncountableB - (if ((assetIdB == unit)) | |
551 | 551 | then amountLeave | |
552 | 552 | else 0)) | |
553 | 553 | let invariantNew = invariantCalc((balanceA + amountEnrollA), (balanceB + amountEnrollB)) | |
554 | 554 | if (!(isActive)) | |
555 | 555 | then throwIsInactive() | |
556 | 556 | else if ((i.caller != this)) | |
557 | 557 | then throwOnlyAdmin() | |
558 | 558 | else if ((0 > amountLeave)) | |
559 | 559 | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(amountLeave))) | |
560 | 560 | else if (if ((0 > uncountableA)) | |
561 | 561 | then true | |
562 | 562 | else (0 > uncountableB)) | |
563 | 563 | then suspend("Enroll amount negative") | |
564 | 564 | else if (if ((0 > amountEnrollA)) | |
565 | 565 | then true | |
566 | 566 | else (0 > amountEnrollB)) | |
567 | 567 | then throw("Too large amountLeave") | |
568 | 568 | else [IntegerEntry(kInvariant, invariantNew), IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)] | |
569 | 569 | } | |
570 | 570 | ||
571 | 571 | ||
572 | 572 | @Verifier(tx) | |
573 | 573 | func verify () = match tx { | |
574 | 574 | case inv: InvokeScriptTransaction => | |
575 | 575 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
576 | 576 | then (inv.function == "takeIntoAccountExtraFunds") | |
577 | 577 | else false | |
578 | 578 | let callStaking = if ((inv.dApp == stakingAddress)) | |
579 | 579 | then if (if (if ((inv.function == "lockNeutrino")) | |
580 | 580 | then (size(inv.payments) == 1) | |
581 | 581 | else false) | |
582 | 582 | then (inv.payments[0].assetId == USDN) | |
583 | 583 | else false) | |
584 | 584 | then true | |
585 | 585 | else if ((inv.function == "unlockNeutrino")) | |
586 | 586 | then (size(inv.payments) == 0) | |
587 | 587 | else false | |
588 | 588 | else false | |
589 | 589 | let exchangeToWaves = if (if (if ((inv.dApp == USDNToWavesExchanger)) | |
590 | 590 | then (inv.function == "exchange") | |
591 | 591 | else false) | |
592 | 592 | then (assetIdA == USDN) | |
593 | 593 | else false) | |
594 | 594 | then true | |
595 | - | else if ((assetIdB == USDN)) | |
595 | + | else if (if ((assetIdB == USDN)) | |
596 | + | then (size(inv.payments) == 1) | |
597 | + | else false) | |
596 | 598 | then (inv.payments[0].assetId == USDN) | |
597 | 599 | else false | |
598 | 600 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adm1)) | |
599 | 601 | then true | |
600 | 602 | else sigVerify(tx.bodyBytes, tx.proofs[0], adm2)) | |
601 | 603 | then true | |
602 | 604 | else sigVerify(tx.bodyBytes, tx.proofs[0], adm3)) | |
603 | 605 | then true | |
604 | 606 | else sigVerify(tx.bodyBytes, tx.proofs[0], admStaking) | |
605 | 607 | if (if (if (callTakeIntoAccount) | |
606 | 608 | then true | |
607 | 609 | else callStaking) | |
608 | 610 | then true | |
609 | 611 | else exchangeToWaves) | |
610 | 612 | then signedByAdmin | |
611 | 613 | else false | |
612 | 614 | case _ => | |
613 | 615 | let adm1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adm1)) | |
614 | 616 | then 1 | |
615 | 617 | else 0 | |
616 | 618 | let adm2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adm2)) | |
617 | 619 | then 1 | |
618 | 620 | else 0 | |
619 | 621 | let adm3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adm3)) | |
620 | 622 | then 1 | |
621 | 623 | else 0 | |
622 | 624 | (((adm1Signed + adm2Signed) + adm3Signed) >= 2) | |
623 | 625 | } | |
624 | 626 |
github/deemru/w8io/169f3d6 74.98 ms ◑