Skip to content

Commit ef0b504

Browse files
authored
Merge pull request #42 from quicknode/claude/upbeat-ride-7YCIz
Add defi/vault-strategy anchor program with mock swap router
2 parents 5540080 + 691f96b commit ef0b504

33 files changed

Lines changed: 3028 additions & 0 deletions

Cargo.lock

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ members = [
4848
"basics/transfer-sol/anchor/programs/*",
4949
"basics/transfer-sol/asm",
5050

51+
# defi
52+
"defi/vault-strategy/anchor/programs/vault-strategy",
53+
"defi/vault-strategy/anchor/programs/mock-swap-router",
54+
5155
# tokens
5256
"tokens/token-extensions/mint-close-authority/native/program",
5357
"tokens/token-extensions/non-transferable/native/program",

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ Read offchain price data [onchain](https://solana.com/docs/terminology#onchain)
4141

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

44+
### Vault Strategy
45+
46+
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.
47+
48+
[⚓ Anchor](./defi/vault-strategy/anchor)
49+
4450
## Basics
4551

4652
### Hello Solana
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.anchor
2+
.DS_Store
3+
target
4+
**/*.rs.bk
5+
node_modules
6+
test-ledger
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[toolchain]
2+
solana_version = "3.1.8"
3+
4+
[features]
5+
resolution = true
6+
skip-lint = false
7+
8+
[programs.localnet]
9+
vault_strategy = "VLT5W7bqhRN4nCdRpXm8UfHRxZd9EuZGqiSAkGHQfGh"
10+
mock_swap_router = "SWPR8Rk3aq3DrDGLdaANq7xCMnXoUFUJWJJmCWxc8Jm"
11+
12+
[provider]
13+
cluster = "Localnet"
14+
wallet = "~/.config/solana/id.json"
15+
16+
[scripts]
17+
test = "cargo test"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[workspace]
2+
members = [
3+
"programs/*"
4+
]
5+
resolver = "2"
6+
7+
[profile.release]
8+
overflow-checks = true
9+
lto = "fat"
10+
codegen-units = 1
11+
12+
[profile.release.build-override]
13+
opt-level = 3
14+
incremental = false
15+
codegen-units = 1

0 commit comments

Comments
 (0)