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
Creator
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
7d
30d
Success
Avg CPU
Last Called
swap
4,847
32,104
142,847
99.4%
24.2M insn
2 min ago
add_liquidity
1,201
8,402
48,201
98.8%
18.4M insn
8 min ago
remove_liquidity
847
5,921
32,104
99.1%
16.8M insn
22 min ago
get_reserves
2,421
12,847
28,421
100%
2.1M insn
30s ago
initialize
0
0
1
100%
42.8M insn
Jan 15, 2024
Recent Invocations
View all invocations →Storage Entries
View all entries →Key
Type
Size
TTL
Admin
Instance
64 B
42 days
ReserveA:XLM/USDC
Persistent
128 B
38 days
ReserveB:XLM/USDC
Persistent
128 B
38 days
TotalShares:XLM/USDC
Persistent
64 B
38 days
SwapRoute:0x8f2a
Temporary
256 B
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}