Integrating with Ring Protocol
Last updated
Last updated
We made every effort to maintain compatibility between and Ring Swap/Launchpad interfaces. This ensures that developers can seamlessly integrate Ring Protocol without unnecessary obstacles.
To integrate Ring Swap for swapping and adding liquidity, simply replace your existing code with our Ring Swap Factory
, Ring Swap Pair Init Code
, Ring Swap Router
, Universal Router
, etc., as documented in the on the next page.
There is one small exception, though. We've introduced a layer called Few Protocol on top of Ring Protocol. Few Protocol is a token wrapping protocol that wraps any token into its respective wrapped token contract. Instead of adding the original token directly into Ring Swap, we wrap each token and add the respective wrapped token instead. This means that when quoting a token price, you'll need to quote its respective wrapped token address instead of the original token address. To find the respective wrapped token address, query through Few Factory
.
Similarly, when swapping between tokenA and tokenB, since all tokens in Ring Swap are wrapped tokens, you need to pass the path as a series of wrapped tokens. For example, if you want to swap through the path [tokenA-USDC-tokenB]
, pass [fwTokenA-fwUSDC-fwTokenB]
as the path, where token fwXXX
refers to the wrapped token corresponding to token XXX
.
This is a high-level overview of how Ring Protocol works for our early Blast Developers to quickly integrate Ring Swap. We'll be adding more detailed documents over time. If you have any questions, feel free to join our . We look forward to working closely with you.