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