Tracer contest - pauliax's results

Build and trade with Tracer’s Perpetual Swaps and gain leveraged exposure to any market in the world.

General Information

Platform: Code4rena

Start Date: 24/06/2021

Pot Size: $80,000 USDC

Total HM: 18

Participants: 12

Period: 7 days

Judge: cemozer

Total Solo HM: 11

Id: 16

League: ETH

Tracer

Findings Distribution

Researcher Performance

Rank: 6/12

Findings: 4

Award: $4,005.09

🌟 Selected for report: 5

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: 0xRajeev

Also found by: gpersoon, pauliax

Labels

bug
duplicate
3 (High Risk)

Awards

1811.7475 USDC - $1,811.75

External Links

Handle

pauliax

Vulnerability details

Impact

contract TracerPerpetualSwaps is SafetyWithdraw. It allows an owner to transfer all tokens from this contract whenever he wants (e.g. no protection against tracerQuoteToken, etc). Tracer representative's answer on Discord: 'safetyWithdraw isn't needed as a failover mechanism anymore. I'd say thats a valid find'.

Get rid of SafetyWithdraw or protect legitimately deposited user tokens.

#0 - raymogg

2021-07-05T23:09:32Z

Duplicate of #81

#1 - ninek9

2021-08-24T22:15:42Z

changed severity per judge

Findings Information

🌟 Selected for report: s1m0

Also found by: 0xRajeev, JMukesh, Lucius, cmichel, pauliax, shw

Labels

bug
duplicate
2 (Med Risk)

Awards

152.8313 USDC - $152.83

External Links

Handle

pauliax

Vulnerability details

Impact

When transfering erc20 tokens, functions transfer and transferFrom are used. These functions return boolean to indicate if the action was sucessfull, however, none of the usages check the returned value: collateralToken.transferFrom(msg.sender, address(this), rawTokenAmount); IERC20(tracerQuoteToken).transferFrom(msg.sender, address(this), rawTokenAmount); collateralToken.transfer(msg.sender, rawTokenAmount); IERC20(tracerQuoteToken).transfer(msg.sender, rawTokenAmount); IERC20(tracerQuoteToken).transfer(feeReceiver, tempFees);

There are lots of possible issues with different erc20 tokens (https://github.com/xwvvvvwx/weird-erc20) but the current best practice to deal with it is using SafeERC20: https://docs.openzeppelin.com/contracts/2.x/api/token/erc20#SafeERC20

#0 - raymogg

2021-07-05T06:43:32Z

Duplicate of #115

#1 - loudoguno

2021-08-24T16:08:17Z

changed risk from 1 to 2 as per judges sheet

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