VTVL contest - ch13fd357r0y3r's results

Building no-code token management tools to empower web3 founders and investors, starting with token vesting.

General Information

Platform: Code4rena

Start Date: 20/09/2022

Pot Size: $30,000 USDC

Total HM: 12

Participants: 198

Period: 3 days

Judge: 0xean

Total Solo HM: 2

Id: 164

League: ETH

VTVL

Findings Distribution

Researcher Performance

Rank: 147/198

Findings: 1

Award: $18.86

🌟 Selected for report: 0

🚀 Solo Findings: 0

The withdrawOtherToken() is an admin function which is used to send tokens to users who accidentally sent other tokens to the contract.

If the admin calls this function the funds are directly sent to Admin EOA or Contract. Can add argument address recipient to the withdrawOtherToken()` function and send funds to the recipient who lost the funds.

Fix:

function withdrawOtherToken(IERC20 _otherTokenAddress, address recipient) external onlyAdmin { require(_otherTokenAddress != tokenAddress, "INVALID_TOKEN"); // tokenAddress address is already sure to be nonzero due to constructor uint256 bal = _otherTokenAddress.balanceOf(address(this)); require(bal > 0, "INSUFFICIENT_BALANCE"); _otherTokenAddress.safeTransfer(recipient, bal); }
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