<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arnold Tsing</title>
    <description>The latest articles on DEV Community by Arnold Tsing (@arnold_tsing_a825ab9106cb).</description>
    <link>https://dev.to/arnold_tsing_a825ab9106cb</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4230881%2F5a1a0ec9-5c2a-424e-9e1b-b3db6e231db6.png</url>
      <title>DEV Community: Arnold Tsing</title>
      <link>https://dev.to/arnold_tsing_a825ab9106cb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arnold_tsing_a825ab9106cb"/>
    <language>en</language>
    <item>
      <title>Integrating cross-chain swaps without custody: a deposit-address API walkthrough</title>
      <dc:creator>Arnold Tsing</dc:creator>
      <pubDate>Sun, 08 Nov 2026 15:07:09 +0000</pubDate>
      <link>https://dev.to/arnold_tsing_a825ab9106cb/integrating-cross-chain-swaps-without-custody-a-deposit-address-api-walkthrough-4fp5</link>
      <guid>https://dev.to/arnold_tsing_a825ab9106cb/integrating-cross-chain-swaps-without-custody-a-deposit-address-api-walkthrough-4fp5</guid>
      <description>&lt;p&gt;Most swap integrations force a custody decision on you before you write a line of code. Aggregator routers need your users to connect a wallet and sign contract calls. Custodial APIs need you to hold balances. There is a third shape, and it is the one exchanges have quietly used for years: the &lt;strong&gt;deposit-address flow&lt;/strong&gt;. Your app shows the user a one-time deposit address, watches for the incoming transfer, and the service delivers the swapped asset to an address your user controls. No wallet connection, no contract approvals, no pooled funds in your name.&lt;/p&gt;

&lt;p&gt;This walkthrough shows how that flow works against a live service — &lt;a href="https://allswap.io" rel="noopener noreferrer"&gt;AllSwap&lt;/a&gt;, a non-custodial cross-chain swap service — using its public API. Everything below is based on the production endpoints; the full reference is in the &lt;a href="https://allswap.io/docs" rel="noopener noreferrer"&gt;API docs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 0: Read the asset universe (no auth needed)
&lt;/h2&gt;

&lt;p&gt;Before quoting anything, you need to know which assets exist on which chains — and under which contract address. The asset list is served publicly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://allswap.io/api/v1/assets
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each entry is a CAIP-style record:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"assetId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"symbol"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"USDT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"blockchain"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"eth"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"decimals"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"contractAddress"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0xdac17f958d2ee523a2206206994597c13d831ec7"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"isNative"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the time of writing the list covers &lt;strong&gt;317 assets across 46 chains&lt;/strong&gt; — Ethereum (61), NEAR (47), Base (40), BNB Chain (38) and Solana (21) are the deepest. Pin your integration to &lt;code&gt;assetId&lt;/code&gt;, not to the symbol: &lt;code&gt;USDT&lt;/code&gt; exists on a dozen chains, and the single most common cross-chain support ticket in this industry is a user sending the right token on the wrong chain. The &lt;code&gt;assetId&lt;/code&gt; makes that class of bug unrepresentable in your code.&lt;/p&gt;

&lt;p&gt;If you want the same data as a file for analysis, the full snapshot is also published as a public dataset on &lt;a href="https://www.kaggle.com/datasets/allswapio/allswap-supported-assets-46-chains-317-assets" rel="noopener noreferrer"&gt;Kaggle&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Get a quote with the number that matters
&lt;/h2&gt;

&lt;p&gt;The trading endpoints live on &lt;code&gt;https://api.allswap.io&lt;/code&gt; and use signed requests (an &lt;code&gt;X-Timestamp&lt;/code&gt; header is part of the scheme; see the docs for the exact signing recipe). The flow starts with &lt;code&gt;POST /v1/quote&lt;/code&gt; for a pair and amount.&lt;/p&gt;

&lt;p&gt;The field to design your UI around is &lt;strong&gt;minimum received&lt;/strong&gt;. A quote that shows an expected amount but not a guaranteed floor is hiding slippage from your user. In a deposit-address flow the rate is locked by competing market makers per route, and the quote states the minimum the recipient will get, all-in, before any funds move. Render that number prominently; it is the only number your user can hold the service to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Create the order, show one address
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;POST /v1/order&lt;/code&gt; turns a quote into an order and returns the single-use deposit address for the source chain. Two integration details matter here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The address is single-use.&lt;/strong&gt; Never cache or reuse it across orders. Treat it like a payment intent: one order, one address, one expected amount and asset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your UI's job is clarity, not custody.&lt;/strong&gt; Show the address, the exact asset and chain, and the amount. The user sends from whatever wallet or exchange they already use — that is the point of the design: your app never touches keys.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 3: Track the order to completion
&lt;/h2&gt;

&lt;p&gt;Poll &lt;code&gt;POST /v1/order/{id}/deposit&lt;/code&gt; / &lt;code&gt;GET /v1/order/{id}&lt;/code&gt; for state transitions: awaiting deposit → confirming → exchanging → sending → done. Failed swaps (wrong asset, underpayment below the route minimum) are refunded automatically to the sender, which is the correct failure mode for a non-custodial design — but your UI should still surface the state honestly instead of spinning forever. A five-state tracker with a support path beats a progress bar that lies.&lt;/p&gt;

&lt;h2&gt;
  
  
  When this shape is the wrong tool
&lt;/h2&gt;

&lt;p&gt;Deposit-address swaps are asynchronous by nature: a swap settles in minutes, not in the same block. If your product needs atomic composability inside a single transaction — flash-loan strategies, in-protocol rebalancing — you want a router contract, not this. And if your users are already inside a wallet and swapping on one chain, a DEX aggregator is fewer moving parts.&lt;/p&gt;

&lt;p&gt;But for moving value &lt;em&gt;between&lt;/em&gt; chains from an app that should never hold keys or funds — payout tools, portfolio dashboards, checkout and off-ramp flows — the deposit-address model is the integration with the smallest trust surface: one public asset list, one quote with a stated floor, one address per order, one status endpoint.&lt;/p&gt;

&lt;p&gt;The docs, endpoint reference and signing details are at &lt;a href="https://allswap.io/docs" rel="noopener noreferrer"&gt;allswap.io/docs&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>api</category>
      <category>web3</category>
      <category>cryptocurrency</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Deposit-address swaps, explained: how a cross-chain swap works without connecting a wallet</title>
      <dc:creator>Arnold Tsing</dc:creator>
      <pubDate>Fri, 06 Nov 2026 17:22:56 +0000</pubDate>
      <link>https://dev.to/arnold_tsing_a825ab9106cb/deposit-address-swaps-explained-how-a-cross-chain-swap-works-without-connecting-a-wallet-1dm5</link>
      <guid>https://dev.to/arnold_tsing_a825ab9106cb/deposit-address-swaps-explained-how-a-cross-chain-swap-works-without-connecting-a-wallet-1dm5</guid>
      <description>&lt;p&gt;Most people meet cross-chain swaps through a "connect wallet" button. You approve a token allowance, sign a transaction, and hope the contract on the other side does what the UI promised. There is a second execution model that predates most of DeFi and is still how a large share of retail swaps actually settle: the &lt;strong&gt;deposit-address swap&lt;/strong&gt;. This post explains how it works under the hood, where its risk surface is genuinely smaller, and where it is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  The two execution models
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Wallet-connected swaps&lt;/strong&gt; keep your keys in the loop the whole time. Your wallet signs an approval and a swap transaction against a contract (or an aggregator that routes through contracts). You never "send money to a website", but you do grant contracts spending rights over your tokens, and the swap executes inside your transaction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deposit-address swaps&lt;/strong&gt; split the exchange into two ordinary transfers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The service quotes you a rate and generates a &lt;strong&gt;single-use deposit address&lt;/strong&gt; on the source chain, bound to your order.&lt;/li&gt;
&lt;li&gt;You send the source asset to that address from any wallet or exchange account — no connection, no approval, no signature beyond the transfer itself.&lt;/li&gt;
&lt;li&gt;Once the deposit confirms, the service executes the trade on its side (typically by letting market makers bid on the route) and pays the destination asset to the payout address &lt;strong&gt;you&lt;/strong&gt; specified.&lt;/li&gt;
&lt;li&gt;If anything in the order cannot execute — wrong asset, expired quote conditions, a failed leg — the deposit is refunded to your refund address automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is the entire protocol. The "smart" part is not a contract; it is order state management: matching an inbound transfer to an order, executing against liquidity, and paying out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the risk surface is different (not just "smaller")
&lt;/h2&gt;

