Venus Protocol Isolated Pools - BugBusters's results

Earn, Borrow & Lend on the #1 Decentralized Money Market on the BNB Chain

General Information

Platform: Code4rena

Start Date: 08/05/2023

Pot Size: $90,500 USDC

Total HM: 17

Participants: 102

Period: 7 days

Judge: 0xean

Total Solo HM: 4

Id: 236

League: ETH

Venus Protocol

Findings Distribution

Researcher Performance

Rank: 25/102

Findings: 1

Award: $732.00

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: 0xnev

Also found by: 0xStalin, BugBusters, chaieth

Labels

bug
2 (Med Risk)
satisfactory
duplicate-167

Awards

731.996 USDC - $732.00

External Links

Lines of code

https://github.com/code-423n4/2023-05-venus/blob/8be784ed9752b80e6f1b8b781e2e6251748d0d7e/contracts/RiskFund/RiskFund.sol#L265

Vulnerability details

Impact

Setting the deadline parameter in a pancake swap transaction to the block.timestamp value can have significant implications for the success of the transaction. Here are impacts:

1.Risk of Transaction Failure: Setting the deadline to the current block timestamp may not provide sufficient time for the transaction to be executed, especially during times of high network congestion. If the transaction is not executed within the specified deadline, it will be considered invalid and reverted, causing the user to lose any gas fees paid for the transaction.

2.Front-Running: When the deadline is set to the current block timestamp, it gives front-runners an opportunity to observe the pending transaction and execute a similar transaction with a higher gas fee, and delaying the user transaction and it will fail.

Proof of Concept

                    uint256[] memory amounts = IPancakeswapV2Router(pancakeSwapRouter).swapExactTokensForTokens(
                        balanceOfUnderlyingAsset,
                        amountOutMin,
                        path,
                        address(this),
                        block.timestamp
                    );

Tools Used

Manual review

Allow the user who calling the swapPoolAssets function to also specify the moderate deadline in the params and pass that to pancake swap swapExactTokensForTokens function .

Assessed type

Other

#0 - c4-judge

2023-05-18T10:33:54Z

0xean marked the issue as duplicate of #167

#1 - c4-judge

2023-06-05T14:15:35Z

0xean marked the issue as satisfactory

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter