tx · En2ft4XMrwzUoczS5iHsYcXWg2wUp4gnQN5Nfo7wMC9m 3NBmBDmL3niphvg3zUfJZtNwdXgHbtdfxHt: -0.01000000 Waves 2021.08.03 10:13 [1641848] smart account 3NBmBDmL3niphvg3zUfJZtNwdXgHbtdfxHt > SELF 0.00000000 Waves
{ "type": 13, "id": "En2ft4XMrwzUoczS5iHsYcXWg2wUp4gnQN5Nfo7wMC9m", "fee": 1000000, "feeAssetId": null, "timestamp": 1627974853436, "version": 2, "chainId": 84, "sender": "3NBmBDmL3niphvg3zUfJZtNwdXgHbtdfxHt", "senderPublicKey": "7tY8mzZN5HwAoJZdtzEtUpBqooAAfAZVdqBaEV81D2xF", "proofs": [ "2jVA4KNi4LcYtgPvy1BzHENEPvNfrha8pvmgBnQxrZBFsgrvnVG26ZZnWDdsLtDxQYfw1USSeSuocicKAjYMNLNr" ], "script": "base64:AAIFAAAAAAAAAB0IAhIDCgEEEgQKAgEBEgASAwoBARIAEgASAwoBAQAAAFQAAAAAB3ZlcnNpb24CAAAABTEuMC4wAAAAAAprZXlWZXJzaW9uAgAAAAd2ZXJzaW9uAAAAAAlrZXlBY3RpdmUCAAAABmFjdGl2ZQAAAAALa2V5QXNzZXRJZEECAAAACkFfYXNzZXRfaWQAAAAAC2tleUFzc2V0SWRCAgAAAApCX2Fzc2V0X2lkAAAAAAtrZXlCYWxhbmNlQQIAAAAPQV9hc3NldF9iYWxhbmNlAAAAAAtrZXlCYWxhbmNlQgIAAAAPQl9hc3NldF9iYWxhbmNlAAAAAA9rZXlCYWxhbmNlSW5pdEECAAAADEFfYXNzZXRfaW5pdAAAAAAPa2V5QmFsYW5jZUluaXRCAgAAAAxCX2Fzc2V0X2luaXQAAAAAD2tleVNoYXJlQXNzZXRJZAIAAAAOc2hhcmVfYXNzZXRfaWQAAAAAE2tleVNoYXJlQXNzZXRTdXBwbHkCAAAAEnNoYXJlX2Fzc2V0X3N1cHBseQAAAAANa2V5Q29tbWlzc2lvbgIAAAAKY29tbW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QAAAAAAAAAAAAQAAAASYWRtaW5QdWJLZXkzU2lnbmVkAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAIFAAAADGFkbWluUHViS2V5MwAAAAAAAAAAAQAAAAAAAAAAAAkAAGcAAAACCQAAZAAAAAIJAABkAAAAAgUAAAASYWRtaW5QdWJLZXkxU2lnbmVkBQAAABJhZG1pblB1YktleTJTaWduZWQFAAAAEmFkbWluUHViS2V5M1NpZ25lZAAAAAAAAAAAAsGm+D4=", "height": 1641848, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 8BhsSiw1LCyECyprHUmkYw3upRUqRksd2MZC1FnJ2iL3 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 keyVersion = "version" | |
7 | + | ||
8 | + | let keyActive = "active" | |
9 | + | ||
10 | + | let keyAssetIdA = "A_asset_id" | |
11 | + | ||
12 | + | let keyAssetIdB = "B_asset_id" | |
13 | + | ||
14 | + | let keyBalanceA = "A_asset_balance" | |
15 | + | ||
16 | + | let keyBalanceB = "B_asset_balance" | |
17 | + | ||
18 | + | let keyBalanceInitA = "A_asset_init" | |
19 | + | ||
20 | + | let keyBalanceInitB = "B_asset_init" | |
21 | + | ||
22 | + | let keyShareAssetId = "share_asset_id" | |
23 | + | ||
24 | + | let keyShareAssetSupply = "share_asset_supply" | |
25 | + | ||
26 | + | let keyCommission = "commission" | |
27 | + | ||
28 | + | let keyCommissionScaleDelimiter = "commission_scale_delimiter" | |
29 | + | ||
30 | + | let keyCause = "shutdown_cause" | |
31 | + | ||
32 | + | let keyFirstHarvest = "first_harvest" | |
33 | + | ||
34 | + | let keyFirstHarvestHeight = "first_harvest_height" | |
35 | + | ||
36 | + | let kShareLimit = "share_limit_on_first_harvest" | |
37 | + | ||
38 | + | let kBasePeriod = "base_period" | |
39 | + | ||
40 | + | let kPeriodLength = "period_length" | |
41 | + | ||
42 | + | let kStartHeight = "start_height" | |
43 | + | ||
44 | + | let kFirstHarvestHeight = "first_harvest_height" | |
45 | + | ||
46 | + | let keyAdminPubKey1 = "admin_pub_1" | |
47 | + | ||
48 | + | let keyAdminPubKey2 = "admin_pub_2" | |
49 | + | ||
50 | + | let keyAdminPubKey3 = "admin_pub_3" | |
51 | + | ||
52 | + | let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
53 | + | ||
54 | + | func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) { | |
55 | + | case string: String => | |
56 | + | fromBase58String(string) | |
57 | + | case nothing => | |
58 | + | throw("Admin public key is empty") | |
59 | + | } | |
60 | + | ||
61 | + | ||
62 | + | let adminPubKey1 = getAdminPub(keyAdminPubKey1) | |
63 | + | ||
64 | + | let adminPubKey2 = getAdminPub(keyAdminPubKey2) | |
65 | + | ||
66 | + | let adminPubKey3 = getAdminPub(keyAdminPubKey3) | |
67 | + | ||
68 | + | let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
69 | + | ||
70 | + | let adminPubKeyStaking = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
71 | + | ||
72 | + | let walletAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
73 | + | ||
74 | + | let votingAddress = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
75 | + | ||
76 | + | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
77 | + | ||
78 | + | let NSBT = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9' | |
79 | + | ||
80 | + | let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
81 | + | ||
82 | + | let EURN = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA' | |
83 | + | ||
84 | + | let stakingUSDNNSBTAddress = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg') | |
85 | + | ||
86 | + | let stakingEURNAddress = Address(base58'3MyVqAbmKWh339gF6hy8faWw1jGeTV2wnGE') | |
87 | + | ||
88 | + | let USDNToWavesExchanger = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37') | |
89 | + | ||
90 | + | let USDNToNSBTExchanger = Address(base58'3Mye9wVR7d2mc6Y5ZJTu11svzgUQ7o8H9dA') | |
91 | + | ||
92 | + | let stakingFeeInUSDN = 270000 | |
93 | + | ||
94 | + | let stakingFeeInEURN = 234000 | |
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 isActive = getBooleanValue(this, keyActive) | |
105 | + | ||
106 | + | let strAssetIdA = getStringValue(this, keyAssetIdA) | |
107 | + | ||
108 | + | let strAssetIdB = getStringValue(this, keyAssetIdB) | |
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, keyBalanceA) | |
137 | + | ||
138 | + | let balanceB = getIntegerValue(this, keyBalanceB) | |
139 | + | ||
140 | + | let shareAssetId = fromBase58String(getStringValue(this, keyShareAssetId)) | |
141 | + | ||
142 | + | let shareAssetSupply = getIntegerValue(this, keyShareAssetSupply) | |
143 | + | ||
144 | + | let commission = 3000 | |
145 | + | ||
146 | + | let commissionGovernance = 1200 | |
147 | + | ||
148 | + | let commissionScaleDelimiter = 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 (if ((aId == USDN)) | |
172 | + | then true | |
173 | + | else (aId == NSBT)) | |
174 | + | then getInteger(stakingUSDNNSBTAddress, ((("rpd_balance_" + toBase58String(aId)) + "_") + toString(this))) | |
175 | + | else if ((aId == EURN)) | |
176 | + | then getInteger(stakingEURNAddress, ((("%s%s%s__stakingBalance__" + toBase58String(aId)) + "__") + toString(this))) | |
177 | + | else 0 | |
178 | + | case _: Unit => | |
179 | + | 0 | |
180 | + | case _ => | |
181 | + | throw("Match error") | |
182 | + | } | |
183 | + | match stakedAmountCalculated { | |
184 | + | case i: Int => | |
185 | + | i | |
186 | + | case _ => | |
187 | + | 0 | |
188 | + | } | |
189 | + | } | |
190 | + | ||
191 | + | ||
192 | + | let stakedAmountA = stakedAmount(assetIdA) | |
193 | + | ||
194 | + | let stakedAmountB = stakedAmount(assetIdB) | |
195 | + | ||
196 | + | let assetInitA = getIntegerValue(this, keyBalanceInitA) | |
197 | + | ||
198 | + | let assetInitB = getIntegerValue(this, keyBalanceInitB) | |
199 | + | ||
200 | + | let availableBalanceA = (balanceA - stakedAmountA) | |
201 | + | ||
202 | + | let availableBalanceB = (balanceB - stakedAmountB) | |
203 | + | ||
204 | + | let accountBalanceWithStakedA = (accountBalance(assetIdA) + stakedAmountA) | |
205 | + | ||
206 | + | let accountBalanceWithStakedB = (accountBalance(assetIdB) + stakedAmountB) | |
207 | + | ||
208 | + | let hasEnoughBalance = if ((accountBalanceWithStakedA >= balanceA)) | |
209 | + | then (accountBalanceWithStakedB >= balanceB) | |
210 | + | else false | |
211 | + | ||
212 | + | func getAssetInfo (assetId) = match assetId { | |
213 | + | case id: ByteVector => | |
214 | + | let stringId = toBase58String(id) | |
215 | + | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
216 | + | $Tuple3(stringId, info.name, info.decimals) | |
217 | + | case waves: Unit => | |
218 | + | $Tuple3("WAVES", "WAVES", 8) | |
219 | + | case _ => | |
220 | + | throw("Match error") | |
221 | + | } | |
222 | + | ||
223 | + | ||
224 | + | func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES")) | |
225 | + | then $Tuple3("WAVES", "WAVES", 8) | |
226 | + | else { | |
227 | + | let stringId = assetStr | |
228 | + | let id = fromBase58String(assetStr) | |
229 | + | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
230 | + | $Tuple3(stringId, info.name, info.decimals) | |
231 | + | } | |
232 | + | ||
233 | + | ||
234 | + | func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)] | |
235 | + | ||
236 | + | ||
237 | + | func deductStakingFee (amount,assetId,secondAssetId) = if (if ((assetId == USDN)) | |
238 | + | then true | |
239 | + | else (assetId == EURN)) | |
240 | + | then { | |
241 | + | let stakinFee = if ((assetId == USDN)) | |
242 | + | then (stakingFeeInUSDN * (if ((secondAssetId == NSBT)) | |
243 | + | then 2 | |
244 | + | else 1)) | |
245 | + | else if ((assetId == EURN)) | |
246 | + | then stakingFeeInEURN | |
247 | + | else 0 | |
248 | + | let result = (amount - stakinFee) | |
249 | + | if ((0 >= result)) | |
250 | + | then throw((((("Insufficient amount " + toString(amount)) + " to deduct staking fee ") + toString(stakinFee)) + "USDN/EURN")) | |
251 | + | else result | |
252 | + | } | |
253 | + | else amount | |
254 | + | ||
255 | + | ||
256 | + | func getStakingFee (assetId,secondAssetId) = if ((assetId == USDN)) | |
257 | + | then (stakingFeeInUSDN * (if ((secondAssetId == NSBT)) | |
258 | + | then 2 | |
259 | + | else 1)) | |
260 | + | else if ((assetId == EURN)) | |
261 | + | then stakingFeeInEURN | |
262 | + | else 0 | |
263 | + | ||
264 | + | ||
265 | + | func throwInsufficientAvailableBalance (amount,available,assetName) = throw((((((((("Insufficient DApp balance to pay " + toString(amount)) + " ") + assetName) + " due to staking. Available: ") + toString(available)) + " ") + assetName) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
266 | + | ||
267 | + | ||
268 | + | func throwInsufficientAvailableBalances (amountA,amountB) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(amountA)) + " ") + assetNameA) + " and ") + toString(amountB)) + " ") + assetNameB) + " due to staking. Available: ") + toString(availableBalanceA)) + " ") + assetNameA) + " and ") + toString(availableBalanceB)) + " ") + assetNameB) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
269 | + | ||
270 | + | ||
271 | + | func suspendSuspicious () = suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(accountBalanceWithStakedA)) + " ") + assetNameA) + ", ") + toString(accountBalanceWithStakedB)) + " ") + assetNameB) + ". State: ") + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB)) | |
272 | + | ||
273 | + | ||
274 | + | @Callable(i) | |
275 | + | func init (firstHarvest) = { | |
276 | + | let $t080018078 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
277 | + | let pmtAmountA = $t080018078._1 | |
278 | + | let pmtAssetIdA = $t080018078._2 | |
279 | + | let $t080838160 = $Tuple2(i.payments[1].amount, i.payments[1].assetId) | |
280 | + | let pmtAmountB = $t080838160._1 | |
281 | + | let pmtAssetIdB = $t080838160._2 | |
282 | + | let $t081658242 = getAssetInfo(pmtAssetIdA) | |
283 | + | let pmtStrAssetIdA = $t081658242._1 | |
284 | + | let pmtAssetNameA = $t081658242._2 | |
285 | + | let pmtDecimalsA = $t081658242._3 | |
286 | + | let $t082478324 = getAssetInfo(pmtAssetIdB) | |
287 | + | let pmtStrAssetIdB = $t082478324._1 | |
288 | + | let pmtAssetNameB = $t082478324._2 | |
289 | + | let pmtDecimalsB = $t082478324._3 | |
290 | + | if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStaking], i.callerPublicKey))) | |
291 | + | then throw("Only admin can call this function") | |
292 | + | else if (isDefined(getBoolean(this, keyActive))) | |
293 | + | then throw("DApp is already active") | |
294 | + | else if ((pmtAssetIdA == pmtAssetIdB)) | |
295 | + | then throw("Assets must be different") | |
296 | + | else { | |
297 | + | let shareName = ((("s" + take(pmtAssetNameA, 7)) + "_") + take(pmtAssetNameB, 7)) | |
298 | + | let shareDescription = ((((("ShareToken of SwopFi protocol for " + pmtAssetNameA) + " and ") + pmtAssetNameB) + " at address ") + toString(this)) | |
299 | + | let shareDecimals = ((pmtDecimalsA + pmtDecimalsB) / 2) | |
300 | + | let arg1 = pow(pmtAmountA, pmtDecimalsA, 5, 1, pmtDecimalsA, DOWN) | |
301 | + | let arg2 = pow(pmtAmountB, pmtDecimalsB, 5, 1, pmtDecimalsB, DOWN) | |
302 | + | let arg3 = pow(10, 0, shareDecimals, 0, 0, DOWN) | |
303 | + | let shareInitialSupply = fraction(arg1, arg2, arg3) | |
304 | + | let shareIssue = Issue(shareName, shareDescription, shareInitialSupply, shareDecimals, true) | |
305 | + | let shareIssueId = calculateAssetId(shareIssue) | |
306 | + | 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)] | |
307 | + | if (firstHarvest) | |
308 | + | then (baseEntry ++ [BooleanEntry(keyFirstHarvest, firstHarvest), IntegerEntry(keyFirstHarvestHeight, (startHeight + (firstHarvestEndPeriod * periodLength)))]) | |
309 | + | else baseEntry | |
310 | + | } | |
311 | + | } | |
312 | + | ||
313 | + | ||
314 | + | ||
315 | + | @Callable(i) | |
316 | + | func replenishWithOneToken (slippageTolerance,minAmountToReceive) = { | |
317 | + | let pmtAssetId = i.payments[0].assetId | |
318 | + | let assetIdUnused = if ((i.payments[0].assetId == fromBase58String(strAssetIdA))) | |
319 | + | then fromBase58String(strAssetIdB) | |
320 | + | else fromBase58String(strAssetIdA) | |
321 | + | let pmtAmount = deductStakingFee(i.payments[0].amount, pmtAssetId, assetIdUnused) | |
322 | + | func calculateFees (tokenFrom,tokenTo) = { | |
323 | + | let amountWithoutFee = fraction(tokenTo, (pmtAmount / 2), ((pmtAmount / 2) + tokenFrom)) | |
324 | + | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
325 | + | let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter) | |
326 | + | if ((minAmountToReceive > amountWithFee)) | |
327 | + | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
328 | + | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
329 | + | } | |
330 | + | ||
331 | + | if (!(isActive)) | |
332 | + | then throw("DApp is inactive at this moment") | |
333 | + | else if (if ((balanceA == 0)) | |
334 | + | then true | |
335 | + | else (balanceB == 0)) | |
336 | + | then throw("Can't replenish with zero balance") | |
337 | + | else if ((0 >= minAmountToReceive)) | |
338 | + | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
339 | + | else if ((size(i.payments) != 1)) | |
340 | + | then throw("One attached payment expected") | |
341 | + | else if (!(hasEnoughBalance)) | |
342 | + | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
343 | + | else if ((pmtAssetId == assetIdA)) | |
344 | + | then { | |
345 | + | let assetIdSend = assetIdB | |
346 | + | let $t01234512436 = calculateFees(balanceA, balanceB) | |
347 | + | let amountWithoutFee = $t01234512436._1 | |
348 | + | let amountWithFee = $t01234512436._2 | |
349 | + | let governanceReward = $t01234512436._3 | |
350 | + | let newBalanceA = (balanceA + (pmtAmount / 2)) | |
351 | + | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
352 | + | if (if ((stakedAmountA >= newBalanceA)) | |
353 | + | then true | |
354 | + | else (stakedAmountB >= newBalanceB)) | |
355 | + | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceB, assetNameB) | |
356 | + | else { | |
357 | + | let tokenRatio = fraction(fraction(newBalanceA, scaleValue8, (pmtAmount / 2)), scaleValue3, fraction(newBalanceB, scaleValue8, (pmtAmount / 2))) | |
358 | + | let ratioShareTokensInA = fraction((pmtAmount / 2), scaleValue8, newBalanceA) | |
359 | + | let ratioShareTokensInB = fraction((pmtAmount / 2), scaleValue8, newBalanceB) | |
360 | + | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scaleValue8) | |
361 | + | if (!(isActive)) | |
362 | + | then throw("DApp is inactive at this moment") | |
363 | + | else if (if ((0 > slippageTolerance)) | |
364 | + | then true | |
365 | + | else (slippageTolerance > slippageToleranceDelimiter)) | |
366 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
367 | + | else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio)) | |
368 | + | then true | |
369 | + | else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter))) | |
370 | + | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
371 | + | else if ((shareTokenToPayAmount == 0)) | |
372 | + | then throw("Too small amount to replenish") | |
373 | + | else if (!(hasEnoughBalance)) | |
374 | + | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
375 | + | else [IntegerEntry(keyBalanceA, (newBalanceA + (pmtAmount / 2))), IntegerEntry(keyBalanceB, (newBalanceB + (pmtAmount / 2))), IntegerEntry(keyShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
376 | + | } | |
377 | + | } | |
378 | + | else if ((pmtAssetId == assetIdB)) | |
379 | + | then { | |
380 | + | let assetIdSend = assetIdA | |
381 | + | let $t01516315254 = calculateFees(balanceB, balanceA) | |
382 | + | let amountWithoutFee = $t01516315254._1 | |
383 | + | let amountWithFee = $t01516315254._2 | |
384 | + | let governanceReward = $t01516315254._3 | |
385 | + | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
386 | + | let newBalanceB = (balanceB + (pmtAmount / 2)) | |
387 | + | if (if ((stakedAmountA >= newBalanceA)) | |
388 | + | then true | |
389 | + | else (stakedAmountB >= newBalanceB)) | |
390 | + | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceA, assetNameA) | |
391 | + | else { | |
392 | + | let tokenRatio = fraction(fraction(newBalanceA, scaleValue8, (pmtAmount / 2)), scaleValue3, fraction(newBalanceB, scaleValue8, (pmtAmount / 2))) | |
393 | + | let ratioShareTokensInA = fraction((pmtAmount / 2), scaleValue8, newBalanceA) | |
394 | + | let ratioShareTokensInB = fraction((pmtAmount / 2), scaleValue8, newBalanceB) | |
395 | + | let shareTokenToPayAmount = fraction(min([ratioShareTokensInA, ratioShareTokensInB]), shareAssetSupply, scaleValue8) | |
396 | + | if (!(isActive)) | |
397 | + | then throw("DApp is inactive at this moment") | |
398 | + | else if (if ((0 > slippageTolerance)) | |
399 | + | then true | |
400 | + | else (slippageTolerance > slippageToleranceDelimiter)) | |
401 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(slippageToleranceDelimiter)) + " inclusively. Actual: ") + toString(slippageTolerance))) | |
402 | + | else if (if ((((scaleValue3 * (slippageToleranceDelimiter - slippageTolerance)) / slippageToleranceDelimiter) > tokenRatio)) | |
403 | + | then true | |
404 | + | else (tokenRatio > ((scaleValue3 * (slippageToleranceDelimiter + slippageTolerance)) / slippageToleranceDelimiter))) | |
405 | + | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
406 | + | else if ((shareTokenToPayAmount == 0)) | |
407 | + | then throw("Too small amount to replenish") | |
408 | + | else if (!(hasEnoughBalance)) | |
409 | + | then suspend(((((((((((((((("Suspicious state. Actual balances: " + toString(balanceA)) + " ") + assetNameA) + ", ") + toString(balanceB)) + " ") + assetNameB) + ". State: ") + toString(accountBalance(assetIdA))) + " ") + assetNameA) + ", ") + toString(accountBalance(assetIdB))) + " ") + assetNameB)) | |
410 | + | else [IntegerEntry(keyBalanceA, (newBalanceA + (pmtAmount / 2))), IntegerEntry(keyBalanceB, (newBalanceB + (pmtAmount / 2))), IntegerEntry(keyShareAssetSupply, (shareAssetSupply + shareTokenToPayAmount)), Reissue(shareAssetId, shareTokenToPayAmount, true), ScriptTransfer(i.caller, shareTokenToPayAmount, shareAssetId)] | |
411 | + | } | |
412 | + | } | |
413 | + | else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
414 | + | } | |
415 | + | ||
416 | + | ||
417 | + | ||
418 | + | @Callable(i) | |
419 | + | func withdraw () = { | |
420 | + | let $t01803618186 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
421 | + | let pmtAmount = $t01803618186._1 | |
422 | + | let pmtAssetId = $t01803618186._2 | |
423 | + | let amountToPayA = deductStakingFee(fraction(pmtAmount, balanceA, shareAssetSupply), assetIdA, assetIdB) | |
424 | + | let amountToPayB = deductStakingFee(fraction(pmtAmount, balanceB, shareAssetSupply), assetIdB, assetIdA) | |
425 | + | if (!(isActive)) | |
426 | + | then throw("DApp is inactive at this moment") | |
427 | + | else if ((size(i.payments) != 1)) | |
428 | + | then throw("One attached payment expected") | |
429 | + | else if ((pmtAssetId != shareAssetId)) | |
430 | + | then throw(("Incorrect asset attached. Expected: " + toBase58String(shareAssetId))) | |
431 | + | else if (!(hasEnoughBalance)) | |
432 | + | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
433 | + | else if (if ((amountToPayA > availableBalanceA)) | |
434 | + | then true | |
435 | + | else (amountToPayB > availableBalanceB)) | |
436 | + | then throwInsufficientAvailableBalances(amountToPayA, amountToPayB) | |
437 | + | else [IntegerEntry(keyBalanceA, (balanceA - amountToPayA)), IntegerEntry(keyBalanceB, (balanceB - amountToPayB)), IntegerEntry(keyShareAssetSupply, (shareAssetSupply - pmtAmount)), Burn(shareAssetId, pmtAmount), ScriptTransfer(i.caller, amountToPayA, assetIdA), ScriptTransfer(i.caller, amountToPayB, assetIdB)] | |
438 | + | } | |
439 | + | ||
440 | + | ||
441 | + | ||
442 | + | @Callable(i) | |
443 | + | func exchange (minAmountToReceive) = { | |
444 | + | let $t01941219487 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
445 | + | let pmtAmount = $t01941219487._1 | |
446 | + | let pmtAssetId = $t01941219487._2 | |
447 | + | func calculateFees (tokenFrom,tokenTo) = { | |
448 | + | let amountWithoutFee = fraction(tokenTo, pmtAmount, (pmtAmount + tokenFrom)) | |
449 | + | let amountWithFee = fraction(amountWithoutFee, (commissionScaleDelimiter - commission), commissionScaleDelimiter) | |
450 | + | let governanceReward = fraction(amountWithoutFee, commissionGovernance, commissionScaleDelimiter) | |
451 | + | if ((minAmountToReceive > amountWithFee)) | |
452 | + | then throw(((("Calculated amount to receive " + toString(amountWithFee)) + " is less than specified minimum ") + toString(minAmountToReceive))) | |
453 | + | else $Tuple3(amountWithoutFee, amountWithFee, governanceReward) | |
454 | + | } | |
455 | + | ||
456 | + | if (!(isActive)) | |
457 | + | then throw("DApp is inactive at this moment") | |
458 | + | else if (if ((balanceA == 0)) | |
459 | + | then true | |
460 | + | else (balanceB == 0)) | |
461 | + | then throw("Can't exchange with zero balance") | |
462 | + | else if ((0 >= minAmountToReceive)) | |
463 | + | then throw(("Minimal amount to receive must be positive. Actual: " + toString(minAmountToReceive))) | |
464 | + | else if ((size(i.payments) != 1)) | |
465 | + | then throw("One attached payment expected") | |
466 | + | else if (!(hasEnoughBalance)) | |
467 | + | then ([ScriptTransfer(i.caller, pmtAmount, pmtAssetId)] ++ suspendSuspicious()) | |
468 | + | else if ((pmtAssetId == assetIdA)) | |
469 | + | then { | |
470 | + | let assetIdSend = assetIdB | |
471 | + | let $t02076120852 = calculateFees(balanceA, balanceB) | |
472 | + | let amountWithoutFee = $t02076120852._1 | |
473 | + | let amountWithFee = $t02076120852._2 | |
474 | + | let governanceReward = $t02076120852._3 | |
475 | + | let newBalanceA = (balanceA + pmtAmount) | |
476 | + | let newBalanceB = ((balanceB - amountWithFee) - governanceReward) | |
477 | + | if (if ((stakedAmountA >= newBalanceA)) | |
478 | + | then true | |
479 | + | else (stakedAmountB >= newBalanceB)) | |
480 | + | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceB, assetNameB) | |
481 | + | else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)] | |
482 | + | } | |
483 | + | else if ((pmtAssetId == assetIdB)) | |
484 | + | then { | |
485 | + | let assetIdSend = assetIdA | |
486 | + | let $t02167121762 = calculateFees(balanceB, balanceA) | |
487 | + | let amountWithoutFee = $t02167121762._1 | |
488 | + | let amountWithFee = $t02167121762._2 | |
489 | + | let governanceReward = $t02167121762._3 | |
490 | + | let newBalanceA = ((balanceA - amountWithFee) - governanceReward) | |
491 | + | let newBalanceB = (balanceB + pmtAmount) | |
492 | + | if (if ((stakedAmountA >= newBalanceA)) | |
493 | + | then true | |
494 | + | else (stakedAmountB >= newBalanceB)) | |
495 | + | then throwInsufficientAvailableBalance(amountWithFee, availableBalanceA, assetNameA) | |
496 | + | else [IntegerEntry(keyBalanceA, newBalanceA), IntegerEntry(keyBalanceB, newBalanceB), ScriptTransfer(i.caller, amountWithFee, assetIdSend), ScriptTransfer(walletAddress, governanceReward, assetIdSend)] | |
497 | + | } | |
498 | + | else throw(((("Incorrect asset attached. Expected: " + strAssetIdA) + " or ") + strAssetIdB)) | |
499 | + | } | |
500 | + | ||
501 | + | ||
502 | + | ||
503 | + | @Callable(i) | |
504 | + | func shutdown () = if (!(isActive)) | |
505 | + | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
506 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
507 | + | then throw("Only admin can call this function") | |
508 | + | else suspend("Paused by admin") | |
509 | + | ||
510 | + | ||
511 | + | ||
512 | + | @Callable(i) | |
513 | + | func activate () = if (isActive) | |
514 | + | then throw("DApp is already active") | |
515 | + | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
516 | + | then throw("Only admin can call this function") | |
517 | + | else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)] | |
518 | + | ||
519 | + | ||
520 | + | ||
521 | + | @Callable(i) | |
522 | + | func takeIntoAccountExtraFunds (amountLeave) = { | |
523 | + | let uncountableAmountEnrollAssetA = (accountBalanceWithStakedA - balanceA) | |
524 | + | let uncountableAmountEnrollAssetB = (accountBalanceWithStakedB - balanceB) | |
525 | + | let amountEnrollA = (uncountableAmountEnrollAssetA - (if ((assetIdA == unit)) | |
526 | + | then amountLeave | |
527 | + | else 0)) | |
528 | + | let amountEnrollB = (uncountableAmountEnrollAssetB - (if ((assetIdB == unit)) | |
529 | + | then amountLeave | |
530 | + | else 0)) | |
531 | + | if (!(isActive)) | |
532 | + | then throw("DApp is inactive at this moment") | |
533 | + | else if ((i.caller != this)) | |
534 | + | then throw("Only the DApp itself can call this function") | |
535 | + | else if ((0 > amountLeave)) | |
536 | + | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(amountLeave))) | |
537 | + | else if (if ((0 > uncountableAmountEnrollAssetA)) | |
538 | + | then true | |
539 | + | else (0 > uncountableAmountEnrollAssetB)) | |
540 | + | then suspend("Enroll amount negative") | |
541 | + | else if (if ((0 > amountEnrollA)) | |
542 | + | then true | |
543 | + | else (0 > amountEnrollB)) | |
544 | + | then throw("Too large amountLeave") | |
545 | + | else [IntegerEntry(keyBalanceA, (balanceA + amountEnrollA)), IntegerEntry(keyBalanceB, (balanceB + amountEnrollB)), IntegerEntry(("last_income_" + strAssetIdA), amountEnrollA), IntegerEntry(("last_income_" + strAssetIdB), amountEnrollB)] | |
546 | + | } | |
547 | + | ||
548 | + | ||
549 | + | @Verifier(tx) | |
550 | + | func verify () = match tx { | |
551 | + | case inv: InvokeScriptTransaction => | |
552 | + | let callTakeIntoAccount = if ((inv.dApp == this)) | |
553 | + | then (inv.function == "takeIntoAccountExtraFunds") | |
554 | + | else false | |
555 | + | let callStaking = if (if ((inv.dApp == stakingUSDNNSBTAddress)) | |
556 | + | then if (if (if ((inv.function == "lockNeutrino")) | |
557 | + | then (size(inv.payments) == 1) | |
558 | + | else false) | |
559 | + | then if ((inv.payments[0].assetId == USDN)) | |
560 | + | then true | |
561 | + | else (inv.payments[0].assetId == NSBT) | |
562 | + | else false) | |
563 | + | then true | |
564 | + | else if ((inv.function == "unlockNeutrino")) | |
565 | + | then (size(inv.payments) == 0) | |
566 | + | else false | |
567 | + | else false) | |
568 | + | then true | |
569 | + | else if ((inv.dApp == stakingEURNAddress)) | |
570 | + | then if (if (if ((inv.function == "startStaking")) | |
571 | + | then (size(inv.payments) == 1) | |
572 | + | else false) | |
573 | + | then (inv.payments[0].assetId == EURN) | |
574 | + | else false) | |
575 | + | then true | |
576 | + | else if ((inv.function == "stopStaking")) | |
577 | + | then (size(inv.payments) == 0) | |
578 | + | else false | |
579 | + | else false | |
580 | + | let exchangeToWaves = if (if (if ((inv.dApp == USDNToWavesExchanger)) | |
581 | + | then (inv.function == "exchange") | |
582 | + | else false) | |
583 | + | then (assetIdA == USDN) | |
584 | + | else false) | |
585 | + | then true | |
586 | + | else if (if ((assetIdB == USDN)) | |
587 | + | then (size(inv.payments) == 1) | |
588 | + | else false) | |
589 | + | then (inv.payments[0].assetId == USDN) | |
590 | + | else false | |
591 | + | let exchangeToNSBTs = if (if (if ((inv.dApp == USDNToNSBTExchanger)) | |
592 | + | then (inv.function == "exchange") | |
593 | + | else false) | |
594 | + | then (assetIdA == NSBT) | |
595 | + | else false) | |
596 | + | then true | |
597 | + | else if (if ((assetIdB == NSBT)) | |
598 | + | then (size(inv.payments) == 1) | |
599 | + | else false) | |
600 | + | then (inv.payments[0].assetId == USDN) | |
601 | + | else false | |
602 | + | let signedByAdmin = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
603 | + | then true | |
604 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey2)) | |
605 | + | then true | |
606 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey3)) | |
607 | + | then true | |
608 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKeyStaking) | |
609 | + | if (if (if (if (callTakeIntoAccount) | |
610 | + | then true | |
611 | + | else callStaking) | |
612 | + | then true | |
613 | + | else exchangeToWaves) | |
614 | + | then true | |
615 | + | else exchangeToNSBTs) | |
616 | + | then signedByAdmin | |
617 | + | else false | |
618 | + | case _ => | |
619 | + | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
620 | + | then 1 | |
621 | + | else 0 | |
622 | + | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
623 | + | then 1 | |
624 | + | else 0 | |
625 | + | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
626 | + | then 1 | |
627 | + | else 0 | |
628 | + | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
629 | + | } | |
630 | + |
github/deemru/w8io/169f3d6 33.55 ms ◑