&lt;p&gt;With wallet-connected swaps, the dominant risks are &lt;strong&gt;approval risk&lt;/strong&gt; (a malicious or later-exploited contract draining an unlimited allowance) and &lt;strong&gt;signing risk&lt;/strong&gt; (blind-signing a payload you did not fully parse). Both have produced nine-figure losses, and both disappear in the deposit model: there is no allowance to exploit, and the only signature you ever produce is a plain transfer you initiate yourself.&lt;/p&gt;

&lt;p&gt;The deposit model has its own, different risks, and it is worth being precise about them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Counterparty/custody window.&lt;/strong&gt; Between your deposit confirming and the payout landing, the service holds your funds. The window is minutes, not days, but it is real. You are trusting the operator's solvency and honesty for that window — the same trust model as an instant-exchange, because that is what this is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Address errors are on you.&lt;/strong&gt; Send the wrong asset, or the right asset on the wrong chain, and recovery depends on the operator's tooling (many publish a &lt;a href="https://allswap.io/help" rel="noopener noreferrer"&gt;wrong-address recovery policy&lt;/a&gt;). A contract swap would simply have reverted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quote risk.&lt;/strong&gt; A good implementation shows you a &lt;em&gt;minimum received&lt;/em&gt; amount in the all-in quote before you send — fees and expected slippage included — and refunds rather than re-quotes you silently if the market moves beyond it. If a service only shows an "estimated" rate with no floor, that is where your risk concentrates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A fair summary: wallet-connected swaps minimize counterparty trust and maximize signing/approval risk; deposit-address swaps do the opposite. Which trade-off is right depends on the user, the amount, and whether the source funds even live in a self-custody wallet (funds sitting on a centralized exchange cannot "connect" to anything — a deposit transfer is the only option).&lt;/p&gt;

&lt;h2&gt;
  
  
  What a good quote should show you
&lt;/h2&gt;

&lt;p&gt;Before sending anything, you should be able to see, in one place:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The exact input amount and the &lt;strong&gt;minimum&lt;/strong&gt; output amount (not just an estimate)&lt;/li&gt;
&lt;li&gt;The service fee as a number, not buried in the rate (a transparent example: &lt;a href="https://allswap.io/fees" rel="noopener noreferrer"&gt;a flat 0.25% fee schedule&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;The deposit deadline and what happens on expiry&lt;/li&gt;
&lt;li&gt;The refund address the funds return to if execution fails&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If any of those are missing, you are not looking at a quote — you are looking at an advertisement.&lt;/p&gt;

&lt;h2&gt;
  
  
  When each model wins
&lt;/h2&gt;

&lt;p&gt;Deposit-address swaps are the pragmatic choice when funds start on an exchange, when the destination chain has no mature DEX liquidity, when you want zero approvals touching a cold wallet, or when you are integrating programmatically — the model maps cleanly onto a REST API (create order → get deposit address → watch status), which is how aggregators embed it; see a &lt;a href="https://allswap.io/docs/quickstart" rel="noopener noreferrer"&gt;typical API quickstart&lt;/a&gt; for the shape of that flow.&lt;/p&gt;

&lt;p&gt;Wallet-connected swaps win when you want settlement atomicity, when amounts are large enough that even a minutes-long custody window matters, and when deep on-chain liquidity exists on both sides.&lt;/p&gt;

&lt;p&gt;Neither model is "the future" to the exclusion of the other. But if your mental model of swapping starts and ends with a connect button, it is worth knowing the older machine is still running a lot of volume — and exactly which risks it trades away, and which it keeps.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I work with &lt;a href="https://allswap.io" rel="noopener noreferrer"&gt;AllSwap&lt;/a&gt;, a non-custodial cross-chain swap service built on the deposit-address model described above (46 chains, no account, no KYC). Longer comparison of swaps vs. bridges: &lt;a href="https://allswap.io/learn/cross-chain-swap-vs-bridge" rel="noopener noreferrer"&gt;Cross-Chain Swap vs Bridge&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>cryptocurrency</category>
      <category>defi</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
