Switchly.com - Bridge and DEX
SCF #29 Activation Award DEX $46,000 View in SCF
A decentralized, cross-chain protocol for stablecoin bridging and exchange.
Team

Ash

mayoreee

Video URL

https://www.youtube.com/watch?v=qfu4pZuwxfE

Pitch Deck URL

Section

read

Product & Architecture

Switchly will make it significantly easier, faster and more economical for users and developers to move and swap assets across chains with an initial focus on stablecoins.

 

This will provide for a huge range of use cases, some examples:

- Swaps of USDT on Ethereum to USDC on Stellar to use a new Soroban project

- Developers using Switchly auto-converting addresses to seamlessly onboard users from other networks.

- Users selling a token for USDC on Uniswap, bridging to Stellar via Switchly then Stellar Anchor (after KYC via SEP-0012) and receiving USD in their bank account.

That last example highlights our long term goal of creating a connected, automated system that integrates decentralized exchanges, our own bridge, Stellar Anchors and more to allow users and developers to go from any asset to any asset. A system designed to remove the complexity and connect the ecosystem, minimizing barriers to adoption and opening up new opportunities for users and developers. The possibilities are endless and applicable to both cryptocurrency and conventional finance, here’s a few examples:

- Cross-chain yield-farming protocols programmatically moving and re-allocating assets to maximize yield generation. 

- Playing a decentralized game built on an Ethereum sidechain with your Stellar account. - Decentralized crypto asset backed loans, a Soroban smart-contract owned Switchly account controlling user deposits like Bitcoin and Ethereum held in the Switchly vault. Issuing a percentage of the deposit value in USDC to the user which can be off-ramped with an Anchor to USD. Secured by automatic liquidation on loan default or too much slippage in deposit asset USDC price.

Our proof of concept is live at https://switchly.com enabling swaps back and forth between USDT and USDC on the Ethereum Sepolia and Stellar testnets. Please feel free to watch our demo video or test this out yourself using the Circle faucet alongside Friendbot and a Sepolia faucet for testnet funds. 

 

Switchly is a novel implementation of a cross-chain decentralized exchange, we’ve built integrations into THORChain and Maya Protocol and based our design on their proven validator model, we have then identified ways to innovate within and compliment this space, differentiating ourselves from existing DEX and bridge protocols in a few important ways, including:

- No synthetic or wrapped assets; native assets only. 

- Long-living validator sets to minimize churn. 

- Integrating other protocols within Switchly (including CCTP and DEXs)

- Developer integration focus, for both smart-contract / Soroban and conventional SDK/API integrations.

- All assets paired against USDC; familiar, user-friendly, well-established, and with deep liquidity.

- Utilizing smart-contracts (Soroban and otherwise) where suitable for custody and swaps.

- Network owned liquidity (part of fees goes to the network itself, self-sustaining in time).

- Use of oracles for stability & security.
 

A great analog to what we’re building for V1 is the Circle Cross-Chain Transfer Protocol (CCTP) which we also intend to integrate within Switchly, utilizing it as swapping rail or to balance liquidity when economical. CCTP is a great product and we’re hopeful it will launch on Stellar soon, the key difference is Switchly will also be covering non-circle stablecoins. 

 

Stellar is integral to Switchly's success for a few key reasons:

- Access to traditional banking rails via the Anchor network.

- Industry leading signature system with the ability to add or remove signers, no need to migrate assets to new vaults on churn, addresses are no longer ephemeral and we can tie addresses long-term to specific rails and actions. 

- The power of Soroban and the continued investment in it. We believe we can play an important role in minimizing barriers to Soroban adoption for users on other chains.
 

For example; a USDC income-generating DeFi protocol built with Soroban on Stellar could use this to open the doors to the billions held in liquidity across the stable-coin space. Instead of a lengthy, friction-filled onboarding journey of deposits and manual swaps, a user could be presented with a deposit address in their chosen currency that will automatically be converted into USDC on Stellar, funding their account. 

All Switchly validators will be running their own Stellar Horizon Nodes as well as holding a joint vault via Stellar multisig or Soroban smart contract. In the case of a multisig solution, the master key will have a weight of 0 and each validator 1, with thresholds set to supermajority. We’ll be thoroughly testing this before any mainnet functionality due to the risk of setting master weight to 0! 


We’ll also be working on reference Soroban implementations as well as a front-end that works with various Stellar wallets for initiating transactions, managing liquidity, etc.

Technical Architecture Doc

https://docs.google.com/document/d/1V2yuer4mXZSB6A8rTzpKqQ8Fl1c7vzJ2R7OeUD3OLOA/edit?usp=sharing

Project URL

https://switchly.com

Code URL

https://github.com/SwitchlyProtocol

Project Categories

Product Type [If Financial Protocols]

Other Chain Description

As a cross chain decentralized-exchange / bridge solution we'll be implementing a variety of chains. Stellar is the primary chain due to the integration of Anchors, the vault not requiring churns and the goal of onboarding users from other chains onto Soroban.

Section

read

Deliverables List

Soroban Smart Contract Authorization vs  Non-smart Contract Multisig Investigation

Description
Stellar has an industry leading built in multi-sig system; the ability to both add and remove signers sets it apart and makes it especially useful in a custody situation where signers (like our validators) will churn in and out over time. There are also other advanced signature types, both pre-authorized transactions and hash(x) are potentially integral parts of our system. However we need to do a deep dive into this including worked examples to validate what the most applicable solution for validator custody and vault interaction is and how to ensure our system is accessible to Soroban and non-Soroban developers alike. 

How to measure completion
We will provide a github repository documenting our full findings as well as reference examples.
Estimated Date of Completion
2024-08-14
Budget
$4000
 

