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