Skip to content
Misconfiguration Audit finding Beginner

hardcoded V3_POS_MGR address won't be the same on every chain

The V3Locker contract's constructor hardcodes a single NonfungiblePositionManager address, but that address is not the same on every chain the protocol targets. As a result the locker cannot function correctly on chains where the deployed position manager lives at a different address.

0xAadi Follow with AuditorPraise, OpaBatyo and 3 others

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2025-01-peapods-finance-judging/issues/297

Found by

0xAadi, AuditorPraise, OpaBatyo, X77, axelot, pkqs90

Summary

Chains in scope are Ethereum, Arbitrum One, Base, Mode, Berachain...... hardcoded NonfungiblePositionManager address - > 0xC36442b4a4522E871399CD717aBDD847Ab11FE88 won't be the same on every chain.

Root Cause

In V3Locker.sol's constructor

Solidity
constructor() Ownable(_msgSender()) {
        CREATED = block.timestamp;
        V3_POS_MGR = INonfungiblePositionManager(0xC36442b4a4522E871399CD717aBDD847Ab11FE88);//@audit-issue hardcoded address won't be the same on every chain.
    }

https://github.com/sherlock-audit/2025-01-peapods-finance/blob/main/contracts/contracts/V3Locker.sol#L15 V3_POS_MGR is hardcoded to 0xC36442b4a4522E871399CD717aBDD847Ab11FE88 which won't be the same on all the chains in scope for this audit.

Internal Pre-conditions

_NO_Reponse

External Pre-conditions

_NO_Response

Attack Path

_NO_Response

Impact

V3Locker.sol can't function properly on all chains in scope for this audit.

PoC

No response

Mitigation

Make V3_POS_MGR updateable by adding an external function to enable V3_POS_MGR to be updateable

The original report as published on Sherlock, by 0xAadi. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The constructor assigns a single literal address to V3_POS_MGR instead of resolving the correct NonfungiblePositionManager per chain.

Impact

V3Locker.sol can't function properly on all chains in scope for this audit.

What the attacker needed

Deployment on a chain with a different address

The fix

V3_POS_MGR should be made updateable, for example by adding an external function that lets it be changed.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A smart contract sometimes needs to talk to another contract, and it stores that other contract's address. Here the address was typed in once as a fixed value, but the same helper contract is deployed at different addresses on different blockchains. So on most chains the locker would be pointing at nothing useful.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by 0xAadi

View all

13 more disclosed reports, best first.

More from Peapods

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.