Skip to content
Open
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Constant product AMM (x·y=k) — create liquidity pools, deposit and withdraw l

[⚓ Anchor](./tokens/token-swap/anchor) [💫 Quasar](./tokens/token-swap/quasar)

### Asset Leasing

Fixed-term leasing of SPL tokens with SPL collateral, per-second rent, and Pyth-priced liquidation — lessors list tokens, lessees post collateral, keepers liquidate undercollateralised positions.

[⚓ Anchor](./defi/asset-leasing/anchor)

### Escrow

Peer-to-peer OTC trade — one user deposits token A and specifies how much token B they want. A counterparty fulfils the offer and both sides receive their tokens atomically.
Expand Down
7 changes: 7 additions & 0 deletions defi/asset-leasing/anchor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.anchor
.DS_Store
target
**/*.rs.bk
node_modules
test-ledger
.yarn
20 changes: 20 additions & 0 deletions defi/asset-leasing/anchor/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[toolchain]
# Pin Solana to the version used across the repo's Anchor 1.0 examples so the
# bundled test validator and BPF toolchain stay in lock-step.
solana_version = "3.1.8"

[features]
resolution = true
skip-lint = false

[programs.localnet]
asset_leasing = "HHKEhLk6dyzG4mK1isPyZiHcEMW4J1CRKryzyQ3JFtnF"

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

[scripts]
# LiteSVM Rust tests live under `programs/asset-leasing/tests/` and include the
# built `.so` via `include_bytes!`, so a fresh `anchor build` must run first.
test = "cargo test"
15 changes: 15 additions & 0 deletions defi/asset-leasing/anchor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[workspace]
# Local workspace — the repo root Cargo.toml does not include Anchor projects,
# each Anchor example ships its own workspace plus Cargo.lock.
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