tx · 7xoHNgrj1RJf62vf6kYsDGcHc8dwP9iJftRnL4kWpaeb

3N6niAdk9Crd8a9vmPpP3NPSaFhFnifJDHH:  -0.01400000 Waves

2022.04.06 12:48 [1996545] smart account 3N6niAdk9Crd8a9vmPpP3NPSaFhFnifJDHH > SELF 0.00000000 Waves

{ "type": 13, "id": "7xoHNgrj1RJf62vf6kYsDGcHc8dwP9iJftRnL4kWpaeb", "fee": 1400000, "feeAssetId": null, "timestamp": 1649238480408, "version": 2, "chainId": 84, "sender": "3N6niAdk9Crd8a9vmPpP3NPSaFhFnifJDHH", "senderPublicKey": "4Y2j7j36bbSpVNivRG9YnbmgvEju8M3JrFsUhk2vMWdi", "proofs": [ "4KvZ5UJab4UuaXMW8636ghJAkZDNikH1b9uwgMwEjRNCc1JS9xYRoFJVtYScinGfiaMbCvvRkLaNHDw18n2bLzEY", "2S3M4oGqb7S6R4czWHVGwQCKkd9iTu38ieyBQp7bYWmC3u2UMBoufXVaDTZLBxRnYbFQ1qXG1kMgsHSQk7bTRr3A" ], "script": "base64:AAIFAAAAAAAAADAIAhIDCgEEEgcKBQEBCAgEEgMKAQESAwoBARIAEgMKAQESABIAEgASBQoDBAEIEgAAAABUAAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAIa1ZlcnNpb24CAAAAB3ZlcnNpb24AAAAAB2tBY3RpdmUCAAAABmFjdGl2ZQAAAAAJa0Fzc2V0SWRBAgAAAApBX2Fzc2V0X2lkAAAAAAlrQXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAACWtCYWxhbmNlQQIAAAAPQV9hc3NldF9iYWxhbmNlAAAAAAlrQmFsYW5jZUICAAAAD0JfYXNzZXRfYmFsYW5jZQAAAAANa0JhbGFuY2VJbml0QQIAAAAMQV9hc3NldF9pbml0AAAAAA1rQmFsYW5jZUluaXRCAgAAAAxCX2Fzc2V0X2luaXQAAAAADWtTaGFyZUFzc2V0SWQCAAAADnNoYXJlX2Fzc2V0X2lkAAAAABFrU2h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MYWRtaW5QdWJLZXkzBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAEWFkbWluSW52b2tlUHViS2V5AwMFAAAAE2NhbGxUYWtlSW50b0FjY291bnQFAAAADXNpZ25lZEJ5QWRtaW4HBgUAAAATbXVsdGlTaWduZWRCeUFkbWlucwUAAAATbXVsdGlTaWduZWRCeUFkbWluc8B0yYM=", "height": 1996545, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CRgXTYVzaYMVixPqvu84xVeu8J2WxdXAGaboEvpRTqQs Next: none Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let version = "1.0.0"
55
6-let keyVersion = "version"
6+let kVersion = "version"
77
8-let keyActive = "active"
8+let kActive = "active"
99
10-let keyAssetIdA = "A_asset_id"
10+let kAssetIdA = "A_asset_id"
1111
12-let keyAssetIdB = "B_asset_id"
12+let kAssetIdB = "B_asset_id"
1313
14-let keyBalanceA = "A_asset_balance"
14+let kBalanceA = "A_asset_balance"
1515
16-let keyBalanceB = "B_asset_balance"
16+let kBalanceB = "B_asset_balance"
1717
18-let keyBalanceInitA = "A_asset_init"
18+let kBalanceInitA = "A_asset_init"
1919
20-let keyBalanceInitB = "B_asset_init"
20+let kBalanceInitB = "B_asset_init"
2121
22-let keyShareAssetId = "share_asset_id"
22+let kShareAssetId = "share_asset_id"
2323
24-let keyShareAssetSupply = "share_asset_supply"
24+let kShareAssetSupply = "share_asset_supply"
2525
26-let keyCommission = "commission"
26+let kFee = "commission"
2727
28-let keyCommissionScaleDelimiter = "commission_scale_delimiter"
28+let kCause = "shutdown_cause"
2929
30-let keyCause = "shutdown_cause"
30+let kFirstHarvest = "first_harvest"
3131
32-let keyFirstHarvest = "first_harvest"
33-
34-let keyFirstHarvestHeight = "first_harvest_height"
32+let kFirstHarvestHeight = "first_harvest_height"
3533
3634 let kShareLimit = "share_limit_on_first_harvest"
3735
4139
4240 let kStartHeight = "start_height"
4341
44-let kFirstHarvestHeight = "first_harvest_height"
42+let kUSDNAddress = "staking_usdnnsbt_address"
4543
46-let keyUSDNNSBTAddress = "staking_usdnnsbt_address"
44+let kEURNAddress = "staking_eurn_address"
4745
48-let keyEURNAddress = "staking_eurn_address"
46+let kLeasingPool = "leasing_address"
4947
50-let keyLeasingPool = "leasing_address"
48+let kLeasingAmount = "leasing_amount"
5149
52-let keyLeasingAmount = "leasing_amount"
50+let kLeasingId = "leasing_id"
5351
54-let keyLeasingId = "leasing_id"
52+let kAdminPubKey1 = "admin_pub_1"
5553
56-let keyAdminPubKey1 = "admin_pub_1"
54+let kAdminPubKey2 = "admin_pub_2"
5755
58-let keyAdminPubKey2 = "admin_pub_2"
56+let kAdminPubKey3 = "admin_pub_3"
5957
60-let keyAdminPubKey3 = "admin_pub_3"
58+let kAdminInvokePubKey = "admin_invoke_pub"
59+
60+let kMoneyBoxAddress = "money_box_address"
6161
6262 let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
6363
64-func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) {
64+func getBase58FromOracle (key) = match getString(oracle, key) {
6565 case string: String =>
6666 fromBase58String(string)
6767 case nothing =>
68- throw("Admin public key is empty")
68+ throw((key + "is empty"))
6969 }
7070
7171
72-let adminPubKey1 = getAdminPub(keyAdminPubKey1)
72+let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
7373
74-let adminPubKey2 = getAdminPub(keyAdminPubKey2)
74+let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
7575
76-let adminPubKey3 = getAdminPub(keyAdminPubKey3)
76+let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
7777
78-let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
78+let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey)
7979
80-let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
81-
82-let walletAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
80+let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
8381
8482 let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
8583
9189
9290 let stakingAssets = ["WAVES", toBase58String(USDN), toBase58String(EURN)]
9391
94-let stakingUSDNAddress = Address(fromBase58String(valueOrErrorMessage(getString(oracle, keyUSDNNSBTAddress), "no usdn staking address")))
92+let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
9593
96-let stakingEURNAddress = Address(fromBase58String(valueOrErrorMessage(getString(oracle, keyEURNAddress), "no eurn staking address")))
97-
98-let USDNToWavesExchanger = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37')
94+let stakingEURNAddress = Address(getBase58FromOracle(kEURNAddress))
9995
10096 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
10197
105101
106102 let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3)
107103
108-let active = getBooleanValue(this, keyActive)
104+let active = getBooleanValue(this, kActive)
109105
110-let strAssetIdA = getStringValue(this, keyAssetIdA)
106+let strAssetIdA = getStringValue(this, kAssetIdA)
111107
112-let strAssetIdB = getStringValue(this, keyAssetIdB)
108+let strAssetIdB = getStringValue(this, kAssetIdB)
113109
114110 let assetIdA = if ((strAssetIdA == "WAVES"))
115111 then unit
137133 throw("Match error")
138134 }
139135
140-let balanceA = getIntegerValue(this, keyBalanceA)
136+let balanceA = getIntegerValue(this, kBalanceA)
141137
142-let balanceB = getIntegerValue(this, keyBalanceB)
138+let balanceB = getIntegerValue(this, kBalanceB)
143139
144-let shareAssetId = fromBase58String(getStringValue(this, keyShareAssetId))
140+let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
145141
146-let shareAssetSupply = getIntegerValue(this, keyShareAssetSupply)
142+let shareAssetSupply = getIntegerValue(this, kShareAssetSupply)
147143
148-let commission = 3000
144+let fee = getIntegerValue(this, kFee)
149145
150-let commissionGovernance = 1200
146+let feeGovernance = fraction(fee, 40, 100)
151147
152-let commissionScaleDelimiter = 1000000
148+let feeScale6 = 1000000
153149
154150 let scaleValue3 = 1000
155151
178174 then getInteger(stakingEURNAddress, ((("%s%s%s__stakingBalance__" + toBase58String(aId)) + "__") + toString(this)))
179175 else 0
180176 case _: Unit =>
181- valueOrElse(getInteger(this, keyLeasingAmount), 0)
177+ valueOrElse(getInteger(this, kLeasingAmount), 0)
182178 case _ =>
183179 throw("Match error")
184180 }
195191
196192 let stakedAmountB = stakedAmount(assetIdB)
197193
198-let assetInitA = getIntegerValue(this, keyBalanceInitA)
194+let assetInitA = getIntegerValue(this, kBalanceInitA)
199195
200-let assetInitB = getIntegerValue(this, keyBalanceInitB)
196+let assetInitB = getIntegerValue(this, kBalanceInitB)
201197
202198 let availableBalanceA = (balanceA - stakedAmountA)
203199
233229 }
234230
235231
236-func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
232+func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
237233
238234
239235 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
247243
248244 func calcStakingParams (stake,amount,assetId) = if (stake)
249245 then {
250- let $t065746640 = calcStakingFuncAndAddres(stake, assetId)
251- let call = $t065746640._1
252- let stakingAddr = $t065746640._2
246+ let $t060896155 = calcStakingFuncAndAddres(stake, assetId)
247+ let call = $t060896155._1
248+ let stakingAddr = $t060896155._2
253249 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
254250 }
255251 else {
256- let $t067266792 = calcStakingFuncAndAddres(stake, assetId)
257- let call = $t067266792._1
258- let stakingAddr = $t067266792._2
252+ let $t062416307 = calcStakingFuncAndAddres(stake, assetId)
253+ let call = $t062416307._1
254+ let stakingAddr = $t062416307._2
259255 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
260256 }
261257
262258
263259 func calculateFees (pmtAmount,minAmountToReceive,tokenFrom,tokenTo) = {
264260 let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom))
265- let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter)
266- let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter)
261+ let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fee), feeScale6)
262+ let governanceReward = fraction(amountWithoutFee, feeGovernance, feeScale6)
267263 if ((minAmountToReceive > amountWithFee))
268264 then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive)))
269265 else $Tuple3(amountWithoutFee, amountWithFee, governanceReward)
280276
281277 @Callable(i)
282278 func init (firstHarvest) = {
283- let $t079628039 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
284- let pmtAmountA = $t079628039._1
285- let pmtAssetIdA = $t079628039._2
286- let $t080448121 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
287- let pmtAmountB = $t080448121._1
288- let pmtAssetIdB = $t080448121._2
289- let $t081268203 = getAssetInfo(pmtAssetIdA)
290- let pmtStrAssetIdA = $t081268203._1
291- let pmtAssetNameA = $t081268203._2
292- let pmtDecimalsA = $t081268203._3
293- let $t082088285 = getAssetInfo(pmtAssetIdB)
294- let pmtStrAssetIdB = $t082088285._1
295- let pmtAssetNameB = $t082088285._2
296- let pmtDecimalsB = $t082088285._3
297- if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey)))
279+ let $t074187495 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
280+ let pmtAmountA = $t074187495._1
281+ let pmtAssetIdA = $t074187495._2
282+ let $t075007577 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
283+ let pmtAmountB = $t075007577._1
284+ let pmtAssetIdB = $t075007577._2
285+ let $t075827659 = getAssetInfo(pmtAssetIdA)
286+ let pmtStrAssetIdA = $t075827659._1
287+ let pmtAssetNameA = $t075827659._2
288+ let pmtDecimalsA = $t075827659._3
289+ let $t076647741 = getAssetInfo(pmtAssetIdB)
290+ let pmtStrAssetIdB = $t076647741._1
291+ let pmtAssetNameB = $t076647741._2
292+ let pmtDecimalsB = $t076647741._3
293+ if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey)))
298294 then throw("Only admin can call this function")
299- else if (isDefined(getBoolean(this, keyActive)))
295+ else if (isDefined(getBoolean(this, kActive)))
300296 then throw("DApp is already active")
301297 else if ((pmtAssetIdA == pmtAssetIdB))
302298 then throw("Assets must be different")
320316 else 0
321317 if ((stake2 == stake2))
322318 then {
323- let baseEntry = [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)]
319+ let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_cpmm")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)]
324320 if (firstHarvest)
325- then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
321+ then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
326322 else baseEntry
327323 }
328324 else throw("Strict value is not equal to itself.")
335331
336332 @Callable(i)
337333 func initWithInitRatio (amtAssetA,amtAssetB,strAssetIdA,strAssetIdB,firstHarvest) = {
338- let $t01087410961 = getAssetInfoFromString(strAssetIdA)
339- let pmtStrAssetIdA = $t01087410961._1
340- let pmtAssetNameA = $t01087410961._2
341- let pmtDecimalsA = $t01087410961._3
342- let $t01096611053 = getAssetInfoFromString(strAssetIdB)
343- let pmtStrAssetIdB = $t01096611053._1
344- let pmtAssetNameB = $t01096611053._2
345- let pmtDecimalsB = $t01096611053._3
346- if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey)))
334+ let $t01024610333 = getAssetInfoFromString(strAssetIdA)
335+ let pmtStrAssetIdA = $t01024610333._1
336+ let pmtAssetNameA = $t01024610333._2
337+ let pmtDecimalsA = $t01024610333._3
338+ let $t01033810425 = getAssetInfoFromString(strAssetIdB)
339+ let pmtStrAssetIdB = $t01033810425._1
340+ let pmtAssetNameB = $t01033810425._2
341+ let pmtDecimalsB = $t01033810425._3
342+ if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey)))
347343 then throw("Only admin can call this function")
348- else if (isDefined(getBoolean(this, keyActive)))
344+ else if (isDefined(getBoolean(this, kActive)))
349345 then throw("DApp is already active")
350346 else if ((strAssetIdA == strAssetIdB))
351347 then throw("Assets must be different")
356352 let shareInitialSupply = 0
357353 let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true)
358354 let shareIssueId = calculateAssetId(shareIssue)
359- let baseEntry = [StringEntry(keyVersion, version), BooleanEntry(keyActive, true), StringEntry(keyAssetIdA, pmtStrAssetIdA), StringEntry(keyAssetIdB, pmtStrAssetIdB), IntegerEntry(keyBalanceInitA, amtAssetA), IntegerEntry(keyBalanceInitB, amtAssetB), IntegerEntry(keyBalanceA, 0), IntegerEntry(keyBalanceB, 0), IntegerEntry(keyCommission, commission), IntegerEntry(keyCommissionScaleDelimiter, commissionScaleDelimiter), shareIssue, StringEntry(keyShareAssetId, toBase58String(shareIssueId)), IntegerEntry(keyShareAssetSupply, shareInitialSupply)]
355+ let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceInitA, amtAssetA), IntegerEntry(kBalanceInitB, amtAssetB), IntegerEntry(kBalanceA, 0), IntegerEntry(kBalanceB, 0), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_cpmm")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply)]
360356 if (firstHarvest)
361- then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
357+ then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
362358 else baseEntry
363359 }
364360 }
366362
367363
368364 @Callable(i)
369-func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey)))
365+func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey)))
370366 then throw("Only admin can call this function")
371367 else [IntegerEntry(kShareLimit, shareLimit)])
372368
378374 let pmtAssetIdB = i.payments[1].assetId
379375 let pmtAmountA = i.payments[0].amount
380376 let pmtAmountB = i.payments[1].amount
381- let $t01352113598 = getAssetInfo(pmtAssetIdA)
382- let pmtStrAssetIdA = $t01352113598._1
383- let pmtAssetNameA = $t01352113598._2
384- let pmtDecimalsA = $t01352113598._3
385- let $t01360313680 = getAssetInfo(pmtAssetIdB)
386- let pmtStrAssetIdB = $t01360313680._1
387- let pmtAssetNameB = $t01360313680._2
388- let pmtDecimalsB = $t01360313680._3
377+ let $t01280412881 = getAssetInfo(pmtAssetIdA)
378+ let pmtStrAssetIdA = $t01280412881._1
379+ let pmtAssetNameA = $t01280412881._2
380+ let pmtDecimalsA = $t01280412881._3
381+ let $t01288612963 = getAssetInfo(pmtAssetIdB)
382+ let pmtStrAssetIdB = $t01288612963._1
383+ let pmtAssetNameB = $t01288612963._2
384+ let pmtDecimalsB = $t01288612963._3
389385 let inital = if (if ((balanceA == 0))
390386 then (balanceB == 0)
391387 else false)
426422 then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil)
427423 else 0
428424 if ((stake2 == stake2))
429- then [Reissue(shareAssetId, shareTokenToPayAmount, true), IntegerEntry(keyBalanceA, (balanceA + pmtAmountA)), IntegerEntry(keyBalanceB, (balanceB + pmtAmountB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)]
425+ then [Reissue(shareAssetId, shareTokenToPayAmount, true), IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)]
430426 else throw("Strict value is not equal to itself.")
431427 }
432428 else throw("Strict value is not equal to itself.")
437433
438434 @Callable(i)
439435 func withdraw () = valueOrElse(isActive(), {
440- let $t01648616561 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
441- let pmtAmount = $t01648616561._1
442- let pmtAssetId = $t01648616561._2
436+ let $t01576315838 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
437+ let pmtAmount = $t01576315838._1
438+ let pmtAssetId = $t01576315838._2
443439 let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply)
444440 let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply)
445441 if ((size(i.payments) != 1))
458454 then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil)
459455 else 0
460456 if ((stake2 == stake2))
461- then [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)]
457+ then [IntegerEntry(kBalanceA, (balanceA - amountToPayA)), IntegerEntry(kBalanceB, (balanceB - amountToPayB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply - pmtAmount)), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)]
462458 else throw("Strict value is not equal to itself.")
463459 }
464460 else throw("Strict value is not equal to itself.")
469465
470466 @Callable(i)
471467 func exchange (minAmountToReceive) = valueOrElse(isActive(), {
472- let $t01786617941 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
473- let pmtAmount = $t01786617941._1
474- let pmtAssetId = $t01786617941._2
468+ let $t01713717212 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
469+ let pmtAmount = $t01713717212._1
470+ let pmtAssetId = $t01713717212._2
475471 if (if ((balanceA == 0))
476472 then true
477473 else (balanceB == 0))
485481 else if ((pmtAssetId == assetIdA))
486482 then {
487483 let assetIdSend = assetIdB
488- let $t01849218614 = calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB)
489- let amountWithoutFee = $t01849218614._1
490- let amountWithFee = $t01849218614._2
491- let governanceReward = $t01849218614._3
484+ let $t01776317885 = calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB)
485+ let amountWithoutFee = $t01776317885._1
486+ let amountWithFee = $t01776317885._2
487+ let governanceReward = $t01776317885._3
492488 let newBalanceA = (balanceA + pmtAmount)
493489 let newBalanceB = ((balanceB - amountWithFee) - governanceReward)
494490 let stake1 = if (containsElement(stakingAssets, strAssetIdA))
500496 then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdB], nil)
501497 else 0
502498 if ((stake2 == stake2))
503- then [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)]
499+ then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(moneyBoxAddress, governanceReward, assetIdSend)], $Tuple2(amountWithFee, assetIdSend))
504500 else throw("Strict value is not equal to itself.")
505501 }
506502 else throw("Strict value is not equal to itself.")
508504 else if ((pmtAssetId == assetIdB))
509505 then {
510506 let assetIdSend = assetIdA
511- let $t01956919691 = calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA)
512- let amountWithoutFee = $t01956919691._1
513- let amountWithFee = $t01956919691._2
514- let governanceReward = $t01956919691._3
507+ let $t01887718999 = calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA)
508+ let amountWithoutFee = $t01887718999._1
509+ let amountWithFee = $t01887718999._2
510+ let governanceReward = $t01887718999._3
515511 let newBalanceA = ((balanceA - amountWithFee) - governanceReward)
516512 let newBalanceB = (balanceB + pmtAmount)
517513 let stake1 = if (containsElement(stakingAssets, strAssetIdA))
523519 then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdB], nil)
524520 else 0
525521 if ((stake2 == stake2))
526- then [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)]
522+ then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(moneyBoxAddress, governanceReward, assetIdSend)], $Tuple2(amountWithFee, assetIdSend))
527523 else throw("Strict value is not equal to itself.")
528524 }
529525 else throw("Strict value is not equal to itself.")
535531
536532 @Callable(i)
537533 func shutdown () = if (!(active))
538- then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
539- else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
534+ then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
535+ else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
540536 then throw("Only admin can call this function")
541537 else suspend("Paused by admin")
542538
545541 @Callable(i)
546542 func activate () = if (active)
547543 then throw("DApp is already active")
548- else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
544+ else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
549545 then throw("Only admin can call this function")
550- else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
546+ else [BooleanEntry(kActive, true), DeleteEntry(kCause)]
551547
552548
553549
555551 func takeIntoAccountExtraFunds () = valueOrElse(isActive(), {
556552 let amountEnrollA = (accountBalanceWithStakedA - balanceA)
557553 let amountEnrollB = (accountBalanceWithStakedB - balanceB)
558- if ((i.caller != walletAddress))
554+ if ((i.caller != moneyBoxAddress))
559555 then throw("Only the wallet can call this function")
560556 else if (if ((0 > amountEnrollA))
561557 then true
575571 then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil)
576572 else 0
577573 if ((stake2 == stake2))
578- then [IntegerEntry(keyBalanceA, (balanceA + amountEnrollA)), IntegerEntry(keyBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)]
574+ then [IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)]
579575 else throw("Strict value is not equal to itself.")
580576 }
581577 else throw("Strict value is not equal to itself.")
589585 then throw("Only contract itself can invoke this function")
590586 else if ((assetIdString == "WAVES"))
591587 then {
592- let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, keyLeasingPool), "No leasing pool in oracle"))
593- let leasingId = getBinary(this, keyLeasingId)
594- let leasingAmount = valueOrElse(getInteger(this, keyLeasingAmount), 0)
588+ let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, kLeasingPool), "No leasing pool in oracle"))
589+ let leasingId = getBinary(this, kLeasingId)
590+ let leasingAmount = valueOrElse(getInteger(this, kLeasingAmount), 0)
595591 let newLeaseAmount = if (stake)
596592 then (leasingAmount + amount)
597593 else (leasingAmount - amount)
598594 let newLease = Lease(pool, newLeaseAmount)
599595 let newLeaseId = calculateLeaseId(newLease)
600- let baseEtry = [newLease, BinaryEntry(keyLeasingId, newLeaseId), IntegerEntry(keyLeasingAmount, newLeaseAmount)]
596+ let baseEtry = [newLease, BinaryEntry(kLeasingId, newLeaseId), IntegerEntry(kLeasingAmount, newLeaseAmount)]
601597 match leasingId {
602598 case lId: ByteVector =>
603599 ([LeaseCancel(lId)] ++ baseEtry)
606602 }
607603 }
608604 else {
609- let $t02342423527 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
610- let call = $t02342423527._1
611- let addr = $t02342423527._2
612- let params = $t02342423527._3
613- let payments = $t02342423527._4
605+ let $t02275322856 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
606+ let call = $t02275322856._1
607+ let addr = $t02275322856._2
608+ let params = $t02275322856._3
609+ let payments = $t02275322856._4
614610 let inv = invoke(addr, call, params, payments)
615611 if ((inv == inv))
616612 then nil
620616
621617
622618 @Callable(i)
623-func stakeAll () = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
619+func stakeAll () = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
624620 then throw("Only admin can call this function")
625621 else {
626622 let stake1 = if (containsElement(stakingAssets, strAssetIdA))
668664 let callTakeIntoAccount = if ((inv.dApp == this))
669665 then (inv.function == "takeIntoAccountExtraFunds")
670666 else false
671- let exchangeToWaves = if (if (if ((inv.dApp == USDNToWavesExchanger))
672- then (inv.function == "exchange")
673- else false)
674- then (size(inv.payments) == 1)
675- else false)
676- then if ((inv.payments[0].assetId == USDN))
677- then true
678- else (inv.payments[0].assetId == unit)
679- else false
680667 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
681668 then true
682669 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
683670 then true
684671 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
685672 then true
686- else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking)
687- if (if (if (callTakeIntoAccount)
688- then true
689- else exchangeToWaves)
673+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminInvokePubKey)
674+ if (if (callTakeIntoAccount)
690675 then signedByAdmin
691676 else false)
692677 then true
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let version = "1.0.0"
55
6-let keyVersion = "version"
6+let kVersion = "version"
77
8-let keyActive = "active"
8+let kActive = "active"
99
10-let keyAssetIdA = "A_asset_id"
10+let kAssetIdA = "A_asset_id"
1111
12-let keyAssetIdB = "B_asset_id"
12+let kAssetIdB = "B_asset_id"
1313
14-let keyBalanceA = "A_asset_balance"
14+let kBalanceA = "A_asset_balance"
1515
16-let keyBalanceB = "B_asset_balance"
16+let kBalanceB = "B_asset_balance"
1717
18-let keyBalanceInitA = "A_asset_init"
18+let kBalanceInitA = "A_asset_init"
1919
20-let keyBalanceInitB = "B_asset_init"
20+let kBalanceInitB = "B_asset_init"
2121
22-let keyShareAssetId = "share_asset_id"
22+let kShareAssetId = "share_asset_id"
2323
24-let keyShareAssetSupply = "share_asset_supply"
24+let kShareAssetSupply = "share_asset_supply"
2525
26-let keyCommission = "commission"
26+let kFee = "commission"
2727
28-let keyCommissionScaleDelimiter = "commission_scale_delimiter"
28+let kCause = "shutdown_cause"
2929
30-let keyCause = "shutdown_cause"
30+let kFirstHarvest = "first_harvest"
3131
32-let keyFirstHarvest = "first_harvest"
33-
34-let keyFirstHarvestHeight = "first_harvest_height"
32+let kFirstHarvestHeight = "first_harvest_height"
3533
3634 let kShareLimit = "share_limit_on_first_harvest"
3735
3836 let kBasePeriod = "base_period"
3937
4038 let kPeriodLength = "period_length"
4139
4240 let kStartHeight = "start_height"
4341
44-let kFirstHarvestHeight = "first_harvest_height"
42+let kUSDNAddress = "staking_usdnnsbt_address"
4543
46-let keyUSDNNSBTAddress = "staking_usdnnsbt_address"
44+let kEURNAddress = "staking_eurn_address"
4745
48-let keyEURNAddress = "staking_eurn_address"
46+let kLeasingPool = "leasing_address"
4947
50-let keyLeasingPool = "leasing_address"
48+let kLeasingAmount = "leasing_amount"
5149
52-let keyLeasingAmount = "leasing_amount"
50+let kLeasingId = "leasing_id"
5351
54-let keyLeasingId = "leasing_id"
52+let kAdminPubKey1 = "admin_pub_1"
5553
56-let keyAdminPubKey1 = "admin_pub_1"
54+let kAdminPubKey2 = "admin_pub_2"
5755
58-let keyAdminPubKey2 = "admin_pub_2"
56+let kAdminPubKey3 = "admin_pub_3"
5957
60-let keyAdminPubKey3 = "admin_pub_3"
58+let kAdminInvokePubKey = "admin_invoke_pub"
59+
60+let kMoneyBoxAddress = "money_box_address"
6161
6262 let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
6363
64-func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) {
64+func getBase58FromOracle (key) = match getString(oracle, key) {
6565 case string: String =>
6666 fromBase58String(string)
6767 case nothing =>
68- throw("Admin public key is empty")
68+ throw((key + "is empty"))
6969 }
7070
7171
72-let adminPubKey1 = getAdminPub(keyAdminPubKey1)
72+let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
7373
74-let adminPubKey2 = getAdminPub(keyAdminPubKey2)
74+let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
7575
76-let adminPubKey3 = getAdminPub(keyAdminPubKey3)
76+let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
7777
78-let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
78+let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey)
7979
80-let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
81-
82-let walletAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
80+let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
8381
8482 let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ')
8583
8684 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
8785
8886 let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ'
8987
9088 let EURN = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA'
9189
9290 let stakingAssets = ["WAVES", toBase58String(USDN), toBase58String(EURN)]
9391
94-let stakingUSDNAddress = Address(fromBase58String(valueOrErrorMessage(getString(oracle, keyUSDNNSBTAddress), "no usdn staking address")))
92+let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
9593
96-let stakingEURNAddress = Address(fromBase58String(valueOrErrorMessage(getString(oracle, keyEURNAddress), "no eurn staking address")))
97-
98-let USDNToWavesExchanger = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37')
94+let stakingEURNAddress = Address(getBase58FromOracle(kEURNAddress))
9995
10096 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
10197
10298 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
10399
104100 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
105101
106102 let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3)
107103
108-let active = getBooleanValue(this, keyActive)
104+let active = getBooleanValue(this, kActive)
109105
110-let strAssetIdA = getStringValue(this, keyAssetIdA)
106+let strAssetIdA = getStringValue(this, kAssetIdA)
111107
112-let strAssetIdB = getStringValue(this, keyAssetIdB)
108+let strAssetIdB = getStringValue(this, kAssetIdB)
113109
114110 let assetIdA = if ((strAssetIdA == "WAVES"))
115111 then unit
116112 else fromBase58String(strAssetIdA)
117113
118114 let assetIdB = if ((strAssetIdB == "WAVES"))
119115 then unit
120116 else fromBase58String(strAssetIdB)
121117
122118 let assetNameA = match assetIdA {
123119 case id: ByteVector =>
124120 value(assetInfo(id)).name
125121 case waves: Unit =>
126122 "WAVES"
127123 case _ =>
128124 throw("Match error")
129125 }
130126
131127 let assetNameB = match assetIdB {
132128 case id: ByteVector =>
133129 value(assetInfo(id)).name
134130 case waves: Unit =>
135131 "WAVES"
136132 case _ =>
137133 throw("Match error")
138134 }
139135
140-let balanceA = getIntegerValue(this, keyBalanceA)
136+let balanceA = getIntegerValue(this, kBalanceA)
141137
142-let balanceB = getIntegerValue(this, keyBalanceB)
138+let balanceB = getIntegerValue(this, kBalanceB)
143139
144-let shareAssetId = fromBase58String(getStringValue(this, keyShareAssetId))
140+let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
145141
146-let shareAssetSupply = getIntegerValue(this, keyShareAssetSupply)
142+let shareAssetSupply = getIntegerValue(this, kShareAssetSupply)
147143
148-let commission = 3000
144+let fee = getIntegerValue(this, kFee)
149145
150-let commissionGovernance = 1200
146+let feeGovernance = fraction(fee, 40, 100)
151147
152-let commissionScaleDelimiter = 1000000
148+let feeScale6 = 1000000
153149
154150 let scaleValue3 = 1000
155151
156152 let scaleValue8 = 100000000
157153
158154 let slippageToleranceDelimiter = 1000
159155
160156 let scaleValue8Digits = 8
161157
162158 func accountBalance (assetId) = match assetId {
163159 case id: ByteVector =>
164160 assetBalance(this, id)
165161 case waves: Unit =>
166162 wavesBalance(this).available
167163 case _ =>
168164 throw("Match error")
169165 }
170166
171167
172168 func stakedAmount (assetId) = {
173169 let stakedAmountCalculated = match assetId {
174170 case aId: ByteVector =>
175171 if ((aId == USDN))
176172 then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this)))
177173 else if ((aId == EURN))
178174 then getInteger(stakingEURNAddress, ((("%s%s%s__stakingBalance__" + toBase58String(aId)) + "__") + toString(this)))
179175 else 0
180176 case _: Unit =>
181- valueOrElse(getInteger(this, keyLeasingAmount), 0)
177+ valueOrElse(getInteger(this, kLeasingAmount), 0)
182178 case _ =>
183179 throw("Match error")
184180 }
185181 match stakedAmountCalculated {
186182 case i: Int =>
187183 i
188184 case _ =>
189185 0
190186 }
191187 }
192188
193189
194190 let stakedAmountA = stakedAmount(assetIdA)
195191
196192 let stakedAmountB = stakedAmount(assetIdB)
197193
198-let assetInitA = getIntegerValue(this, keyBalanceInitA)
194+let assetInitA = getIntegerValue(this, kBalanceInitA)
199195
200-let assetInitB = getIntegerValue(this, keyBalanceInitB)
196+let assetInitB = getIntegerValue(this, kBalanceInitB)
201197
202198 let availableBalanceA = (balanceA - stakedAmountA)
203199
204200 let availableBalanceB = (balanceB - stakedAmountB)
205201
206202 let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA)
207203
208204 let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB)
209205
210206 let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA))
211207 then (accountBalanceWithStakedB >= balanceB)
212208 else false
213209
214210 func getAssetInfo (assetId) = match assetId {
215211 case id: ByteVector =>
216212 let stringId = toBase58String(id)
217213 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
218214 $Tuple3(stringId, info.name, info.decimals)
219215 case waves: Unit =>
220216 $Tuple3("WAVES", "WAVES", 8)
221217 case _ =>
222218 throw("Match error")
223219 }
224220
225221
226222 func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES"))
227223 then $Tuple3("WAVES", "WAVES", 8)
228224 else {
229225 let stringId = assetStr
230226 let id = fromBase58String(assetStr)
231227 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
232228 $Tuple3(stringId, info.name, info.decimals)
233229 }
234230
235231
236-func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
232+func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
237233
238234
239235 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
240236 then if ((assetId == USDN))
241237 then $Tuple2("lockNeutrino", stakingUSDNAddress)
242238 else $Tuple2("startStaking", stakingEURNAddress)
243239 else if ((assetId == USDN))
244240 then $Tuple2("unlockNeutrino", stakingUSDNAddress)
245241 else $Tuple2("stopStaking", stakingEURNAddress)
246242
247243
248244 func calcStakingParams (stake,amount,assetId) = if (stake)
249245 then {
250- let $t065746640 = calcStakingFuncAndAddres(stake, assetId)
251- let call = $t065746640._1
252- let stakingAddr = $t065746640._2
246+ let $t060896155 = calcStakingFuncAndAddres(stake, assetId)
247+ let call = $t060896155._1
248+ let stakingAddr = $t060896155._2
253249 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
254250 }
255251 else {
256- let $t067266792 = calcStakingFuncAndAddres(stake, assetId)
257- let call = $t067266792._1
258- let stakingAddr = $t067266792._2
252+ let $t062416307 = calcStakingFuncAndAddres(stake, assetId)
253+ let call = $t062416307._1
254+ let stakingAddr = $t062416307._2
259255 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
260256 }
261257
262258
263259 func calculateFees (pmtAmount,minAmountToReceive,tokenFrom,tokenTo) = {
264260 let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom))
265- let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter)
266- let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter)
261+ let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fee), feeScale6)
262+ let governanceReward = fraction(amountWithoutFee, feeGovernance, feeScale6)
267263 if ((minAmountToReceive > amountWithFee))
268264 then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive)))
269265 else $Tuple3(amountWithoutFee, amountWithFee, governanceReward)
270266 }
271267
272268
273269 func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(accountBalanceWithStakedA)) + " ") + assetNameA) + ", ") + toString(accountBalanceWithStakedB)) + " ") + assetNameB) + ". State: ") + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB))
274270
275271
276272 func isActive () = if (active)
277273 then unit
278274 else throw("DApp is inactive at this moment")
279275
280276
281277 @Callable(i)
282278 func init (firstHarvest) = {
283- let $t079628039 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
284- let pmtAmountA = $t079628039._1
285- let pmtAssetIdA = $t079628039._2
286- let $t080448121 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
287- let pmtAmountB = $t080448121._1
288- let pmtAssetIdB = $t080448121._2
289- let $t081268203 = getAssetInfo(pmtAssetIdA)
290- let pmtStrAssetIdA = $t081268203._1
291- let pmtAssetNameA = $t081268203._2
292- let pmtDecimalsA = $t081268203._3
293- let $t082088285 = getAssetInfo(pmtAssetIdB)
294- let pmtStrAssetIdB = $t082088285._1
295- let pmtAssetNameB = $t082088285._2
296- let pmtDecimalsB = $t082088285._3
297- if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey)))
279+ let $t074187495 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
280+ let pmtAmountA = $t074187495._1
281+ let pmtAssetIdA = $t074187495._2
282+ let $t075007577 = $Tuple2(i.payments[1].amount, i.payments[1].assetId)
283+ let pmtAmountB = $t075007577._1
284+ let pmtAssetIdB = $t075007577._2
285+ let $t075827659 = getAssetInfo(pmtAssetIdA)
286+ let pmtStrAssetIdA = $t075827659._1
287+ let pmtAssetNameA = $t075827659._2
288+ let pmtDecimalsA = $t075827659._3
289+ let $t076647741 = getAssetInfo(pmtAssetIdB)
290+ let pmtStrAssetIdB = $t076647741._1
291+ let pmtAssetNameB = $t076647741._2
292+ let pmtDecimalsB = $t076647741._3
293+ if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey)))
298294 then throw("Only admin can call this function")
299- else if (isDefined(getBoolean(this, keyActive)))
295+ else if (isDefined(getBoolean(this, kActive)))
300296 then throw("DApp is already active")
301297 else if ((pmtAssetIdA == pmtAssetIdB))
302298 then throw("Assets must be different")
303299 else {
304300 let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7))
305301 let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this))
306302 let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2)
307303 let arg1 = pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN)
308304 let arg2 = pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN)
309305 let arg3 = pow(10, 0, shareDecimals, 0, 0, DOWN)
310306 let shareInitialSupply = fraction(arg1, arg2, arg3)
311307 let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true)
312308 let shareIssueId = calculateAssetId(shareIssue)
313309 let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA))
314310 then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil)
315311 else 0
316312 if ((stake1 == stake1))
317313 then {
318314 let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB))
319315 then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil)
320316 else 0
321317 if ((stake2 == stake2))
322318 then {
323- let baseEntry = [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)]
319+ let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceA, pmtAmountA), IntegerEntry(kBalanceB, pmtAmountB), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_cpmm")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)]
324320 if (firstHarvest)
325- then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
321+ then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
326322 else baseEntry
327323 }
328324 else throw("Strict value is not equal to itself.")
329325 }
330326 else throw("Strict value is not equal to itself.")
331327 }
332328 }
333329
334330
335331
336332 @Callable(i)
337333 func initWithInitRatio (amtAssetA,amtAssetB,strAssetIdA,strAssetIdB,firstHarvest) = {
338- let $t01087410961 = getAssetInfoFromString(strAssetIdA)
339- let pmtStrAssetIdA = $t01087410961._1
340- let pmtAssetNameA = $t01087410961._2
341- let pmtDecimalsA = $t01087410961._3
342- let $t01096611053 = getAssetInfoFromString(strAssetIdB)
343- let pmtStrAssetIdB = $t01096611053._1
344- let pmtAssetNameB = $t01096611053._2
345- let pmtDecimalsB = $t01096611053._3
346- if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey)))
334+ let $t01024610333 = getAssetInfoFromString(strAssetIdA)
335+ let pmtStrAssetIdA = $t01024610333._1
336+ let pmtAssetNameA = $t01024610333._2
337+ let pmtDecimalsA = $t01024610333._3
338+ let $t01033810425 = getAssetInfoFromString(strAssetIdB)
339+ let pmtStrAssetIdB = $t01033810425._1
340+ let pmtAssetNameB = $t01033810425._2
341+ let pmtDecimalsB = $t01033810425._3
342+ if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey)))
347343 then throw("Only admin can call this function")
348- else if (isDefined(getBoolean(this, keyActive)))
344+ else if (isDefined(getBoolean(this, kActive)))
349345 then throw("DApp is already active")
350346 else if ((strAssetIdA == strAssetIdB))
351347 then throw("Assets must be different")
352348 else {
353349 let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7))
354350 let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this))
355351 let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2)
356352 let shareInitialSupply = 0
357353 let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true)
358354 let shareIssueId = calculateAssetId(shareIssue)
359- let baseEntry = [StringEntry(keyVersion, version), BooleanEntry(keyActive, true), StringEntry(keyAssetIdA, pmtStrAssetIdA), StringEntry(keyAssetIdB, pmtStrAssetIdB), IntegerEntry(keyBalanceInitA, amtAssetA), IntegerEntry(keyBalanceInitB, amtAssetB), IntegerEntry(keyBalanceA, 0), IntegerEntry(keyBalanceB, 0), IntegerEntry(keyCommission, commission), IntegerEntry(keyCommissionScaleDelimiter, commissionScaleDelimiter), shareIssue, StringEntry(keyShareAssetId, toBase58String(shareIssueId)), IntegerEntry(keyShareAssetSupply, shareInitialSupply)]
355+ let baseEntry = [StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssetIdA, pmtStrAssetIdA), StringEntry(kAssetIdB, pmtStrAssetIdB), IntegerEntry(kBalanceInitA, amtAssetA), IntegerEntry(kBalanceInitB, amtAssetB), IntegerEntry(kBalanceA, 0), IntegerEntry(kBalanceB, 0), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_cpmm")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply)]
360356 if (firstHarvest)
361- then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
357+ then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
362358 else baseEntry
363359 }
364360 }
365361
366362
367363
368364 @Callable(i)
369-func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey)))
365+func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey)))
370366 then throw("Only admin can call this function")
371367 else [IntegerEntry(kShareLimit, shareLimit)])
372368
373369
374370
375371 @Callable(i)
376372 func replenishWithTwoTokens (slippageTolerance) = valueOrElse(isActive(), {
377373 let pmtAssetIdA = i.payments[0].assetId
378374 let pmtAssetIdB = i.payments[1].assetId
379375 let pmtAmountA = i.payments[0].amount
380376 let pmtAmountB = i.payments[1].amount
381- let $t01352113598 = getAssetInfo(pmtAssetIdA)
382- let pmtStrAssetIdA = $t01352113598._1
383- let pmtAssetNameA = $t01352113598._2
384- let pmtDecimalsA = $t01352113598._3
385- let $t01360313680 = getAssetInfo(pmtAssetIdB)
386- let pmtStrAssetIdB = $t01360313680._1
387- let pmtAssetNameB = $t01360313680._2
388- let pmtDecimalsB = $t01360313680._3
377+ let $t01280412881 = getAssetInfo(pmtAssetIdA)
378+ let pmtStrAssetIdA = $t01280412881._1
379+ let pmtAssetNameA = $t01280412881._2
380+ let pmtDecimalsA = $t01280412881._3
381+ let $t01288612963 = getAssetInfo(pmtAssetIdB)
382+ let pmtStrAssetIdB = $t01288612963._1
383+ let pmtAssetNameB = $t01288612963._2
384+ let pmtDecimalsB = $t01288612963._3
389385 let inital = if (if ((balanceA == 0))
390386 then (balanceB == 0)
391387 else false)
392388 then true
393389 else false
394390 let tokenRatio = if (inital)
395391 then fraction(fraction(assetInitA, scaleValue8, pmtAmountA), scaleValue3, fraction(assetInitB, scaleValue8, pmtAmountB))
396392 else fraction(fraction(balanceA, scaleValue8, pmtAmountA), scaleValue3, fraction(balanceB, scaleValue8, pmtAmountB))
397393 let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2)
398394 let shareTokenToPayAmount = if (inital)
399395 then fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN))
400396 else fraction(min([fraction(pmtAmountA, scaleValue8, balanceA), fraction(pmtAmountB, scaleValue8, balanceB)]), shareAssetSupply, scaleValue8)
401397 if (if ((0 > slippageTolerance))
402398 then true
403399 else (slippageTolerance > slippageToleranceDelimiter))
404400 then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance)))
405401 else if ((size(i.payments) != 2))
406402 then throw("Two attached assets expected")
407403 else if (if ((pmtAssetIdA != assetIdA))
408404 then true
409405 else (pmtAssetIdB != assetIdB))
410406 then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB))
411407 else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio))
412408 then true
413409 else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter)))
414410 then throw("Incorrect assets amount: amounts must have the contract ratio")
415411 else if ((shareTokenToPayAmount == 0))
416412 then throw("Too small amount to replenish")
417413 else if (!(hasEnoughBalance))
418414 then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious())
419415 else {
420416 let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA))
421417 then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil)
422418 else 0
423419 if ((stake1 == stake1))
424420 then {
425421 let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB))
426422 then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil)
427423 else 0
428424 if ((stake2 == stake2))
429- then [Reissue(shareAssetId, shareTokenToPayAmount, true), IntegerEntry(keyBalanceA, (balanceA + pmtAmountA)), IntegerEntry(keyBalanceB, (balanceB + pmtAmountB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)]
425+ then [Reissue(shareAssetId, shareTokenToPayAmount, true), IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)]
430426 else throw("Strict value is not equal to itself.")
431427 }
432428 else throw("Strict value is not equal to itself.")
433429 }
434430 })
435431
436432
437433
438434 @Callable(i)
439435 func withdraw () = valueOrElse(isActive(), {
440- let $t01648616561 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
441- let pmtAmount = $t01648616561._1
442- let pmtAssetId = $t01648616561._2
436+ let $t01576315838 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
437+ let pmtAmount = $t01576315838._1
438+ let pmtAssetId = $t01576315838._2
443439 let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply)
444440 let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply)
445441 if ((size(i.payments) != 1))
446442 then throw("One attached payment expected")
447443 else if ((pmtAssetId != shareAssetId))
448444 then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId)))
449445 else if (!(hasEnoughBalance))
450446 then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious())
451447 else {
452448 let stake1 = if (containsElement(stakingAssets, strAssetIdA))
453449 then invoke(this, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil)
454450 else 0
455451 if ((stake1 == stake1))
456452 then {
457453 let stake2 = if (containsElement(stakingAssets, strAssetIdB))
458454 then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil)
459455 else 0
460456 if ((stake2 == stake2))
461- then [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)]
457+ then [IntegerEntry(kBalanceA, (balanceA - amountToPayA)), IntegerEntry(kBalanceB, (balanceB - amountToPayB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply - pmtAmount)), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)]
462458 else throw("Strict value is not equal to itself.")
463459 }
464460 else throw("Strict value is not equal to itself.")
465461 }
466462 })
467463
468464
469465
470466 @Callable(i)
471467 func exchange (minAmountToReceive) = valueOrElse(isActive(), {
472- let $t01786617941 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
473- let pmtAmount = $t01786617941._1
474- let pmtAssetId = $t01786617941._2
468+ let $t01713717212 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
469+ let pmtAmount = $t01713717212._1
470+ let pmtAssetId = $t01713717212._2
475471 if (if ((balanceA == 0))
476472 then true
477473 else (balanceB == 0))
478474 then throw("Can't exchange with zero balance")
479475 else if ((0 >= minAmountToReceive))
480476 then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive)))
481477 else if ((size(i.payments) != 1))
482478 then throw("One attached payment expected")
483479 else if (!(hasEnoughBalance))
484480 then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious())
485481 else if ((pmtAssetId == assetIdA))
486482 then {
487483 let assetIdSend = assetIdB
488- let $t01849218614 = calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB)
489- let amountWithoutFee = $t01849218614._1
490- let amountWithFee = $t01849218614._2
491- let governanceReward = $t01849218614._3
484+ let $t01776317885 = calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB)
485+ let amountWithoutFee = $t01776317885._1
486+ let amountWithFee = $t01776317885._2
487+ let governanceReward = $t01776317885._3
492488 let newBalanceA = (balanceA + pmtAmount)
493489 let newBalanceB = ((balanceB - amountWithFee) - governanceReward)
494490 let stake1 = if (containsElement(stakingAssets, strAssetIdA))
495491 then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdA], nil)
496492 else 0
497493 if ((stake1 == stake1))
498494 then {
499495 let stake2 = if (containsElement(stakingAssets, strAssetIdB))
500496 then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdB], nil)
501497 else 0
502498 if ((stake2 == stake2))
503- then [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)]
499+ then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(moneyBoxAddress, governanceReward, assetIdSend)], $Tuple2(amountWithFee, assetIdSend))
504500 else throw("Strict value is not equal to itself.")
505501 }
506502 else throw("Strict value is not equal to itself.")
507503 }
508504 else if ((pmtAssetId == assetIdB))
509505 then {
510506 let assetIdSend = assetIdA
511- let $t01956919691 = calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA)
512- let amountWithoutFee = $t01956919691._1
513- let amountWithFee = $t01956919691._2
514- let governanceReward = $t01956919691._3
507+ let $t01887718999 = calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA)
508+ let amountWithoutFee = $t01887718999._1
509+ let amountWithFee = $t01887718999._2
510+ let governanceReward = $t01887718999._3
515511 let newBalanceA = ((balanceA - amountWithFee) - governanceReward)
516512 let newBalanceB = (balanceB + pmtAmount)
517513 let stake1 = if (containsElement(stakingAssets, strAssetIdA))
518514 then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdA], nil)
519515 else 0
520516 if ((stake1 == stake1))
521517 then {
522518 let stake2 = if (containsElement(stakingAssets, strAssetIdB))
523519 then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdB], nil)
524520 else 0
525521 if ((stake2 == stake2))
526- then [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)]
522+ then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(moneyBoxAddress, governanceReward, assetIdSend)], $Tuple2(amountWithFee, assetIdSend))
527523 else throw("Strict value is not equal to itself.")
528524 }
529525 else throw("Strict value is not equal to itself.")
530526 }
531527 else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB))
532528 })
533529
534530
535531
536532 @Callable(i)
537533 func shutdown () = if (!(active))
538- then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
539- else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
534+ then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
535+ else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
540536 then throw("Only admin can call this function")
541537 else suspend("Paused by admin")
542538
543539
544540
545541 @Callable(i)
546542 func activate () = if (active)
547543 then throw("DApp is already active")
548- else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
544+ else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
549545 then throw("Only admin can call this function")
550- else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
546+ else [BooleanEntry(kActive, true), DeleteEntry(kCause)]
551547
552548
553549
554550 @Callable(i)
555551 func takeIntoAccountExtraFunds () = valueOrElse(isActive(), {
556552 let amountEnrollA = (accountBalanceWithStakedA - balanceA)
557553 let amountEnrollB = (accountBalanceWithStakedB - balanceB)
558- if ((i.caller != walletAddress))
554+ if ((i.caller != moneyBoxAddress))
559555 then throw("Only the wallet can call this function")
560556 else if (if ((0 > amountEnrollA))
561557 then true
562558 else (0 > amountEnrollB))
563559 then suspend("Enroll amount negative")
564560 else if (if ((amountEnrollA == 0))
565561 then (amountEnrollB == 0)
566562 else false)
567563 then throw("No money to take")
568564 else {
569565 let stake1 = if (containsElement(stakingAssets, strAssetIdA))
570566 then invoke(this, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil)
571567 else 0
572568 if ((stake1 == stake1))
573569 then {
574570 let stake2 = if (containsElement(stakingAssets, strAssetIdB))
575571 then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil)
576572 else 0
577573 if ((stake2 == stake2))
578- then [IntegerEntry(keyBalanceA, (balanceA + amountEnrollA)), IntegerEntry(keyBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)]
574+ then [IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)]
579575 else throw("Strict value is not equal to itself.")
580576 }
581577 else throw("Strict value is not equal to itself.")
582578 }
583579 })
584580
585581
586582
587583 @Callable(i)
588584 func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this))
589585 then throw("Only contract itself can invoke this function")
590586 else if ((assetIdString == "WAVES"))
591587 then {
592- let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, keyLeasingPool), "No leasing pool in oracle"))
593- let leasingId = getBinary(this, keyLeasingId)
594- let leasingAmount = valueOrElse(getInteger(this, keyLeasingAmount), 0)
588+ let pool = addressFromStringValue(valueOrErrorMessage(getString(oracle, kLeasingPool), "No leasing pool in oracle"))
589+ let leasingId = getBinary(this, kLeasingId)
590+ let leasingAmount = valueOrElse(getInteger(this, kLeasingAmount), 0)
595591 let newLeaseAmount = if (stake)
596592 then (leasingAmount + amount)
597593 else (leasingAmount - amount)
598594 let newLease = Lease(pool, newLeaseAmount)
599595 let newLeaseId = calculateLeaseId(newLease)
600- let baseEtry = [newLease, BinaryEntry(keyLeasingId, newLeaseId), IntegerEntry(keyLeasingAmount, newLeaseAmount)]
596+ let baseEtry = [newLease, BinaryEntry(kLeasingId, newLeaseId), IntegerEntry(kLeasingAmount, newLeaseAmount)]
601597 match leasingId {
602598 case lId: ByteVector =>
603599 ([LeaseCancel(lId)] ++ baseEtry)
604600 case _ =>
605601 baseEtry
606602 }
607603 }
608604 else {
609- let $t02342423527 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
610- let call = $t02342423527._1
611- let addr = $t02342423527._2
612- let params = $t02342423527._3
613- let payments = $t02342423527._4
605+ let $t02275322856 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
606+ let call = $t02275322856._1
607+ let addr = $t02275322856._2
608+ let params = $t02275322856._3
609+ let payments = $t02275322856._4
614610 let inv = invoke(addr, call, params, payments)
615611 if ((inv == inv))
616612 then nil
617613 else throw("Strict value is not equal to itself.")
618614 }
619615
620616
621617
622618 @Callable(i)
623-func stakeAll () = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
619+func stakeAll () = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
624620 then throw("Only admin can call this function")
625621 else {
626622 let stake1 = if (containsElement(stakingAssets, strAssetIdA))
627623 then {
628624 let amountA = (balanceA - stakedAmountA)
629625 if ((amountA > 0))
630626 then invoke(this, "stakeUnstake", [true, amountA, strAssetIdA], nil)
631627 else 0
632628 }
633629 else 0
634630 if ((stake1 == stake1))
635631 then {
636632 let stake2 = if (containsElement(stakingAssets, strAssetIdB))
637633 then {
638634 let amountB = (balanceB - stakedAmountB)
639635 if ((amountB > 0))
640636 then invoke(this, "stakeUnstake", [true, amountB, strAssetIdB], nil)
641637 else 0
642638 }
643639 else 0
644640 if ((stake2 == stake2))
645641 then nil
646642 else throw("Strict value is not equal to itself.")
647643 }
648644 else throw("Strict value is not equal to itself.")
649645 })
650646
651647
652648 @Verifier(tx)
653649 func verify () = {
654650 let multiSignedByAdmins = {
655651 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
656652 then 1
657653 else 0
658654 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
659655 then 1
660656 else 0
661657 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
662658 then 1
663659 else 0
664660 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
665661 }
666662 match tx {
667663 case inv: InvokeScriptTransaction =>
668664 let callTakeIntoAccount = if ((inv.dApp == this))
669665 then (inv.function == "takeIntoAccountExtraFunds")
670666 else false
671- let exchangeToWaves = if (if (if ((inv.dApp == USDNToWavesExchanger))
672- then (inv.function == "exchange")
673- else false)
674- then (size(inv.payments) == 1)
675- else false)
676- then if ((inv.payments[0].assetId == USDN))
677- then true
678- else (inv.payments[0].assetId == unit)
679- else false
680667 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
681668 then true
682669 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
683670 then true
684671 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
685672 then true
686- else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking)
687- if (if (if (callTakeIntoAccount)
688- then true
689- else exchangeToWaves)
673+ else sigVerify(tx.bodyBytes, tx.proofs[0], adminInvokePubKey)
674+ if (if (callTakeIntoAccount)
690675 then signedByAdmin
691676 else false)
692677 then true
693678 else multiSignedByAdmins
694679 case _ =>
695680 multiSignedByAdmins
696681 }
697682 }
698683

github/deemru/w8io/169f3d6 
447.55 ms