LPsLux Proposals
LP-6156

LRC-3156 Flash Loans

Implemented

LRC-3156 Flash Loans for Lux Network

Category
LRC
Created
2025-01-23

Abstract

LRC-3156 (mirrors ERC-3156) standardizes flash loan interfaces.

Specification

Defines flashLoan() and FlashBorrower interface for atomic borrowing.

Motivation

This standard ensures compatibility with the broader EVM ecosystem while enabling Lux-specific optimizations.

Rationale

Mirrors the corresponding Ethereum standard for maximum compatibility.

Backwards Compatibility

Fully compatible with existing ERC implementations.

Reference Implementation

Repository: https://github.com/luxfi/standard Local Path: /Users/z/work/lux/standard/

Contracts

ContractDescription
lib/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20FlashMint.solFlash mint extension

Interfaces

Build and Test

cd /Users/z/work/lux/standard

# Build all contracts
forge build

# Run tests
forge test -vvv

# Gas report
forge test --gas-report

Security Considerations

Implementations should follow established security best practices for the corresponding ERC.

Copyright and related rights waived via CC0.