1// SPDX-License-Identifier: UNLICENSED
2pragma solidity ^0.8.0;
3
4contract TakeProfitsHook is BaseHook, ERC1155 {
5    using StateLibrary for IPoolManager;
6    using PoolIdLibrary for PoolKey;
7    using CurrencyLibrary for Currency;
8    using FixedPointMathLib for uint256;
9
10    // Storage
11    mapping(PoolId poolId => int24 lastTick) public lastTicks;
12    mapping(PoolId poolId => mapping(int24 tickToSellAt => mapping(bool zeroForOne => uint256 inputAmount)))
13    public pendingOrders;
14
15    mapping(uint256 positionId => uint256 outputClaimable)
16    public claimableOutputTokens;
17    mapping(uint256 positionId => uint256 claimsSupply)
18    public claimTokensSupply;
19
20    // Errors
21    error InvalidOrder();
22    error NothingToClaim();
23    error NotEnoughToClaim();
24
25    // Constructor
26    constructor(
27        IPoolManager _manager,
28        string memory _uri
29    ) BaseHook(_manager) ERC1155(_uri) {}
30
31    // BaseHook Functions
32    function getHookPermissions()
33    public
34    pure
35    override
36    returns (Hooks.Permissions memory)
37    {
38        return
39            Hooks.Permissions({
40            beforeInitialize: false,
41            afterInitialize: true,
42            beforeAddLiquidity: false,
43            afterAddLiquidity: false,
44            beforeRemoveLiquidity: false,
45            afterRemoveLiquidity: false,
46            beforeSwap: false,
47            afterSwap: true,
48            beforeDonate: false,
49            afterDonate: false,
50            beforeSwapReturnDelta: false,
51            afterSwapReturnDelta: false,
52            afterAddLiquidityReturnDelta: false,
53            afterRemoveLiquidityReturnDelta: false
54        });
55    }
56
57    function afterInitialize(
58        address,
59        PoolKey calldata key,
60        uint160,
61        int24 tick,
62        bytes calldata
63    ) external override onlyByPoolManager returns (bytes4) {
64        lastTicks[key.toId()] = tick;
65        return this.afterInitialize.selector;
66    }
67
68    function afterSwap(
69        address sender,
70        PoolKey calldata key,
71        IPoolManager.SwapParams calldata params,
72        BalanceDelta,
73        bytes calldata
74    ) external override onlyByPoolManager returns (bytes4, int128) {
75        // `sender` is the address which initiated the swap
76        // if `sender` is the hook, we don't want to go down the `afterSwap`
77        // rabbit hole again
78        if (sender == address(this)) return (this.afterSwap.selector, 0);
79
80        // Should we try to find and execute orders? True initially
81        bool tryMore = true;
82        int24 currentTick;
83
84        while (tryMore) {
85            // Try executing pending orders for this pool
86
87            // `tryMore` is true if we successfully found and executed an order
88            // which shifted the tick value
89            // and therefore we need to look again if there are any pending orders
90            // within the new tick range
91
92            // `tickAfterExecutingOrder` is the tick value of the pool
93            // after executing an order
94            // if no order was executed, `tickAfterExecutingOrder` will be
95            // the same as current tick, and `tryMore` will be false
96            (tryMore, currentTick) = tryExecutingOrders(
97                key,
98                !params.zeroForOne
99            );
100        }
101
102        // New last known tick for this pool is the tick value
103        // after our orders are executed
104        lastTicks[key.toId()] = currentTick;
105        return (this.afterSwap.selector, 0);
106    }
107
108    // Core Hook External Functions
109    function placeOrder(
110        PoolKey calldata key,
111        int24 tickToSellAt,
112        bool zeroForOne,
113        uint256 inputAmount
114    ) external returns (int24) {
115        // Get lower actually usable tick given `tickToSellAt`
116        int24 tick = getLowerUsableTick(tickToSellAt, key.tickSpacing);
117        // Create a pending order
118        pendingOrders[key.toId()][tick][zeroForOne] += inputAmount;
119
120        // Mint claim tokens to user equal to their `inputAmount`
121        uint256 positionId = getPositionId(key, tick, zeroForOne);
122        claimTokensSupply[positionId] += inputAmount;
123        _mint(msg.sender, positionId, inputAmount, "");
124
125        // Depending on direction of swap, we select the proper input token
126        // and request a transfer of those tokens to the hook contract
127        address sellToken = zeroForOne
128            ? Currency.unwrap(key.currency0)
129            : Currency.unwrap(key.currency1);
130        IERC20(sellToken).transferFrom(msg.sender, address(this), inputAmount);
131
132        // Return the tick at which the order was actually placed
133        return tick;
134    }
135
136    function cancelOrder(
137        PoolKey calldata key,
138        int24 tickToSellAt,
139        bool zeroForOne
140    ) external {
141        // Get lower actually usable tick for their order
142        int24 tick = getLowerUsableTick(tickToSellAt, key.tickSpacing);
143        uint256 positionId = getPositionId(key, tick, zeroForOne);
144
145        // Check how many claim tokens they have for this position
146        uint256 positionTokens = balanceOf(msg.sender, positionId);
147        if (positionTokens == 0) revert InvalidOrder();
148
149        // Remove their `positionTokens` worth of position from pending orders
150        // NOTE: We don't want to zero this out directly because other users may have the same position
151        pendingOrders[key.toId()][tick][zeroForOne] -= positionTokens;
152        // Reduce claim token total supply and burn their share
153        claimTokensSupply[positionId] -= positionTokens;
154        _burn(msg.sender, positionId, positionTokens);
155
156        // Send them their input token
157        Currency token = zeroForOne ? key.currency0 : key.currency1;
158        token.transfer(msg.sender, positionTokens);
159    }
160
161    function redeem(
162        PoolKey calldata key,
163        int24 tickToSellAt,
164        bool zeroForOne,
165        uint256 inputAmountToClaimFor
166    ) external {
167        // Get lower actually usable tick for their order
168        int24 tick = getLowerUsableTick(tickToSellAt, key.tickSpacing);
169        uint256 positionId = getPositionId(key, tick, zeroForOne);
170
171        // If no output tokens can be claimed yepositionIdt i.e. order hasn't been filled
172        // throw error
173        if (claimableOutputTokens[] == 0) revert NothingToClaim();
174
175        // they must have claim tokens >= inputAmountToClaimFor
176        uint256 positionTokens = balanceOf(msg.sender, positionId);
177        if (positionTokens < inputAmountToClaimFor) revert NotEnoughToClaim();
178
179        uint256 totalClaimableForPosition = claimableOutputTokens[positionId];
180        uint256 totalInputAmountForPosition = claimTokensSupply[positionId];
181
182        // outputAmount = (inputAmountToClaimFor * totalClaimableForPosition) / (totalInputAmountForPosition)
183        uint256 outputAmount = inputAmountToClaimFor.mulDivDown(
184            totalClaimableForPosition,
185            totalInputAmountForPosition
186        );
187
188        // Reduce claimable output tokens amount
189        // Reduce claim token total supply for position
190        // Burn claim tokens
191        claimableOutputTokens[positionId] -= outputAmount;
192        claimTokensSupply[positionId] -= inputAmountToClaimFor;
193        _burn(msg.sender, positionId, inputAmountToClaimFor);
194
195        // Transfer output tokens
196        Currency token = zeroForOne ? key.currency1 : key.currency0;
197
198        // 토큰 반환 안함
199        token.transfer(msg.sender, outputAmount);
200    }
201
202    // Internal Functions
203    function tryExecutingOrders(
204        PoolKey calldata key,
205        bool executeZeroForOne
206    ) internal returns (bool tryMore, int24 newTick) {
207        (, int24 currentTick, ,) = poolManager.getSlot0(key.toId());
208        int24 lastTick = lastTicks[key.toId()];
209
210        // Given `currentTick` and `lastTick`, 2 cases are possible:
211
212        // Case (1) - Tick has increased, i.e. `currentTick > lastTick`
213        // or, Case (2) - Tick has decreased, i.e. `currentTick < lastTick`
214
215        // If tick increases => Token 0 price has increased
216        // => We should check if we have orders looking to sell Token 0
217        // i.e. orders with zeroForOne = true
218
219        // ------------
220        // Case (1)
221        // ------------
222
223        // Tick has increased i.e. people bought Token 0 by selling Token 1
224        // i.e. Token 0 price has increased
225        // e.g. in an ETH/USDC pool, people are buying ETH for USDC causing ETH price to increase
226        // We should check if we have any orders looking to sell Token 0
227        // at ticks `lastTick` to `currentTick`
228        // i.e. check if we have any orders to sell ETH at the new price that ETH is at now because of the increase
229        if (currentTick > lastTick) {
230            // Loop over all ticks from `lastTick` to `currentTick`
231            // and execute orders that are looking to sell Token 0
232            for (
233                int24 tick = lastTick;
234                tick < currentTick;
235                tick += key.tickSpacing
236            ) {
237                uint256 inputAmount = pendingOrders[key.toId()][tick][
238                            executeZeroForOne
239                    ];
240                if (inputAmount > 0) {
241                    // An order with these parameters can be placed by one or more users
242                    // We execute the full order as a single swap
243                    // Regardless of how many unique users placed the same order
244                    executeOrder(key, tick, executeZeroForOne, inputAmount);
245
246                    // Return true because we may have more orders to execute
247                    // from lastTick to new current tick
248                    // But we need to iterate again from scratch since our sale of ETH shifted the tick down
249                    return (true, currentTick);
250                }
251            }
252        }
253            // ------------
254            // Case (2)
255            // ------------
256            // Tick has gone down i.e. people bought Token 1 by selling Token 0
257            // i.e. Token 1 price has increased
258            // e.g. in an ETH/USDC pool, people are selling ETH for USDC causing ETH price to decrease (and USDC to increase)
259            // We should check if we have any orders looking to sell Token 1
260            // at ticks `currentTick` to `lastTick`
261            // i.e. check if we have any orders to buy ETH at the new price that ETH is at now because of the decrease
262        else {
263            for (
264                int24 tick = lastTick;
265                tick > currentTick;
266                tick -= key.tickSpacing
267            ) {
268                uint256 inputAmount = pendingOrders[key.toId()][tick][
269                            executeZeroForOne
270                    ];
271                if (inputAmount > 0) {
272                    executeOrder(key, tick, executeZeroForOne, inputAmount);
273                    return (true, currentTick);
274                }
275            }
276        }
277
278        return (false, currentTick);
279    }
280
281    function executeOrder(
282        PoolKey calldata key,
283        int24 tick,
284        bool zeroForOne,
285        uint256 inputAmount
286    ) internal {
287        // Do the actual swap and settle all balances
288        BalanceDelta delta = swapAndSettleBalances(
289            key,
290            IPoolManager.SwapParams({
291                zeroForOne: zeroForOne,
292            // We provide a negative value here to signify an "exact input for output" swap
293                amountSpecified: - int256(inputAmount),
294            // No slippage limits (maximum slippage possible)
295                sqrtPriceLimitX96: zeroForOne
296                ? TickMath.MIN_SQRT_PRICE + 1
297                : TickMath.MAX_SQRT_PRICE - 1
298            })
299        );
300
301        // `inputAmount` has been deducted from this position
302        pendingOrders[key.toId()][tick][zeroForOne] -= inputAmount;
303        uint256 positionId = getPositionId(key, tick, zeroForOne);
304        uint256 outputAmount = zeroForOne
305            ? uint256(int256(delta.amount1()))
306            : uint256(int256(delta.amount0()));
307
308        // `outputAmount` worth of tokens now can be claimed/redeemed by position holders
309        claimableOutputTokens[positionId] += outputAmount;
310    }
311
312    function swapAndSettleBalances(
313        PoolKey calldata key,
314        IPoolManager.SwapParams memory params
315    ) internal returns (BalanceDelta) {
316        // Conduct the swap inside the Pool Manager
317        BalanceDelta delta = poolManager.swap(key, params, "");
318
319        // If we just did a zeroForOne swap
320        // We need to send Token 0 to PM, and receive Token 1 from PM
321        if (params.zeroForOne) {
322            // Negative Value => Money leaving user's wallet
323            // Settle with PoolManager
324            if (delta.amount0() < 0) {
325                _settle(key.currency0, uint128(- delta.amount0()));
326            }
327
328            // Positive Value => Money coming into user's wallet
329            // Take from PM
330            if (delta.amount1() > 0) {
331                _take(key.currency1, uint128(delta.amount1()));
332            }
333        } else {
334            if (delta.amount1() < 0) {
335                _settle(key.currency1, uint128(- delta.amount1()));
336            }
337
338            if (delta.amount0() > 0) {
339                _take(key.currency0, uint128(delta.amount0()));
340            }
341        }
342
343        return delta;
344    }
345
346    function _settle(Currency currency, uint128 amount) internal {
347        // Transfer tokens to PM and let it know
348        poolManager.sync(currency);
349        currency.transfer(address(poolManager), amount);
350        poolManager.settle();
351    }
352
353    function _take(Currency currency, uint128 amount) internal {
354        // Take tokens out of PM to our hook contract
355        poolManager.take(currency, address(this), amount);
356    }
357
358    // Helper Functions
359    function getPositionId(
360        PoolKey calldata key,
361        int24 tick,
362        bool zeroForOne
363    ) public pure returns (uint256) {
364        return uint256(keccak256(abi.encode(key.toId(), tick, zeroForOne)));
365    }
366
367    function getLowerUsableTick(
368        int24 tick,
369        int24 tickSpacing
370    ) private pure returns (int24) {
371        // E.g. tickSpacing = 60, tick = -100
372        // closest usable tick rounded-down will be -120
373
374        // intervals = -100/60 = -1 (integer division)
375        int24 intervals = tick / tickSpacing;
376
377        // since tick < 0, we round `intervals` down to -2
378        // if tick > 0, `intervals` is fine as it is
379        if (tick < 0 && tick % tickSpacing != 0) intervals--; // round towards negative infinity
380
381        // actual usable tick, then, is intervals * tickSpacing
382        // i.e. -2 * 60 = -120
383        return intervals * tickSpacing;
384    }
385}
🔍

