Connect your wallet to trade
24 |Once connected, your balances and the trade form will appear here.
25 |├── apps ├── .shadow_swap_mxe_native_attempt │ ├── encrypted-ixs │ │ ├── lib.rs │ │ ├── src │ │ │ └── lib.rs │ │ └── Cargo.toml │ ├── Cargo.toml │ ├── .gitignore │ ├── Anchor.toml │ ├── programs │ │ └── shadow_swap │ │ │ └── Cargo.toml │ ├── package.json │ └── Arcium.toml ├── anchor_program │ ├── .gitignore │ ├── .prettierignore │ ├── Cargo.toml │ ├── Anchor.toml │ ├── programs │ │ └── shadow_swap │ │ │ └── Cargo.toml │ ├── scripts │ │ ├── cancel-all-orders.js │ │ ├── clear-orders.js │ │ └── clear-orderbook.js │ └── README.md ├── settlement_bot │ ├── .gitignore │ ├── tsconfig.json │ ├── .env.example │ ├── package.json │ └── src │ │ └── types.ts ├── frontend │ ├── pages │ │ ├── admin │ │ │ └── index.tsx │ │ └── api │ │ │ ├── admin │ │ │ └── analytics.ts │ │ │ └── coingecko │ │ │ ├── prices.ts │ │ │ └── market_chart.ts │ ├── lib │ │ ├── mocks.ts │ │ ├── coingecko.ts │ │ ├── marketData.ts │ │ └── apiClient.ts │ ├── components │ │ ├── primitives │ │ │ └── Card.tsx │ │ ├── PillButton.tsx │ │ ├── IntervalTabs.tsx │ │ ├── icons │ │ │ └── CloseX.tsx │ │ └── UserAnalytics.tsx │ └── hooks │ │ └── useMarketChart.ts └── README.md ├── ShadowSwap SPA Design ├── public │ ├── icons │ │ ├── x-icon.png │ │ ├── ETH-logo.png │ │ ├── JLP-logo.png │ │ ├── JUP-logo.png │ │ ├── MET-logo.png │ │ ├── SOL-logo.png │ │ ├── CASH-logo.png │ │ ├── PAYAI-logo.webp │ │ ├── PUMP-logo.png │ │ ├── TRUMP-logo.jpg │ │ ├── USD1-logo.png │ │ ├── USDC-logo.png │ │ ├── USDG-logo.png │ │ ├── USDT-logo.png │ │ ├── WBTC-logo.png │ │ ├── cbBTC-logo.png │ │ ├── jiUSDC.logo.png │ │ ├── mSOL-logo.png │ │ ├── JitoSOL-logo.png │ │ ├── USELESS-logo.png │ │ └── syrupUSDC-logo.png │ ├── placeholder.jpg │ ├── placeholder-logo.png │ ├── placeholder-user.jpg │ ├── placeholder-logo.svg │ └── placeholder.svg ├── postcss.config.mjs ├── lib │ ├── utils.ts │ ├── admin.ts │ ├── shadowSwapIdlLoader.ts │ └── admin │ │ ├── metrics.ts │ │ └── mockData.ts ├── app │ ├── api │ │ ├── idl │ │ │ └── shadow_swap │ │ │ │ └── route.ts │ │ ├── price │ │ │ ├── route.ts │ │ │ └── history │ │ │ │ └── route.ts │ │ ├── docs │ │ │ └── [slug] │ │ │ │ └── route.ts │ │ └── jupiter │ │ │ ├── swap │ │ │ └── route.ts │ │ │ └── quote │ │ │ └── route.ts │ ├── loading.tsx │ ├── trade │ │ ├── loading.tsx │ │ └── page.tsx │ ├── layout.tsx │ └── page.tsx ├── components │ ├── ui │ │ ├── aspect-ratio.tsx │ │ ├── skeleton.tsx │ │ ├── spinner.tsx │ │ ├── use-mobile.tsx │ │ ├── sonner.tsx │ │ ├── label.tsx │ │ ├── input.tsx │ │ ├── separator.tsx │ │ ├── textarea.tsx │ │ ├── progress.tsx │ │ ├── toaster.tsx │ │ ├── collapsible.tsx │ │ ├── kbd.tsx │ │ ├── card.tsx │ │ ├── switch.tsx │ │ ├── avatar.tsx │ │ ├── loader.tsx │ │ ├── checkbox.tsx │ │ ├── radio-group.tsx │ │ ├── pill.tsx │ │ ├── button.tsx │ │ ├── hover-card.tsx │ │ ├── toggle.tsx │ │ ├── badge.tsx │ │ ├── popover.tsx │ │ ├── scroll-area.tsx │ │ ├── alert.tsx │ │ ├── tooltip.tsx │ │ ├── tabs.tsx │ │ ├── toggle-group.tsx │ │ ├── slider.tsx │ │ ├── resizable.tsx │ │ ├── accordion.tsx │ │ ├── button-group.tsx │ │ ├── input-otp.tsx │ │ ├── breadcrumb.tsx │ │ ├── empty.tsx │ │ ├── table.tsx │ │ └── pagination.tsx │ ├── theme-provider.tsx │ ├── icons │ │ └── XLogo.tsx │ ├── admin │ │ ├── KpiCards.tsx │ │ ├── AdminActions.tsx │ │ ├── OrdersChart.tsx │ │ ├── RiskPanel.tsx │ │ ├── AlertsFeed.tsx │ │ ├── VolumeCharts.tsx │ │ ├── OrderbookHealth.tsx │ │ ├── LpAnalytics.tsx │ │ └── ProgramHealth.tsx │ ├── TradeForm.tsx │ └── particle-background.tsx ├── hooks │ ├── use-mobile.ts │ ├── useOrderBook.ts │ ├── useSwap.ts │ └── useCurrentPrice.ts ├── .gitignore ├── next.config.mjs ├── tsconfig.json ├── env.template ├── docs │ └── README.md ├── README.md ├── setup-wallet.sh ├── package.json.bak └── package.json ├── packages ├── shared_types │ ├── .gitignore │ ├── package.json │ ├── tsconfig.json │ ├── README.md │ └── src │ │ └── index.ts └── README.md ├── .npmrc ├── get-devnet-usdc.sh ├── .gitignore ├── env.example ├── scripts ├── README.md └── create-token-accounts.sh └── package.json /apps/.shadow_swap_mxe_native_attempt/encrypted-ixs/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod match_orders; 2 | 3 | -------------------------------------------------------------------------------- /apps/.shadow_swap_mxe_native_attempt/encrypted-ixs/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod match_orders; 2 | 3 | -------------------------------------------------------------------------------- /apps/anchor_program/.gitignore: -------------------------------------------------------------------------------- 1 | .anchor 2 | .DS_Store 3 | target 4 | **/*.rs.bk 5 | node_modules 6 | test-ledger 7 | .yarn 8 | -------------------------------------------------------------------------------- /apps/anchor_program/.prettierignore: -------------------------------------------------------------------------------- 1 | .anchor 2 | .DS_Store 3 | target 4 | node_modules 5 | dist 6 | build 7 | test-ledger 8 | -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/x-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/x-icon.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/placeholder.jpg -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/ETH-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/ETH-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/JLP-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/JLP-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/JUP-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/JUP-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/MET-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/MET-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/SOL-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/SOL-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/CASH-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/CASH-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/PAYAI-logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/PAYAI-logo.webp -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/PUMP-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/PUMP-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/TRUMP-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/TRUMP-logo.jpg -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/USD1-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/USD1-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/USDC-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/USDC-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/USDG-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/USDG-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/USDT-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/USDT-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/WBTC-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/WBTC-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/cbBTC-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/cbBTC-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/jiUSDC.logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/jiUSDC.logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/mSOL-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/mSOL-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/placeholder-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/placeholder-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/placeholder-user.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/placeholder-user.jpg -------------------------------------------------------------------------------- /packages/shared_types/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | node_modules/ 3 | 4 | # Build output 5 | dist/ 6 | 7 | # TypeScript 8 | *.tsbuildinfo 9 | 10 | -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/JitoSOL-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/JitoSOL-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/USELESS-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/USELESS-logo.png -------------------------------------------------------------------------------- /ShadowSwap SPA Design/public/icons/syrupUSDC-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mohit-1710/Shadow_Swap/HEAD/ShadowSwap SPA Design/public/icons/syrupUSDC-logo.png -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | # Enable workspaces 2 | workspaces=true 3 | 4 | # Hoist dependencies to root 5 | hoist=true 6 | 7 | # Strict peer dependencies 8 | strict-peer-dependencies=false 9 | 10 | -------------------------------------------------------------------------------- /ShadowSwap SPA Design/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | '@tailwindcss/postcss': {}, 5 | }, 6 | } 7 | 8 | export default config 9 | -------------------------------------------------------------------------------- /ShadowSwap SPA Design/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /ShadowSwap SPA Design/app/api/idl/shadow_swap/route.ts: -------------------------------------------------------------------------------- 1 | import idl from '@/lib/idl/shadow_swap.json' 2 | 3 | export const dynamic = 'force-dynamic' 4 | 5 | export async function GET() { 6 | return Response.json(idl) 7 | } 8 | 9 | -------------------------------------------------------------------------------- /apps/.shadow_swap_mxe_native_attempt/encrypted-ixs/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "encrypted-ixs" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | crate-type = ["cdylib", "lib"] 8 | 9 | [dependencies] 10 | arcis-imports = "0.3.0" 11 | 12 | -------------------------------------------------------------------------------- /apps/anchor_program/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/shadow_swap" 4 | ] 5 | 6 | [profile.release] 7 | overflow-checks = true 8 | lto = "fat" 9 | codegen-units = 1 10 | 11 | [profile.release.build-override] 12 | opt-level = 3 13 | incremental = false 14 | codegen-units = 1 15 | -------------------------------------------------------------------------------- /ShadowSwap SPA Design/app/loading.tsx: -------------------------------------------------------------------------------- 1 | import { LoaderInline } from "@/components/ui/loader" 2 | 3 | export default function Loading() { 4 | return ( 5 |
Once connected, your balances and the trade form will appear here.
25 |Loading...
33 |{text}
} 43 || Wallet | 19 |Trades | 20 |Volume | 21 |
|---|---|---|
| {t.wallet} | 27 |{t.trades} | 28 |{fmt(t.volume)} | 29 |
| Time | Level | Message |
|---|---|---|
| {new Date(a.ts).toLocaleTimeString()} | 20 |21 | {a.level.toUpperCase()} 22 | | 23 |{a.message} | 24 |
| Pair | 26 |Spread (bps) | 27 |Depth L5 (quote) | 28 |Imbalance | 29 |Volatility | 30 |Status | 31 |
|---|---|---|---|---|---|
| {h.pair} | 37 |{h.spreadBps.toFixed(1)} | 38 |{fmt(h.depthL5)} | 39 |{h.imbalancePct.toFixed(0)}% | 40 |{h.volatility.toFixed(2)} | 41 |42 | {h.status} 43 | | 44 |
| Owner | 33 |TVL Share | 34 |Fees | 35 |APR | 36 |
|---|---|---|---|
| {r.owner} | 42 |{r.tvlShare.toFixed(1)}% | 43 |${fmt(r.fees)} | 44 |{r.apr.toFixed(1)}% | 45 |
Swap successful!
63 |Amount out: {swapResult.amountOut.toFixed(6)}
64 | 70 | View on Solscan 71 | 72 |Error: {error}
78 || Instruction | Count |
|---|---|
| {i.name} | {i.count} |