Skip to content

feat: implement issues #83, #89, #98, #108#128

Merged
edehvictor merged 1 commit intoedehvictor:mainfrom
leojay-net:feature/issues-83-89-98-108
Mar 29, 2026
Merged

feat: implement issues #83, #89, #98, #108#128
edehvictor merged 1 commit intoedehvictor:mainfrom
leojay-net:feature/issues-83-89-98-108

Conversation

@leojay-net
Copy link
Copy Markdown
Contributor

@leojay-net leojay-net commented Mar 29, 2026

feat: implement issues #83, #89, #98, #108

#83 — StableSwap Invariant AMM (Curve Stableswap Math)

  • Add contracts/stableswap/ Soroban contract implementing the Stableswap
    invariant (Curve-style, n=2 tokens) using Newton-Raphson iteration for D
  • Implement initialize, add_liquidity, remove_liquidity, and swap functions
  • Dynamic fee adjustment: fee = base_fee + imbalance_ratio * fee_multiplier
    where imbalance_ratio = |x-y|/(x+y), increasing fee on imbalanced pools
  • Add compute_d and compute_y Newton-Raphson math helpers with overflow guards
  • 11 unit tests covering invariant correctness, symmetry, edge cases, fee logic,
    and initialization validation
  • Register in contracts Cargo.toml workspace

#89 — Stealth Addresses for Private Yield Deposits

  • Add contracts/stealth_addresses/ Soroban contract implementing a
    stealth address registry and deposit routing
  • StealthMetaAddress: recipients publish view + spend public keys (32-byte
    Ed25519 keys) via register_meta_address
  • deposit: sender provides pre-computed one_time_address (derived off-chain via
    DH: s=H(rKv), P=sG+Kse), ephemeral_public_key R, and view_tag byte;
    funds held in contract escrow
  • claim_deposit: only holder of one_time_address private key can claim funds,
    enforced by require_auth
  • 8 unit tests covering registration, key validation, deposit validation, and
    claim error handling
  • Register in contracts Cargo.toml workspace

#98 — Automated Slither/Mythril Security Pipeline

  • Add .github/workflows/security.yml triggered on PR/push to main when
    contracts/ paths change
  • cargo-audit job: scans dependencies for known CVEs, parses JSON results,
    posts a formatted vulnerability table as a PR comment (upsert pattern)
  • clippy-security job: runs Clippy with -D clippy::unwrap_used,
    -D clippy::expect_used, -D clippy::panic, -D clippy::arithmetic_side_effects,
    -D clippy::indexing_slicing; posts lint violations table as PR comment
  • soroban-unsafe-patterns job: grep-based scan for unsafe blocks, use std::
    in no_std contracts, and explicit panic! calls; posts findings as PR comment
  • All jobs upload artefacts and always-post PR comments (upsert to avoid spam)

#108 — Unified Multi-Wallet Connector Library

  • Add client/src/auth/walletAdapters.ts: WalletAdapter interface with
    isAvailable, getPublicKey, signTransaction; implementations for Freighter
    (@stellar/freighter-api), xBull (@creit.tech/xbull-wallet-connect), Albedo
    (@albedo-link/intent); EXTENSION_ADAPTERS registry + getAdapter()
  • Extend WalletProviderId to include 'xbull' | 'albedo' (new
    ExtensionWalletProviderId union type)
  • Update session.ts: unified extension-wallet branch routes through adapter,
    removing per-wallet Freighter-specific SDK calls
  • Update WalletContextObject.ts: add signTransaction(xdr, passphrase) to
    WalletContextValue interface
  • Update WalletContext.tsx: implement signTransaction using the active
    provider's adapter; expose via context value
  • Update soroban.ts: executeContractCall, deposit, withdraw accept optional
    signTx parameter; callers can pass wallet.signTransaction from useWallet()
    so any wallet adapter works transparently
  • Update WalletConnectionModal.tsx: add xBull and Albedo buttons in new
    'Browser Wallets' section alongside Freighter
  • Install @creit.tech/xbull-wallet-connect@0.4.0 and @albedo-link/intent@0.13.0

