The PixelPlex team delivered the Alfprotocol — an efficient, decentralized application for liquidity provision and yield farming. It allows users to borrow funds by offering collateral and supply tokens to pools, thus earning yield and token rewards for being liquidity providers.
Aware of the flaws of centralized exchanges such as hacks, scams, and market manipulation, the client has been closely watching innovations introduced by the Decentralized Finance (DeFi) market. Among the innovations are automated market makers (AMMs) that facilitate the decentralized exchange of digital assets by using liquidity pools.
But the DeFi community hasn’t stopped there. The second generation of DeFi introduced token incentives for liquidity provision (yield farming), margin trading and leveraged positions.
In the light of all these advances, the startup decided to edge towards the third generation of DeFi and build their own solution that would offer leverage for liquidity providers in AMMs.
That’s how the startup came up with the Alfprotocol.
Having come up with their idea the startup approached PixelPlex as a reliable blockchain development vendor to take care of the solution development.
Together, we worked out the following goals:
Implement the core protocol for leveraged liquidity provision in AMMs
Implement a protocol for lending and overcollateralized borrowing
Provide traders and investors of various risk appetites with a platform that facilitates liquidity flows and maximizes capital efficiency
Our team helped the customer build the Alfprotocol — a Solana-based protocol for liquidity provision and yield farming. The protocol allows users to participate in isolated pools as lenders and borrowers and provides for enhanced leverage and farming rewards with up to a 200x liquidity margin.
The solution comprises several key products, including:
Leveraged yield farming and liquidity provision with margin of up to 200x
Incentivized liquidity pools with and without leverage
Single-asset liquidity pools for lenders and overcollateralized debt positions for borrowers
Intuitive UI/UX which ensures seamless user experience
Liquidation bot that ensures the highest leveraged yield farming positions
Got an idea? We’re ready to discuss it
Alf Leverage provides a smooth leveraged yield farming experience for users with superior rewards. To implement it, our team integrated Alf Leverage with the Raydium protocol and ensured their interoperability.
When interacting with the protocol, traders can choose from different liquidity pools and enter positions by supplying their assets as collateral. They can increase their position size when investing in liquidity provision. Traders can also remove their position at any time by withdrawing the collateral or closing the entire position.
The mechanism as a whole proceeds as follows:
Our team helped the customer implement Allotment Alf — a protocol for lending and overcollateralized borrowing. The protocol uses single-asset liquidity pools for lenders and overcollateralized debt positions for borrowers.
Allotment Alf allows users to deposit their assets and earn an annual percentage yield on top. Alternatively, users can borrow against their deposited assets or leverage borrowed capital anywhere in Web3.
Our team implemented a Treasury smart contract — a solution for connecting lending and borrowing protocols. The unique feature of the protocol is that it provides for routing liquidity between multiple protocols, thereby allowing Alf Leverage to use funds from Allotment Alf or any other lending protocol.
Treasury is responsible for all financial flows on the platform. It aggregates data about current loan conditions, enables borrowing, tracks position health, and keeps collaterals in its custody.
To ensure the highest leveraged yield farming positions in the Solana ecosystem, we implemented the liquidation bot run by the Allotment Alf team. The task of the bot is to ensure that underwater positions are liquidated, thus protecting lenders from loss.
Also, to mitigate risks for the platform, we’ve implemented partial liquidations. This means that the bot will not liquidate the entire position but only a specific part of it. For example, suppose a trader has a debt of $140 and collateral worth $150. To cover the debt, the bot can partially liquidate this position by selling $130 of the user’s collateral. As a result, the trader will have $10 debt and $20 collateral left.
Have a new project in mind?
Together with the client, we opted for the Solana blockchain as the basis of the project for the following reasons:
Fast transactions and low fees. Solana can handle up to 65,000 tps versus Ethereum’s 13-15 tps.
A large and well-developed ecosystem with multiple projects built on top of the platform.
A lot of institutional attention with more and more developers moving to this blockchain.
The protocol consists of two major components:
We built the Alfprotocol using a modular approach to ensure the solution's scalability. As a result, we can expand the protocol’s functionality and add new modules without having to redeploy existing contracts.
One of the key modules of the platform is the Treasury module, which contains the logic for the borrowing and lending protocols, such as how to spend the borrowed funds. To take Allotment Alf as an example, the protocol will send the borrowed funds to the user’s wallet while Alf Leverage will use them for staking on Raydium.
To track utilization rates, we used Price Oracles — a set of programs that enable the retrieval of price information for a given asset.
up to 200x
yield farming and liquidity provision
initial market cap (as of Aug 2022)
time taken to develop the solution