tx · DdJDhYPMffXH31gE2Er1GZPaE4VZsdwXJfmGCKJQ4akx 3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW: -0.14000000 Waves 2022.06.01 15:15 [2077270] smart account 3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW > SELF 0.00000000 Waves
{ "type": 13, "id": "DdJDhYPMffXH31gE2Er1GZPaE4VZsdwXJfmGCKJQ4akx", "fee": 14000000, "feeAssetId": null, "timestamp": 1654085719692, "version": 2, "chainId": 84, "sender": "3N5Xd7QVQZWntaJwha9Kg42is626GUPjtUW", "senderPublicKey": "DfbjpZJBbZwnUKysUkxCbWTE1ZWuoUb6Y6BZdu5iAE8j", "proofs": [ "4TLi9YmtwHwqQHdadzYxYQ81UTdSouooo6zwENNyAUCXgpSiPAxk3jGPJcaEDTTi7AHNhF9tmwBvXmVE8eKqdG8q", "2gnBq5t9r8ovvtx4FHE5129BZmZtMzmvBe7o3SyKNfrtdMo42NcLqh49TqSsrsE6Cthu9PTgRWEqrzsZtHeZrmt7" ], "script": "base64:AAIFAAAAAAAAEmgIAhIAEgASBAoCAQESABIECgIBARIAEgASABIFCgMEAQgSABoMCgFBEgckbWF0Y2gwGgsKAUISBnN0cmluZxoMCgFDEgdub3RoaW5nGhEKAUQSDGFkbWluUHViS2V5MRoRCgFFEgxhZG1pblB1YktleTIaEQoBRhIMYWRtaW5QdWJLZXkzGhYKAUcSEWFkbWluUHViS2V5SW52b2tlGhQKAUgSD21vbmV5Qm94QWRkcmVzcxoPCgFJEgpnb3ZBZGRyZXNzGhcKAUoSEnN0YWtpbmdVU0ROQWRkcmVzcxoJCgFLEgRVU0ROGhIKAUwSDXN0YWtpbmdBc3NldHMaCwoBTRIGYWN0aXZlGhAKAU4SC3N0ckFzc2V0SWRBGhAKAU8SC3N0ckFzc2V0SWRCGg0KAVASCGFzc2V0SWRBGg0KAVESCGFzc2V0SWRCGg8KAVISCmFzc2V0TmFtZUEaBwoBUxICaWQaCgoBVBIFd2F2ZXMaDw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wkAAZEAAAACCAUAAAACZHMAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAFHAwMFAAAAAmR5BQAAAAJkegcGBQAAAAJkdQUAAAACZHWDrJ8K", "height": 2077270, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HygCxrYtpuVh4v3sHwRDbZnphiqNuV3JmvpqhkAcq6D3 Next: sRVmQR5UUJKRKZCf1TQfzRMKNNSybvkhGumCVmFFztf Diff:
Old | New | Differences | |
---|---|---|---|
614 | 614 | then assetIdB | |
615 | 615 | else assetIdA | |
616 | 616 | let amount = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId) | |
617 | - | let feeDiscount = calculateFeeDiscount(i. | |
617 | + | let feeDiscount = calculateFeeDiscount(i.originCaller) | |
618 | 618 | let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, 100, CEILING), feeScale6) | |
619 | 619 | let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, 100, CEILING)), feeScale6) | |
620 | - | let $ | |
620 | + | let $t02459824860 = if ((pmtAssetId == assetIdA)) | |
621 | 621 | then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward)) | |
622 | 622 | else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount)) | |
623 | - | let newBalanceA = $ | |
624 | - | let newBalanceB = $ | |
623 | + | let newBalanceA = $t02459824860._1 | |
624 | + | let newBalanceB = $t02459824860._2 | |
625 | 625 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
626 | 626 | if (if ((dAppThresholdAmount > newBalanceA)) | |
627 | 627 | then true | |
628 | 628 | else (dAppThresholdAmount > newBalanceB)) | |
629 | 629 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
630 | 630 | else { | |
631 | - | let $ | |
632 | - | let pmtStrAssetId = $ | |
633 | - | let pmtAssetName = $ | |
634 | - | let pmtDecimals = $ | |
635 | - | let $ | |
636 | - | let sendStrAssetId = $ | |
637 | - | let sendAssetName = $ | |
638 | - | let sendDecimals = $ | |
631 | + | let $t02515925232 = getAssetInfo(pmtAssetId) | |
632 | + | let pmtStrAssetId = $t02515925232._1 | |
633 | + | let pmtAssetName = $t02515925232._2 | |
634 | + | let pmtDecimals = $t02515925232._3 | |
635 | + | let $t02524525322 = getAssetInfo(sendAssetId) | |
636 | + | let sendStrAssetId = $t02524525322._1 | |
637 | + | let sendAssetName = $t02524525322._2 | |
638 | + | let sendDecimals = $t02524525322._3 | |
639 | 639 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetId)) | |
640 | 640 | then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil) | |
641 | 641 | else 0 | |
711 | 711 | func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this)) | |
712 | 712 | then throw("Only contract itself can invoke this function") | |
713 | 713 | else { | |
714 | - | let $ | |
715 | - | let call = $ | |
716 | - | let addr = $ | |
717 | - | let params = $ | |
718 | - | let payments = $ | |
714 | + | let $t02832628429 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
715 | + | let call = $t02832628429._1 | |
716 | + | let addr = $t02832628429._2 | |
717 | + | let params = $t02832628429._3 | |
718 | + | let payments = $t02832628429._4 | |
719 | 719 | let inv = invoke(addr, call, params, payments) | |
720 | 720 | if ((inv == inv)) | |
721 | 721 | then nil |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = "2.0.0" | |
5 | 5 | ||
6 | 6 | let kVersion = "version" | |
7 | 7 | ||
8 | 8 | let kActive = "active" | |
9 | 9 | ||
10 | 10 | let kAssetIdA = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let kAssetIdB = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let kBalanceA = "A_asset_balance" | |
15 | 15 | ||
16 | 16 | let kBalanceB = "B_asset_balance" | |
17 | 17 | ||
18 | 18 | let kShareAssetId = "share_asset_id" | |
19 | 19 | ||
20 | 20 | let kShareAssetSupply = "share_asset_supply" | |
21 | 21 | ||
22 | 22 | let kFee = "commission" | |
23 | 23 | ||
24 | 24 | let kInvariant = "invariant" | |
25 | 25 | ||
26 | 26 | let kCause = "shutdown_cause" | |
27 | 27 | ||
28 | 28 | let kUSDNAddress = "staking_usdnnsbt_address" | |
29 | 29 | ||
30 | 30 | let kEURNAddress = "staking_eurn_address" | |
31 | 31 | ||
32 | 32 | let kDiscounts = "discounts" | |
33 | 33 | ||
34 | 34 | let kDiscountValues = "discount_values" | |
35 | 35 | ||
36 | 36 | let kUserSwopInGov = "_SWOP_amount" | |
37 | 37 | ||
38 | 38 | let kAdminPubKey1 = "admin_pub_1" | |
39 | 39 | ||
40 | 40 | let kAdminPubKey2 = "admin_pub_2" | |
41 | 41 | ||
42 | 42 | let kAdminPubKey3 = "admin_pub_3" | |
43 | 43 | ||
44 | 44 | let kAdminInvokePubKey = "admin_invoke_pub" | |
45 | 45 | ||
46 | 46 | let kMoneyBoxAddress = "money_box_address" | |
47 | 47 | ||
48 | 48 | let kGovAddress = "governance_address" | |
49 | 49 | ||
50 | 50 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
51 | 51 | ||
52 | 52 | func getBase58FromOracle (key) = match getString(oracle, key) { | |
53 | 53 | case string: String => | |
54 | 54 | fromBase58String(string) | |
55 | 55 | case nothing => | |
56 | 56 | throw((key + "is empty")) | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
61 | 61 | ||
62 | 62 | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
63 | 63 | ||
64 | 64 | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
65 | 65 | ||
66 | 66 | let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey) | |
67 | 67 | ||
68 | 68 | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
69 | 69 | ||
70 | 70 | let govAddress = Address(getBase58FromOracle(kGovAddress)) | |
71 | 71 | ||
72 | 72 | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
73 | 73 | ||
74 | 74 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
75 | 75 | ||
76 | 76 | let stakingAssets = [toBase58String(USDN)] | |
77 | 77 | ||
78 | 78 | let active = getBooleanValue(this, kActive) | |
79 | 79 | ||
80 | 80 | let strAssetIdA = getStringValue(this, kAssetIdA) | |
81 | 81 | ||
82 | 82 | let strAssetIdB = getStringValue(this, kAssetIdB) | |
83 | 83 | ||
84 | 84 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
85 | 85 | then unit | |
86 | 86 | else fromBase58String(strAssetIdA) | |
87 | 87 | ||
88 | 88 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
89 | 89 | then unit | |
90 | 90 | else fromBase58String(strAssetIdB) | |
91 | 91 | ||
92 | 92 | let assetNameA = match assetIdA { | |
93 | 93 | case id: ByteVector => | |
94 | 94 | value(assetInfo(id)).name | |
95 | 95 | case waves: Unit => | |
96 | 96 | "WAVES" | |
97 | 97 | case _ => | |
98 | 98 | throw("Match error") | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | let assetNameB = match assetIdB { | |
102 | 102 | case id: ByteVector => | |
103 | 103 | value(assetInfo(id)).name | |
104 | 104 | case waves: Unit => | |
105 | 105 | "WAVES" | |
106 | 106 | case _ => | |
107 | 107 | throw("Match error") | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | let balanceA = getIntegerValue(this, kBalanceA) | |
111 | 111 | ||
112 | 112 | let balanceB = getIntegerValue(this, kBalanceB) | |
113 | 113 | ||
114 | 114 | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
115 | 115 | ||
116 | 116 | let shareAssetSupply = getIntegerValue(this, kShareAssetSupply) | |
117 | 117 | ||
118 | 118 | let invariant = getIntegerValue(this, kInvariant) | |
119 | 119 | ||
120 | 120 | let fee = getIntegerValue(this, kFee) | |
121 | 121 | ||
122 | 122 | let feeGovernance = fraction(fee, 40, 100) | |
123 | 123 | ||
124 | 124 | let feeScale6 = 1000000 | |
125 | 125 | ||
126 | 126 | let scale3 = 1000 | |
127 | 127 | ||
128 | 128 | let scale8 = 100000000 | |
129 | 129 | ||
130 | 130 | let scale16 = 10000000000000000 | |
131 | 131 | ||
132 | 132 | let slippageScale3 = 1000 | |
133 | 133 | ||
134 | 134 | let digits8 = 8 | |
135 | 135 | ||
136 | 136 | let dAppThreshold = 50 | |
137 | 137 | ||
138 | 138 | let dAppThresholdScale2 = 100 | |
139 | 139 | ||
140 | 140 | let exchangeRatioLimitMin = 90000000 | |
141 | 141 | ||
142 | 142 | let exchangeRatioLimitMax = 110000000 | |
143 | 143 | ||
144 | 144 | let alpha = 50 | |
145 | 145 | ||
146 | 146 | let alphaDigits = 2 | |
147 | 147 | ||
148 | 148 | let beta = 4600000000000000 | |
149 | 149 | ||
150 | 150 | func accountBalance (assetId) = match assetId { | |
151 | 151 | case id: ByteVector => | |
152 | 152 | assetBalance(this, id) | |
153 | 153 | case waves: Unit => | |
154 | 154 | wavesBalance(this).available | |
155 | 155 | case _ => | |
156 | 156 | throw("Match error") | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func stakedAmount (assetId) = { | |
161 | 161 | let stakedAmountCalculated = match assetId { | |
162 | 162 | case aId: ByteVector => | |
163 | 163 | if ((aId == USDN)) | |
164 | 164 | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
165 | 165 | else 0 | |
166 | 166 | case _: Unit => | |
167 | 167 | 0 | |
168 | 168 | case _ => | |
169 | 169 | throw("Match error") | |
170 | 170 | } | |
171 | 171 | match stakedAmountCalculated { | |
172 | 172 | case i: Int => | |
173 | 173 | i | |
174 | 174 | case _ => | |
175 | 175 | 0 | |
176 | 176 | } | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | let stakedAmountA = stakedAmount(assetIdA) | |
181 | 181 | ||
182 | 182 | let stakedAmountB = stakedAmount(assetIdB) | |
183 | 183 | ||
184 | 184 | let availableBalanceA = (balanceA - stakedAmountA) | |
185 | 185 | ||
186 | 186 | let availableBalanceB = (balanceB - stakedAmountB) | |
187 | 187 | ||
188 | 188 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA) | |
189 | 189 | ||
190 | 190 | let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB) | |
191 | 191 | ||
192 | 192 | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
193 | 193 | then (accountBalanceWithStakedB >= balanceB) | |
194 | 194 | else false | |
195 | 195 | ||
196 | 196 | func skewness (x,y) = ((fraction(scale16, x, y) + fraction(scale16, y, x)) / 2) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func invariantCalc (x,y) = { | |
200 | 200 | let sk = skewness(x, y) | |
201 | 201 | (fraction((x + y), scale16, pow(sk, digits8, alpha, alphaDigits, digits8, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(x), toBigInt(y), toBigInt(scale8)), 0, toBigInt(5), 1, (digits8 / 2), DOWN)), pow((sk - beta), digits8, alpha, alphaDigits, digits8, DOWN), scale8))) | |
202 | 202 | } | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func calculateSendAmount (amountToSendEstimated,minTokenReceiveAmount,tokenReceiveAmount,tokenId) = { | |
206 | 206 | let worstAllowedNewInvariantRatio = (scale16 - ((scale16 * 1) / 10000000)) | |
207 | 207 | let deltaBetweenMaxAndMinSendValue = (amountToSendEstimated - minTokenReceiveAmount) | |
208 | 208 | let x = (balanceA + tokenReceiveAmount) | |
209 | 209 | let y = (balanceB + tokenReceiveAmount) | |
210 | 210 | func getStepAmount (acc,step) = if ((acc._1 == -1)) | |
211 | 211 | then { | |
212 | 212 | let amountToSend = (amountToSendEstimated - (((step * deltaBetweenMaxAndMinSendValue) / 3) / scale3)) | |
213 | 213 | let stepInvariant = if ((tokenId == assetIdA)) | |
214 | 214 | then invariantCalc(x, (balanceB - amountToSend)) | |
215 | 215 | else invariantCalc((balanceA - amountToSend), y) | |
216 | 216 | if ((stepInvariant > invariant)) | |
217 | 217 | then $Tuple2(amountToSend, stepInvariant) | |
218 | 218 | else $Tuple2(-1, 0) | |
219 | 219 | } | |
220 | 220 | else acc | |
221 | 221 | ||
222 | 222 | let amountToSendMin = getStepAmount($Tuple2(-1, 0), 3000) | |
223 | 223 | if ((0 > amountToSendMin._1)) | |
224 | 224 | then throw("Price is worse than minReceived") | |
225 | 225 | else { | |
226 | 226 | let invEstimated = if ((tokenId == assetIdA)) | |
227 | 227 | then invariantCalc(x, (balanceB - amountToSendEstimated)) | |
228 | 228 | else if ((tokenId == assetIdB)) | |
229 | 229 | then invariantCalc((balanceA - amountToSendEstimated), y) | |
230 | 230 | else throw("Wrong asset in payment") | |
231 | 231 | if ((invariant > invEstimated)) | |
232 | 232 | then if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, invEstimated))) | |
233 | 233 | then throw("The requested price is too not profitable for user") | |
234 | 234 | else { | |
235 | 235 | let a = { | |
236 | 236 | let $l = [25, 200, 500] | |
237 | 237 | let $s = size($l) | |
238 | 238 | let $acc0 = $Tuple2(-1, 0) | |
239 | 239 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
240 | 240 | then $a | |
241 | 241 | else getStepAmount($a, $l[$i]) | |
242 | 242 | ||
243 | 243 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
244 | 244 | then $a | |
245 | 245 | else throw("List size exceeds 3") | |
246 | 246 | ||
247 | 247 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
248 | 248 | } | |
249 | 249 | if ((0 > a._1)) | |
250 | 250 | then amountToSendMin._1 | |
251 | 251 | else a._1 | |
252 | 252 | } | |
253 | 253 | else { | |
254 | 254 | let a = { | |
255 | 255 | let $l = [-500, -200, -25] | |
256 | 256 | let $s = size($l) | |
257 | 257 | let $acc0 = $Tuple2(-1, 0) | |
258 | 258 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
259 | 259 | then $a | |
260 | 260 | else getStepAmount($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 3") | |
265 | 265 | ||
266 | 266 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
267 | 267 | } | |
268 | 268 | let tupleSendBetter = if ((0 > a._1)) | |
269 | 269 | then $Tuple2(amountToSendEstimated, invEstimated) | |
270 | 270 | else a | |
271 | 271 | if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, tupleSendBetter._2))) | |
272 | 272 | then throw("The requested price is too not profitable for user") | |
273 | 273 | else tupleSendBetter._1 | |
274 | 274 | } | |
275 | 275 | } | |
276 | 276 | } | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | func getAssetInfo (assetId) = match assetId { | |
280 | 280 | case id: ByteVector => | |
281 | 281 | let stringId = toBase58String(id) | |
282 | 282 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
283 | 283 | $Tuple3(stringId, info.name, info.decimals) | |
284 | 284 | case waves: Unit => | |
285 | 285 | $Tuple3("WAVES", "WAVES", 8) | |
286 | 286 | case _ => | |
287 | 287 | throw("Match error") | |
288 | 288 | } | |
289 | 289 | ||
290 | 290 | ||
291 | 291 | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func throwIsActive () = throw("DApp is already active") | |
295 | 295 | ||
296 | 296 | ||
297 | 297 | func isActive () = if (active) | |
298 | 298 | then unit | |
299 | 299 | else throw("DApp is inactive at this moment") | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)) | |
303 | 303 | then unit | |
304 | 304 | else throw("Only admin can call this function") | |
305 | 305 | ||
306 | 306 | ||
307 | 307 | func throwAssets () = throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | func throwOnePayment () = throw("One attached payment expected") | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | func throwThreshold (threshold,amountA,amountB) = throw(((((((((("New balance in assets of the DApp is less than threshold " + toString(threshold)) + ": ") + toString(amountA)) + " ") + assetNameA) + ", ") + toString(amountB)) + " ") + assetNameB)) | |
314 | 314 | ||
315 | 315 | ||
316 | 316 | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
317 | 317 | ||
318 | 318 | ||
319 | 319 | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
320 | 320 | then $Tuple2("lockNeutrino", stakingUSDNAddress) | |
321 | 321 | else $Tuple2("unlockNeutrino", stakingUSDNAddress) | |
322 | 322 | ||
323 | 323 | ||
324 | 324 | func calcStakingParams (stake,amount,assetId) = if (stake) | |
325 | 325 | then { | |
326 | 326 | let $t093469412 = calcStakingFuncAndAddres(stake, assetId) | |
327 | 327 | let call = $t093469412._1 | |
328 | 328 | let stakingAddr = $t093469412._2 | |
329 | 329 | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
330 | 330 | } | |
331 | 331 | else { | |
332 | 332 | let $t094989564 = calcStakingFuncAndAddres(stake, assetId) | |
333 | 333 | let call = $t094989564._1 | |
334 | 334 | let stakingAddr = $t094989564._2 | |
335 | 335 | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
336 | 336 | } | |
337 | 337 | ||
338 | 338 | ||
339 | 339 | func calculateFeeDiscount (userAddr) = { | |
340 | 340 | let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0) | |
341 | 341 | let discountValues = split(getStringValue(oracle, kDiscountValues), ",") | |
342 | 342 | let discounts = split(getStringValue(oracle, kDiscounts), ",") | |
343 | 343 | if (if ((swopAmount >= parseIntValue(discountValues[0]))) | |
344 | 344 | then (parseIntValue(discountValues[1]) > swopAmount) | |
345 | 345 | else false) | |
346 | 346 | then (100 - parseIntValue(discounts[0])) | |
347 | 347 | else if (if ((swopAmount >= parseIntValue(discountValues[1]))) | |
348 | 348 | then (parseIntValue(discountValues[2]) > swopAmount) | |
349 | 349 | else false) | |
350 | 350 | then (100 - parseIntValue(discounts[1])) | |
351 | 351 | else if (if ((swopAmount >= parseIntValue(discountValues[2]))) | |
352 | 352 | then (parseIntValue(discountValues[3]) > swopAmount) | |
353 | 353 | else false) | |
354 | 354 | then (100 - parseIntValue(discounts[2])) | |
355 | 355 | else if (if ((swopAmount >= parseIntValue(discountValues[3]))) | |
356 | 356 | then (parseIntValue(discountValues[4]) > swopAmount) | |
357 | 357 | else false) | |
358 | 358 | then (100 - parseIntValue(discounts[3])) | |
359 | 359 | else if ((swopAmount >= parseIntValue(discountValues[4]))) | |
360 | 360 | then (100 - parseIntValue(discounts[4])) | |
361 | 361 | else 100 | |
362 | 362 | } | |
363 | 363 | ||
364 | 364 | ||
365 | 365 | @Callable(i) | |
366 | 366 | func init () = { | |
367 | 367 | let $t01070010777 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
368 | 368 | let pmtAmountA = $t01070010777._1 | |
369 | 369 | let pmtAssetIdA = $t01070010777._2 | |
370 | 370 | let $t01078210859 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
371 | 371 | let pmtAmountB = $t01078210859._1 | |
372 | 372 | let pmtAssetIdB = $t01078210859._2 | |
373 | 373 | let $t01086410941 = getAssetInfo(pmtAssetIdA) | |
374 | 374 | let pmtStrAssetIdA = $t01086410941._1 | |
375 | 375 | let pmtAssetNameA = $t01086410941._2 | |
376 | 376 | let pmtDecimalsA = $t01086410941._3 | |
377 | 377 | let $t01094611023 = getAssetInfo(pmtAssetIdB) | |
378 | 378 | let pmtStrAssetIdB = $t01094611023._1 | |
379 | 379 | let pmtAssetNameB = $t01094611023._2 | |
380 | 380 | let pmtDecimalsB = $t01094611023._3 | |
381 | 381 | if (isDefined(getBoolean(this, kActive))) | |
382 | 382 | then throwIsActive() | |
383 | 383 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
384 | 384 | then throw("Assets must be different") | |
385 | 385 | else { | |
386 | 386 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
387 | 387 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
388 | 388 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
389 | 389 | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
390 | 390 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
391 | 391 | let shareIssueId = calculateAssetId(shareIssue) | |
392 | 392 | let invariantCalculated = invariantCalc(pmtAmountA, pmtAmountB) | |
393 | 393 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
394 | 394 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
395 | 395 | else 0 | |
396 | 396 | if ((stake1 == stake1)) | |
397 | 397 | then { | |
398 | 398 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
399 | 399 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
400 | 400 | else 0 | |
401 | 401 | if ((stake2 == stake2)) | |
402 | 402 | then [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kInvariant, invariantCalculated), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
403 | 403 | else throw("Strict value is not equal to itself.") | |
404 | 404 | } | |
405 | 405 | else throw("Strict value is not equal to itself.") | |
406 | 406 | } | |
407 | 407 | } | |
408 | 408 | ||
409 | 409 | ||
410 | 410 | ||
411 | 411 | @Callable(i) | |
412 | 412 | func replenishWithTwoTokens () = valueOrElse(isActive(), { | |
413 | 413 | let pmtAssetIdA = i.payments[0].assetId | |
414 | 414 | let pmtAssetIdB = i.payments[1].assetId | |
415 | 415 | let ratioShareTokensInA = fraction(scale8, i.payments[0].amount, balanceA) | |
416 | 416 | let ratioShareTokensInB = fraction(scale8, i.payments[1].amount, balanceB) | |
417 | 417 | let $t01367113748 = getAssetInfo(pmtAssetIdA) | |
418 | 418 | let pmtStrAssetIdA = $t01367113748._1 | |
419 | 419 | let pmtAssetNameA = $t01367113748._2 | |
420 | 420 | let pmtDecimalsA = $t01367113748._3 | |
421 | 421 | let $t01375313870 = getAssetInfo(pmtAssetIdB) | |
422 | 422 | let pmtStrAssetIdB = $t01375313870._1 | |
423 | 423 | let pmtAssetNameB = $t01375313870._2 | |
424 | 424 | let pmtDecimalsB = $t01375313870._3 | |
425 | 425 | let $t01387514379 = if ((ratioShareTokensInB > ratioShareTokensInA)) | |
426 | 426 | then { | |
427 | 427 | let pmt = fraction(balanceB, ratioShareTokensInA, scale8, CEILING) | |
428 | 428 | $Tuple5(i.payments[0].amount, pmt, (i.payments[1].amount - pmt), pmtAssetIdB, ratioShareTokensInA) | |
429 | 429 | } | |
430 | 430 | else { | |
431 | 431 | let pmt = fraction(balanceA, ratioShareTokensInB, scale8, CEILING) | |
432 | 432 | $Tuple5(pmt, i.payments[1].amount, (i.payments[0].amount - pmt), pmtAssetIdA, ratioShareTokensInB) | |
433 | 433 | } | |
434 | 434 | let pmtAmountA = $t01387514379._1 | |
435 | 435 | let pmtAmountB = $t01387514379._2 | |
436 | 436 | let change = $t01387514379._3 | |
437 | 437 | let changeAssetId = $t01387514379._4 | |
438 | 438 | let shareTokenRatio = $t01387514379._5 | |
439 | 439 | let shareTokenToPayAmount = fraction(shareTokenRatio, shareAssetSupply, scale8) | |
440 | 440 | if ((size(i.payments) != 2)) | |
441 | 441 | then throw("Two attached assets expected") | |
442 | 442 | else if (if ((pmtAssetIdA != assetIdA)) | |
443 | 443 | then true | |
444 | 444 | else (pmtAssetIdB != assetIdB)) | |
445 | 445 | then throwAssets() | |
446 | 446 | else if ((shareTokenToPayAmount == 0)) | |
447 | 447 | then throw("Too small amount to replenish") | |
448 | 448 | else if ((0 > change)) | |
449 | 449 | then throw("Change < 0") | |
450 | 450 | else if (!(hasEnoughBalance)) | |
451 | 451 | then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious()) | |
452 | 452 | else { | |
453 | 453 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
454 | 454 | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
455 | 455 | else 0 | |
456 | 456 | if ((stake1 == stake1)) | |
457 | 457 | then { | |
458 | 458 | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
459 | 459 | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
460 | 460 | else 0 | |
461 | 461 | if ((stake2 == stake2)) | |
462 | 462 | then [IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), IntegerEntry(kInvariant, invariantCalc((balanceA + pmtAmountA), (balanceB + pmtAmountB))), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId), ScriptTransfer(i.caller, change, changeAssetId)] | |
463 | 463 | else throw("Strict value is not equal to itself.") | |
464 | 464 | } | |
465 | 465 | else throw("Strict value is not equal to itself.") | |
466 | 466 | } | |
467 | 467 | }) | |
468 | 468 | ||
469 | 469 | ||
470 | 470 | ||
471 | 471 | @Callable(i) | |
472 | 472 | func replenishWithOneToken (virtualSwapTokenPay,virtualSwapTokenGet) = valueOrElse(isActive(), { | |
473 | 473 | let $t01611216187 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
474 | 474 | let pmtAmount = $t01611216187._1 | |
475 | 475 | let pmtAssetId = $t01611216187._2 | |
476 | 476 | let $t01619216265 = getAssetInfo(pmtAssetId) | |
477 | 477 | let pmtStrAssetId = $t01619216265._1 | |
478 | 478 | let pmtAssetName = $t01619216265._2 | |
479 | 479 | let pmtDecimals = $t01619216265._3 | |
480 | 480 | let pmtMinThreshold = 5000000 | |
481 | 481 | let thresholdValueForMinTolerance = 50000000 | |
482 | 482 | let tolerance = if ((thresholdValueForMinTolerance > pmtAmount)) | |
483 | 483 | then 100000 | |
484 | 484 | else 1 | |
485 | 485 | let slippageValueMinForReplenish = (scale8 - ((scale8 * tolerance) / 10000000)) | |
486 | 486 | let slippageValueMaxForReplenish = (scale8 + ((scale8 * tolerance) / 10000000)) | |
487 | 487 | let slippageValueMinForSwap = (scale8 - ((scale8 * 1) / 10000000)) | |
488 | 488 | if ((pmtMinThreshold > pmtAmount)) | |
489 | 489 | then throw((((("Payment amount " + toString(pmtAmount)) + " does not exceed the minimum amount of ") + toString(pmtMinThreshold)) + " tokens")) | |
490 | 490 | else if ((size(i.payments) != 1)) | |
491 | 491 | then throwOnePayment() | |
492 | 492 | else if (!(hasEnoughBalance)) | |
493 | 493 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
494 | 494 | else if (if ((pmtAssetId != assetIdA)) | |
495 | 495 | then (pmtAssetId != assetIdB) | |
496 | 496 | else false) | |
497 | 497 | then throwAssets() | |
498 | 498 | else { | |
499 | 499 | let $t01724317885 = if ((pmtAssetId == assetIdA)) | |
500 | 500 | then $Tuple6((pmtAmount - virtualSwapTokenPay), virtualSwapTokenGet, (balanceA + virtualSwapTokenPay), (balanceB - virtualSwapTokenGet), (balanceA + pmtAmount), balanceB) | |
501 | 501 | else $Tuple6(virtualSwapTokenGet, (pmtAmount - virtualSwapTokenPay), (balanceA - virtualSwapTokenGet), (balanceB + virtualSwapTokenPay), balanceA, (balanceB + pmtAmount)) | |
502 | 502 | let virtualReplenishA = $t01724317885._1 | |
503 | 503 | let virtualReplenishB = $t01724317885._2 | |
504 | 504 | let balanceAfterSwapA = $t01724317885._3 | |
505 | 505 | let balanceAfterSwapB = $t01724317885._4 | |
506 | 506 | let newBalanceA = $t01724317885._5 | |
507 | 507 | let newBalanceB = $t01724317885._6 | |
508 | 508 | let invariantNew = invariantCalc(balanceAfterSwapA, balanceAfterSwapB) | |
509 | 509 | let ratioVirtualBalanceToVirtualReplenish = (fraction(scale16, balanceAfterSwapA, balanceAfterSwapB) / fraction(scale8, virtualReplenishA, virtualReplenishB)) | |
510 | 510 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
511 | 511 | if (if ((slippageValueMinForSwap >= fraction(scale8, invariant, invariantNew))) | |
512 | 512 | then true | |
513 | 513 | else (invariant > invariantNew)) | |
514 | 514 | then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value") | |
515 | 515 | else if (if ((slippageValueMinForReplenish > ratioVirtualBalanceToVirtualReplenish)) | |
516 | 516 | then true | |
517 | 517 | else (ratioVirtualBalanceToVirtualReplenish > slippageValueMaxForReplenish)) | |
518 | 518 | then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect") | |
519 | 519 | else if (if ((dAppThresholdAmount > newBalanceA)) | |
520 | 520 | then true | |
521 | 521 | else (dAppThresholdAmount > newBalanceB)) | |
522 | 522 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
523 | 523 | else { | |
524 | 524 | let ratioShareTokensInA = fraction(virtualReplenishA, scale8, balanceAfterSwapA) | |
525 | 525 | let ratioShareTokensInB = fraction(virtualReplenishB, scale8, balanceAfterSwapB) | |
526 | 526 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scale8) | |
527 | 527 | let shareTokenToPayAmountAfterFee = fraction(shareTokenToPayAmount, (feeScale6 - (fee / 2)), feeScale6) | |
528 | 528 | let shareTokenGovernanceReward = fraction(shareTokenToPayAmount, (feeGovernance / 2), feeScale6) | |
529 | 529 | let governanceRewardTokenA = fraction(shareTokenGovernanceReward, balanceA, shareAssetSupply) | |
530 | 530 | let governanceRewardTokenB = fraction(shareTokenGovernanceReward, balanceB, shareAssetSupply) | |
531 | 531 | let $t01987220167 = if ((pmtStrAssetId == strAssetIdA)) | |
532 | 532 | then $Tuple3((pmtAmount - governanceRewardTokenA), governanceRewardTokenB, strAssetIdB) | |
533 | 533 | else $Tuple3((pmtAmount - governanceRewardTokenB), governanceRewardTokenA, strAssetIdA) | |
534 | 534 | let stakeAmount = $t01987220167._1 | |
535 | 535 | let unstakeAmount = $t01987220167._2 | |
536 | 536 | let unstakeAsset = $t01987220167._3 | |
537 | 537 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetId)) | |
538 | 538 | then invoke(this, "stakeUnstake", [true, stakeAmount, pmtStrAssetId], nil) | |
539 | 539 | else 0 | |
540 | 540 | if ((stake1 == stake1)) | |
541 | 541 | then { | |
542 | 542 | let stake2 = if (containsElement(stakingAssets, unstakeAsset)) | |
543 | 543 | then invoke(this, "stakeUnstake", [false, unstakeAmount, unstakeAsset], nil) | |
544 | 544 | else 0 | |
545 | 545 | if ((stake2 == stake2)) | |
546 | 546 | then [Reissue(shareAssetId, shareTokenToPayAmountAfterFee, true), ScriptTransfer(i.caller, shareTokenToPayAmountAfterFee, shareAssetId), ScriptTransfer(moneyBoxAddress, governanceRewardTokenA, assetIdA), ScriptTransfer(moneyBoxAddress, governanceRewardTokenB, assetIdB), IntegerEntry(kBalanceA, (newBalanceA - governanceRewardTokenA)), IntegerEntry(kBalanceB, (newBalanceB - governanceRewardTokenB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmountAfterFee)), IntegerEntry(kInvariant, invariantCalc((newBalanceA - governanceRewardTokenA), (newBalanceB - governanceRewardTokenB)))] | |
547 | 547 | else throw("Strict value is not equal to itself.") | |
548 | 548 | } | |
549 | 549 | else throw("Strict value is not equal to itself.") | |
550 | 550 | } | |
551 | 551 | } | |
552 | 552 | }) | |
553 | 553 | ||
554 | 554 | ||
555 | 555 | ||
556 | 556 | @Callable(i) | |
557 | 557 | func withdraw () = valueOrElse(isActive(), { | |
558 | 558 | let $t02145421529 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
559 | 559 | let pmtAmount = $t02145421529._1 | |
560 | 560 | let pmtAssetId = $t02145421529._2 | |
561 | 561 | let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply) | |
562 | 562 | let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply) | |
563 | 563 | let invariantCalculated = invariantCalc((balanceA - amountToPayA), (balanceB - amountToPayB)) | |
564 | 564 | if ((size(i.payments) != 1)) | |
565 | 565 | then throwOnePayment() | |
566 | 566 | else if ((pmtAssetId != shareAssetId)) | |
567 | 567 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
568 | 568 | else if (!(hasEnoughBalance)) | |
569 | 569 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
570 | 570 | else { | |
571 | 571 | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
572 | 572 | then invoke(this, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil) | |
573 | 573 | else 0 | |
574 | 574 | if ((stake1 == stake1)) | |
575 | 575 | then { | |
576 | 576 | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
577 | 577 | then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil) | |
578 | 578 | else 0 | |
579 | 579 | if ((stake2 == stake2)) | |
580 | 580 | then [IntegerEntry(kBalanceA, (balanceA - amountToPayA)), IntegerEntry(kBalanceB, (balanceB - amountToPayB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply - pmtAmount)), IntegerEntry(kInvariant, invariantCalculated), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)] | |
581 | 581 | else throw("Strict value is not equal to itself.") | |
582 | 582 | } | |
583 | 583 | else throw("Strict value is not equal to itself.") | |
584 | 584 | } | |
585 | 585 | }) | |
586 | 586 | ||
587 | 587 | ||
588 | 588 | ||
589 | 589 | @Callable(i) | |
590 | 590 | func exchange (estimatedAmountToReceive,minAmountToReceive) = valueOrElse(isActive(), { | |
591 | 591 | let $t02308023155 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
592 | 592 | let pmtAmount = $t02308023155._1 | |
593 | 593 | let pmtAssetId = $t02308023155._2 | |
594 | 594 | if ((0 >= estimatedAmountToReceive)) | |
595 | 595 | then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive))) | |
596 | 596 | else if ((minAmountToReceive > estimatedAmountToReceive)) | |
597 | 597 | then throw("Minimal amount can't be greater than estimated.") | |
598 | 598 | else if ((size(i.payments) != 1)) | |
599 | 599 | then throwOnePayment() | |
600 | 600 | else if (!(hasEnoughBalance)) | |
601 | 601 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
602 | 602 | else if (if ((pmtAssetId != assetIdA)) | |
603 | 603 | then (pmtAssetId != assetIdB) | |
604 | 604 | else false) | |
605 | 605 | then throwAssets() | |
606 | 606 | else if ((10000000 > pmtAmount)) | |
607 | 607 | then throw("Only swap of 10.000000 or more tokens is allowed") | |
608 | 608 | else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount))) | |
609 | 609 | then true | |
610 | 610 | else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax)) | |
611 | 611 | then throw("Incorrect args and pmt ratio") | |
612 | 612 | else { | |
613 | 613 | let sendAssetId = if ((pmtAssetId == assetIdA)) | |
614 | 614 | then assetIdB | |
615 | 615 | else assetIdA | |
616 | 616 | let amount = calculateSendAmount(estimatedAmountToReceive, minAmountToReceive, pmtAmount, pmtAssetId) | |
617 | - | let feeDiscount = calculateFeeDiscount(i. | |
617 | + | let feeDiscount = calculateFeeDiscount(i.originCaller) | |
618 | 618 | let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, 100, CEILING), feeScale6) | |
619 | 619 | let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, 100, CEILING)), feeScale6) | |
620 | - | let $ | |
620 | + | let $t02459824860 = if ((pmtAssetId == assetIdA)) | |
621 | 621 | then $Tuple2((balanceA + pmtAmount), ((balanceB - amountMinusFee) - governanceReward)) | |
622 | 622 | else $Tuple2(((balanceA - amountMinusFee) - governanceReward), (balanceB + pmtAmount)) | |
623 | - | let newBalanceA = $ | |
624 | - | let newBalanceB = $ | |
623 | + | let newBalanceA = $t02459824860._1 | |
624 | + | let newBalanceB = $t02459824860._2 | |
625 | 625 | let dAppThresholdAmount = fraction((newBalanceA + newBalanceB), dAppThreshold, (2 * dAppThresholdScale2)) | |
626 | 626 | if (if ((dAppThresholdAmount > newBalanceA)) | |
627 | 627 | then true | |
628 | 628 | else (dAppThresholdAmount > newBalanceB)) | |
629 | 629 | then throwThreshold(dAppThresholdAmount, newBalanceA, newBalanceB) | |
630 | 630 | else { | |
631 | - | let $ | |
632 | - | let pmtStrAssetId = $ | |
633 | - | let pmtAssetName = $ | |
634 | - | let pmtDecimals = $ | |
635 | - | let $ | |
636 | - | let sendStrAssetId = $ | |
637 | - | let sendAssetName = $ | |
638 | - | let sendDecimals = $ | |
631 | + | let $t02515925232 = getAssetInfo(pmtAssetId) | |
632 | + | let pmtStrAssetId = $t02515925232._1 | |
633 | + | let pmtAssetName = $t02515925232._2 | |
634 | + | let pmtDecimals = $t02515925232._3 | |
635 | + | let $t02524525322 = getAssetInfo(sendAssetId) | |
636 | + | let sendStrAssetId = $t02524525322._1 | |
637 | + | let sendAssetName = $t02524525322._2 | |
638 | + | let sendDecimals = $t02524525322._3 | |
639 | 639 | let stake1 = if (containsElement(stakingAssets, pmtStrAssetId)) | |
640 | 640 | then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil) | |
641 | 641 | else 0 | |
642 | 642 | if ((stake1 == stake1)) | |
643 | 643 | then { | |
644 | 644 | let stake2 = if (containsElement(stakingAssets, sendStrAssetId)) | |
645 | 645 | then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), sendStrAssetId], nil) | |
646 | 646 | else 0 | |
647 | 647 | if ((stake2 == stake2)) | |
648 | 648 | then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), IntegerEntry(kInvariant, invariantCalc(newBalanceA, newBalanceB)), ScriptTransfer(i.caller, amountMinusFee, sendAssetId), ScriptTransfer(moneyBoxAddress, governanceReward, sendAssetId)], $Tuple2(amountMinusFee, sendAssetId)) | |
649 | 649 | else throw("Strict value is not equal to itself.") | |
650 | 650 | } | |
651 | 651 | else throw("Strict value is not equal to itself.") | |
652 | 652 | } | |
653 | 653 | } | |
654 | 654 | }) | |
655 | 655 | ||
656 | 656 | ||
657 | 657 | ||
658 | 658 | @Callable(i) | |
659 | 659 | func shutdown () = valueOrElse(isAdminCall(i), if (!(active)) | |
660 | 660 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified"))) | |
661 | 661 | else suspend("Paused by admin")) | |
662 | 662 | ||
663 | 663 | ||
664 | 664 | ||
665 | 665 | @Callable(i) | |
666 | 666 | func activate () = valueOrElse(isAdminCall(i), if (active) | |
667 | 667 | then throwIsActive() | |
668 | 668 | else [BooleanEntry(kActive, true), DeleteEntry(kCause)]) | |
669 | 669 | ||
670 | 670 | ||
671 | 671 | ||
672 | 672 | @Callable(i) | |
673 | 673 | func takeIntoAccountExtraFunds () = valueOrElse(isActive(), { | |
674 | 674 | let amountEnrollA = (accountBalanceWithStakedA - balanceA) | |
675 | 675 | let amountEnrollB = (accountBalanceWithStakedB - balanceB) | |
676 | 676 | let invariantNew = invariantCalc((balanceA + amountEnrollA), (balanceB + amountEnrollB)) | |
677 | 677 | if ((i.caller != moneyBoxAddress)) | |
678 | 678 | then throw("Only the money box can call this function") | |
679 | 679 | else if (if ((0 > amountEnrollA)) | |
680 | 680 | then true | |
681 | 681 | else (0 > amountEnrollB)) | |
682 | 682 | then suspend("Enroll amount negative") | |
683 | 683 | else if (if ((amountEnrollA == 0)) | |
684 | 684 | then (amountEnrollB == 0) | |
685 | 685 | else false) | |
686 | 686 | then throw("No money to take") | |
687 | 687 | else { | |
688 | 688 | let stake1 = if (if (containsElement(stakingAssets, strAssetIdA)) | |
689 | 689 | then (amountEnrollA > 0) | |
690 | 690 | else false) | |
691 | 691 | then invoke(this, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil) | |
692 | 692 | else 0 | |
693 | 693 | if ((stake1 == stake1)) | |
694 | 694 | then { | |
695 | 695 | let stake2 = if (if (containsElement(stakingAssets, strAssetIdB)) | |
696 | 696 | then (amountEnrollB > 0) | |
697 | 697 | else false) | |
698 | 698 | then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil) | |
699 | 699 | else 0 | |
700 | 700 | if ((stake2 == stake2)) | |
701 | 701 | then [IntegerEntry(kInvariant, invariantNew), IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB))] | |
702 | 702 | else throw("Strict value is not equal to itself.") | |
703 | 703 | } | |
704 | 704 | else throw("Strict value is not equal to itself.") | |
705 | 705 | } | |
706 | 706 | }) | |
707 | 707 | ||
708 | 708 | ||
709 | 709 | ||
710 | 710 | @Callable(i) | |
711 | 711 | func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this)) | |
712 | 712 | then throw("Only contract itself can invoke this function") | |
713 | 713 | else { | |
714 | - | let $ | |
715 | - | let call = $ | |
716 | - | let addr = $ | |
717 | - | let params = $ | |
718 | - | let payments = $ | |
714 | + | let $t02832628429 = calcStakingParams(stake, amount, fromBase58String(assetIdString)) | |
715 | + | let call = $t02832628429._1 | |
716 | + | let addr = $t02832628429._2 | |
717 | + | let params = $t02832628429._3 | |
718 | + | let payments = $t02832628429._4 | |
719 | 719 | let inv = invoke(addr, call, params, payments) | |
720 | 720 | if ((inv == inv)) | |
721 | 721 | then nil | |
722 | 722 | else throw("Strict value is not equal to itself.") | |
723 | 723 | } | |
724 | 724 | ||
725 | 725 | ||
726 | 726 | ||
727 | 727 | @Callable(i) | |
728 | 728 | func toBigIntInvariant () = valueOrElse(isAdminCall(i), [IntegerEntry(kInvariant, invariantCalc(balanceA, balanceB))]) | |
729 | 729 | ||
730 | 730 | ||
731 | 731 | @Verifier(tx) | |
732 | 732 | func verify () = { | |
733 | 733 | let multiSignedByAdmins = { | |
734 | 734 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
735 | 735 | then 1 | |
736 | 736 | else 0 | |
737 | 737 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
738 | 738 | then 1 | |
739 | 739 | else 0 | |
740 | 740 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
741 | 741 | then 1 | |
742 | 742 | else 0 | |
743 | 743 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
744 | 744 | } | |
745 | 745 | match tx { | |
746 | 746 | case inv: InvokeScriptTransaction => | |
747 | 747 | let callTakeIntoAccount = if ((inv.dApp == this)) | |
748 | 748 | then (inv.function == "takeIntoAccountExtraFunds") | |
749 | 749 | else false | |
750 | 750 | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
751 | 751 | then true | |
752 | 752 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
753 | 753 | then true | |
754 | 754 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
755 | 755 | then true | |
756 | 756 | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke) | |
757 | 757 | if (if (callTakeIntoAccount) | |
758 | 758 | then signedByAdmin | |
759 | 759 | else false) | |
760 | 760 | then true | |
761 | 761 | else multiSignedByAdmins | |
762 | 762 | case _ => | |
763 | 763 | multiSignedByAdmins | |
764 | 764 | } | |
765 | 765 | } | |
766 | 766 |
github/deemru/w8io/169f3d6 110.01 ms ◑