FlashLoanFacet API Reference
The FlashLoanFacet provides uncollateralized flash loans from pool reserves.
Functions
flashLoan
Execute a flash loan. Borrowed tokens must be repaid (plus fee) within the same transaction.
solidity
function flashLoan(
address receiver,
address token,
uint256 amount,
bytes calldata data
) externalParameters:
| Name | Type | Description |
|---|---|---|
| receiver | address | Contract implementing IFlashLoanReceiver |
| token | address | Token to borrow |
| amount | uint256 | Amount to borrow |
| data | bytes | Arbitrary data passed to receiver callback |
Flow:
- Protocol transfers
amountoftokentoreceiver - Protocol calls
receiver.onFlashLoan(msg.sender, token, amount, fee, data) - Receiver must approve protocol to pull back
amount + fee - Protocol pulls
amount + feefrom receiver
Reverts if receiver doesn't repay amount + fee.
getFlashLoanFee
Get the fee for a flash loan amount.
solidity
function getFlashLoanFee(uint256 amount) external view returns (uint256 fee)Default fee: 9 bps (0.09%).
IFlashLoanReceiver Interface
Flash loan receivers must implement:
solidity
interface IFlashLoanReceiver {
function onFlashLoan(
address initiator,
address token,
uint256 amount,
uint256 fee,
bytes calldata data
) external returns (bytes32);
}Must return keccak256("IFlashLoanReceiver.onFlashLoan").
License
Licensed under the GNU General Public License v3.0--see LICENSE for terms.
Copyright (C) 2026 PaxLabs Inc.
SPDX-License-Identifier: GPL-3.0-onlyContact & Resources
| Resource | Link |
|---|---|
| Protocol Documentation | docs.hyperpaxeer.com |
| Block Explorer | paxscan.paxeer.app |
| Sidiora Exchange | app.hyperpaxeer.com |
| Website | paxeer.app |
| Twitter/X | @paxeer_app |
| General Inquiries | infopaxeer@paxeer.app |
| Security Reports | security@paxeer.app |