Closes #83
Closes #89
Closes #98
Closes #108

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

@leojay-net is attempting to deploy a commit to the Edeh Victor's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@leojay-net Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

…dehvictor#108

- Add contracts/stableswap/ Soroban contract implementing the Stableswap
  invariant (Curve-style, n=2 tokens) using Newton-Raphson iteration for D
- Implement initialize, add_liquidity, remove_liquidity, and swap functions
- Dynamic fee adjustment: fee = base_fee + imbalance_ratio * fee_multiplier
  where imbalance_ratio = |x-y|/(x+y), increasing fee on imbalanced pools
- Add compute_d and compute_y Newton-Raphson math helpers with overflow guards
- 11 unit tests covering invariant correctness, symmetry, edge cases, fee logic,
  and initialization validation
- Register in contracts Cargo.toml workspace

- Add contracts/stealth_addresses/ Soroban contract implementing a
  stealth address registry and deposit routing
- StealthMetaAddress: recipients publish view + spend public keys (32-byte
  Ed25519 keys) via register_meta_address
- deposit: sender provides pre-computed one_time_address (derived off-chain via
  DH: s=H(r*Kv), P=s*G+Kse), ephemeral_public_key R, and view_tag byte;
  funds held in contract escrow
- claim_deposit: only holder of one_time_address private key can claim funds,
  enforced by require_auth
- 8 unit tests covering registration, key validation, deposit validation, and
  claim error handling
- Register in contracts Cargo.toml workspace

- Add .github/workflows/security.yml triggered on PR/push to main when
  contracts/ paths change
- cargo-audit job: scans dependencies for known CVEs, parses JSON results,
  posts a formatted vulnerability table as a PR comment (upsert pattern)
- clippy-security job: runs Clippy with -D clippy::unwrap_used,
  -D clippy::expect_used, -D clippy::panic, -D clippy::arithmetic_side_effects,
  -D clippy::indexing_slicing; posts lint violations table as PR comment
- soroban-unsafe-patterns job: grep-based scan for unsafe blocks, use std::
  in no_std contracts, and explicit panic! calls; posts findings as PR comment
- All jobs upload artefacts and always-post PR comments (upsert to avoid spam)

- Add client/src/auth/walletAdapters.ts: WalletAdapter interface with
  isAvailable, getPublicKey, signTransaction; implementations for Freighter
  (@stellar/freighter-api), xBull (@creit.tech/xbull-wallet-connect), Albedo
  (@albedo-link/intent); EXTENSION_ADAPTERS registry + getAdapter()
- Extend WalletProviderId to include 'xbull' | 'albedo' (new
  ExtensionWalletProviderId union type)
- Update session.ts: unified extension-wallet branch routes through adapter,
  removing per-wallet Freighter-specific SDK calls
- Update WalletContextObject.ts: add signTransaction(xdr, passphrase) to
  WalletContextValue interface
- Update WalletContext.tsx: implement signTransaction using the active
  provider's adapter; expose via context value
- Update soroban.ts: executeContractCall, deposit, withdraw accept optional
  signTx parameter; callers can pass wallet.signTransaction from useWallet()
  so any wallet adapter works transparently
- Update WalletConnectionModal.tsx: add xBull and Albedo buttons in new
  'Browser Wallets' section alongside Freighter
- Install @creit.tech/xbull-wallet-connect@0.4.0 and @albedo-link/intent@0.13.0

Closes edehvictor#83, edehvictor#89, edehvictor#98, edehvictor#108
@leojay-net leojay-net force-pushed the feature/issues-83-89-98-108 branch from db7b786 to b8c1e50 Compare March 29, 2026 22:14
@edehvictor edehvictor merged commit 2921646 into edehvictor:main Mar 29, 2026
0 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants