tx · F9CARzQprDsQmGQdS8vrk6r4kSA3PnShUrRz9zbQd13d

3N1fUnDJnsNxqPhgnJbzqt2rkZSNHGbpXkc:  -0.02500000 Waves

2022.07.06 10:35 [2127534] smart account 3N1fUnDJnsNxqPhgnJbzqt2rkZSNHGbpXkc > SELF 0.00000000 Waves

{ "type": 13, "id": "F9CARzQprDsQmGQdS8vrk6r4kSA3PnShUrRz9zbQd13d", "fee": 2500000, "feeAssetId": null, "timestamp": 1657092903074, "version": 2, "chainId": 84, "sender": "3N1fUnDJnsNxqPhgnJbzqt2rkZSNHGbpXkc", "senderPublicKey": "3Nk7cXANGgo4nph6EximnLotDFDXZyRV4MPrDNNY8hhE", "proofs": [ "5xdUh3VUtDfYCuiPSmLucqYUoxut1JUKetL5Qh5tDswViroCVd2fw8XRKELZf56J9LuYXkQDFiTxi6QBXakgYXqC", "2sm7eNtaaDeEJ3ypYgGPSDaNXEX8SpwQEN9iJfSjrNc4WY9VLuCnCW8umAjiuLrYWSPAo2fhncaC9sSafVwWtKDz" ], "script": "base64:AAIFAAAAAAAAAB4IAhIDCgEEEgUKAwgBARIAEgASAwoBARIFCgMEAQgAAABRAAAAAAd2ZXJzaW9uAgAAAAUyLjAuMAAAAAAIa1ZlcnNpb24CAAAAB3ZlcnNpb24AAAAAB2tBY3RpdmUCAAAABmFjdGl2ZQAAAAAHa0Fzc2V0cwIAAAAJYXNzZXRfaWRzAAAAAA1rQXNzZXRCYWxhbmNlAgAAAA5fYXNzZXRfYmFsYW5jZQAAAAANa1NoYXJlQXNzZXRJZAIAAAAOc2hhcmVfYXNzZXRfaWQAAAAAEWtTaGFyZUFzc2V0U3VwcGx5AgAAABJzaGFyZV9hc3NldF9zdXBwbHkAAAAABGtGZWUCAAAACmNvbW1pc3Npb24AAAAACmtJbnZhcmlhbnQCAAAACWludmFyaWFudAAAAAAGa0NhdXNlAgAAAA5zaHV0ZG93bl9jYXVzZQAAAAAMa1VTRE5BZGRyZXNzAgAAABhzdGFraW5nX3Vz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RoaXMJAAAAAAAAAggFAAAAA2ludgAAAAhmdW5jdGlvbgIAAAAZdGFrZUludG9BY2NvdW50RXh0cmFGdW5kcwcEAAAADXNpZ25lZEJ5QWRtaW4DAwMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTEGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMYWRtaW5QdWJLZXkyBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGFkbWluUHViS2V5MwYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABFhZG1pblB1YktleUludm9rZQMDBQAAABNjYWxsVGFrZUludG9BY2NvdW50BQAAAA1zaWduZWRCeUFkbWluBwYFAAAAE211bHRpU2lnbmVkQnlBZG1pbnMFAAAAE211bHRpU2lnbmVkQnlBZG1pbnNeQQhQ", "height": 2127534, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DSLFqqRDcEK9jojruoj5oqWriPqvbWZ8GHFsAhU9anRq Next: none Diff:
OldNewDifferences
5757
5858 let kVotingAddress = "voting_address"
5959
60-let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
60+let oracle = Address(base58'3PEbqViERCoKnmcSULh6n2aiMvUdSQdCsom')
6161
6262 func getBase58FromOracle (key) = match getString(oracle, key) {
6363 case string: String =>
400400 let balanceTo = $t01313613276._2
401401 let accountBalanceFrom = $t01313613276._3
402402 let accountBalanceTo = $t01313613276._4
403- let pmtStrAssetId = toBase58String(value(pmtAssetId))
404- if ((0 >= estimatedAmountToReceive))
405- then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive)))
406- else if ((minAmountToReceive > estimatedAmountToReceive))
407- then throw("Minimal amount can't be greater than estimated.")
408- else if ((size(i.payments) != 1))
409- then throwOnePayment()
410- else if (!(if ((balanceFrom > accountBalanceFrom))
411- then true
412- else (balanceTo > accountBalanceTo)))
413- then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(balanceFrom, value(pmtAssetId), balanceTo, fromBase58String(exchangeAseetId)))
414- else if (if (!(contains(value(exchangeAssets), pmtStrAssetId)))
415- then true
416- else !(contains(value(exchangeAssets), exchangeAseetId)))
417- then throwAssets()
418- else if ((10000000 > pmtAmount))
419- then throw("Only swap of 10.000000 or more tokens is allowed")
420- else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount)))
403+ if ((1 == 1))
404+ then throw(((((((("balanceFrom:" + toString(balanceFrom)) + " balanceTo: ") + toString(balanceTo)) + "accountBalanceFrom:") + toString(accountBalanceFrom)) + " accountBalanceTo: ") + toString(accountBalanceTo)))
405+ else {
406+ let k = 1
407+ let pmtStrAssetId = toBase58String(value(pmtAssetId))
408+ if ((0 >= estimatedAmountToReceive))
409+ then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive)))
410+ else if ((minAmountToReceive > estimatedAmountToReceive))
411+ then throw("Minimal amount can't be greater than estimated.")
412+ else if ((size(i.payments) != 1))
413+ then throwOnePayment()
414+ else if (!(if ((balanceFrom > accountBalanceFrom))
415+ then true
416+ else (balanceTo > accountBalanceTo)))
417+ then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(balanceFrom, value(pmtAssetId), balanceTo, fromBase58String(exchangeAseetId)))
418+ else if (if (!(contains(value(exchangeAssets), pmtStrAssetId)))
421419 then true
422- else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax))
423- then throw("Incorrect args and pmt ratio")
424- else {
425- let invariant = invariantCalc(balanceFrom, balanceTo)
426- let amount = calculateSendAmount(balanceFrom, balanceTo, invariant, estimatedAmountToReceive, minAmountToReceive, pmtAmount)
427- let feeDiscount = calculateFeeDiscount(i.originCaller)
428- let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
429- let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
430- let $t01491515024 = $Tuple2((balanceFrom + pmtAmount), ((balanceTo - amountMinusFee) - governanceReward))
431- let newBalanceFrom = $t01491515024._1
432- let newBalanceTo = $t01491515024._2
433- let dAppThresholdAmount = fraction((newBalanceFrom + newBalanceTo), dAppThreshold, (2 * dAppThresholdScale2))
434- if (if ((dAppThresholdAmount > newBalanceFrom))
420+ else !(contains(value(exchangeAssets), exchangeAseetId)))
421+ then throwAssets()
422+ else if ((10000000 > pmtAmount))
423+ then throw("Only swap of 10.000000 or more tokens is allowed")
424+ else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount)))
435425 then true
436- else (dAppThresholdAmount > newBalanceTo))
437- then throwThreshold(dAppThresholdAmount, newBalanceFrom, newBalanceTo, value(pmtAssetId), fromBase58String(exchangeAseetId))
426+ else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax))
427+ then throw("Incorrect args and pmt ratio")
438428 else {
439- let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
440- then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
441- else 0
442- if ((stake1 == stake1))
443- then {
444- let stake2 = if (containsElement(stakingAssets, exchangeAseetId))
445- then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), exchangeAseetId], nil)
429+ let invariant = invariantCalc(balanceFrom, balanceTo)
430+ let amount = calculateSendAmount(balanceFrom, balanceTo, invariant, estimatedAmountToReceive, minAmountToReceive, pmtAmount)
431+ let feeDiscount = calculateFeeDiscount(i.originCaller)
432+ let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
433+ let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
434+ let $t01517415283 = $Tuple2((balanceFrom + pmtAmount), ((balanceTo - amountMinusFee) - governanceReward))
435+ let newBalanceFrom = $t01517415283._1
436+ let newBalanceTo = $t01517415283._2
437+ let dAppThresholdAmount = fraction((newBalanceFrom + newBalanceTo), dAppThreshold, (2 * dAppThresholdScale2))
438+ if (if ((dAppThresholdAmount > newBalanceFrom))
439+ then true
440+ else (dAppThresholdAmount > newBalanceTo))
441+ then throwThreshold(dAppThresholdAmount, newBalanceFrom, newBalanceTo, value(pmtAssetId), fromBase58String(exchangeAseetId))
442+ else {
443+ let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
444+ then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
446445 else 0
447- if ((stake2 == stake2))
448- then $Tuple2([IntegerEntry((pmtStrAssetId + kAssetBalance), newBalanceFrom), IntegerEntry((exchangeAseetId + kAssetBalance), newBalanceTo), ScriptTransfer(i.caller, amountMinusFee, fromBase58String(exchangeAseetId)), ScriptTransfer(moneyBoxAddress, governanceReward, fromBase58String(exchangeAseetId))], $Tuple2(amountMinusFee, fromBase58String(exchangeAseetId)))
446+ if ((stake1 == stake1))
447+ then {
448+ let stake2 = if (containsElement(stakingAssets, exchangeAseetId))
449+ then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), exchangeAseetId], nil)
450+ else 0
451+ if ((stake2 == stake2))
452+ then $Tuple2([IntegerEntry((pmtStrAssetId + kAssetBalance), newBalanceFrom), IntegerEntry((exchangeAseetId + kAssetBalance), newBalanceTo), ScriptTransfer(i.caller, amountMinusFee, fromBase58String(exchangeAseetId)), ScriptTransfer(moneyBoxAddress, governanceReward, fromBase58String(exchangeAseetId))], $Tuple2(amountMinusFee, fromBase58String(exchangeAseetId)))
453+ else throw("Strict value is not equal to itself.")
454+ }
449455 else throw("Strict value is not equal to itself.")
450456 }
451- else throw("Strict value is not equal to itself.")
452457 }
453- }
458+ }
454459 }
455460
456461
478483 func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this))
479484 then throw("Only contract itself can invoke this function")
480485 else {
481- let $t01736917472 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
482- let call = $t01736917472._1
483- let addr = $t01736917472._2
484- let params = $t01736917472._3
485- let payments = $t01736917472._4
486+ let $t01762817731 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
487+ let call = $t01762817731._1
488+ let addr = $t01762817731._2
489+ let params = $t01762817731._3
490+ let payments = $t01762817731._4
486491 let inv = invoke(addr, call, params, payments)
487492 if ((inv == inv))
488493 then nil
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let version = "2.0.0"
55
66 let kVersion = "version"
77
88 let kActive = "active"
99
1010 let kAssets = "asset_ids"
1111
1212 let kAssetBalance = "_asset_balance"
1313
1414 let kShareAssetId = "share_asset_id"
1515
1616 let kShareAssetSupply = "share_asset_supply"
1717
1818 let kFee = "commission"
1919
2020 let kInvariant = "invariant"
2121
2222 let kCause = "shutdown_cause"
2323
2424 let kUSDNAddress = "staking_usdnnsbt_address"
2525
2626 let kEURNAddress = "staking_eurn_address"
2727
2828 let kDiscounts = "discounts"
2929
3030 let kDiscountValues = "discount_values"
3131
3232 let kUserSwopInGov = "_SWOP_amount"
3333
3434 let kFirstHarvest = "first_harvest"
3535
3636 let kFirstHarvestHeight = "first_harvest_height"
3737
3838 let kShareLimit = "share_limit_on_first_harvest"
3939
4040 let kBasePeriod = "base_period"
4141
4242 let kPeriodLength = "period_length"
4343
4444 let kStartHeight = "start_height"
4545
4646 let kAdminPubKey1 = "admin_pub_1"
4747
4848 let kAdminPubKey2 = "admin_pub_2"
4949
5050 let kAdminPubKey3 = "admin_pub_3"
5151
5252 let kAdminInvokePubKey = "admin_invoke_pub"
5353
5454 let kMoneyBoxAddress = "money_box_address"
5555
5656 let kGovAddress = "governance_address"
5757
5858 let kVotingAddress = "voting_address"
5959
60-let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
60+let oracle = Address(base58'3PEbqViERCoKnmcSULh6n2aiMvUdSQdCsom')
6161
6262 func getBase58FromOracle (key) = match getString(oracle, key) {
6363 case string: String =>
6464 fromBase58String(string)
6565 case nothing =>
6666 throw((key + "is empty"))
6767 }
6868
6969
7070 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
7171
7272 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
7373
7474 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
7575
7676 let adminPubKeyInvoke = getBase58FromOracle(kAdminInvokePubKey)
7777
7878 let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
7979
8080 let govAddress = Address(getBase58FromOracle(kGovAddress))
8181
8282 let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress))
8383
8484 let votingAddress = Address(getBase58FromOracle(kVotingAddress))
8585
8686 let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
8787
8888 let stakingAssets = [toBase58String(USDN)]
8989
9090 let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod")
9191
9292 let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight")
9393
9494 let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength")
9595
9696 let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3)
9797
9898 let active = getBooleanValue(this, kActive)
9999
100100 let shareSupply = getIntegerValue(this, kShareAssetSupply)
101101
102102 let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId))
103103
104104 let exchangeAssets = getString(this, kAssets)
105105
106106 let fee = getIntegerValue(this, kFee)
107107
108108 let feeGovernance = fraction(fee, 40, 100)
109109
110110 let feeScale6 = 1000000
111111
112112 let scale3 = 1000
113113
114114 let scale8 = 100000000
115115
116116 let scale16 = 10000000000000000
117117
118118 let slippageScale3 = 1000
119119
120120 let digits8 = 8
121121
122122 let dAppThreshold = 50
123123
124124 let dAppThresholdScale2 = 100
125125
126126 let exchangeRatioLimitMin = 90000000
127127
128128 let exchangeRatioLimitMax = 110000000
129129
130130 let alpha = 50
131131
132132 let alphaDigits = 2
133133
134134 let beta = 4600000000000000
135135
136136 func accountBalance (assetId) = match assetId {
137137 case id: ByteVector =>
138138 assetBalance(this, id)
139139 case waves: Unit =>
140140 wavesBalance(this).available
141141 case _ =>
142142 throw("Match error")
143143 }
144144
145145
146146 func stakedAmount (assetId) = {
147147 let stakedAmountCalculated = match assetId {
148148 case aId: ByteVector =>
149149 if ((aId == USDN))
150150 then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this)))
151151 else 0
152152 case _: Unit =>
153153 0
154154 case _ =>
155155 throw("Match error")
156156 }
157157 match stakedAmountCalculated {
158158 case i: Int =>
159159 i
160160 case _ =>
161161 0
162162 }
163163 }
164164
165165
166166 func skewness (x,y) = ((fraction(scale16, x, y) + fraction(scale16, y, x)) / 2)
167167
168168
169169 func invariantCalc (x,y) = {
170170 let sk = skewness(x, y)
171171 (fraction((x + y), scale16, pow(sk, digits8, alpha, alphaDigits, digits8, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(x), toBigInt(y), toBigInt(scale8)), 0, toBigInt(5), 1, (digits8 / 2), DOWN)), pow((sk - beta), digits8, alpha, alphaDigits, digits8, DOWN), scale8)))
172172 }
173173
174174
175175 func calculateSendAmount (balanceFrom,balanceTo,invariant,amountToSendEstimated,minTokenReceiveAmount,tokenReceiveAmount) = {
176176 let worstAllowedNewInvariantRatio = (scale16 - ((scale16 * 1) / 10000000))
177177 let deltaBetweenMaxAndMinSendValue = (amountToSendEstimated - minTokenReceiveAmount)
178178 func getStepAmount (acc,step) = if ((acc._1 == -1))
179179 then {
180180 let amountToSend = (amountToSendEstimated - (((step * deltaBetweenMaxAndMinSendValue) / 3) / scale3))
181181 let stepInvariant = invariantCalc(balanceFrom, (balanceTo - amountToSend))
182182 if ((stepInvariant > invariant))
183183 then $Tuple2(amountToSend, stepInvariant)
184184 else $Tuple2(-1, 0)
185185 }
186186 else acc
187187
188188 let amountToSendMin = getStepAmount($Tuple2(-1, 0), 3000)
189189 if ((0 > amountToSendMin._1))
190190 then throw("Price is worse than minReceived")
191191 else {
192192 let invEstimated = invariantCalc(balanceFrom, (balanceTo - amountToSendEstimated))
193193 if ((invariant > invEstimated))
194194 then if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, invEstimated)))
195195 then throw("The requested price is too not profitable for user")
196196 else {
197197 let a = {
198198 let $l = [25, 200, 500]
199199 let $s = size($l)
200200 let $acc0 = $Tuple2(-1, 0)
201201 func $f0_1 ($a,$i) = if (($i >= $s))
202202 then $a
203203 else getStepAmount($a, $l[$i])
204204
205205 func $f0_2 ($a,$i) = if (($i >= $s))
206206 then $a
207207 else throw("List size exceeds 3")
208208
209209 $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
210210 }
211211 if ((0 > a._1))
212212 then amountToSendMin._1
213213 else a._1
214214 }
215215 else {
216216 let a = {
217217 let $l = [-500, -200, -25]
218218 let $s = size($l)
219219 let $acc0 = $Tuple2(-1, 0)
220220 func $f0_1 ($a,$i) = if (($i >= $s))
221221 then $a
222222 else getStepAmount($a, $l[$i])
223223
224224 func $f0_2 ($a,$i) = if (($i >= $s))
225225 then $a
226226 else throw("List size exceeds 3")
227227
228228 $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
229229 }
230230 let tupleSendBetter = if ((0 > a._1))
231231 then $Tuple2(amountToSendEstimated, invEstimated)
232232 else a
233233 if ((worstAllowedNewInvariantRatio >= fraction(scale16, invariant, tupleSendBetter._2)))
234234 then throw("The requested price is too not profitable for user")
235235 else tupleSendBetter._1
236236 }
237237 }
238238 }
239239
240240
241241 func getAssetInfo (assetId) = match assetId {
242242 case id: ByteVector =>
243243 let stringId = toBase58String(id)
244244 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
245245 $Tuple3(stringId, info.name, info.decimals)
246246 case waves: Unit =>
247247 $Tuple3("WAVES", "WAVES", 8)
248248 case _ =>
249249 throw("Match error")
250250 }
251251
252252
253253 func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
254254
255255
256256 func throwIsActive () = throw("DApp is already active")
257257
258258
259259 func isActive () = if (active)
260260 then unit
261261 else throw("DApp is inactive at this moment")
262262
263263
264264 func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
265265 then unit
266266 else throw("Only admin can call this function")
267267
268268
269269 func throwAssets () = throw("Incorrect assets attached.")
270270
271271
272272 func throwOnePayment () = throw("One attached payment expected")
273273
274274
275275 func throwThreshold (threshold,amountA,amountB,assetIdA,assetIdB) = throw(((((((((("New balance in assets of the DApp is less than threshold " + toString(threshold)) + ": ") + toString(amountA)) + " ") + toBase58String(assetIdA)) + ", ") + toString(amountB)) + " ") + toBase58String(assetIdB)))
276276
277277
278278 func suspendSuspicious (balanceA,assetIdA,balanceB,assetIdB) = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + toBase58String(assetIdA)) + ", ") + toString(balanceB)) + " ") + toBase58String(assetIdB)) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + toBase58String(assetIdA)) + ", ") + toString(accountBalance(assetIdB))) + " ") + toBase58String(assetIdB)))
279279
280280
281281 func calcStakingFuncAndAddres (stake,assetId) = if (stake)
282282 then $Tuple2("lockNeutrino", stakingUSDNAddress)
283283 else $Tuple2("unlockNeutrino", stakingUSDNAddress)
284284
285285
286286 func calcStakingParams (stake,amount,assetId) = if (stake)
287287 then {
288288 let $t086658731 = calcStakingFuncAndAddres(stake, assetId)
289289 let call = $t086658731._1
290290 let stakingAddr = $t086658731._2
291291 $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)])
292292 }
293293 else {
294294 let $t088178883 = calcStakingFuncAndAddres(stake, assetId)
295295 let call = $t088178883._1
296296 let stakingAddr = $t088178883._2
297297 $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil)
298298 }
299299
300300
301301 func calculateFeeDiscount (userAddr) = {
302302 let swopAmount = valueOrElse(getInteger(govAddress, (toString(userAddr) + kUserSwopInGov)), 0)
303303 let discountValues = split(getStringValue(oracle, kDiscountValues), ",")
304304 let discounts = split(getStringValue(oracle, kDiscounts), ",")
305305 if (if ((swopAmount >= parseIntValue(discountValues[0])))
306306 then (parseIntValue(discountValues[1]) > swopAmount)
307307 else false)
308308 then (feeScale6 - parseIntValue(discounts[0]))
309309 else if (if ((swopAmount >= parseIntValue(discountValues[1])))
310310 then (parseIntValue(discountValues[2]) > swopAmount)
311311 else false)
312312 then (feeScale6 - parseIntValue(discounts[1]))
313313 else if (if ((swopAmount >= parseIntValue(discountValues[2])))
314314 then (parseIntValue(discountValues[3]) > swopAmount)
315315 else false)
316316 then (feeScale6 - parseIntValue(discounts[2]))
317317 else if (if ((swopAmount >= parseIntValue(discountValues[3])))
318318 then (parseIntValue(discountValues[4]) > swopAmount)
319319 else false)
320320 then (feeScale6 - parseIntValue(discounts[3]))
321321 else if ((swopAmount >= parseIntValue(discountValues[4])))
322322 then (feeScale6 - parseIntValue(discounts[4]))
323323 else feeScale6
324324 }
325325
326326
327327 func getPoolBalances (assetIdA,assetIdB) = {
328328 let balanceA = getIntegerValue(this, (toBase58String(assetIdA) + kAssetBalance))
329329 let balanceB = getIntegerValue(this, (toBase58String(assetIdB) + kAssetBalance))
330330 let stakedAmountA = stakedAmount(assetIdA)
331331 let stakedAmountB = stakedAmount(assetIdB)
332332 let accountBalanceA = (accountBalance(assetIdA) + stakedAmountA)
333333 let accountBalanceB = (accountBalance(assetIdB) + stakedAmountB)
334334 $Tuple4(balanceA, balanceB, accountBalanceA, accountBalanceB)
335335 }
336336
337337
338338 @Callable(i)
339339 func init (firstHarvest) = if (isDefined(getBoolean(this, kActive)))
340340 then throwIsActive()
341341 else {
342342 func parseInitPayments (acc,payment) = {
343343 let $t01079110825 = acc
344344 let entries = $t01079110825._1
345345 let assetIds = $t01079110825._2
346346 let sum = $t01079110825._3
347347 let $t01083810920 = $Tuple2(payment.amount, toBase58String(value(payment.assetId)))
348348 let amount = $t01083810920._1
349349 let assetId = $t01083810920._2
350350 let stake = if (containsElement(stakingAssets, assetId))
351351 then invoke(this, "stakeUnstake", [true, amount, assetId], nil)
352352 else 0
353353 if ((stake == stake))
354354 then if (contains(assetIds, assetId))
355355 then throw("Assets must be different")
356356 else $Tuple3((entries :+ IntegerEntry((assetId + kAssetBalance), amount)), if ((size(assetIds) == 0))
357357 then assetId
358358 else ((assetIds + ",") + assetId), (sum + amount))
359359 else throw("Strict value is not equal to itself.")
360360 }
361361
362362 let $t01149511585 = {
363363 let $l = i.payments
364364 let $s = size($l)
365365 let $acc0 = $Tuple3(nil, "", 0)
366366 func $f0_1 ($a,$i) = if (($i >= $s))
367367 then $a
368368 else parseInitPayments($a, $l[$i])
369369
370370 func $f0_2 ($a,$i) = if (($i >= $s))
371371 then $a
372372 else throw("List size exceeds 10")
373373
374374 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
375375 }
376376 let balanceEntries = $t01149511585._1
377377 let assetIds = $t01149511585._2
378378 let sum = $t01149511585._3
379379 let shareName = "s_Multi_USD"
380380 let shareDescription = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this))
381381 let shareDecimals = 6
382382 let shareInitialSupply = sum
383383 let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true)
384384 let shareIssueId = calculateAssetId(shareIssue)
385385 let baseEntry = ([StringEntry(kVersion, version), BooleanEntry(kActive, true), StringEntry(kAssets, assetIds), IntegerEntry(kFee, getIntegerValue(oracle, "base_fee_flat")), shareIssue, StringEntry(kShareAssetId, toBase58String(shareIssueId)), IntegerEntry(kShareAssetSupply, shareInitialSupply), ScriptTransfer(i.caller, shareInitialSupply, shareIssueId)] ++ balanceEntries)
386386 if (firstHarvest)
387387 then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))])
388388 else baseEntry
389389 }
390390
391391
392392
393393 @Callable(i)
394394 func exchange (exchangeAseetId,estimatedAmountToReceive,minAmountToReceive) = {
395395 let $t01305613131 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
396396 let pmtAmount = $t01305613131._1
397397 let pmtAssetId = $t01305613131._2
398398 let $t01313613276 = getPoolBalances(value(pmtAssetId), fromBase58String(exchangeAseetId))
399399 let balanceFrom = $t01313613276._1
400400 let balanceTo = $t01313613276._2
401401 let accountBalanceFrom = $t01313613276._3
402402 let accountBalanceTo = $t01313613276._4
403- let pmtStrAssetId = toBase58String(value(pmtAssetId))
404- if ((0 >= estimatedAmountToReceive))
405- then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive)))
406- else if ((minAmountToReceive > estimatedAmountToReceive))
407- then throw("Minimal amount can't be greater than estimated.")
408- else if ((size(i.payments) != 1))
409- then throwOnePayment()
410- else if (!(if ((balanceFrom > accountBalanceFrom))
411- then true
412- else (balanceTo > accountBalanceTo)))
413- then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(balanceFrom, value(pmtAssetId), balanceTo, fromBase58String(exchangeAseetId)))
414- else if (if (!(contains(value(exchangeAssets), pmtStrAssetId)))
415- then true
416- else !(contains(value(exchangeAssets), exchangeAseetId)))
417- then throwAssets()
418- else if ((10000000 > pmtAmount))
419- then throw("Only swap of 10.000000 or more tokens is allowed")
420- else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount)))
403+ if ((1 == 1))
404+ then throw(((((((("balanceFrom:" + toString(balanceFrom)) + " balanceTo: ") + toString(balanceTo)) + "accountBalanceFrom:") + toString(accountBalanceFrom)) + " accountBalanceTo: ") + toString(accountBalanceTo)))
405+ else {
406+ let k = 1
407+ let pmtStrAssetId = toBase58String(value(pmtAssetId))
408+ if ((0 >= estimatedAmountToReceive))
409+ then throw(("Estimated amount must be positive. Actual: " + toString(estimatedAmountToReceive)))
410+ else if ((minAmountToReceive > estimatedAmountToReceive))
411+ then throw("Minimal amount can't be greater than estimated.")
412+ else if ((size(i.payments) != 1))
413+ then throwOnePayment()
414+ else if (!(if ((balanceFrom > accountBalanceFrom))
415+ then true
416+ else (balanceTo > accountBalanceTo)))
417+ then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious(balanceFrom, value(pmtAssetId), balanceTo, fromBase58String(exchangeAseetId)))
418+ else if (if (!(contains(value(exchangeAssets), pmtStrAssetId)))
421419 then true
422- else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax))
423- then throw("Incorrect args and pmt ratio")
424- else {
425- let invariant = invariantCalc(balanceFrom, balanceTo)
426- let amount = calculateSendAmount(balanceFrom, balanceTo, invariant, estimatedAmountToReceive, minAmountToReceive, pmtAmount)
427- let feeDiscount = calculateFeeDiscount(i.originCaller)
428- let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
429- let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
430- let $t01491515024 = $Tuple2((balanceFrom + pmtAmount), ((balanceTo - amountMinusFee) - governanceReward))
431- let newBalanceFrom = $t01491515024._1
432- let newBalanceTo = $t01491515024._2
433- let dAppThresholdAmount = fraction((newBalanceFrom + newBalanceTo), dAppThreshold, (2 * dAppThresholdScale2))
434- if (if ((dAppThresholdAmount > newBalanceFrom))
420+ else !(contains(value(exchangeAssets), exchangeAseetId)))
421+ then throwAssets()
422+ else if ((10000000 > pmtAmount))
423+ then throw("Only swap of 10.000000 or more tokens is allowed")
424+ else if (if ((exchangeRatioLimitMin > fraction(scale8, minAmountToReceive, pmtAmount)))
435425 then true
436- else (dAppThresholdAmount > newBalanceTo))
437- then throwThreshold(dAppThresholdAmount, newBalanceFrom, newBalanceTo, value(pmtAssetId), fromBase58String(exchangeAseetId))
426+ else (fraction(scale8, estimatedAmountToReceive, pmtAmount) > exchangeRatioLimitMax))
427+ then throw("Incorrect args and pmt ratio")
438428 else {
439- let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
440- then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
441- else 0
442- if ((stake1 == stake1))
443- then {
444- let stake2 = if (containsElement(stakingAssets, exchangeAseetId))
445- then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), exchangeAseetId], nil)
429+ let invariant = invariantCalc(balanceFrom, balanceTo)
430+ let amount = calculateSendAmount(balanceFrom, balanceTo, invariant, estimatedAmountToReceive, minAmountToReceive, pmtAmount)
431+ let feeDiscount = calculateFeeDiscount(i.originCaller)
432+ let governanceReward = fraction(amount, fraction(feeGovernance, feeDiscount, feeScale6, CEILING), feeScale6)
433+ let amountMinusFee = fraction(amount, (feeScale6 - fraction(fee, feeDiscount, feeScale6, CEILING)), feeScale6)
434+ let $t01517415283 = $Tuple2((balanceFrom + pmtAmount), ((balanceTo - amountMinusFee) - governanceReward))
435+ let newBalanceFrom = $t01517415283._1
436+ let newBalanceTo = $t01517415283._2
437+ let dAppThresholdAmount = fraction((newBalanceFrom + newBalanceTo), dAppThreshold, (2 * dAppThresholdScale2))
438+ if (if ((dAppThresholdAmount > newBalanceFrom))
439+ then true
440+ else (dAppThresholdAmount > newBalanceTo))
441+ then throwThreshold(dAppThresholdAmount, newBalanceFrom, newBalanceTo, value(pmtAssetId), fromBase58String(exchangeAseetId))
442+ else {
443+ let stake1 = if (containsElement(stakingAssets, pmtStrAssetId))
444+ then invoke(this, "stakeUnstake", [true, pmtAmount, pmtStrAssetId], nil)
446445 else 0
447- if ((stake2 == stake2))
448- then $Tuple2([IntegerEntry((pmtStrAssetId + kAssetBalance), newBalanceFrom), IntegerEntry((exchangeAseetId + kAssetBalance), newBalanceTo), ScriptTransfer(i.caller, amountMinusFee, fromBase58String(exchangeAseetId)), ScriptTransfer(moneyBoxAddress, governanceReward, fromBase58String(exchangeAseetId))], $Tuple2(amountMinusFee, fromBase58String(exchangeAseetId)))
446+ if ((stake1 == stake1))
447+ then {
448+ let stake2 = if (containsElement(stakingAssets, exchangeAseetId))
449+ then invoke(this, "stakeUnstake", [false, (amountMinusFee + governanceReward), exchangeAseetId], nil)
450+ else 0
451+ if ((stake2 == stake2))
452+ then $Tuple2([IntegerEntry((pmtStrAssetId + kAssetBalance), newBalanceFrom), IntegerEntry((exchangeAseetId + kAssetBalance), newBalanceTo), ScriptTransfer(i.caller, amountMinusFee, fromBase58String(exchangeAseetId)), ScriptTransfer(moneyBoxAddress, governanceReward, fromBase58String(exchangeAseetId))], $Tuple2(amountMinusFee, fromBase58String(exchangeAseetId)))
453+ else throw("Strict value is not equal to itself.")
454+ }
449455 else throw("Strict value is not equal to itself.")
450456 }
451- else throw("Strict value is not equal to itself.")
452457 }
453- }
458+ }
454459 }
455460
456461
457462
458463 @Callable(i)
459464 func shutdown () = valueOrElse(isAdminCall(i), if (!(active))
460465 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
461466 else suspend("Paused by admin"))
462467
463468
464469
465470 @Callable(i)
466471 func activate () = valueOrElse(isAdminCall(i), if (active)
467472 then throwIsActive()
468473 else [BooleanEntry(kActive, true), DeleteEntry(kCause)])
469474
470475
471476
472477 @Callable(i)
473478 func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), valueOrElse(isAdminCall(i), [IntegerEntry(kShareLimit, shareLimit)]))
474479
475480
476481
477482 @Callable(i)
478483 func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this))
479484 then throw("Only contract itself can invoke this function")
480485 else {
481- let $t01736917472 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
482- let call = $t01736917472._1
483- let addr = $t01736917472._2
484- let params = $t01736917472._3
485- let payments = $t01736917472._4
486+ let $t01762817731 = calcStakingParams(stake, amount, fromBase58String(assetIdString))
487+ let call = $t01762817731._1
488+ let addr = $t01762817731._2
489+ let params = $t01762817731._3
490+ let payments = $t01762817731._4
486491 let inv = invoke(addr, call, params, payments)
487492 if ((inv == inv))
488493 then nil
489494 else throw("Strict value is not equal to itself.")
490495 }
491496
492497
493498 @Verifier(tx)
494499 func verify () = {
495500 let multiSignedByAdmins = {
496501 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
497502 then 1
498503 else 0
499504 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
500505 then 1
501506 else 0
502507 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
503508 then 1
504509 else 0
505510 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
506511 }
507512 match tx {
508513 case inv: InvokeScriptTransaction =>
509514 let callTakeIntoAccount = if ((inv.dApp == this))
510515 then (inv.function == "takeIntoAccountExtraFunds")
511516 else false
512517 let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
513518 then true
514519 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2))
515520 then true
516521 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3))
517522 then true
518523 else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyInvoke)
519524 if (if (callTakeIntoAccount)
520525 then signedByAdmin
521526 else false)
522527 then true
523528 else multiSignedByAdmins
524529 case _ =>
525530 multiSignedByAdmins
526531 }
527532 }
528533

github/deemru/w8io/169f3d6 
70.01 ms