FlexiLoan: Unlocking Uncollateralized, Event-Driven Flash Loans

FlexiLoan is a next-gen flash loan protocol built on Reactive Network that enables uncollateralized, event-driven loans without locking user assets. By monitoring token approvals and transfers in real time, it maximizes capital efficiency while allowing full liquidity control for providers.

FlexiLoan: Unlocking Uncollateralized, Event-Driven Flash Loans

FlexiLoan introduces a new model for flash loans that eliminates the need for locked liquidity pools. Unlike traditional protocols like Aave, where liquidity providers must lock their tokens, FlexiLoan allows users to retain full control over their assets while participating in flash loan operations.

Built on the Reactive Network, FlexiLoan dynamically manages liquidity in response to real-time token events such as approvals and transfers – without ever taking custody of user assets. Liquidity providers retain full ownership of their tokens at all times, as there's no need to transfer them into a central pool. The system tracks available liquidity automatically, reacting to token events without requiring users to stake or unstake, ensuring uninterrupted access to their funds.

How It Works

Liquidity Inclusion: Users grant token approval to the FlexiLoan contract. The system calculates available liquidity by monitoring balances and allowances, updating in real time through an `updateUser()` function triggered by token events.

Loan Execution: When a flash loan is requested, available liquidity is aggregated across providers without locking funds. The borrower receives the amount and repays it with a 0.3% fee in the same transaction. After repayment, provider states are updated dynamically.

Event-Based Reactivity: Token approvals and transfers trigger callbacks that update liquidity data automatically via the Reactive Network.

FlexiLoan redefines flash loan mechanics by decoupling liquidity from traditional lock-in mechanisms. This approach enables more composable DeFi strategies, improves capital efficiency, and supports automatic, decentralized liquidity management driven by real-time token activity.

Integration

FlexiLoan provides access to uncollateralized flash loans that are executed atomically within a single transaction. This design is ideal for advanced DeFi use cases such as arbitrage, collateral swaps, and self-liquidation strategies. Unlike traditional flash loan solutions, FlexiLoan does not require liquidity providers to lock their assets, allowing for greater capital efficiency and composability.

To integrate FlexiLoan into a project, developers must implement the `IFlexiLoanReceiver` interface, which defines the callback structure for receiving and repaying flash loans. The primary function, `executeOperation()`, is invoked during the loan process and must include the user’s custom logic as well as repayment authorization.

Here is the required interface definition:

interface IFlexiLoanReceiver {
    function executeOperation(
        address asset,
        uint256 amount,
        uint256 premium,
        address initiator,
        bytes calldata params
    ) external returns (bool);
}

A typical implementation includes a contract that stores the FlexiLoan contract address, defines the `executeOperation()` logic, and initiates the loan via the `flashLoan()` method. Within `executeOperation()`, developers should include business logic and ensure that the repayment amount (loan + premium) is approved for transfer by the FlexiLoan contract.

Example implementation:

contract FlashLoanExample is IFlexiLoanReceiver {
    address public flexiLoan;

    constructor(address _flexiLoan) {
        flexiLoan = _flexiLoan;
    }

    function executeOperation(
        address asset,
        uint256 amount,
        uint256 premium,
        address initiator,
        bytes calldata params
    ) external override returns (bool) {
        // Custom logic goes here

        uint256 amountToRepay = amount + premium;
        IERC20(asset).approve(flexiLoan, amountToRepay);
        return true;
    }

    function executeFlashLoan(
        address asset,
        uint256 amount,
        bytes calldata params
    ) external {
        IFlexiLoan(flexiLoan).flashLoan(address(this), asset, amount, params);
    }
}

Before deploying to production, ensure that the receiver interface is correctly implemented, your custom logic is secure and appropriate for the transaction context, and that the contract has a sufficient balance to cover the repayment. The repayment must be approved before the end of the transaction to avoid reversion.

FlexiLoan currently supports a USDT liquidity pool, which operates without asset locking. The USDT pool is available at: `0xD98Ed435e267a5edcCC77D6a984402CC704Fc6FE`. Additional pools, including USDC, are in development and will be announced when available.

Getting Started

Step 1 – Connect Your Wallet

  • Navigate to the FlexiLoan dApp.
  • Click the “Connect Wallet” button in the top-right corner.
  • Ensure your wallet is connected to the right network.

Step 2 – Explore Liquidity Pools

  • Click the “Explore Pools →” button on the homepage.
  • Select a pool, e.g., USDT Pool, to view its current status and participate.

Step 3 – Provide Liquidity

  • On the pool page, click on "Provide Liquidity".
  • A popup will appear where you can view your USDT balance.
  • Enter the amount of USDT you want to supply. Click "MAX" to use your full balance.
  • Click "Confirm" to submit the transaction (ensure you have enough USDT and gas for the transaction).

Step 4 – Check Your Position

  • After confirmation, your address will appear in the Upcoming LP Queue.
  • Wait for your turn in the current or next epoch to start earning rewards.

Recap

FlexiLoan is a flash loan protocol that works without locked liquidity pools. Instead of requiring users to transfer or stake assets, it monitors balances and approvals through token events on the Reactive Network. This allows liquidity to be used for loans while users retain control of their tokens.

Loans are executed atomically in a single transaction. Liquidity is aggregated at the time of the request, and repayment (including a 0.3% fee) must occur within the same transaction. Developers integrate with FlexiLoan by implementing the `IFlexiLoanReceiver` interface, using the `executeOperation()` function to define logic and authorize repayment.


About Reactive Network

The Reactive Network, pioneered by PARSIQ, ushers in a new wave of blockchain innovation through its Reactive Smart Contracts (RSCs). These advanced contracts can autonomously execute based on specific on-chain events, eliminating the need for off-chain computation and heralding a seamless cross-chain ecosystem vital for Web3’s growth.

Central to this breakthrough is the Inversion of Control (IoC) framework, which redefines smart contracts and decentralized applications (DApps) by imbuing them with unparalleled autonomy, efficiency, and interactivity. By marrying RSCs with IoC, Reactive Network is setting the stage for a transformative blockchain era, characterized by enhanced interoperability and the robust, user-friendly foundation Web3 demands.

Website | Blog | Twitter | Telegram | Discord | Docs