Blog · Guides · 7 min read

Solana program upgrade authority: how to secure it with a multisig

By Kuba Malarczyk, Founder ·

The upgrade authority of a Solana program is the key that can replace its code, so it controls everything the program does. Do not leave it in the deployer wallet. Move it to a multisig with several independent signers, rehearse an upgrade on devnet, and consider a timelock or making the program immutable once the code is stable and audited.

Who should hold the upgrade authority
HolderRiskVerdict
Deployer hot walletOne leaked key replaces the programAvoid
Development agencyYou depend on a third party for your own codeAvoid
Multisig (for example 3 of 5)Needs several signers to be compromisedGood default
Multisig plus timelockUsers get notice before any changeBest while upgradeable
None (immutable)No upgrade risk, and no bug fixesWhen the code is final
Key takeaways
  • Whoever holds the upgrade authority can replace your program with any code, including code that drains funds.
  • Move it from the deployer wallet to a multisig before launch, with signers who are different people on different devices.
  • Rehearse one full upgrade through the multisig on devnet, so the first real one is not also the first attempt.
  • Add a timelock if users hold funds in your program, so changes are visible before they run.
  • Making the program immutable is irreversible: do it only when the code is final and audited.

Most teams spend weeks on the code and minutes on the key that can rewrite it. On Solana, a program deployed with the upgradeable loader can be replaced by whoever holds its upgrade authority. An audit covers the code at one commit. The upgrade authority decides what the code will be tomorrow, which makes it one of the first things auditors, partners and informed users look at.

What the upgrade authority is

A deployed program has a program account and a separate program data account that holds the code and the address of its upgrade authority. Anyone can read that address. You can see it with solana program show and the program ID, or in a block explorer. If the authority is a single wallet, the safety of your whole protocol is the safety of that one wallet.

Why a single key is a problem

Move it to a multisig

A multisig is a wallet that needs approval from several signers before it executes a transaction. On Solana, teams commonly use Squads for this. The steps are the same whichever tool you pick:

Check it from the outside. After the transfer, look the program up in an explorer as a stranger would. If it still shows a normal wallet as the authority, the change did not happen. Pair this with a verifiable build, as described in the pre-launch security checklist.

Timelocks and immutability

A timelock adds a delay between the approval of an upgrade and its execution. It gives users and monitors time to see a change and react, and it limits the damage if signers are compromised. It matters most when users deposit funds into the program.

Making the program immutable removes the authority for good (--final in the CLI). It is the strongest guarantee for users and it cannot be undone, so you lose the ability to fix bugs. Many teams keep a multisig with a timelock through the first months, then revoke the authority once the code has run under real usage and a bug bounty.

Mistakes we see

If you hired a developer

State in the contract that you own the code, the repository and the upgrade authority, and confirm the transfer on-chain at delivery. The questions in how to hire a Solana development company cover this, and milestone payments let you tie the final payment to the handover. Related terms: upgrade authority and multisig.

Frequently asked questions

What is the upgrade authority of a Solana program?

It is the key that is allowed to replace the code of a deployed program. Programs deployed with the upgradeable loader store it in a program data account. Whoever controls it can change what the program does, including its handling of user funds.

How do I check who holds the upgrade authority?

Run solana program show with the program ID, or look the program up in a block explorer. The output lists the upgrade authority address. If it is a normal wallet instead of a multisig, or it is not a key your team controls, fix that before launch.

How do I move the upgrade authority to a multisig?

Create the multisig, copy its vault address and run solana program set-upgrade-authority with the program ID and --new-upgrade-authority set to that address. Then check the result with solana program show and rehearse one upgrade through the multisig on devnet.

Should a Solana program be immutable?

Once the code is stable and audited, making it immutable removes the upgrade risk entirely, but it also removes your ability to fix bugs. Many teams keep a multisig with a timelock first and revoke the authority later. Revoking is irreversible.

Can the development agency keep the upgrade authority?

It should not. Put the handover of the upgrade authority and the repository into the contract and confirm it on-chain at delivery.

Get your launch security reviewed

Describe your program and launch date. Smart Match suggests verified Solana auditors and developers with a reason for each match. Free for teams.

Get matched →

Looking for help with this? Browse Solana smart contract audit providers, or describe your project and get matched for free.

Related reading

← All posts