Inspiration
We 3 friends started out building web3 products about a year and a half ago, we together built around 6 products, and every time we were needed to choose a blockchain that we would wanna develop on, that was a major issue and we looked into how to solve that, first thing that came into our mind were "bridges", but there are a lot of them and sometimes we also need to swap tokens in a DEX, this made the whole process complex for end-user and dapp builder and at that moment we got the eureka moment and start building the liquidity aggregator out for this hackathon
What it does
WagPay aggregates all the possible Bridges and DEXs for more than 5 chains, let's say you want to swap USDT on Polygon to ETH on Ethereum, for this you will need to swap USDT to WETH and then bridge WETH to ETH using some bridge, at WagPay we have made possible to execute this in just a single transaction, it will swap tokens using a DEX and then use a Bridge to bridge tokens
How we built it
We have 2 layers in WagPay
- Protocol Layer
- API Layer
Protocol Layer At Protocol Layer we have our contracts that interact with Bridges and DEXs, currently, we have different contracts for different bridges and then deployed a WagpayBridge contract which can execute a set of instructions that we give it, if given we can call DEXs function, we can call Bridges function etc
API Layer At API Layer, we have our algorithm that finds the best route possible between Token X on Chain A to Token Y on Chain B, this includes a combination of DEXs and Bridges, this data is then feeded to WagpayBridge Contract at the Protocol Layer, which will execute the transaction
Challenges we ran into
The first challenge we ran into was of WagpayBridge not working, it wasn't working because we had some issues with how we were dealing with tokens after they are swapped with DEXs
The second challenge was at API Layer, it wasn't working because we were not fetching correct data from bridge APIs, but both are now solved
Accomplishments that we're proud of
We built this whole Liquidity Aggregator in 15 days and I think that's a great achievement
What we learned
We learned more about the cross-chain space during building this and how it can solve the complexities of existing blockchains and make them accessible to everyone on the planet
What's next for WagPay
We are planning to build a cross-chain communication protocol, we are currently mapping and building out the initial POC for it, in a gist, it will work using relayers and light clients
Log in or sign up for Devpost to join the conversation.