Multi-validator Upgrade & Consensus Mechanism

Description

At the moment, our demo MVP runs on just one validator; the validator ingests transactions, looks for a valid memo and then actions based on that memo, either converting to the target currency/chain or adding the funds as liquidity. The next step is to make this decentralized, this is composed of several parts including:

- Vault creation, custody and churning where validators control all the funds together with a supermajority required to act on those funds. For Stellar this will be using either a Soroban smart contract with a complex authorization setup or using the non-smart contract multisig option. For Ethereum this will be using TSS based on the work of Gennaro & Goldfeder that's been validated through hundreds of millions of dollars in custody held across various protocols using TSS. Other chains will likely use some variant of TSS; whether they are ECDSA, EdDSA or otherwise.

- Consensus, as a decentralized system the validators cant trust each other and just sign based on a leader, whilst we might use a leader to propose actions each validator much verify and act based on their own data from the nodes they run, to this end they need to reach consensus and part of that is communication. The validators will each observe the incoming transactions and then reach consensus acting on a supermajority; for example once >66.7% of the validators have signed then the action is valid and all others are invalid. At the moment we are exploring using Tendermint / CosmosBFT as well as other solutions like Mass versus building our own.

- Other Validator Deployment & Functionality; we need an effective process for nodes to be deployed (starting with a whitelist, moving towards a bonded system), discover each other and join the protocol. Likewise each validator will be deploying their own Horizon and Geth + Lighthouse instances. Finally before they can reach consensus as discussed above, the validators will also be running observers and signers for each implemented chain. 

How to measure completion
We will provide a video showing the full set-up of a multi-validator Switchly network including establishing vaults, and handling transactions including the consensus mechanism. This will also all be publicly available for developers to test themselves; although the active Switchly testnet network will be whitelist only we do invite network participants interested in becoming validators to contact us.
Estimated Date of Completion
2024-10-14
Budget
$38,000

Ancillary work including front-end upgrades & infrastructure

Description
There’s a range of other tasks and expenses including upgrading our front-end as well as infrastructure work which could involve things like using AWS cloudformation to test deploying validators at scale, the costs of running our various nodes during this development cycle. Please note, the estimated end date of completion is somewhat arbitrary as this will be an ongoing process but at that point you will be able to see updates to the front-end as well as our public nodes running multiple Horizon instances.
How to measure completion
The best way to verify this will be the on-going and expanding testnet functionality of Switchly.com as well as commits to our public github front-end repository.
Estimated Date of Completion
2024-10-14
Budget
4000

Requested Budget in USD ($)

46000

Section

read

Progress on Previous (Awarded) Submissions

CTX Spend is currently in beta with early testers whilst also undergoing security audits. It will allow Stellar users to shop at hundreds of merchants both online with brands like Amazon and Uber as well as in-person at over 150,000 locations including Starbucks, BestBuy, HomeDepot, AMC Theatres, AutoZone and more. Please contact us for a demonstration or to join our beta. 


These two projects are quite distinct from each other; with a small overlap where users may utilize Switchly to onboard into CTX. We believe in the potential of Switchly so strongly that instead of putting it on the backburner whilst working on CTX spend, we invested hundreds of hours in handing it over to another group of developers who unfortunately split and opted to pursue separate projects.

Thankfully we now have more bandwidth as CTX Spend is now under a feature freeze as it is at a production state and ready for release. Following it's public launch of we’ll be raising more capital and hiring more conventional developers to focus on that project and our 2025 roadmap including new merchants, white label partner integrations into popular wallets and exchanges as well as a full virtual Visa/Mastercard solution with Google & Apple Pay support.

Please note: Switchly.com is not owned by CTX.com Inc. it is a separate and fully decentralized project.

Total Expected Roadmap

Ultimately this is an ambitious project involving a fairly long technical roadmap; it’s also no small wonder that the SDF has invested millions in Bridge awards via SCF and otherwise. That said, we are a lean team with prior exposure to this technology and believe we can create demonstrable value throughout. We also believe in our ability to raise funding, both from partners like Stellar supporting our development and subsequently reinvesting in the value we bring and from volume trading through the bridge in time. Additionally, should we opt to do some form of token sale we’re in good company; THORChains native token RUNE has a market cap of $1.3 billion, Maya protocol has also had a lot of success with their tokens being worth over $100m. Whilst we’re operating on a USDC pairing we do have ideas for an additional token helping secure the network and earning revenue in return.

Timeline wise, we’ll use this activation award to take our functional single validator proof of concept into a multi-validator MVP and then the community award along with any other grants we raise to reach production. At that point we’ll have proven utility and value to Stellar and other chains, if that results in an additional SCF award or even more direct involvement from SDF that would be helpful welcome but we’re confident we’ll also be able to raise significant capital outside of Stellar from then on.

Team bio

Ash Francis (ash@switchly.com)

Project Lead
Responsible for project management, protocol design, design, branding, financial management, developer advocacy and QA. Additionally contributes to front-end development and any other ancillary tasks the team needs.


Alex Cox (alex@switchly.com)

Blockchain Developer https://github.com/alexdcox 
15 years as a software engineer, building high-throughput forex trading systems, managing the enterprise stack for a hosted communications provider. As a blockchain developer for the last 7 years Alex has built payment solutions, decentralized exchange integrations and node infrastructure. 
Alex also has hundreds of hours of work publicly logged building integrations into Maya protocol and THORChain: https://github.com/alexdcox/maya-dash-integration-log 


Sam (sam@switchly.com)

Blockchain Developer https://github.com/mayoreee 
An experienced engineer with the last several years working directly on blockchain projects including a fractionalized real-world asset platform focused on art, rust wallets and node libraries and a blockchain user insights platform for enterprise analytics.