Prism
Back to Contracts
Soroswap Router VerifiedDEXAMM
CAXY7K2M8P4Q9R1S2T3U4V5W6X7Y8Z10PABCDEFGHIJKLMNOPQRSTUVWXDeployed Jan 15, 2024 · Ledger 4,201,847
Total Invocations
284,102
Storage Entries
1,847
State Size
2.4 MB
Monthly Rent
42,100 XLM
Last Invoked
2 min ago
Invocation Activity (30d)
Invocations
30d ago20d10dNow
Avg/day
9,470
Peak
14,200
Success Rate
99.2%
Contract Info
Deployed
Ledger 4,201,847
WASM Hash
a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0
WASM Size
142 KB
Functions
12
Source
Verified
swapadd_liquidityremove_liquidityget_reservesget_pairinitializeset_adminget_admindepositwithdrawget_amounts_outget_amounts_in

Top Functions

Function
24h
swap
4,847
add_liquidity
1,201
remove_liquidity
847
get_reserves
2,421
initialize
0

Recent Invocations

View all invocations →
8f2a...1b4c swapSuccess
Swapped 5,000 XLM → 485 USDC by GABC...7X92
24.2M 2 min ago
c4e9...3d7f add_liquiditySuccess
Added 10,000 XLM + 970 USDC by GDEF...9R23
18.4M 8 min ago
a1b2...8e5a swapSuccess
Swapped 12,400 XLM → 1,202 USDC by GHIJ...2M56
24.8M 15 min ago
f7d2...4c9b remove_liquiditySuccess
Removed 5,000 XLM + 485 USDC by GKLM...1V48
16.2M 22 min ago

Storage Entries

View all entries →
Key
Type
TTL
Admin
Instance
42 days
ReserveA:XLM/USDC
Persistent
38 days
ReserveB:XLM/USDC
Persistent
38 days
TotalShares:XLM/USDC
Persistent
38 days
SwapRoute:0x8f2a
Temporary
12 days

Code & WASM

WASM Hash: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0Rust
pub fn swap(\n    env: Env,\n    token_in: Address,\n    token_out: Address,\n    amount_in: i128,\n    amount_out_min: i128,\n) -> i128 {\n    let pair = get_pair(&env, &token_in, &token_out);\n    let (reserve_in, reserve_out) = pair.get_reserves();\n    let amount_out = get_amount_out(amount_in, reserve_in, reserve_out);\n    require!(amount_out >= amount_out_min, "insufficient output");\n    // ... transfer logic\n    amount_out\n}