Tracer contest - s1m0'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: 9/12

Findings: 3

Award: $1,362.16

🌟 Selected for report: 1

πŸš€ Solo Findings: 0

Findings Information

🌟 Selected for report: s1m0

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

Labels

bug
2 (Med Risk)
sponsor confirmed

Awards

152.8313 USDC - $152.83

External Links

Handle

s1m0

Vulnerability details

Impact

The smart contract doesn't check the return value of token.transfer() and token.transferFrom(), some erc20 token might not revert in case of error but return false. In the TracerPerpetualSwaps:deposit and Insurance:deposit this would allow a user to deposit for free. Other places: TracerPerpetualSwaps: withdraw TracerPerpetualSwaps:withdrawFees SafetyWithdraw:withdrawERC20Token Insurance:withdraw

Wrap the call into a require() or use openzeppelin's SafeERC20 library.

Findings Information

🌟 Selected for report: tensors

Also found by: s1m0

Labels

bug
duplicate
2 (Med Risk)

Awards

905.8738 USDC - $905.87

External Links

Handle

s1m0

Vulnerability details

Impact

The smart contract doesn't behave correctly if deployed with token that have decimals > 18.

Proof of Concept

The functions tokenToWad and wadToToken revert if the tokenDecimals is > 18. These functions are called in critical places like deposit() and withdraw.

Consider checking in the constructor that _tokenDecimals is <= 18.

#0 - raymogg

2021-07-05T06:41:54Z

Duplicate of #116

#1 - loudoguno

2021-08-24T16:35:37Z

changed risk from 1 to 2 as per judges sheet

Findings Information

🌟 Selected for report: pauliax

Also found by: 0xRajeev, s1m0, shw

Labels

bug
duplicate
1 (Low Risk)

Awards

122.293 USDC - $122.29

External Links

Handle

s1m0

Vulnerability details

Impact

The chainId for eip-712 signature is hardcoded in the code, in case of a hard fork the contract would exist on both the chains which make signature replay possible between them.

The most efficient mitigation is to use a cachedDomainSeparator to not recompute it every time but only check the current block.chainid with a cachedChainId, you can follow the openzeppelin's implementation

#0 - raymogg

2021-07-05T06:38:25Z

Duplicate of #67

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