Trader Joe v2 contest - IllIllI's results

One-stop-shop decentralized trading on Avalanche.

General Information

Platform: Code4rena

Start Date: 14/10/2022

Pot Size: $100,000 USDC

Total HM: 12

Participants: 75

Period: 9 days

Judge: GalloDaSballo

Total Solo HM: 1

Id: 171

League: ETH

Trader Joe

Findings Distribution

Researcher Performance

Rank: 9/75

Findings: 2

Award: $2,426.18

QA:
grade-a
Gas:
grade-b

🌟 Selected for report: 0

šŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: zzykxx

Also found by: 0x1f8b, 0xSmartContract, IllIllI, KingNFT, Rolezn, adriro, brgltd, hansfriese, pashov, rbserver

Labels

bug
QA (Quality Assurance)
grade-a
Q-06

Awards

2351.9735 USDC - $2,351.97

External Links

Summary

Low Risk Issues

IssueInstances
[L‑01]require() should be used instead of assert()1
[L‑02]Missing checks for address(0x0) when assigning values to address state variables5

Total: 6 instances over 2 issues

Non-critical Issues

IssueInstances
[N‑01]Upgradeable contract is missing a __gap[50] storage variable to allow for new storage variables in later versions1
[N‑02]Missing initializer modifier on constructor1
[N‑03]Missing initializer modifier1
[N‑04]Unused file1
[N‑05]public functions not called by the contract should be declared external instead2
[N‑06]Use bit shifts in an imutable variable rather than long bit masks of a single bit, for readability1
[N‑07]Use a more recent version of solidity14
[N‑08]Use a more recent version of solidity1
[N‑09]Constant redefined elsewhere1
[N‑10]Lines are too long2
[N‑11]File is missing NatSpec1
[N‑12]NatSpec is incomplete3
[N‑13]Event is missing indexed fields19
[N‑14]Not using the named return variables anywhere in the function is confusing12

Total: 60 instances over 14 issues

Low Risk Issues

[L‑01] require() should be used instead of assert()

Prior to solidity version 0.8.0, hitting an assert consumes the remainder of the transaction's available gas rather than returning it, as require()/revert() do. assert() should be avoided even past solidity version 0.8.0 as its documentation states that "The assert function creates an error of type Panic(uint256). ... Properly functioning code should never create a Panic, not even on invalid external input. If this happens, then there is a bug in your contract which you should fix".

There is 1 instance of this issue:

File: src/LBFactory.sol

141:          assert(_binStep == _preset.decode(type(uint16).max, _shift));

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBFactory.sol#L141

[L‑02] Missing checks for address(0x0) when assigning values to address state variables

There are 5 instances of this issue:

File: src/LBQuoter.sol

45:           routerV2 = _routerV2;

46:           factoryV1 = _factoryV1;

47:           factoryV2 = _factoryV2;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBQuoter.sol#L45

File: src/libraries/PendingOwnable.sol

93:           _owner = _newOwner;

102:          _pendingOwner = pendingOwner_;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/PendingOwnable.sol#L93

Non-critical Issues

[N‑01] Upgradeable contract is missing a __gap[50] storage variable to allow for new storage variables in later versions

See this link for a description of this storage variable. While some contracts may not currently be sub-classed, adding the variable now protects against forgetting to add it in the future.

There is 1 instance of this issue:

File: src/LBPair.sol

27:   contract LBPair is LBToken, ReentrancyGuardUpgradeable, ILBPair {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L27

[N‑02] Missing initializer modifier on constructor

OpenZeppelin recommends that the initializer modifier be applied to constructors in order to avoid potential griefs, social engineering, or exploits. Ensure that the modifier is applied to the implementation contract. If the default constructor is currently being used, it should be changed to be an explicit one with the modifier applied.

There is 1 instance of this issue:

File: src/LBPair.sol

90:       constructor(ILBFactory _factory) LBToken() {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L90

[N‑03] Missing initializer modifier

The contract extends Initializable/ReentrancyGuardUpgradeable but does not use the initializer modifier anywhere

There is 1 instance of this issue:

File: src/LBPair.sol

27:   contract LBPair is LBToken, ReentrancyGuardUpgradeable, ILBPair {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L27

[N‑04] Unused file

The file is never imported by any other file

There is 1 instance of this issue:

File: src/interfaces/IJoeRouter02.sol

0:    // SPDX-License-Identifier: GPL-3.0

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoeRouter02.sol#L0

[N‑05] public functions not called by the contract should be declared external instead

Contracts are allowed to override their parents' functions and change the visibility from external to public.

There are 2 instances of this issue:

File: src/LBQuoter.sol

54        function findBestPathFromAmountIn(address[] memory _route, uint256 _amountIn)
55            public
56            view
57:           returns (Quote memory quote)

134       function findBestPathFromAmountOut(address[] memory _route, uint256 _amountOut)
135           public
136           view
137:          returns (Quote memory quote)

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBQuoter.sol#L54-L57

[N‑06] Use bit shifts in an imutable variable rather than long bit masks of a single bit, for readability

There is 1 instance of this issue:

File: src/libraries/Math128x128.sol

108:          if (absY < 0x100000) {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Math128x128.sol#L108

[N‑07] Use a more recent version of solidity

Use a solidity version of at least 0.8.13 to get the ability to use using for with a list of free functions

There are 14 instances of this issue:

File: src/LBPair.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L3

File: src/LBQuoter.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBQuoter.sol#L3

File: src/LBRouter.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBRouter.sol#L3

File: src/LBToken.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBToken.sol#L3

File: src/libraries/BinHelper.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/BinHelper.sol#L3

File: src/libraries/FeeDistributionHelper.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/FeeDistributionHelper.sol#L3

File: src/libraries/FeeHelper.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/FeeHelper.sol#L3

File: src/libraries/Math128x128.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Math128x128.sol#L3

File: src/libraries/Math512Bits.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Math512Bits.sol#L3

File: src/libraries/Oracle.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Oracle.sol#L3

File: src/libraries/Samples.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Samples.sol#L3

File: src/libraries/SwapHelper.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/SwapHelper.sol#L3

File: src/libraries/TokenHelper.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/TokenHelper.sol#L3

File: src/libraries/TreeMath.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/TreeMath.sol#L3

[N‑08] Use a more recent version of solidity

Use a solidity version of at least 0.8.4 to get bytes.concat() instead of abi.encodePacked(<bytes>,<bytes>) Use a solidity version of at least 0.8.12 to get string.concat() instead of abi.encodePacked(<str>,<str>)

There is 1 instance of this issue:

File: src/LBFactory.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBFactory.sol#L3

[N‑09] Constant redefined elsewhere

Consider defining in only one contract so that values cannot become out of sync when only one location is updated. A cheap way to store constants in a single location is to create an internal constant in a library. If the variable is a local cache of another contract's value, consider making the cache variable internal or private, which will require external users to query the contract with the source of truth, so that callers don't get out of sync.

There is 1 instance of this issue:

File: src/LBRouter.sol

/// @audit seen in src/LBPair.sol 
28:       ILBFactory public immutable override factory;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBRouter.sol#L28

[N‑10] Lines are too long

Usually lines in source code are limited to 80 characters. Today's screens are much larger so it's reasonable to stretch this in some cases. Since the files will most likely reside in GitHub, and GitHub starts using a scroll bar in all cases when the length is over 164 characters, the lines below should be split when they reach that length

There are 2 instances of this issue:

File: src/libraries/Oracle.sol

69:                       uint256 _weightPrev = _next.timestamp() - _lookUpTimestamp; // _next.timestamp() - _sample.timestamp() - (_lookUpTimestamp - _sample.timestamp())

70:                       uint256 _weightNext = _lookUpTimestamp - _sample.timestamp(); // _next.timestamp() - _sample.timestamp() - (_next.timestamp() - _lookUpTimestamp)

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Oracle.sol#L69

[N‑11] File is missing NatSpec

There is 1 instance of this issue:

File: src/LBErrors.sol

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBErrors.sol

[N‑12] NatSpec is incomplete

There are 3 instances of this issue:

File: src/LBFactory.sol

/// @audit Missing: '@return'
531       /// @param _protocolShare The share of the fees received by the protocol
532       /// @param _maxVolatilityAccumulated The max value of volatility accumulated
533       function _getPackedFeeParameters(
534           uint16 _binStep,
535           uint16 _baseFactor,
536           uint16 _filterPeriod,
537           uint16 _decayPeriod,
538           uint16 _reductionFactor,
539           uint24 _variableFeeControl,
540           uint16 _protocolShare,
541           uint24 _maxVolatilityAccumulated
542:      ) private pure returns (bytes32) {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBFactory.sol#L531-L542

File: src/LBRouter.sol

/// @audit Missing: '@return'
739       /// @param amountX The amount of token X sent by the pair
740       /// @param amountY The amount of token Y sent by the pair
741       function _removeLiquidity(
742           ILBPair _LBPair,
743           uint256 _amountXMin,
744           uint256 _amountYMin,
745           uint256[] memory _ids,
746           uint256[] memory _amounts,
747           address _to
748:      ) private returns (uint256 amountX, uint256 amountY) {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBRouter.sol#L739-L748

File: src/libraries/FeeDistributionHelper.sol

/// @audit Missing: '@return'
47        /// @param _fees The fees received by the pair
48        /// @param _totalSupply the total supply of a specific bin
49        function getTokenPerShare(FeeHelper.FeesDistribution memory _fees, uint256 _totalSupply)
50            internal
51            pure
52:           returns (uint256)

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/FeeDistributionHelper.sol#L47-L52

[N‑13] Event is missing indexed fields

Index event fields make the field more quickly accessible to off-chain tools that parse events. However, note that each index field costs extra gas during emission, so it's not necessarily best to index the maximum allowed per event (three fields). Each event should use three indexed fields if there are three or more fields, and gas usage is not particularly of concern for the events in question. If there are fewer than three fields, all of the fields should be indexed.

There are 19 instances of this issue:

File: src/interfaces/IJoeFactory.sol

8:        event PairCreated(address indexed token0, address indexed token1, address pair, uint256);

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoeFactory.sol#L8

File: src/interfaces/IJoePair.sol

8:        event Approval(address indexed owner, address indexed spender, uint256 value);

9:        event Transfer(address indexed from, address indexed to, uint256 value);

49:       event Mint(address indexed sender, uint256 amount0, uint256 amount1);

50:       event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);

51        event Swap(
52            address indexed sender,
53            uint256 amount0In,
54            uint256 amount1In,
55            uint256 amount0Out,
56            uint256 amount1Out,
57            address indexed to
58:       );

59:       event Sync(uint112 reserve0, uint112 reserve1);

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoePair.sol#L8

File: src/interfaces/ILBFactory.sol

34:       event FeeRecipientSet(address oldRecipient, address newRecipient);

36:       event FlashLoanFeeSet(uint256 oldFlashLoanFee, uint256 newFlashLoanFee);

38        event FeeParametersSet(
39            address indexed sender,
40            ILBPair indexed LBPair,
41            uint256 binStep,
42            uint256 baseFactor,
43            uint256 filterPeriod,
44            uint256 decayPeriod,
45            uint256 reductionFactor,
46            uint256 variableFeeControl,
47            uint256 protocolShare,
48            uint256 maxVolatilityAccumulated
49:       );

51:       event FactoryLockedStatusUpdated(bool unlocked);

53:       event LBPairImplementationSet(address oldLBPairImplementation, address LBPairImplementation);

55:       event LBPairIgnoredStateChanged(ILBPair indexed LBPair, bool ignored);

57        event PresetSet(
58            uint256 indexed binStep,
59            uint256 baseFactor,
60            uint256 filterPeriod,
61            uint256 decayPeriod,
62            uint256 reductionFactor,
63            uint256 variableFeeControl,
64            uint256 protocolShare,
65            uint256 maxVolatilityAccumulated,
66            uint256 sampleLifetime
67:       );

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBFactory.sol#L34

File: src/interfaces/ILBPair.sol

111       event FlashLoan(
112           address indexed sender,
113           address indexed recipient,
114           uint256 amountX,
115           uint256 amountY,
116           uint256 feesX,
117           uint256 feesY
118:      );

148:      event FeesCollected(address indexed sender, address indexed recipient, uint256 amountX, uint256 amountY);

150:      event ProtocolFeesCollected(address indexed sender, address indexed recipient, uint256 amountX, uint256 amountY);

152:      event OracleSizeIncreased(uint256 previousSize, uint256 newSize);

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBPair.sol#L111-L118

File: src/interfaces/ILBToken.sol

19:       event ApprovalForAll(address indexed account, address indexed sender, bool approved);

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBToken.sol#L19

[N‑14] Not using the named return variables anywhere in the function is confusing

Consider changing the variable to be an unnamed one

There are 12 instances of this issue:

File: src/LBPair.sol

/// @audit reserveX
/// @audit reserveY
/// @audit activeId
132       function getReservesAndId()
133           external
134           view
135           override
136           returns (
137               uint256 reserveX,
138               uint256 reserveY,
139:              uint256 activeId

/// @audit feesXTotal
/// @audit feesYTotal
/// @audit feesXProtocol
/// @audit feesYProtocol
151       function getGlobalFees()
152           external
153           view
154           override
155           returns (
156               uint256 feesXTotal,
157               uint256 feesYTotal,
158               uint256 feesXProtocol,
159:              uint256 feesYProtocol

/// @audit reserveX
/// @audit reserveY
251:      function getBin(uint24 _id) external view override returns (uint256 reserveX, uint256 reserveY) {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L132-L139

File: src/libraries/Math512Bits.sol

/// @audit result
30        function mulDivRoundDown(
31            uint256 x,
32            uint256 y,
33            uint256 denominator
34:       ) internal pure returns (uint256 result) {

/// @audit result
119       function shiftDivRoundDown(
120           uint256 x,
121           uint256 offset,
122           uint256 denominator
123:      ) internal pure returns (uint256 result) {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Math512Bits.sol#L30-L34

File: src/libraries/Samples.sol

/// @audit packedSample
69        function pack(
70            uint256 _cumulativeBinCrossed,
71            uint256 _cumulativeVolatilityAccumulated,
72            uint256 _cumulativeId,
73            uint256 _timestamp,
74            uint256 _initialized
75:       ) internal pure returns (bytes32 packedSample) {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Samples.sol#L69-L75


Excluded findings

These findings are excluded from awards calculations because there are publicly-available automated tools that find them. The valid ones appear here for completeness

Non-critical Issues

[N‑01] Non-library/interface files should use fixed compiler versions, not floating ones

There are 6 instances of this issue:

File: src/LBFactory.sol

/// @audit (valid but excluded finding)
3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBFactory.sol#L3

File: src/LBPair.sol

/// @audit (valid but excluded finding)
3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L3

File: src/LBQuoter.sol

/// @audit (valid but excluded finding)
3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBQuoter.sol#L3

File: src/LBRouter.sol

/// @audit (valid but excluded finding)
3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBRouter.sol#L3

File: src/LBToken.sol

/// @audit (valid but excluded finding)
3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBToken.sol#L3

File: src/libraries/PendingOwnable.sol

/// @audit (valid but excluded finding)
3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/PendingOwnable.sol#L3

#0 - GalloDaSballo

2022-11-09T19:29:10Z

[L‑01] | require()Ā should be used instead ofĀ assert() | 1 R

[L‑02] | Missing checks forĀ address(0x0)Ā when assigning values toĀ addressĀ state variables | 5 L

[N‑01] | Upgradeable contract is missing aĀ __gap[50]Ā storage variable to allow for new storage variables in later versions | 1 L

[N‑02] | MissingĀ initializerĀ modifier on constructor | 1 R

[N‑03] | MissingĀ initializerĀ modifier | 1 R

[N‑04] | Unused file | 1 NC

[N‑05] | publicĀ functions not called by the contract should be declaredĀ externalĀ instead | 2 R

[N‑06] | Use bit shifts in an imutable variable rather than long bit masks of a single bit, for readability | 1 R

[N‑07] | Use a more recent version of solidity | 14 R

[N‑08] | Use a more recent version of solidity | 1 See above

[N‑09] | Constant redefined elsewhere | 1 NC

[N‑10] | Lines are too long | 2 NC

[N‑11] | File is missing NatSpec | 1 NC

[N‑12] | NatSpec is incomplete | 3 See above

[N‑13] | Event is missingĀ indexedĀ fields | 19 Disagree

[N‑14] | Not using the named return variables anywhere in the function is confusing R

#1 - GalloDaSballo

2022-11-09T19:29:32Z

2L 7R 4NC

#2 - c4-judge

2022-11-16T21:08:44Z

GalloDaSballo marked the issue as selected for report

#3 - Shungy

2022-11-16T22:59:38Z

I want to point out some findings I believe to be invalid in this report:

N-01: LBPair is not an upgradeable contract. Finding incorrectly assumes because the function name is ReentrancyGuardUpgradeable. N-02: LBPair is not an upgradeable contract. Finding incorrectly assumes because the function name is ReentrancyGuardUpgradeable. N-03: ReentrancyGuardUpgradeable is initialized: https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L114 . This is a custom contract, not OpenZeppelin contract.

#4 - c4-judge

2022-11-17T15:32:10Z

GalloDaSballo marked the issue as grade-a

#5 - GalloDaSballo

2022-11-17T15:40:57Z

Will re-view during QA and re-rate. Note that this report scored so high that I used the second best to rate the rest, meaning that downgrading this should have no impact on other QAs

#6 - GalloDaSballo

2022-11-21T00:09:21Z

Agree with the comment above, gap is invalid.

I think intializer can still technically be left in and is acceptable as refactoring, you can see that __ReentrancyGuard_init_unchained, as well as the 0 check are effectively acting as the initializer

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/ReentrancyGuardUpgradeable.sol#L31-L35

    function __ReentrancyGuard_init_unchained() internal {
        if (_status != 0) revert ReentrancyGuardUpgradeable__AlreadyInitialized();

        _status = _NOT_ENTERED;
    }

Will remove 1 Low from the score

1L 7R 4NC

#7 - c4-judge

2022-11-21T14:51:40Z

GalloDaSballo marked the issue as not selected for report

#8 - GalloDaSballo

2022-11-21T14:51:48Z

Removed best after post judging QA

Findings Information

Labels

bug
G (Gas Optimization)
sponsor confirmed
grade-b
G-10

Awards

74.2126 USDC - $74.21

External Links

Summary

Gas Optimizations

IssueInstancesTotal Gas Saved
[G‑01]Multiple address/ID mappings can be combined into a single mapping of an address/ID to a struct, where appropriate1-
[G‑02]State variables can be packed into fewer storage slots1-
[G‑03]Using storage instead of memory for structs/arrays saves gas1146200
[G‑04]Avoid contract existence checks by using low level calls282800
[G‑05]Multiple accesses of a mapping/array should use a local variable cache142
[G‑06]Add unchecked {} for subtractions where the operands cannot underflow because of a previous require() or if-statement5425
[G‑07]++i/i++ should be unchecked{++i}/unchecked{i++} when it is not possible for them to overflow, as is the case when used in for- and while-loops5300
[G‑08]Optimize names to save gas11242
[G‑09]Use a more recent version of solidity37-
[G‑10]>= costs less gas than >13
[G‑11]Functions guaranteed to revert when called by normal users can be marked payable20420

Total: 121 instances over 11 issues with 50432 gas saved

Gas totals use lower bounds of ranges and count two iterations of each for-loop. All values above are runtime, not deployment, values; deployment values are listed in the individual issue descriptions. The table above and its gas values do not include any excluded findings.

Gas Optimizations

[G‑01] Multiple address/ID mappings can be combined into a single mapping of an address/ID to a struct, where appropriate

Saves a storage slot for the mapping. Depending on the circumstances and sizes of types, can avoid a Gsset (20000 gas) per mapping combined. Reads and subsequent writes can also be cheaper when a function requires both values and they both fit in the same storage slot. Finally, if both fields are accessed in the same function, can save ~42 gas per access due to not having to recalculate the key's keccak256 hash (Gkeccak256 - 30 gas) and that calculation's associated stack operations.

There is 1 instance of this issue:

File: src/LBPair.sol

68        mapping(address => bytes32) private _unclaimedFees;
69        /// @dev Mapping from account to id to user's accruedDebt.
70:       mapping(address => mapping(uint256 => Debts)) private _accruedDebts;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L68-L70

[G‑02] State variables can be packed into fewer storage slots

If variables occupying the same slot are both written the same function or by the constructor, avoids a separate Gsset (20000 gas). Reads of the variables can also be cheaper

There is 1 instance of this issue:

File: src/LBFactory.sol

/// @audit Variable ordering with 8 slots instead of the current 9:
///           move bool(1):creationUnlocked to be right after address(20):feeRecipient
32:       address public override LBPairImplementation;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBFactory.sol#L32

[G‑03] Using storage instead of memory for structs/arrays saves gas

When fetching data from a storage location, assigning the data to a memory variable causes all fields of the struct/array to be read from storage, which incurs a Gcoldsload (2100 gas) for each field of the struct/array. If the fields are read from the new memory variable, they incur an additional MLOAD rather than a cheap stack read. Instead of declearing the variable with the memory keyword, declaring the variable with the storage keyword and caching any fields that need to be re-read in stack variables, will be much cheaper, only incuring the Gcoldsload for the fields actually read. The only time it makes sense to read the whole struct/array into a memory variable, is if the full struct/array is being returned by the function, is being passed to a function that requires memory, or if the array/struct is being read from another memory array/struct

There are 11 instances of this issue:

File: src/LBFactory.sol

197:                          LBPairInformation memory _LBPairInformation = _LBPairsInfo[_tokenA][_tokenB][i];

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBFactory.sol#L197

File: src/LBPair.sol

220:              FeeHelper.FeeParameters memory _fp = _feeParameters;

283:                      Bin memory _bin = _bins[_id];

310:          PairInformation memory _pair = _pairInformation;

318:          FeeHelper.FeeParameters memory _fp = _feeParameters;

327:              Bin memory _bin = _bins[_pair.activeId];

426:          FeeHelper.FeeParameters memory _fp = _feeParameters;

484:          PairInformation memory _pair = _pairInformation;

486:          FeeHelper.FeeParameters memory _fp = _feeParameters;

498:                  Bin memory _bin = _bins[_mintInfo.id];

706:                      Bin memory _bin = _bins[_id];

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L220

[G‑04] Avoid contract existence checks by using low level calls

Prior to 0.8.10 the compiler inserted extra code, including EXTCODESIZE (100 gas), to check for contract existence for external function calls. In more recent solidity versions, the compiler will not insert these checks if the external call has a return value. Similar behavior can be achieved in earlier versions by using low-level calls, since low level calls never check for contract existence

There are 28 instances of this issue:

File: src/LBFactory.sol

/// @audit factory()
216:          if (ILBPair(_LBPairImplementation).factory() != this)

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBFactory.sol#L216

File: src/LBQuoter.sol

/// @audit getPair()
77:               quote.pairs[i] = IJoeFactory(factoryV1).getPair(_route[i], _route[i + 1]);

/// @audit getAllLBPairs()
94:               ILBFactory.LBPairInformation[] memory LBPairsAvailable = ILBFactory(factoryV2).getAllLBPairs(

/// @audit getSwapOut()
105:                              ILBRouter(routerV2).getSwapOut(LBPairsAvailable[j].LBPair, quote.amounts[i], swapForY)

/// @audit getPair()
156:              quote.pairs[i - 1] = IJoeFactory(factoryV1).getPair(_route[i - 1], _route[i]);

/// @audit getAllLBPairs()
171:              ILBFactory.LBPairInformation[] memory LBPairsAvailable = ILBFactory(factoryV2).getAllLBPairs(

/// @audit getSwapIn()
181:                              ILBRouter(routerV2).getSwapIn(LBPairsAvailable[j].LBPair, quote.amounts[i], swapForY)

/// @audit getReserves()
223:          (uint256 reserve0, uint256 reserve1, ) = IJoePair(_pair).getReserves();

/// @audit mulShiftRoundDown()
240:              quote = BinHelper.getPriceFromId(_activeId, _binStep).mulShiftRoundDown(_amount, Constants.SCALE_OFFSET);

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBQuoter.sol#L77

File: src/LBRouter.sol

/// @audit getReserves()
718:                  (uint256 _reserveIn, uint256 _reserveOut, ) = IJoePair(_pair).getReserves();

/// @audit tokenX()
727:                  (amountsIn[i - 1], ) = getSwapIn(ILBPair(_pair), amountsIn[i], ILBPair(_pair).tokenX() == _token);

/// @audit getReserves()
788:                      (uint256 _reserve0, uint256 _reserve1, ) = IJoePair(_pair).getReserves();

/// @audit swap()
792:                          IJoePair(_pair).swap(0, amountOut, _recipient, "");

/// @audit swap()
795:                          IJoePair(_pair).swap(amountOut, 0, _recipient, "");

/// @audit tokenY()
798:                      bool _swapForY = _tokenNext == ILBPair(_pair).tokenY();

/// @audit swap()
800:                      (uint256 _amountXOut, uint256 _amountYOut) = ILBPair(_pair).swap(_swapForY, _recipient);

/// @audit swap()
843:                          IJoePair(_pair).swap(0, amountOut, _recipient, "");

/// @audit swap()
845:                          IJoePair(_pair).swap(amountOut, 0, _recipient, "");

/// @audit tokenY()
848:                      bool _swapForY = _tokenNext == ILBPair(_pair).tokenY();

/// @audit swap()
850:                      (uint256 _amountXOut, uint256 _amountYOut) = ILBPair(_pair).swap(_swapForY, _recipient);

/// @audit getReserves()
888:                      (uint256 _reserve0, uint256 _reserve1, ) = IJoePair(_pair).getReserves();

/// @audit swap()
893:                          IJoePair(_pair).swap(0, _amountOut, _recipient, "");

/// @audit swap()
898:                          IJoePair(_pair).swap(_amountOut, 0, _recipient, "");

/// @audit swap()
/// @audit tokenY()
901:                      ILBPair(_pair).swap(_tokenNext == ILBPair(_pair).tokenY(), _recipient);

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBRouter.sol#L718

File: src/libraries/BinHelper.sol

/// @audit power()
44:               return _getBPValue(_binStep).power(_realId);

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/BinHelper.sol#L44

File: src/libraries/TokenHelper.sol

/// @audit call()
28:               (bool success, bytes memory result) = address(token).call(

/// @audit call()
46:               (bool success, bytes memory result) = address(token).call(

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/TokenHelper.sol#L28

diff --git a/src/LBFactory.sol b/src/LBFactory.sol
index 32ee39c..df9d1c7 100644
--- a/src/LBFactory.sol
+++ b/src/LBFactory.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "openzeppelin/proxy/Clones.sol";
 import "openzeppelin/utils/structs/EnumerableSet.sol";
diff --git a/src/LBQuoter.sol b/src/LBQuoter.sol
index 53fdf0c..e9f9815 100644
--- a/src/LBQuoter.sol
+++ b/src/LBQuoter.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "./LBErrors.sol";
 import "./libraries/BinHelper.sol";
diff --git a/src/LBRouter.sol b/src/LBRouter.sol
index 567c49a..532cc13 100644
--- a/src/LBRouter.sol
+++ b/src/LBRouter.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "openzeppelin/token/ERC20/IERC20.sol";
 
diff --git a/src/libraries/BinHelper.sol b/src/libraries/BinHelper.sol
index db0fef8..c6cf99c 100644
--- a/src/libraries/BinHelper.sol
+++ b/src/libraries/BinHelper.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "../LBErrors.sol";
 import "./Math128x128.sol";
diff --git a/src/libraries/TokenHelper.sol b/src/libraries/TokenHelper.sol
index 17d8e23..3391a98 100644
--- a/src/libraries/TokenHelper.sol
+++ b/src/libraries/TokenHelper.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "openzeppelin/token/ERC20/IERC20.sol";
 
diff --git a/test/LBPair.t.sol b/test/LBPair.t.sol
index d84bb5b..550d55a 100644
--- a/test/LBPair.t.sol
+++ b/test/LBPair.t.sol
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: UNLICENSED
-pragma solidity 0.8.7;
+pragma solidity 0.8.10;
 
 import "./TestHelper.sol";
 
diff --git a/test/mocks/ERC20.sol b/test/mocks/ERC20.sol
index 0543ab8..4cabd37 100644
--- a/test/mocks/ERC20.sol
+++ b/test/mocks/ERC20.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "openzeppelin/token/ERC20/ERC20.sol";
 
diff --git a/test/mocks/ERC20MockDecimals.sol b/test/mocks/ERC20MockDecimals.sol
index b952b88..95d1797 100644
--- a/test/mocks/ERC20MockDecimals.sol
+++ b/test/mocks/ERC20MockDecimals.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "openzeppelin/token/ERC20/ERC20.sol";
 
diff --git a/test/mocks/ERC20MockDecimalsOwnable.sol b/test/mocks/ERC20MockDecimalsOwnable.sol
index 081940f..7ca3b95 100644
--- a/test/mocks/ERC20MockDecimalsOwnable.sol
+++ b/test/mocks/ERC20MockDecimalsOwnable.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "openzeppelin/token/ERC20/ERC20.sol";
 import "openzeppelin/access/Ownable.sol";
diff --git a/test/mocks/ERC20WithTransferTax.sol b/test/mocks/ERC20WithTransferTax.sol
index 7a7a1f4..269616d 100644
--- a/test/mocks/ERC20WithTransferTax.sol
+++ b/test/mocks/ERC20WithTransferTax.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "openzeppelin/token/ERC20/ERC20.sol";
 
diff --git a/test/mocks/Faucet.sol b/test/mocks/Faucet.sol
index 108bde7..e00e8fd 100644
--- a/test/mocks/Faucet.sol
+++ b/test/mocks/Faucet.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "../../src/libraries/PendingOwnable.sol";
 import "../../src/libraries/TokenHelper.sol";
diff --git a/test/mocks/FlashloanBorrower.sol b/test/mocks/FlashloanBorrower.sol
index 16817a8..2bfe335 100644
--- a/test/mocks/FlashloanBorrower.sol
+++ b/test/mocks/FlashloanBorrower.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "openzeppelin/interfaces/IERC20.sol";
 
diff --git a/test/mocks/WAVAX.sol b/test/mocks/WAVAX.sol
index fd86df0..0ff59a0 100644
--- a/test/mocks/WAVAX.sol
+++ b/test/mocks/WAVAX.sol
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: MIT
 
-pragma solidity ^0.8.0;
+pragma solidity 0.8.10;
 
 import "openzeppelin/token/ERC20/ERC20.sol";
 
diff --git a/tmp/gas_before b/tmp/gas_after
index f6d4cb0..3e4d40b 100644
--- a/tmp/gas_before
+++ b/tmp/gas_after
@@ -5,3 +5,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ 2086657                              ┆ 10631           ┆        ┆        ┆        ┆         │
+│ 2083650                              ┆ 10616           ┆        ┆        ┆        ┆         │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -59,3 +59,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ setLBPairImplementation              ┆ 1524            ┆ 24536  ┆ 25108  ┆ 25108  ┆ 147     │
+│ setLBPairImplementation              ┆ 1396            ┆ 24408  ┆ 24980  ┆ 24980  ┆ 147     │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -68,3 +68,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ 4835641                        ┆ 24410           ┆         ┆         ┆          ┆         │
+│ 4823808                        ┆ 24344           ┆         ┆         ┆          ┆         │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -74,9 +74,9 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ balanceOfBatch                 ┆ 3766            ┆ 7101    ┆ 5769    ┆ 11769    ┆ 3       │
+│ balanceOfBatch                 ┆ 3513            ┆ 6936    ┆ 5648    ┆ 11648    ┆ 3       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ burn                           ┆ 11235           ┆ 111199  ┆ 107074  ┆ 244666   ┆ 14      │
+│ burn                           ┆ 11185           ┆ 111009  ┆ 106900  ┆ 244223   ┆ 14      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ collectFees                    ┆ 6720            ┆ 27696   ┆ 20481   ┆ 44969    ┆ 7       │
+│ collectFees                    ┆ 6659            ┆ 27637   ┆ 20420   ┆ 44908    ┆ 7       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ collectProtocolFees            ┆ 5620            ┆ 8817    ┆ 9349    ┆ 10952    ┆ 4       │
+│ collectProtocolFees            ┆ 5517            ┆ 8708    ┆ 9247    ┆ 10824    ┆ 4       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -88,3 +88,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ flashLoan                      ┆ 24674           ┆ 55799   ┆ 24674   ┆ 118050   ┆ 3       │
+│ flashLoan                      ┆ 24546           ┆ 55415   ┆ 24546   ┆ 117154   ┆ 3       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -108,3 +108,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ mint                           ┆ 6892            ┆ 1402686 ┆ 1389693 ┆ 14398451 ┆ 216     │
+│ mint                           ┆ 6889            ┆ 1401974 ┆ 1389110 ┆ 14394628 ┆ 216     │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -112,5 +112,5 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ pendingFees                    ┆ 4041            ┆ 12049   ┆ 12853   ┆ 22185    ┆ 8       │
+│ pendingFees                    ┆ 3980            ┆ 11987   ┆ 12792   ┆ 22076    ┆ 8       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ safeBatchTransferFrom          ┆ 3251            ┆ 408394  ┆ 319740  ┆ 1394600  ┆ 25      │
+│ safeBatchTransferFrom          ┆ 2997            ┆ 408204  ┆ 319642  ┆ 1394156  ┆ 25      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -122,3 +122,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ swap                           ┆ 22475           ┆ 50419   ┆ 30217   ┆ 341090   ┆ 318     │
+│ swap                           ┆ 22347           ┆ 50291   ┆ 30089   ┆ 340962   ┆ 318     │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -141,3 +141,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ 1899867                            ┆ 9873            ┆       ┆        ┆       ┆         │
+│ 1862779                            ┆ 9669            ┆       ┆        ┆       ┆         │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -149,5 +149,5 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ findBestPathFromAmountIn           ┆ 1033            ┆ 45266 ┆ 45438  ┆ 88927 ┆ 5       │
+│ findBestPathFromAmountIn           ┆ 1021            ┆ 44110 ┆ 44256  ┆ 86575 ┆ 5       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ findBestPathFromAmountOut          ┆ 1011            ┆ 38128 ┆ 40133  ┆ 68750 ┆ 5       │
+│ findBestPathFromAmountOut          ┆ 999             ┆ 37100 ┆ 39335  ┆ 66782 ┆ 5       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -160,3 +160,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ 4591267                                               ┆ 23440           ┆         ┆         ┆         ┆         │
+│ 4464246                                               ┆ 22787           ┆         ┆         ┆         ┆         │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -164,7 +164,7 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ addLiquidity                                          ┆ 19672           ┆ 1271036 ┆ 1387744 ┆ 3343198 ┆ 132     │
+│ addLiquidity                                          ┆ 19104           ┆ 1269581 ┆ 1386214 ┆ 3340492 ┆ 132     │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ addLiquidityAVAX                                      ┆ 20036           ┆ 1466238 ┆ 1443921 ┆ 3391536 ┆ 41      │
+│ addLiquidityAVAX                                      ┆ 19453           ┆ 1464700 ┆ 1442391 ┆ 3388830 ┆ 41      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ createLBPair                                          ┆ 279323          ┆ 311452  ┆ 317427  ┆ 331632  ┆ 4       │
+│ createLBPair                                          ┆ 279195          ┆ 311324  ┆ 317299  ┆ 331504  ┆ 4       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -174,9 +174,9 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ getIdFromPrice                                        ┆ 19069           ┆ 28334   ┆ 32951   ┆ 32983   ┆ 3       │
+│ getIdFromPrice                                        ┆ 18941           ┆ 28206   ┆ 32823   ┆ 32855   ┆ 3       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ getPriceFromId                                        ┆ 4771            ┆ 5491    ┆ 5834    ┆ 5868    ┆ 3       │
+│ getPriceFromId                                        ┆ 4643            ┆ 5363    ┆ 5706    ┆ 5740    ┆ 3       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ getSwapIn                                             ┆ 1980            ┆ 18959   ┆ 11151   ┆ 61718   ┆ 30      │
+│ getSwapIn                                             ┆ 1852            ┆ 18336   ┆ 10767   ┆ 59542   ┆ 30      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ getSwapOut                                            ┆ 12368           ┆ 19836   ┆ 21752   ┆ 28264   ┆ 20      │
+│ getSwapOut                                            ┆ 11984           ┆ 19375   ┆ 21112   ┆ 27368   ┆ 20      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -184,27 +184,27 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ removeLiquidity                                       ┆ 2118            ┆ 579712  ┆ 408504  ┆ 1623758 ┆ 10      │
+│ removeLiquidity                                       ┆ 2068            ┆ 578983  ┆ 407904  ┆ 1622121 ┆ 10      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ removeLiquidityAVAX                                   ┆ 1941            ┆ 976395  ┆ 1115696 ┆ 1672247 ┆ 4       │
+│ removeLiquidityAVAX                                   ┆ 1891            ┆ 975385  ┆ 1114521 ┆ 1670610 ┆ 4       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ swapAVAXForExactTokens                                ┆ 1534            ┆ 28653   ┆ 8550    ┆ 166467  ┆ 8       │
+│ swapAVAXForExactTokens                                ┆ 1520            ┆ 28333   ┆ 8348    ┆ 165405  ┆ 8       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ swapExactAVAXForTokens                                ┆ 1578            ┆ 51884   ┆ 15354   ┆ 153614  ┆ 8       │
+│ swapExactAVAXForTokens                                ┆ 1564            ┆ 51591   ┆ 15036   ┆ 153064  ┆ 8       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ swapExactAVAXForTokensSupportingFeeOnTransferTokens   ┆ 1556            ┆ 51177   ┆ 14867   ┆ 163525  ┆ 9       │
+│ swapExactAVAXForTokensSupportingFeeOnTransferTokens   ┆ 1542            ┆ 50810   ┆ 14549   ┆ 162719  ┆ 9       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ swapExactTokensForAVAX                                ┆ 1630            ┆ 69984   ┆ 15522   ┆ 286316  ┆ 10      │
+│ swapExactTokensForAVAX                                ┆ 1616            ┆ 69659   ┆ 15204   ┆ 285230  ┆ 10      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ swapExactTokensForAVAXSupportingFeeOnTransferTokens   ┆ 1610            ┆ 56192   ┆ 15502   ┆ 167467  ┆ 10      │
+│ swapExactTokensForAVAXSupportingFeeOnTransferTokens   ┆ 1596            ┆ 55786   ┆ 15184   ┆ 166822  ┆ 10      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ swapExactTokensForTokens                              ┆ 1631            ┆ 105125  ┆ 67133   ┆ 538137  ┆ 13      │
+│ swapExactTokensForTokens                              ┆ 1617            ┆ 104587  ┆ 66693   ┆ 535979  ┆ 13      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ swapExactTokensForTokensSupportingFeeOnTransferTokens ┆ 1610            ┆ 55076   ┆ 45689   ┆ 136771  ┆ 10      │
+│ swapExactTokensForTokensSupportingFeeOnTransferTokens ┆ 1596            ┆ 54621   ┆ 45207   ┆ 135965  ┆ 10      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ swapTokensForExactAVAX                                ┆ 1588            ┆ 29596   ┆ 8610    ┆ 173651  ┆ 8       │
+│ swapTokensForExactAVAX                                ┆ 1574            ┆ 29302   ┆ 8408    ┆ 172801  ┆ 8       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ swapTokensForExactTokens                              ┆ 1632            ┆ 127782  ┆ 24140   ┆ 609504  ┆ 11      │
+│ swapTokensForExactTokens                              ┆ 1618            ┆ 126636  ┆ 23462   ┆ 605298  ┆ 11      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ sweep                                                 ┆ 6028            ┆ 26141   ┆ 26740   ┆ 36036   ┆ 5       │
+│ sweep                                                 ┆ 5900            ┆ 26003   ┆ 26535   ┆ 35908   ┆ 5       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ sweepLBToken                                          ┆ 3264            ┆ 156904  ┆ 156904  ┆ 310544  ┆ 2       │
+│ sweepLBToken                                          ┆ 3014            ┆ 156630  ┆ 156630  ┆ 310247  ┆ 2       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -217,3 +217,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ 19179229                                                      ┆ 95589           ┆     ┆        ┆     ┆         │
+│ 18854334                                                      ┆ 93969           ┆     ┆        ┆     ┆         │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -228,3 +228,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ 17699454                                                      ┆ 88210           ┆     ┆        ┆     ┆         │
+│ 17397071                                                      ┆ 86702           ┆     ┆        ┆     ┆         │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -249,3 +249,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ transfer                                                    ┆ 2581            ┆ 10121 ┆ 3226   ┆ 29926 ┆ 527     │
+│ transfer                                                    ┆ 2581            ┆ 10093 ┆ 3226   ┆ 29926 ┆ 526     │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -258,3 +258,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ 693730                                                                    ┆ 4198            ┆       ┆        ┆       ┆         │
+│ 693718                                                                    ┆ 4161            ┆       ┆        ┆       ┆         │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -292,3 +292,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ 1098332                               ┆ 5556            ┆       ┆        ┆        ┆         │
+│ 1095325                               ┆ 5541            ┆       ┆        ┆        ┆         │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -306,5 +306,5 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ request()                             ┆ 340             ┆ 73455 ┆ 101517 ┆ 137977 ┆ 12      │
+│ request()                             ┆ 340             ┆ 73284 ┆ 101261 ┆ 137721 ┆ 12      │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ request(address)                      ┆ 622             ┆ 64004 ┆ 58354  ┆ 138687 ┆ 4       │
+│ request(address)                      ┆ 622             ┆ 63876 ┆ 58226  ┆ 138431 ┆ 4       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -327,3 +327,3 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ 413779                                                  ┆ 2134            ┆       ┆        ┆        ┆         │
+│ 401767                                                  ┆ 2074            ┆       ┆        ┆        ┆         │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
@@ -331,7 +331,7 @@
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ LBFlashLoanCallback                                     ┆ 12455           ┆ 12455 ┆ 12455  ┆ 12455  ┆ 1       │
+│ LBFlashLoanCallback                                     ┆ 11943           ┆ 11943 ┆ 11943  ┆ 11943  ┆ 1       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ flashBorrow                                             ┆ 33471           ┆ 77648 ┆ 77648  ┆ 121826 ┆ 2       │
+│ flashBorrow                                             ┆ 33343           ┆ 77136 ┆ 77136  ┆ 120930 ┆ 2       │
 ā”œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¼ā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā•Œā”¤
-│ flashBorrowWithReentrancy                               ┆ 33427           ┆ 33427 ┆ 33427  ┆ 33427  ┆ 1       │
+│ flashBorrowWithReentrancy                               ┆ 33299           ┆ 33299 ┆ 33299  ┆ 33299  ┆ 1       │
 ╰─────────────────────────────────────────────────────────┓─────────────────┓───────┓────────┓────────┓─────────╯
testInversePriceForOppositeBins() (gas: 0 (0.000%)) testRevertOnNonEOA() (gas: 0 (0.000%)) testForInvalidReductionFactor() (gas: 0 (0.000%)) testSetFeeRecipientNotByOwnerReverts() (gas: 0 (0.000%)) testsetFactoryLockedState() (gas: 0 (0.000%)) testSelfApprovalReverts() (gas: 0 (0.000%)) testInternalApproval() (gas: 0 (0.000%)) testInternalBurn(uint256,uint256) (gas: 0 (0.000%)) testInternalBurnFrom0AddressReverts() (gas: 0 (0.000%)) testInternalExcessiveBurnAmountReverts(uint128,uint128) (gas: 0 (0.000%)) testInternalMint(uint256) (gas: 0 (0.000%)) testInternalMintTo0AddressReverts() (gas: 0 (0.000%)) testAddToken() (gas: -19 (-0.002%)) testForInvalidFeeRecipient() (gas: -7 (-0.010%)) testIncreaseOracleLength() (gas: -256 (-0.012%)) testSetFeesParametersOnPairReverts() (gas: -128 (-0.036%)) testForDoubleIgnored() (gas: -128 (-0.036%)) testForInvalidBaseFactor() (gas: -128 (-0.036%)) testForInvalidFilterPeriod() (gas: -128 (-0.036%)) testCreatePairWhenFactoryIsUnlocked() (gas: -262 (-0.070%)) testSetFeesParametersOnPair() (gas: -256 (-0.071%)) testTLowerThanTimestamp() (gas: -5524 (-0.072%)) testIfPairAlreadyExistsReverts() (gas: -256 (-0.073%)) testGetSwapOutWithMultipleChoices() (gas: -3684 (-0.090%)) testForceDecay() (gas: -8084 (-0.101%)) testFuzzingAddLiquidity(uint256) (gas: -1066 (-0.103%)) testForInvalidProtocolShare() (gas: -384 (-0.109%)) testSwapXtoYDistantBinsFromGetSwapOut() (gas: -1970 (-0.112%)) testFlashloan() (gas: -1953 (-0.113%)) testInsufficientLiquidityMinted() (gas: -1876 (-0.114%)) testSwapXtoYConsecutiveBinFromGetSwapOut() (gas: -1970 (-0.115%)) testSwapYtoXConsecutiveBinFromGetSwapOut() (gas: -1970 (-0.116%)) testBurnLiquidity() (gas: -2272 (-0.120%)) testSwapXtoYDistantBinsFromGetSwapIn() (gas: -2098 (-0.120%)) testSwapXtoYConsecutiveBinFromGetSwapIn() (gas: -2098 (-0.123%)) testSwapYtoXConsecutiveBinFromGetSwapIn() (gas: -2098 (-0.123%)) testSwapYtoXDistantBinsFromGetSwapOut() (gas: -2226 (-0.125%)) testOracleSampleFromWith100SamplesNotAllInitialized() (gas: -24340 (-0.125%)) testSwapYtoXDistantBinsFromGetSwapIn() (gas: -2354 (-0.132%)) testTaxTokenSwappedOnV1Pairs() (gas: -6516 (-0.134%)) testFailFlashloanMoreThanReserves() (gas: -128 (-0.141%)) testFailFlashlaonWithReentrancy() (gas: -128 (-0.142%)) testFlawedCompositionFactor() (gas: -2724 (-0.162%)) testLockRequest() (gas: -256 (-0.162%)) testSafeBatchTransferFrom() (gas: -2642 (-0.167%)) testSafeTransferNotApprovedReverts() (gas: -1906 (-0.182%)) testEnsureModifierLiquidity() (gas: -1549 (-0.183%)) testAddLiquidityTaxToken() (gas: -6640 (-0.185%)) testForAmountSlippageCaughtReverts() (gas: -4296 (-0.193%)) testSafeBatchTransferNotApprovedReverts() (gas: -2028 (-0.193%)) testGetIdFromPrice() (gas: -896 (-0.195%)) testSafeTransferFromReverts() (gas: -3730 (-0.196%)) testOracleSampleFromEdgeCases() (gas: -948 (-0.198%)) testDistributionOverflowReverts() (gas: -1768 (-0.204%)) testGetSwapInMoreBins() (gas: -4018 (-0.204%)) testGetSwapInWithMultipleChoices() (gas: -3684 (-0.205%)) testForIdSlippageCaughtReverts() (gas: -4570 (-0.205%)) testOracleSampleFromWith2Samples() (gas: -1076 (-0.207%)) testSwapWithDifferentBinSteps() (gas: -4380 (-0.209%)) testGetSwapInOverflowReverts() (gas: -1586 (-0.213%)) testRemoveLiquiditySlippageReverts() (gas: -13559 (-0.215%)) testModifierCheckLength() (gas: -4108 (-0.216%)) testGetSwapOutOnV2Pair() (gas: -3556 (-0.224%)) testGetSwapInOnV2Pair() (gas: -3556 (-0.224%)) testClaimFeesY() (gas: -2792 (-0.228%)) testClaimFeesX() (gas: -2792 (-0.228%)) testGetPriceFromId() (gas: -896 (-0.230%)) testAddLiquidityIgnored() (gas: -4256 (-0.231%)) testSetLBPairImplementation() (gas: -39185 (-0.234%)) testFeesOnTokenTransfer() (gas: -3298 (-0.236%)) testBalanceOfBatch() (gas: -2522 (-0.237%)) testAddLiquidityAVAXReversed() (gas: -11019 (-0.241%)) testAddLiquidityAVAX() (gas: -11922 (-0.241%)) testQuoteAssets() (gas: -1792 (-0.242%)) testConstructor(uint16,uint16,uint16,uint16,uint16,uint24,uint16,uint24) (gas: -12363 (-0.243%)) testGetSwapInOnComplexRoute() (gas: -4542 (-0.244%)) testSweepLBToken() (gas: -4475 (-0.248%)) testSafeBatchTransferFromReverts() (gas: -5060 (-0.249%)) testCreateLBPair() (gas: -896 (-0.251%)) testCreateLBPair() (gas: -1024 (-0.252%)) testSafeTransferFrom() (gas: -3058 (-0.261%)) testGetSwapOutOnComplexRoute() (gas: -4926 (-0.262%)) testAddLiquidityNoSlippage() (gas: -5707 (-0.273%)) testRemoveLiquidityReverseOrder() (gas: -5708 (-0.273%)) testOracleSampleFromWith100Samples() (gas: -69140 (-0.276%)) testSetRequestAmount() (gas: -512 (-0.280%)) testWithdrawAvax() (gas: -512 (-0.294%)) testClaimProtocolFees() (gas: -3828 (-0.307%)) testClaimFeesComplex(uint256,uint256) (gas: -4212 (-0.322%)) testGetSwapInWrongAmountsReverts() (gas: -6608 (-0.330%)) testRequestFaucetTokensByOperator() (gas: -1024 (-0.332%)) testSwapYtoXSingleBinFromGetSwapOut() (gas: -1714 (-0.344%)) testSwapXtoYSingleBinFromGetSwapOut() (gas: -1714 (-0.344%)) testSwapXtoYSingleBinFromGetSwapIn() (gas: -1714 (-0.345%)) testForLengthsMismatchReverts() (gas: -762 (-0.367%)) testFeeOnActiveBinReverse() (gas: -3274 (-0.372%)) testFeeOnActiveBin() (gas: -3274 (-0.372%)) testRequestFaucetTokens() (gas: -1024 (-0.381%)) testSwapYtoXSingleBinFromGetSwapIn() (gas: -1970 (-0.386%)) testGetSwapInOnV1Pair() (gas: -1168 (-0.405%)) testSwapExactTokensForAvaxSinglePair() (gas: -1597 (-0.415%)) testSwapExactTokensForTokensMultiplePairs() (gas: -2542 (-0.424%)) testForZeroAddressPairReverts() (gas: -256 (-0.434%)) testSweep() (gas: -512 (-0.456%)) testInvalidBinStepWhileCreatingLBPair() (gas: -128 (-0.463%)) testAddLiquidityAVAXnotAVAXReverts() (gas: -965 (-0.465%)) testGetSwapOutOnV1Pair() (gas: -1552 (-0.505%)) testWithdrawToken() (gas: -1024 (-0.524%)) testTaxTokenEqualOnlyV2Swap() (gas: -3196 (-0.525%)) testSwapExactTokensForAVAXSupportingFeeOnTransferTokens() (gas: -2007 (-0.534%)) testSetFeeRecipient() (gas: -128 (-0.539%)) testSwapExactAVAXForTokensSinglePair() (gas: -1996 (-0.544%)) testForIdDesiredOverflowReverts() (gas: -1906 (-0.556%)) testSweepMax() (gas: -640 (-0.565%)) testAvailableBinSteps() (gas: -730 (-0.585%)) testForIdenticalAddressesReverts() (gas: -128 (-0.622%)) testAddRemovePresets() (gas: -504 (-0.627%)) testSwapExactAVAXForTokensSupportingFeeOnTransferTokens() (gas: -2508 (-0.649%)) testForSettingFlashloanFee() (gas: -128 (-0.654%)) testSwapExactTokensForTokensSinglePair() (gas: -2124 (-0.672%)) testFactoryLockedReverts() (gas: -128 (-0.684%)) testWrongTokenOrderReverts() (gas: -1674 (-0.723%)) testInsufficientLiquidityBurnedReverts() (gas: -178 (-0.741%)) testSwapExactTokensForTokensMultiplePairsWithV1() (gas: -2812 (-0.749%)) testSwapTokensForExactTokensMultiplePairsWithV1() (gas: -4418 (-0.763%)) testModifieronlyFactoryOwner() (gas: -128 (-0.770%)) testFeesAboveMaxVolatilityReverts(uint8) (gas: -128 (-0.833%)) testFeesAboveMaxBaseFactorReverts(uint8) (gas: -128 (-0.837%)) testSwapInsufficientAmountReverts() (gas: -512 (-0.859%)) testSwapExactTokensForTokensSupportingFeeOnTransferTokens() (gas: -4423 (-0.862%)) testRemoveToken() (gas: -384 (-0.873%)) testPendingFeesNotIncreasingReverts() (gas: -153 (-0.877%)) testSetRequestCooldown() (gas: -1792 (-0.890%)) testSwapTokensForExactTokensMultiplePairs() (gas: -7446 (-0.926%)) testSwapTokensForExactAVAXSinglePair() (gas: -2658 (-0.945%)) testSwapAVAXForExactTokensSinglePair() (gas: -2658 (-1.066%)) testSetPresets() (gas: -384 (-1.104%)) testVerifyOracleInitialParams() (gas: -128 (-1.124%)) testCollectingFeesOnlyFeeRecipient() (gas: -256 (-1.127%)) testMintWrongLengthsReverts() (gas: -516 (-1.156%)) testSwapTokensForExactTokensSinglePair() (gas: -2786 (-1.174%)) testInvalidLength() (gas: -292 (-1.644%)) testSwappingOnNotExistingV1PairReverts() (gas: -4011 (-1.933%)) testSwappingOnNotExistingV2PairReverts() (gas: -4011 (-2.034%)) testPrivateViewFunctions() (gas: -256 (-2.037%)) testgetAllLBPairs() (gas: -128415 (-2.258%)) <------------------------------------ testConstructor() (gas: -256 (-2.340%)) testInvalidTokenPathReverts() (gas: -828 (-2.380%)) testForInvalidBinStepUnderflowReverts() (gas: -384 (-2.531%)) testForInvalidBinStepOverflowReverts() (gas: -384 (-2.539%)) testModifierEnsure() (gas: -1955 (-3.207%)) testConstructor() (gas: -384 (-3.242%)) testConstructor() (gas: -384 (-3.858%)) testModifierVerifyInputs() (gas: -3198 (-4.074%)) Overall gas change: -581485 (-81.334%) <------------------------------------

[G‑05] Multiple accesses of a mapping/array should use a local variable cache

The instances below point to the second+ access of a value inside a mapping/array, within a function. Caching a mapping's value in a local storage or calldata variable when the value is accessed multiple times, saves ~42 gas per access due to not having to recalculate the key's keccak256 hash (Gkeccak256 - 30 gas) and that calculation's associated stack operations. Caching an array's struct avoids recalculating the array offsets into memory/calldata

There is 1 instance of this issue:

File: src/LBPair.sol

/// @audit _bins[_id] on line 452
453:          _bins[_id].accTokenYPerShare += _feesY.getTokenPerShare(_totalSupply);

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L453

[G‑06] Add unchecked {} for subtractions where the operands cannot underflow because of a previous require() or if-statement

require(a <= b); x = b - a => require(a <= b); unchecked { x = b - a }

There are 5 instances of this issue:

File: src/LBPair.sol

/// @audit if-condition on line 219
225:                  uint256 _deltaT = _lookUpTimestamp - timestamp;

/// @audit if-condition on line 534
536:                                  _fp.getFeeAmountForC(_mintInfo.amountX - _receivedX)

/// @audit if-condition on line 545
547:                                  _fp.getFeeAmountForC(_mintInfo.amountY - _receivedY)

/// @audit if-condition on line 597
598:                  tokenX.safeTransfer(_to, _mintInfo.amountXIn - _amountAddedPlusFee);

/// @audit if-condition on line 602
603:                  tokenY.safeTransfer(_to, _mintInfo.amountYIn - _amountAddedPlusFee);

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L225

[G‑07] ++i/i++ should be unchecked{++i}/unchecked{i++} when it is not possible for them to overflow, as is the case when used in for- and while-loops

The unchecked keyword is new in solidity version 0.8.0, so this only applies to that version or higher, which these instances are. This saves 30-40 gas per loop

There are 5 instances of this issue:

File: src/LBQuoter.sol

75:           for (uint256 i; i < swapLength; i++) {

100:                  for (uint256 j; j < LBPairsAvailable.length; j++) {

154:          for (uint256 i = swapLength; i > 0; i--) {

177:                  for (uint256 j; j < LBPairsAvailable.length; j++) {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBQuoter.sol#L75

File: src/LBRouter.sol

711:          for (uint256 i = _pairs.length; i != 0; i--) {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBRouter.sol#L711

[G‑08] Optimize names to save gas

public/external function names and public member variable names can be optimized to save gas. See this link for an example of how it works. Below are the interfaces/abstract contracts that can be optimized so that the most frequently-called functions use the least amount of gas possible during method lookup. Method IDs that have two leading zero bytes can save 128 gas each during deployment, and renaming functions to have lower method IDs will save 22 gas per call, per sorted position shifted

There are 11 instances of this issue:

File: src/interfaces/IJoeFactory.sol

/// @audit feeTo(), feeToSetter(), migrator(), getPair(), allPairs(), allPairsLength(), createPair(), setFeeTo(), setFeeToSetter(), setMigrator()
7:    interface IJoeFactory {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoeFactory.sol#L7

File: src/interfaces/IJoePair.sol

/// @audit MINIMUM_LIQUIDITY(), factory(), token0(), token1(), getReserves(), price0CumulativeLast(), price1CumulativeLast(), kLast(), mint(), burn(), swap(), skim(), sync(), initialize()
7:    interface IJoePair {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoePair.sol#L7

File: src/interfaces/IJoeRouter01.sol

/// @audit factory(), WAVAX(), addLiquidity(), addLiquidityAVAX(), removeLiquidity(), removeLiquidityAVAX(), removeLiquidityWithPermit(), removeLiquidityAVAXWithPermit(), swapExactTokensForTokens(), swapTokensForExactTokens(), swapExactAVAXForTokens(), swapTokensForExactAVAX(), swapExactTokensForAVAX(), swapAVAXForExactTokens(), quote(), getAmountOut(), getAmountIn(), getAmountsOut(), getAmountsIn()
7:    interface IJoeRouter01 {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoeRouter01.sol#L7

File: src/interfaces/IJoeRouter02.sol

/// @audit removeLiquidityAVAXSupportingFeeOnTransferTokens(), removeLiquidityAVAXWithPermitSupportingFeeOnTransferTokens(), swapExactTokensForTokensSupportingFeeOnTransferTokens(), swapExactAVAXForTokensSupportingFeeOnTransferTokens(), swapExactTokensForAVAXSupportingFeeOnTransferTokens()
9:    interface IJoeRouter02 is IJoeRouter01 {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoeRouter02.sol#L9

File: src/interfaces/ILBFactory.sol

/// @audit MAX_FEE(), MIN_BIN_STEP(), MAX_BIN_STEP(), MAX_PROTOCOL_SHARE(), LBPairImplementation(), getNumberOfQuoteAssets(), getQuoteAsset(), isQuoteAsset(), feeRecipient(), flashLoanFee(), creationUnlocked(), allLBPairs(), getNumberOfLBPairs(), getLBPairInformation(), getPreset(), getAllBinSteps(), getAllLBPairs(), setLBPairImplementation(), createLBPair(), setLBPairIgnored(), setPreset(), removePreset(), setFeesParametersOnPair(), setFeeRecipient(), setFlashLoanFee(), setFactoryLockedState(), addQuoteAsset(), removeQuoteAsset(), forceDecay()
13:   interface ILBFactory is IPendingOwnable {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBFactory.sol#L13

File: src/interfaces/ILBFlashLoanCallback.sol

/// @audit LBFlashLoanCallback()
8:    interface ILBFlashLoanCallback {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBFlashLoanCallback.sol#L8

File: src/interfaces/ILBPair.sol

/// @audit tokenX(), tokenY(), factory(), getReservesAndId(), getGlobalFees(), getOracleParameters(), getOracleSampleFrom(), feeParameters(), findFirstNonEmptyBinId(), getBin(), pendingFees(), swap(), flashLoan(), mint(), burn(), increaseOracleLength(), collectFees(), collectProtocolFees(), setFeesParameters(), forceDecay(), initialize()
13:   interface ILBPair {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBPair.sol#L13

File: src/interfaces/ILBRouter.sol

/// @audit factory(), oldFactory(), wavax(), getIdFromPrice(), getPriceFromId(), getSwapIn(), getSwapOut(), createLBPair(), addLiquidity(), addLiquidityAVAX(), removeLiquidity(), removeLiquidityAVAX(), swapExactTokensForTokens(), swapExactTokensForAVAX(), swapExactAVAXForTokens(), swapTokensForExactTokens(), swapTokensForExactAVAX(), swapAVAXForExactTokens(), swapExactTokensForTokensSupportingFeeOnTransferTokens(), swapExactTokensForAVAXSupportingFeeOnTransferTokens(), swapExactAVAXForTokensSupportingFeeOnTransferTokens(), sweep(), sweepLBToken()
13:   interface ILBRouter {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBRouter.sol#L13

File: src/interfaces/ILBToken.sol

/// @audit userPositionAtIndex(), userPositionNumber(), totalSupply(), safeTransferFrom(), safeBatchTransferFrom()
8:    interface ILBToken {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBToken.sol#L8

File: src/interfaces/IPendingOwnable.sol

/// @audit pendingOwner(), setPendingOwner(), revokePendingOwner(), becomeOwner()
8:    interface IPendingOwnable {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IPendingOwnable.sol#L8

File: src/LBQuoter.sol

/// @audit findBestPathFromAmountIn(), findBestPathFromAmountOut()
17:   contract LBQuoter {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBQuoter.sol#L17

[G‑09] Use a more recent version of solidity

Use a solidity version of at least 0.8.2 to get simple compiler automatic inlining Use a solidity version of at least 0.8.3 to get better struct packing and cheaper multiple storage reads Use a solidity version of at least 0.8.4 to get custom errors, which are cheaper at deployment than revert()/require() strings Use a solidity version of at least 0.8.10 to have external calls skip contract existence checks if the external call has a return value

There are 37 instances of this issue:

File: src/interfaces/IJoeFactory.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoeFactory.sol#L3

File: src/interfaces/IJoePair.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoePair.sol#L3

File: src/interfaces/IJoeRouter01.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoeRouter01.sol#L3

File: src/interfaces/IJoeRouter02.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IJoeRouter02.sol#L3

File: src/interfaces/ILBFactory.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBFactory.sol#L3

File: src/interfaces/ILBFlashLoanCallback.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBFlashLoanCallback.sol#L3

File: src/interfaces/ILBPair.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBPair.sol#L3

File: src/interfaces/ILBRouter.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBRouter.sol#L3

File: src/interfaces/ILBToken.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/ILBToken.sol#L3

File: src/interfaces/IPendingOwnable.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IPendingOwnable.sol#L3

File: src/interfaces/IWAVAX.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/interfaces/IWAVAX.sol#L3

File: src/LBErrors.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBErrors.sol#L3

File: src/LBFactory.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBFactory.sol#L3

File: src/LBPair.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L3

File: src/LBQuoter.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBQuoter.sol#L3

File: src/LBRouter.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBRouter.sol#L3

File: src/LBToken.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBToken.sol#L3

File: src/libraries/BinHelper.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/BinHelper.sol#L3

File: src/libraries/BitMath.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/BitMath.sol#L3

File: src/libraries/Buffer.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Buffer.sol#L3

File: src/libraries/Constants.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Constants.sol#L3

File: src/libraries/Decoder.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Decoder.sol#L3

File: src/libraries/Encoder.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Encoder.sol#L3

File: src/libraries/FeeDistributionHelper.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/FeeDistributionHelper.sol#L3

File: src/libraries/FeeHelper.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/FeeHelper.sol#L3

File: src/libraries/JoeLibrary.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/JoeLibrary.sol#L3

File: src/libraries/Math128x128.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Math128x128.sol#L3

File: src/libraries/Math512Bits.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Math512Bits.sol#L3

File: src/libraries/Oracle.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Oracle.sol#L3

File: src/libraries/PendingOwnable.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/PendingOwnable.sol#L3

File: src/libraries/ReentrancyGuardUpgradeable.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/ReentrancyGuardUpgradeable.sol#L3

File: src/libraries/SafeCast.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/SafeCast.sol#L3

File: src/libraries/SafeMath.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/SafeMath.sol#L3

File: src/libraries/Samples.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/Samples.sol#L3

File: src/libraries/SwapHelper.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/SwapHelper.sol#L3

File: src/libraries/TokenHelper.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/TokenHelper.sol#L3

File: src/libraries/TreeMath.sol

3:    pragma solidity ^0.8.0;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/TreeMath.sol#L3

[G‑10] >= costs less gas than >

The compiler uses opcodes GT and ISZERO for solidity code that uses >, but only requires LT for >=, which saves 3 gas

There is 1 instance of this issue:

File: src/LBRouter.sol

116:                  _amountOutOfBin = _amountOut > _reserve ? _reserve : _amountOut;

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBRouter.sol#L116

[G‑11] Functions guaranteed to revert when called by normal users can be marked payable

If a function modifier such as onlyOwner is used, the function will revert if a normal user tries to pay the function. Marking the function as payable will lower the gas cost for legitimate callers because the compiler will not include checks for whether a payment was provided. The extra opcodes avoided are CALLVALUE(2),DUP1(3),ISZERO(3),PUSH2(3),JUMPI(10),PUSH1(3),DUP1(3),REVERT(0),JUMPDEST(1),POP(2), which costs an average of about 21 gas per call to the function, in addition to the extra deployment cost

There are 20 instances of this issue:

File: src/LBFactory.sol

215:      function setLBPairImplementation(address _LBPairImplementation) external override onlyOwner {

312       function setLBPairIgnored(
313           IERC20 _tokenX,
314           IERC20 _tokenY,
315           uint256 _binStep,
316           bool _ignored
317:      ) external override onlyOwner {

340       function setPreset(
341           uint16 _binStep,
342           uint16 _baseFactor,
343           uint16 _filterPeriod,
344           uint16 _decayPeriod,
345           uint16 _reductionFactor,
346           uint24 _variableFeeControl,
347           uint16 _protocolShare,
348           uint24 _maxVolatilityAccumulated,
349           uint16 _sampleLifetime
350:      ) external override onlyOwner {

396:      function removePreset(uint16 _binStep) external override onlyOwner {

423       function setFeesParametersOnPair(
424           IERC20 _tokenX,
425           IERC20 _tokenY,
426           uint16 _binStep,
427           uint16 _baseFactor,
428           uint16 _filterPeriod,
429           uint16 _decayPeriod,
430           uint16 _reductionFactor,
431           uint24 _variableFeeControl,
432           uint16 _protocolShare,
433           uint24 _maxVolatilityAccumulated
434:      ) external override onlyOwner {

468:      function setFeeRecipient(address _feeRecipient) external override onlyOwner {

474:      function setFlashLoanFee(uint256 _flashLoanFee) external override onlyOwner {

485:      function setFactoryLockedState(bool _locked) external override onlyOwner {

493:      function addQuoteAsset(IERC20 _quoteAsset) external override onlyOwner {

502:      function removeQuoteAsset(IERC20 _quoteAsset) external override onlyOwner {

520:      function forceDecay(ILBPair _LBPair) external override onlyOwner {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBFactory.sol#L215

File: src/LBPair.sol

104       function initialize(
105           IERC20 _tokenX,
106           IERC20 _tokenY,
107           uint24 _activeId,
108           uint16 _sampleLifetime,
109           bytes32 _packedFeeParameters
110:      ) external override onlyFactory {

788:      function setFeesParameters(bytes32 _packedFeeParameters) external override onlyFactory {

792:      function forceDecay() external override onlyFactory {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L104-L110

File: src/LBRouter.sol

622       function sweep(
623           IERC20 _token,
624           address _to,
625           uint256 _amount
626:      ) external override onlyFactoryOwner {

642       function sweepLBToken(
643           ILBToken _lbToken,
644           address _to,
645           uint256[] memory _ids,
646           uint256[] memory _amounts
647:      ) external override onlyFactoryOwner {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBRouter.sol#L622-L626

File: src/libraries/PendingOwnable.sol

59:       function setPendingOwner(address pendingOwner_) public override onlyOwner {

68:       function revokePendingOwner() public override onlyOwner {

75:       function becomeOwner() public override onlyPendingOwner {

84:       function renounceOwnership() public override onlyOwner {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/libraries/PendingOwnable.sol#L59


Excluded findings

These findings are excluded from awards calculations because there are publicly-available automated tools that find them. The valid ones appear here for completeness

[G‑01] <array>.length should not be looked up in every loop of a for-loop

The overheads outlined below are PER LOOP, excluding the first loop

  • storage arrays incur a Gwarmaccess (100 gas)
  • memory arrays use MLOAD (3 gas)
  • calldata arrays use CALLDATALOAD (3 gas)

Caching the length changes each of these to a DUP<N> (3 gas), and gets rid of the extra DUP<N> needed to store the stack offset

There are 13 instances of this issue:

File: src/LBPair.sol

/// @audit (valid but excluded finding)
274:              for (uint256 i; i < _ids.length; ++i) {

/// @audit (valid but excluded finding)
496:              for (uint256 i; i < _ids.length; ++i) {

/// @audit (valid but excluded finding)
623:              for (uint256 i; i < _ids.length; ++i) {

/// @audit (valid but excluded finding)
701:              for (uint256 i; i < _ids.length; ++i) {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBPair.sol#L274

File: src/LBQuoter.sol

/// @audit (valid but excluded finding)
100:                  for (uint256 j; j < LBPairsAvailable.length; j++) {

/// @audit (valid but excluded finding)
177:                  for (uint256 j; j < LBPairsAvailable.length; j++) {

https://github.com/code-423n4/2022-10-traderjoe/blob/79f25d48b907f9d0379dd803fc2abc9c5f57db93/src/LBQuoter.sol#L100

File: src/LBRouter.sol

/// @audit (valid but excluded finding)
674:              for (uint256 i; i < depositIds.length; ++i) {

/// @audit (valid but excluded finding)
778:              for (uint256 i; i < _pairs.length; ++i) {

/// @audit (valid but excluded finding)
831:              for (uint256 i; i < _pairs.length; ++i) {

/// @audit (valid but excluded finding)
878:              for (uint256 i; i 
... See the rest this report [here](https://github.com/code-423n4/2022-10-traderjoe-findings/blob/main/data/IllIllI-G.md)

#0 - GalloDaSballo

2022-11-09T22:30:37Z

[G‑03] Using storage instead of memory for structs/arrays saves gas 1k

[G‑04] Avoid contract existence checks by using low level calls Capping it at 1k

Rest is minor

#1 - GalloDaSballo

2022-11-09T22:30:39Z

2K

#2 - c4-judge

2022-11-16T21:24:26Z

GalloDaSballo marked the issue as grade-b

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax Ā© 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter