tx · APqF3hD769g33XH55FjJ3HYynspPAC1JoQMVZimCGwLM 3MwMR1ZFfy712trHVLisizYmvRQwsg8z9Bn: -0.01400000 Waves 2020.03.27 16:50 [927921] smart account 3MwMR1ZFfy712trHVLisizYmvRQwsg8z9Bn > SELF 0.00000000 Waves
{ "type": 13, "id": "APqF3hD769g33XH55FjJ3HYynspPAC1JoQMVZimCGwLM", "fee": 1400000, "feeAssetId": null, "timestamp": 1585317079374, "version": 1, "sender": "3MwMR1ZFfy712trHVLisizYmvRQwsg8z9Bn", "senderPublicKey": "97T1f7qUWzkowGZkQrhKdK7mb6NMiCypcdgw9AJkb7Lx", "proofs": [ "5Y9xHdAH4uQ2gG17EuUAZrSZ8Ad6adggp7PTbX4YWKRg4djVcsiXWv2yyXm7kq9e6XUT59SB7n7JfQAuye13vvDo" ], "script": "base64:AAIDAAAAAAAAABUIARIAEgASBAoCCAESABIDCgEIEgAAAABTAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAABAAAADGdldEJvb2xCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQcBAAAAGGdldE51bWJlckJ5QWRkcmVzc0FuZEtleQAAAAIAAAAHYWRkcmVzcwAAAANrZXkE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AJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAABhub2RlT3JhY2xlUHJvdmlkZXJQdWJLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFVNwb25zb3JGZWVUcmFuc2FjdGlvbgQAAAAJc3BvbnNvclR4BQAAAAckbWF0Y2gwCQEAAAAbY2hlY2tJc1ZhbGlkTWluU3BvbnNvcmVkRmVlAAAAAQUAAAAJc3BvbnNvclR4Bq7UXUo=", "chainId": 84, "height": 927921, "spentComplexity": 0 } View: original | compacted Prev: GfCJSsZRRGw1BWZS81wAWRJuLsas5Hak43NzebKzXwsH Next: 9YnL9kgdro8bUWoqvhukvCMwxMAPzPZUcWMwKXAPN8c6 Diff:
Old | New | Differences | |
---|---|---|---|
210 | 210 | func checkIsValidMinSponsoredFee (tx) = { | |
211 | 211 | let cp = 90 | |
212 | 212 | let realNeutrinoFee = convertWavesToNeutrino(MINTRANSFERFEE, cp) | |
213 | - | let mediumPercent = (SponsoredFeeLowerBound + fraction((SponsoredFeeUpperBound - SponsoredFeeLowerBound), 1, 2)) | |
214 | - | let exactFee = (realNeutrinoFee + fraction(realNeutrinoFee, mediumPercent, 100)) | |
213 | + | let multiplier = 10 | |
214 | + | let mediumPercent = (fraction(SponsoredFeeLowerBound, multiplier, 1) + fraction((SponsoredFeeUpperBound - SponsoredFeeLowerBound), multiplier, 2)) | |
215 | + | let exactFee = (realNeutrinoFee + fraction(realNeutrinoFee, mediumPercent, fraction(100, multiplier, 1))) | |
215 | 216 | let correct = toString(getNumberFromOptional(tx.minSponsoredAssetFee)) | |
216 | 217 | let exact = toString(exactFee) | |
217 | 218 | throw(((((((("Correct fee: " + correct) + "; Exact: ") + exact) + "; Real USDN fee: ") + toString(realNeutrinoFee)) + "; Medium percent: ") + toString(mediumPercent))) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func getNumberByKey (key) = match getInteger(this, key) { | |
5 | 5 | case a: Int => | |
6 | 6 | a | |
7 | 7 | case _ => | |
8 | 8 | 0 | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func getStringByKey (key) = match getString(this, key) { | |
13 | 13 | case a: String => | |
14 | 14 | a | |
15 | 15 | case _ => | |
16 | 16 | "" | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func getBoolByKey (key) = match getBoolean(this, key) { | |
21 | 21 | case a: Boolean => | |
22 | 22 | a | |
23 | 23 | case _ => | |
24 | 24 | false | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getNumberByAddressAndKey (address,key) = match getInteger(addressFromStringValue(address), key) { | |
29 | 29 | case a: Int => | |
30 | 30 | a | |
31 | 31 | case _ => | |
32 | 32 | 0 | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func getStringByAddressAndKey (address,key) = match getString(addressFromStringValue(address), key) { | |
37 | 37 | case a: String => | |
38 | 38 | a | |
39 | 39 | case _ => | |
40 | 40 | "" | |
41 | 41 | } | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func getBoolByAddressAndKey (address,key) = match getBoolean(addressFromStringValue(address), key) { | |
45 | 45 | case a: Boolean => | |
46 | 46 | a | |
47 | 47 | case _ => | |
48 | 48 | false | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getNumberFromOptional (value) = match value { | |
53 | 53 | case a: Int => | |
54 | 54 | a | |
55 | 55 | case _ => | |
56 | 56 | 0 | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | let SENDTXEXPIRE = 30 | |
61 | 61 | ||
62 | 62 | let LISTSPLITSYMBOL = "_" | |
63 | 63 | ||
64 | 64 | let LISTDATASYMBOL = "+" | |
65 | 65 | ||
66 | 66 | let WAVELET = 100000000 | |
67 | 67 | ||
68 | 68 | let PAULI = 1000000 | |
69 | 69 | ||
70 | 70 | let DEFICITOFFSET = 5 | |
71 | 71 | ||
72 | 72 | let NeutrinoAssetIdKey = "neutrino_asset_id" | |
73 | 73 | ||
74 | 74 | let BondAssetIdKey = "bond_asset_id" | |
75 | 75 | ||
76 | 76 | let AuctionContractKey = "auction_contract" | |
77 | 77 | ||
78 | 78 | let LiquidationContractKey = "liquidation_contract" | |
79 | 79 | ||
80 | 80 | let RPDContractKey = "rpd_contract" | |
81 | 81 | ||
82 | 82 | let ContolContractKey = "control_contract" | |
83 | 83 | ||
84 | 84 | let BalanceWavesLockIntervalKey = "balance_waves_lock_interval" | |
85 | 85 | ||
86 | 86 | let BalanceNeutrinoLockIntervalKey = "balance_neutrino_lock_interval" | |
87 | 87 | ||
88 | 88 | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
89 | 89 | ||
90 | 90 | let MinNeutrinoSwapAmountKey = "min_neutrino_swap_amount" | |
91 | 91 | ||
92 | 92 | let NodeOracleProviderPubKeyKey = "node_oracle_provider" | |
93 | 93 | ||
94 | 94 | let SponsoredFeeLowerBound = 50 | |
95 | 95 | ||
96 | 96 | let SponsoredFeeUpperBound = 100 | |
97 | 97 | ||
98 | 98 | let MINTRANSFERFEE = 100000 | |
99 | 99 | ||
100 | 100 | let currentConfigId = "current_config_id" | |
101 | 101 | ||
102 | 102 | func getFeePriceKey (id) = ("price_fee_" + id) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getMinFeeKey (id) = ("minfee_fee_" + id) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getConfigStatusKey (id) = ("fee_config_status_" + id) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | let RPDBalanceKey = "rpd_balance" | |
112 | 112 | ||
113 | 113 | func getRPDContractBalanceKey (assetId) = ((RPDBalanceKey + "_") + toBase58String(assetId)) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | let PriceKey = "price" | |
117 | 117 | ||
118 | 118 | let PriceIndexKey = "price_index" | |
119 | 119 | ||
120 | 120 | let IsBlockedKey = "is_blocked" | |
121 | 121 | ||
122 | 122 | func getPriceHistoryKey (block) = ((PriceKey + "_") + toString(block)) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getHeightPriceByIndexKey (index) = ((PriceIndexKey + "_") + toString(index)) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | let BalanceLockedkKey = "balance_lock_" | |
129 | 129 | ||
130 | 130 | let WavesLockedBalanceKey = (BalanceLockedkKey + "waves") | |
131 | 131 | ||
132 | 132 | let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino") | |
133 | 133 | ||
134 | 134 | func getRPDSnapshotContractBalanceKey (count,assetId) = ((((RPDBalanceKey + "_") + toBase58String(assetId)) + "_") + toString(count)) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getCancelLeaseTxReserveFeeKey (hash) = (("cancel_lease_tx_reserve_fee" + "_") + hash) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getWavesLockedBalanceKey (owner) = ((WavesLockedBalanceKey + "_") + owner) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func getNeutrinoLockedBalanceKey (owner) = ((NeutrinoLockedBalanceKey + "_") + owner) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func getBalanceUnlockBlockKey (owner) = ("balance_unlock_block_" + owner) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func getRPDProfitKey (count) = (("rpd_profit" + "_") + toString(count)) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, 100, price), WAVELET, PAULI) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, 100), PAULI, WAVELET) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func convertWavesToBond (amount,price) = convertWavesToNeutrino(amount, price) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func convertJsonArrayToList (jsonArray) = split(jsonArray, ",") | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | let liquidationContract = getStringByKey(LiquidationContractKey) | |
165 | 165 | ||
166 | 166 | let neutrinoAssetIdString = getStringByKey(NeutrinoAssetIdKey) | |
167 | 167 | ||
168 | 168 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdString) | |
169 | 169 | ||
170 | 170 | let auctionContract = getStringByKey(AuctionContractKey) | |
171 | 171 | ||
172 | 172 | let rpdContract = getStringByKey(RPDContractKey) | |
173 | 173 | ||
174 | 174 | let controlContract = getStringByKey(ContolContractKey) | |
175 | 175 | ||
176 | 176 | let priceIndex = getNumberByAddressAndKey(controlContract, PriceIndexKey) | |
177 | 177 | ||
178 | 178 | let isBlocked = getBoolByAddressAndKey(controlContract, IsBlockedKey) | |
179 | 179 | ||
180 | 180 | let nodeOracleProviderPubKey = fromBase58String(getStringByKey(NodeOracleProviderPubKeyKey)) | |
181 | 181 | ||
182 | 182 | let balanceWavesLockInterval = getNumberByKey(BalanceWavesLockIntervalKey) | |
183 | 183 | ||
184 | 184 | let balanceNeutrinoLockInterval = getNumberByKey(BalanceNeutrinoLockIntervalKey) | |
185 | 185 | ||
186 | 186 | let minWavesSwapAmount = getNumberByKey(MinWavesSwapAmountKey) | |
187 | 187 | ||
188 | 188 | let minNeutrinoSwapAmount = getNumberByKey(MinNeutrinoSwapAmountKey) | |
189 | 189 | ||
190 | 190 | let bondAssetId = fromBase58String("6nSpVyNH7yM69eg446wrQR94ipbbcmZMU1ENPwanC97g") | |
191 | 191 | ||
192 | 192 | let deprecatedBondAssetId = fromBase58String("975akZBfnMj513U7MZaHKzQrmsEx5aE3wdWKTrHBhbjF") | |
193 | 193 | ||
194 | 194 | let neutrinoContract = this | |
195 | 195 | ||
196 | 196 | let currentPrice = getNumberByAddressAndKey(controlContract, PriceKey) | |
197 | 197 | ||
198 | 198 | let neutrinoLockedBalance = getNumberByKey(NeutrinoLockedBalanceKey) | |
199 | 199 | ||
200 | 200 | let wavesLockedBalance = getNumberByKey(WavesLockedBalanceKey) | |
201 | 201 | ||
202 | 202 | let reserve = (wavesBalance(neutrinoContract) - wavesLockedBalance) | |
203 | 203 | ||
204 | 204 | let neutrinoSupply = (((neutrinoLockedBalance + extract(assetInfo(neutrinoAssetId)).quantity) - assetBalance(neutrinoContract, neutrinoAssetId)) - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId)) | |
205 | 205 | ||
206 | 206 | let surplus = (convertWavesToNeutrino(reserve, currentPrice) - neutrinoSupply) | |
207 | 207 | ||
208 | 208 | let deficit = (neutrinoSupply - convertWavesToNeutrino(reserve, currentPrice)) | |
209 | 209 | ||
210 | 210 | func checkIsValidMinSponsoredFee (tx) = { | |
211 | 211 | let cp = 90 | |
212 | 212 | let realNeutrinoFee = convertWavesToNeutrino(MINTRANSFERFEE, cp) | |
213 | - | let mediumPercent = (SponsoredFeeLowerBound + fraction((SponsoredFeeUpperBound - SponsoredFeeLowerBound), 1, 2)) | |
214 | - | let exactFee = (realNeutrinoFee + fraction(realNeutrinoFee, mediumPercent, 100)) | |
213 | + | let multiplier = 10 | |
214 | + | let mediumPercent = (fraction(SponsoredFeeLowerBound, multiplier, 1) + fraction((SponsoredFeeUpperBound - SponsoredFeeLowerBound), multiplier, 2)) | |
215 | + | let exactFee = (realNeutrinoFee + fraction(realNeutrinoFee, mediumPercent, fraction(100, multiplier, 1))) | |
215 | 216 | let correct = toString(getNumberFromOptional(tx.minSponsoredAssetFee)) | |
216 | 217 | let exact = toString(exactFee) | |
217 | 218 | throw(((((((("Correct fee: " + correct) + "; Exact: ") + exact) + "; Real USDN fee: ") + toString(realNeutrinoFee)) + "; Medium percent: ") + toString(mediumPercent))) | |
218 | 219 | } | |
219 | 220 | ||
220 | 221 | ||
221 | 222 | func getRPDContractBalance (assetId) = getNumberByAddressAndKey(rpdContract, getRPDContractBalanceKey(assetId)) | |
222 | 223 | ||
223 | 224 | ||
224 | 225 | func getPriceHistory (block) = getNumberByAddressAndKey(controlContract, getPriceHistoryKey(block)) | |
225 | 226 | ||
226 | 227 | ||
227 | 228 | func getHeightPriceByIndex (index) = getNumberByAddressAndKey(controlContract, getHeightPriceByIndexKey(index)) | |
228 | 229 | ||
229 | 230 | ||
230 | 231 | func getCancelLeaseTxReserveFee (hash) = getNumberByKey(getCancelLeaseTxReserveFeeKey(hash)) | |
231 | 232 | ||
232 | 233 | ||
233 | 234 | func getWavesLockedBalance (owner) = getNumberByKey(getWavesLockedBalanceKey(owner)) | |
234 | 235 | ||
235 | 236 | ||
236 | 237 | func getNeutrinoLockedBalance (owner) = getNumberByKey(getNeutrinoLockedBalanceKey(owner)) | |
237 | 238 | ||
238 | 239 | ||
239 | 240 | func getUnlockBalanceBlock (owner) = getNumberByKey(getBalanceUnlockBlockKey(owner)) | |
240 | 241 | ||
241 | 242 | ||
242 | 243 | func getRPDProfit (count) = getNumberByKey(getRPDProfitKey(count)) | |
243 | 244 | ||
244 | 245 | ||
245 | 246 | @Callable(i) | |
246 | 247 | func swapWavesToNeutrino () = { | |
247 | 248 | let pmt = extract(i.payment) | |
248 | 249 | let account = toString(i.caller) | |
249 | 250 | if ((minWavesSwapAmount > pmt.amount)) | |
250 | 251 | then throw((("The specified Waves amount is less than the required minimum of " + toString(minWavesSwapAmount)) + " wavelets.")) | |
251 | 252 | else if (isDefined(pmt.assetId)) | |
252 | 253 | then throw("Only Waves token is allowed for swapping.") | |
253 | 254 | else if (isBlocked) | |
254 | 255 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
255 | 256 | else if ((getUnlockBalanceBlock(account) > height)) | |
256 | 257 | then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks")) | |
257 | 258 | else if (if ((getNeutrinoLockedBalance(account) != 0)) | |
258 | 259 | then true | |
259 | 260 | else (getWavesLockedBalance(account) != 0)) | |
260 | 261 | then throw("please withdraw locked funds first") | |
261 | 262 | else WriteSet([DataEntry(getWavesLockedBalanceKey(account), pmt.amount), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceWavesLockInterval)), DataEntry(WavesLockedBalanceKey, (wavesLockedBalance + pmt.amount))]) | |
262 | 263 | } | |
263 | 264 | ||
264 | 265 | ||
265 | 266 | ||
266 | 267 | @Callable(i) | |
267 | 268 | func swapNeutrinoToWaves () = { | |
268 | 269 | let pmt = extract(i.payment) | |
269 | 270 | let account = toString(i.caller) | |
270 | 271 | if ((minNeutrinoSwapAmount > pmt.amount)) | |
271 | 272 | then throw((("The specified Neutrino amount is less than the required minimum of " + toString(minNeutrinoSwapAmount)) + " Neutrino cents.")) | |
272 | 273 | else if (isBlocked) | |
273 | 274 | then throw("The contract is blocked by EMERGENCY SHUTDOWN. Please wait for reactivation by emergency oracles.") | |
274 | 275 | else if ((pmt.assetId != neutrinoAssetId)) | |
275 | 276 | then throw("Only appropriate Neutrino tokens are allowed for swapping.") | |
276 | 277 | else if ((getUnlockBalanceBlock(account) > height)) | |
277 | 278 | then throw((("await " + toString((getUnlockBalanceBlock(account) - height))) + " blocks")) | |
278 | 279 | else if (if ((getNeutrinoLockedBalance(account) != 0)) | |
279 | 280 | then true | |
280 | 281 | else (getWavesLockedBalance(account) != 0)) | |
281 | 282 | then throw("please withdraw locked funds first") | |
282 | 283 | else WriteSet([DataEntry(getNeutrinoLockedBalanceKey(account), pmt.amount), DataEntry(getBalanceUnlockBlockKey(account), (height + balanceNeutrinoLockInterval)), DataEntry(NeutrinoLockedBalanceKey, (neutrinoLockedBalance + pmt.amount))]) | |
283 | 284 | } | |
284 | 285 | ||
285 | 286 | ||
286 | 287 | ||
287 | 288 | @Callable(i) | |
288 | 289 | func withdraw (account,index) = { | |
289 | 290 | let unlockHeight = getUnlockBalanceBlock(account) | |
290 | 291 | let userWavesLockedBalance = getWavesLockedBalance(account) | |
291 | 292 | let userNeutrinoLockedBalance = getNeutrinoLockedBalance(account) | |
292 | 293 | let indexHeight = getHeightPriceByIndex(index) | |
293 | 294 | let prevIndexHeight = getHeightPriceByIndex((index - 1)) | |
294 | 295 | let priceByIndex = getPriceHistory(indexHeight) | |
295 | 296 | let neutrinoAmount = convertWavesToNeutrino(userWavesLockedBalance, priceByIndex) | |
296 | 297 | let wavesAmount = convertNeutrinoToWaves(userNeutrinoLockedBalance, priceByIndex) | |
297 | 298 | if (isBlocked) | |
298 | 299 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
299 | 300 | else if ((unlockHeight > height)) | |
300 | 301 | then throw((("please wait for: " + toString(unlockHeight)) + " block height to withdraw WAVES funds")) | |
301 | 302 | else if (if (if ((index > priceIndex)) | |
302 | 303 | then true | |
303 | 304 | else (unlockHeight > indexHeight)) | |
304 | 305 | then true | |
305 | 306 | else if ((prevIndexHeight != 0)) | |
306 | 307 | then (prevIndexHeight >= unlockHeight) | |
307 | 308 | else false) | |
308 | 309 | then throw(((((((((("invalid price history index: index=" + toString(index)) + " priceIndex=") + toString(priceIndex)) + " indexHeight=") + toString(indexHeight)) + " unlockHeight=") + toString(unlockHeight)) + " prevIndexHeight=") + toString(prevIndexHeight))) | |
309 | 310 | else if (if ((0 >= neutrinoAmount)) | |
310 | 311 | then (0 >= wavesAmount) | |
311 | 312 | else false) | |
312 | 313 | then throw("balance equals zero") | |
313 | 314 | else ScriptResult(WriteSet([DataEntry(getWavesLockedBalanceKey(account), 0), DataEntry(getNeutrinoLockedBalanceKey(account), 0), DataEntry(WavesLockedBalanceKey, (wavesLockedBalance - userWavesLockedBalance)), DataEntry(NeutrinoLockedBalanceKey, (neutrinoLockedBalance - userNeutrinoLockedBalance))]), TransferSet([ScriptTransfer(addressFromStringValue(account), wavesAmount, unit), ScriptTransfer(addressFromStringValue(account), neutrinoAmount, neutrinoAssetId)])) | |
314 | 315 | } | |
315 | 316 | ||
316 | 317 | ||
317 | 318 | ||
318 | 319 | @Callable(i) | |
319 | 320 | func transferToAuction () = { | |
320 | 321 | let deficitBondAmount = (deficit - assetBalance(addressFromStringValue(auctionContract), bondAssetId)) | |
321 | 322 | let minDeficit = fraction(neutrinoSupply, DEFICITOFFSET, 100) | |
322 | 323 | let surplusWithLiquidation = (surplus - assetBalance(addressFromStringValue(liquidationContract), neutrinoAssetId)) | |
323 | 324 | if (isBlocked) | |
324 | 325 | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
325 | 326 | else if (if ((deficitBondAmount > minDeficit)) | |
326 | 327 | then (deficitBondAmount > 0) | |
327 | 328 | else false) | |
328 | 329 | then TransferSet([ScriptTransfer(addressFromStringValue(auctionContract), deficitBondAmount, bondAssetId)]) | |
329 | 330 | else if ((surplusWithLiquidation >= (1 * PAULI))) | |
330 | 331 | then TransferSet([ScriptTransfer(addressFromStringValue(liquidationContract), surplusWithLiquidation, neutrinoAssetId)]) | |
331 | 332 | else throw(((((((("bond were generated or do not need it. Deficit:" + toString(deficitBondAmount)) + "|") + toString(minDeficit)) + ". Surplus:") + toString(surplusWithLiquidation)) + "|") + toString(surplus))) | |
332 | 333 | } | |
333 | 334 | ||
334 | 335 | ||
335 | 336 | ||
336 | 337 | @Callable(i) | |
337 | 338 | func transfer (account) = { | |
338 | 339 | let pmt = extract(i.payment) | |
339 | 340 | TransferSet([ScriptTransfer(addressFromStringValue(account), pmt.amount, pmt.assetId)]) | |
340 | 341 | } | |
341 | 342 | ||
342 | 343 | ||
343 | 344 | ||
344 | 345 | @Callable(i) | |
345 | 346 | func migrationUSDNB2NSBTSwap () = { | |
346 | 347 | let pmt = extract(i.payment) | |
347 | 348 | let account = i.caller | |
348 | 349 | if ((deprecatedBondAssetId != pmt.assetId)) | |
349 | 350 | then throw("error: attempt to swap not USDNB tokens") | |
350 | 351 | else TransferSet([ScriptTransfer(account, (pmt.amount * PAULI), bondAssetId)]) | |
351 | 352 | } | |
352 | 353 | ||
353 | 354 | ||
354 | 355 | @Verifier(tx) | |
355 | 356 | func verify () = { | |
356 | 357 | let id = toBase58String(tx.id) | |
357 | 358 | match tx { | |
358 | 359 | case leasingTx: LeaseCancelTransaction|LeaseTransaction => | |
359 | 360 | sigVerify(tx.bodyBytes, tx.proofs[0], nodeOracleProviderPubKey) | |
360 | 361 | case sponsorTx: SponsorFeeTransaction => | |
361 | 362 | checkIsValidMinSponsoredFee(sponsorTx) | |
362 | 363 | case _ => | |
363 | 364 | true | |
364 | 365 | } | |
365 | 366 | } | |
366 | 367 |
github/deemru/w8io/169f3d6 48.42 ms ◑