tx · F2Q82G6ahf3iF1BL2pB9bfgTDoKCi7d2EJMexdbfpWwi 3NBH3LGg2DsaEtyBr495XEdaFuiLYSNyr3k: -0.04900000 Waves 2022.08.29 22:13 [2206146] smart account 3NBH3LGg2DsaEtyBr495XEdaFuiLYSNyr3k > SELF 0.00000000 Waves
{ "type": 13, "id": "F2Q82G6ahf3iF1BL2pB9bfgTDoKCi7d2EJMexdbfpWwi", "fee": 4900000, "feeAssetId": null, "timestamp": 1661800403936, "version": 2, "chainId": 84, "sender": "3NBH3LGg2DsaEtyBr495XEdaFuiLYSNyr3k", "senderPublicKey": "6rHNfG82m33YnDLzeMuCFn5XNvbNwGhR4ovSFhgJvbxP", "proofs": [ "5HQBvBhiaENpjTAUqzvhLNW7TcqYbkbpxdqLqsfDeLVyjmkg2E3th4rqHmLq5KfVHRQY93oCEtzRNWBdfg8ATQRW" ], "script": "base64:BgJiCAISABIAEgMKAQESAwoBARILCgkBAQEBAQEBAQESEAoOAQEBAQEBAQgICAEBAQESAwoBARIFCgMBAQESBQoDAQEBEgASAwoBARIAEgMKAQgSABIDCgEIEgMKAQgSBAoCCAF/AAlrX29yYV9rZXkCCWtfb3JhX2tleQAPa19vcmFfYmxvY2tfa2V5Ag9rX29yYV9ibG9ja19rZXkABWtfb3JhAgVrX29yYQAJa19iYWxhbmNlAglrX2JhbGFuY2UADmtfcG9zaXRpb25TaXplAg5rX3Bvc2l0aW9uU2l6ZQAQa19wb3NpdGlvbk1hcmdpbgIQa19wb3NpdGlvbk1hcmdpbgAWa19wb3NpdGlvbk9wZW5Ob3Rpb25hbAIWa19wb3NpdGlvbk9wZW5Ob3Rpb25hbAAua19wb3NpdGlvbkxhc3RVcGRhdGVkQ3VtdWxhdGl2ZVByZW1pdW1GcmFjdGlvbgISa19wb3NpdGlvbkZyYWN0aW9uAA1rX2luaXRpYWxpemVkAg1rX2luaXRpYWxpemVkAAhrX3BhdXNlZAIIa19wYXVzZWQABWtfZmVlAgVrX2ZlZQAPa19mdW5k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ha2UJAPwHBAkBEXF1b3RlQXNzZXRTdGFraW5nAAIOdW5sb2NrTmV1dHJpbm8JAMwIAgUHX2Ftb3VudAkAzAgCCQDYBAEJAQpxdW90ZUFzc2V0AAUDbmlsBQNuaWwDCQAAAgUHdW5zdGFrZQUHdW5zdGFrZQkAzggCCQEId2l0aGRyYXcCCQERQGV4dHJOYXRpdmUoMTA2MikBBQdfdHJhZGVyBQdfYW1vdW50CQENdXBkYXRlQmFsYW5jZQEJAGUCCQEIY2JhbGFuY2UABQdfYW1vdW50CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAkBDmFkbWluUHVibGljS2V5AMe2r1k=", "height": 2206146, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3SBvxiHrVAtXtzvWayEoMRKJdMXgpM3NnPVVao25mmQY Next: G4WcqzEHfajQmSVV4ybQjNmM9XbLwnGh3yFwQNcY5pQv Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let k_ora_key = "k_ora_key" | |
5 | 5 | ||
6 | 6 | let k_ora_block_key = "k_ora_block_key" | |
7 | 7 | ||
8 | 8 | let k_ora = "k_ora" | |
9 | 9 | ||
10 | 10 | let k_balance = "k_balance" | |
11 | 11 | ||
12 | 12 | let k_positionSize = "k_positionSize" | |
13 | 13 | ||
14 | 14 | let k_positionMargin = "k_positionMargin" | |
15 | 15 | ||
16 | 16 | let k_positionOpenNotional = "k_positionOpenNotional" | |
17 | 17 | ||
18 | 18 | let k_positionLastUpdatedCumulativePremiumFraction = "k_positionFraction" | |
19 | 19 | ||
20 | 20 | let k_initialized = "k_initialized" | |
21 | 21 | ||
22 | 22 | let k_paused = "k_paused" | |
23 | 23 | ||
24 | 24 | let k_fee = "k_fee" | |
25 | 25 | ||
26 | 26 | let k_fundingPeriod = "k_fundingPeriod" | |
27 | 27 | ||
28 | 28 | let k_initMarginRatio = "k_initMarginRatio" | |
29 | 29 | ||
30 | 30 | let k_maintenanceMarginRatio = "k_mmr" | |
31 | 31 | ||
32 | 32 | let k_liquidationFeeRatio = "k_liquidationFeeRatio" | |
33 | 33 | ||
34 | 34 | let k_partialLiquidationRatio = "k_partLiquidationRatio" | |
35 | 35 | ||
36 | 36 | let k_spreadLimit = "k_spreadLimit" | |
37 | 37 | ||
38 | 38 | let k_maxPriceImpact = "k_maxPriceImpact" | |
39 | 39 | ||
40 | 40 | let k_maxPriceSpread = "k_maxPriceSpread" | |
41 | 41 | ||
42 | 42 | let k_lastDataStr = "k_lastDataStr" | |
43 | 43 | ||
44 | 44 | let k_lastMinuteId = "k_lastMinuteId" | |
45 | 45 | ||
46 | 46 | let k_twapDataLastCumulativePrice = "k_twapDataLastCumulativePrice" | |
47 | 47 | ||
48 | 48 | let k_twapDataLastPrice = "k_twapDataLastPrice" | |
49 | 49 | ||
50 | 50 | let k_twapDataPreviousMinuteId = "k_twapDataPreviousMinuteId" | |
51 | 51 | ||
52 | 52 | let k_latestLongCumulativePremiumFraction = "k_latestLongPremiumFraction" | |
53 | 53 | ||
54 | 54 | let k_latestShortCumulativePremiumFraction = "k_latestShortPremiumFraction" | |
55 | 55 | ||
56 | 56 | let k_nextFundingBlock = "k_nextFundingBlockMinTimestamp" | |
57 | 57 | ||
58 | 58 | let k_longFundingRate = "k_longFundingRate" | |
59 | 59 | ||
60 | 60 | let k_shortFundingRate = "k_shortFundingRate" | |
61 | 61 | ||
62 | 62 | let k_quoteAssetReserve = "k_qtAstR" | |
63 | 63 | ||
64 | 64 | let k_baseAssetReserve = "k_bsAstR" | |
65 | 65 | ||
66 | 66 | let k_totalPositionSize = "k_totalPositionSize" | |
67 | 67 | ||
68 | 68 | let k_totalLongPositionSize = "k_totalLongPositionSize" | |
69 | 69 | ||
70 | 70 | let k_totalShortPositionSize = "k_totalShortPositionSize" | |
71 | 71 | ||
72 | 72 | let k_cumulativeNotional = "k_cumulativeNotional" | |
73 | 73 | ||
74 | 74 | let k_openInterestNotional = "k_openInterestNotional" | |
75 | 75 | ||
76 | 76 | let k_coordinatorAddress = "k_coordinatorAddress" | |
77 | 77 | ||
78 | 78 | let k_insurance_address = "k_insurance_address" | |
79 | 79 | ||
80 | 80 | let k_admin_address = "k_admin_address" | |
81 | 81 | ||
82 | 82 | let k_admin_public_key = "k_admin_public_key" | |
83 | 83 | ||
84 | 84 | let k_quote_asset = "k_quote_asset" | |
85 | 85 | ||
86 | 86 | let k_quote_staking = "k_quote_staking" | |
87 | 87 | ||
88 | 88 | let k_staking_address = "k_staking_address" | |
89 | 89 | ||
90 | 90 | let k_miner_address = "k_miner_address" | |
91 | 91 | ||
92 | 92 | func coordinator () = valueOrErrorMessage(addressFromString(getStringValue(this, k_coordinatorAddress)), "Coordinator not set") | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func adminAddress () = addressFromString(getStringValue(coordinator(), k_admin_address)) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func adminPublicKey () = fromBase58String(getStringValue(coordinator(), k_admin_public_key)) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func quoteAsset () = fromBase58String(getStringValue(coordinator(), k_quote_asset)) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func quoteAssetStaking () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_quote_staking)), "Quote asset staking not set") | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func stakingAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_staking_address)), "Insurance not set") | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func insuranceAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_insurance_address)), "Insurance not set") | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func minerAddress () = valueOrErrorMessage(addressFromString(getStringValue(coordinator(), k_miner_address)), "Insurance not set") | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | let DIR_LONG = 1 | |
117 | 117 | ||
118 | 118 | let DIR_SHORT = 2 | |
119 | 119 | ||
120 | 120 | let TWAP_INTERVAL = 15 | |
121 | 121 | ||
122 | 122 | let ORACLE_INTERVAL = 15 | |
123 | 123 | ||
124 | 124 | let SECONDS = 1000 | |
125 | 125 | ||
126 | 126 | let DECIMAL_UNIT = (1 * (((((10 * 10) * 10) * 10) * 10) * 10)) | |
127 | 127 | ||
128 | 128 | let ONE_DAY = (86400 * DECIMAL_UNIT) | |
129 | 129 | ||
130 | 130 | let ALL_FEES = 100 | |
131 | 131 | ||
132 | 132 | let PNL_OPTION_SPOT = 1 | |
133 | 133 | ||
134 | 134 | let PNL_OPTION_ORACLE = 2 | |
135 | 135 | ||
136 | 136 | func s (_x) = (toString(_x) + ",") | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func divd (_x,_y) = fraction(_x, DECIMAL_UNIT, _y, HALFEVEN) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func muld (_x,_y) = fraction(_x, _y, DECIMAL_UNIT, HALFEVEN) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func abs (_x) = if ((_x > 0)) | |
146 | 146 | then _x | |
147 | 147 | else -(_x) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func vmax (_x,_y) = if ((_x >= _y)) | |
151 | 151 | then _x | |
152 | 152 | else _y | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func toCompositeKey (_key,_address) = ((_key + "_") + _address) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func listToStr (_list) = { | |
159 | 159 | func _join (accumulator,val) = ((accumulator + val) + ",") | |
160 | 160 | ||
161 | 161 | let newListStr = { | |
162 | 162 | let $l = _list | |
163 | 163 | let $s = size($l) | |
164 | 164 | let $acc0 = "" | |
165 | 165 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
166 | 166 | then $a | |
167 | 167 | else _join($a, $l[$i]) | |
168 | 168 | ||
169 | 169 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
170 | 170 | then $a | |
171 | 171 | else throw("List size exceeds 20") | |
172 | 172 | ||
173 | 173 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
174 | 174 | } | |
175 | 175 | let newListStrU = dropRight(newListStr, 1) | |
176 | 176 | let newListStrR = if ((take(newListStrU, 1) == ",")) | |
177 | 177 | then drop(newListStrU, 1) | |
178 | 178 | else newListStrU | |
179 | 179 | newListStrR | |
180 | 180 | } | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func strToList (_str) = split(_str, ",") | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func pushToQueue (_list,_maxSize,_value) = if ((size(_list) > _maxSize)) | |
187 | 187 | then (removeByIndex(_list, 0) :+ _value) | |
188 | 188 | else (_list :+ _value) | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func int (k) = valueOrErrorMessage(getInteger(this, k), ("no value for " + k)) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func cbalance () = int(k_balance) | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | func fee () = int(k_fee) | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | func initMarginRatio () = int(k_initMarginRatio) | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func qtAstR () = int(k_quoteAssetReserve) | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func bsAstR () = int(k_baseAssetReserve) | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func totalPositionSize () = int(k_totalPositionSize) | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | func cumulativeNotional () = int(k_cumulativeNotional) | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | func openInterestNotional () = int(k_openInterestNotional) | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | func nextFundingBlockTimestamp () = int(k_nextFundingBlock) | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | func fundingPeriodRaw () = int(k_fundingPeriod) | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func fundingPeriodDecimal () = (fundingPeriodRaw() * DECIMAL_UNIT) | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func fundingPeriodSeconds () = (fundingPeriodRaw() * SECONDS) | |
228 | 228 | ||
229 | 229 | ||
230 | 230 | func maintenanceMarginRatio () = int(k_maintenanceMarginRatio) | |
231 | 231 | ||
232 | 232 | ||
233 | 233 | func liquidationFeeRatio () = int(k_liquidationFeeRatio) | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func partialLiquidationRatio () = int(k_partialLiquidationRatio) | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | func spreadLimit () = int(k_spreadLimit) | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func maxPriceImpact () = int(k_maxPriceImpact) | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func maxPriceSpread () = int(k_maxPriceSpread) | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | func latestLongCumulativePremiumFraction () = int(k_latestLongCumulativePremiumFraction) | |
249 | 249 | ||
250 | 250 | ||
251 | 251 | func latestShortCumulativePremiumFraction () = int(k_latestShortCumulativePremiumFraction) | |
252 | 252 | ||
253 | 253 | ||
254 | 254 | func totalShortPositionSize () = int(k_totalShortPositionSize) | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func totalLongPositionSize () = int(k_totalLongPositionSize) | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | func requireMoreMarginRatio (_marginRatio,_baseMarginRatio,_largerThanOrEqualTo) = { | |
261 | 261 | let remainingMarginRatio = (_marginRatio - _baseMarginRatio) | |
262 | 262 | if (if (_largerThanOrEqualTo) | |
263 | 263 | then (0 > remainingMarginRatio) | |
264 | 264 | else false) | |
265 | 265 | then throw("Invalid margin") | |
266 | 266 | else if (if (!(_largerThanOrEqualTo)) | |
267 | 267 | then (remainingMarginRatio >= 0) | |
268 | 268 | else false) | |
269 | 269 | then throw("Invalid margin") | |
270 | 270 | else true | |
271 | 271 | } | |
272 | 272 | ||
273 | 273 | ||
274 | 274 | func latestCumulativePremiumFraction (_positionSize) = if ((_positionSize == 0)) | |
275 | 275 | then throw("Should not be called with _positionSize == 0") | |
276 | 276 | else if ((_positionSize > 0)) | |
277 | 277 | then latestLongCumulativePremiumFraction() | |
278 | 278 | else latestShortCumulativePremiumFraction() | |
279 | 279 | ||
280 | 280 | ||
281 | 281 | func getPosition (_trader) = { | |
282 | 282 | let positionSizeOpt = getInteger(this, toCompositeKey(k_positionSize, _trader)) | |
283 | 283 | match positionSizeOpt { | |
284 | 284 | case positionSize: Int => | |
285 | 285 | $Tuple4(positionSize, getIntegerValue(this, toCompositeKey(k_positionMargin, _trader)), getIntegerValue(this, toCompositeKey(k_positionOpenNotional, _trader)), getIntegerValue(this, toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _trader))) | |
286 | 286 | case _ => | |
287 | 287 | $Tuple4(0, 0, 0, 0) | |
288 | 288 | } | |
289 | 289 | } | |
290 | 290 | ||
291 | 291 | ||
292 | 292 | func requireOpenPosition (_trader) = if ((getPosition(_trader)._1 == 0)) | |
293 | 293 | then throw("No open position") | |
294 | 294 | else true | |
295 | 295 | ||
296 | 296 | ||
297 | 297 | func initialized () = valueOrElse(getBoolean(this, k_initialized), false) | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | func paused () = valueOrElse(getBoolean(this, k_paused), false) | |
301 | 301 | ||
302 | 302 | ||
303 | 303 | func updateReserve (_isAdd,_quoteAssetAmount,_baseAssetAmount) = if (_isAdd) | |
304 | 304 | then { | |
305 | 305 | let newBase = (bsAstR() - _baseAssetAmount) | |
306 | 306 | if ((0 >= newBase)) | |
307 | 307 | then throw("Tx lead to base asset reserve <= 0, revert") | |
308 | 308 | else $Tuple4((qtAstR() + _quoteAssetAmount), newBase, (totalPositionSize() + _baseAssetAmount), (cumulativeNotional() + _quoteAssetAmount)) | |
309 | 309 | } | |
310 | 310 | else { | |
311 | 311 | let newQuote = (qtAstR() - _quoteAssetAmount) | |
312 | 312 | if ((0 >= newQuote)) | |
313 | 313 | then throw("Tx lead to base quote reserve <= 0, revert") | |
314 | 314 | else $Tuple4(newQuote, (bsAstR() + _baseAssetAmount), (totalPositionSize() - _baseAssetAmount), (cumulativeNotional() - _quoteAssetAmount)) | |
315 | 315 | } | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | func swapInput (_isAdd,_quoteAssetAmount) = { | |
319 | 319 | let _qtAstR = qtAstR() | |
320 | 320 | let _bsAstR = bsAstR() | |
321 | 321 | let k = muld(_qtAstR, _bsAstR) | |
322 | 322 | let quoteAssetReserveAfter = if (_isAdd) | |
323 | 323 | then (_qtAstR + _quoteAssetAmount) | |
324 | 324 | else (_qtAstR - _quoteAssetAmount) | |
325 | 325 | let baseAssetReserveAfter = divd(k, quoteAssetReserveAfter) | |
326 | 326 | let amountBaseAssetBoughtAbs = abs((baseAssetReserveAfter - _bsAstR)) | |
327 | 327 | let amountBaseAssetBought = if (_isAdd) | |
328 | 328 | then amountBaseAssetBoughtAbs | |
329 | 329 | else -(amountBaseAssetBoughtAbs) | |
330 | 330 | let $t01217712370 = updateReserve(_isAdd, _quoteAssetAmount, amountBaseAssetBoughtAbs) | |
331 | 331 | let quoteAssetReserveAfter1 = $t01217712370._1 | |
332 | 332 | let baseAssetReserveAfter1 = $t01217712370._2 | |
333 | 333 | let totalPositionSizeAfter1 = $t01217712370._3 | |
334 | 334 | let cumulativeNotionalAfter1 = $t01217712370._4 | |
335 | 335 | let priceBefore = divd(_qtAstR, _bsAstR) | |
336 | 336 | let marketPrice = divd(_quoteAssetAmount, amountBaseAssetBoughtAbs) | |
337 | 337 | let priceDiff = abs((priceBefore - marketPrice)) | |
338 | 338 | let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff))) | |
339 | 339 | let maxPriceImpactValue = maxPriceImpact() | |
340 | 340 | if ((priceImpact > maxPriceImpactValue)) | |
341 | 341 | then throw(((((((((((((("Price impact " + toString(priceImpact)) + " > max price impact ") + toString(maxPriceImpactValue)) + " before quote asset: ") + toString(_qtAstR)) + " before base asset: ") + toString(_bsAstR)) + " quote asset amount to exchange: ") + toString(_quoteAssetAmount)) + " price before: ") + toString(priceBefore)) + " marketPrice: ") + toString(marketPrice))) | |
342 | 342 | else $Tuple5(amountBaseAssetBought, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1) | |
343 | 343 | } | |
344 | 344 | ||
345 | 345 | ||
346 | 346 | func calcRemainMarginWithFundingPayment (_oldPositionSize,_oldPositionMargin,_oldPositionCumulativePremiumFraction,_marginDelta) = { | |
347 | 347 | let fundingPayment = if ((_oldPositionSize != 0)) | |
348 | 348 | then { | |
349 | 349 | let _latestCumulativePremiumFraction = latestCumulativePremiumFraction(_oldPositionSize) | |
350 | 350 | muld((_latestCumulativePremiumFraction - _oldPositionCumulativePremiumFraction), _oldPositionSize) | |
351 | 351 | } | |
352 | 352 | else 0 | |
353 | 353 | let signedMargin = ((_marginDelta - fundingPayment) + _oldPositionMargin) | |
354 | 354 | let $t01386113988 = if ((0 > signedMargin)) | |
355 | 355 | then $Tuple2(0, abs(signedMargin)) | |
356 | 356 | else $Tuple2(abs(signedMargin), 0) | |
357 | 357 | let remainMargin = $t01386113988._1 | |
358 | 358 | let badDebt = $t01386113988._2 | |
359 | 359 | $Tuple3(remainMargin, badDebt, fundingPayment) | |
360 | 360 | } | |
361 | 361 | ||
362 | 362 | ||
363 | 363 | func swapOutputWithReserves (_isAdd,_baseAssetAmount,_checkMaxPriceImpact,_quoteAssetReserve,_baseAssetReserve) = { | |
364 | 364 | let priceBefore = divd(_quoteAssetReserve, _baseAssetReserve) | |
365 | 365 | if ((_baseAssetAmount == 0)) | |
366 | 366 | then throw("Invalid base asset amount") | |
367 | 367 | else { | |
368 | 368 | let k = muld(_quoteAssetReserve, _baseAssetReserve) | |
369 | 369 | let baseAssetPoolAmountAfter = if (_isAdd) | |
370 | 370 | then (_baseAssetReserve + _baseAssetAmount) | |
371 | 371 | else (_baseAssetReserve - _baseAssetAmount) | |
372 | 372 | let quoteAssetAfter = divd(k, baseAssetPoolAmountAfter) | |
373 | 373 | let quoteAssetSold = abs((quoteAssetAfter - _quoteAssetReserve)) | |
374 | 374 | let maxPriceImpactValue = maxPriceImpact() | |
375 | 375 | let $t01496515158 = updateReserve(!(_isAdd), quoteAssetSold, _baseAssetAmount) | |
376 | 376 | let quoteAssetReserveAfter1 = $t01496515158._1 | |
377 | 377 | let baseAssetReserveAfter1 = $t01496515158._2 | |
378 | 378 | let totalPositionSizeAfter1 = $t01496515158._3 | |
379 | 379 | let cumulativeNotionalAfter1 = $t01496515158._4 | |
380 | 380 | let marketPrice = divd(quoteAssetSold, _baseAssetAmount) | |
381 | 381 | let priceDiff = abs((priceBefore - marketPrice)) | |
382 | 382 | let priceImpact = (DECIMAL_UNIT - divd(priceBefore, (priceBefore + priceDiff))) | |
383 | 383 | if (if ((priceImpact > maxPriceImpactValue)) | |
384 | 384 | then _checkMaxPriceImpact | |
385 | 385 | else false) | |
386 | 386 | then throw(((((((((((((("Price impact " + toString(priceImpact)) + " > max price impact ") + toString(maxPriceImpactValue)) + " before quote asset: ") + toString(_quoteAssetReserve)) + " before base asset: ") + toString(_baseAssetReserve)) + " base asset amount to exchange: ") + toString(_baseAssetAmount)) + " price before: ") + toString(priceBefore)) + " market price: ") + toString(marketPrice))) | |
387 | 387 | else $Tuple8(quoteAssetSold, quoteAssetReserveAfter1, baseAssetReserveAfter1, totalPositionSizeAfter1, cumulativeNotionalAfter1, (totalLongPositionSize() - (if (_isAdd) | |
388 | 388 | then abs(_baseAssetAmount) | |
389 | 389 | else 0)), (totalShortPositionSize() - (if (!(_isAdd)) | |
390 | 390 | then abs(_baseAssetAmount) | |
391 | 391 | else 0)), priceImpact) | |
392 | 392 | } | |
393 | 393 | } | |
394 | 394 | ||
395 | 395 | ||
396 | 396 | func swapOutput (_isAdd,_baseAssetAmount,_checkMaxPriceImpact) = swapOutputWithReserves(_isAdd, _baseAssetAmount, _checkMaxPriceImpact, qtAstR(), bsAstR()) | |
397 | 397 | ||
398 | 398 | ||
399 | 399 | func getOracleTwapPrice () = { | |
400 | 400 | let oracle = valueOrErrorMessage(addressFromString(getStringValue(this, k_ora)), "") | |
401 | 401 | let priceKey = getStringValue(this, k_ora_key) | |
402 | 402 | let blockKey = getStringValue(this, k_ora_block_key) | |
403 | 403 | let lastValue = valueOrErrorMessage(getInteger(oracle, priceKey), ((("Can not get oracle price. Oracle: " + toString(oracle)) + " key: ") + priceKey)) | |
404 | 404 | lastValue | |
405 | 405 | } | |
406 | 406 | ||
407 | 407 | ||
408 | 408 | func requireNotOverSpreadLimit (_quoteAssetReserve,_baseAssetReserve) = { | |
409 | 409 | let oraclePrice = getOracleTwapPrice() | |
410 | 410 | let priceAfter = divd(_quoteAssetReserve, _baseAssetReserve) | |
411 | 411 | let averagePrice = divd((oraclePrice + priceAfter), (2 * DECIMAL_UNIT)) | |
412 | 412 | let absPriceDiff = divd(abs((oraclePrice - priceAfter)), averagePrice) | |
413 | 413 | if ((absPriceDiff > maxPriceSpread())) | |
414 | 414 | then throw(((("Price spread " + toString(absPriceDiff)) + " > max price spread ") + toString(maxPriceSpread()))) | |
415 | 415 | else true | |
416 | 416 | } | |
417 | 417 | ||
418 | 418 | ||
419 | 419 | func getSpotPrice () = { | |
420 | 420 | let _quoteAssetReserve = qtAstR() | |
421 | 421 | let _baseAssetReserve = bsAstR() | |
422 | 422 | divd(_quoteAssetReserve, _baseAssetReserve) | |
423 | 423 | } | |
424 | 424 | ||
425 | 425 | ||
426 | 426 | func isOverFluctuationLimit () = { | |
427 | 427 | let oraclePrice = getOracleTwapPrice() | |
428 | 428 | let currentPrice = getSpotPrice() | |
429 | 429 | (divd(abs((oraclePrice - currentPrice)), oraclePrice) > spreadLimit()) | |
430 | 430 | } | |
431 | 431 | ||
432 | 432 | ||
433 | 433 | func getPositionAdjustedOpenNotional (_positionSize,_option,_quoteAssetReserve,_baseAssetReserve) = { | |
434 | 434 | let positionSizeAbs = abs(_positionSize) | |
435 | 435 | let isShort = (0 > _positionSize) | |
436 | 436 | let positionNotional = if ((_option == PNL_OPTION_SPOT)) | |
437 | 437 | then { | |
438 | 438 | let $t01837618547 = swapOutputWithReserves(!(isShort), positionSizeAbs, false, _quoteAssetReserve, _baseAssetReserve) | |
439 | 439 | let outPositionNotional = $t01837618547._1 | |
440 | 440 | let x1 = $t01837618547._2 | |
441 | 441 | let x2 = $t01837618547._3 | |
442 | 442 | let x3 = $t01837618547._4 | |
443 | 443 | outPositionNotional | |
444 | 444 | } | |
445 | 445 | else muld(positionSizeAbs, getOracleTwapPrice()) | |
446 | 446 | positionNotional | |
447 | 447 | } | |
448 | 448 | ||
449 | 449 | ||
450 | 450 | func getPositionNotionalAndUnrealizedPnl (_trader,_option) = { | |
451 | 451 | let $t01894119069 = getPosition(_trader) | |
452 | 452 | let positionSize = $t01894119069._1 | |
453 | 453 | let positionMargin = $t01894119069._2 | |
454 | 454 | let positionOpenNotional = $t01894119069._3 | |
455 | 455 | let positionLstUpdCPF = $t01894119069._4 | |
456 | 456 | if ((positionSize == 0)) | |
457 | 457 | then throw("Invalid position size") | |
458 | 458 | else { | |
459 | 459 | let isShort = (0 > positionSize) | |
460 | 460 | let positionNotional = getPositionAdjustedOpenNotional(positionSize, _option, qtAstR(), bsAstR()) | |
461 | 461 | let unrealizedPnl = if (isShort) | |
462 | 462 | then (positionOpenNotional - positionNotional) | |
463 | 463 | else (positionNotional - positionOpenNotional) | |
464 | 464 | $Tuple2(positionNotional, unrealizedPnl) | |
465 | 465 | } | |
466 | 466 | } | |
467 | 467 | ||
468 | 468 | ||
469 | 469 | func calcMarginRatio (_remainMargin,_badDebt,_positionNotional) = divd((_remainMargin - _badDebt), _positionNotional) | |
470 | 470 | ||
471 | 471 | ||
472 | 472 | func getMarginRatioByOption (_trader,_option) = { | |
473 | 473 | let $t01990220013 = getPosition(_trader) | |
474 | 474 | let positionSize = $t01990220013._1 | |
475 | 475 | let positionMargin = $t01990220013._2 | |
476 | 476 | let pon = $t01990220013._3 | |
477 | 477 | let positionLstUpdCPF = $t01990220013._4 | |
478 | 478 | let $t02001920112 = getPositionNotionalAndUnrealizedPnl(_trader, _option) | |
479 | 479 | let positionNotional = $t02001920112._1 | |
480 | 480 | let unrealizedPnl = $t02001920112._2 | |
481 | 481 | let $t02011720283 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl) | |
482 | 482 | let remainMargin = $t02011720283._1 | |
483 | 483 | let badDebt = $t02011720283._2 | |
484 | 484 | calcMarginRatio(remainMargin, badDebt, positionNotional) | |
485 | 485 | } | |
486 | 486 | ||
487 | 487 | ||
488 | 488 | func getMarginRatio (_trader) = getMarginRatioByOption(_trader, PNL_OPTION_SPOT) | |
489 | 489 | ||
490 | 490 | ||
491 | 491 | func getPartialLiquidationAmount (_trader,_positionSize) = { | |
492 | 492 | let maximumRatio = vmax(partialLiquidationRatio(), (DECIMAL_UNIT - divd(getMarginRatio(_trader), maintenanceMarginRatio()))) | |
493 | 493 | let maxExchangedPositionSize = muld(abs(_positionSize), maximumRatio) | |
494 | 494 | let swapResult = swapOutput((_positionSize > 0), maxExchangedPositionSize, false) | |
495 | 495 | let maxExchangedQuoteAssetAmount = swapResult._1 | |
496 | 496 | let priceImpact = swapResult._8 | |
497 | 497 | if ((maxPriceImpact() > priceImpact)) | |
498 | 498 | then maxExchangedQuoteAssetAmount | |
499 | 499 | else { | |
500 | 500 | let exchangedPositionSize = muld(abs(_positionSize), partialLiquidationRatio()) | |
501 | 501 | let exchangedQuoteAssetAmount = swapOutput((_positionSize > 0), exchangedPositionSize, false)._1 | |
502 | 502 | exchangedQuoteAssetAmount | |
503 | 503 | } | |
504 | 504 | } | |
505 | 505 | ||
506 | 506 | ||
507 | 507 | func internalClosePosition (_trader,_checkMaxPriceImpact) = { | |
508 | 508 | let $t02146521593 = getPosition(_trader) | |
509 | 509 | let positionSize = $t02146521593._1 | |
510 | 510 | let positionMargin = $t02146521593._2 | |
511 | 511 | let positionOpenNotional = $t02146521593._3 | |
512 | 512 | let positionLstUpdCPF = $t02146521593._4 | |
513 | 513 | let unrealizedPnl = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT)._2 | |
514 | 514 | let $t02168821856 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl) | |
515 | 515 | let remainMargin = $t02168821856._1 | |
516 | 516 | let badDebt = $t02168821856._2 | |
517 | 517 | let exchangedPositionSize = -(positionSize) | |
518 | 518 | let realizedPnl = unrealizedPnl | |
519 | 519 | let marginToVault = -(remainMargin) | |
520 | 520 | let $t02198322294 = swapOutput((positionSize > 0), abs(positionSize), _checkMaxPriceImpact) | |
521 | 521 | let exchangedQuoteAssetAmount = $t02198322294._1 | |
522 | 522 | let quoteAssetReserveAfter = $t02198322294._2 | |
523 | 523 | let baseAssetReserveAfter = $t02198322294._3 | |
524 | 524 | let totalPositionSizeAfter = $t02198322294._4 | |
525 | 525 | let cumulativeNotionalAfter = $t02198322294._5 | |
526 | 526 | let totalLongAfter = $t02198322294._6 | |
527 | 527 | let totalShortAfter = $t02198322294._7 | |
528 | 528 | let openInterestNotionalAfter = (openInterestNotional() - positionOpenNotional) | |
529 | 529 | $Tuple12(exchangedPositionSize, badDebt, realizedPnl, marginToVault, quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, exchangedQuoteAssetAmount, totalLongAfter, totalShortAfter) | |
530 | 530 | } | |
531 | 531 | ||
532 | 532 | ||
533 | 533 | func getTwapSpotPrice () = { | |
534 | 534 | let minuteId = ((lastBlock.timestamp / 1000) / 60) | |
535 | 535 | let startMinuteId = (minuteId - TWAP_INTERVAL) | |
536 | 536 | let listStr = valueOrElse(getString(this, k_lastDataStr), "") | |
537 | 537 | let list = split(listStr, ",") | |
538 | 538 | func filterFn (accumulator,next) = if ((startMinuteId >= parseIntValue(next))) | |
539 | 539 | then (accumulator :+ parseIntValue(next)) | |
540 | 540 | else accumulator | |
541 | 541 | ||
542 | 542 | let listF = { | |
543 | 543 | let $l = list | |
544 | 544 | let $s = size($l) | |
545 | 545 | let $acc0 = nil | |
546 | 546 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
547 | 547 | then $a | |
548 | 548 | else filterFn($a, $l[$i]) | |
549 | 549 | ||
550 | 550 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
551 | 551 | then $a | |
552 | 552 | else throw("List size exceeds 20") | |
553 | 553 | ||
554 | 554 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
555 | 555 | } | |
556 | 556 | let maxIndex = if ((size(listF) > 0)) | |
557 | 557 | then max(listF) | |
558 | 558 | else parseIntValue(list[0]) | |
559 | 559 | let lastMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0) | |
560 | 560 | let endLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(lastMinuteId))), 0) | |
561 | 561 | let endLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(lastMinuteId))), 0) | |
562 | 562 | let nowCumulativePrice = (endLastCumulativePrice + ((minuteId - lastMinuteId) * endLastPrice)) | |
563 | 563 | let startLastCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(maxIndex))), 0) | |
564 | 564 | let startLastPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(maxIndex))), 0) | |
565 | 565 | let startCumulativePrice = (startLastCumulativePrice + ((startMinuteId - maxIndex) * startLastPrice)) | |
566 | 566 | ((nowCumulativePrice - startCumulativePrice) / TWAP_INTERVAL) | |
567 | 567 | } | |
568 | 568 | ||
569 | 569 | ||
570 | 570 | func updateSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact,_partialLiquidationRatio,_maxPriceSpread) = [IntegerEntry(k_initMarginRatio, _initMarginRatio), IntegerEntry(k_maintenanceMarginRatio, _mmr), IntegerEntry(k_liquidationFeeRatio, _liquidationFeeRatio), IntegerEntry(k_fundingPeriod, _fundingPeriod), IntegerEntry(k_fee, _fee), IntegerEntry(k_spreadLimit, _spreadLimit), IntegerEntry(k_maxPriceImpact, _maxPriceImpact), IntegerEntry(k_partialLiquidationRatio, _partialLiquidationRatio), IntegerEntry(k_maxPriceSpread, _maxPriceSpread)] | |
571 | 571 | ||
572 | 572 | ||
573 | 573 | func updateFunding (_nextFundingBlock,_latestLongCumulativePremiumFraction,_latestShortCumulativePremiumFraction,_longFundingRate,_shortFundingRate) = [IntegerEntry(k_nextFundingBlock, _nextFundingBlock), IntegerEntry(k_latestLongCumulativePremiumFraction, _latestLongCumulativePremiumFraction), IntegerEntry(k_latestShortCumulativePremiumFraction, _latestShortCumulativePremiumFraction), IntegerEntry(k_longFundingRate, _longFundingRate), IntegerEntry(k_shortFundingRate, _shortFundingRate)] | |
574 | 574 | ||
575 | 575 | ||
576 | 576 | func updatePosition (_address,_size,_margin,_openNotional,_latestCumulativePremiumFraction) = [IntegerEntry(toCompositeKey(k_positionSize, _address), _size), IntegerEntry(toCompositeKey(k_positionMargin, _address), _margin), IntegerEntry(toCompositeKey(k_positionOpenNotional, _address), _openNotional), IntegerEntry(toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _address), _latestCumulativePremiumFraction)] | |
577 | 577 | ||
578 | 578 | ||
579 | 579 | func appendTwap (price) = { | |
580 | 580 | let minuteId = ((lastBlock.timestamp / 1000) / 60) | |
581 | 581 | let previousMinuteId = valueOrElse(getInteger(this, k_lastMinuteId), 0) | |
582 | 582 | if ((previousMinuteId > minuteId)) | |
583 | 583 | then throw("TWAP out-of-order") | |
584 | 584 | else { | |
585 | 585 | let lastMinuteId = if ((previousMinuteId == 0)) | |
586 | 586 | then minuteId | |
587 | 587 | else previousMinuteId | |
588 | 588 | if ((minuteId > previousMinuteId)) | |
589 | 589 | then { | |
590 | 590 | let prevCumulativePrice = valueOrElse(getInteger(this, ((k_twapDataLastCumulativePrice + "_") + toString(previousMinuteId))), 0) | |
591 | 591 | let prevPrice = valueOrElse(getInteger(this, ((k_twapDataLastPrice + "_") + toString(previousMinuteId))), price) | |
592 | 592 | let lastCumulativePrice = (prevCumulativePrice + ((minuteId - lastMinuteId) * prevPrice)) | |
593 | 593 | let list = pushToQueue(strToList(valueOrElse(getString(this, k_lastDataStr), "")), TWAP_INTERVAL, toString(minuteId)) | |
594 | 594 | [IntegerEntry(toCompositeKey(k_twapDataLastCumulativePrice, toString(minuteId)), lastCumulativePrice), IntegerEntry(toCompositeKey(k_twapDataLastPrice, toString(minuteId)), price), IntegerEntry(toCompositeKey(k_twapDataPreviousMinuteId, toString(minuteId)), previousMinuteId), IntegerEntry(k_lastMinuteId, minuteId), StringEntry(k_lastDataStr, listToStr(list))] | |
595 | 595 | } | |
596 | 596 | else { | |
597 | 597 | let twapDataPreviousMinuteId = valueOrElse(getInteger(this, toCompositeKey(k_twapDataPreviousMinuteId, toString(minuteId))), 0) | |
598 | 598 | let prevCumulativePrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastCumulativePrice, toString(twapDataPreviousMinuteId))), 0) | |
599 | 599 | let prevPrice = valueOrElse(getInteger(this, toCompositeKey(k_twapDataLastPrice, toString(twapDataPreviousMinuteId))), price) | |
600 | 600 | let lastCumulativePrice = (prevCumulativePrice + ((minuteId - twapDataPreviousMinuteId) * prevPrice)) | |
601 | 601 | [IntegerEntry(toCompositeKey(k_twapDataLastCumulativePrice, toString(minuteId)), lastCumulativePrice), IntegerEntry(toCompositeKey(k_twapDataLastPrice, toString(minuteId)), price)] | |
602 | 602 | } | |
603 | 603 | } | |
604 | 604 | } | |
605 | 605 | ||
606 | 606 | ||
607 | 607 | func updateAmmReserves (_qtAstR,_bsAstR) = [IntegerEntry(k_quoteAssetReserve, _qtAstR), IntegerEntry(k_baseAssetReserve, _bsAstR)] | |
608 | 608 | ||
609 | 609 | ||
610 | 610 | func updateAmm (_qtAstR,_bsAstR,_totalPositionSizeAfter,_cumulativeNotionalAfter,_openInterestNotional,_totalLongPositionSize,_totalShortPositionSize) = if (((_totalLongPositionSize - _totalShortPositionSize) != _totalPositionSizeAfter)) | |
611 | 611 | then throw(((((("Invalid AMM state data: " + toString(_totalLongPositionSize)) + " + ") + toString(_totalShortPositionSize)) + " != ") + toString(_totalPositionSizeAfter))) | |
612 | 612 | else ((updateAmmReserves(_qtAstR, _bsAstR) ++ [IntegerEntry(k_totalPositionSize, _totalPositionSizeAfter), IntegerEntry(k_cumulativeNotional, _cumulativeNotionalAfter), IntegerEntry(k_openInterestNotional, _openInterestNotional), IntegerEntry(k_totalLongPositionSize, _totalLongPositionSize), IntegerEntry(k_totalShortPositionSize, _totalShortPositionSize)]) ++ appendTwap(divd(_qtAstR, _bsAstR))) | |
613 | 613 | ||
614 | 614 | ||
615 | 615 | func deletePosition (_address) = [DeleteEntry(toCompositeKey(k_positionSize, _address)), DeleteEntry(toCompositeKey(k_positionMargin, _address)), DeleteEntry(toCompositeKey(k_positionOpenNotional, _address)), DeleteEntry(toCompositeKey(k_positionLastUpdatedCumulativePremiumFraction, _address))] | |
616 | 616 | ||
617 | 617 | ||
618 | 618 | func withdraw (_address,_amount) = { | |
619 | 619 | let balance = assetBalance(this, quoteAsset()) | |
620 | 620 | if ((_amount > balance)) | |
621 | 621 | then throw(((("Unable to withdraw " + toString(_amount)) + " from contract balance ") + toString(balance))) | |
622 | 622 | else [ScriptTransfer(_address, _amount, quoteAsset())] | |
623 | 623 | } | |
624 | 624 | ||
625 | 625 | ||
626 | 626 | func updateBalance (i) = if ((0 > i)) | |
627 | 627 | then throw("Balance") | |
628 | 628 | else [IntegerEntry(k_balance, i)] | |
629 | 629 | ||
630 | 630 | ||
631 | 631 | func transferFee (i) = [ScriptTransfer(stakingAddress(), i, quoteAsset())] | |
632 | 632 | ||
633 | 633 | ||
634 | 634 | @Callable(i) | |
635 | 635 | func pause () = if ((i.caller != adminAddress())) | |
636 | 636 | then throw("Invalid togglePause params") | |
637 | 637 | else [BooleanEntry(k_paused, true)] | |
638 | 638 | ||
639 | 639 | ||
640 | 640 | ||
641 | 641 | @Callable(i) | |
642 | 642 | func unpause () = if ((i.caller != adminAddress())) | |
643 | 643 | then throw("Invalid togglePause params") | |
644 | 644 | else [BooleanEntry(k_paused, false)] | |
645 | 645 | ||
646 | 646 | ||
647 | 647 | ||
648 | 648 | @Callable(i) | |
649 | 649 | func addLiquidity (_quoteAssetAmount) = if (if ((i.caller != adminAddress())) | |
650 | 650 | then true | |
651 | 651 | else (0 >= _quoteAssetAmount)) | |
652 | 652 | then throw("Invalid addLiquidity params") | |
653 | 653 | else { | |
654 | 654 | let _qtAstR = qtAstR() | |
655 | 655 | let _bsAstR = bsAstR() | |
656 | 656 | let price = divd(_qtAstR, _bsAstR) | |
657 | 657 | let baseAssetAmountToAdd = divd(_quoteAssetAmount, price) | |
658 | 658 | let qtAstRAfter = (_qtAstR + _quoteAssetAmount) | |
659 | 659 | let bsAstRAfter = (_bsAstR + baseAssetAmountToAdd) | |
660 | 660 | updateAmmReserves(qtAstRAfter, bsAstRAfter) | |
661 | 661 | } | |
662 | 662 | ||
663 | 663 | ||
664 | 664 | ||
665 | 665 | @Callable(i) | |
666 | 666 | func removeLiquidity (_quoteAssetAmount) = if (if ((i.caller != adminAddress())) | |
667 | 667 | then true | |
668 | 668 | else (0 >= _quoteAssetAmount)) | |
669 | 669 | then throw("Invalid removeLiquidity params") | |
670 | 670 | else { | |
671 | 671 | let _qtAstR = qtAstR() | |
672 | 672 | let _bsAstR = bsAstR() | |
673 | 673 | let price = divd(_qtAstR, _bsAstR) | |
674 | 674 | let baseAssetAmountToRemove = divd(_quoteAssetAmount, price) | |
675 | 675 | let qtAstRAfter = (_qtAstR - _quoteAssetAmount) | |
676 | 676 | let bsAstRAfter = (_bsAstR - baseAssetAmountToRemove) | |
677 | 677 | updateAmmReserves(qtAstRAfter, bsAstRAfter) | |
678 | 678 | } | |
679 | 679 | ||
680 | 680 | ||
681 | 681 | ||
682 | 682 | @Callable(i) | |
683 | 683 | func changeSettings (_initMarginRatio,_mmr,_liquidationFeeRatio,_fundingPeriod,_fee,_spreadLimit,_maxPriceImpact,_partialLiquidationRatio,_maxPriceSpread) = if ((i.caller != adminAddress())) | |
684 | 684 | then throw("Invalid changeSettings params") | |
685 | 685 | else updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact, _partialLiquidationRatio, _maxPriceSpread) | |
686 | 686 | ||
687 | 687 | ||
688 | 688 | ||
689 | 689 | @Callable(i) | |
690 | 690 | func initialize (_qtAstR,_bsAstR,_fundingPeriod,_initMarginRatio,_mmr,_liquidationFeeRatio,_fee,_oracle,_oracleKey,_coordinator,_spreadLimit,_maxPriceImpact,_partialLiquidationRatio,_maxPriceSpread) = if (if (if (if (if (if (if (if (if (if (if (if ((0 >= _qtAstR)) | |
691 | 691 | then true | |
692 | 692 | else (0 >= _bsAstR)) | |
693 | 693 | then true | |
694 | 694 | else (0 >= _fundingPeriod)) | |
695 | 695 | then true | |
696 | 696 | else (0 >= _initMarginRatio)) | |
697 | 697 | then true | |
698 | 698 | else (0 >= _mmr)) | |
699 | 699 | then true | |
700 | 700 | else (0 >= _liquidationFeeRatio)) | |
701 | 701 | then true | |
702 | 702 | else (0 >= _fee)) | |
703 | 703 | then true | |
704 | 704 | else (0 >= _spreadLimit)) | |
705 | 705 | then true | |
706 | 706 | else (0 >= _maxPriceImpact)) | |
707 | 707 | then true | |
708 | 708 | else (0 >= _partialLiquidationRatio)) | |
709 | 709 | then true | |
710 | 710 | else (0 >= _maxPriceSpread)) | |
711 | 711 | then true | |
712 | 712 | else initialized()) | |
713 | 713 | then throw("Invalid initialize parameters") | |
714 | 714 | else ((((updateAmm(_qtAstR, _bsAstR, 0, 0, 0, 0, 0) ++ updateSettings(_initMarginRatio, _mmr, _liquidationFeeRatio, _fundingPeriod, _fee, _spreadLimit, _maxPriceImpact, _partialLiquidationRatio, _maxPriceSpread)) ++ updateFunding((lastBlock.timestamp + _fundingPeriod), 0, 0, 0, 0)) ++ updateBalance(0)) ++ [BooleanEntry(k_initialized, true), StringEntry(k_ora, _oracle), StringEntry(k_ora_key, _oracleKey), StringEntry(k_coordinatorAddress, _coordinator)]) | |
715 | 715 | ||
716 | 716 | ||
717 | 717 | ||
718 | 718 | @Callable(i) | |
719 | 719 | func setInitMarginRatio (_initMarginRatio) = if (if ((0 >= _initMarginRatio)) | |
720 | 720 | then true | |
721 | 721 | else !(initialized())) | |
722 | 722 | then throw("Invalid setInitMarginRatio parameters") | |
723 | 723 | else updateSettings(_initMarginRatio, maintenanceMarginRatio(), liquidationFeeRatio(), fundingPeriodRaw(), fee(), spreadLimit(), maxPriceImpact(), partialLiquidationRatio(), maxPriceSpread()) | |
724 | 724 | ||
725 | 725 | ||
726 | 726 | ||
727 | 727 | @Callable(i) | |
728 | 728 | func decreasePosition (_amount,_leverage,_minBaseAssetAmount) = if (if (if (if (if ((0 >= _amount)) | |
729 | 729 | then true | |
730 | 730 | else !(initialized())) | |
731 | 731 | then true | |
732 | 732 | else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true))) | |
733 | 733 | then true | |
734 | 734 | else !(requireOpenPosition(toString(i.caller)))) | |
735 | 735 | then true | |
736 | 736 | else paused()) | |
737 | 737 | then throw("Invalid decreasePosition parameters") | |
738 | 738 | else { | |
739 | 739 | let $t03418734339 = getPosition(toString(i.caller)) | |
740 | 740 | let oldPositionSize = $t03418734339._1 | |
741 | 741 | let oldPositionMargin = $t03418734339._2 | |
742 | 742 | let oldPositionOpenNotional = $t03418734339._3 | |
743 | 743 | let oldPositionLstUpdCPF = $t03418734339._4 | |
744 | 744 | let _direction = if ((oldPositionSize > 0)) | |
745 | 745 | then DIR_SHORT | |
746 | 746 | else DIR_LONG | |
747 | 747 | let isAdd = (_direction == DIR_LONG) | |
748 | 748 | let openNotional = muld(_amount, _leverage) | |
749 | 749 | let $t03451234628 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT) | |
750 | 750 | let oldPositionNotional = $t03451234628._1 | |
751 | 751 | let unrealizedPnl = $t03451234628._2 | |
752 | 752 | let $t03463437183 = if ((oldPositionNotional > openNotional)) | |
753 | 753 | then { | |
754 | 754 | let $t03501135230 = swapInput(isAdd, openNotional) | |
755 | 755 | let exchangedPositionSize = $t03501135230._1 | |
756 | 756 | let quoteAssetReserveAfter = $t03501135230._2 | |
757 | 757 | let baseAssetReserveAfter = $t03501135230._3 | |
758 | 758 | let totalPositionSizeAfter = $t03501135230._4 | |
759 | 759 | let cumulativeNotionalAfter = $t03501135230._5 | |
760 | 760 | let exchangedPositionSizeAbs = abs(exchangedPositionSize) | |
761 | 761 | if (if ((_minBaseAssetAmount != 0)) | |
762 | 762 | then (_minBaseAssetAmount > exchangedPositionSizeAbs) | |
763 | 763 | else false) | |
764 | 764 | then throw(((("Too little base asset exchanged, got " + toString(exchangedPositionSizeAbs)) + " expected ") + toString(_minBaseAssetAmount))) | |
765 | 765 | else { | |
766 | 766 | let realizedPnl = divd(muld(unrealizedPnl, exchangedPositionSizeAbs), abs(oldPositionSize)) | |
767 | 767 | let $t03566735912 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl) | |
768 | 768 | let remainMargin = $t03566735912._1 | |
769 | 769 | let badDebt = $t03566735912._2 | |
770 | 770 | let fundingPayment = $t03566735912._3 | |
771 | 771 | let exchangedQuoteAssetAmount = openNotional | |
772 | 772 | let unrealizedPnlAfter = (unrealizedPnl - realizedPnl) | |
773 | 773 | let remainOpenNotional = if ((oldPositionSize > 0)) | |
774 | 774 | then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter) | |
775 | 775 | else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount) | |
776 | 776 | let newPositionSize = (oldPositionSize + exchangedPositionSize) | |
777 | 777 | $Tuple11(newPositionSize, remainMargin, abs(remainOpenNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() - openNotional), (totalLongPositionSize() - (if ((newPositionSize > 0)) | |
778 | 778 | then abs(exchangedPositionSize) | |
779 | 779 | else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize)) | |
780 | 780 | then abs(exchangedPositionSize) | |
781 | 781 | else 0))) | |
782 | 782 | } | |
783 | 783 | } | |
784 | 784 | else throw("Close position first") | |
785 | 785 | let newPositionSize = $t03463437183._1 | |
786 | 786 | let newPositionRemainMargin = $t03463437183._2 | |
787 | 787 | let newPositionOpenNotional = $t03463437183._3 | |
788 | 788 | let newPositionLatestCPF = $t03463437183._4 | |
789 | 789 | let baseAssetReserveAfter = $t03463437183._5 | |
790 | 790 | let quoteAssetReserveAfter = $t03463437183._6 | |
791 | 791 | let totalPositionSizeAfter = $t03463437183._7 | |
792 | 792 | let cumulativeNotionalAfter = $t03463437183._8 | |
793 | 793 | let openInterestNotionalAfter = $t03463437183._9 | |
794 | 794 | let totalLongAfter = $t03463437183._10 | |
795 | 795 | let totalShortAfter = $t03463437183._11 | |
796 | 796 | let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), newPositionOpenNotional], nil) | |
797 | 797 | if ((notifyNotional == notifyNotional)) | |
798 | 798 | then (updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) | |
799 | 799 | else throw("Strict value is not equal to itself.") | |
800 | 800 | } | |
801 | 801 | ||
802 | 802 | ||
803 | 803 | ||
804 | 804 | @Callable(i) | |
805 | 805 | func increasePosition (_direction,_leverage,_minBaseAssetAmount) = { | |
806 | 806 | let _rawAmount = i.payments[0].amount | |
807 | 807 | if (if (if (if (if (if (if ((_direction != DIR_LONG)) | |
808 | 808 | then (_direction != DIR_SHORT) | |
809 | 809 | else false) | |
810 | 810 | then true | |
811 | 811 | else (0 >= _rawAmount)) | |
812 | 812 | then true | |
813 | 813 | else !(initialized())) | |
814 | 814 | then true | |
815 | 815 | else (i.payments[0].assetId != quoteAsset())) | |
816 | 816 | then true | |
817 | 817 | else !(requireMoreMarginRatio(divd(DECIMAL_UNIT, _leverage), initMarginRatio(), true))) | |
818 | 818 | then true | |
819 | 819 | else paused()) | |
820 | 820 | then throw("Invalid increasePosition parameters") | |
821 | 821 | else { | |
822 | 822 | let feeAmount = muld(_rawAmount, fee()) | |
823 | 823 | let _amount = (_rawAmount - feeAmount) | |
824 | 824 | let $t03830138453 = getPosition(toString(i.caller)) | |
825 | 825 | let oldPositionSize = $t03830138453._1 | |
826 | 826 | let oldPositionMargin = $t03830138453._2 | |
827 | 827 | let oldPositionOpenNotional = $t03830138453._3 | |
828 | 828 | let oldPositionLstUpdCPF = $t03830138453._4 | |
829 | 829 | let isNewPosition = (oldPositionSize == 0) | |
830 | 830 | let isSameDirection = if ((oldPositionSize > 0)) | |
831 | 831 | then (_direction == DIR_LONG) | |
832 | 832 | else (_direction == DIR_SHORT) | |
833 | 833 | let expandExisting = if (!(isNewPosition)) | |
834 | 834 | then isSameDirection | |
835 | 835 | else false | |
836 | 836 | let isAdd = (_direction == DIR_LONG) | |
837 | 837 | let $t03874241310 = if (if (isNewPosition) | |
838 | 838 | then true | |
839 | 839 | else expandExisting) | |
840 | 840 | then { | |
841 | 841 | let openNotional = muld(_amount, _leverage) | |
842 | 842 | let $t03916639372 = swapInput(isAdd, openNotional) | |
843 | 843 | let amountBaseAssetBought = $t03916639372._1 | |
844 | 844 | let quoteAssetReserveAfter = $t03916639372._2 | |
845 | 845 | let baseAssetReserveAfter = $t03916639372._3 | |
846 | 846 | let totalPositionSizeAfter = $t03916639372._4 | |
847 | 847 | let cumulativeNotionalAfter = $t03916639372._5 | |
848 | 848 | if (if ((_minBaseAssetAmount != 0)) | |
849 | 849 | then (_minBaseAssetAmount > abs(amountBaseAssetBought)) | |
850 | 850 | else false) | |
851 | 851 | then throw(((("Limit error: " + toString(abs(amountBaseAssetBought))) + " < ") + toString(_minBaseAssetAmount))) | |
852 | 852 | else { | |
853 | 853 | let newPositionSize = (oldPositionSize + amountBaseAssetBought) | |
854 | 854 | let increaseMarginRequirement = divd(openNotional, _leverage) | |
855 | 855 | let $t03975339992 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, increaseMarginRequirement) | |
856 | 856 | let remainMargin = $t03975339992._1 | |
857 | 857 | let x1 = $t03975339992._2 | |
858 | 858 | let x2 = $t03975339992._3 | |
859 | 859 | if (!(requireNotOverSpreadLimit(quoteAssetReserveAfter, baseAssetReserveAfter))) | |
860 | 860 | then throw("Over max spread limit") | |
861 | 861 | else $Tuple11(newPositionSize, remainMargin, (oldPositionOpenNotional + openNotional), latestCumulativePremiumFraction(newPositionSize), baseAssetReserveAfter, quoteAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, (openInterestNotional() + openNotional), (totalLongPositionSize() + (if ((newPositionSize > 0)) | |
862 | 862 | then abs(amountBaseAssetBought) | |
863 | 863 | else 0)), (totalShortPositionSize() + (if ((0 > newPositionSize)) | |
864 | 864 | then abs(amountBaseAssetBought) | |
865 | 865 | else 0))) | |
866 | 866 | } | |
867 | 867 | } | |
868 | 868 | else { | |
869 | 869 | let openNotional = muld(_amount, _leverage) | |
870 | 870 | let $t04100341119 = getPositionNotionalAndUnrealizedPnl(toString(i.caller), PNL_OPTION_SPOT) | |
871 | 871 | let oldPositionNotional = $t04100341119._1 | |
872 | 872 | let unrealizedPnl = $t04100341119._2 | |
873 | 873 | if ((oldPositionNotional > openNotional)) | |
874 | 874 | then throw("Use decreasePosition to decrease position size") | |
875 | 875 | else throw("Close position first") | |
876 | 876 | } | |
877 | 877 | let newPositionSize = $t03874241310._1 | |
878 | 878 | let newPositionRemainMargin = $t03874241310._2 | |
879 | 879 | let newPositionOpenNotional = $t03874241310._3 | |
880 | 880 | let newPositionLatestCPF = $t03874241310._4 | |
881 | 881 | let baseAssetReserveAfter = $t03874241310._5 | |
882 | 882 | let quoteAssetReserveAfter = $t03874241310._6 | |
883 | 883 | let totalPositionSizeAfter = $t03874241310._7 | |
884 | 884 | let cumulativeNotionalAfter = $t03874241310._8 | |
885 | 885 | let openInterestNotionalAfter = $t03874241310._9 | |
886 | 886 | let totalLongAfter = $t03874241310._10 | |
887 | 887 | let totalShortAfter = $t03874241310._11 | |
888 | 888 | let feeToStakers = (feeAmount / 2) | |
889 | 889 | let feeToInsurance = (feeAmount - feeToStakers) | |
890 | 890 | let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)]) | |
891 | 891 | if ((stake == stake)) | |
892 | 892 | then { | |
893 | 893 | let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)]) | |
894 | 894 | if ((depositInsurance == depositInsurance)) | |
895 | 895 | then { | |
896 | 896 | let notifyFee = invoke(minerAddress(), "notifyFees", [toString(i.caller), feeAmount], nil) | |
897 | 897 | if ((notifyFee == notifyFee)) | |
898 | 898 | then { | |
899 | 899 | let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), newPositionOpenNotional], nil) | |
900 | 900 | if ((notifyNotional == notifyNotional)) | |
901 | 901 | then (((updatePosition(toString(i.caller), newPositionSize, newPositionRemainMargin, newPositionOpenNotional, newPositionLatestCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount))) | |
902 | 902 | else throw("Strict value is not equal to itself.") | |
903 | 903 | } | |
904 | 904 | else throw("Strict value is not equal to itself.") | |
905 | 905 | } | |
906 | 906 | else throw("Strict value is not equal to itself.") | |
907 | 907 | } | |
908 | 908 | else throw("Strict value is not equal to itself.") | |
909 | 909 | } | |
910 | 910 | } | |
911 | 911 | ||
912 | 912 | ||
913 | 913 | ||
914 | 914 | @Callable(i) | |
915 | 915 | func addMargin () = { | |
916 | 916 | let _rawAmount = i.payments[0].amount | |
917 | 917 | if (if (if (if ((i.payments[0].assetId != quoteAsset())) | |
918 | 918 | then true | |
919 | 919 | else !(requireOpenPosition(toString(i.caller)))) | |
920 | 920 | then true | |
921 | 921 | else !(initialized())) | |
922 | 922 | then true | |
923 | 923 | else paused()) | |
924 | 924 | then throw("Invalid addMargin parameters") | |
925 | 925 | else { | |
926 | 926 | let feeAmount = muld(_rawAmount, fee()) | |
927 | 927 | let _amount = (_rawAmount - feeAmount) | |
928 | 928 | let $t04286643018 = getPosition(toString(i.caller)) | |
929 | 929 | let oldPositionSize = $t04286643018._1 | |
930 | 930 | let oldPositionMargin = $t04286643018._2 | |
931 | 931 | let oldPositionOpenNotional = $t04286643018._3 | |
932 | 932 | let oldPositionLstUpdCPF = $t04286643018._4 | |
933 | 933 | let feeToStakers = (feeAmount / 2) | |
934 | 934 | let feeToInsurance = (feeAmount - feeToStakers) | |
935 | 935 | let stake = invoke(quoteAssetStaking(), "lockNeutrinoSP", [toString(stakingAddress()), ALL_FEES], [AttachedPayment(quoteAsset(), _amount)]) | |
936 | 936 | if ((stake == stake)) | |
937 | 937 | then { | |
938 | 938 | let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)]) | |
939 | 939 | if ((depositInsurance == depositInsurance)) | |
940 | 940 | then { | |
941 | 941 | let notifyFee = invoke(minerAddress(), "notifyFees", [toString(i.caller), feeAmount], nil) | |
942 | 942 | if ((notifyFee == notifyFee)) | |
943 | 943 | then ((updatePosition(toString(i.caller), oldPositionSize, (oldPositionMargin + _amount), oldPositionOpenNotional, oldPositionLstUpdCPF) ++ transferFee(feeToStakers)) ++ updateBalance((cbalance() + _amount))) | |
944 | 944 | else throw("Strict value is not equal to itself.") | |
945 | 945 | } | |
946 | 946 | else throw("Strict value is not equal to itself.") | |
947 | 947 | } | |
948 | 948 | else throw("Strict value is not equal to itself.") | |
949 | 949 | } | |
950 | 950 | } | |
951 | 951 | ||
952 | 952 | ||
953 | 953 | ||
954 | 954 | @Callable(i) | |
955 | 955 | func removeMargin (_amount) = if (if (if (if ((0 >= _amount)) | |
956 | 956 | then true | |
957 | 957 | else !(requireOpenPosition(toString(i.caller)))) | |
958 | 958 | then true | |
959 | 959 | else !(initialized())) | |
960 | 960 | then true | |
961 | 961 | else paused()) | |
962 | 962 | then throw("Invalid removeMargin parameters") | |
963 | 963 | else { | |
964 | 964 | let $t04406744219 = getPosition(toString(i.caller)) | |
965 | 965 | let oldPositionSize = $t04406744219._1 | |
966 | 966 | let oldPositionMargin = $t04406744219._2 | |
967 | 967 | let oldPositionOpenNotional = $t04406744219._3 | |
968 | 968 | let oldPositionLstUpdCPF = $t04406744219._4 | |
969 | 969 | let marginDelta = -(_amount) | |
970 | 970 | let $t04425644435 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, marginDelta) | |
971 | 971 | let remainMargin = $t04425644435._1 | |
972 | 972 | let badDebt = $t04425644435._2 | |
973 | 973 | if ((badDebt != 0)) | |
974 | 974 | then throw("Invalid removed margin amount") | |
975 | 975 | else { | |
976 | 976 | let marginRatio = calcMarginRatio(remainMargin, badDebt, oldPositionOpenNotional) | |
977 | 977 | if (!(requireMoreMarginRatio(marginRatio, initMarginRatio(), true))) | |
978 | 978 | then throw(((("Too much margin removed: " + toString(marginRatio)) + " < ") + toString(initMarginRatio()))) | |
979 | 979 | else { | |
980 | 980 | let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [_amount, toBase58String(quoteAsset())], nil) | |
981 | 981 | if ((unstake == unstake)) | |
982 | 982 | then ((updatePosition(toString(i.caller), oldPositionSize, remainMargin, oldPositionOpenNotional, latestCumulativePremiumFraction(oldPositionSize)) ++ withdraw(i.caller, _amount)) ++ updateBalance((cbalance() - _amount))) | |
983 | 983 | else throw("Strict value is not equal to itself.") | |
984 | 984 | } | |
985 | 985 | } | |
986 | 986 | } | |
987 | 987 | ||
988 | 988 | ||
989 | 989 | ||
990 | 990 | @Callable(i) | |
991 | 991 | func closePosition () = if (if (if (!(requireOpenPosition(toString(i.caller)))) | |
992 | 992 | then true | |
993 | 993 | else !(initialized())) | |
994 | 994 | then true | |
995 | 995 | else paused()) | |
996 | 996 | then throw("Invalid closePosition parameters") | |
997 | 997 | else { | |
998 | 998 | let $t04553145921 = internalClosePosition(toString(i.caller), true) | |
999 | 999 | let x1 = $t04553145921._1 | |
1000 | 1000 | let positionBadDebt = $t04553145921._2 | |
1001 | 1001 | let realizedPnl = $t04553145921._3 | |
1002 | 1002 | let marginToVault = $t04553145921._4 | |
1003 | 1003 | let quoteAssetReserveAfter = $t04553145921._5 | |
1004 | 1004 | let baseAssetReserveAfter = $t04553145921._6 | |
1005 | 1005 | let totalPositionSizeAfter = $t04553145921._7 | |
1006 | 1006 | let cumulativeNotionalAfter = $t04553145921._8 | |
1007 | 1007 | let openInterestNotionalAfter = $t04553145921._9 | |
1008 | 1008 | let x2 = $t04553145921._10 | |
1009 | 1009 | let totalLongAfter = $t04553145921._11 | |
1010 | 1010 | let totalShortAfter = $t04553145921._12 | |
1011 | 1011 | if ((positionBadDebt > 0)) | |
1012 | 1012 | then throw("Unable to close position with bad debt") | |
1013 | 1013 | else { | |
1014 | 1014 | let withdrawAmount = abs(marginToVault) | |
1015 | 1015 | let ammBalance = (cbalance() - withdrawAmount) | |
1016 | 1016 | let $t04613046272 = if ((0 > ammBalance)) | |
1017 | 1017 | then $Tuple2(0, abs(ammBalance)) | |
1018 | 1018 | else $Tuple2(ammBalance, 0) | |
1019 | 1019 | let ammNewBalance = $t04613046272._1 | |
1020 | 1020 | let getFromInsurance = $t04613046272._2 | |
1021 | 1021 | let x = if ((getFromInsurance > 0)) | |
1022 | 1022 | then { | |
1023 | 1023 | let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [getFromInsurance], nil) | |
1024 | 1024 | if ((withdrawInsurance == withdrawInsurance)) | |
1025 | 1025 | then nil | |
1026 | 1026 | else throw("Strict value is not equal to itself.") | |
1027 | 1027 | } | |
1028 | 1028 | else nil | |
1029 | 1029 | if ((x == x)) | |
1030 | 1030 | then { | |
1031 | 1031 | let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(withdrawAmount - getFromInsurance), toBase58String(quoteAsset())], nil) | |
1032 | 1032 | if ((unstake == unstake)) | |
1033 | 1033 | then { | |
1034 | 1034 | let notifyNotional = invoke(minerAddress(), "notifyNotional", [toString(i.caller), 0], nil) | |
1035 | 1035 | if ((notifyNotional == notifyNotional)) | |
1036 | 1036 | then (((deletePosition(toString(i.caller)) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, withdrawAmount)) ++ updateBalance(ammNewBalance)) | |
1037 | 1037 | else throw("Strict value is not equal to itself.") | |
1038 | 1038 | } | |
1039 | 1039 | else throw("Strict value is not equal to itself.") | |
1040 | 1040 | } | |
1041 | 1041 | else throw("Strict value is not equal to itself.") | |
1042 | 1042 | } | |
1043 | 1043 | } | |
1044 | 1044 | ||
1045 | 1045 | ||
1046 | 1046 | ||
1047 | 1047 | @Callable(i) | |
1048 | 1048 | func liquidate (_trader) = { | |
1049 | 1049 | let spotMarginRatio = getMarginRatioByOption(_trader, PNL_OPTION_SPOT) | |
1050 | 1050 | let marginRatio = if (isOverFluctuationLimit()) | |
1051 | 1051 | then { | |
1052 | 1052 | let oracleMarginRatio = getMarginRatioByOption(_trader, PNL_OPTION_ORACLE) | |
1053 | 1053 | vmax(spotMarginRatio, oracleMarginRatio) | |
1054 | 1054 | } | |
1055 | 1055 | else spotMarginRatio | |
1056 | 1056 | if (if (if (if (!(requireMoreMarginRatio(marginRatio, maintenanceMarginRatio(), false))) | |
1057 | 1057 | then true | |
1058 | 1058 | else !(requireOpenPosition(_trader))) | |
1059 | 1059 | then true | |
1060 | 1060 | else !(initialized())) | |
1061 | 1061 | then true | |
1062 | 1062 | else paused()) | |
1063 | 1063 | then throw("Unable to liquidate") | |
1064 | 1064 | else if (if (if ((spotMarginRatio > liquidationFeeRatio())) | |
1065 | 1065 | then (partialLiquidationRatio() > 0) | |
1066 | 1066 | else false) | |
1067 | 1067 | then (DECIMAL_UNIT > partialLiquidationRatio()) | |
1068 | 1068 | else false) | |
1069 | 1069 | then { | |
1070 | 1070 | let $t04837348523 = getPosition(_trader) | |
1071 | 1071 | let oldPositionSize = $t04837348523._1 | |
1072 | 1072 | let oldPositionMargin = $t04837348523._2 | |
1073 | 1073 | let oldPositionOpenNotional = $t04837348523._3 | |
1074 | 1074 | let oldPositionLstUpdCPF = $t04837348523._4 | |
1075 | 1075 | let _direction = if ((oldPositionSize > 0)) | |
1076 | 1076 | then DIR_SHORT | |
1077 | 1077 | else DIR_LONG | |
1078 | 1078 | let isAdd = (_direction == DIR_LONG) | |
1079 | 1079 | let exchangedQuoteAssetAmount = getPartialLiquidationAmount(_trader, oldPositionSize) | |
1080 | 1080 | let $t04874848852 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT) | |
1081 | 1081 | let oldPositionNotional = $t04874848852._1 | |
1082 | 1082 | let unrealizedPnl = $t04874848852._2 | |
1083 | 1083 | let $t04886049150 = swapInput(isAdd, exchangedQuoteAssetAmount) | |
1084 | 1084 | let exchangedPositionSize = $t04886049150._1 | |
1085 | 1085 | let quoteAssetReserveAfter = $t04886049150._2 | |
1086 | 1086 | let baseAssetReserveAfter = $t04886049150._3 | |
1087 | 1087 | let totalPositionSizeAfter = $t04886049150._4 | |
1088 | 1088 | let cumulativeNotionalAfter = $t04886049150._5 | |
1089 | 1089 | let realizedPnl = divd(muld(unrealizedPnl, abs(exchangedPositionSize)), abs(oldPositionSize)) | |
1090 | 1090 | let $t04925749490 = calcRemainMarginWithFundingPayment(oldPositionSize, oldPositionMargin, oldPositionLstUpdCPF, realizedPnl) | |
1091 | 1091 | let remainMargin = $t04925749490._1 | |
1092 | 1092 | let badDebt = $t04925749490._2 | |
1093 | 1093 | let fundingPayment = $t04925749490._3 | |
1094 | 1094 | let unrealizedPnlAfter = (unrealizedPnl - realizedPnl) | |
1095 | 1095 | let remainOpenNotional = if ((oldPositionSize > 0)) | |
1096 | 1096 | then ((oldPositionNotional - exchangedQuoteAssetAmount) - unrealizedPnlAfter) | |
1097 | 1097 | else ((unrealizedPnlAfter + oldPositionNotional) - exchangedQuoteAssetAmount) | |
1098 | 1098 | let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio()) | |
1099 | 1099 | let feeToLiquidator = (liquidationPenalty / 2) | |
1100 | 1100 | let feeToInsurance = (liquidationPenalty - feeToLiquidator) | |
1101 | 1101 | let newPositionMargin = (remainMargin - liquidationPenalty) | |
1102 | 1102 | let newPositionSize = (oldPositionSize + exchangedPositionSize) | |
1103 | 1103 | let newPositionOpenNotional = abs(remainOpenNotional) | |
1104 | 1104 | let newPositionLstUpdCPF = latestCumulativePremiumFraction(newPositionSize) | |
1105 | 1105 | let openInterestNotionalAfter = (openInterestNotional() - exchangedQuoteAssetAmount) | |
1106 | 1106 | let ammBalance = (cbalance() - liquidationPenalty) | |
1107 | 1107 | let $t05066350806 = if ((0 > ammBalance)) | |
1108 | 1108 | then $Tuple2(0, abs(ammBalance)) | |
1109 | 1109 | else $Tuple2(ammBalance, 0) | |
1110 | 1110 | let newAmmBalance = $t05066350806._1 | |
1111 | 1111 | let takeFromInsurance = $t05066350806._2 | |
1112 | 1112 | let x = if ((takeFromInsurance > 0)) | |
1113 | 1113 | then { | |
1114 | 1114 | let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil) | |
1115 | 1115 | if ((withdrawInsurance == withdrawInsurance)) | |
1116 | 1116 | then nil | |
1117 | 1117 | else throw("Strict value is not equal to itself.") | |
1118 | 1118 | } | |
1119 | 1119 | else nil | |
1120 | 1120 | if ((x == x)) | |
1121 | 1121 | then { | |
1122 | 1122 | let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(liquidationPenalty - takeFromInsurance), toBase58String(quoteAsset())], nil) | |
1123 | 1123 | if ((unstake == unstake)) | |
1124 | 1124 | then { | |
1125 | 1125 | let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)]) | |
1126 | 1126 | if ((depositInsurance == depositInsurance)) | |
1127 | 1127 | then { | |
1128 | 1128 | let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, newPositionOpenNotional], nil) | |
1129 | 1129 | if ((notifyNotional == notifyNotional)) | |
1130 | 1130 | then (((updatePosition(_trader, newPositionSize, newPositionMargin, newPositionOpenNotional, newPositionLstUpdCPF) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, (totalLongPositionSize() - (if ((newPositionSize > 0)) | |
1131 | 1131 | then abs(exchangedPositionSize) | |
1132 | 1132 | else 0)), (totalShortPositionSize() - (if ((0 > newPositionSize)) | |
1133 | 1133 | then abs(exchangedPositionSize) | |
1134 | 1134 | else 0)))) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance)) | |
1135 | 1135 | else throw("Strict value is not equal to itself.") | |
1136 | 1136 | } | |
1137 | 1137 | else throw("Strict value is not equal to itself.") | |
1138 | 1138 | } | |
1139 | 1139 | else throw("Strict value is not equal to itself.") | |
1140 | 1140 | } | |
1141 | 1141 | else throw("Strict value is not equal to itself.") | |
1142 | 1142 | } | |
1143 | 1143 | else { | |
1144 | 1144 | let $t05226252717 = internalClosePosition(_trader, false) | |
1145 | 1145 | let x1 = $t05226252717._1 | |
1146 | 1146 | let badDebt = $t05226252717._2 | |
1147 | 1147 | let x2 = $t05226252717._3 | |
1148 | 1148 | let x3 = $t05226252717._4 | |
1149 | 1149 | let quoteAssetReserveAfter = $t05226252717._5 | |
1150 | 1150 | let baseAssetReserveAfter = $t05226252717._6 | |
1151 | 1151 | let totalPositionSizeAfter = $t05226252717._7 | |
1152 | 1152 | let cumulativeNotionalAfter = $t05226252717._8 | |
1153 | 1153 | let openInterestNotionalAfter = $t05226252717._9 | |
1154 | 1154 | let exchangedQuoteAssetAmount = $t05226252717._10 | |
1155 | 1155 | let totalLongAfter = $t05226252717._11 | |
1156 | 1156 | let totalShortAfter = $t05226252717._12 | |
1157 | 1157 | let liquidationPenalty = muld(exchangedQuoteAssetAmount, liquidationFeeRatio()) | |
1158 | 1158 | let feeToLiquidator = (liquidationPenalty / 2) | |
1159 | 1159 | let feeToInsurance = (liquidationPenalty - feeToLiquidator) | |
1160 | 1160 | let ammBalance = (cbalance() - liquidationPenalty) | |
1161 | 1161 | let $t05312953272 = if ((0 > ammBalance)) | |
1162 | 1162 | then $Tuple2(0, abs(ammBalance)) | |
1163 | 1163 | else $Tuple2(ammBalance, 0) | |
1164 | 1164 | let newAmmBalance = $t05312953272._1 | |
1165 | 1165 | let takeFromInsurance = $t05312953272._2 | |
1166 | 1166 | let x = if ((takeFromInsurance > 0)) | |
1167 | 1167 | then { | |
1168 | 1168 | let withdrawInsurance = invoke(insuranceAddress(), "withdraw", [takeFromInsurance], nil) | |
1169 | 1169 | if ((withdrawInsurance == withdrawInsurance)) | |
1170 | 1170 | then nil | |
1171 | 1171 | else throw("Strict value is not equal to itself.") | |
1172 | 1172 | } | |
1173 | 1173 | else nil | |
1174 | 1174 | if ((x == x)) | |
1175 | 1175 | then { | |
1176 | 1176 | let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [(liquidationPenalty - takeFromInsurance), toBase58String(quoteAsset())], nil) | |
1177 | 1177 | if ((unstake == unstake)) | |
1178 | 1178 | then { | |
1179 | 1179 | let depositInsurance = invoke(insuranceAddress(), "deposit", nil, [AttachedPayment(quoteAsset(), feeToInsurance)]) | |
1180 | 1180 | if ((depositInsurance == depositInsurance)) | |
1181 | 1181 | then { | |
1182 | 1182 | let notifyNotional = invoke(minerAddress(), "notifyNotional", [_trader, 0], nil) | |
1183 | 1183 | if ((notifyNotional == notifyNotional)) | |
1184 | 1184 | then (((deletePosition(_trader) ++ updateAmm(quoteAssetReserveAfter, baseAssetReserveAfter, totalPositionSizeAfter, cumulativeNotionalAfter, openInterestNotionalAfter, totalLongAfter, totalShortAfter)) ++ withdraw(i.caller, feeToLiquidator)) ++ updateBalance(newAmmBalance)) | |
1185 | 1185 | else throw("Strict value is not equal to itself.") | |
1186 | 1186 | } | |
1187 | 1187 | else throw("Strict value is not equal to itself.") | |
1188 | 1188 | } | |
1189 | 1189 | else throw("Strict value is not equal to itself.") | |
1190 | 1190 | } | |
1191 | 1191 | else throw("Strict value is not equal to itself.") | |
1192 | 1192 | } | |
1193 | 1193 | } | |
1194 | 1194 | ||
1195 | 1195 | ||
1196 | 1196 | ||
1197 | 1197 | @Callable(i) | |
1198 | 1198 | func payFunding () = { | |
1199 | 1199 | let fundingBlockTimestamp = nextFundingBlockTimestamp() | |
1200 | 1200 | if (if (if ((fundingBlockTimestamp > lastBlock.timestamp)) | |
1201 | 1201 | then true | |
1202 | 1202 | else !(initialized())) | |
1203 | 1203 | then true | |
1204 | 1204 | else paused()) | |
1205 | 1205 | then throw(((("Invalid funding block timestamp: " + toString(lastBlock.timestamp)) + " < ") + toString(fundingBlockTimestamp))) | |
1206 | 1206 | else { | |
1207 | 1207 | let underlyingPrice = getOracleTwapPrice() | |
1208 | 1208 | let spotTwapPrice = getTwapSpotPrice() | |
1209 | 1209 | let premium = (spotTwapPrice - underlyingPrice) | |
1210 | 1210 | let $t05486056195 = if (if ((totalShortPositionSize() == 0)) | |
1211 | 1211 | then true | |
1212 | 1212 | else (totalLongPositionSize() == 0)) | |
1213 | 1213 | then $Tuple2(0, 0) | |
1214 | 1214 | else if ((0 > premium)) | |
1215 | 1215 | then { | |
1216 | 1216 | let shortPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY) | |
1217 | 1217 | let longPremiumFraction = divd(muld(shortPremiumFraction, totalShortPositionSize()), totalLongPositionSize()) | |
1218 | 1218 | $Tuple2(shortPremiumFraction, longPremiumFraction) | |
1219 | 1219 | } | |
1220 | 1220 | else { | |
1221 | 1221 | let longPremiumFraction = divd(muld(premium, fundingPeriodDecimal()), ONE_DAY) | |
1222 | 1222 | let shortPremiumFraction = divd(muld(longPremiumFraction, totalLongPositionSize()), totalShortPositionSize()) | |
1223 | 1223 | $Tuple2(shortPremiumFraction, longPremiumFraction) | |
1224 | 1224 | } | |
1225 | 1225 | let shortPremiumFraction = $t05486056195._1 | |
1226 | 1226 | let longPremiumFraction = $t05486056195._2 | |
1227 | 1227 | updateFunding((fundingBlockTimestamp + fundingPeriodSeconds()), (latestLongCumulativePremiumFraction() + longPremiumFraction), (latestShortCumulativePremiumFraction() + shortPremiumFraction), divd(longPremiumFraction, underlyingPrice), divd(shortPremiumFraction, underlyingPrice)) | |
1228 | 1228 | } | |
1229 | 1229 | } | |
1230 | 1230 | ||
1231 | 1231 | ||
1232 | 1232 | ||
1233 | 1233 | @Callable(i) | |
1234 | 1234 | func v_get (_trader) = { | |
1235 | 1235 | let $t05657056630 = internalClosePosition(_trader, false) | |
1236 | 1236 | let x1 = $t05657056630._1 | |
1237 | 1237 | let x2 = $t05657056630._2 | |
1238 | 1238 | let x3 = $t05657056630._3 | |
1239 | 1239 | let x4 = $t05657056630._4 | |
1240 | 1240 | throw((((s(x2) + s(x3)) + s(x4)) + s(getMarginRatio(_trader)))) | |
1241 | 1241 | } | |
1242 | 1242 | ||
1243 | 1243 | ||
1244 | 1244 | ||
1245 | 1245 | @Callable(i) | |
1246 | 1246 | func view_calcRemainMarginWithFundingPayment (_trader) = { | |
1247 | 1247 | let $t05677756888 = getPosition(_trader) | |
1248 | 1248 | let positionSize = $t05677756888._1 | |
1249 | 1249 | let positionMargin = $t05677756888._2 | |
1250 | 1250 | let pon = $t05677756888._3 | |
1251 | 1251 | let positionLstUpdCPF = $t05677756888._4 | |
1252 | 1252 | let $t05689356994 = getPositionNotionalAndUnrealizedPnl(_trader, PNL_OPTION_SPOT) | |
1253 | 1253 | let positionNotional = $t05689356994._1 | |
1254 | 1254 | let unrealizedPnl = $t05689356994._2 | |
1255 | 1255 | let $t05699957181 = calcRemainMarginWithFundingPayment(positionSize, positionMargin, positionLstUpdCPF, unrealizedPnl) | |
1256 | 1256 | let remainMargin = $t05699957181._1 | |
1257 | 1257 | let badDebt = $t05699957181._2 | |
1258 | 1258 | let fundingPayment = $t05699957181._3 | |
1259 | 1259 | throw((((((s(remainMargin) + s(fundingPayment)) + s(getMarginRatio(_trader))) + s(unrealizedPnl)) + s(badDebt)) + s(positionNotional))) | |
1260 | 1260 | } | |
1261 | 1261 | ||
1262 | 1262 | ||
1263 | 1263 | ||
1264 | 1264 | @Callable(i) | |
1265 | 1265 | func forceMoveAsset (_trader,_amount) = if (if ((addressFromPublicKey(adminPublicKey()) != i.caller)) | |
1266 | 1266 | then true | |
1267 | 1267 | else (0 > _amount)) | |
1268 | 1268 | then throw("Invalid forceMoveAsset parameters") | |
1269 | 1269 | else { | |
1270 | 1270 | let unstake = invoke(quoteAssetStaking(), "unlockNeutrino", [_amount, toBase58String(quoteAsset())], nil) | |
1271 | 1271 | if ((unstake == unstake)) | |
1272 | 1272 | then (withdraw(addressFromStringValue(_trader), _amount) ++ updateBalance((cbalance() - _amount))) | |
1273 | 1273 | else throw("Strict value is not equal to itself.") | |
1274 | 1274 | } | |
1275 | 1275 | ||
1276 | 1276 | ||
1277 | 1277 | @Verifier(tx) | |
1278 | 1278 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], adminPublicKey()) | |
1279 | 1279 |
github/deemru/w8io/026f985 82.25 ms ◑