-
Notifications
You must be signed in to change notification settings - Fork 195
[VEN-2895]: Flash loan implementation #545
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
Open
Debugger022
wants to merge
150
commits into
develop
Choose a base branch
from
feat/VEN-2985
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 86 commits
Commits
Show all changes
150 commits
Select commit
Hold shift + click to select a range
dba9c60
feat: flash loan contracts
Debugger022 dcd4f1f
feat: single asset flash loan
Debugger022 aba2937
feat: multiple asset flash loan
Debugger022 fb92c44
feat: add mock contracts for flash loan receiver
Debugger022 4112b43
test: add tests for the multi asset flash loan
Debugger022 12583d2
test: add tests for the single asset flash loan
Debugger022 adb7d8b
refactor: reduce vToken size to keep it under 24kb
Debugger022 212c067
test: refactor tests as per flashloan feature
Debugger022 1c60161
test: add fork test for single asset flash loan
Debugger022 26f5663
test: add fork test for multi asset flash loan
Debugger022 558b0f5
fix: ci/cd issues
Debugger022 b88270c
Merge branch 'develop' into feat/VEN-2985
Debugger022 27f3047
fix: evilXToken test
Debugger022 7b5d653
fix: pr comments
Debugger022 bce9a10
fix: pr comments
Debugger022 c0fd071
refactor: introduced two fees for flash loans
Debugger022 e5c1d0d
refactor: use approve instead of transfer funds in flash loan
Debugger022 041c3ba
Merge branch 'develop' into feat/VEN-2985
Debugger022 44d26f5
chore: update yarn.lock
Debugger022 47b2acf
fix: lint issues
Debugger022 558e868
refactor: transfer funds to PSR
Debugger022 b2bcfc6
Merge branch 'develop' into feat/VEN-2985
Debugger022 912e590
refactor: update helper files for flashloan configs
Debugger022 3ee9e28
refactor: update flashLoan parameters to use vTokens and underlying a…
Debugger022 8a47ea4
refactor: update flashLoan fee parameters in VToken contract
Debugger022 317115a
refactor: simplify VToken initialization by removing unused flashLoan…
Debugger022 ddf975f
refactor: update flashLoan receiver initialization and remove unused …
Debugger022 3c36cab
fix : prettier
Debugger022 7ceed8c
feat : add initiator parameter to flash loan functions and implement …
Debugger022 13db780
refactor: rename _setWhiteListFlashLoanAccount to setWhiteListFlashLo…
Debugger022 8192bab
refactor: update ensureAllowed parameter for setWhiteListFlashLoanAcc…
Debugger022 8fde88f
feat: add initiator parameter to executeFlashLoan function
Debugger022 3c282eb
test: add checks for whitelisted users in flash loan requests
Debugger022 41390b3
refactor: enhance flash loan functionality with delegate authorizatio…
Debugger022 1519e3b
Merge branch 'develop' into feat/VEN-2985
Debugger022 335f8b2
test: add tests for modes in flashloan
Debugger022 2759ead
fix: lint and prettier
Debugger022 1ff666e
Merge branch 'feat/solidity-0.8' into feat/VEN-2985
Debugger022 d35e3c8
fix: reduce vToken size
Debugger022 4879942
fix: minor fixes
Debugger022 ea80325
fix: minor fixes
Debugger022 0e472e2
Merge branch 'feat/solidity-0.8' into feat/VEN-2985
Debugger022 1b29e85
Merge branch 'feat/VEN-3361' into feat/VEN-2985
Debugger022 7c64dc3
refactor: update flashloan unit and fork tests
Debugger022 0dcca21
fix: minor fix
Debugger022 11cf73a
feat: add BadFlashLoanReceiver contract and related tests
Debugger022 a8ee3fc
Merge branch 'feat/VEN-2985' into feat/VEN-3343
Debugger022 ad249ae
refactor: replace string reverts with custom error types in VToken co…
Debugger022 7c7ddfb
fix: update comptroller storage
Debugger022 f7c1829
refactor: update unit and fork tests of flashloan
Debugger022 936d774
refactor: update _handleFlashLoanMode1 in policyfacet
Debugger022 1637457
fix: minor fix
Debugger022 48b8d77
fix: update balanceBefore to balanceBeforeRepayFlashloan
Debugger022 49b3759
refactor: update tests supporting modes of flashloan
Debugger022 fca0756
feat: add deployments for flashloan functionality in bsctestnet
Debugger022 e4d512e
feat: add deployments for market and reward facet in bsctestnet
Debugger022 86f9478
feat: updating deployment files
Debugger022 d67c78b
fix: minor fix
Debugger022 7ffb17a
fix: lint
Debugger022 6ffbf15
fix: update natspec for executeFlashloan in vtoken
Debugger022 33cbd99
refactor: using custom errors for flashLoan functionality
Debugger022 8aefaa9
refactor: using calldata consistently
Debugger022 b0dec3a
refactor: removed initiator param in executeFlashLoan
Debugger022 d849599
refactor: consolidate borrow logic with transfer flag
Debugger022 840f996
refactor: remove flashLoanAmount from calculations
Debugger022 7129c29
revert: remove flashLoanAmount from calculations
Debugger022 d6a3620
fix: minor changes
Debugger022 0b9aec1
refactor: update flashLoan fee structure
Debugger022 228cdeb
refactor: remove modes and introduce partial repayments in flashloan
Debugger022 e90e502
refactor: update unit and fork tests of flashloan
Debugger022 d75ef99
Merge branch 'feat/VEN-3361' into feat/VEN-2985
Debugger022 54f8427
Merge branch 'feat/VEN-3343' into feat/VEN-2985
Debugger022 2efdca4
fix: minor fix
Debugger022 0b410f7
refactor: update unit and fork tests of flashloan
Debugger022 e7e5cf7
fix: lint and prettier
Debugger022 8ef62a9
Merge branch 'feat/VEN-3361' into feat/VEN-2985
Debugger022 049c515
refactor: rename _toggleFlashLoan to toggleFlashLoan
Debugger022 0fd47b9
test: add more test scenarios for flashLoan
Debugger022 5ec249d
feat: add deployments for Facets, Diamond and VBep20Delegate in bscte…
Debugger022 e921530
fix: minor fixes
Debugger022 95e539d
refactor: update comptroller storage
Debugger022 5e6e4d6
fix: minor fix
Debugger022 544dcf1
fix: fixed _gap value
Debugger022 eaddc40
feat: add deployments for Facets, Diamond, ComptrollerLens and VBep20…
Debugger022 6957892
Merge branch 'feat/VEN-3361' into feat/VEN-2985
Debugger022 ed08f16
refactor: update enum IncomeType in IProtocolShareReserve
Debugger022 8ed2d89
fix: minor fixes
Debugger022 01d36ee
fix: resolve comments
Debugger022 2bc16e6
refactor: replace toggleFlashLoan with setFlashLoanEnabled function
Debugger022 08ca797
refactor: update flash loan parameters to use 'onBehalf' instead of '…
Debugger022 d3bf53c
refactor: remove checkAccrueInterest function
Debugger022 18eb4c8
feat: move flashLoan functions to new FlashLoanFacet
Debugger022 f511491
fix: small optimization
Debugger022 e313deb
fix: minor fixes
Debugger022 947e632
refactor: update repayment handling in flashloan
Debugger022 243fc8c
fix: minor fixes
Debugger022 3ec2d14
Refactor: removed PSR check transferOutUnderlyingFlashLoan
Debugger022 e570b0b
fix: Lint
Debugger022 9445b3a
feat: add deployments for new flashLoan changes
Debugger022 09024d5
fix: fix comments
Debugger022 bb75513
refactor: removed simple flashLoan functionality
Debugger022 12bccb7
fix: minor fixes
Debugger022 b312653
refactor: revert some changes
Debugger022 fad2194
fix: remove unused errors
Debugger022 c9f1d56
feat: add reentrancy guard in executeFlashloan
Debugger022 869afd8
feat: vlw-14
Debugger022 cf4e131
feat: updating deployment files
Debugger022 f05bf54
feat: vlw-04
Debugger022 9f05cca
feat: vlw-01,03,15,17
Debugger022 9821c49
feat: vlw-11
Debugger022 1c9dbd1
feat: vlw-06
Debugger022 c249297
feat: vlw-09
Debugger022 3f6077b
feat: vlw-12
Debugger022 f7b5ff8
refactor: add event for partial repayments
Debugger022 46110a6
refactor: rename borrowDebtPosition to flashLoanDebtPosition
Debugger022 d415fab
fix: tests
Debugger022 9945c5f
fix: vlw-12
Debugger022 e899c25
refactor: update FlashLoanPartiallyRepaid event to FlashLoanRepaid
Debugger022 1ad53f6
refactor: add event verifications for repayments in flashLoan fork tests
Debugger022 757e323
fix: vlw-13
Debugger022 865ff7f
revert: getCash modification
Debugger022 49382e4
feat: vlw-05
Debugger022 f69858b
fix: vlw-09
Debugger022 194b387
feat: add _getCashPriorWithFlashLoan function
Debugger022 242ab2b
fix: minor fixes
Debugger022 c2e44d4
fix: vlw-11
GitGuru7 4bb366a
fix: I04
GitGuru7 a1311c5
fix: add missing natSpec
GitGuru7 1d1fa04
fix: use oz ReentrancyGuard
GitGuru7 c940eae
fixup! fix: add missing natSpec
chechu 88872eb
Revert "fix: use oz ReentrancyGuard"
GitGuru7 19e135a
fix: add ref to OZ ReentrancyGuardTransient
GitGuru7 a89c5fc
fix: use actual cash for transfering reserve
GitGuru7 68a5a21
Merge branch 'feat/VEN-2985' into fix/certik-audit
GitGuru7 bc9e4c1
Merge pull request #638 from VenusProtocol/fix/certik-audit
chechu fba0819
test: fix EvilXDelegator test and the build step
chechu bcbd24d
Merge branch 'develop' into feat/VEN-2985
chechu 76eebd4
feat: add deployments for Facets, Diamond, ComptrollerLens and VBep20…
Debugger022 5f264f6
feat: updating deployment files
Debugger022 2932de2
feat: add deployments for Facets, Diamond, ComptrollerLens and VBep20…
Debugger022 7fd685c
feat: updating deployment files
Debugger022 cc4b4f2
feat: s1
Debugger022 64c04cf
feat: s3
Debugger022 bb6db03
refactor: update max vTokens length
Debugger022 ec80cec
refactor: remove isFlashLoanPaused function
Debugger022 bfde12e
Merge pull request #642 from VenusProtocol/feat/quantstamp-audit-miti…
Debugger022 a58624d
feat: update bsctestnet deployments
Debugger022 7ba8333
feat: updating deployment files
Debugger022 514220a
feat: update bscmainnet deployments
Debugger022 43a4fec
feat: updating deployment files
Debugger022 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.