tx · BWrPjpKXpNiZtncGchV9mryyd8BKpaPr1cqvaQZSjy1p 3MqpghDrn9X96AXTro1agBNF4bjPGjTFqQG: -0.01000000 Waves 2022.05.04 10:40 [2036651] smart account 3MqpghDrn9X96AXTro1agBNF4bjPGjTFqQG > SELF 0.00000000 Waves
{ "type": 13, "id": "BWrPjpKXpNiZtncGchV9mryyd8BKpaPr1cqvaQZSjy1p", "fee": 1000000, "feeAssetId": null, "timestamp": 1651650042920, "version": 2, "chainId": 84, "sender": "3MqpghDrn9X96AXTro1agBNF4bjPGjTFqQG", "senderPublicKey": "H7cLyENG3Lny5pE9EtuvpW7mUc8Ds92sQshADBVP4Zm6", "proofs": [ "3CM2mWRqRXi945jNzd98v4hfQcLAi94MUK84EZhiTea4HcyqN9mXLZm48VeueA7w36z8rZ4rNKZXH5qbKee5BE5R" ], "script": "base64:AAIFAAAAAAAAADAIAhIDCgEEEgcKBQEBCAgEEgMKAQESAwoBARIAEgMKAQESABIAEgASBQoDBAEIEgAAAABUAAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAIa1ZlcnNpb24CAAAAB3ZlcnNpb24AAAAAB2tBY3RpdmUCAAAABmFjdGl2ZQAAAAAJa0Fzc2V0SWRBAgAAAApBX2Fzc2V0X2lkAAAAAAlrQXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAACWtCYWxhbmNlQQIAAAAPQV9hc3NldF9iYWxhbmNlAAAAAAlrQmFsYW5jZUICAAAAD0JfYXNzZXRfYmFsYW5jZQAAAAANa0JhbGFuY2VJbml0QQIAAAAMQV9hc3NldF9pbml0AAAAAA1rQmFsYW5jZUluaXRCAgAAAAxCX2Fzc2V0X2luaXQAAAAADWtTaGFyZUFzc2V0SWQCAAAADnNoYXJlX2Fzc2V0X2lkAAAAABFrU2hhcmVBc3NldFN1cHBseQIAAAASc2hhcmVfYXNzZXRfc3VwcGx5AAAAAARrRmVlAgAAAApjb21taXNzaW9uAAAAAAZrQ2F1c2UCAAAADnNodXRk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AFAAAAEWFkbWluSW52b2tlUHViS2V5AwMFAAAAE2NhbGxUYWtlSW50b0FjY291bnQFAAAADXNpZ25lZEJ5QWRtaW4HBgUAAAATbXVsdGlTaWduZWRCeUFkbWlucwUAAAATbXVsdGlTaWduZWRCeUFkbWluc8B0yYM=", "height": 2036651, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 6uEZG5YiuwUzHjiQkEj16Xdqa5WoHdmjsmQ13JDQnqT3 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let version = "1.0.0" | |
5 | + | ||
6 | + | let kVersion = "version" | |
7 | + | ||
8 | + | let kActive = "active" | |
9 | + | ||
10 | + | let kAssetIdA = "A_asset_id" | |
11 | + | ||
12 | + | let kAssetIdB = "B_asset_id" | |
13 | + | ||
14 | + | let kBalanceA = "A_asset_balance" | |
15 | + | ||
16 | + | let kBalanceB = "B_asset_balance" | |
17 | + | ||
18 | + | let kBalanceInitA = "A_asset_init" | |
19 | + | ||
20 | + | let kBalanceInitB = "B_asset_init" | |
21 | + | ||
22 | + | let kShareAssetId = "share_asset_id" | |
23 | + | ||
24 | + | let kShareAssetSupply = "share_asset_supply" | |
25 | + | ||
26 | + | let kFee = "commission" | |
27 | + | ||
28 | + | let kCause = "shutdown_cause" | |
29 | + | ||
30 | + | let kFirstHarvest = "first_harvest" | |
31 | + | ||
32 | + | let kFirstHarvestHeight = "first_harvest_height" | |
33 | + | ||
34 | + | let kShareLimit = "share_limit_on_first_harvest" | |
35 | + | ||
36 | + | let kBasePeriod = "base_period" | |
37 | + | ||
38 | + | let kPeriodLength = "period_length" | |
39 | + | ||
40 | + | let kStartHeight = "start_height" | |
41 | + | ||
42 | + | let kUSDNAddress = "staking_usdnnsbt_address" | |
43 | + | ||
44 | + | let kEURNAddress = "staking_eurn_address" | |
45 | + | ||
46 | + | let kLeasingPool = "leasing_address" | |
47 | + | ||
48 | + | let kLeasingAmount = "leasing_amount" | |
49 | + | ||
50 | + | let kLeasingId = "leasing_id" | |
51 | + | ||
52 | + | let kAdminPubKey1 = "admin_pub_1" | |
53 | + | ||
54 | + | let kAdminPubKey2 = "admin_pub_2" | |
55 | + | ||
56 | + | let kAdminPubKey3 = "admin_pub_3" | |
57 | + | ||
58 | + | let kAdminInvokePubKey = "admin_invoke_pub" | |
59 | + | ||
60 | + | let kMoneyBoxAddress = "money_box_address" | |
61 | + | ||
62 | + | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
63 | + | ||
64 | + | func getBase58FromOracle (key) = match getString(oracle, key) { | |
65 | + | case string: String => | |
66 | + | fromBase58String(string) | |
67 | + | case nothing => | |
68 | + | throw((key + "is empty")) | |
69 | + | } | |
70 | + | ||
71 | + | ||
72 | + | let adminPubKey1 = getBase58FromOracle(kAdminPubKey1) | |
73 | + | ||
74 | + | let adminPubKey2 = getBase58FromOracle(kAdminPubKey2) | |
75 | + | ||
76 | + | let adminPubKey3 = getBase58FromOracle(kAdminPubKey3) | |
77 | + | ||
78 | + | let adminInvokePubKey = getBase58FromOracle(kAdminInvokePubKey) | |
79 | + | ||
80 | + | let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress)) | |
81 | + | ||
82 | + | let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
83 | + | ||
84 | + | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
85 | + | ||
86 | + | let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
87 | + | ||
88 | + | let EURN = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA' | |
89 | + | ||
90 | + | let stakingAssets = ["WAVES", toBase58String(USDN), toBase58String(EURN)] | |
91 | + | ||
92 | + | let stakingUSDNAddress = Address(getBase58FromOracle(kUSDNAddress)) | |
93 | + | ||
94 | + | let stakingEURNAddress = Address(getBase58FromOracle(kEURNAddress)) | |
95 | + | ||
96 | + | let basePeriod = valueOrErrorMessage(getInteger(votingAddress, kBasePeriod), "Empty kBasePeriod") | |
97 | + | ||
98 | + | let startHeight = valueOrErrorMessage(getInteger(votingAddress, kStartHeight), "Empty kStartHeight") | |
99 | + | ||
100 | + | let periodLength = valueOrErrorMessage(getInteger(votingAddress, kPeriodLength), "Empty kPeriodLength") | |
101 | + | ||
102 | + | let firstHarvestEndPeriod = ((basePeriod + ((height - startHeight) / periodLength)) + 3) | |
103 | + | ||
104 | + | let active = getBooleanValue(this, kActive) | |
105 | + | ||
106 | + | let strAssetIdA = getStringValue(this, kAssetIdA) | |
107 | + | ||
108 | + | let strAssetIdB = getStringValue(this, kAssetIdB) | |
109 | + | ||
110 | + | let assetIdA = if ((strAssetIdA == "WAVES")) | |
111 | + | then unit | |
112 | + | else fromBase58String(strAssetIdA) | |
113 | + | ||
114 | + | let assetIdB = if ((strAssetIdB == "WAVES")) | |
115 | + | then unit | |
116 | + | else fromBase58String(strAssetIdB) | |
117 | + | ||
118 | + | let assetNameA = match assetIdA { | |
119 | + | case id: ByteVector => | |
120 | + | value(assetInfo(id)).name | |
121 | + | case waves: Unit => | |
122 | + | "WAVES" | |
123 | + | case _ => | |
124 | + | throw("Match error") | |
125 | + | } | |
126 | + | ||
127 | + | let assetNameB = match assetIdB { | |
128 | + | case id: ByteVector => | |
129 | + | value(assetInfo(id)).name | |
130 | + | case waves: Unit => | |
131 | + | "WAVES" | |
132 | + | case _ => | |
133 | + | throw("Match error") | |
134 | + | } | |
135 | + | ||
136 | + | let balanceA = getIntegerValue(this, kBalanceA) | |
137 | + | ||
138 | + | let balanceB = getIntegerValue(this, kBalanceB) | |
139 | + | ||
140 | + | let shareAssetId = fromBase58String(getStringValue(this, kShareAssetId)) | |
141 | + | ||
142 | + | let shareAssetSupply = getIntegerValue(this, kShareAssetSupply) | |
143 | + | ||
144 | + | let fee = getIntegerValue(this, kFee) | |
145 | + | ||
146 | + | let feeGovernance = fraction(fee, 40, 100) | |
147 | + | ||
148 | + | let feeScale6 = 1000000 | |
149 | + | ||
150 | + | let scaleValue3 = 1000 | |
151 | + | ||
152 | + | let scaleValue8 = 100000000 | |
153 | + | ||
154 | + | let slippageToleranceDelimiter = 1000 | |
155 | + | ||
156 | + | let scaleValue8Digits = 8 | |
157 | + | ||
158 | + | func accountBalance (assetId) = match assetId { | |
159 | + | case id: ByteVector => | |
160 | + | assetBalance(this, id) | |
161 | + | case waves: Unit => | |
162 | + | wavesBalance(this).available | |
163 | + | case _ => | |
164 | + | throw("Match error") | |
165 | + | } | |
166 | + | ||
167 | + | ||
168 | + | func stakedAmount (assetId) = { | |
169 | + | let stakedAmountCalculated = match assetId { | |
170 | + | case aId: ByteVector => | |
171 | + | if ((aId == USDN)) | |
172 | + | then getInteger(stakingUSDNAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
173 | + | else if ((aId == EURN)) | |
174 | + | then getInteger(stakingEURNAddress, ((("%s%s%s__stakingBalance__" + toBase58String(aId)) + "__") + toString(this))) | |
175 | + | else 0 | |
176 | + | case _: Unit => | |
177 | + | valueOrElse(getInteger(this, kLeasingAmount), 0) | |
178 | + | case _ => | |
179 | + | throw("Match error") | |
180 | + | } | |
181 | + | match stakedAmountCalculated { | |
182 | + | case i: Int => | |
183 | + | i | |
184 | + | case _ => | |
185 | + | 0 | |
186 | + | } | |
187 | + | } | |
188 | + | ||
189 | + | ||
190 | + | let stakedAmountA = stakedAmount(assetIdA) | |
191 | + | ||
192 | + | let stakedAmountB = stakedAmount(assetIdB) | |
193 | + | ||
194 | + | let assetInitA = getIntegerValue(this, kBalanceInitA) | |
195 | + | ||
196 | + | let assetInitB = getIntegerValue(this, kBalanceInitB) | |
197 | + | ||
198 | + | let availableBalanceA = (balanceA - stakedAmountA) | |
199 | + | ||
200 | + | let availableBalanceB = (balanceB - stakedAmountB) | |
201 | + | ||
202 | + | let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA) | |
203 | + | ||
204 | + | let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB) | |
205 | + | ||
206 | + | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
207 | + | then (accountBalanceWithStakedB >= balanceB) | |
208 | + | else false | |
209 | + | ||
210 | + | func getAssetInfo (assetId) = match assetId { | |
211 | + | case id: ByteVector => | |
212 | + | let stringId = toBase58String(id) | |
213 | + | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
214 | + | $Tuple3(stringId, info.name, info.decimals) | |
215 | + | case waves: Unit => | |
216 | + | $Tuple3("WAVES", "WAVES", 8) | |
217 | + | case _ => | |
218 | + | throw("Match error") | |
219 | + | } | |
220 | + | ||
221 | + | ||
222 | + | func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES")) | |
223 | + | then $Tuple3("WAVES", "WAVES", 8) | |
224 | + | else { | |
225 | + | let stringId = assetStr | |
226 | + | let id = fromBase58String(assetStr) | |
227 | + | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
228 | + | $Tuple3(stringId, info.name, info.decimals) | |
229 | + | } | |
230 | + | ||
231 | + | ||
232 | + | func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)] | |
233 | + | ||
234 | + | ||
235 | + | func calcStakingFuncAndAddres (stake,assetId) = if (stake) | |
236 | + | then if ((assetId == USDN)) | |
237 | + | then $Tuple2("lockNeutrino", stakingUSDNAddress) | |
238 | + | else $Tuple2("startStaking", stakingEURNAddress) | |
239 | + | else if ((assetId == USDN)) | |
240 | + | then $Tuple2("unlockNeutrino", stakingUSDNAddress) | |
241 | + | else $Tuple2("stopStaking", stakingEURNAddress) | |
242 | + | ||
243 | + | ||
244 | + | func calcStakingParams (stake,amount,assetId) = if (stake) | |
245 | + | then { | |
246 | + | let $t060896155 = calcStakingFuncAndAddres(stake, assetId) | |
247 | + | let call = $t060896155._1 | |
248 | + | let stakingAddr = $t060896155._2 | |
249 | + | $Tuple4(call, stakingAddr, nil, [AttachedPayment(assetId, amount)]) | |
250 | + | } | |
251 | + | else { | |
252 | + | let $t062416307 = calcStakingFuncAndAddres(stake, assetId) | |
253 | + | let call = $t062416307._1 | |
254 | + | let stakingAddr = $t062416307._2 | |
255 | + | $Tuple4(call, stakingAddr, [amount, toBase58String(assetId)], nil) | |
256 | + | } | |
257 | + | ||
258 | + | ||
259 | + | func calculateFees (pmtAmount,minAmountToReceive,tokenFrom,tokenTo) = { | |
260 | + | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
261 | + | let amountWithFee = fraction(amountWithoutFee, (feeScale6 - fee), feeScale6) | |
262 | + | let governanceReward = fraction(amountWithoutFee, feeGovernance, feeScale6) | |
263 | + | if ((minAmountToReceive > amountWithFee)) | |
264 | + | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
265 | + | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
266 | + | } | |
267 | + | ||
268 | + | ||
269 | + | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(accountBalanceWithStakedA)) + " ") + assetNameA) + ", ") + toString(accountBalanceWithStakedB)) + " ") + assetNameB) + ". State: ") + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB)) | |
270 | + | ||
271 | + | ||
272 | + | func isActive () = if (active) | |
273 | + | then unit | |
274 | + | else throw("DApp is inactive at this moment") | |
275 | + | ||
276 | + | ||
277 | + | @Callable(i) | |
278 | + | func init (firstHarvest) = { | |
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))) | |
294 | + | then throw("Only admin can call this function") | |
295 | + | else if (isDefined(getBoolean(this, kActive))) | |
296 | + | then throw("DApp is already active") | |
297 | + | else if ((pmtAssetIdA == pmtAssetIdB)) | |
298 | + | then throw("Assets must be different") | |
299 | + | else { | |
300 | + | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
301 | + | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
302 | + | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
303 | + | let arg1 = pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN) | |
304 | + | let arg2 = pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN) | |
305 | + | let arg3 = pow(10, 0, shareDecimals, 0, 0, DOWN) | |
306 | + | let shareInitialSupply = fraction(arg1, arg2, arg3) | |
307 | + | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
308 | + | let shareIssueId = calculateAssetId(shareIssue) | |
309 | + | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
310 | + | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
311 | + | else 0 | |
312 | + | if ((stake1 == stake1)) | |
313 | + | then { | |
314 | + | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
315 | + | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
316 | + | else 0 | |
317 | + | if ((stake2 == stake2)) | |
318 | + | then { | |
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)] | |
320 | + | if (firstHarvest) | |
321 | + | then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
322 | + | else baseEntry | |
323 | + | } | |
324 | + | else throw("Strict value is not equal to itself.") | |
325 | + | } | |
326 | + | else throw("Strict value is not equal to itself.") | |
327 | + | } | |
328 | + | } | |
329 | + | ||
330 | + | ||
331 | + | ||
332 | + | @Callable(i) | |
333 | + | func initWithInitRatio (amtAssetA,amtAssetB,strAssetIdA,strAssetIdB,firstHarvest) = { | |
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))) | |
343 | + | then throw("Only admin can call this function") | |
344 | + | else if (isDefined(getBoolean(this, kActive))) | |
345 | + | then throw("DApp is already active") | |
346 | + | else if ((strAssetIdA == strAssetIdB)) | |
347 | + | then throw("Assets must be different") | |
348 | + | else { | |
349 | + | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
350 | + | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
351 | + | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
352 | + | let shareInitialSupply = 0 | |
353 | + | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
354 | + | let shareIssueId = calculateAssetId(shareIssue) | |
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)] | |
356 | + | if (firstHarvest) | |
357 | + | then (baseEntry ++ [BooleanEntry(kFirstHarvest, firstHarvest), IntegerEntry(kFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
358 | + | else baseEntry | |
359 | + | } | |
360 | + | } | |
361 | + | ||
362 | + | ||
363 | + | ||
364 | + | @Callable(i) | |
365 | + | func keepLimitForFirstHarvest (shareLimit) = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminInvokePubKey], i.callerPublicKey))) | |
366 | + | then throw("Only admin can call this function") | |
367 | + | else [IntegerEntry(kShareLimit, shareLimit)]) | |
368 | + | ||
369 | + | ||
370 | + | ||
371 | + | @Callable(i) | |
372 | + | func replenishWithTwoTokens (slippageTolerance) = valueOrElse(isActive(), { | |
373 | + | let pmtAssetIdA = i.payments[0].assetId | |
374 | + | let pmtAssetIdB = i.payments[1].assetId | |
375 | + | let pmtAmountA = i.payments[0].amount | |
376 | + | let pmtAmountB = i.payments[1].amount | |
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 | |
385 | + | let inital = if (if ((balanceA == 0)) | |
386 | + | then (balanceB == 0) | |
387 | + | else false) | |
388 | + | then true | |
389 | + | else false | |
390 | + | let tokenRatio = if (inital) | |
391 | + | then fraction(fraction(assetInitA, scaleValue8, pmtAmountA), scaleValue3, fraction(assetInitB, scaleValue8, pmtAmountB)) | |
392 | + | else fraction(fraction(balanceA, scaleValue8, pmtAmountA), scaleValue3, fraction(balanceB, scaleValue8, pmtAmountB)) | |
393 | + | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
394 | + | let shareTokenToPayAmount = if (inital) | |
395 | + | then fraction(pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN), pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN), pow(10, 0, shareDecimals, 0, 0, DOWN)) | |
396 | + | else fraction(min([fraction(pmtAmountA, scaleValue8, balanceA), fraction(pmtAmountB, scaleValue8, balanceB)]), shareAssetSupply, scaleValue8) | |
397 | + | if (if ((0 > slippageTolerance)) | |
398 | + | then true | |
399 | + | else (slippageTolerance > slippageToleranceDelimiter)) | |
400 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
401 | + | else if ((size(i.payments) != 2)) | |
402 | + | then throw("Two attached assets expected") | |
403 | + | else if (if ((pmtAssetIdA != assetIdA)) | |
404 | + | then true | |
405 | + | else (pmtAssetIdB != assetIdB)) | |
406 | + | then throw(((("Incorrect assets attached. Expected: " + strAssetIdA) + " and ") + strAssetIdB)) | |
407 | + | else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio)) | |
408 | + | then true | |
409 | + | else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter))) | |
410 | + | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
411 | + | else if ((shareTokenToPayAmount == 0)) | |
412 | + | then throw("Too small amount to replenish") | |
413 | + | else if (!(hasEnoughBalance)) | |
414 | + | then ([ScriptTransfer(i.caller, pmtAmountA, pmtAssetIdA), ScriptTransfer(i.caller, pmtAmountB, pmtAssetIdB)] ++ suspendSuspicious()) | |
415 | + | else { | |
416 | + | let stake1 = if (containsElement(stakingAssets, pmtStrAssetIdA)) | |
417 | + | then invoke(this, "stakeUnstake", [true, pmtAmountA, pmtStrAssetIdA], nil) | |
418 | + | else 0 | |
419 | + | if ((stake1 == stake1)) | |
420 | + | then { | |
421 | + | let stake2 = if (containsElement(stakingAssets, pmtStrAssetIdB)) | |
422 | + | then invoke(this, "stakeUnstake", [true, pmtAmountB, pmtStrAssetIdB], nil) | |
423 | + | else 0 | |
424 | + | if ((stake2 == stake2)) | |
425 | + | then [Reissue(shareAssetId, shareTokenToPayAmount, true), IntegerEntry(kBalanceA, (balanceA + pmtAmountA)), IntegerEntry(kBalanceB, (balanceB + pmtAmountB)), IntegerEntry(kShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
426 | + | else throw("Strict value is not equal to itself.") | |
427 | + | } | |
428 | + | else throw("Strict value is not equal to itself.") | |
429 | + | } | |
430 | + | }) | |
431 | + | ||
432 | + | ||
433 | + | ||
434 | + | @Callable(i) | |
435 | + | func withdraw () = valueOrElse(isActive(), { | |
436 | + | let $t01576315838 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
437 | + | let pmtAmount = $t01576315838._1 | |
438 | + | let pmtAssetId = $t01576315838._2 | |
439 | + | let amountToPayA = fraction(pmtAmount, balanceA, shareAssetSupply) | |
440 | + | let amountToPayB = fraction(pmtAmount, balanceB, shareAssetSupply) | |
441 | + | if ((size(i.payments) != 1)) | |
442 | + | then throw("One attached payment expected") | |
443 | + | else if ((pmtAssetId != shareAssetId)) | |
444 | + | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
445 | + | else if (!(hasEnoughBalance)) | |
446 | + | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
447 | + | else { | |
448 | + | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
449 | + | then invoke(this, "stakeUnstake", [false, amountToPayA, strAssetIdA], nil) | |
450 | + | else 0 | |
451 | + | if ((stake1 == stake1)) | |
452 | + | then { | |
453 | + | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
454 | + | then invoke(this, "stakeUnstake", [false, amountToPayB, strAssetIdB], nil) | |
455 | + | else 0 | |
456 | + | if ((stake2 == stake2)) | |
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)] | |
458 | + | else throw("Strict value is not equal to itself.") | |
459 | + | } | |
460 | + | else throw("Strict value is not equal to itself.") | |
461 | + | } | |
462 | + | }) | |
463 | + | ||
464 | + | ||
465 | + | ||
466 | + | @Callable(i) | |
467 | + | func exchange (minAmountToReceive) = valueOrElse(isActive(), { | |
468 | + | let $t01713717212 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
469 | + | let pmtAmount = $t01713717212._1 | |
470 | + | let pmtAssetId = $t01713717212._2 | |
471 | + | if (if ((balanceA == 0)) | |
472 | + | then true | |
473 | + | else (balanceB == 0)) | |
474 | + | then throw("Can't exchange with zero balance") | |
475 | + | else if ((0 >= minAmountToReceive)) | |
476 | + | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
477 | + | else if ((size(i.payments) != 1)) | |
478 | + | then throw("One attached payment expected") | |
479 | + | else if (!(hasEnoughBalance)) | |
480 | + | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
481 | + | else if ((pmtAssetId == assetIdA)) | |
482 | + | then { | |
483 | + | let assetIdSend = assetIdB | |
484 | + | let $t01776317885 = calculateFees(pmtAmount, minAmountToReceive, balanceA, balanceB) | |
485 | + | let amountWithoutFee = $t01776317885._1 | |
486 | + | let amountWithFee = $t01776317885._2 | |
487 | + | let governanceReward = $t01776317885._3 | |
488 | + | let newBalanceA = (balanceA + pmtAmount) | |
489 | + | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
490 | + | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
491 | + | then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdA], nil) | |
492 | + | else 0 | |
493 | + | if ((stake1 == stake1)) | |
494 | + | then { | |
495 | + | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
496 | + | then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdB], nil) | |
497 | + | else 0 | |
498 | + | if ((stake2 == stake2)) | |
499 | + | then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(moneyBoxAddress, governanceReward, assetIdSend)], $Tuple2(amountWithFee, assetIdSend)) | |
500 | + | else throw("Strict value is not equal to itself.") | |
501 | + | } | |
502 | + | else throw("Strict value is not equal to itself.") | |
503 | + | } | |
504 | + | else if ((pmtAssetId == assetIdB)) | |
505 | + | then { | |
506 | + | let assetIdSend = assetIdA | |
507 | + | let $t01887718999 = calculateFees(pmtAmount, minAmountToReceive, balanceB, balanceA) | |
508 | + | let amountWithoutFee = $t01887718999._1 | |
509 | + | let amountWithFee = $t01887718999._2 | |
510 | + | let governanceReward = $t01887718999._3 | |
511 | + | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
512 | + | let newBalanceB = (balanceB + pmtAmount) | |
513 | + | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
514 | + | then invoke(this, "stakeUnstake", [false, (amountWithFee + governanceReward), strAssetIdA], nil) | |
515 | + | else 0 | |
516 | + | if ((stake1 == stake1)) | |
517 | + | then { | |
518 | + | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
519 | + | then invoke(this, "stakeUnstake", [true, pmtAmount, strAssetIdB], nil) | |
520 | + | else 0 | |
521 | + | if ((stake2 == stake2)) | |
522 | + | then $Tuple2([IntegerEntry(kBalanceA, newBalanceA), IntegerEntry(kBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(moneyBoxAddress, governanceReward, assetIdSend)], $Tuple2(amountWithFee, assetIdSend)) | |
523 | + | else throw("Strict value is not equal to itself.") | |
524 | + | } | |
525 | + | else throw("Strict value is not equal to itself.") | |
526 | + | } | |
527 | + | else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
528 | + | }) | |
529 | + | ||
530 | + | ||
531 | + | ||
532 | + | @Callable(i) | |
533 | + | func shutdown () = if (!(active)) | |
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))) | |
536 | + | then throw("Only admin can call this function") | |
537 | + | else suspend("Paused by admin") | |
538 | + | ||
539 | + | ||
540 | + | ||
541 | + | @Callable(i) | |
542 | + | func activate () = if (active) | |
543 | + | then throw("DApp is already active") | |
544 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
545 | + | then throw("Only admin can call this function") | |
546 | + | else [BooleanEntry(kActive, true), DeleteEntry(kCause)] | |
547 | + | ||
548 | + | ||
549 | + | ||
550 | + | @Callable(i) | |
551 | + | func takeIntoAccountExtraFunds () = valueOrElse(isActive(), { | |
552 | + | let amountEnrollA = (accountBalanceWithStakedA - balanceA) | |
553 | + | let amountEnrollB = (accountBalanceWithStakedB - balanceB) | |
554 | + | if ((i.caller != moneyBoxAddress)) | |
555 | + | then throw("Only the wallet can call this function") | |
556 | + | else if (if ((0 > amountEnrollA)) | |
557 | + | then true | |
558 | + | else (0 > amountEnrollB)) | |
559 | + | then suspend("Enroll amount negative") | |
560 | + | else if (if ((amountEnrollA == 0)) | |
561 | + | then (amountEnrollB == 0) | |
562 | + | else false) | |
563 | + | then throw("No money to take") | |
564 | + | else { | |
565 | + | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
566 | + | then invoke(this, "stakeUnstake", [true, amountEnrollA, strAssetIdA], nil) | |
567 | + | else 0 | |
568 | + | if ((stake1 == stake1)) | |
569 | + | then { | |
570 | + | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
571 | + | then invoke(this, "stakeUnstake", [true, amountEnrollB, strAssetIdB], nil) | |
572 | + | else 0 | |
573 | + | if ((stake2 == stake2)) | |
574 | + | then [IntegerEntry(kBalanceA, (balanceA + amountEnrollA)), IntegerEntry(kBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)] | |
575 | + | else throw("Strict value is not equal to itself.") | |
576 | + | } | |
577 | + | else throw("Strict value is not equal to itself.") | |
578 | + | } | |
579 | + | }) | |
580 | + | ||
581 | + | ||
582 | + | ||
583 | + | @Callable(i) | |
584 | + | func stakeUnstake (stake,amount,assetIdString) = if ((i.caller != this)) | |
585 | + | then throw("Only contract itself can invoke this function") | |
586 | + | else if ((assetIdString == "WAVES")) | |
587 | + | then { | |
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) | |
591 | + | let newLeaseAmount = if (stake) | |
592 | + | then (leasingAmount + amount) | |
593 | + | else (leasingAmount - amount) | |
594 | + | let newLease = Lease(pool, newLeaseAmount) | |
595 | + | let newLeaseId = calculateLeaseId(newLease) | |
596 | + | let baseEtry = [newLease, BinaryEntry(kLeasingId, newLeaseId), IntegerEntry(kLeasingAmount, newLeaseAmount)] | |
597 | + | match leasingId { | |
598 | + | case lId: ByteVector => | |
599 | + | ([LeaseCancel(lId)] ++ baseEtry) | |
600 | + | case _ => | |
601 | + | baseEtry | |
602 | + | } | |
603 | + | } | |
604 | + | else { | |
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 | |
610 | + | let inv = invoke(addr, call, params, payments) | |
611 | + | if ((inv == inv)) | |
612 | + | then nil | |
613 | + | else throw("Strict value is not equal to itself.") | |
614 | + | } | |
615 | + | ||
616 | + | ||
617 | + | ||
618 | + | @Callable(i) | |
619 | + | func stakeAll () = valueOrElse(isActive(), if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))) | |
620 | + | then throw("Only admin can call this function") | |
621 | + | else { | |
622 | + | let stake1 = if (containsElement(stakingAssets, strAssetIdA)) | |
623 | + | then { | |
624 | + | let amountA = (balanceA - stakedAmountA) | |
625 | + | if ((amountA > 0)) | |
626 | + | then invoke(this, "stakeUnstake", [true, amountA, strAssetIdA], nil) | |
627 | + | else 0 | |
628 | + | } | |
629 | + | else 0 | |
630 | + | if ((stake1 == stake1)) | |
631 | + | then { | |
632 | + | let stake2 = if (containsElement(stakingAssets, strAssetIdB)) | |
633 | + | then { | |
634 | + | let amountB = (balanceB - stakedAmountB) | |
635 | + | if ((amountB > 0)) | |
636 | + | then invoke(this, "stakeUnstake", [true, amountB, strAssetIdB], nil) | |
637 | + | else 0 | |
638 | + | } | |
639 | + | else 0 | |
640 | + | if ((stake2 == stake2)) | |
641 | + | then nil | |
642 | + | else throw("Strict value is not equal to itself.") | |
643 | + | } | |
644 | + | else throw("Strict value is not equal to itself.") | |
645 | + | }) | |
646 | + | ||
647 | + | ||
648 | + | @Verifier(tx) | |
649 | + | func verify () = { | |
650 | + | let multiSignedByAdmins = { | |
651 | + | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
652 | + | then 1 | |
653 | + | else 0 | |
654 | + | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
655 | + | then 1 | |
656 | + | else 0 | |
657 | + | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
658 | + | then 1 | |
659 | + | else 0 | |
660 | + | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
661 | + | } | |
662 | + | match tx { | |
663 | + | case inv: InvokeScriptTransaction => | |
664 | + | let callTakeIntoAccount = if ((inv.dApp == this)) | |
665 | + | then (inv.function == "takeIntoAccountExtraFunds") | |
666 | + | else false | |
667 | + | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
668 | + | then true | |
669 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
670 | + | then true | |
671 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
672 | + | then true | |
673 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], adminInvokePubKey) | |
674 | + | if (if (callTakeIntoAccount) | |
675 | + | then signedByAdmin | |
676 | + | else false) | |
677 | + | then true | |
678 | + | else multiSignedByAdmins | |
679 | + | case _ => | |
680 | + | multiSignedByAdmins | |
681 | + | } | |
682 | + | } | |
683 | + |
github/deemru/w8io/026f985 39.70 ms ◑