Sphinx: Cross-chain DEX on StarkNet

23-02-11 11:00
Read this article in 7 Minutes
总结 AI summary
View the summary 收起

With each new public chain or Rollup, there is a lot of re-built infrastructure, as is the StarkNet ecosystem that is maturing. However, the Sphinx project is not only about making order book trading more efficient on StarkNet, but also about helping users make cross-chain transactions based on StarkNet's efficient underlying infrastructure.


What is Sphinx


Sphinx is the first StarkNet deployment to support native cross-chain Central Limit Order Book (CLOB) DEX. Yes, after the performance of the underlying public chain has been enough to break through the bottleneck of transaction efficiency, the disadvantages such as low efficiency and volatile loss of AMM will be more obvious. Therefore, it has become an obvious industry trend that the new public chain and the DEX on Layer2 gradually adopt the order book as the underlying trading system.


The second obvious advantage of Sphinx is its ability to support cross-chain transactions. We know that currently in the StarkNet ecosystem, the wallets available in the StarkNet ecosystem are smart contract wallets because the underlying technology already supports account abstraction natively. In other words, the MetaMask wallet, as it is known to users, is not available.


But Sphinx can build untrusted Bridges that allow users from other chains (Ethereum, Polygon, Arbitrum, etc.) to remotely deposit assets and trade them using their familiar Metamask. In this way, Sphinx will further leverage composability, acting as a liquidity aggregation layer for each strand without the problem of AMM's erratic losses or slippage.


How does Sphinx implement cross-chain transactions


For Sphinx to implement cross-chain transactions, two problems need to be solved first:


(1) Bridge the message from the source chain to StarkNet;

(2) Execute on StarkNet on behalf of User;


To solve the first problem, Sphinx needs to have the user sign an IP-712 message on the source chain without gas (this message can be: submit a limit buy order, cancel the order, or withdraw funds, etc.). It is then forwarded across the chain via an information transfer bridge. This, of course, involves choosing a safe cross-chain bridge.


Unfortunately, the current mainstream cross-chain solutions are either based on optimistic assumptions or controlled by some centralized entity through multisig's multi-money wallet. These solutions compromise on security.


Therefore, Sphinx chose to work with Herodotus to implement ZK cross-chain in the blockchain's consensus layer using memory proof. That is, using StarkNet's cheap computing to read the state on Ethereum and using SNARK proof to bridge messages back to the source chain to achieve truly secure information across the chain.



Convergent liquidity


Having successfully solved the cross-chain transaction problem, Sphinx goes one step further and enables aggregation of different AMM transaction pools across different chains.



In the future, as shown above, Sphinx could unify prices and liquidity across different chains into StarkNet's trading hub, Sphinx's order book system. When this step is realized, the trading price and liquidity of the mainstream public chain trading platform will be unified, so users will reduce the problem of passively accepting the second-best price due to arbitrage and other reasons.


The user interface of Sphinx


Sphinx is unique in that its user interface mirrors that of the Bloomberg terminal, which uses a command-line interface to interact with contracts.


The following screenshot shows the operation guide. For example, if you want to submit a ETH bill for USDC to the system, the price is 1200USDC/ETH and the quantity is 0.5ETH, type "BID ETH USDC 1200 0.5" on the command line interface and press Enter.



Ok, maybe it's more efficient for professional traders, but it's really more of a barrier to entry for the average user. While Sphinx is currently in beta, a more familiar graphical interface may be added in the future.


欢迎加入律动 BlockBeats 官方社群:

Telegram 订阅群:https://t.me/theblockbeats

Telegram 交流群:https://t.me/BlockBeats_App

Twitter 官方账号:https://twitter.com/BlockBeatsAsia

举报 Correction/Report
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit