Skip to content

Conversation

@Debugger022
Copy link
Collaborator

@Debugger022 Debugger022 commented Dec 18, 2024

Description

This PR introduces the implementation of flashloan functionality for isolated pools. Flashloan enable users to borrow assets without collateral, provided the loan is repaid within the same transaction. This enhancement includes the following changes:

Flashloan Implementation: Added flashloan capability to isolated pools, allowing borrowing and repayment in a single transaction.

Mock Receiver Contract: Introduced a mock receiver contract for testing purposes, which handles the flashloan receipt and repayment.

Test Cases: Comprehensive unit tests for the flashloan logic, including tests for successful execution, edge cases, and failure scenarios.

Deployment Script: Updated the deployment script to accommodate the new flashloan functionality for isolated pools.

Contract Updates: Modified relevant contracts to integrate the flashloan feature while ensuring compatibility with existing logic and maintaining security checks.

@Debugger022 Debugger022 self-assigned this Dec 18, 2024
@Debugger022 Debugger022 changed the title Flash loan implementation [WIP] Flash loan implementation Dec 18, 2024
@Debugger022 Debugger022 changed the title [WIP] Flash loan implementation [VEN-2984] Flash loan implementation Jan 14, 2025
@Debugger022 Debugger022 marked this pull request as ready for review January 14, 2025 05:25
@Debugger022 Debugger022 requested review from GitGuru7, chechu, kkirka and web3rover and removed request for GitGuru7, kkirka and web3rover January 14, 2025 07:46
@Debugger022 Debugger022 reopened this Jan 24, 2025
) external override nonReentrant returns (uint256) {
ensureNonzeroAddress(receiver);

IFlashLoanSimpleReceiver receiverContract = IFlashLoanSimpleReceiver(msg.sender);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be receiver instead of msg.sender

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initiator could be a different address of receiver, it would be more safe to use msg.sender .

@fred-venus fred-venus force-pushed the develop branch 4 times, most recently from 5beda80 to 6ab87cb Compare December 12, 2025 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants