Inspiration
Restricted XRP Utility
While XRPL has been efficient, affordable, and fast in facilitating global payments and exchanges, the lack of smart contract support has confined the usage of XRP mostly to payment transactions. This narrow utility has led to fewer on-chain activities and consequently, reduced transaction fees generated for the network.
Asset Allocation Inefficiency Across Chains
XRPL’s sidechains each have their distinctive merits. Despite these sidechains being under the XRPL umbrella and utilizing XRP for gas fees, there’s an absence of an integrated platform to foster liquidity or enable cross-chain asset swaps. This shortfall has culminated in a liquidity fragmentation and a suboptimal asset allocation within the ecosystem, thereby stifling its potential growth.
Bootstrapping Needs for Emerging Sidechains
With XLS-38d pending approval through voting, each sidechain is nascent and encounters low Total Value Locked (TVL) and user activity. For these chains to evolve and thrive, early-stage engagement from the established main chain, XRPL, is indispensable.
Liquidity Solution for XRP Ecosystem
Addressing Restricted XRP Utility
By introducing a multi-chain DEX and a cross-chain DEX aggregator, we are unlocking new earning opportunity for XRP, transforming it into a versatile asset within the ecosystem. This expanded utility paves the way for increased on-chain activities and, as a result, a boost in transaction fees for the network.
Revolutionizing Asset Allocation Across Chains
Recognizing the unique offerings of each XRPL sidechain, Moai Finance acts as the much-needed integrated platform. By seamlessly interconnecting XRP Ledger EVM with Coreum, Futureverse, and more, we not only harness their individual strengths but also enable smooth liquidity provisioning and cross-chain asset swaps. This harmonization ensures that users can effortlessly allocate assets, tapping into the full potential of the XRPL ecosystem.
Empowering and Connecting Emerging Sidechains
Aware of the challenges faced by budding sidechains, Moai Finance serves as a bridge to ensure they're not left in isolation. By promoting early-stage integration with the XRPL main chain, we facilitate a symbiotic relationship. As these sidechains gain traction, access to Moai's liquidity solutions and user engagement tools will play a pivotal role in their growth, ensuring they flourish within the XRPL community.
How we built it
First, for the frontend, we used React as the framework. Since we are a multi-chain DEX, we select each JSON-RPC setting corresponding to the network selected. For EVM-sidechain, we used modules from viem and wagmi. To manage history data of the users efficiently, we deployed our custom server. The scheduler was also set so that the server periodically syncs up with the block, while every log transactions are stored in the server. In order to support multi-chain, we built our own hook to integrate each chain's logic. For example, if user is using EVM sidechain, the hook will fetch data from the EVM sidechain RPC node and sign transactions with EVM wallet.
Challenges we ran into
We are based on the forked codes of Balancer V2, which only utilizes ERC-20 tokens. Since XRP is the native asset for the EVM sidechain, we had to create a Wrapped XRP(WXRP) to include the native coin to the pool. For seamless user experience, we integrated the UI so that users do not have to distinguish between XRP and WXRP. It will automatically be wrapped and unwrapped according to the needs. In addition, in order to support multichain, we built our own hook to group different configs for each chain, allowing users seamless UX.
What we learned
EVM Sidechain is based on Evmos sdk and has constructed great UI and UX for the builders. The bridge and explorer is easy to use and have to mention that using Metamask to utilize XRP is a great experience to have as the XRPL community member.
What's next for Moai Finance
We are now servicing our DEX on The Root Network of Futureverse and waiting for our grand launch on XRPL and EVM sidechain. We will also onboard the lending protocol on the Moai Finance to further position as the universal liquidity solution utilizing the XRP.
Built With
- amazon-web-services
- nestjs
- postgresql
- prisma
- react
- solidity
- viem
- wagmi
Log in or sign up for Devpost to join the conversation.