Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ members = [
"basics/transfer-sol/anchor/programs/*",
"basics/transfer-sol/asm",

# defi
"defi/vault-strategy/anchor/programs/vault-strategy",
"defi/vault-strategy/anchor/programs/mock-swap-router",

# tokens
"tokens/token-extensions/mint-close-authority/native/program",
"tokens/token-extensions/non-transferable/native/program",
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ Read offchain price data [onchain](https://solana.com/docs/terminology#onchain)

[⚓ Anchor](./oracles/pyth/anchor) [💫 Quasar](./oracles/pyth/quasar)

### Vault Strategy

Manager-run investment vault — deposit USDC, manager allocates across a basket of assets (TSLAx, NVDAx), withdraw proportional in-kind assets. Demonstrates share minting, NAV-based pricing, management fee accrual, and CPI to a swap router.

[⚓ Anchor](./defi/vault-strategy/anchor)

## Basics

### Hello Solana
Expand Down
6 changes: 6 additions & 0 deletions defi/vault-strategy/anchor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.anchor
.DS_Store
target
**/*.rs.bk
node_modules
test-ledger
17 changes: 17 additions & 0 deletions defi/vault-strategy/anchor/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[toolchain]
solana_version = "3.1.8"

[features]
resolution = true
skip-lint = false

[programs.localnet]
vault_strategy = "VLT5W7bqhRN4nCdRpXm8UfHRxZd9EuZGqiSAkGHQfGh"
mock_swap_router = "SWPR8Rk3aq3DrDGLdaANq7xCMnXoUFUJWJJmCWxc8Jm"

[provider]
cluster = "Localnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "cargo test"
15 changes: 15 additions & 0 deletions defi/vault-strategy/anchor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[workspace]
members = [
"programs/*"
]
resolver = "2"

[profile.release]
overflow-checks = true
lto = "fat"
codegen-units = 1

[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
Loading
Loading