code-423n4 / 2022-07-fractional-findings

0 stars 0 forks source link

Gas Optimizations #592

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Table of Content

reuse loaded variable to get total supply

^ back to top ^

Instead of calling IVaultRegistry(registry).totalSupply(_vault), which would load again token and id from storage, we could use the token and id we've already loaded.


+import {IFERC1155} from "../interfaces/IFERC1155.sol";
+
 /// @title Buyout
 /// @author Fractional Art
 /// @notice Module contract for vaults to hold buyout pools
@@ -68,7 +70,7 @@ contract Buyout is IBuyout, Multicall, NFTReceiver, SafeSend, SelfPermit {
         if (current != required) revert InvalidState(required, current);

         // Gets total supply of fractional tokens for the vault
-        uint256 totalSupply = IVaultRegistry(registry).totalSupply(_vault);
+        uint256 totalSupply = IFERC1155(token).totalSupply(id);
         // Gets total balance of fractional tokens owned by caller
         uint256 depositAmount = IERC1155(token).balanceOf(msg.sender, id);

@@ -118,6 +120,8 @@ contract Buyout is IBuyout, Multicall, NFTReceiver, SafeSend, SelfPermit {
         (uint256 startTime, , State current, uint256 fractionPrice, , ) = this
             .buyoutInfo(_vault);
         // Reverts if auction state is not live
+        // @audit make state constant to save gas
+        // this is not going to save much because the var is stored in memory
         State required = State.LIVE;
         if (current != required) revert InvalidState(required, current);
         // Reverts if current time is greater than end time of proposal period
@@ -205,9 +209,10 @@ contract Buyout is IBuyout, Multicall, NFTReceiver, SafeSend, SelfPermit {

         uint256 tokenBalance = IERC1155(token).balanceOf(address(this), id);
         // Checks totalSupply of auction pool to determine if buyout is successful or not
+        // @audit would be cheaper to do this than have vault registery load it again from storage
         if (
             (tokenBalance * 1000) /
-                IVaultRegistry(registry).totalSupply(_vault) >
+                IFERC1155(token).totalSupply(id) >
             500
         ) {
             // Initializes vault transaction
@@ -264,7 +269,7 @@ contract Buyout is IBuyout, Multicall, NFTReceiver, SafeSend, SelfPermit {
         IVault(payable(_vault)).execute(supply, data, _burnProof);

         // Transfers buyout share amount to caller based on total supply
-        uint256 totalSupply = IVaultRegistry(registry).totalSupply(_vault);
+        uint256 totalSupply = IFERC1155(token).totalSupply(id);
         uint256 buyoutShare = (tokenBalance * ethBalance) /
             (totalSupply + tokenBalance);
         _sendEthOrWeth(msg.sender, buyoutShare);
@@ -277,7 +282,7 @@ contract Buyout is IBuyout, Multicall, NFTReceiver, SafeSend, SelfPermit {
     /// @param _burnProof Merkle proof for burning fractional tokens
     function redeem(address _vault, bytes32[] calldata _burnProof) external {
         // Reverts if address is not a registered vault
-        (, uint256 id) = IVaultRegistry(registry).vaultToToken(_vault);
+        (address token, uint256 id) = IVaultRegistry(registry).vaultToToken(_vault);
         if (id == 0) revert NotVault(_vault);
         // Reverts if auction state is not inactive
         (, , State current, , , ) = this.buyoutInfo(_vault);
@@ -285,7 +290,7 @@ contract Buyout is IBuyout, Multicall, NFTReceiver, SafeSend, SelfPermit {
         if (current != required) revert InvalidState(required, current);

         // Initializes vault transaction
-        uint256 totalSupply = IVaultRegistry(registry).totalSupply(_vault);
+        uint256 totalSupply = IFERC1155(token).totalSupply(id);
         bytes memory data = abi.encodeCall(
             ISupply.burn,
             (msg.sender, totalSupply)
diff --git a/src/modules/Migration.sol b/src/modules/Migration.sol
index d81d0ef..7d4301f 100644
--- a/src/modules/Migration.sol
+++ b/src/modules/Migration.sol
@@ -78,7 +78,7 @@ contract Migration is
         uint256 _targetPrice
     ) external {
         // Reverts if address is not a registered vault
-        (, uint256 id) = IVaultRegistry(registry).vaultToToken(_vault);
+        (address token, uint256 id) = IVaultRegistry(registry).vaultToToken(_vault);
         if (id == 0) revert NotVault(_vault);
         // Reverts if buyout state is not inactive
         (, , State current, , , ) = IBuyout(buyout).buyoutInfo(_vault);
@@ -92,9 +92,7 @@ contract Migration is
         proposal.modules = _modules;
         proposal.plugins = _plugins;
         proposal.selectors = _selectors;
-        proposal.oldFractionSupply = IVaultRegistry(registry).totalSupply(
-            _vault
-        );
+        proposal.oldFractionSupply = IFERC1155(token).totalSupply(id);
         proposal.newFractionSupply = _newFractionSupply;
     }

@@ -197,7 +195,7 @@ contract Migration is
         // Calculates current price of the proposal based on total supply
         uint256 currentPrice = _calculateTotal(
             100,
-            IVaultRegistry(registry).totalSupply(_vault),
+            IFERC1155(token).totalSupply(id),
             proposal.totalEth,
             proposal.totalFractions
         );
@@ -467,7 +465,7 @@ contract Migration is
         (address token, uint256 newFractionId) = IVaultRegistry(registry)
             .vaultToToken(newVault);
         // Calculates share amount of fractions for the new vault based on the new total supply
-        uint256 newTotalSupply = IVaultRegistry(registry).totalSupply(newVault);
+        uint256 newTotalSupply = IFERC1155(token).totalSupply(newFractionId);
         uint256 shareAmount = (balanceContributedInEth * newTotalSupply) /
             totalInEth;

Some variable can be immutable

^ back to top ^

This would save loading the variable from storage each time.

diff --git a/src/VaultFactory.sol b/src/VaultFactory.sol
index 0902ebb..b08e56e 100644
--- a/src/VaultFactory.sol
+++ b/src/VaultFactory.sol
@@ -12,7 +12,8 @@ contract VaultFactory is IVaultFactory {
     /// @dev Use clones library for address types
     using Create2ClonesWithImmutableArgs for address;
     /// @notice Address of Vault proxy contract
-    address public implementation;
+    // @audit can be set to immutable since it doesn't change
+    address immutable public implementation;
     /// @dev Internal mapping to track the next seed to be used by an EOA
     mapping(address => bytes32) internal nextSeeds;

diff --git a/src/modules/Migration.sol b/src/modules/Migration.sol
index d81d0ef..810fa1d 100644
--- a/src/modules/Migration.sol
+++ b/src/modules/Migration.sol
@@ -34,9 +34,9 @@ contract Migration is
     ReentrancyGuard
 {
     /// @notice Address of Buyout module contract
-    address payable public buyout;
+    address payable immutable public buyout;
     /// @notice Address of VaultRegistry contract
-    address public registry;
+    address immutable public registry;
     /// @notice Counter used to assign IDs to new proposals
     uint256 public nextId;
     /// @notice The length for the migration proposal period
diff --git a/src/modules/protoforms/BaseVault.sol b/src/modules/protoforms/BaseVault.sol
index e02abf0..a8e4476 100644
--- a/src/modules/protoforms/BaseVault.sol
+++ b/src/modules/protoforms/BaseVault.sol
@@ -16,7 +16,7 @@ import {Multicall} from "../../utils/Multicall.sol";
 /// @notice Protoform contract for vault deployments with a fixed supply and buyout mechanism
 contract BaseVault is IBaseVault, MerkleBase, Minter, Multicall {
     /// @notice Address of VaultRegistry contract
-    address public registry;
+    address immutable public registry;

     /// @notice Initializes registry and supply contracts
     /// @param _registry Address of the VaultRegistry contract

Add an initFor function to Vault to save gas in VaultFactory

^ back to top ^

Instead of doing an init and then transferring ownership (transferOwner takes an extra sstore op), just add to Vault functionality that let's init for another address and use it in VaultFactory.

diff --git a/src/Vault.sol b/src/Vault.sol
index 60c9bff..23e1c66 100644
--- a/src/Vault.sol
+++ b/src/Vault.sol
@@ -22,10 +22,14 @@ contract Vault is IVault, NFTReceiver {

     /// @dev Initializes nonce and proxy owner
     function init() external {
+        initFor(msg.sender);
+    }
+
+    function initFor(address _owner) public {
         if (nonce != 0) revert Initialized(owner, msg.sender, nonce);
         nonce = 1;
-        owner = msg.sender;
-        emit TransferOwnership(address(0), msg.sender);
+        owner = _owner;
+        emit TransferOwnership(address(0), _owner);
     }

     /// @dev Callback for receiving Ether when the calldata is empty
diff --git a/src/VaultFactory.sol b/src/VaultFactory.sol
index 0902ebb..169113f 100644
--- a/src/VaultFactory.sol
+++ b/src/VaultFactory.sol
@@ -67,10 +67,10 @@ contract VaultFactory is IVaultFactory {

         bytes memory data = abi.encodePacked();
         vault = implementation.clone(salt, data);
-        Vault(vault).init();
+        Vault(vault).initFor(_owner);

         // Transfer the ownership from this factory contract to the specified owner.
-        Vault(vault).transferOwnership(_owner);
+        // Vault(vault).transferOwnership(_owner);

         // Increment the seed.
         unchecked {

Use delete instead of setting to zero

^ back to top ^

This doesn't seem to save gas at runtime, but does save a bit of deployment size

diff --git a/src/Vault.sol b/src/Vault.sol
index 60c9bff..0059d94 100644
--- a/src/Vault.sol
+++ b/src/Vault.sol
@@ -102,7 +102,7 @@ contract Vault is IVault, NFTReceiver {
         if (owner != msg.sender) revert NotOwner(owner, msg.sender);
         uint256 length = _selectors.length;
         for (uint256 i = 0; i < length; i++) {
-            methods[_selectors[i]] = address(0);
+            delete methods[_selectors[i]];
         }
         emit UninstallPlugin(_selectors);
     }

Deployment size and cost diff:

 ╭────────────────────────────────────────────┬─────────────────┬────────┬────────┬────────┬─────────╮
 │ src/VaultFactory.sol:VaultFactory contract ┆                 ┆        ┆        ┆        ┆         │
 ╞════════════════════════════════════════════╪═════════════════╪════════╪════════╪════════╪═════════╡
 │ Deployment Cost                            ┆ Deployment Size ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ 1121723                                    ┆ 5483            ┆        ┆        ┆        ┆         │
+│ 1118110                                    ┆ 5465            ┆        ┆        ┆        ┆         │

------------------------------------------------ 
 ╭────────────────────────────────────────────┬─────────────────┬────────┬────────┬────────┬─────────╮
 │ src/VaultFactory.sol:VaultFactory contract ┆                 ┆        ┆        ┆        ┆         │
 ╞════════════════════════════════════════════╪═════════════════╪════════╪════════╪════════╪═════════╡
 │ Deployment Cost                            ┆ Deployment Size ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ 1121723                                    ┆ 5483            ┆        ┆        ┆        ┆         │
+│ 1118110                                    ┆ 5465            ┆        ┆        ┆        ┆         │

---------------------------
 ╭──────────────────────────────────────────────┬─────────────────┬────────┬────────┬────────┬─────────╮
 │ src/VaultRegistry.sol:VaultRegistry contract ┆                 ┆        ┆        ┆        ┆         │
 ╞══════════════════════════════════════════════╪═════════════════╪════════╪════════╪════════╪═════════╡
 │ Deployment Cost                              ┆ Deployment Size ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ 3898606                                      ┆ 19409           ┆        ┆        ┆        ┆         │
+│ 3894990                                      ┆ 19391           ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ Function Name

Don't transfer when amount is zero

^ back to top ^

diff --git a/src/modules/Buyout.sol b/src/modules/Buyout.sol
index 1557233..5420710 100644
--- a/src/modules/Buyout.sol
+++ b/src/modules/Buyout.sol
@@ -72,14 +72,16 @@ contract Buyout is IBuyout, Multicall, NFTReceiver, SafeSend, SelfPermit {
         // Gets total balance of fractional tokens owned by caller
         uint256 depositAmount = IERC1155(token).balanceOf(msg.sender, id);

-        // Transfers fractional tokens into the buyout pool
-        IERC1155(token).safeTransferFrom(
-            msg.sender,
-            address(this),
-            id,
-            depositAmount,
-            ""
-        );
+        if(depositAmount != 0){
+            // Transfers fractional tokens into the buyout pool
+            IERC1155(token).safeTransferFrom(
+                msg.sender,
+                address(this),
+                id,
+                depositAmount,
+                ""
+            );
+        }

         // Calculates price of buyout and fractions
         // @dev Reverts with division error if called with total supply of tokens
@@ -225,14 +227,18 @@ contract Buyout is IBuyout, Multicall, NFTReceiver, SafeSend, SelfPermit {
             // Deletes auction info
             delete buyoutInfo[_vault];
             // Transfers fractions and ether back to proposer of the buyout pool
-            IERC1155(token).safeTransferFrom(
-                address(this),
-                proposer,
-                id,
-                tokenBalance,
-                ""
-            );
-            _sendEthOrWeth(proposer, ethBalance);
+            if(tokenBalance != 0){
+                IERC1155(token).safeTransferFrom(
+                    address(this),
+                    proposer,
+                    id,
+                    tokenBalance,
+                    ""
+                );
+            }
+            if(ethBalance != 0){
+                _sendEthOrWeth(proposer, ethBalance);
+            }
             // Emits event for ending unsuccessful auction
             emit End(_vault, State.INACTIVE, proposer);
         }

cache merkle proof-check

^ back to top ^

This one might need further checking and consideration, but caching merkle proof might be cheaper in the long run. Here's the math:

Here's the suggested code change:

diff --git a/src/Vault.sol b/src/Vault.sol
index 60c9bff..86aa720 100644
--- a/src/Vault.sol
+++ b/src/Vault.sol
@@ -17,6 +17,12 @@ contract Vault is IVault, NFTReceiver {
     uint256 public nonce;
     /// @dev Minimum reserve of gas units
     uint256 private constant MIN_GAS_RESERVE = 5_000;
+
+    error CacheFailed(address source, bytes32 leaf, bytes32 cachedRoot);
+    event Cache(address source, bytes32 leaf, bytes32 cachedRoot);
+
+
+    mapping(bytes32 => bytes32) public merkleCache;
     /// @notice Mapping of function selector to plugin address
     mapping(bytes4 => address) public methods;

@@ -49,7 +55,8 @@ contract Vault is IVault, NFTReceiver {
     function execute(
         address _target,
         bytes calldata _data,
-        bytes32[] calldata _proof
+        bytes32[] calldata _proof,
+        bool checkCache
     ) external payable returns (bool success, bytes memory response) {
         bytes4 selector;
         assembly {
@@ -59,14 +66,44 @@ contract Vault is IVault, NFTReceiver {
         // Generate leaf node by hashing module, target and function selector.
         bytes32 leaf = keccak256(abi.encode(msg.sender, _target, selector));
         // Check that the caller is either a module with permission to call or the owner.
-        if (!MerkleProof.verify(_proof, merkleRoot, leaf)) {
-            if (msg.sender != owner)
-                revert NotAuthorized(msg.sender, _target, selector);
+        if(checkCache){
+            bytes32 cached = merkleCache[leaf];
+            if(cached != merkleRoot)
+                revert CacheFailed(address(this), leaf, cached);
+
+        }else{
+            if (!MerkleProof.verify(_proof, merkleRoot, leaf)) {
+                if (msg.sender != owner)
+                    revert NotAuthorized(msg.sender, _target, selector);
+            }
         }

         (success, response) = _execute(_target, _data);
     }

+    function cacheMerkleProof(
+        address user,
+        address _target,
+        bytes calldata _data,
+        bytes32[] calldata _proof
+    ) public{
+       bytes4 selector;
+        assembly {
+            selector := calldataload(_data.offset)
+        }
+
+        // Generate leaf node by hashing module, target and function selector.
+        bytes32 leaf = keccak256(abi.encode(user, _target, selector));
+        // Check that the caller is either a module with permission to call or the owner.
+        if (!MerkleProof.verify(_proof, merkleRoot, leaf)) {
+            if (user != owner)
+                revert NotAuthorized(user, _target, selector);
+        }
+    
+        merkleCache[leaf] = merkleRoot;
+        emit Cache(address(this), leaf, merkleRoot);
+    }
+

Here's the gas diff when I cached the leafs of the Buyout module

Disclaimer: Foundry might be considered each test as one tx, making the cache warm after the 1st call (therefore charging less gas than real world scenario). Further testing is needed (and there's no much time left for that till the end of the contest)

 ╭────────────────────────────────────┬─────────────────┬───────┬────────┬───────┬─────────╮
 │ src/FERC1155.sol:FERC1155 contract ┆                 ┆       ┆        ┆       ┆         │
 ╞════════════════════════════════════╪═════════════════╪═══════╪════════╪═══════╪═════════╡
@@ -244,31 +244,33 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ╞══════════════════════════════╪═════════════════╪═══════╪════════╪═══════╪═════════╡
 │ Deployment Cost              ┆ Deployment Size ┆       ┆        ┆       ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ 816851                       ┆ 4112            ┆       ┆        ┆       ┆         │
+│ 942381                       ┆ 4739            ┆       ┆        ┆       ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ Function Name                ┆ min             ┆ avg   ┆ median ┆ max   ┆ # calls │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
+│ cacheMerkleProof             ┆ 26174           ┆ 26365 ┆ 26479  ┆ 26499 ┆ 445     │
+├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ execute                      ┆ 3585            ┆ 40695 ┆ 61452  ┆ 66336 ┆ 182     │
+│ execute                      ┆ 3656            ┆ 40470 ┆ 61525  ┆ 66395 ┆ 182     │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ fallback                     ┆ 55              ┆ 55    ┆ 55     ┆ 55    ┆ 1       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ init                         ┆ 638             ┆ 45712 ┆ 45982  ┆ 45982 ┆ 183     │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ install                      ┆ 3437            ┆ 37491 ┆ 3437   ┆ 73979 ┆ 174     │
+│ install                      ┆ 3415            ┆ 37469 ┆ 3415   ┆ 73957 ┆ 174     │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ merkleRoot                   ┆ 340             ┆ 340   ┆ 340    ┆ 340   ┆ 1       │
+│ merkleRoot                   ┆ 318             ┆ 318   ┆ 318    ┆ 318   ┆ 1       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ nonce                        ┆ 362             ┆ 1028  ┆ 362    ┆ 2362  ┆ 3       │
+│ nonce                        ┆ 340             ┆ 1006  ┆ 340    ┆ 2340  ┆ 3       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ onERC1155BatchReceived       ┆ 1246            ┆ 1246  ┆ 1246   ┆ 1246  ┆ 2       │
+│ onERC1155BatchReceived       ┆ 1291            ┆ 1291  ┆ 1291   ┆ 1291  ┆ 2       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ onERC1155Received            ┆ 839             ┆ 839   ┆ 839    ┆ 839   ┆ 36      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ onERC721Received             ┆ 749             ┆ 749   ┆ 749    ┆ 749   ┆ 121     │
+│ onERC721Received             ┆ 772             ┆ 772   ┆ 772    ┆ 772   ┆ 121     │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ owner                        ┆ 382             ┆ 604   ┆ 382    ┆ 2382  ┆ 9       │
+│ owner                        ┆ 360             ┆ 582   ┆ 360    ┆ 2360  ┆ 9       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ setMerkleRoot                ┆ 596             ┆ 22359 ┆ 22487  ┆ 22487 ┆ 172     │
+│ setMerkleRoot                ┆ 662             ┆ 22425 ┆ 22553  ┆ 22553 ┆ 172     │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ transferOwnership            ┆ 742             ┆ 2310  ┆ 2318   ┆ 2318  ┆ 208     │
 ╰──────────────────────────────┴─────────────────┴───────┴────────┴───────┴─────────╯
@@ -277,7 +279,7 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ╞════════════════════════════════════════════╪═════════════════╪════════╪════════╪════════╪═════════╡
 │ Deployment Cost                            ┆ Deployment Size ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ 1121723                                    ┆ 5483            ┆        ┆        ┆        ┆         │
+│ 1247384                                    ┆ 6110            ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ Function Name                              ┆ min             ┆ avg    ┆ median ┆ max    ┆ # calls │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
@@ -292,21 +294,21 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ╞══════════════════════════════════════════════╪═════════════════╪════════╪════════╪════════╪═════════╡
 │ Deployment Cost                              ┆ Deployment Size ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ 3898606                                      ┆ 19409           ┆        ┆        ┆        ┆         │
+│ 4024324                                      ┆ 20036           ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ Function Name                                ┆ min             ┆ avg    ┆ median ┆ max    ┆ # calls │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ burn                                         ┆ 2349            ┆ 4218   ┆ 4255   ┆ 4255   ┆ 52      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ create                                       ┆ 224136          ┆ 231964 ┆ 224136 ┆ 278986 ┆ 109     │
+│ create                                       ┆ 224180          ┆ 232008 ┆ 224180 ┆ 279030 ┆ 109     │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ createCollection                             ┆ 348452          ┆ 348452 ┆ 348452 ┆ 348452 ┆ 1       │
+│ createCollection                             ┆ 348496          ┆ 348496 ┆ 348496 ┆ 348496 ┆ 1       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ createCollectionFor                          ┆ 319560          ┆ 322602 ┆ 319560 ┆ 348460 ┆ 19      │
+│ createCollectionFor                          ┆ 319604          ┆ 322646 ┆ 319604 ┆ 348504 ┆ 19      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ createFor                                    ┆ 281988          ┆ 291822 ┆ 292088 ┆ 292088 ┆ 38      │
+│ createFor                                    ┆ 282032          ┆ 291866 ┆ 292132 ┆ 292132 ┆ 38      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ createInCollection                           ┆ 10406           ┆ 139483 ┆ 139483 ┆ 268560 ┆ 2       │
+│ createInCollection                           ┆ 10406           ┆ 139505 ┆ 139505 ┆ 268604 ┆ 2       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ fNFT                                         ┆ 228             ┆ 228    ┆ 228    ┆ 228    ┆ 3       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
@@ -323,7 +325,7 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ╞════════════════════════════════════════╪═════════════════╪════════╪════════╪════════╪═════════╡
 │ Deployment Cost                        ┆ Deployment Size ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ 2779003                                ┆ 13880           ┆        ┆        ┆        ┆         │
+│ 2784810                                ┆ 13909           ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ Function Name                          ┆ min             ┆ avg    ┆ median ┆ max    ┆ # calls │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
@@ -331,23 +333,23 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ REJECTION_PERIOD                       ┆ 328             ┆ 328    ┆ 328    ┆ 328    ┆ 89      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ batchWithdrawERC1155                   ┆ 4801            ┆ 31066  ┆ 6768   ┆ 72961  ┆ 9       │
+│ batchWithdrawERC1155                   ┆ 4801            ┆ 31115  ┆ 6768   ┆ 73053  ┆ 9       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ buyFractions                           ┆ 3952            ┆ 10023  ┆ 11282  ┆ 15989  ┆ 14      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ buyoutInfo                             ┆ 1335            ┆ 3610   ┆ 1335   ┆ 11335  ┆ 378     │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ cash                                   ┆ 4264            ┆ 18366  ┆ 22485  ┆ 22485  ┆ 17      │
+│ cash                                   ┆ 4264            ┆ 17806  ┆ 21752  ┆ 21752  ┆ 17      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ end                                    ┆ 4271            ┆ 22405  ┆ 17431  ┆ 35740  ┆ 52      │
+│ end                                    ┆ 4271            ┆ 21939  ┆ 16697  ┆ 35740  ┆ 52      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ getLeafNodes                           ┆ 5551            ┆ 5904   ┆ 5551   ┆ 9551   ┆ 1042    │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ multicall                              ┆ 5732            ┆ 24289  ┆ 19409  ┆ 74548  ┆ 16      │
+│ multicall                              ┆ 5732            ┆ 23959  ┆ 18710  ┆ 74640  ┆ 16      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ onERC1155Received                      ┆ 906             ┆ 906    ┆ 906    ┆ 906    ┆ 90      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ redeem                                 ┆ 4184            ┆ 30614  ┆ 41299  ┆ 41299  ┆ 8       │
+│ redeem                                 ┆ 4184            ┆ 30041  ┆ 40565  ┆ 40565  ┆ 8       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ selfPermitAll                          ┆ 48901           ┆ 48901  ┆ 48901  ┆ 48901  ┆ 1       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
@@ -355,22 +357,26 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ start                                  ┆ 401             ┆ 110444 ┆ 112450 ┆ 124682 ┆ 73      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ withdrawERC1155                        ┆ 4326            ┆ 15176  ┆ 6293   ┆ 33370  ┆ 8       │
+│ supply                                 ┆ 372             ┆ 372    ┆ 372    ┆ 372    ┆ 89      │
+├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
+│ transfer                               ┆ 437             ┆ 437    ┆ 437    ┆ 437    ┆ 89      │
+├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
+│ withdrawERC1155                        ┆ 4326            ┆ 14989  ┆ 6293   ┆ 32872  ┆ 8       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ withdrawERC20                          ┆ 4303            ┆ 16070  ┆ 6270   ┆ 30622  ┆ 9       │
+│ withdrawERC20                          ┆ 4303            ┆ 15737  ┆ 6270   ┆ 29872  ┆ 9       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ withdrawERC721                         ┆ 4369            ┆ 12046  ┆ 6336   ┆ 31545  ┆ 13      │
+│ withdrawERC721                         ┆ 4369            ┆ 11704  ┆ 6336   ┆ 30804  ┆ 13      │
 ╰────────────────────────────────────────┴─────────────────┴────────┴────────┴────────┴─────────╯
 ╭──────────────────────────────────────────────┬─────────────────┬────────┬────────┬────────┬─────────╮
 │ src/modules/Migration.sol:Migration contract ┆                 ┆        ┆        ┆        ┆         │
 ╞══════════════════════════════════════════════╪═════════════════╪════════╪════════╪════════╪═════════╡
 │ Deployment Cost                              ┆ Deployment Size ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ 3202385                                      ┆ 15886           ┆        ┆        ┆        ┆         │
+│ 3206993                                      ┆ 15909           ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ Function Name                                ┆ min             ┆ avg    ┆ median ┆ max    ┆ # calls │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ batchMigrateVaultERC1155                     ┆ 7758            ┆ 33519  ┆ 33973  ┆ 58374  ┆ 4       │
+│ batchMigrateVaultERC1155                     ┆ 7758            ┆ 33583  ┆ 34037  ┆ 58502  ┆ 4       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ commit                                       ┆ 4258            ┆ 175070 ┆ 187216 ┆ 187216 ┆ 30      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
@@ -384,23 +390,23 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ migrateFractions                             ┆ 4079            ┆ 15069  ┆ 5786   ┆ 39271  ┆ 6       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ migrateVaultERC1155                          ┆ 6408            ┆ 17184  ┆ 10222  ┆ 34923  ┆ 3       │
+│ migrateVaultERC1155                          ┆ 6408            ┆ 17018  ┆ 10222  ┆ 34425  ┆ 3       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ migrateVaultERC20                            ┆ 6404            ┆ 19749  ┆ 20203  ┆ 32188  ┆ 4       │
+│ migrateVaultERC20                            ┆ 6404            ┆ 19375  ┆ 19828  ┆ 31439  ┆ 4       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ migrateVaultERC721                           ┆ 6449            ┆ 16602  ┆ 10263  ┆ 33095  ┆ 6       │
+│ migrateVaultERC721                           ┆ 6449            ┆ 16355  ┆ 10263  ┆ 32353  ┆ 6       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ migrationInfo                                ┆ 1741            ┆ 2741   ┆ 2741   ┆ 3741   ┆ 2       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ multicall                                    ┆ 8028            ┆ 47590  ┆ 11839  ┆ 122903 ┆ 3       │
+│ multicall                                    ┆ 8028            ┆ 47135  ┆ 11839  ┆ 121540 ┆ 3       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ onERC1155Received                            ┆ 906             ┆ 906    ┆ 906    ┆ 906    ┆ 75      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ propose                                      ┆ 8664            ┆ 301806 ┆ 315195 ┆ 317516 ┆ 36      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ settleFractions                              ┆ 2861            ┆ 72198  ┆ 86017  ┆ 86017  ┆ 18      │
+│ settleFractions                              ┆ 2861            ┆ 72293  ┆ 86131  ┆ 86131  ┆ 18      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ settleVault                                  ┆ 2864            ┆ 197792 ┆ 307422 ┆ 307422 ┆ 25      │
+│ settleVault                                  ┆ 2864            ┆ 197821 ┆ 307466 ┆ 307466 ┆ 25      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ withdrawContribution                         ┆ 3947            ┆ 7867   ┆ 5842   ┆ 13812  ┆ 3       │
 ╰──────────────────────────────────────────────┴─────────────────┴────────┴────────┴────────┴─────────╯
@@ -409,7 +415,7 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ╞═════════════════════════════════════════════════════════╪═════════════════╪════════╪════════╪════════╪═════════╡
 │ Deployment Cost                                         ┆ Deployment Size ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ 1370801                                                 ┆ 6894            ┆        ┆        ┆        ┆         │
+│ 1373608                                                 ┆ 6908            ┆        ┆        ┆        ┆         │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ Function Name                                           ┆ min             ┆ avg    ┆ median ┆ max    ┆ # calls │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
@@ -417,9 +423,9 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ batchDepositERC20                                       ┆ 28020           ┆ 28020  ┆ 28020  ┆ 28020  ┆ 1       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ batchDepositERC721                                      ┆ 25132           ┆ 25132  ┆ 25132  ┆ 25132  ┆ 1       │
+│ batchDepositERC721                                      ┆ 25178           ┆ 25178  ┆ 25178  ┆ 25178  ┆ 1       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ deployVault                                             ┆ 320402          ┆ 321613 ┆ 320402 ┆ 376137 ┆ 92      │
+│ deployVault                                             ┆ 320569          ┆ 321780 ┆ 320569 ┆ 376304 ┆ 92      │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ generateMerkleTree                                      ┆ 12097           ┆ 12097  ┆ 12097  ┆ 12097  ┆ 153     │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
@@ -429,7 +435,7 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ getRoot                                                 ┆ 4837            ┆ 4837   ┆ 4837   ┆ 4837   ┆ 153     │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ multicall                                               ┆ 113609          ┆ 113609 ┆ 113609 ┆ 113609 ┆ 1       │
+│ multicall                                               ┆ 113655          ┆ 113655 ┆ 113655 ┆ 113655 ┆ 1       │
 ╰─────────────────────────────────────────────────────────┴─────────────────┴────────┴────────┴────────┴─────────╯
 ╭─────────────────────────────────────────────────────────────────┬─────────────────┬────────┬────────┬────────┬─────────╮
 │ src/references/TransferReference.sol:TransferReference contract ┆                 ┆        ┆        ┆        ┆         │
@@ -472,7 +478,7 @@ Test result: ok. 17 passed; 0 failed; finished in 1.66s
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ Function Name                              ┆ min             ┆ avg   ┆ median ┆ max    ┆ # calls │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
-│ ERC1155BatchTransferFrom                   ┆ 44931           ┆ 61914 ┆ 56832  ┆ 101245 ┆ 5       │
+│ ERC1155BatchTransferFrom                   ┆ 44967           ┆ 61928 ┆ 56832  ┆ 101245 ┆ 5       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
 │ ERC1155TransferFrom                        ┆ 20215           ┆ 22285 ┆ 22555  ┆ 23815  ┆ 4       │
 ├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