tx · F7zTjoaxiCFqrCRZCKr7eNQcaHeikfEgjKLkVmMJV29y

3MtiaDPTLPsaUVMG65GhAMjwZ7WCi45w7YG:  -0.01000000 Waves

2021.07.21 01:23 [1622537] smart account 3MtiaDPTLPsaUVMG65GhAMjwZ7WCi45w7YG > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
31.48 ms