# Cross-Parachain Swaps
## Objective
Efficient cross-parachain swaps.
For example, from KSM on Kusama to vsKSM on Mangata X.
1. Send KSM to Bifrost.
2. Swap KSM to vsKSM.
3. Transfer vsKSM to Mangata X.
The ideal UX is to do this whole while minimizing the transactions the user has to sign in the flow.
## Approaches
### 1. Pure XCM transactions from the frontend
Ideal UX: User signs one batch transaction on the source chain which contains all the necessary transactions.
But, the above described ideal scenario is **highly improbable** because of the current technical limitations of XCM.
In the scenario described(KSM(Kusama) -> vsKSM(Mangata X)), the user would need to sign upto 3 transactions.
### 2. Phat Contracts from [Phala](https://www.phala.network/en/)
Overview of Phat Contracts:
> Compared with traditional smart-contract-based DApps which store all their states on-chain and require transactions for interaction, the desired use cases of Phat Contract happen off-chain with no (or limited) data stored on-chain. For example, instead of implementing an ERC-20 token with Phat Contract (whose balance has to be stored on-chain), we recommend deploying your ERC-20 contract on Ethereum and using Phat Contract to operate it.
This [video](https://www.youtube.com/watch?v=fVqZLvbIatw) should be very helpful to understand Phat Contracts better.
The solution will drive inspiration from the [inDEX repo](https://github.com/Phala-Network/index-contract) which is being developed by the Phala Team.
Pros:
- Might be able to do one click UX for cross-chain swaps.
- Extensive support from the Phala team during the development.
- Experience with Phat Contracts and connection with the Phala team will come in handy.
Cons:
- PrivaDEX is using a similar approach and recently got funded from W3F.
- Might be hard to sell them on funding us for our target grant size($100k or greater).