Skip to content

feat: Soroban USDC vault contract - #66

Merged
collinsezedike merged 1 commit into
mainfrom
feat/soroban-vault
May 25, 2026
Merged

feat: Soroban USDC vault contract#66
collinsezedike merged 1 commit into
mainfrom
feat/soroban-vault

Conversation

@collinsezedike

@collinsezedike collinsezedike commented May 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Implements the MeridianVault Soroban smart contract in packages/contracts/vault/src/lib.rs
  • Users deposit USDC and receive proportional mUSDC shares; shares appreciate as yield accrues
  • deposit accepts a Protocol parameter (Blend | DeFindex) resolved off-chain at call time, so the user signs the routing decision before submission
  • withdraw burns mUSDC shares and returns proportional USDC back to the caller
  • View functions: get_position, get_active_protocol, get_total_assets, get_total_shares
  • Test snapshots committed and marked linguist-generated in .gitattributes to suppress noise in GitHub diffs

Test plan

  • cargo test passes all 4 tests: deposit_mints_shares, withdraw_returns_usdc, share_price_reflects_yield, withdraw_more_than_balance_panics
  • share_price_reflects_yield confirms a second depositor receives fewer shares after yield accrual
  • withdraw_more_than_balance_panics confirms the contract panics with "insufficient shares"
  • Snapshot files in test_snapshots/ are collapsed in the GitHub diff (linguist-generated)

@vercel

vercel Bot commented May 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meridian Ready Ready Preview, Comment May 24, 2026 5:13pm

@collinsezedike
collinsezedike merged commit f85720b into main May 25, 2026
4 checks passed
@collinsezedike
collinsezedike deleted the feat/soroban-vault branch May 25, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant