Inspiration

We were inspired as a group that is passionate about DeFi and innovating ways to directly increase the user experience of managing positions and yields. We appreciate Jason from Terraform Labs for the direction and support.

What it does

Quadswap is a liquidity pool and swap platform on the Terra blockchain. We provide a liquidity pool pair of liquidity pool pairs.

Normally you would have a self-balancing pair between two assets to provide liquidity for the swap of buying or selling the asset one of the sides. The user receives the trading fee between the two assets (usually in addition to external incentivizing rewards provided by the exchange) and keeps their two assets balanced in dollar value.

By providing a LP pair of LP pairs, the user now has portfolio exposure to four assets that will self-balance, and will save the user from process of having to separate their pairs, sell one or both of the assets, re-purhase new assets, and re-combine for a pair, to rebalance their portfolio of pairs. They now can directly trade pair for pair.

How we built it

We utilize the smart contract instantiation and execution in the Terra Station interface. We were able to use the already established smart contracts as LPs are represented by a token themselves, and we were able to generate a LP pair in the same way but using the two inner LP addresses as the token addresses.

We forked the terraswap web application to refactor and make our changes for our platform.

Challenges we ran into

The correct code IDs to execute the respective smart contracts were not clear and we needed to troubleshoot creating our LP pair after it was not accepting particular execute functions. We were able to make progress by backtracking the Code Ids used to generate the common LUNA-UST pair.

Modifying the terraswap web application gave us complications as the API calls were many and multiple across different points in the token selection and swap process. We didn't have access to the same API endpoint logic and needed to reconstruct it as we continued backtracking through the swap process.

Accomplishments that we're proud of

We are proud of instantiating our LP pair of LP pairs, which has not done before, which is currently live on testnet. The value proposition is large (ie. direct pair to pair swaps and generating multiple swap fees, and four asset portfolio balancing) and the on-chain transactional volume and TVL potential is large.

What we learned

We learned intensively about the terra development ecosystem with interconnecting APIs for token and blockchain data.

What's next for quadswap

We look to continue the development of the quadswap web application to full functionality and then live launch the swap and liquidity providing on mainnet to with real user liquidity.

Built With

Share this project:

Updates