Optimising DeFi Strategies with Borsa: A Demo Use-Case
The DeFi user experience is currently overwhelmed and fragmented across various protocols and chains. There are distinct...
Background
The DeFi user experience is currently overwhelmed and fragmented across various protocols and chains. There are distinct DeFi protocols operating on the same chain, as well as identical DeFi protocols deployed on multiple chains. Additionally, DeFi users encounter challenges when seeking the best protocols and chains—balancing low gas costs with maximum APYs in an ever-changing environment. Achieving this balance requires combining multiple transactions that optimize value, speed, and simplicity, which demands technical expertise in Web3 protocols and wallets.
Borsa aims to address these issues through its DeFi Abstraction Layer, which leverages user intents and account abstraction. This post explores examples of how Borsa leverages AA (Account Abstraction) to create a holistic and streamlined DeFi experience.
For practical demonstration, we narrowed our focus to interactions with Aave, a leading DeFi protocol, to underscore the practicality of what the Borsa team is constructing. We will explore two paths: Lending $DAI on Aave using spot $LINK and retrieving $LINK by returning $aDAI. These two paths will manifest in two states: one for the wallet and one for the Aave protocol.
Defining the States
To demonstrate how Borsa's DeFi Abstraction Layer optimizes DeFi strategies, we will define the following two states, s1
and s2
.
s1
: $LINK tokens in a wallet on Ethereum
s2
: $DAI tokens in Aave protocol on Ethereum
By using Borsa protocol, users can go from one state to another ( s1
→ s2
) and back (s2
→ s1
) by following two different paths as defined below.
Defining the Paths
We will describe paths for lending $LINK from the smart contract wallet(SCW) followed by withdrawing it to the SCW using the Borsa DeFi abstraction layer.
Lending $DAI on Aave with spot $LINK (s1 → s2)
Definition
Users want to use their $LINK tokens to supply $DAI to Aave.
First, their $LINK has to be swapped for $DAI as the relevant Aave pool requires deposits in a specific asset. Borsa enables such swaps, whether it is required for asset-specific deposits or to achieve better outcomes in terms of cost.
Now that we've outlined the paths users can move with Borsa—from state s1
to s2
—it's important to describe and understand how these transitions occur in practice.
The Intent
From the description above, using s1
as the "From" state and s2
as the "To" state, the DeFi Abstraction Layer interprets this intent, representing a state change, to provide specific instructions to the Smart Contract Wallet (SCW).
Swap
The SCW interacts with the most optimal path to swap. In this case, the Uniswap pool was chosen to swap $LINK for $DAI.
Supply
Once the swap is complete, the transaction logic proceeds to supply the $DAI tokens to Aave.
Upon completion of the supply process, users receive $aDAI tokens, enabling them to earn interest on the supplied assets.
Approve
Both swap and supply operations require an approval step beforehand. Our network provides instructions to the SCW for these steps as well, without requiring user intervention.
In this path, We lent $DAI on Aave with spot $LINK. Now it's time to get back our $LINK using the below path
Withdraw Aave $DAI deposits to $LINK (s2
→ s1
)
Definition
Moving from s2
→ s1
requires a user’s $DAI supplied on Aave to be withdrawn and swapped to $LINK.
Now that we've outlined the paths users can take with Borsa— from s2
back to s1
—it's important to describe and understand how these transitions occur in practice.
The Intent
In this case, s2
is defined as the from state and s1
is defined as the to state.
Withdrawal
First, execute the withdrawal to get $DAI back from Aave.
Swap
The withdrawn $DAI is now swapped to $LINK. The swap is based on the best available route at the time of execution.
Approve
The approvals for all of these operations are provided without user intervention.
This use case shows how Borsa facilitates seamless transitions between different states—whether lending $DAI on Aave using $LINK or converting $DAI back into $LINK.
These processes are executed autonomously, optimizing cost, and user experience without manual intervention. This marks the starting point for Borsa. We are enthusiastic about exploring new features in the near future.
Future
We look forward to a future where users can seamlessly combine deposits and withdrawals from different protocols into a single execution stream to enable smooth DeFi navigation. In addition to protocol-level abstraction, we are also building to abstract away the complexity of multiple chains, which will provide users with a unified interface to interact with multiple liquidity sources.
With Borsa, users can delegate complex transaction execution processes, eliminating the need for manual chain selection.
Additionally, by integrating chain abstraction capabilities into DeFi abstraction, Borsa will enable users to perform actions across different blockchains with ease. Users can abstract parameters like the choice of chain or deposit token, allowing our engine to determine the optimal path and execute the transactions efficiently. This approach addresses most of the UX challenges faced by users in the blockchain space leading to the next wave of innovation like seamless multi-chain or cross-chain experiences, intuitive blockchain interactions, and optimal efficiency.
Interested in exploring more about what we are cooking?
Visit Borsa to learn more about our platform. Follow us on Twitter and LinkedIn for the latest updates and insights. Together, let’s redefine DeFi for a more accessible, efficient, and interconnected financial ecosystem.