Assessment reports>Lazer>Informational findings>Inclusion of unnecessary ,migrate, function
Category: Coding Mistakes

Inclusion of unnecessary migrate function

Informational Impact
Informational Severity
N/A Likelihood

Description

The migrate function includes the ability for administrators to set the verification_fee value to 1 wei. However, since the verification_fee value remains unchanged throughout, it is more akin to a constant than a variable. Therefore, the migrate function is deemed unnecessary.

// PythLazer.sol::migrate()
    function migrate() public onlyOwner {
        verification_fee = 1 wei;
    }

Impact

While it is not a security vulnerability, the addition of unnecessary functions may lead to wasted gas costs during deployment and hinder code optimization.

Recommendations

It is recommended to remove the following code snippet.

// PythLazer.sol::migrate()
-    function migrate() public onlyOwner {
-        verification_fee = 1 wei;
-    }

Remediation

This issue has been acknowledged by Pyth Data Association, and a fix was implemented in commit 49de9a23.

Zellic © 2025Back to top ↑