tx · EL3Tw2dth7XjizQ23kPMyDmozju1gPKdZXMNuoRwSUt9 3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY: -0.01400000 Waves 2021.07.19 18:52 [1620693] smart account 3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY > SELF 0.00000000 Waves
{ "type": 13, "id": "EL3Tw2dth7XjizQ23kPMyDmozju1gPKdZXMNuoRwSUt9", "fee": 1400000, "feeAssetId": null, "timestamp": 1626709893200, "version": 2, "chainId": 84, "sender": "3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY", "senderPublicKey": "DhKV985fxsz63vhWDNTF3gWwe7AHS4RsGjR2BzThJRYa", "proofs": [ "5tBh63b4NPiDid2H277ttvwGVVeL7s2eQ5aYF8kmkmG2QiKi9qYVm5MLragX1VBzbF3Ve3dNAFVvwzTcFXingaba", "3JLDDKTcosJgdMLtQTMvkSERJN24CCtxHAh2bV74pc6KBffUz2uxpp8bkYnKeLJGduJVzwPp91eachb4iMnkug5n" ], "script": "base64:AAIFAAAAAAAAABkIAhIAEgMKAQESABIDCgEBEgASABIDCgEBAAAAQAAAAAAHdmVyc2lvbgIAAAAFMS4wLjAAAAAACmtleVZlcnNpb24CAAAAB3ZlcnNpb24AAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAtrZXlBc3NldElkQQIAAAAKQV9hc3NldF9pZAAAAAALa2V5QXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAAC2tleUJhbGFuY2VBAgAAAA9BX2Fzc2V0X2JhbGFuY2UAAAAAC2tleUJhbGFuY2VCAgAAAA9CX2Fzc2V0X2JhbGFuY2UAAAAAD2tleVNoYXJlQXNzZXRJZAIAAAAOc2hhcmVfYXNzZXRfaWQAAAAAE2tleVNoYXJlQXNzZXRTdXBwbHkCAAAAEnNoYXJlX2Fzc2V0X3N1cHBseQAAAAANa2V5Q29tbWlzc2lvbgIAAAAKY29tbWlzc2lvbgAAAAAba2V5Q29tbWlzc2lvblNjYWxlR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aXQGCQAAAAAAAAIICQABkQAAAAIIBQAAAANpbnYAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAHYXNzZXRJZAUAAAAEVVNETgcGAwMJAAAAAAAAAgUAAAAIYXNzZXRJZEEFAAAABE5TQlQJAAAAAAAAAgUAAAAIYXNzZXRJZEIFAAAABFNXT1AHAwMJAAAAAAAAAggFAAAAA2ludgAAAARkQXBwBQAAAA5zd29wVVNETnRvTlNCVAkAAAAAAAACCAkAAZEAAAACCAUAAAADaW52AAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQFAAAABFVTRE4HBgMJAAAAAAAAAggFAAAAA2ludgAAAARkQXBwBQAAAA9zd29wVVNETnRvV0FWRVMDCQAAAAAAAAIICQABkQAAAAIIBQAAAANpbnYAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAHYXNzZXRJZAUAAAAEdW5pdAYJAAAAAAAAAggJAAGRAAAAAggFAAAAA2ludgAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAdhc3NldElkBQAAAARVU0ROBwcHBgMDCQAB9AAAAAMIBQAAAANpbnYAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAANpbnYAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABJhZG1pblB1YktleVN0YWtpbmcJAAAAAAAAAggFAAAAA2ludgAAAARkQXBwBQAAAAR0aGlzBwkAAAAAAAACCAUAAAADaW52AAAACGZ1bmN0aW9uAgAAABl0YWtlSW50b0FjY291bnRFeHRyYUZ1bmRzBwYFAAAAE211bHRpU2lnbmVkQnlBZG1pbnMFAAAAE211bHRpU2lnbmVkQnlBZG1pbnNHtE7X", "height": 1620693, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FoJ77V4Jxpg9AQ7nFL7hfoja2hbUofMCNS5oCMnuC7Jx Next: 2rKaYywBbyvmoCtXt4eymrdqVygYKatVrgoUeBtJmmYS Diff:
Old | New | Differences | |
---|---|---|---|
420 | 420 | then (inv.dApp == stakingAddressUSDN) | |
421 | 421 | else false) | |
422 | 422 | then true | |
423 | - | else if (if (sigVerify(inv.bodyBytes, inv.proofs[0], adminPubKeyStaking)) | |
423 | + | else if (if (if (sigVerify(inv.bodyBytes, inv.proofs[0], adminPubKeyStaking)) | |
424 | 424 | then (inv.function == "exchange") | |
425 | + | else false) | |
426 | + | then (size(inv.payments) == 1) | |
425 | 427 | else false) | |
426 | 428 | then if (if (if (if (if ((assetIdA == NSBT)) | |
427 | 429 | then (assetIdB == USDN) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = "1.0.0" | |
5 | 5 | ||
6 | 6 | let keyVersion = "version" | |
7 | 7 | ||
8 | 8 | let keyActive = "active" | |
9 | 9 | ||
10 | 10 | let keyAssetIdA = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let keyAssetIdB = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let keyBalanceA = "A_asset_balance" | |
15 | 15 | ||
16 | 16 | let keyBalanceB = "B_asset_balance" | |
17 | 17 | ||
18 | 18 | let keyShareAssetId = "share_asset_id" | |
19 | 19 | ||
20 | 20 | let keyShareAssetSupply = "share_asset_supply" | |
21 | 21 | ||
22 | 22 | let keyCommission = "commission" | |
23 | 23 | ||
24 | 24 | let keyCommissionScaleDelimiter = "commission_scale_delimiter" | |
25 | 25 | ||
26 | 26 | let keyCause = "shutdown_cause" | |
27 | 27 | ||
28 | 28 | let keyAdminPubKey1 = "admin_pub_1" | |
29 | 29 | ||
30 | 30 | let keyAdminPubKey2 = "admin_pub_2" | |
31 | 31 | ||
32 | 32 | let keyAdminPubKey3 = "admin_pub_3" | |
33 | 33 | ||
34 | 34 | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
35 | 35 | ||
36 | 36 | func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) { | |
37 | 37 | case string: String => | |
38 | 38 | fromBase58String(string) | |
39 | 39 | case nothing => | |
40 | 40 | throw("Admin public key is empty") | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | let adminPubKey1 = getAdminPub(keyAdminPubKey1) | |
45 | 45 | ||
46 | 46 | let adminPubKey2 = getAdminPub(keyAdminPubKey2) | |
47 | 47 | ||
48 | 48 | let adminPubKey3 = getAdminPub(keyAdminPubKey3) | |
49 | 49 | ||
50 | 50 | let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
51 | 51 | ||
52 | 52 | let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
53 | 53 | ||
54 | 54 | let governanceAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
55 | 55 | ||
56 | 56 | let stakingAddressUSDN = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg') | |
57 | 57 | ||
58 | 58 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
59 | 59 | ||
60 | 60 | let NSBT = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9' | |
61 | 61 | ||
62 | 62 | let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
63 | 63 | ||
64 | 64 | let swopUSDNtoWAVES = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37') | |
65 | 65 | ||
66 | 66 | let swopUSDNtoNSBT = Address(base58'3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY') | |
67 | 67 | ||
68 | 68 | let stakingFeeInUSDN = 270000 | |
69 | 69 | ||
70 | 70 | let isActive = getBooleanValue(this, keyActive) | |
71 | 71 | ||
72 | 72 | let strAssetIdA = getStringValue(this, keyAssetIdA) | |
73 | 73 | ||
74 | 74 | let strAssetIdB = getStringValue(this, keyAssetIdB) | |
75 | 75 | ||
76 | 76 | let assetIdA = if ((strAssetIdA == "WAVES")) | |
77 | 77 | then unit | |
78 | 78 | else fromBase58String(strAssetIdA) | |
79 | 79 | ||
80 | 80 | let assetIdB = if ((strAssetIdB == "WAVES")) | |
81 | 81 | then unit | |
82 | 82 | else fromBase58String(strAssetIdB) | |
83 | 83 | ||
84 | 84 | let assetNameA = match assetIdA { | |
85 | 85 | case id: ByteVector => | |
86 | 86 | value(assetInfo(id)).name | |
87 | 87 | case waves: Unit => | |
88 | 88 | "WAVES" | |
89 | 89 | case _ => | |
90 | 90 | throw("Match error") | |
91 | 91 | } | |
92 | 92 | ||
93 | 93 | let assetNameB = match assetIdB { | |
94 | 94 | case id: ByteVector => | |
95 | 95 | value(assetInfo(id)).name | |
96 | 96 | case waves: Unit => | |
97 | 97 | "WAVES" | |
98 | 98 | case _ => | |
99 | 99 | throw("Match error") | |
100 | 100 | } | |
101 | 101 | ||
102 | 102 | let balanceA = getIntegerValue(this, keyBalanceA) | |
103 | 103 | ||
104 | 104 | let balanceB = getIntegerValue(this, keyBalanceB) | |
105 | 105 | ||
106 | 106 | let shareAssetId = fromBase58String(getStringValue(this, keyShareAssetId)) | |
107 | 107 | ||
108 | 108 | let shareAssetSupply = getIntegerValue(this, keyShareAssetSupply) | |
109 | 109 | ||
110 | 110 | let commission = 3000 | |
111 | 111 | ||
112 | 112 | let commissionGovernance = 1200 | |
113 | 113 | ||
114 | 114 | let commissionScaleDelimiter = 1000000 | |
115 | 115 | ||
116 | 116 | let scaleValue3 = 1000 | |
117 | 117 | ||
118 | 118 | let scaleValue8 = 100000000 | |
119 | 119 | ||
120 | 120 | let slippageToleranceDelimiter = 1000 | |
121 | 121 | ||
122 | 122 | let scaleValue8Digits = 8 | |
123 | 123 | ||
124 | 124 | func accountBalance (assetId) = match assetId { | |
125 | 125 | case id: ByteVector => | |
126 | 126 | assetBalance(this, id) | |
127 | 127 | case waves: Unit => | |
128 | 128 | wavesBalance(this).available | |
129 | 129 | case _ => | |
130 | 130 | throw("Match error") | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func stakedAmount (stakingAddress,asset) = { | |
135 | 135 | let stakedAmountCalculated = match getInteger(stakingAddress, ((("rpd_balance_" + asset) + "_") + toString(this))) { | |
136 | 136 | case staked: Int => | |
137 | 137 | staked | |
138 | 138 | case nothing: Unit => | |
139 | 139 | 0 | |
140 | 140 | case _ => | |
141 | 141 | throw("Match error") | |
142 | 142 | } | |
143 | 143 | stakedAmountCalculated | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | let stakedAmountA = stakedAmount(stakingAddressUSDN, strAssetIdA) | |
148 | 148 | ||
149 | 149 | let stakedAmountB = stakedAmount(stakingAddressUSDN, strAssetIdB) | |
150 | 150 | ||
151 | 151 | let availableBalanceA = (balanceA - stakedAmountA) | |
152 | 152 | ||
153 | 153 | let availableBalanceB = (balanceB - stakedAmountB) | |
154 | 154 | ||
155 | 155 | let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA) | |
156 | 156 | ||
157 | 157 | let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB) | |
158 | 158 | ||
159 | 159 | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
160 | 160 | then (accountBalanceWithStakedB >= balanceB) | |
161 | 161 | else false | |
162 | 162 | ||
163 | 163 | func getAssetInfo (assetId) = match assetId { | |
164 | 164 | case id: ByteVector => | |
165 | 165 | let stringId = toBase58String(id) | |
166 | 166 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
167 | 167 | $Tuple3(stringId, info.name, info.decimals) | |
168 | 168 | case waves: Unit => | |
169 | 169 | $Tuple3("WAVES", "WAVES", 8) | |
170 | 170 | case _ => | |
171 | 171 | throw("Match error") | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)] | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func stakedTokenCount () = { | |
179 | 179 | let isStakedA = if ((stakedAmountA > 0)) | |
180 | 180 | then 1 | |
181 | 181 | else 0 | |
182 | 182 | let isStakedB = if ((stakedAmountB > 0)) | |
183 | 183 | then 1 | |
184 | 184 | else 0 | |
185 | 185 | (isStakedA + isStakedB) | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func deductStakingFee (amount,assetId) = if ((assetId == USDN)) | |
190 | 190 | then { | |
191 | 191 | let result = (amount - (stakedTokenCount() * stakingFeeInUSDN)) | |
192 | 192 | if ((0 >= result)) | |
193 | 193 | then throw((((("Insufficient amount " + toString(amount)) + " to deduct staking fee ") + toString(stakingFeeInUSDN)) + " USD-N")) | |
194 | 194 | else result | |
195 | 195 | } | |
196 | 196 | else amount | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func throwInsufficientAvailableBalance (amount,available,assetName) = throw((((((((("Insufficient DApp balance to pay " + toString(amount)) + " ") + assetName) + " due to staking. Available: ") + toString(available)) + " ") + assetName) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func throwInsufficientAvailableBalances (amountA,amountB) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(amountA)) + " ") + assetNameA) + " and ") + toString(amountB)) + " ") + assetNameB) + " due to staking. Available: ") + toString(availableBalanceA)) + " ") + assetNameA) + " and ") + toString(availableBalanceB)) + " ") + assetNameB) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(accountBalanceWithStakedA)) + " ") + assetNameA) + ", ") + toString(accountBalanceWithStakedB)) + " ") + assetNameB) + ". State: ") + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB)) | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | @Callable(i) | |
209 | 209 | func init () = { | |
210 | 210 | let $t059366013 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
211 | 211 | let pmtAmountA = $t059366013._1 | |
212 | 212 | let pmtAssetIdA = $t059366013._2 | |
213 | 213 | let $t060186095 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
214 | 214 | let pmtAmountB = $t060186095._1 | |
215 | 215 | let pmtAssetIdB = $t060186095._2 | |
216 | 216 | let $t061006177 = getAssetInfo(pmtAssetIdA) | |
217 | 217 | let pmtStrAssetIdA = $t061006177._1 | |
218 | 218 | let pmtAssetNameA = $t061006177._2 | |
219 | 219 | let pmtDecimalsA = $t061006177._3 | |
220 | 220 | let $t061826259 = getAssetInfo(pmtAssetIdB) | |
221 | 221 | let pmtStrAssetIdB = $t061826259._1 | |
222 | 222 | let pmtAssetNameB = $t061826259._2 | |
223 | 223 | let pmtDecimalsB = $t061826259._3 | |
224 | 224 | if (isDefined(getBoolean(this, keyActive))) | |
225 | 225 | then throw("DApp is already active") | |
226 | 226 | else if ((pmtAssetIdA == pmtAssetIdB)) | |
227 | 227 | then throw("Assets must be different") | |
228 | 228 | else { | |
229 | 229 | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
230 | 230 | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
231 | 231 | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
232 | 232 | let shareInitialSupply = fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
233 | 233 | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
234 | 234 | let shareIssueId = calculateAssetId(shareIssue) | |
235 | 235 | [StringEntry(keyVersion, version), BooleanEntry(keyActive, true), StringEntry(keyAssetIdA, pmtStrAssetIdA), StringEntry(keyAssetIdB, pmtStrAssetIdB), IntegerEntry(keyBalanceA, pmtAmountA), IntegerEntry(keyBalanceB, pmtAmountB), IntegerEntry(keyCommission, commission), IntegerEntry(keyCommissionScaleDelimiter, commissionScaleDelimiter), shareIssue, StringEntry(keyShareAssetId, toBase58String(shareIssueId)), IntegerEntry(keyShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] | |
236 | 236 | } | |
237 | 237 | } | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | ||
241 | 241 | @Callable(i) | |
242 | 242 | func replenishWithTwoTokens (slippageTolerance) = { | |
243 | 243 | let pmtAssetIdA = i.payments[0].assetId | |
244 | 244 | let pmtAssetIdB = i.payments[1].assetId | |
245 | 245 | let pmtAmountA = deductStakingFee(i.payments[0].amount, pmtAssetIdA) | |
246 | 246 | let pmtAmountB = deductStakingFee(i.payments[1].amount, pmtAssetIdB) | |
247 | 247 | let tokenRatio = fraction(fraction(balanceA, scaleValue8, pmtAmountA), scaleValue3, fraction(balanceB, scaleValue8, pmtAmountB)) | |
248 | 248 | let ratioShareTokensInA = fraction(pmtAmountA, scaleValue8, balanceA) | |
249 | 249 | let ratioShareTokensInB = fraction(pmtAmountB, scaleValue8, balanceB) | |
250 | 250 | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scaleValue8) | |
251 | 251 | if (!(isActive)) | |
252 | 252 | then throw("DApp is inactive at this moment") | |
253 | 253 | else if (if ((0 > slippageTolerance)) | |
254 | 254 | then true | |
255 | 255 | else (slippageTolerance > slippageToleranceDelimiter)) | |
256 | 256 | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
257 | 257 | else if ((size(i.payments) != 2)) | |
258 | 258 | then throw("Two attached assets expected") | |
259 | 259 | else if (if ((pmtAssetIdA != assetIdA)) | |
260 | 260 | then true | |
261 | 261 | else (pmtAssetIdB != assetIdB)) | |
262 | 262 | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
263 | 263 | else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio)) | |
264 | 264 | then true | |
265 | 265 | else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter))) | |
266 | 266 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
267 | 267 | else if ((shareTokenToPayAmount == 0)) | |
268 | 268 | then throw("Too small amount to replenish") | |
269 | 269 | else if (!(hasEnoughBalance)) | |
270 | 270 | then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious()) | |
271 | 271 | else [IntegerEntry(keyBalanceA, (balanceA + pmtAmountA)), IntegerEntry(keyBalanceB, (balanceB + pmtAmountB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
272 | 272 | } | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | ||
276 | 276 | @Callable(i) | |
277 | 277 | func withdraw () = { | |
278 | 278 | let $t01032110471 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
279 | 279 | let pmtAmount = $t01032110471._1 | |
280 | 280 | let pmtAssetId = $t01032110471._2 | |
281 | 281 | let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA) | |
282 | 282 | let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB) | |
283 | 283 | if (!(isActive)) | |
284 | 284 | then throw("DApp is inactive at this moment") | |
285 | 285 | else if ((size(i.payments) != 1)) | |
286 | 286 | then throw("One attached payment expected") | |
287 | 287 | else if ((pmtAssetId != shareAssetId)) | |
288 | 288 | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
289 | 289 | else if (!(hasEnoughBalance)) | |
290 | 290 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
291 | 291 | else if (if ((amountToPayA > availableBalanceA)) | |
292 | 292 | then true | |
293 | 293 | else (amountToPayB > availableBalanceB)) | |
294 | 294 | then throwInsufficientAvailableBalances(amountToPayA, amountToPayB) | |
295 | 295 | else [IntegerEntry(keyBalanceA, (balanceA - amountToPayA)), IntegerEntry(keyBalanceB, (balanceB - amountToPayB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply - pmtAmount)), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)] | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | ||
300 | 300 | @Callable(i) | |
301 | 301 | func exchange (minAmountToReceive) = { | |
302 | 302 | let $t01167811753 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
303 | 303 | let pmtAmount = $t01167811753._1 | |
304 | 304 | let pmtAssetId = $t01167811753._2 | |
305 | 305 | func calculateFees (tokenFrom,tokenTo) = { | |
306 | 306 | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
307 | 307 | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
308 | 308 | let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter) | |
309 | 309 | if ((minAmountToReceive > amountWithFee)) | |
310 | 310 | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
311 | 311 | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
312 | 312 | } | |
313 | 313 | ||
314 | 314 | if (!(isActive)) | |
315 | 315 | then throw("DApp is inactive at this moment") | |
316 | 316 | else if ((0 >= minAmountToReceive)) | |
317 | 317 | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
318 | 318 | else if ((size(i.payments) != 1)) | |
319 | 319 | then throw("One attached payment expected") | |
320 | 320 | else if (!(hasEnoughBalance)) | |
321 | 321 | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
322 | 322 | else if ((pmtAssetId == assetIdA)) | |
323 | 323 | then { | |
324 | 324 | let assetIdSend = assetIdB | |
325 | 325 | let $t01292913020 = calculateFees(balanceA, balanceB) | |
326 | 326 | let amountWithoutFee = $t01292913020._1 | |
327 | 327 | let amountWithFee = $t01292913020._2 | |
328 | 328 | let governanceReward = $t01292913020._3 | |
329 | 329 | let newBalanceA = (balanceA + pmtAmount) | |
330 | 330 | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
331 | 331 | if (if ((stakedAmountA >= newBalanceA)) | |
332 | 332 | then true | |
333 | 333 | else (stakedAmountB >= newBalanceB)) | |
334 | 334 | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceB, assetNameB) | |
335 | 335 | else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(governanceAddress, governanceReward, assetIdSend)] | |
336 | 336 | } | |
337 | 337 | else if ((pmtAssetId == assetIdB)) | |
338 | 338 | then { | |
339 | 339 | let assetIdSend = assetIdA | |
340 | 340 | let $t01384313934 = calculateFees(balanceB, balanceA) | |
341 | 341 | let amountWithoutFee = $t01384313934._1 | |
342 | 342 | let amountWithFee = $t01384313934._2 | |
343 | 343 | let governanceReward = $t01384313934._3 | |
344 | 344 | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
345 | 345 | let newBalanceB = (balanceB + pmtAmount) | |
346 | 346 | if (if ((stakedAmountA >= newBalanceA)) | |
347 | 347 | then true | |
348 | 348 | else (stakedAmountB >= newBalanceB)) | |
349 | 349 | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceA, assetNameA) | |
350 | 350 | else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(governanceAddress, governanceReward, assetIdSend)] | |
351 | 351 | } | |
352 | 352 | else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
353 | 353 | } | |
354 | 354 | ||
355 | 355 | ||
356 | 356 | ||
357 | 357 | @Callable(i) | |
358 | 358 | func shutdown () = if (!(isActive)) | |
359 | 359 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
360 | 360 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
361 | 361 | then throw("Only admin can call this function") | |
362 | 362 | else suspend("Paused by admin") | |
363 | 363 | ||
364 | 364 | ||
365 | 365 | ||
366 | 366 | @Callable(i) | |
367 | 367 | func activate () = if (isActive) | |
368 | 368 | then throw("DApp is already active") | |
369 | 369 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
370 | 370 | then throw("Only admin can call this function") | |
371 | 371 | else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)] | |
372 | 372 | ||
373 | 373 | ||
374 | 374 | ||
375 | 375 | @Callable(i) | |
376 | 376 | func takeIntoAccountExtraFunds (amountLeave) = { | |
377 | 377 | let uncountableAmountEnrollAssetA = (accountBalanceWithStakedA - balanceA) | |
378 | 378 | let uncountableAmountEnrollAssetB = (accountBalanceWithStakedB - balanceB) | |
379 | 379 | let amountEnrollA = (uncountableAmountEnrollAssetA - (if ((assetIdA == unit)) | |
380 | 380 | then amountLeave | |
381 | 381 | else 0)) | |
382 | 382 | let amountEnrollB = (uncountableAmountEnrollAssetB - (if ((assetIdB == unit)) | |
383 | 383 | then amountLeave | |
384 | 384 | else 0)) | |
385 | 385 | if (!(isActive)) | |
386 | 386 | then throw("DApp is inactive at this moment") | |
387 | 387 | else if ((i.caller != this)) | |
388 | 388 | then throw("Only the DApp itself can call this function") | |
389 | 389 | else if ((0 > amountLeave)) | |
390 | 390 | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(amountLeave))) | |
391 | 391 | else if (if ((0 > uncountableAmountEnrollAssetA)) | |
392 | 392 | then true | |
393 | 393 | else (0 > uncountableAmountEnrollAssetB)) | |
394 | 394 | then suspend("Enroll amount negative") | |
395 | 395 | else if (if ((0 > amountEnrollA)) | |
396 | 396 | then true | |
397 | 397 | else (0 > amountEnrollB)) | |
398 | 398 | then throw("Too large amountLeave") | |
399 | 399 | else [IntegerEntry(keyBalanceA, (balanceA + amountEnrollA)), IntegerEntry(keyBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)] | |
400 | 400 | } | |
401 | 401 | ||
402 | 402 | ||
403 | 403 | @Verifier(tx) | |
404 | 404 | func verify () = { | |
405 | 405 | let multiSignedByAdmins = { | |
406 | 406 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
407 | 407 | then 1 | |
408 | 408 | else 0 | |
409 | 409 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
410 | 410 | then 1 | |
411 | 411 | else 0 | |
412 | 412 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
413 | 413 | then 1 | |
414 | 414 | else 0 | |
415 | 415 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
416 | 416 | } | |
417 | 417 | match tx { | |
418 | 418 | case inv: InvokeScriptTransaction => | |
419 | 419 | if (if (if (if (sigVerify(inv.bodyBytes, inv.proofs[0], adminPubKeyStaking)) | |
420 | 420 | then (inv.dApp == stakingAddressUSDN) | |
421 | 421 | else false) | |
422 | 422 | then true | |
423 | - | else if (if (sigVerify(inv.bodyBytes, inv.proofs[0], adminPubKeyStaking)) | |
423 | + | else if (if (if (sigVerify(inv.bodyBytes, inv.proofs[0], adminPubKeyStaking)) | |
424 | 424 | then (inv.function == "exchange") | |
425 | + | else false) | |
426 | + | then (size(inv.payments) == 1) | |
425 | 427 | else false) | |
426 | 428 | then if (if (if (if (if ((assetIdA == NSBT)) | |
427 | 429 | then (assetIdB == USDN) | |
428 | 430 | else false) | |
429 | 431 | then (inv.dApp == swopUSDNtoWAVES) | |
430 | 432 | else false) | |
431 | 433 | then (inv.payments[0].assetId == unit) | |
432 | 434 | else false) | |
433 | 435 | then if ((inv.payments[0].assetId == unit)) | |
434 | 436 | then true | |
435 | 437 | else (inv.payments[0].assetId == USDN) | |
436 | 438 | else false) | |
437 | 439 | then true | |
438 | 440 | else if (if ((assetIdA == NSBT)) | |
439 | 441 | then (assetIdB == SWOP) | |
440 | 442 | else false) | |
441 | 443 | then if (if ((inv.dApp == swopUSDNtoNSBT)) | |
442 | 444 | then (inv.payments[0].assetId == USDN) | |
443 | 445 | else false) | |
444 | 446 | then true | |
445 | 447 | else if ((inv.dApp == swopUSDNtoWAVES)) | |
446 | 448 | then if ((inv.payments[0].assetId == unit)) | |
447 | 449 | then true | |
448 | 450 | else (inv.payments[0].assetId == USDN) | |
449 | 451 | else false | |
450 | 452 | else false | |
451 | 453 | else false) | |
452 | 454 | then true | |
453 | 455 | else if (if (sigVerify(inv.bodyBytes, inv.proofs[0], adminPubKeyStaking)) | |
454 | 456 | then (inv.dApp == this) | |
455 | 457 | else false) | |
456 | 458 | then (inv.function == "takeIntoAccountExtraFunds") | |
457 | 459 | else false) | |
458 | 460 | then true | |
459 | 461 | else multiSignedByAdmins | |
460 | 462 | case _ => | |
461 | 463 | multiSignedByAdmins | |
462 | 464 | } | |
463 | 465 | } | |
464 | 466 |
github/deemru/w8io/169f3d6 76.65 ms ◑