Composable SDK: The Silver Bullet for Developers.
Composable has implemented a comprehensive cross-layer infrastructure solution known as Mosaic to develop its robust SDK. Our software development kit (SDK) serves as a consolidated tool for all developers looking to build the next generation of DeFi protocols leveraging this technology. In the current DeFi landscape, users want emerging protocols to offer solutions to the prevailing interoperability issues that exist. As a result, the SDK is well connected to our layer2-to-layer2 asset transferral network that provides developers with a single touchpoint to cross-chain interoperability, providing end-users with the interoperable and scaling solutions they need to seamlessly navigate today’s DeFi industry.
One Solution to bind them all
The Composable SDK is an integrated solution with multi-dimensional capabilities. Its functionalities range from simple cross-layer transferral mechanisms to much more sophisticated capabilities that cut across multiple blockchains, established DeFi protocols, and layer 2/scalability solutions.
Take a deep dive into a few key use cases of the Composable SDK toolset.
The Composable SDK serves as a cross-layer interoperability solution upon which developers can leverage the creation of protocols that can benefit from easy cross-layer transferrals. This is especially useful for projects that aim to scale across multiple layer 2 solutions; the SDK will be useful for projects that want to maintain multiple instances across different L2 solutions or separate blockchains. This practice is currently popular, with major protocols such as Uniswap, SushiSwap, and Curve Finance already having instances on multiple L2s in addition to the Ethereum mainnet — in fact, we have already integrated these prominent platforms into Mosaic. By building on Mosaic through the Composable SDK, many other projects (including those focused on arbitraging, yield farming, loans, and liquidity provisioning) can trailblaze alongside major players in the space to easily maintain cross-layer coordination.
Token Swaps through AMMs
Our SDK also enables developers to create a cross-chain token swap system through various Automated Market Makers (AMMs). This is made possible by the many platforms that have already been integrated into Mosaic, including Avalanche, Moonriver, Arbitrum, Polygon, Fantom, and the Ethereum mainnet. Additionally, dApps like Sushiswap, Uniswap, and Curve have also been integrated.
To easily swap assets cross-chain, developers can use one of the aforementioned AMM protocol’s packages in the SDK to get the address and ABIs of the AMM making it possible to swap between two specified tokens. Then, the user can use libraries provided by either v1-SDK-contracts (for Solidity developers) or v1-SDK-typescript (for frontend app users) (available in version 2 of Mosaic). The user then utilizes the transfer library provided by the SDK to connect to Mosaic. Mosaic’s address can be retrieved from the protocols’ package to move assets cross-chain. When funds arrive here, Swap Helpers are used to complete token swaps, while Liquidity Helpers are deployed to add liquidity into the destination pool.
Query Chainlink Price Data
The SDK contains a mechanism that enables end-users to query Chainlink price data for collateralized assets on lending protocols at risk of becoming liquidatable. A viable solution would be for users to set up notifications to this effect.
The standard procedure involves creating a bot that sends Telegram notifications whenever the position is at risk. Users can create a daemon service that uses existing contracts which import the Chainlink library to query token prices. You can set this bot such that whenever the price is lower than a predefined liquidatable threshold, notifications would be sent via Telegram to your account there. You could also enhance your experience by adding top-up features to automatically provide more collateral.
Add and remove Liquidity through AMMs
With the Composable SDK, Users can remove liquidity from a roll-up layer without having to wait weeks as usual. Using the transfer library provided, the entire withdrawal process can be completed within minutes. Liquidity can also be added to support cross-layer asset transfers as well, ensuring that these transactions can go through uninterrupted.
Create a Dashboard for the Composable Community
Developers can easily create a user-friendly dashboard (to serve as a guide) with the SDK. You can use the transfer library to customize parameters such as showing available liquidity for the token transfer, minimum/maximum transfer size, etc. Developers can also create models such as fee simulators for frontend users to further improve transparency and the user experience.
We are excited for the developer use cases of our SDK, as it will become the infrastructure upon which the next generations of innovative DeFi protocols and applications are pioneered. We will expand the SDK toolkit over the coming weeks by adding more layers and chains, making it truly indispensable for innovators. Tune in on the conversation and learn more about how Composable Finance is changing the game for Developers by joining our support channel on Discord.
Join the movement — Build tomorrow, today: