Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
33f00ab
feat: add generic swapper contract
Debugger022 Oct 8, 2025
7792b57
feat: add SwapHelper contract
Debugger022 Oct 8, 2025
988136d
refactor: update imports
Debugger022 Oct 8, 2025
d81840d
feat: update interface
Debugger022 Oct 8, 2025
989dea3
refactor: update PositionSwapper to intergrate Swaphelper
Debugger022 Oct 14, 2025
486d1cf
fix: minor fixes
Debugger022 Oct 14, 2025
5ae419f
refactor: update unit tests of position swapper
Debugger022 Oct 16, 2025
234b16c
feat: add position swapper unit tests for non native markets
Debugger022 Oct 16, 2025
300dfbb
fix: clean up approved pair logic after moving to a unified SwapHelper
GitGuru7 Oct 24, 2025
28c916a
feat: update PositionSwapper to use flashLoan
GitGuru7 Oct 28, 2025
f65aad5
feat: add IPositionSwapper and refactor PositionSwapper
GitGuru7 Oct 31, 2025
1572520
refactor: refactor and cleanup unused code
GitGuru7 Nov 3, 2025
d35a899
refactor: removed WBNB swap helper
GitGuru7 Nov 3, 2025
8d82fc2
refactor: use interface instead of contract directly
GitGuru7 Nov 3, 2025
55032b6
test: add unit tests for main swap functionality
GitGuru7 Nov 3, 2025
115dc94
test: add more unit tests
GitGuru7 Nov 3, 2025
73c6eb6
Merge branch 'feat/swapper' into feat/generic-position-swapper
GitGuru7 Nov 7, 2025
ffa6b81
feat: add deployment script
GitGuru7 Nov 7, 2025
0aa1785
fix: tests
GitGuru7 Nov 7, 2025
ac4402a
fix: update unit tests for swapHelper changes
GitGuru7 Nov 10, 2025
5add8bb
refactor: minor cleanups
GitGuru7 Nov 11, 2025
6c26ccd
test: add position-swapper fork test
GitGuru7 Nov 11, 2025
9dd9335
test: add more fork tests for position-swapper
GitGuru7 Nov 12, 2025
3259c8c
refactor: drop unnecessary payable and add mantissa-one constant
GitGuru7 Nov 18, 2025
972dd09
fix: add sender validation in receive
GitGuru7 Nov 20, 2025
893033e
refactor: combine full and partial swap functions
GitGuru7 Nov 20, 2025
bd3458d
fix: use ceil in calculateFlashLoanAmount
GitGuru7 Nov 21, 2025
d6362b4
Merge branch 'develop' into feat/generic-position-swapper-develop-merge
Exef Dec 15, 2025
10eab6c
Merge branch 'develop' into feat/generic-position-swapper
GitGuru7 Jan 13, 2026
08628a2
fix: formatting
GitGuru7 Jan 13, 2026
df1afeb
fix: tests
GitGuru7 Jan 13, 2026
15badf5
fix: tests ci check
GitGuru7 Jan 13, 2026
88f8d71
fix: tests ci check
GitGuru7 Jan 13, 2026
9a3e27c
fix: [VEN-1] Missing Initiator Validation in Flashloan Callback
GitGuru7 Jan 21, 2026
b3b5517
fix: [S1] No Validation that marketFrom and marketTo Are Different
GitGuru7 Jan 21, 2026
063c9f9
fix: [S2] Return Data From SWAP_HELPER.call() Is Ignored
GitGuru7 Jan 21, 2026
5f3a8d8
fix: [S3] Native Swap Functions Are Not Generic
GitGuru7 Jan 21, 2026
340b49f
fix: [1] Code Clarity
GitGuru7 Jan 27, 2026
e90fd7a
docs: add quantstamp audit report for position-swapper-v2
GitGuru7 Jan 29, 2026
5beef24
Merge pull request #46 from VenusProtocol/feat/vpd-306-quantstamp-audit
GitGuru7 Jan 29, 2026
3ed9fb3
docs: add cantina audit report for position-swapper-v2
GitGuru7 Feb 5, 2026
d99a896
Merge pull request #48 from VenusProtocol/feat/vpd-306-cantina-audit
GitGuru7 Feb 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions contracts/Interfaces.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@ interface IVToken is IERC20Upgradeable {
function borrowBalanceStored(address account) external view returns (uint256);

function underlying() external view returns (address);

function redeemBehalf(address redeemer, uint256 redeemTokens) external returns (uint256);

function flashLoanFeeMantissa() external view returns (uint256);
}

interface IVBNB is IVToken {
function mint() external payable;

function repayBorrowBehalf(address borrower) external payable;

function liquidateBorrow(address borrower, IVToken vTokenCollateral) external payable;
Expand Down Expand Up @@ -74,10 +80,29 @@ interface IComptroller {
function getAccountLiquidity(address account) external view returns (uint256, uint256, uint256);

function checkMembership(address account, IVToken vToken) external view returns (bool);

function executeFlashLoan(
address payable onBehalf,
address payable receiver,
IVToken[] memory vTokens,
uint256[] memory underlyingAmounts,
bytes memory param
) external;
}

interface IWBNB is IERC20Upgradeable {
function deposit() external payable;

function withdraw(uint256 amount) external;
}

interface IFlashLoanReceiver {
function executeOperation(
IVToken[] calldata vTokens,
uint256[] calldata amounts,
uint256[] calldata premiums,
address initiator,
address onBehalf,
bytes calldata param
) external returns (bool success, uint256[] memory repayAmounts);
}
Loading