Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] [VEN-2895]: Flash loan implementation #545

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

Debugger022
Copy link
Contributor

@Debugger022 Debugger022 commented Jan 7, 2025

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 reopened this Jan 24, 2025
Copy link

Code Coverage

Package Line Rate Branch Rate Health
contracts 100% 100%
contracts.Admin 88% 41%
contracts.Comptroller 100% 90%
contracts.Comptroller.Diamond 95% 61%
contracts.Comptroller.Diamond.facets 77% 63%
contracts.Comptroller.Diamond.interfaces 100% 100%
contracts.DelegateBorrowers 100% 89%
contracts.FlashLoan.base 100% 100%
contracts.FlashLoan.interfaces 100% 100%
contracts.Governance 68% 45%
contracts.InterestRateModels 74% 59%
contracts.Lens 45% 37%
contracts.Liquidator 83% 60%
contracts.Oracle 100% 100%
contracts.PegStability 88% 84%
contracts.Swap 88% 57%
contracts.Swap.interfaces 100% 100%
contracts.Swap.lib 81% 53%
contracts.Tokens 100% 100%
contracts.Tokens.Prime 96% 72%
contracts.Tokens.Prime.Interfaces 100% 100%
contracts.Tokens.Prime.libs 90% 76%
contracts.Tokens.VAI 81% 53%
contracts.Tokens.VRT 20% 9%
contracts.Tokens.VTokens 67% 49%
contracts.Tokens.VTokens.legacy 0% 0%
contracts.Tokens.XVS 19% 8%
contracts.Utils 50% 30%
contracts.VAIVault 50% 45%
contracts.VRTVault 49% 36%
contracts.XVSVault 64% 50%
contracts.lib 89% 71%
Summary 63% (3377 / 5390) 46% (1240 / 2722)

@Debugger022 Debugger022 requested review from GitGuru7, kkirka, chechu and web3rover and removed request for GitGuru7 January 29, 2025 12:16
@Debugger022 Debugger022 marked this pull request as ready for review January 29, 2025 12:17
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.

1 participant