First, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the code. The page auto-updates as you edit the file.
RomeSwap enables traders from EVM-compatible chains to execute swaps on the Solana blockchain directly from their existing EVM-only wallets like MetaMask. This seamless integration allows users to interact with Solana without needing a native Solana wallet.
-
✅ Token Verification: We first check if the Solana SPL output token has an interoperability contract deployed on NeonEVM.
- If there isn't such a contract the user has the choice to deploy it, making the Swap possible
-
🗺️ Token Mapping: If an interoperability contract exists, we save its NeonEVM address to prepare the transaction.
-
📊 Fetching Swap Quote: We obtain a swap quote from Jupyter for the desired token pair.
-
🛡️ Approval: We get approval to transfer the input token on NeonEVM to the executor smartcontract.
-
⚙️ Transaction Preparation: We prepare the transaction data based on the swap instructions received from Jupyter and the NeonEVM Addresses of the input and output token.
-
🔄 Execute Swap: We send the previously prepared instruction data to the executor smart contract. Utilizing NeonEVM's composability feature, the contract executes the swap on Solana with the provided instructions.
-
💸 Receive Output Tokens: After a successful swap, the user receives the output token on NeonEVM.
This entire procedure is trustless, decentralized, and requires no human intervention. The user experiences a seamless transaction, unaware that the Transactions are actually being executed on Solana.
sequenceDiagram
participant User
participant RomeSwapUI
participant ExecutorSC as Executor Smart Contract
participant NeonEVM
participant Jupyter
participant Solana
User->>RomeSwapUI: Initiate Swap Request
RomeSwapUI->>NeonEVM: Check for Interoperability Contract
alt Interop Contract Exists
NeonEVM-->>RomeSwapUI: Return Interop Contract Address
RomeSwapUI->>RomeSwapUI: Save Interop Contract Address
else Interop Contract Missing
RomeSwapUI->>User: Prompt to Deploy Interop Contract
User->>NeonEVM: Deploy Interop Contract
NeonEVM-->>User: Interop Contract Deployed
User->>RomeSwapUI: Proceed with Swap or Allowance
end
RomeSwapUI->>Jupyter: Fetch Swap Quote for Token Pair on Solana
Jupyter-->>RomeSwapUI: Provide Swap Instructions
RomeSwapUI->>User: Request Input Token Allowance
User->>NeonEVM: Approve Token Allowance to ExecutorSC
RomeSwapUI->>User: Request Swap Approval
User->>RomeSwapUI: Approve Swap
RomeSwapUI->>ExecutorSC: Send Prepared Swap Instructions
ExecutorSC->>Solana: Execute Swap Using Instructions
Solana-->>ExecutorSC: Swap Successful, Output Tokens Returned
ExecutorSC-->>User: Transfer Output Tokens on NeonEVM
- 🤝 Trustless and Decentralized: Eliminates the need for intermediaries or centralized exchanges.
- 🌐 Seamless User Experience: Users can perform swaps without realizing they are actually being executed on Solana.
- 🔑 Expanded Access: EVM wallet users can access Solana's ecosystem without additional setup.