Trace Log

1  [519658] PoolManagerTest::test_addLiquidity_6909()
2    ├─ [0] VM::startPrank(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea])
3    │   └─ ← [Return] 
4    ├─ [253185] PoolModifyLiquidityTest::modifyLiquidity(PoolKey({ currency0: 0x0197481B0F5237eF312a78528e79667D8b33Dcff, currency1: 0xA56569Bd93dc4b9afCc871e251017dB0543920d4, fee: 0, tickSpacing: 60, hooks: 0x88682fD7Ca25f904a641CF8ae732682544668547 }), ModifyLiquidityParams({ tickLower: -120, tickUpper: 120, liquidityDelta: 1000000000000000000 [1e18], salt: 0x0000000000000000000000000000000000000000000000000000000000000000 }), 0x)
5    │   ├─ [247552] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::unlock(0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea0000000000000000000000000197481b0f5237ef312a78528e79667d8b33dcff000000000000000000000000a56569bd93dc4b9afcc871e251017db0543920d40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000088682fd7ca25f904a641cf8ae732682544668547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8800000000000000000000000000000000000000000000000000000000000000780000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
6    │   │   ├─ [245508] PoolModifyLiquidityTest::unlockCallback(0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea0000000000000000000000000197481b0f5237ef312a78528e79667d8b33dcff000000000000000000000000a56569bd93dc4b9afcc871e251017db0543920d40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000088682fd7ca25f904a641cf8ae732682544668547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8800000000000000000000000000000000000000000000000000000000000000780000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000)
7    │   │   │   ├─ [6952] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::extsload(0x563687f350af9fe66a17f3aefcc78a6481c0fc6bcd81c4d9aa4e9a9b0dc963e4, 3) [staticcall]
8    │   │   │   │   └─ ← [Return] [0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000]
9    │   │   │   ├─ [169424] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::modifyLiquidity(PoolKey({ currency0: 0x0197481B0F5237eF312a78528e79667D8b33Dcff, currency1: 0xA56569Bd93dc4b9afCc871e251017dB0543920d4, fee: 0, tickSpacing: 60, hooks: 0x88682fD7Ca25f904a641CF8ae732682544668547 }), ModifyLiquidityParams({ tickLower: -120, tickUpper: 120, liquidityDelta: 1000000000000000000 [1e18], salt: 0x0000000000000000000000000000000000000000000000000000000000000000 }), 0x)
10    │   │   │   │   ├─ emit ModifyLiquidity(id: 0xc17823bb110a59bf32750a88db94406a67d9c82965eb6de56d9eac3291e5ce31, sender: PoolModifyLiquidityTest: [0xF62849F9A0B5Bf2913b396098F7c7019b51A820a], tickLower: -120, tickUpper: 120, liquidityDelta: 1000000000000000000 [1e18], salt: 0x0000000000000000000000000000000000000000000000000000000000000000)
11    │   │   │   │   ├─ [5855] 0x88682fD7Ca25f904a641CF8ae732682544668547::afterAddLiquidity(PoolModifyLiquidityTest: [0xF62849F9A0B5Bf2913b396098F7c7019b51A820a], PoolKey({ currency0: 0x0197481B0F5237eF312a78528e79667D8b33Dcff, currency1: 0xA56569Bd93dc4b9afCc871e251017dB0543920d4, fee: 0, tickSpacing: 60, hooks: 0x88682fD7Ca25f904a641CF8ae732682544668547 }), ModifyLiquidityParams({ tickLower: -120, tickUpper: 120, liquidityDelta: 1000000000000000000 [1e18], salt: 0x0000000000000000000000000000000000000000000000000000000000000000 }), -2035479883446581533224907605465454963212891366507597535 [-2.035e54], 0, 0x)
12    │   │   │   │   │   └─ ← [Return] 0x9f063efc, 0
13    │   │   │   │   └─ ← [Return] -2035479883446581533224907605465454963212891366507597535 [-2.035e54], 0
14    │   │   │   ├─ [952] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::extsload(0x563687f350af9fe66a17f3aefcc78a6481c0fc6bcd81c4d9aa4e9a9b0dc963e4, 3) [staticcall]
15    │   │   │   │   └─ ← [Return] [0x0000000000000000000000000000000000000000000000000de0b6b3a7640000, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000]
16    │   │   │   ├─ [2562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea]) [staticcall]
17    │   │   │   │   └─ ← [Return] 170141183460469231731687303715884105727 [1.701e38]
18    │   │   │   ├─ [2562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
19    │   │   │   │   └─ ← [Return] 500000000000000000000 [5e20]
20    │   │   │   ├─ [859] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::exttload(0xe9bbdd480cc4f8e0ff1dffa1cba3e1d00031f59ea1d46b95a90d23fd4f5f36b7) [staticcall]
21    │   │   │   │   └─ ← [Return] 0xffffffffffffffffffffffffffffffffffffffffffffffffffeabfa425a53121
22    │   │   │   ├─ [2562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea]) [staticcall]
23    │   │   │   │   └─ ← [Return] 170141183460469231731687303715884105727 [1.701e38]
24    │   │   │   ├─ [2562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
25    │   │   │   │   └─ ← [Return] 500000000000000000000 [5e20]
26    │   │   │   ├─ [859] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::exttload(0x254b95891fa5a0dc1ce9956b3482fb17c5827b519d21a41ff0a3a384174a9ba0) [staticcall]
27    │   │   │   │   └─ ← [Return] 0xffffffffffffffffffffffffffffffffffffffffffffffffffeabfa425a53121
28    │   │   │   ├─ [2057] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::sync(0x0197481B0F5237eF312a78528e79667D8b33Dcff)
29    │   │   │   │   ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
30    │   │   │   │   │   └─ ← [Return] 500000000000000000000 [5e20]
31    │   │   │   │   └─ ← [Stop] 
32    │   │   │   ├─ [14566] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::transferFrom(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, 5981737760509663 [5.981e15])
33    │   │   │   │   ├─ emit Transfer(from: Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], to: 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, amount: 5981737760509663 [5.981e15])
34    │   │   │   │   └─ ← [Return] true
35    │   │   │   ├─ [2539] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::settle()
36    │   │   │   │   ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
37    │   │   │   │   │   └─ ← [Return] 500005981737760509663 [5e20]
38    │   │   │   │   └─ ← [Return] 5981737760509663 [5.981e15]
39    │   │   │   ├─ [2057] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::sync(0xA56569Bd93dc4b9afCc871e251017dB0543920d4)
40    │   │   │   │   ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
41    │   │   │   │   │   └─ ← [Return] 500000000000000000000 [5e20]
42    │   │   │   │   └─ ← [Stop] 
43    │   │   │   ├─ [14566] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::transferFrom(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, 5981737760509663 [5.981e15])
44    │   │   │   │   ├─ emit Transfer(from: Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], to: 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, amount: 5981737760509663 [5.981e15])
45    │   │   │   │   └─ ← [Return] true
46    │   │   │   ├─ [2539] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::settle()
47    │   │   │   │   ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
48    │   │   │   │   │   └─ ← [Return] 500005981737760509663 [5e20]
49    │   │   │   │   └─ ← [Return] 5981737760509663 [5.981e15]
50    │   │   │   └─ ← [Return] 0xffffffffffffffffffeabfa425a53121ffffffffffffffffffeabfa425a53121
51    │   │   └─ ← [Return] 0xffffffffffffffffffeabfa425a53121ffffffffffffffffffeabfa425a53121
52    │   └─ ← [Return] -2035479883446581533224907605465454963212891366507597535 [-2.035e54]
53    ├─ [46237] PoolClaimsTest::deposit(0x0197481B0F5237eF312a78528e79667D8b33Dcff, Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 100000000000000000000 [1e20])
54    │   ├─ [44640] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::unlock(0x000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea0000000000000000000000000197481b0f5237ef312a78528e79667d8b33dcff0000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000001)
55    │   │   ├─ [42657] PoolClaimsTest::unlockCallback(0x000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea0000000000000000000000000197481b0f5237ef312a78528e79667d8b33dcff0000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000001)
56    │   │   │   ├─ [26038] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::mint(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 9082684588378279984150852051540105410796313855 [9.082e45], 100000000000000000000 [1e20])
57    │   │   │   │   ├─ emit Transfer(caller: PoolClaimsTest: [0x1d1499e622D69689cdf9004d05Ec547d650Ff211], from: 0x0000000000000000000000000000000000000000, to: Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], id: 9082684588378279984150852051540105410796313855 [9.082e45], amount: 100000000000000000000 [1e20])
58    │   │   │   │   └─ ← [Stop] 
59    │   │   │   ├─ [2057] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::sync(0x0197481B0F5237eF312a78528e79667D8b33Dcff)
60    │   │   │   │   ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
61    │   │   │   │   │   └─ ← [Return] 500005981737760509663 [5e20]
62    │   │   │   │   └─ ← [Stop] 
63    │   │   │   ├─ [8966] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::transferFrom(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, 100000000000000000000 [1e20])
64    │   │   │   │   ├─ emit Transfer(from: Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], to: 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, amount: 100000000000000000000 [1e20])
65    │   │   │   │   └─ ← [Return] true
66    │   │   │   ├─ [2539] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::settle()
67    │   │   │   │   ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
68    │   │   │   │   │   └─ ← [Return] 600005981737760509663 [6e20]
69    │   │   │   │   └─ ← [Return] 100000000000000000000 [1e20]
70    │   │   │   └─ ← [Return] 0x0000000000000000000000000000000000000000000000000000000000000000
71    │   │   └─ ← [Return] 0x0000000000000000000000000000000000000000000000000000000000000000
72    │   └─ ← [Stop] 
73    ├─ [46237] PoolClaimsTest::deposit(0xA56569Bd93dc4b9afCc871e251017dB0543920d4, Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 100000000000000000000 [1e20])
74    │   ├─ [44640] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::unlock(0x000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea000000000000000000000000a56569bd93dc4b9afcc871e251017db0543920d40000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000001)
75    │   │   ├─ [42657] PoolClaimsTest::unlockCallback(0x000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea000000000000000000000000a56569bd93dc4b9afcc871e251017db0543920d40000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000000001)
76    │   │   │   ├─ [26038] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::mint(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 944245063750915651468381479377694670431870066900 [9.442e47], 100000000000000000000 [1e20])
77    │   │   │   │   ├─ emit Transfer(caller: PoolClaimsTest: [0x1d1499e622D69689cdf9004d05Ec547d650Ff211], from: 0x0000000000000000000000000000000000000000, to: Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], id: 944245063750915651468381479377694670431870066900 [9.442e47], amount: 100000000000000000000 [1e20])
78    │   │   │   │   └─ ← [Stop] 
79    │   │   │   ├─ [2057] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::sync(0xA56569Bd93dc4b9afCc871e251017dB0543920d4)
80    │   │   │   │   ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
81    │   │   │   │   │   └─ ← [Return] 500005981737760509663 [5e20]
82    │   │   │   │   └─ ← [Stop] 
83    │   │   │   ├─ [8966] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::transferFrom(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, 100000000000000000000 [1e20])
84    │   │   │   │   ├─ emit Transfer(from: Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], to: 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, amount: 100000000000000000000 [1e20])
85    │   │   │   │   └─ ← [Return] true
86    │   │   │   ├─ [2539] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::settle()
87    │   │   │   │   ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
88    │   │   │   │   │   └─ ← [Return] 600005981737760509663 [6e20]
89    │   │   │   │   └─ ← [Return] 100000000000000000000 [1e20]
90    │   │   │   └─ ← [Return] 0x0000000000000000000000000000000000000000000000000000000000000000
91    │   │   └─ ← [Return] 0x0000000000000000000000000000000000000000000000000000000000000000
92    │   └─ ← [Stop] 
93    ├─ [441] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 9082684588378279984150852051540105410796313855 [9.082e45]) [staticcall]
94    │   └─ ← [Return] 100000000000000000000 [1e20]
95    ├─ [0] VM::assertEq(100000000000000000000 [1e20], 100000000000000000000 [1e20]) [staticcall]
96    │   └─ ← [Return] 
97    ├─ [441] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 944245063750915651468381479377694670431870066900 [9.442e47]) [staticcall]
98    │   └─ ← [Return] 100000000000000000000 [1e20]
99    ├─ [0] VM::assertEq(100000000000000000000 [1e20], 100000000000000000000 [1e20]) [staticcall]
100    │   └─ ← [Return] 
101    ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea]) [staticcall]
102    │   └─ ← [Return] 170141183460469231631681321978123596064 [1.701e38]
103    ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea]) [staticcall]
104    │   └─ ← [Return] 170141183460469231631681321978123596064 [1.701e38]
105    ├─ [24614] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::setOperator(PoolModifyLiquidityTest: [0xF62849F9A0B5Bf2913b396098F7c7019b51A820a], true)
106    │   ├─ emit OperatorSet(owner: Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], operator: PoolModifyLiquidityTest: [0xF62849F9A0B5Bf2913b396098F7c7019b51A820a], approved: true)
107    │   └─ ← [Return] true
108    ├─ [106069] PoolModifyLiquidityTest::modifyLiquidity(PoolKey({ currency0: 0x0197481B0F5237eF312a78528e79667D8b33Dcff, currency1: 0xA56569Bd93dc4b9afCc871e251017dB0543920d4, fee: 0, tickSpacing: 60, hooks: 0x88682fD7Ca25f904a641CF8ae732682544668547 }), ModifyLiquidityParams({ tickLower: -120, tickUpper: 120, liquidityDelta: 1000000000000000000 [1e18], salt: 0x0000000000000000000000000000000000000000000000000000000000000000 }), 0x, true, true)
109    │   ├─ [103492] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::unlock(0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea0000000000000000000000000197481b0f5237ef312a78528e79667d8b33dcff000000000000000000000000a56569bd93dc4b9afcc871e251017db0543920d40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000088682fd7ca25f904a641cf8ae732682544668547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8800000000000000000000000000000000000000000000000000000000000000780000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000)
110    │   │   ├─ [102267] PoolModifyLiquidityTest::unlockCallback(0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000bf0b5a4099f0bf6c8bc4252ebec548bae95602ea0000000000000000000000000197481b0f5237ef312a78528e79667d8b33dcff000000000000000000000000a56569bd93dc4b9afcc871e251017db0543920d40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000088682fd7ca25f904a641cf8ae732682544668547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8800000000000000000000000000000000000000000000000000000000000000780000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000)
111    │   │   │   ├─ [952] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::extsload(0x563687f350af9fe66a17f3aefcc78a6481c0fc6bcd81c4d9aa4e9a9b0dc963e4, 3) [staticcall]
112    │   │   │   │   └─ ← [Return] [0x0000000000000000000000000000000000000000000000000de0b6b3a7640000, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000]
113    │   │   │   ├─ [83959] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::modifyLiquidity(PoolKey({ currency0: 0x0197481B0F5237eF312a78528e79667D8b33Dcff, currency1: 0xA56569Bd93dc4b9afCc871e251017dB0543920d4, fee: 0, tickSpacing: 60, hooks: 0x88682fD7Ca25f904a641CF8ae732682544668547 }), ModifyLiquidityParams({ tickLower: -120, tickUpper: 120, liquidityDelta: 1000000000000000000 [1e18], salt: 0x0000000000000000000000000000000000000000000000000000000000000000 }), 0x)
114    │   │   │   │   ├─ emit ModifyLiquidity(id: 0xc17823bb110a59bf32750a88db94406a67d9c82965eb6de56d9eac3291e5ce31, sender: PoolModifyLiquidityTest: [0xF62849F9A0B5Bf2913b396098F7c7019b51A820a], tickLower: -120, tickUpper: 120, liquidityDelta: 1000000000000000000 [1e18], salt: 0x0000000000000000000000000000000000000000000000000000000000000000)
115    │   │   │   │   ├─ [66559] 0x88682fD7Ca25f904a641CF8ae732682544668547::afterAddLiquidity(PoolModifyLiquidityTest: [0xF62849F9A0B5Bf2913b396098F7c7019b51A820a], PoolKey({ currency0: 0x0197481B0F5237eF312a78528e79667D8b33Dcff, currency1: 0xA56569Bd93dc4b9afCc871e251017dB0543920d4, fee: 0, tickSpacing: 60, hooks: 0x88682fD7Ca25f904a641CF8ae732682544668547 }), ModifyLiquidityParams({ tickLower: -120, tickUpper: 120, liquidityDelta: 1000000000000000000 [1e18], salt: 0x0000000000000000000000000000000000000000000000000000000000000000 }), -2035479883446581533224907605465454963212891366507597535 [-2.035e54], 0, 0x)
116    │   │   │   │   │   ├─ [814] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::allowance(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], PoolModifyLiquidityTest: [0xF62849F9A0B5Bf2913b396098F7c7019b51A820a]) [staticcall]
117    │   │   │   │   │   │   └─ ← [Return] 170141183460469231731681321978123596064 [1.701e38]
118    │   │   │   │   │   ├─ [814] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::allowance(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], PoolModifyLiquidityTest: [0xF62849F9A0B5Bf2913b396098F7c7019b51A820a]) [staticcall]
119    │   │   │   │   │   │   └─ ← [Return] 170141183460469231731681321978123596064 [1.701e38]
120    │   │   │   │   │   ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea]) [staticcall]
121    │   │   │   │   │   │   └─ ← [Return] 170141183460469231631681321978123596064 [1.701e38]
122    │   │   │   │   │   ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea]) [staticcall]
123    │   │   │   │   │   │   └─ ← [Return] 170141183460469231631681321978123596064 [1.701e38]
124    │   │   │   │   │   ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea]) [staticcall]
125    │   │   │   │   │   │   └─ ← [Return] 170141183460469231631681321978123596064 [1.701e38]
126    │   │   │   │   │   ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea]) [staticcall]
127    │   │   │   │   │   │   └─ ← [Return] 170141183460469231631681321978123596064 [1.701e38]
128    │   │   │   │   │   ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
129    │   │   │   │   │   │   └─ ← [Return] 600005981737760509663 [6e20]
130    │   │   │   │   │   ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
131    │   │   │   │   │   │   └─ ← [Return] 600005981737760509663 [6e20]
132    │   │   │   │   │   ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
133    │   │   │   │   │   │   └─ ← [Return] 600005981737760509663 [6e20]
134    │   │   │   │   │   ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
135    │   │   │   │   │   │   └─ ← [Return] 600005981737760509663 [6e20]
136    │   │   │   │   │   ├─ [26779] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::take(0x0197481B0F5237eF312a78528e79667D8b33Dcff, 0x88682fD7Ca25f904a641CF8ae732682544668547, 600000000000000000000 [6e20])
137    │   │   │   │   │   │   ├─ [25188] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::transfer(0x88682fD7Ca25f904a641CF8ae732682544668547, 600000000000000000000 [6e20])
138    │   │   │   │   │   │   │   ├─ emit Transfer(from: 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, to: 0x88682fD7Ca25f904a641CF8ae732682544668547, amount: 600000000000000000000 [6e20])
139    │   │   │   │   │   │   │   └─ ← [Return] true
140    │   │   │   │   │   │   └─ ← [Stop] 
141    │   │   │   │   │   ├─ [26779] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::take(0xA56569Bd93dc4b9afCc871e251017dB0543920d4, 0x88682fD7Ca25f904a641CF8ae732682544668547, 600000000000000000000 [6e20])
142    │   │   │   │   │   │   ├─ [25188] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::transfer(0x88682fD7Ca25f904a641CF8ae732682544668547, 600000000000000000000 [6e20])
143    │   │   │   │   │   │   │   ├─ emit Transfer(from: 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967, to: 0x88682fD7Ca25f904a641CF8ae732682544668547, amount: 600000000000000000000 [6e20])
144    │   │   │   │   │   │   │   └─ ← [Return] true
145    │   │   │   │   │   │   └─ ← [Stop] 
146    │   │   │   │   │   └─ ← [Return] 0x9f063efc, 204169420152563078078024764459060926874200000000000000000000 [2.041e59]
147    │   │   │   │   └─ ← [Return] -204171455632446524659557989366666392329163212891366507597535 [-2.041e59], 0
148    │   │   │   ├─ [952] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::extsload(0x563687f350af9fe66a17f3aefcc78a6481c0fc6bcd81c4d9aa4e9a9b0dc963e4, 3) [staticcall]
149    │   │   │   │   └─ ← [Return] [0x0000000000000000000000000000000000000000000000001bc16d674ec80000, 0x0000000000000000000000000000000000000000000000000000000000000000, 0x0000000000000000000000000000000000000000000000000000000000000000]
150    │   │   │   ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea]) [staticcall]
151    │   │   │   │   └─ ← [Return] 170141183460469231631681321978123596064 [1.701e38]
152    │   │   │   ├─ [562] 0x0197481B0F5237eF312a78528e79667D8b33Dcff::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
153    │   │   │   │   └─ ← [Return] 5981737760509663 [5.981e15]
154    │   │   │   ├─ [859] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::exttload(0xe9bbdd480cc4f8e0ff1dffa1cba3e1d00031f59ea1d46b95a90d23fd4f5f36b7) [staticcall]
155    │   │   │   │   └─ ← [Return] 0xffffffffffffffffffffffffffffffffffffffffffffffdf793e8a93d3453121
156    │   │   │   ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea]) [staticcall]
157    │   │   │   │   └─ ← [Return] 170141183460469231631681321978123596064 [1.701e38]
158    │   │   │   ├─ [562] 0xA56569Bd93dc4b9afCc871e251017dB0543920d4::balanceOf(0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967) [staticcall]
159    │   │   │   │   └─ ← [Return] 5981737760509663 [5.981e15]
160    │   │   │   ├─ [859] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::exttload(0x254b95891fa5a0dc1ce9956b3482fb17c5827b519d21a41ff0a3a384174a9ba0) [staticcall]
161    │   │   │   │   └─ ← [Return] 0xffffffffffffffffffffffffffffffffffffffffffffffdf793e8a93d3453121
162    │   │   │   ├─ [2412] 0x38EB8B22Df3Ae7fb21e92881151B365Df14ba967::burn(Alice: [0xBf0b5A4099F0bf6c8bC4252eBeC548Bae95602Ea], 9082684588378279984150852051540105410796313855 [9.082e45], 600005981737760509663 [6e20])
163    │   │   │   │   └─ ← [Revert] panic: arithmetic underflow or overflow (0x11)
164    │   │   │   └─ ← [Revert] panic: arithmetic underflow or overflow (0x11)
165    │   │   └─ ← [Revert] panic: arithmetic underflow or overflow (0x11)
166    │   └─ ← [Revert] panic: arithmetic underflow or overflow (0x11)
167    └─ ← [Revert] panic: arithmetic underflow or overflow (0x11)
PoolKey

Currency0

0x0000000000000000000000000000000000000000

Currency1

0xdAC17F958D2ee523a2206206994597C13D831ec7

Fee

3000

TickSpacing

60

Hooks

0x6da8f09885Bb7aaD2d45476179DbC75573984080

Token Price

Real Price

1.4

Expected Price

1.4 (100.00%)

Oracle Price

2.1 (150.00%)

Amount0/1 Delta Summary
Amount0/1 Delta Summary
Amount0/1 Delta Summary
AssetPoolHookUserAmount0DeltaAmount1Delta
GeneralDelta00
ERC20User-500005981737760509663-500005981737760509663
ERC20Manager100100
ERC20Hook500005981737760509563500005981737760509563
ERC6909User00
ERC6909Hook00
Estimated Gas Usage
per method gas consumption enabled/disabled hooks
Maximum gas: Swap 8186
min:donate:5190 | average:6792.25 | median:6417.5
Gas Difference Summary
Maximum gas gap: Swap 2706
min:donate:0 | average:1272.5 | median:1192