Skip to content

Repository files navigation

Soluddy Vault Program

This tool helps you deploy and operate Soluddy's on-chain multi-owner vault contract. It handles vault initialization, authority rotation, and donation distribution so that you can run platform vaults with predictable behavior.

Project status: actively maintained

Basic functionality

Soluddy Vault Program is intended for use by Soluddy engineers, operators, and integration developers. It is meant to help those teams create and manage multi-owner vaults, rotate platform authority, and route donations directly to registered owners on Solana.

Soluddy Vault Program uses Anchor on Solana to define PDAs for the singleton config and per-slug vault accounts. It takes instruction inputs from Anchor clients (TypeScript or Rust) and uses them to initialize config, create vaults, and distribute lamports to owners. For more details about the technical implementation, see the developer documentation.

What Soluddy Vault Program does not do

This tool cannot manage wallets, custody keys, or provide a UI. It does not have built-in fee collection, off-chain moderation, or vault discovery surfaces.

Prerequisites

Before using this tool, you should be familiar with:

  • The basics of Solana CLI, how to use Anchor, and PDA derivation
  • Rust (program) and TypeScript (client) basics

You should have:

  • Node.js 20+, Rust 1.81+, Solana CLI 1.18+, Anchor CLI 0.31.1
  • A workstation with at least 8 GB RAM and a stable local validator
  • A funded Solana keypair and access to the target cluster when needed

How to use Soluddy Vault Program

Initialize the platform config

  1. Prepare your environment
    1. Set ANCHOR_PROVIDER_URL and ANCHOR_WALLET for the target cluster.
    2. Start solana-test-validator (or point to devnet as documented).
    3. Verify Anchor.toml cluster matches your target.
  2. Build the program with anchor build.
  3. Run yarn initialize:config (from back-end/) to write the config PDA.

Create a vault

  1. Ensure the config PDA exists and your wallet has SOL for rent.
  2. Build and deploy the latest program (anchor build or as per your pipeline).
  3. Run yarn create:vault and provide owners, slug, and metadata when prompted.

Process a donation

  1. Derive the vault PDA for the target slug.
  2. Collect the writable owner accounts in the same order as vault.owners.
  3. Invoke donate via your Anchor client with the lamport amount and owner accounts; confirm owner balances update as expected.

Troubleshooting

Config already initialized (Anchor AccountAlreadyInitialized)

  • Use update_config to rotate authority or reset your local ledger before re-initializing.

Owner accounts missing or mismatched during donate

  • Pass one writable account per owner, in order, matching the keys stored on the vault.

How to get help and report issues

  • Report issues in the project tracker.

Developer documentation

Technical implementation

This tool uses Anchor to define the on-chain program, with PDAs for a singleton config and per-vault accounts. It depends on Solana runtime syscalls and Anchor validation macros to enforce authority checks, owner lists, and metadata limits.

Code structure

The programs/soluddy-vault/src/lib.rs module wires the public instruction surface. The programs/soluddy-vault/src/contexts.rs file declares account contexts, while state.rs, events.rs, errors.rs, validators.rs, and utils.rs hold shared types, events, error codes, validation helpers, and CPI utilities. Individual handlers live under programs/soluddy-vault/src/instructions/.

Local development

Set up

How to set up development environment:

  1. Install Rust, Solana CLI, and Anchor CLI matching the versions above.
    1. Confirm solana --version and anchor --version.
    2. Run rustup update stable if needed.

Install

How to install:

  1. From back-end/, install JS toolchain dependencies.
    1. yarn install
    2. Ensure node_modules/.bin is on your PATH when running scripts.

Configure

How to configure:

  1. Set ANCHOR_WALLET to your keypair path.
  2. Set ANCHOR_PROVIDER_URL to http://localhost:8899 (or the target cluster).

Build and test

How to build and run locally:

  1. anchor build
    1. Verify the IDL and binary land in target/.
    2. Check Anchor.toml program IDs if deploying to a new cluster.

How to run tests:

  1. anchor test
    1. Ensure the validator is running or let Anchor spawn one.
    2. Inspect tests/soluddy-vault.js output for PDA or authority failures.

Debugging

  • OwnerAccountsMissing during donate

    • Supply a writable account for every owner in order; mismatch triggers this error.
  • Unauthorized when calling update_config

    • The signer must match the current config authority; rotate authority first if needed.

How to contribute

The Soluddy Vault Program maintainers welcome contributions.

  • Instruction handlers, validation improvements, and safety checks
  • Integration tests that cover new instruction branches

Contribution process

Before contributing, align with the repository's contribution expectations. We follow conventional commits and the repository's Rust and TypeScript style guides.

  1. Open an issue describing the change and scope.
    1. Include validation steps (anchor test, manual flows).
    2. Note any PDA or account layout changes for documentation updates.
  1. Submit a PR with changes and test results.
    1. Request review from a Soluddy Vault maintainer.
    2. Update docs/ references if instruction surfaces change.

Credits

Soluddy Vault is built and maintained by the Soluddy protocol and platform teams.

License

See LICENSE for the MIT License terms.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages