Skip to content

[Bug] Live testnet vault predates migrate_adapter, needs redeployment #514

Description

@collinsezedike

Description

packages/contracts/vault/src/lib.rs has had migrate_adapter since #464/#507 merged into main. The live testnet vault at CONTRACT_ADDRESSES.testnet.vault (CBQYEHWIRJWIPWCJFQZAOP3VAZHRWFGAUS5GZHWFDDYKMFHJ5S3YS2Q5) was never redeployed since, and does not have it.

Verified directly against the live contract:

stellar contract invoke --network testnet --source <admin> --id CBQYEHWIRJWIPWCJFQZAOP3VAZHRWFGAUS5GZHWFDDYKMFHJ5S3YS2Q5 -- --help

lists deposit, withdraw, get_admin, is_paused, set_admin, initialize, set_paused, get_adapter, set_adapter, get_position, get_principal, get_entry_time, get_total_assets, get_total_shares. No migrate_adapter.

.github/workflows/verify-contract-addresses.yml's "Verify On-Chain Bytecode" job (required, blocking) confirms this with a hash mismatch, but only runs when packages/shared/src/constants.ts or packages/stellar-sdk-helpers/src/known-pools.ts change, so this has been silently true since #464/#507 merged without ever surfacing until an unrelated PR happened to touch constants.ts.

Steps to Reproduce

  1. stellar contract invoke --network testnet --source <any> --id CBQYEHWIRJWIPWCJFQZAOP3VAZHRWFGAUS5GZHWFDDYKMFHJ5S3YS2Q5 -- --help
  2. Compare against packages/contracts/vault/src/lib.rs's current public functions

Expected Behavior

The live testnet vault's callable methods match what packages/contracts/vault/src/lib.rs currently exports, including migrate_adapter.

Actual Behavior

The live vault is missing migrate_adapter (and possibly other changes made to the vault contract since its last deployment). pnpm verify:contracts confirms a bytecode hash mismatch between the deployed contract and a fresh build from current source.

Environment

Field Value
Network testnet
Wallet N/A
Protocol affected Meridian coordinator vault

Possible Cause / Fix

Run scripts/deploy-testnet.sh for a fresh vault (+ Blend adapter) deployment, then update CONTRACT_ADDRESSES.testnet.vault and KNOWN_POOLS.testnet["meridian-usdc"].contractId to the new address. This is a breaking cutover, not an in-place patch (no upgrade path exists on any of these contracts), so it needs the same care as previous vault migrations: announce it, and update every hardcoded reference (frontend, docs, any other tooling) together in one pass. Any existing testnet positions on the old vault are stranded once the pointer moves; users would need to withdraw from the old vault before the cutover if that matters for testnet usability.

Blocks #469 (the migrate_adapter keeper) from ever functioning against the live vault, independent of the still-open rate-source (#511) and DeFindex-adapter-activation gaps.

Metadata

Metadata

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignbugSomething isn't workingcontractsInvolves writing or testing Rust/Soroban contracts in packages/contractshardComplex implementation spanning multiple packages or involving Soroban contractssorobanInvolves Soroban smart contract invocations or Soroban RPC callsstellarRequires knowledge of Stellar concepts (accounts, transactions, assets)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions