Безопасная сделка - Гарант

Buying an upgradeable smart contract: verify transfer of proxy upgrade control

A contract address does not establish who controls its logic

A buyer may receive a deployed contract address, domain and repository without gaining authority to change the code users actually execute. Upgradeable architectures commonly separate a proxy that receives calls from an implementation containing application logic. Control over upgrades may reside in a ProxyAdmin, owner role, multisignature wallet or an authorization function in the implementation. For an escrow product the distinction is material: former operators might retain the ability to change logic after the interface and business name have transferred. Begin by identifying the exact upgrade pattern and live privileged addresses from chain data. An architecture slide and a successful demo are not sufficient to establish the post-acquisition security perimeter.

Transparent, UUPS and beacon patterns require different checks

A transparent proxy normally uses a dedicated administrative arrangement to govern upgrades. UUPS places upgrade logic in the implementation and depends on proper authorization, commonly through _authorizeUpgrade. Beacon patterns can route multiple proxies through a shared implementation reference. As a result, transferring a value labeled owner is not a universal acceptance test. Another role or contract may still control the behavior. OpenZeppelin documentation explains these patterns and potential configuration pitfalls. Diligence should identify the library version, proxy address, implementation reference and relevant admin or beacon, then determine who can authorize the next upgrade. Avoid importing assumptions from another application’s architecture.

Request a complete technical and authority package

Obtain source code corresponding to verified deployed contracts, build settings, compiler versions, migration tests, upgrade history and a complete register of people controlling privileged keys. For each administrative address record whether it is an externally owned account or a multisignature, the required threshold, recovery arrangements and available gas funding. Do not request private keys in ordinary email. Control should pass through an authorized role or signer transition consistent with the actual deployment. If a departing contractor still controls a required signature, a verbal promise not to use it does not complete the transfer. Fix the chain height or block reference for each observation so the evidence can be reproduced.

Prove that the seller can no longer perform upgrades

After the agreed control change, verify resulting events and state through an independent explorer or RPC. For a ProxyAdmin configuration, inspect who can operate that contract, for UUPS, inspect the authorization logic in the implementation. For multisignature governance, verify actual members and threshold rather than trusting a display name. Search for emergency roles, pause capabilities, withdrawal rights or alternative privileged functions that may still give the seller influence. Rotating one key will not remove powers spread across several contracts. Significant values justify independent technical diligence. Record both the new authority that works and the old path that is now rejected, where a safe test can demonstrate it.

Test upgrade permissions without risking real deposits

Do not perform an experimental upgrade on a production escrow contract holding customer funds merely to satisfy an acceptance checklist. Reproduce the deployment in a suitable test environment, deploy a compatible implementation and test that the new authorized role can initiate the operation while the old role is rejected. Confirm state retention, critical settlement behavior and emergency controls. A system responsible for customer assets also needs a recovery plan for failed migrations. The test procedure and its limits should be agreed by both sides. Successful compilation of new source does not by itself prove storage-layout compatibility with a long-lived deployment that has already undergone several upgrades.

Copyright ownership and on-chain control are separate deliverables

A buyer can legally own source code without controlling the deployed proxy. The reverse can also happen: a person controls an on-chain role but lacks rights to modify or redistribute the underlying software. The acquisition schedule should separate intellectual-property rights, privileged contract roles, deployment pipelines and recovery instructions. Identify dependencies on third-party libraries and contracts as well. A statement that all smart contracts are included is too vague without an address inventory and evidence of each material permission transfer. For a later dispute, signed role-change transactions and an agreed reproducible test are far more useful than statements that the application looked functional during the demo.

A hidden ProxyAdmin in a DeFi acquisition

Imagine a buyer receiving the website and repository for a decentralized service, while the live app routes through a proxy whose ProxyAdmin remains controlled by a multisignature of former team members. Even when balances appear unchanged at closing, those signers may retain the authority to deploy a different implementation if the configured permissions allow it. The buyer should withhold final technical acceptance until the expected controls are verified or the parties negotiate an explicit allocation of the exposure. Inspect addresses, thresholds, signer history, management functions and transaction evidence. This does not imply all upgradeable contracts are unsafe, the problem is undisclosed authority and imprecise deal terms.

The final handover is an authority map with evidence

A robust acceptance record lists every material contract, its live administrative powers, verified source versions, repository hashes, successful tests, post-closing governance addresses and recovery procedures. Settlement can be tied to demonstrated transfer of upgrade control and safe operation of critical functions. In an escrow protocol, dispute authorization and withdrawal of held funds may be governed by separate roles and must be checked independently. A promise that multisig is secure is not evidence of who holds the keys. Neither is a polished management panel. The only defensible conclusion is specific to the actual deployed architecture and the chain state reviewed on the acceptance date.

A handover rehearsal before final settlement

In a test network or other agreed safe environment, the buyer performs one controlled implementation update that changes a harmless observable behavior. The parties verify who can initiate an upgrade, whether a timelock delays it, which multisig participants must sign, and how the release can be rolled back. Where the contract follows ERC-1967, read the implementation, admin, and beacon slots again rather than relying on a repository screenshot. Preserve independent evidence that the seller no longer retains an upgrade path after the planned ownership change. Merely transferring the source repository cannot meet that test: an administrator not described in the code handover could still control production. If the rehearsal conflicts with the agreement, delay the milestone payment until the authorization state is resolved.

Technical primary reference: official documentation.

2026-11-04 10:10