Skip to content

Conversation

@Debugger022
Copy link
Contributor

This PR introduces VIP to the implementation of the SwapRouter contract and transfers its ownership to Venus Protocol on the BNB Chain, both on the testnet and mainnet.

@Debugger022 Debugger022 self-assigned this Jan 21, 2026
Debugger022 and others added 4 commits January 27, 2026 13:10
…a in vip-581 addendum2

Use deterministic EIP-712 signer for SwapHelper multicall instead of
fetching live swap quotes from the Venus API, making tests reproducible
on forked chains without external dependencies.
fred-venus
fred-venus previously approved these changes Jan 27, 2026
Copy link
Contributor

Choose a reason for hiding this comment

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

very detailed test ~

…dum2

Replace USDC with U token as collateral in cross-asset leverage tests
(enterLeverage, exitLeverage, enterLeverageFromBorrow) since the VIP
enables flash loans on vU. Update U_HOLDER to a whale with sufficient
balance at the fork block and remove unused USDC references.
…p strategy and parallel execution

  - Add Venus swap API integration (20s timeout, single retry on quick failures)
    with PancakeSwap V2 fallback for swap calldata building
  - Parallelize independent RPC calls using Promise.all for balance reads,
    signer initialization, and view function queries
  - Fix nonce conflicts by keeping same-signer transactions sequential
    (oracle configs, revert assertions, token transfers)
  - Add results tracker with summary table printed after all tests
  - Extract reusable parseEvents helper to reduce event parsing boilerplate
  - Fix enterLeverageFromBorrow: add missing USDT approval for
    LeverageStrategiesManager before entering leverage from borrow
  - Remove verbose JSDoc comments in favor of self-documenting code
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