tx · 6jWLsSCEiqv863AGbEtUcMNChrGXDasyZyWVvYS9mYbp 3MqQg3GcBjjk5727HxPKgQfqGQwWm6QA2yL: -0.13400000 Waves 2022.09.15 17:47 [2230367] smart account 3MqQg3GcBjjk5727HxPKgQfqGQwWm6QA2yL > SELF 0.00000000 Waves
{ "type": 13, "id": "6jWLsSCEiqv863AGbEtUcMNChrGXDasyZyWVvYS9mYbp", "fee": 13400000, "feeAssetId": null, "timestamp": 1663253115514, "version": 2, "chainId": 84, "sender": "3MqQg3GcBjjk5727HxPKgQfqGQwWm6QA2yL", "senderPublicKey": "4AhS4PdxdW6j71mgHB4Xq7Eewk1rPdm57kDHAwQTTweK", "proofs": [ "5Bfqz9wrme7c9WG15fefNGoH7pNTjCaPCQbmKSc92qfh2pYVB2fzea99L5S8TxJTBXHVLefwTbw6vvifrz7eRdgQ", "5ji6VeGoDuwZHgoTnaTmJC3L3WqtRzMi5PBBL5SRHyKTAUe35qDPNyLt6ZFyk8BT9wqqkhFUMqBQUhJaxRH3YnrW" ], "script": "base64:BgJpCAISBAoCEQESBgoECAEBBBIECgIBBBIECgIRCBIDCgEBEgYKBAgIAQgSBAoCCAESAwoBERIECgIRARIFCgMBCAgSBAoCCAESBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIDCgEBXgAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgAIREVDSU1BTFMABgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTMuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAZrQ2F1c2UCDnNodXRkb3duX2NhdXNlAA1rU2hhcmVBc3NldElkAg5zaGFyZV9hc3NldF9pZAARa1NoYXJlQXNzZXRTdXBwbHkCEnNoYXJlX2Fzc2V0X3N1cHBseQAEa0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wIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkzBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAURYWRtaW5QdWJLZXlJbnZva2UDAwUTY2FsbFRha2VJbnRvQWNjb3VudAUNc2lnbmVkQnlBZG1pbgcGBRNtdWx0aVNpZ25lZEJ5QWRtaW5zBRNtdWx0aVNpZ25lZEJ5QWRtaW5z7UbC3A==", "height": 2230367, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EJ3eZimZTcoh46BuCER4W8oFq92pkCzDVXAi8U8uF7Pi Next: 4FzvezCYuo6RJZyzVpca5geyJtLbDjCoz7SpGm6Ka1N6 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let PRECISION = 1000000 | |
5 | 5 | ||
6 | 6 | let MAX_A = 1000000 | |
7 | 7 | ||
8 | 8 | let MAX_A_CHANGE = 10 | |
9 | 9 | ||
10 | 10 | let DECIMALS = 6 | |
11 | 11 | ||
12 | 12 | let MIN_RAMP_TIME = (86400 / 60) | |
13 | 13 | ||
14 | 14 | let version = "3.0.0" | |
15 | 15 | ||
16 | 16 | let kVersion = "version" | |
17 | 17 | ||
18 | 18 | let kAssets = "asset_ids" | |
19 | 19 | ||
20 | 20 | let kAssetBalance = "_balance" | |
21 | 21 | ||
22 | 22 | let kActive = "active" | |
23 | 23 | ||
24 | 24 | let kCause = "shutdown_cause" | |
25 | 25 | ||
26 | 26 | let kShareAssetId = "share_asset_id" | |
27 | 27 | ||
28 | 28 | let kShareAssetSupply = "share_asset_supply" | |
29 | 29 | ||
30 | 30 | let kFee = "commission" | |
31 | 31 | ||
32 | 32 | let kDAppThresholdCoef = "dAppThresholdCoef" | |
33 | 33 | ||
34 | 34 | let kUSDNAddress = "staking_usdnnsbt_address" | |
35 | 35 | ||
36 | 36 | let kDiscounts = "discounts" | |
37 | 37 | ||
38 | 38 | let kDiscountValues = "discount_values" | |
39 | 39 | ||
40 | 40 | let kUserSwopInGov = "_SWOP_amount" | |
41 | 41 | ||
42 | 42 | let kFirstHarvest = "first_harvest" | |
43 | 43 | ||
44 | 44 | let kFirstHarvestHeight = "first_harvest_height" | |
45 | 45 | ||
46 | 46 | let kShareLimit = "share_limit_on_first_harvest" | |
47 | 47 | ||
48 | 48 | let kBasePeriod = "base_period" | |
49 | 49 | ||
50 | 50 | let kPeriodLength = "period_length" | |
51 | 51 | ||
52 | 52 | let kStartHeight = "start_height" | |
53 | 53 | ||
54 | 54 | let kAdminPubKey1 = "admin_pub_1" | |
55 | 55 | ||
56 | 56 | let kAdminPubKey2 = "admin_pub_2" | |
57 | 57 | ||
58 | 58 | let kAdminPubKey3 = "admin_pub_3" | |
59 | 59 | ||
60 | 60 | let kAdminInvokePubKey = "admin_invoke_pub" | |
61 | 61 | ||
62 | 62 | let kMoneyBoxAddress = "money_box_address" | |
63 | 63 | ||
64 | 64 | let kGovAddress = "governance_address" | |
65 | 65 | ||
66 | 66 | let kVotingAddress = "voting_address" | |
67 | 67 | ||
68 | 68 | let kFarmingAddress = "farming_address" | |
69 | 69 | ||
70 | 70 | let kLPFarmingAddress = "lp_farming" | |
71 | 71 | ||
72 | 72 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
73 | 73 | ||
74 | 74 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
75 | 75 | case string: String => | |
76 | 76 | fromBase58String(string) | |
77 | 77 | case nothing => | |
78 | 78 | throw((key + "is empty")) | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
83 | 83 | ||
84 | 84 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
85 | 85 | ||
86 | 86 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
87 | 87 | ||
88 | 88 | let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey) | |
89 | 89 | ||
90 | 90 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
91 | 91 | ||
92 | 92 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
93 | 93 | ||
94 | 94 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
95 | 95 | ||
96 | 96 | let votingAddress = Address(getBase58FromOracle(kVotingAddress)) | |
97 | 97 | ||
98 | 98 | let farmingAddress = Address(getBase58FromOracle(kFarmingAddress)) | |
99 | 99 | ||
100 | 100 | let lpFarmingAddress = Address(getBase58FromOracle(kLPFarmingAddress)) | |
101 | 101 | ||
102 | 102 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
103 | 103 | ||
104 | 104 | let stakingAssets = [toBase58String(USDN)] | |
105 | 105 | ||
106 | 106 | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
107 | 107 | ||
108 | 108 | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
109 | 109 | ||
110 | 110 | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
111 | 111 | ||
112 | 112 | let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3) | |
113 | 113 | ||
114 | 114 | let active = getBooleanValue(this, kActive) | |
115 | 115 | ||
116 | 116 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
117 | 117 | ||
118 | 118 | let shareSupply = getIntegerValue(this, kShareAssetSupply) | |
119 | 119 | ||
120 | 120 | let feeScale6 = 1000000 | |
121 | 121 | ||
122 | 122 | let fee = getIntegerValue(this, kFee) | |
123 | 123 | ||
124 | 124 | let feeGovernance = fraction(40, feeScale6, 100) | |
125 | 125 | ||
126 | 126 | let initial_A = getIntegerValue(this, "initial_A") | |
127 | 127 | ||
128 | 128 | let future_A = getIntegerValue(this, "future_A") | |
129 | 129 | ||
130 | 130 | let initial_A_time = valueOrElse(getInteger(this, "initial_A_time"), 0) | |
131 | 131 | ||
132 | 132 | let future_A_time = valueOrElse(getInteger(this, "future_A_time"), 0) | |
133 | 133 | ||
134 | 134 | let assetIds = split(getStringValue(this, kAssets), ",") | |
135 | 135 | ||
136 | 136 | let nCoins = size(assetIds) | |
137 | 137 | ||
138 | 138 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func throwIsActive () = throw("DApp is already active") | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func isActive () = if (active) | |
145 | 145 | then unit | |
146 | 146 | else throw("DApp is inactive at this moment") | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
150 | 150 | then unit | |
151 | 151 | else throw("Only admin can call this function") | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func isSelfCall (i) = if ((this == i.caller)) | |
155 | 155 | then unit | |
156 | 156 | else throw("Only contract itself can call this function") | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | let big2 = toBigInt(2) | |
160 | 160 | ||
161 | 161 | let blockTimestamp = height | |
162 | 162 | ||
163 | 163 | func assert (a) = if (a) | |
164 | 164 | then false | |
165 | 165 | else true | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func calculateFeeDiscount (userAddr) = { | |
169 | 169 | let user = match userAddr { | |
170 | 170 | case u: Address => | |
171 | 171 | toString(u) | |
172 | 172 | case u: String => | |
173 | 173 | u | |
174 | 174 | case _ => | |
175 | 175 | throw("Unknow type of user Addr") | |
176 | 176 | } | |
177 | 177 | let swopAmount = valueOrElse(getInteger(govAddress, (user + kUserSwopInGov)), 0) | |
178 | 178 | let discountValues = split(getStringValue(oracle, kDiscountValues), ",") | |
179 | 179 | let discounts = split(getStringValue(oracle, kDiscounts), ",") | |
180 | 180 | if (if ((swopAmount >= parseIntValue(discountValues[0]))) | |
181 | 181 | then (parseIntValue(discountValues[1]) > swopAmount) | |
182 | 182 | else false) | |
183 | 183 | then (feeScale6 - parseIntValue(discounts[0])) | |
184 | 184 | else if (if ((swopAmount >= parseIntValue(discountValues[1]))) | |
185 | 185 | then (parseIntValue(discountValues[2]) > swopAmount) | |
186 | 186 | else false) | |
187 | 187 | then (feeScale6 - parseIntValue(discounts[1])) | |
188 | 188 | else if (if ((swopAmount >= parseIntValue(discountValues[2]))) | |
189 | 189 | then (parseIntValue(discountValues[3]) > swopAmount) | |
190 | 190 | else false) | |
191 | 191 | then (feeScale6 - parseIntValue(discounts[2])) | |
192 | 192 | else if (if ((swopAmount >= parseIntValue(discountValues[3]))) | |
193 | 193 | then (parseIntValue(discountValues[4]) > swopAmount) | |
194 | 194 | else false) | |
195 | 195 | then (feeScale6 - parseIntValue(discounts[3])) | |
196 | 196 | else if ((swopAmount >= parseIntValue(discountValues[4]))) | |
197 | 197 | then (feeScale6 - parseIntValue(discounts[4])) | |
198 | 198 | else feeScale6 | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func _A () = { | |
203 | 203 | let t1 = future_A_time | |
204 | 204 | let A1 = future_A | |
205 | 205 | if ((t1 > blockTimestamp)) | |
206 | 206 | then { | |
207 | 207 | let A0 = initial_A | |
208 | 208 | let t0 = initial_A_time | |
209 | 209 | if ((A1 > A0)) | |
210 | 210 | then (A0 + (((A1 - A0) * (blockTimestamp - t0)) / (t1 - t0))) | |
211 | 211 | else (A0 - (((A0 - A1) * (blockTimestamp - t0)) / (t1 - t0))) | |
212 | 212 | } | |
213 | 213 | else A1 | |
214 | 214 | } | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | func _xp () = { | |
218 | 218 | func assetBalances (acc,assetId) = (acc :+ valueOrElse(getInteger(this, (assetId + kAssetBalance)), 0)) | |
219 | 219 | ||
220 | 220 | let $l = assetIds | |
221 | 221 | let $s = size($l) | |
222 | 222 | let $acc0 = nil | |
223 | 223 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
224 | 224 | then $a | |
225 | 225 | else assetBalances($a, $l[$i]) | |
226 | 226 | ||
227 | 227 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
228 | 228 | then $a | |
229 | 229 | else throw("List size exceeds 15") | |
230 | 230 | ||
231 | 231 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
232 | 232 | } | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func _xp_mem (xp) = xp | |
236 | 236 | ||
237 | 237 | ||
238 | 238 | func sumList (acc,element) = (acc + element) | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | func get_D (xp,amp) = { | |
242 | 242 | let @ = invoke(this, "D", [xp, amp], nil) | |
243 | 243 | if ($isInstanceOf(@, "Int")) | |
244 | 244 | then @ | |
245 | 245 | else throw(($getType(invoke(this, "D", [xp, amp], nil)) + " couldn't be cast to Int")) | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func get_D_internal (xp,amp) = { | |
250 | 250 | let S = { | |
251 | 251 | let $l = xp | |
252 | 252 | let $s = size($l) | |
253 | 253 | let $acc0 = 0 | |
254 | 254 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
255 | 255 | then $a | |
256 | 256 | else sumList($a, $l[$i]) | |
257 | 257 | ||
258 | 258 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
259 | 259 | then $a | |
260 | 260 | else throw("List size exceeds 15") | |
261 | 261 | ||
262 | 262 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
263 | 263 | } | |
264 | 264 | if ((S == 0)) | |
265 | 265 | then 0 | |
266 | 266 | else { | |
267 | 267 | let Ann = (amp * nCoins) | |
268 | 268 | let AnnS = (toBigInt(Ann) * toBigInt(S)) | |
269 | 269 | let Ann1 = toBigInt((Ann - 1)) | |
270 | 270 | func Dproc (acc,i) = if ((acc._2 == true)) | |
271 | 271 | then acc | |
272 | 272 | else { | |
273 | 273 | let Dprev = acc._1 | |
274 | 274 | func D_PProc (D_P,i) = if ((nCoins > i)) | |
275 | 275 | then ((D_P * Dprev) / (toBigInt(xp[i]) * toBigInt(nCoins))) | |
276 | 276 | else D_P | |
277 | 277 | ||
278 | 278 | let D_P = { | |
279 | 279 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
280 | 280 | let $s = size($l) | |
281 | 281 | let $acc0 = Dprev | |
282 | 282 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
283 | 283 | then $a | |
284 | 284 | else D_PProc($a, $l[$i]) | |
285 | 285 | ||
286 | 286 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
287 | 287 | then $a | |
288 | 288 | else throw("List size exceeds 15") | |
289 | 289 | ||
290 | 290 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
291 | 291 | } | |
292 | 292 | let D = fraction((AnnS + (toBigInt(nCoins) * D_P)), Dprev, ((Ann1 * Dprev) + (toBigInt((nCoins + 1)) * D_P))) | |
293 | 293 | if ((D > Dprev)) | |
294 | 294 | then if ((1 >= toInt((D - Dprev)))) | |
295 | 295 | then $Tuple2(D, true) | |
296 | 296 | else $Tuple2(D, false) | |
297 | 297 | else if ((1 >= toInt((Dprev - D)))) | |
298 | 298 | then $Tuple2(D, true) | |
299 | 299 | else $Tuple2(D, false) | |
300 | 300 | } | |
301 | 301 | ||
302 | 302 | let $t068406952 = { | |
303 | 303 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
304 | 304 | let $s = size($l) | |
305 | 305 | let $acc0 = $Tuple2(toBigInt(S), false) | |
306 | 306 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
307 | 307 | then $a | |
308 | 308 | else Dproc($a, $l[$i]) | |
309 | 309 | ||
310 | 310 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
311 | 311 | then $a | |
312 | 312 | else throw("List size exceeds 15") | |
313 | 313 | ||
314 | 314 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
315 | 315 | } | |
316 | 316 | let D = $t068406952._1 | |
317 | 317 | let finished = $t068406952._2 | |
318 | 318 | if ((finished == false)) | |
319 | 319 | then throw(("get_D() not finished with " + toString(D))) | |
320 | 320 | else toInt(D) | |
321 | 321 | } | |
322 | 322 | } | |
323 | 323 | ||
324 | 324 | ||
325 | 325 | func getDMem (xp,amp) = get_D(_xp_mem(xp), amp) | |
326 | 326 | ||
327 | 327 | ||
328 | 328 | func getY (in,out,x,xp_) = if (assert((in != out))) | |
329 | 329 | then throw("same coin") | |
330 | 330 | else if (assert(if ((out >= 0)) | |
331 | 331 | then (in >= 0) | |
332 | 332 | else false)) | |
333 | 333 | then throw("below zero") | |
334 | 334 | else if (assert(if ((nCoins > out)) | |
335 | 335 | then (nCoins > in) | |
336 | 336 | else false)) | |
337 | 337 | then throw("above N_COINS") | |
338 | 338 | else { | |
339 | 339 | let amp = _A() | |
340 | 340 | let D = get_D(xp_, amp) | |
341 | 341 | let Ann = (amp * nCoins) | |
342 | 342 | func S_c (acc,i) = { | |
343 | 343 | let $t075237540 = acc | |
344 | 344 | let S_ = $t075237540._1 | |
345 | 345 | let c = $t075237540._2 | |
346 | 346 | let x_ = if ((in == i)) | |
347 | 347 | then x | |
348 | 348 | else xp_[i] | |
349 | 349 | if (if ((i != out)) | |
350 | 350 | then (nCoins > i) | |
351 | 351 | else false) | |
352 | 352 | then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins)))) | |
353 | 353 | else $Tuple2(S_, c) | |
354 | 354 | } | |
355 | 355 | ||
356 | 356 | let $t077487849 = { | |
357 | 357 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
358 | 358 | let $s = size($l) | |
359 | 359 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
360 | 360 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
361 | 361 | then $a | |
362 | 362 | else S_c($a, $l[$i]) | |
363 | 363 | ||
364 | 364 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
365 | 365 | then $a | |
366 | 366 | else throw("List size exceeds 15") | |
367 | 367 | ||
368 | 368 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
369 | 369 | } | |
370 | 370 | let S_ = $t077487849._1 | |
371 | 371 | let c_ = $t077487849._2 | |
372 | 372 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
373 | 373 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
374 | 374 | func y_proc (acc,_i) = if ((acc._2 == true)) | |
375 | 375 | then acc | |
376 | 376 | else { | |
377 | 377 | let y_prev = acc._1 | |
378 | 378 | let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD)) | |
379 | 379 | if ((y > y_prev)) | |
380 | 380 | then if ((1 >= toInt((y - y_prev)))) | |
381 | 381 | then $Tuple2(y, true) | |
382 | 382 | else $Tuple2(y, false) | |
383 | 383 | else if ((1 >= toInt((y_prev - y)))) | |
384 | 384 | then $Tuple2(y, true) | |
385 | 385 | else $Tuple2(y, false) | |
386 | 386 | } | |
387 | 387 | ||
388 | 388 | let $t083318448 = { | |
389 | 389 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
390 | 390 | let $s = size($l) | |
391 | 391 | let $acc0 = $Tuple2(toBigInt(D), false) | |
392 | 392 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
393 | 393 | then $a | |
394 | 394 | else y_proc($a, $l[$i]) | |
395 | 395 | ||
396 | 396 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
397 | 397 | then $a | |
398 | 398 | else throw("List size exceeds 16") | |
399 | 399 | ||
400 | 400 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
401 | 401 | } | |
402 | 402 | let y = $t083318448._1 | |
403 | 403 | let finished = $t083318448._2 | |
404 | 404 | if ((finished == false)) | |
405 | 405 | then throw(("getY() not finished with " + toString(y))) | |
406 | 406 | else toInt(y) | |
407 | 407 | } | |
408 | 408 | ||
409 | 409 | ||
410 | 410 | func get_y_D (A_,in,xp,D) = if (assert((in >= 0))) | |
411 | 411 | then throw("i below zero") | |
412 | 412 | else if (assert((nCoins > in))) | |
413 | 413 | then throw("i above N_COINS") | |
414 | 414 | else { | |
415 | 415 | let Ann = (A_ * nCoins) | |
416 | 416 | func S_c (acc,i) = { | |
417 | 417 | let $t088278844 = acc | |
418 | 418 | let S_ = $t088278844._1 | |
419 | 419 | let c = $t088278844._2 | |
420 | 420 | let x_ = if (if ((in != i)) | |
421 | 421 | then (nCoins > i) | |
422 | 422 | else false) | |
423 | 423 | then xp[i] | |
424 | 424 | else 0 | |
425 | 425 | if (if ((nCoins > i)) | |
426 | 426 | then (in != i) | |
427 | 427 | else false) | |
428 | 428 | then $Tuple2((S_ + x_), fraction(c, toBigInt(D), toBigInt((x_ * nCoins)))) | |
429 | 429 | else $Tuple2(S_, c) | |
430 | 430 | } | |
431 | 431 | ||
432 | 432 | let $t090649165 = { | |
433 | 433 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
434 | 434 | let $s = size($l) | |
435 | 435 | let $acc0 = $Tuple2(0, toBigInt(D)) | |
436 | 436 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
437 | 437 | then $a | |
438 | 438 | else S_c($a, $l[$i]) | |
439 | 439 | ||
440 | 440 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
441 | 441 | then $a | |
442 | 442 | else throw("List size exceeds 15") | |
443 | 443 | ||
444 | 444 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
445 | 445 | } | |
446 | 446 | let S_ = $t090649165._1 | |
447 | 447 | let c_ = $t090649165._2 | |
448 | 448 | let c = fraction(c_, toBigInt(D), toBigInt((Ann * nCoins))) | |
449 | 449 | let bD = toBigInt(((S_ + (D / Ann)) - D)) | |
450 | 450 | func y_D_proc (acc,i) = if ((acc._2 == true)) | |
451 | 451 | then acc | |
452 | 452 | else { | |
453 | 453 | let y_prev = acc._1 | |
454 | 454 | let y = (((y_prev * y_prev) + c) / ((big2 * y_prev) + bD)) | |
455 | 455 | if ((y > y_prev)) | |
456 | 456 | then if ((1 >= toInt((y - y_prev)))) | |
457 | 457 | then $Tuple2(y, true) | |
458 | 458 | else $Tuple2(y, false) | |
459 | 459 | else if ((1 >= toInt((y_prev - y)))) | |
460 | 460 | then $Tuple2(y, true) | |
461 | 461 | else $Tuple2(y, false) | |
462 | 462 | } | |
463 | 463 | ||
464 | 464 | let $t096489767 = { | |
465 | 465 | let $l = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
466 | 466 | let $s = size($l) | |
467 | 467 | let $acc0 = $Tuple2(toBigInt(D), false) | |
468 | 468 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
469 | 469 | then $a | |
470 | 470 | else y_D_proc($a, $l[$i]) | |
471 | 471 | ||
472 | 472 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
473 | 473 | then $a | |
474 | 474 | else throw("List size exceeds 16") | |
475 | 475 | ||
476 | 476 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
477 | 477 | } | |
478 | 478 | let y = $t096489767._1 | |
479 | 479 | let finished = $t096489767._2 | |
480 | 480 | if ((finished == false)) | |
481 | 481 | then throw(("get_y_D() not finished with " + toString(y))) | |
482 | 482 | else toInt(y) | |
483 | 483 | } | |
484 | 484 | ||
485 | 485 | ||
486 | 486 | func _calcWithdrawOneCoin (xp,_token_amount,i,caller) = { | |
487 | 487 | let feeDiscount = calculateFeeDiscount(caller) | |
488 | 488 | let amp = _A() | |
489 | 489 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
490 | 490 | let total_supply = shareSupply | |
491 | 491 | let D0 = get_D(xp, amp) | |
492 | 492 | let D1 = (D0 - fraction(_token_amount, D0, total_supply)) | |
493 | 493 | let new_y = get_y_D(amp, i, xp, D1) | |
494 | 494 | let dy_0 = (xp[i] - new_y) | |
495 | 495 | func xp_reduced_proc (acc,xp_j) = { | |
496 | 496 | let $t01040810437 = acc | |
497 | 497 | let xp_reduced = $t01040810437._1 | |
498 | 498 | let index = $t01040810437._2 | |
499 | 499 | let dx_expected = if ((index == i)) | |
500 | 500 | then (fraction(xp_j, D1, D0) - new_y) | |
501 | 501 | else (xp_j - fraction(xp_j, D1, D0)) | |
502 | 502 | $Tuple2((xp_reduced :+ (xp_j - fraction(_fee, dx_expected, feeScale6))), (index + 1)) | |
503 | 503 | } | |
504 | 504 | ||
505 | 505 | let $t01069910763 = { | |
506 | 506 | let $l = xp | |
507 | 507 | let $s = size($l) | |
508 | 508 | let $acc0 = $Tuple2(nil, 0) | |
509 | 509 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
510 | 510 | then $a | |
511 | 511 | else xp_reduced_proc($a, $l[$i]) | |
512 | 512 | ||
513 | 513 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
514 | 514 | then $a | |
515 | 515 | else throw("List size exceeds 15") | |
516 | 516 | ||
517 | 517 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
518 | 518 | } | |
519 | 519 | let xp_reduced = $t01069910763._1 | |
520 | 520 | let index = $t01069910763._2 | |
521 | 521 | let xp_reduced_i = xp_reduced[i] | |
522 | 522 | let dy = ((xp_reduced_i - get_y_D(amp, i, xp_reduced, D1)) - 1) | |
523 | 523 | $Tuple2(dy, (dy_0 - dy)) | |
524 | 524 | } | |
525 | 525 | ||
526 | 526 | ||
527 | 527 | func getStrAssetId (assetId) = match assetId { | |
528 | 528 | case id: ByteVector => | |
529 | 529 | toBase58String(id) | |
530 | 530 | case waves: Unit => | |
531 | 531 | "WAVES" | |
532 | 532 | case _ => | |
533 | 533 | throw("Match error") | |
534 | 534 | } | |
535 | 535 | ||
536 | 536 | ||
537 | 537 | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
538 | 538 | then $Tuple2("lockNeutrino", stakingUSDNAddress) | |
539 | 539 | else $Tuple2("unlockNeutrino", stakingUSDNAddress) | |
540 | 540 | ||
541 | 541 | ||
542 | 542 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
543 | 543 | then { | |
544 | 544 | let $t01132711393 = calcStakingFuncAndAddres(stake, assetId) | |
545 | 545 | let call = $t01132711393._1 | |
546 | 546 | let stakingAddr = $t01132711393._2 | |
547 | 547 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
548 | 548 | } | |
549 | 549 | else { | |
550 | 550 | let $t01147911545 = calcStakingFuncAndAddres(stake, assetId) | |
551 | 551 | let call = $t01147911545._1 | |
552 | 552 | let stakingAddr = $t01147911545._2 | |
553 | 553 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
554 | 554 | } | |
555 | 555 | ||
556 | 556 | ||
557 | 557 | func stake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
558 | 558 | then { | |
559 | 559 | let $t01173211834 = calcStakingParams(true, amount, fromBase58String(assetIdString)) | |
560 | 560 | let call = $t01173211834._1 | |
561 | 561 | let addr = $t01173211834._2 | |
562 | 562 | let params = $t01173211834._3 | |
563 | 563 | let payments = $t01173211834._4 | |
564 | 564 | invoke(addr, call, params, payments) | |
565 | 565 | } | |
566 | 566 | else 0 | |
567 | 567 | ||
568 | 568 | ||
569 | 569 | func unstake (amount,assetIdString) = if (containsElement(stakingAssets, assetIdString)) | |
570 | 570 | then { | |
571 | 571 | let $t01201912122 = calcStakingParams(false, amount, fromBase58String(assetIdString)) | |
572 | 572 | let call = $t01201912122._1 | |
573 | 573 | let addr = $t01201912122._2 | |
574 | 574 | let params = $t01201912122._3 | |
575 | 575 | let payments = $t01201912122._4 | |
576 | 576 | invoke(addr, call, params, payments) | |
577 | 577 | } | |
578 | 578 | else 0 | |
579 | 579 | ||
580 | 580 | ||
581 | 581 | func stakedAmount (assetId) = { | |
582 | 582 | let stakedAmountCalculated = match assetId { | |
583 | 583 | case aId: ByteVector => | |
584 | 584 | if ((aId == USDN)) | |
585 | 585 | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
586 | 586 | else 0 | |
587 | 587 | case _: Unit => | |
588 | 588 | 0 | |
589 | 589 | case _ => | |
590 | 590 | throw("Match error") | |
591 | 591 | } | |
592 | 592 | match stakedAmountCalculated { | |
593 | 593 | case i: Int => | |
594 | 594 | i | |
595 | 595 | case _ => | |
596 | 596 | 0 | |
597 | 597 | } | |
598 | 598 | } | |
599 | 599 | ||
600 | 600 | ||
601 | 601 | func checkSuspicious () = { | |
602 | 602 | let contractBalances = _xp() | |
603 | 603 | func checkBalance (acc,assetId) = { | |
604 | 604 | let $t01273312758 = acc | |
605 | 605 | let suspicious = $t01273312758._1 | |
606 | 606 | let i = $t01273312758._2 | |
607 | 607 | if (suspicious) | |
608 | 608 | then $Tuple2(suspicious, i) | |
609 | 609 | else { | |
610 | 610 | let aBalance = (assetBalance(this, fromBase58String(assetId)) + stakedAmount(fromBase58String(assetId))) | |
611 | 611 | if ((contractBalances[i] > aBalance)) | |
612 | 612 | then $Tuple2(true, i) | |
613 | 613 | else $Tuple2(false, (i + 1)) | |
614 | 614 | } | |
615 | 615 | } | |
616 | 616 | ||
617 | 617 | let $l = assetIds | |
618 | 618 | let $s = size($l) | |
619 | 619 | let $acc0 = $Tuple2(false, 0) | |
620 | 620 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
621 | 621 | then $a | |
622 | 622 | else checkBalance($a, $l[$i]) | |
623 | 623 | ||
624 | 624 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
625 | 625 | then $a | |
626 | 626 | else throw("List size exceeds 15") | |
627 | 627 | ||
628 | 628 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
629 | 629 | } | |
630 | 630 | ||
631 | 631 | ||
632 | 632 | func suspendSuspicious (i) = suspend(("Suspicious state with asset: " + assetIds[i])) | |
633 | 633 | ||
634 | 634 | ||
635 | 635 | func returnPayments (caller,payments) = { | |
636 | 636 | func parsePayments (acc,payment) = (acc :+ ScriptTransfer(caller, payment.amount, payment.assetId)) | |
637 | 637 | ||
638 | 638 | let $l = payments | |
639 | 639 | let $s = size($l) | |
640 | 640 | let $acc0 = nil | |
641 | 641 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
642 | 642 | then $a | |
643 | 643 | else parsePayments($a, $l[$i]) | |
644 | 644 | ||
645 | 645 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
646 | 646 | then $a | |
647 | 647 | else throw("List size exceeds 15") | |
648 | 648 | ||
649 | 649 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
650 | 650 | } | |
651 | 651 | ||
652 | 652 | ||
653 | 653 | func checkDAppThreshold (newBalances) = { | |
654 | 654 | let dAppThresholdCoef = valueOrErrorMessage(getInteger(this, kDAppThresholdCoef), "No dAppThresholdCoef key") | |
655 | 655 | let thresholdScale = 10000 | |
656 | 656 | let maxBalance = max(newBalances) | |
657 | 657 | let minBalance = min(newBalances) | |
658 | 658 | let ratio = fraction(maxBalance, thresholdScale, minBalance) | |
659 | 659 | if ((ratio > (dAppThresholdCoef * thresholdScale))) | |
660 | 660 | then throw("New balance in assets of the DApp is less than threshold") | |
661 | 661 | else false | |
662 | 662 | } | |
663 | 663 | ||
664 | 664 | ||
665 | 665 | func checkCoins (assetIds) = { | |
666 | 666 | let coins = split(assetIds, ",") | |
667 | 667 | func checkCoin (error,assetId) = { | |
668 | 668 | let asset = valueOrErrorMessage(fromBase58String(assetId), ("fromBase58String: " + assetId)) | |
669 | 669 | let decimals = valueOrErrorMessage(assetInfo(asset), ("assetInfo: " + assetId)).decimals | |
670 | 670 | if ((decimals != DECIMALS)) | |
671 | 671 | then throw("wrong decimals") | |
672 | 672 | else false | |
673 | 673 | } | |
674 | 674 | ||
675 | 675 | let $l = coins | |
676 | 676 | let $s = size($l) | |
677 | 677 | let $acc0 = false | |
678 | 678 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
679 | 679 | then $a | |
680 | 680 | else checkCoin($a, $l[$i]) | |
681 | 681 | ||
682 | 682 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
683 | 683 | then $a | |
684 | 684 | else throw("List size exceeds 15") | |
685 | 685 | ||
686 | 686 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
687 | 687 | } | |
688 | 688 | ||
689 | 689 | ||
690 | 690 | @Callable(msg) | |
691 | 691 | func D (xp,amp) = { | |
692 | 692 | let D = get_D_internal(xp, amp) | |
693 | 693 | $Tuple2([IntegerEntry("D", D)], D) | |
694 | 694 | } | |
695 | 695 | ||
696 | 696 | ||
697 | 697 | ||
698 | 698 | @Callable(msg) | |
699 | 699 | func init (assetIds,_A,_dAppThresholdCoef,firstHarvest) = if (!(isDataStorageUntouched(this))) | |
700 | 700 | then throw("Already initialized") | |
701 | 701 | else if ((0 >= _A)) | |
702 | 702 | then throw("Amp must be must > 0") | |
703 | 703 | else if ((0 >= _dAppThresholdCoef)) | |
704 | 704 | then throw("dApp Threshold Coef must be > 0") | |
705 | 705 | else { | |
706 | 706 | let shareName = "s_Multi_USD" | |
707 | 707 | let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this)) | |
708 | 708 | let issueToken = Issue(shareName, shareDescription, 0, 6, true) | |
709 | 709 | let tokenId = calculateAssetId(issueToken) | |
710 | 710 | if (checkCoins(assetIds)) | |
711 | 711 | then throw() | |
712 | 712 | else { | |
713 | 713 | let baseEntry = [StringEntry(kVersion, version), StringEntry(kAssets, assetIds), IntegerEntry("initial_A", _A), IntegerEntry("future_A", _A), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), StringEntry(kShareAssetId, toBase58String(tokenId)), IntegerEntry(kShareAssetSupply, 0), IntegerEntry(kDAppThresholdCoef, _dAppThresholdCoef), BooleanEntry(kActive, true), issueToken] | |
714 | 714 | if (firstHarvest) | |
715 | 715 | then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
716 | 716 | else baseEntry | |
717 | 717 | } | |
718 | 718 | } | |
719 | 719 | ||
720 | 720 | ||
721 | 721 | ||
722 | 722 | @Callable(msg) | |
723 | 723 | func addLiquidity (minMintAmount,stakeFarming) = valueOrElse(isActive(), { | |
724 | 724 | let amp = _A() | |
725 | 725 | let xp = _xp() | |
726 | 726 | let D0 = if ((shareSupply == 0)) | |
727 | 727 | then 0 | |
728 | 728 | else getDMem(xp, amp) | |
729 | 729 | let payments = msg.payments | |
730 | 730 | let paymentsSize = size(payments) | |
731 | 731 | func validPayments (n) = if ((paymentsSize > nCoins)) | |
732 | 732 | then throw(("payments size > " + toString(nCoins))) | |
733 | 733 | else if ((1 > paymentsSize)) | |
734 | 734 | then throw("payments size < 1") | |
735 | 735 | else if (if ((shareSupply == 0)) | |
736 | 736 | then (nCoins != paymentsSize) | |
737 | 737 | else false) | |
738 | 738 | then throw("initial deposit requires all coins") | |
739 | 739 | else { | |
740 | 740 | func paymantValid (acc,payment) = if (containsElement(assetIds, getStrAssetId(payment.assetId))) | |
741 | 741 | then true | |
742 | 742 | else throw("Invalid asset in payment") | |
743 | 743 | ||
744 | 744 | let $l = payments | |
745 | 745 | let $s = size($l) | |
746 | 746 | let $acc0 = false | |
747 | 747 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
748 | 748 | then $a | |
749 | 749 | else paymantValid($a, $l[$i]) | |
750 | 750 | ||
751 | 751 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
752 | 752 | then $a | |
753 | 753 | else throw("List size exceeds 15") | |
754 | 754 | ||
755 | 755 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
756 | 756 | } | |
757 | 757 | ||
758 | 758 | if (!(validPayments(paymentsSize))) | |
759 | 759 | then throw() | |
760 | 760 | else { | |
761 | 761 | let suspicious = checkSuspicious() | |
762 | 762 | if (suspicious._1) | |
763 | 763 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, payments)) | |
764 | 764 | else { | |
765 | 765 | func parsePayments (acc,assetId) = { | |
766 | 766 | let $t01706617095 = acc | |
767 | 767 | let newBalances = $t01706617095._1 | |
768 | 768 | let i = $t01706617095._2 | |
769 | 769 | let j = $t01706617095._3 | |
770 | 770 | if (if ((paymentsSize > j)) | |
771 | 771 | then (getStrAssetId(payments[j].assetId) == assetId) | |
772 | 772 | else false) | |
773 | 773 | then $Tuple3((newBalances :+ (xp[i] + payments[j].amount)), (i + 1), (j + 1)) | |
774 | 774 | else $Tuple3((newBalances :+ xp[i]), (i + 1), j) | |
775 | 775 | } | |
776 | 776 | ||
777 | 777 | let $t01731517401 = { | |
778 | 778 | let $l = assetIds | |
779 | 779 | let $s = size($l) | |
780 | 780 | let $acc0 = $Tuple3(nil, 0, 0) | |
781 | 781 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
782 | 782 | then $a | |
783 | 783 | else parsePayments($a, $l[$i]) | |
784 | 784 | ||
785 | 785 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
786 | 786 | then $a | |
787 | 787 | else throw("List size exceeds 15") | |
788 | 788 | ||
789 | 789 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
790 | 790 | } | |
791 | 791 | let newBalances = $t01731517401._1 | |
792 | 792 | let k = $t01731517401._2 | |
793 | 793 | let parsedPayments = $t01731517401._3 | |
794 | 794 | if ((paymentsSize > parsedPayments)) | |
795 | 795 | then throw("Incorect payments order") | |
796 | 796 | else if (checkDAppThreshold(newBalances)) | |
797 | 797 | then throw() | |
798 | 798 | else { | |
799 | 799 | let D1 = getDMem(newBalances, amp) | |
800 | 800 | if (assert((D1 > D0))) | |
801 | 801 | then throw("D1 > D0") | |
802 | 802 | else { | |
803 | 803 | let feeDiscount = calculateFeeDiscount(msg.caller) | |
804 | 804 | func calcScriptActions (acc,newBalance) = { | |
805 | 805 | let $t01780217843 = acc | |
806 | 806 | let invBalances = $t01780217843._1 | |
807 | 807 | let scriptActions = $t01780217843._2 | |
808 | 808 | let i = $t01780217843._3 | |
809 | 809 | if ((shareSupply > 0)) | |
810 | 810 | then { | |
811 | 811 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
812 | 812 | let fees = { | |
813 | 813 | let idealBalance = fraction(D1, xp[i], D0) | |
814 | 814 | let difference = if ((idealBalance > newBalance)) | |
815 | 815 | then (idealBalance - newBalance) | |
816 | 816 | else (newBalance - idealBalance) | |
817 | 817 | fraction(_fee, difference, feeScale6) | |
818 | 818 | } | |
819 | 819 | let governanceFees = fraction(fees, feeGovernance, feeScale6) | |
820 | 820 | let finalBalance = (newBalance - fees) | |
821 | 821 | let invariantBalance = (newBalance - fees) | |
822 | 822 | let pmt = (newBalance - xp[i]) | |
823 | 823 | let lpFees = (fees - governanceFees) | |
824 | 824 | let inv = if ((pmt > 0)) | |
825 | 825 | then stake((pmt - fees), assetIds[i]) | |
826 | 826 | else unstake(fees, assetIds[i]) | |
827 | 827 | if ((inv == inv)) | |
828 | 828 | then { | |
829 | 829 | let airdrop = if ((lpFees > 0)) | |
830 | 830 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(fromBase58String(assetIds[i]), lpFees)]) | |
831 | 831 | else 0 | |
832 | 832 | if ((airdrop == airdrop)) | |
833 | 833 | then $Tuple3((invBalances :+ invariantBalance), (scriptActions ++ [ScriptTransfer(moneyBoxAddress, governanceFees, fromBase58String(assetIds[i])), IntegerEntry((assetIds[i] + kAssetBalance), finalBalance)]), (i + 1)) | |
834 | 834 | else throw("Strict value is not equal to itself.") | |
835 | 835 | } | |
836 | 836 | else throw("Strict value is not equal to itself.") | |
837 | 837 | } | |
838 | 838 | else { | |
839 | 839 | let inv = stake(newBalance, assetIds[i]) | |
840 | 840 | if ((inv == inv)) | |
841 | 841 | then $Tuple3((invBalances :+ newBalance), (scriptActions :+ IntegerEntry((assetIds[i] + kAssetBalance), newBalance)), (i + 1)) | |
842 | 842 | else throw("Strict value is not equal to itself.") | |
843 | 843 | } | |
844 | 844 | } | |
845 | 845 | ||
846 | 846 | let $t01954819636 = { | |
847 | 847 | let $l = newBalances | |
848 | 848 | let $s = size($l) | |
849 | 849 | let $acc0 = $Tuple3(nil, nil, 0) | |
850 | 850 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
851 | 851 | then $a | |
852 | 852 | else calcScriptActions($a, $l[$i]) | |
853 | 853 | ||
854 | 854 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
855 | 855 | then $a | |
856 | 856 | else throw("List size exceeds 15") | |
857 | 857 | ||
858 | 858 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
859 | 859 | } | |
860 | 860 | let invBalances = $t01954819636._1 | |
861 | 861 | let scriptActions = $t01954819636._2 | |
862 | 862 | let D2 = getDMem(invBalances, amp) | |
863 | 863 | let mint_amount = if ((shareSupply == 0)) | |
864 | 864 | then D1 | |
865 | 865 | else fraction(shareSupply, (D2 - D0), D0) | |
866 | 866 | if (assert((mint_amount >= minMintAmount))) | |
867 | 867 | then throw("Slippage screwed you") | |
868 | 868 | else if (stakeFarming) | |
869 | 869 | then { | |
870 | 870 | let re = invoke(this, "reissueShare", [mint_amount], nil) | |
871 | 871 | if ((re == re)) | |
872 | 872 | then { | |
873 | 873 | let s = invoke(farmingAddress, "lockShareTokens", [toString(this)], [AttachedPayment(shareAssetId, mint_amount)]) | |
874 | 874 | if ((s == s)) | |
875 | 875 | then (scriptActions :+ IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))) | |
876 | 876 | else throw("Strict value is not equal to itself.") | |
877 | 877 | } | |
878 | 878 | else throw("Strict value is not equal to itself.") | |
879 | 879 | } | |
880 | 880 | else (scriptActions ++ [Reissue(shareAssetId, mint_amount, true), ScriptTransfer(msg.caller, mint_amount, shareAssetId), IntegerEntry(kShareAssetSupply, (shareSupply + mint_amount))]) | |
881 | 881 | } | |
882 | 882 | } | |
883 | 883 | } | |
884 | 884 | } | |
885 | 885 | }) | |
886 | 886 | ||
887 | 887 | ||
888 | 888 | ||
889 | 889 | @Callable(msg) | |
890 | 890 | func calcMintAmount (newBalances,user) = { | |
891 | 891 | let amp = _A() | |
892 | 892 | let xp = _xp() | |
893 | 893 | let D1 = getDMem(newBalances, amp) | |
894 | 894 | if ((shareSupply == 0)) | |
895 | 895 | then $Tuple2(nil, D1) | |
896 | 896 | else { | |
897 | 897 | let D0 = getDMem(xp, amp) | |
898 | 898 | let feeDiscount = calculateFeeDiscount(user) | |
899 | 899 | func calcInvBalances (acc,newBalance) = { | |
900 | 900 | let $t02082520851 = acc | |
901 | 901 | let invBalances = $t02082520851._1 | |
902 | 902 | let i = $t02082520851._2 | |
903 | 903 | let _fee = ((fraction(fee, feeDiscount, feeScale6, CEILING) * nCoins) / (4 * (nCoins - 1))) | |
904 | 904 | let fees = { | |
905 | 905 | let idealBalance = fraction(D1, xp[i], D0) | |
906 | 906 | let difference = if ((idealBalance > newBalance)) | |
907 | 907 | then (idealBalance - newBalance) | |
908 | 908 | else (newBalance - idealBalance) | |
909 | 909 | fraction(_fee, difference, feeScale6) | |
910 | 910 | } | |
911 | 911 | let invariantBalance = (newBalance - fees) | |
912 | 912 | $Tuple2((invBalances :+ invariantBalance), (i + 1)) | |
913 | 913 | } | |
914 | 914 | ||
915 | 915 | let $t02145321523 = { | |
916 | 916 | let $l = newBalances | |
917 | 917 | let $s = size($l) | |
918 | 918 | let $acc0 = $Tuple2(nil, 0) | |
919 | 919 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
920 | 920 | then $a | |
921 | 921 | else calcInvBalances($a, $l[$i]) | |
922 | 922 | ||
923 | 923 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
924 | 924 | then $a | |
925 | 925 | else throw("List size exceeds 15") | |
926 | 926 | ||
927 | 927 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
928 | 928 | } | |
929 | 929 | let invBalances = $t02145321523._1 | |
930 | 930 | let k = $t02145321523._2 | |
931 | 931 | let D2 = getDMem(invBalances, amp) | |
932 | 932 | let mintAmount = fraction(shareSupply, (D2 - D0), D0) | |
933 | 933 | $Tuple2(nil, mintAmount) | |
934 | 934 | } | |
935 | 935 | } | |
936 | 936 | ||
937 | 937 | ||
938 | 938 | ||
939 | 939 | @Callable(msg) | |
940 | 940 | func reissueShare (amount) = valueOrElse(isSelfCall(msg), [Reissue(shareAssetId, amount, true)]) | |
941 | 941 | ||
942 | 942 | ||
943 | 943 | ||
944 | 944 | @Callable(msg) | |
945 | 945 | func getDy (assetFrom,assetTo,dx,userAddress) = { | |
946 | 946 | let xp = _xp() | |
947 | 947 | let fromIndex = valueOrErrorMessage(indexOf(assetIds, assetFrom), "unknown token in") | |
948 | 948 | let toIndex = valueOrErrorMessage(indexOf(assetIds, assetTo), "unknown token out") | |
949 | 949 | let x = (xp[fromIndex] + dx) | |
950 | 950 | let y = getY(fromIndex, toIndex, x, xp) | |
951 | 951 | let dy = ((xp[toIndex] - y) - 1) | |
952 | 952 | let feeDiscount = calculateFeeDiscount(Address(fromBase58String(userAddress))) | |
953 | 953 | let _fee = fraction(fraction(fee, feeDiscount, feeScale6, CEILING), dy, feeScale6) | |
954 | 954 | $Tuple2(nil, $Tuple2((dy - _fee), _fee)) | |
955 | 955 | } | |
956 | 956 | ||
957 | 957 | ||
958 | 958 | ||
959 | 959 | @Callable(msg) | |
960 | 960 | func exchange (tokenOut,min_dy) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
961 | 961 | then throw("size(payments) != 1") | |
962 | 962 | else { | |
963 | 963 | let suspicious = checkSuspicious() | |
964 | 964 | if (suspicious._1) | |
965 | 965 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
966 | 966 | else { | |
967 | 967 | let payment = msg.payments[0] | |
968 | 968 | let tokenIn = getStrAssetId(payment.assetId) | |
969 | 969 | let tokenOutB58 = fromBase58String(tokenOut) | |
970 | 970 | let dx = payment.amount | |
971 | 971 | let fromIndex = valueOrErrorMessage(indexOf(assetIds, tokenIn), "unknown token in") | |
972 | 972 | let toIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
973 | 973 | let xp = _xp() | |
974 | 974 | let x = (xp[fromIndex] + dx) | |
975 | 975 | let y = getY(fromIndex, toIndex, x, xp) | |
976 | 976 | let _dy = ((xp[toIndex] - y) - 1) | |
977 | 977 | let feeDiscount = calculateFeeDiscount(msg.caller) | |
978 | 978 | let _fee = fraction(_dy, fraction(fee, feeDiscount, feeScale6, CEILING), feeScale6) | |
979 | 979 | let dy = (_dy - _fee) | |
980 | 980 | let governanceFees = fraction(_fee, feeGovernance, feeScale6) | |
981 | 981 | if (assert((dy >= min_dy))) | |
982 | 982 | then throw("Exchange resulted in fewer coins than expected") | |
983 | 983 | else { | |
984 | 984 | func makeNewBalances (acc,tokenBalance) = { | |
985 | 985 | let $t02355823584 = acc | |
986 | 986 | let newBalances = $t02355823584._1 | |
987 | 987 | let i = $t02355823584._2 | |
988 | 988 | if ((i == fromIndex)) | |
989 | 989 | then $Tuple2((newBalances :+ (tokenBalance + dx)), (i + 1)) | |
990 | 990 | else if ((i == toIndex)) | |
991 | 991 | then $Tuple2((newBalances :+ (tokenBalance - _dy)), (i + 1)) | |
992 | 992 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
993 | 993 | } | |
994 | 994 | ||
995 | 995 | let $t02383523896 = { | |
996 | 996 | let $l = xp | |
997 | 997 | let $s = size($l) | |
998 | 998 | let $acc0 = $Tuple2(nil, 0) | |
999 | 999 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1000 | 1000 | then $a | |
1001 | 1001 | else makeNewBalances($a, $l[$i]) | |
1002 | 1002 | ||
1003 | 1003 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1004 | 1004 | then $a | |
1005 | 1005 | else throw("List size exceeds 15") | |
1006 | 1006 | ||
1007 | 1007 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
1008 | 1008 | } | |
1009 | 1009 | let newBalances = $t02383523896._1 | |
1010 | 1010 | let i = $t02383523896._2 | |
1011 | 1011 | if (checkDAppThreshold(newBalances)) | |
1012 | 1012 | then throw() | |
1013 | 1013 | else { | |
1014 | 1014 | let s = stake(payment.amount, getStrAssetId(payment.assetId)) | |
1015 | 1015 | if ((s == s)) | |
1016 | 1016 | then { | |
1017 | 1017 | let us = unstake(_dy, tokenOut) | |
1018 | 1018 | if ((us == us)) | |
1019 | 1019 | then { | |
1020 | 1020 | let lpFees = (_fee - governanceFees) | |
1021 | 1021 | let airdrop = if ((lpFees > 0)) | |
1022 | 1022 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
1023 | 1023 | else 0 | |
1024 | 1024 | if ((airdrop == airdrop)) | |
1025 | 1025 | then $Tuple2([IntegerEntry((tokenIn + kAssetBalance), x), IntegerEntry((tokenOut + kAssetBalance), (xp[toIndex] - _dy)), ScriptTransfer(msg.caller, dy, tokenOutB58), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58)], [dy, tokenOutB58]) | |
1026 | 1026 | else throw("Strict value is not equal to itself.") | |
1027 | 1027 | } | |
1028 | 1028 | else throw("Strict value is not equal to itself.") | |
1029 | 1029 | } | |
1030 | 1030 | else throw("Strict value is not equal to itself.") | |
1031 | 1031 | } | |
1032 | 1032 | } | |
1033 | 1033 | } | |
1034 | 1034 | }) | |
1035 | 1035 | ||
1036 | 1036 | ||
1037 | 1037 | ||
1038 | 1038 | @Callable(msg) | |
1039 | 1039 | func withdraw (minAmounts) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
1040 | 1040 | then throw("size(payments) != 1") | |
1041 | 1041 | else { | |
1042 | 1042 | let pmtAmount = msg.payments[0].amount | |
1043 | 1043 | let pmtAssetId = msg.payments[0].assetId | |
1044 | 1044 | if ((shareAssetId != pmtAssetId)) | |
1045 | 1045 | then throw("unknown payment token") | |
1046 | 1046 | else { | |
1047 | 1047 | let suspicious = checkSuspicious() | |
1048 | 1048 | if (suspicious._1) | |
1049 | 1049 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1050 | 1050 | else { | |
1051 | 1051 | func calcScriptActions (acc,balance) = { | |
1052 | 1052 | let $t02518725215 = acc | |
1053 | 1053 | let scriptActions = $t02518725215._1 | |
1054 | 1054 | let i = $t02518725215._2 | |
1055 | 1055 | let wAmount = fraction(balance, pmtAmount, shareSupply) | |
1056 | 1056 | if (assert((wAmount >= minAmounts[i]))) | |
1057 | 1057 | then throw("Withdrawal resulted in fewer coins than expected") | |
1058 | 1058 | else { | |
1059 | 1059 | let us = unstake(wAmount, assetIds[i]) | |
1060 | 1060 | if ((us == us)) | |
1061 | 1061 | then $Tuple2((scriptActions ++ [IntegerEntry((assetIds[i] + kAssetBalance), (balance - wAmount)), ScriptTransfer(msg.originCaller, wAmount, fromBase58String(assetIds[i]))]), (i + 1)) | |
1062 | 1062 | else throw("Strict value is not equal to itself.") | |
1063 | 1063 | } | |
1064 | 1064 | } | |
1065 | 1065 | ||
1066 | 1066 | let $t02570525773 = { | |
1067 | 1067 | let $l = _xp() | |
1068 | 1068 | let $s = size($l) | |
1069 | 1069 | let $acc0 = $Tuple2(nil, 0) | |
1070 | 1070 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1071 | 1071 | then $a | |
1072 | 1072 | else calcScriptActions($a, $l[$i]) | |
1073 | 1073 | ||
1074 | 1074 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1075 | 1075 | then $a | |
1076 | 1076 | else throw("List size exceeds 15") | |
1077 | 1077 | ||
1078 | 1078 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
1079 | 1079 | } | |
1080 | 1080 | let scriptActions = $t02570525773._1 | |
1081 | 1081 | let i = $t02570525773._2 | |
1082 | 1082 | (scriptActions ++ [Burn(shareAssetId, pmtAmount), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))]) | |
1083 | 1083 | } | |
1084 | 1084 | } | |
1085 | 1085 | }) | |
1086 | 1086 | ||
1087 | 1087 | ||
1088 | 1088 | ||
1089 | 1089 | @Callable(msg) | |
1090 | 1090 | func withdrawWithUnlock (minAmounts,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount)) | |
1091 | 1091 | then throw("Unlock amount must be positive") | |
1092 | 1092 | else { | |
1093 | 1093 | let suspicious = checkSuspicious() | |
1094 | 1094 | if (suspicious._1) | |
1095 | 1095 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
1096 | 1096 | else { | |
1097 | 1097 | let pmtAmount = if ((size(msg.payments) > 0)) | |
1098 | 1098 | then if ((size(msg.payments) != 1)) | |
1099 | 1099 | then throw("size(payments) != 1") | |
1100 | 1100 | else { | |
1101 | 1101 | let pmtAssetId = msg.payments[0].assetId | |
1102 | 1102 | if ((shareAssetId != pmtAssetId)) | |
1103 | 1103 | then throw("unknown payment token") | |
1104 | 1104 | else msg.payments[0].amount | |
1105 | 1105 | } | |
1106 | 1106 | else 0 | |
1107 | 1107 | let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil) | |
1108 | 1108 | if ((unlock == unlock)) | |
1109 | 1109 | then { | |
1110 | 1110 | let withdrawAmount = (pmtAmount + unlockAmount) | |
1111 | 1111 | let inv = invoke(this, "withdraw", [minAmounts], [AttachedPayment(shareAssetId, withdrawAmount)]) | |
1112 | 1112 | if ((inv == inv)) | |
1113 | 1113 | then nil | |
1114 | 1114 | else throw("Strict value is not equal to itself.") | |
1115 | 1115 | } | |
1116 | 1116 | else throw("Strict value is not equal to itself.") | |
1117 | 1117 | } | |
1118 | 1118 | }) | |
1119 | 1119 | ||
1120 | 1120 | ||
1121 | 1121 | ||
1122 | 1122 | @Callable(msg) | |
1123 | 1123 | func calcWithdrawOneCoin (tokenAmount,tokenOut,user) = { | |
1124 | 1124 | let i = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1125 | 1125 | $Tuple2(nil, _calcWithdrawOneCoin(_xp(), tokenAmount, i, Address(fromBase58String(user)))._1) | |
1126 | 1126 | } | |
1127 | 1127 | ||
1128 | 1128 | ||
1129 | 1129 | ||
1130 | 1130 | @Callable(msg) | |
1131 | 1131 | func withdrawOneCoin (tokenOut,minAmount) = valueOrElse(isActive(), if ((size(msg.payments) != 1)) | |
1132 | 1132 | then throw("size(payments) != 1") | |
1133 | 1133 | else { | |
1134 | 1134 | let suspicious = checkSuspicious() | |
1135 | 1135 | if (suspicious._1) | |
1136 | 1136 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.originCaller, msg.payments)) | |
1137 | 1137 | else { | |
1138 | 1138 | let pmtAmount = msg.payments[0].amount | |
1139 | 1139 | let pmtAssetId = msg.payments[0].assetId | |
1140 | 1140 | if ((pmtAssetId != shareAssetId)) | |
1141 | 1141 | then throw("unknown token") | |
1142 | 1142 | else { | |
1143 | 1143 | let outIndex = valueOrErrorMessage(indexOf(assetIds, tokenOut), "unknown token out") | |
1144 | 1144 | let tokenOutB58 = fromBase58String(tokenOut) | |
1145 | 1145 | let xp = _xp() | |
1146 | 1146 | let $t02773727819 = _calcWithdrawOneCoin(xp, pmtAmount, outIndex, msg.originCaller) | |
1147 | 1147 | let dy = $t02773727819._1 | |
1148 | 1148 | let dy_fee = $t02773727819._2 | |
1149 | 1149 | if (assert((dy >= minAmount))) | |
1150 | 1150 | then throw("Not enough coins removed") | |
1151 | 1151 | else { | |
1152 | 1152 | let governanceFees = fraction(dy_fee, feeGovernance, feeScale6) | |
1153 | 1153 | let dy_and_fee = (dy + dy_fee) | |
1154 | 1154 | func makeNewBalances (acc,tokenBalance) = { | |
1155 | 1155 | let $t02807728103 = acc | |
1156 | 1156 | let newBalances = $t02807728103._1 | |
1157 | 1157 | let i = $t02807728103._2 | |
1158 | 1158 | if ((i == outIndex)) | |
1159 | 1159 | then $Tuple2((newBalances :+ (tokenBalance - dy_and_fee)), (i + 1)) | |
1160 | 1160 | else $Tuple2((newBalances :+ tokenBalance), (i + 1)) | |
1161 | 1161 | } | |
1162 | 1162 | ||
1163 | 1163 | let $t02827028331 = { | |
1164 | 1164 | let $l = xp | |
1165 | 1165 | let $s = size($l) | |
1166 | 1166 | let $acc0 = $Tuple2(nil, 0) | |
1167 | 1167 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1168 | 1168 | then $a | |
1169 | 1169 | else makeNewBalances($a, $l[$i]) | |
1170 | 1170 | ||
1171 | 1171 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1172 | 1172 | then $a | |
1173 | 1173 | else throw("List size exceeds 15") | |
1174 | 1174 | ||
1175 | 1175 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
1176 | 1176 | } | |
1177 | 1177 | let newBalances = $t02827028331._1 | |
1178 | 1178 | let v = $t02827028331._2 | |
1179 | 1179 | if (checkDAppThreshold(newBalances)) | |
1180 | 1180 | then throw() | |
1181 | 1181 | else { | |
1182 | 1182 | let us = unstake(dy_and_fee, tokenOut) | |
1183 | 1183 | if ((us == us)) | |
1184 | 1184 | then { | |
1185 | 1185 | let lpFees = (dy_fee - governanceFees) | |
1186 | 1186 | let airdrop = if ((lpFees > 0)) | |
1187 | 1187 | then invoke(lpFarmingAddress, "airDrop", nil, [AttachedPayment(tokenOutB58, lpFees)]) | |
1188 | 1188 | else 0 | |
1189 | 1189 | if ((airdrop == airdrop)) | |
1190 | 1190 | then [ScriptTransfer(msg.originCaller, dy, tokenOutB58), IntegerEntry((assetIds[outIndex] + kAssetBalance), (xp[outIndex] - dy_and_fee)), Burn(shareAssetId, pmtAmount), ScriptTransfer(moneyBoxAddress, governanceFees, tokenOutB58), IntegerEntry(kShareAssetSupply, (shareSupply - pmtAmount))] | |
1191 | 1191 | else throw("Strict value is not equal to itself.") | |
1192 | 1192 | } | |
1193 | 1193 | else throw("Strict value is not equal to itself.") | |
1194 | 1194 | } | |
1195 | 1195 | } | |
1196 | 1196 | } | |
1197 | 1197 | } | |
1198 | 1198 | }) | |
1199 | 1199 | ||
1200 | 1200 | ||
1201 | 1201 | ||
1202 | 1202 | @Callable(msg) | |
1203 | 1203 | func withdrawOneCoinWithUnlock (tokenOut,minAmount,unlockAmount) = valueOrElse(isActive(), if ((0 >= unlockAmount)) | |
1204 | 1204 | then throw("Unlock amount must be positive") | |
1205 | 1205 | else { | |
1206 | 1206 | let suspicious = checkSuspicious() | |
1207 | 1207 | if (suspicious._1) | |
1208 | 1208 | then (suspendSuspicious(suspicious._2) ++ returnPayments(msg.caller, msg.payments)) | |
1209 | 1209 | else { | |
1210 | 1210 | let pmtAmount = if ((size(msg.payments) > 0)) | |
1211 | 1211 | then if ((size(msg.payments) != 1)) | |
1212 | 1212 | then throw("size(payments) != 1") | |
1213 | 1213 | else { | |
1214 | 1214 | let pmtAssetId = msg.payments[0].assetId | |
1215 | 1215 | if ((shareAssetId != pmtAssetId)) | |
1216 | 1216 | then throw("unknown payment token") | |
1217 | 1217 | else msg.payments[0].amount | |
1218 | 1218 | } | |
1219 | 1219 | else 0 | |
1220 | 1220 | let unlock = invoke(farmingAddress, "withdrawShareTokens", [toString(this), unlockAmount], nil) | |
1221 | 1221 | if ((unlock == unlock)) | |
1222 | 1222 | then { | |
1223 | 1223 | let withdrawAmount = (pmtAmount + unlockAmount) | |
1224 | 1224 | let inv = invoke(this, "withdrawOneCoin", [tokenOut, minAmount], [AttachedPayment(shareAssetId, withdrawAmount)]) | |
1225 | 1225 | if ((inv == inv)) | |
1226 | 1226 | then nil | |
1227 | 1227 | else throw("Strict value is not equal to itself.") | |
1228 | 1228 | } | |
1229 | 1229 | else throw("Strict value is not equal to itself.") | |
1230 | 1230 | } | |
1231 | 1231 | }) | |
1232 | 1232 | ||
1233 | 1233 | ||
1234 | 1234 | ||
1235 | 1235 | @Callable(msg) | |
1236 | 1236 | func A () = $Tuple2(nil, _A()) | |
1237 | 1237 | ||
1238 | 1238 | ||
1239 | 1239 | ||
1240 | 1240 | @Callable(msg) | |
1241 | 1241 | func getVirtualPrice () = { | |
1242 | 1242 | let D = get_D(_xp(), _A()) | |
1243 | 1243 | $Tuple2(nil, fraction(D, PRECISION, shareSupply)) | |
1244 | 1244 | } | |
1245 | 1245 | ||
1246 | 1246 | ||
1247 | 1247 | ||
1248 | 1248 | @Callable(msg) | |
1249 | 1249 | func calcTokenAmount (amounts,deposit) = { | |
1250 | 1250 | let amp = _A() | |
1251 | 1251 | let balances = _xp() | |
1252 | 1252 | let D0 = getDMem(balances, amp) | |
1253 | 1253 | func calcNewBalances (acc,balance) = { | |
1254 | 1254 | let $t03034830374 = acc | |
1255 | 1255 | let newBalances = $t03034830374._1 | |
1256 | 1256 | let i = $t03034830374._2 | |
1257 | 1257 | let newBalance = (balance + (if (deposit) | |
1258 | 1258 | then amounts[i] | |
1259 | 1259 | else -(amounts[i]))) | |
1260 | 1260 | $Tuple2((newBalances :+ newBalance), (i + 1)) | |
1261 | 1261 | } | |
1262 | 1262 | ||
1263 | 1263 | let newBalances = ( let $l = balances | |
1264 | 1264 | let $s = size($l) | |
1265 | 1265 | let $acc0 = $Tuple2(nil, 0) | |
1266 | 1266 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
1267 | 1267 | then $a | |
1268 | 1268 | else calcNewBalances($a, $l[$i]) | |
1269 | 1269 | ||
1270 | 1270 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
1271 | 1271 | then $a | |
1272 | 1272 | else throw("List size exceeds 15") | |
1273 | 1273 | ||
1274 | 1274 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15))._1 | |
1275 | 1275 | let D1 = getDMem(newBalances, amp) | |
1276 | 1276 | let diff = if (deposit) | |
1277 | 1277 | then (D1 - D0) | |
1278 | 1278 | else (D0 - D1) | |
1279 | 1279 | $Tuple2(nil, fraction(diff, shareSupply, D0)) | |
1280 | 1280 | } | |
1281 | 1281 | ||
1282 | 1282 | ||
1283 | 1283 | ||
1284 | 1284 | @Callable(msg) | |
1285 | 1285 | func rampA (_futureA,_futureTime) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), if (assert((blockTimestamp >= (initial_A_time + MIN_RAMP_TIME)))) | |
1286 | 1286 | then throw("too often") | |
1287 | 1287 | else if (assert((_futureTime >= (blockTimestamp + MIN_RAMP_TIME)))) | |
1288 | 1288 | then throw("insufficient time") | |
1289 | 1289 | else { | |
1290 | 1290 | let _initial_A = _A() | |
1291 | 1291 | if (assert(if ((_futureA > 0)) | |
1292 | 1292 | then (MAX_A > _futureA) | |
1293 | 1293 | else false)) | |
1294 | 1294 | then throw("out of base range") | |
1295 | 1295 | else if (assert(if (if ((_futureA >= _initial_A)) | |
1296 | 1296 | then ((_initial_A * MAX_A_CHANGE) >= _futureA) | |
1297 | 1297 | else false) | |
1298 | 1298 | then true | |
1299 | 1299 | else if ((_initial_A > _futureA)) | |
1300 | 1300 | then ((_futureA * MAX_A_CHANGE) >= _initial_A) | |
1301 | 1301 | else false)) | |
1302 | 1302 | then throw("out of range") | |
1303 | 1303 | else [IntegerEntry("initial_A", _initial_A), IntegerEntry("future_A", _futureA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", _futureTime)] | |
1304 | 1304 | })) | |
1305 | 1305 | ||
1306 | 1306 | ||
1307 | 1307 | ||
1308 | 1308 | @Callable(msg) | |
1309 | 1309 | func stopRampA () = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), { | |
1310 | 1310 | let currentA = _A() | |
1311 | 1311 | [IntegerEntry("initial_A", currentA), IntegerEntry("future_A", currentA), IntegerEntry("initial_A_time", blockTimestamp), IntegerEntry("future_A_time", blockTimestamp)] | |
1312 | 1312 | })) | |
1313 | 1313 | ||
1314 | 1314 | ||
1315 | 1315 | ||
1316 | 1316 | @Callable(msg) | |
1317 | 1317 | func shutdown () = valueOrElse(isAdminCall(msg), if (!(active)) | |
1318 | 1318 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
1319 | 1319 | else suspend("Paused by admin")) | |
1320 | 1320 | ||
1321 | 1321 | ||
1322 | 1322 | ||
1323 | 1323 | @Callable(msg) | |
1324 | 1324 | func activate () = valueOrElse(isAdminCall(msg), if (active) | |
1325 | 1325 | then throwIsActive() | |
1326 | 1326 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
1327 | 1327 | ||
1328 | 1328 | ||
1329 | 1329 | ||
1330 | 1330 | @Callable(msg) | |
1331 | 1331 | func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), valueOrElse(isAdminCall(msg), [IntegerEntry(kShareLimit, shareLimit)])) | |
1332 | 1332 | ||
1333 | 1333 | ||
1334 | 1334 | @Verifier(tx) | |
1335 | 1335 | func verify () = { | |
1336 | 1336 | let multiSignedByAdmins = { | |
1337 | 1337 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1338 | 1338 | then 1 | |
1339 | 1339 | else 0 | |
1340 | 1340 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
1341 | 1341 | then 1 | |
1342 | 1342 | else 0 | |
1343 | 1343 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
1344 | 1344 | then 1 | |
1345 | 1345 | else 0 | |
1346 | 1346 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
1347 | 1347 | } | |
1348 | 1348 | match tx { | |
1349 | 1349 | case inv: InvokeScriptTransaction => | |
1350 | 1350 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
1351 | 1351 | then (inv.function == "takeIntoAccountExtraFunds") | |
1352 | 1352 | else false | |
1353 | 1353 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
1354 | 1354 | then true | |
1355 | 1355 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
1356 | 1356 | then true | |
1357 | 1357 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
1358 | 1358 | then true | |
1359 | 1359 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke) | |
1360 | 1360 | if (if (callTakeIntoAccount) | |
1361 | 1361 | then signedByAdmin | |
1362 | 1362 | else false) | |
1363 | 1363 | then true | |
1364 | 1364 | else multiSignedByAdmins | |
1365 | 1365 | case _ => | |
1366 | 1366 | multiSignedByAdmins | |
1367 | 1367 | } | |
1368 | 1368 | } | |
1369 | 1369 |
github/deemru/w8io/026f985 159.77 ms ◑