Enabling multi-chain asset bridging with a single click. Swim’s Propeller streamlines the swapping experience through cross-chain smart contract calls.
The multi-chain future of crypto has been a dominating narrative in these first months of 2022.
As layer 1 and 2 blockchains continue to grow in market share and sophistication, the inevitability of a multi-chain landscape is illuminated. Naturally, the need for cross-chain solutions is ever more apparent. This does not come without its share of obstacles:
- Usability: Smart contracts often depend on user transactions to facilitate cross-chain activity. Manually clicking through several approvals and transactions during the bridging process is common.
- Decentralization: Cross-chain communication involves several intermediary steps, each with a variety of failure scenarios, making designing trustless and safe technology hard
- Liquidity: Most bridging solutions rely on multiple liquidity pools and output a wrapped asset on the target chain. This leads to liquidity fragmentation.
Swim tackles all three areas. Let’s refresh our current features and then dive into the Propeller’s design.
Swim’s Current Ecosystem
Swim’s Hexapool of stable assets allows users to swap native tokens across Solana, Ethereum, and the Binance Smart Chain.
Instead of individual liquidity pools across many chains, Swim introduced a single multi-chain Hexapool of concentrated liquidity. This has been instrumental in eliminating liquidity fragmentation and providing users with native assets on their target chain.
Our protocol utilizes Wormhole for cross-chain communication. Wormhole Guardians are a subset of Solana’s Guardians, making Wormhole at the forefront of all current bridge solutions on its path to decentralization. Our multi-chain pool sits atop the fastest blockchain of the three supported: Solana. Currently, we rely on user prompted transactions to maintain a trustless system. This changes with the Propeller design.
Providing a trustless bridging process requires the need for several manual wallet approvals and transactions. We’ve tolerated this reality and sacrificed usability as a result. But that reality is changing. Our Propeller design is the missing puzzle piece — improving usability without sacrificing two pillars of our protocol: decentralization and liquidity.
We’re excited to introduce and discuss the Propeller design.
Swim’s Propeller Design
The Propeller’s design will implement a trustless mechanism that allows for asset bridging with a single click. It’s a high-impact milestone for our protocol.
Setting the Stage for Propeller
In cross-chain asset swaps, three terms are important:
- Source chain: The user is moving tokens off this chain. Their initial assets become locked on it.
- Engine: It monitors the network and posts Solana VAA’s (a message emitted by the Swim contract combined with Guardian signatures). The Propeller server is off-chain.
- Target chain: The user receives funds on this chain. It obtains information from the server during a swap.
It’s straightforward to visualize cross-chain swapping at a high level: You have initiation on a source chain, necessary steps taken by the engine, and the effort concluding on a target chain. Several smart contracts behind the scenes make this possible.
Blockchains follow a transaction-driven paradigm, making it difficult to prompt smart contract calls without manual interaction(s) from a user, as mentioned earlier. However, some protocols such as Serum’s Crank and Sushi’s Sushimaker utilize a partially off-chain service to complete a protocol function. These services perform simple tasks by invoking public smart contracts, making them as secure as the smart contract and trustless.
The Propeller engine is similar in that it’s a partially off-chain service that will invoke Swim smart contracts.
Propeller Design Details
The Propeller design allows our protocol to move away from user-prompted transactions. It enables the protocol itself to send smart contract calls. They’re encoded from the source chain, invoked by the engine, and eventually reach the target chain. Swim’s Propeller is the trustless mechanism that cranks through these calls.
Our Propeller engine is the brains behind this design. It is comparable to the Serum and Sushi examples we mentioned above. The user prompts an interaction with one smart contract transaction, and the rest is in the hands of Swim. By calling “next()” on the Propeller Smart Contract, the server can work through subsequent transactions without input from the user.
We’ll walk through the before and after to illustrate the Propeller design’s impact on user experience.
Current Swap Process (EVM to Solana)
1. User locks assets on Wormhole token bridge and specifies their Solana wallet address
2. User posts a VAA (This take 3 transactions due to constraints on Solana)
3. User claims assets via Wormhole Token bridge
4. User invokes Swim pool smart contract to receive their target token
The current process flow requires 6 manual transactions from the user.
Propeller Design Swap Process (EVM to Solana)
1. User transfers capital to source chain Propeller Smart Contract (PSC- ethereum) and specifies their Solana wallet address
a. PSC-ethereum encodes message and locks assets on the Wormhole Token Bridge
2. Propeller fetches VAA from the Wormhole Guardians
3. Propeller posts the VAA on Solana
4–6. Propeller prompts “next()” on PSC until completion
a. PSC-solana claims assets from Wormhole Token Bridge
b. PSC-solana swaps via Swim pool smart contract
c. PSC-solana sends funds to user’s Solana wallet
*4–6 A small portion of the principal sent to the Propeller engine for gas reimbursement. PSC enforces that these steps are performed in the right order for each user interaction.
Propeller’s Immediate Impact
The Propeller design significantly improves usability without sacrificing the decentralization of our cross-chain swapping protocol. We substantiate that claim with these five points:
- Users are no longer required to manually confirm transactions. Elegantly swap assets with a single confirmation.
- Users do not need tokens to pay gas on the target chain.
- Swaps do not require a Solana wallet address for non-Solana transfers (Ethereum to BNB Chain, for example).
- The process can be performed on mobile devices.
- Less human interaction means less opportunity for human error.
Thoughts on Propeller’s Future
At Swim, we believe blockchain’s future should be interconnected and we’re building it. While the Propeller design will initially be implemented for cross-chain swaps, it has potential to become a primitive for cross-chain smart contract invocation. A few possibilities for the future:
- By creating more general Propeller Smart Contracts, the Propeller could seamlessly handle complex interactions such as converting the GST SPL you earned on StepN to ETH on Ethereum to bid on an NFT you’ve been eyeballing
- The Propeller engine has been designed to eventually become fully decentralized by allowing anyone to run an a Propeller service and be paid in fees, similar to running a validator
- Offering a multi-chain bridge built into the backend of wallet extensions and dashboards. This would allow users to seamlessly swap cross-chain assets directly in their wallets (MetaMask, Phantom, etc.)
Swim aims for a future where web3 users are no longer constrained by the intricacies that come with understanding the underlying technology of each blockchain. We believe users should be able to use any dapp, on any chain, with their existing funds, without worrying about the boilerplate tasks incurred from cross-chain asset management.
Relayers in the space
Credit to Wormhole’s Relayer which Swim’s Propeller is an extension of: https://github.com/certusone/wormhole/tree/dev.v2/relayer/spy_relayer
It’s worth noting that Wormhole’s Relayer is fundamentally different from LayerZero’s: https://layerzero.network/pdf/LayerZero_Whitepaper_Release.pdf