Sublime contest - Jujic's results

Democratizing credit via Web3.

General Information

Platform: Code4rena

Start Date: 09/12/2021

Pot Size: $50,000 USDC

Total HM: 19

Participants: 21

Period: 7 days

Judge: 0xean

Total Solo HM: 14

Id: 61

League: ETH

Sublime

Findings Distribution

Researcher Performance

Rank: 14/21

Findings: 3

Award: $931.68

🌟 Selected for report: 3

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: sirhashalot

Also found by: Jujic, sirhashalot

Labels

bug
duplicate
2 (Med Risk)
disagree with severity

Awards

380.2618 USDC - $380.26

External Links

Handle

Jujic

Vulnerability details

Some tokens (like USDT) do not work when changing the allowance from an existing non-zero allowance value. They must first be approved by zero and then the actual allowance must be approved.

Impact

When using one of these unsupported tokens, all transactions revert and the protocol cannot be used.

Proof of Concept

https://github.com/code-423n4/2021-12-sublime/blob/9df1b7c4247f8631647c7627a8da9bdc16db8b11/contracts/CreditLine/CreditLine.sol#L647 https://github.com/code-423n4/2021-12-sublime/blob/9df1b7c4247f8631647c7627a8da9bdc16db8b11/contracts/CreditLine/CreditLine.sol#L779

Tools Used

Use approve with a zero amount first before setting the actual amount.

IERC20(_collateralAsset).approve(_strategy, _amount); IERC20(_collateralAsset).approve(_strategy, 0);

#0 - ritik99

2021-12-27T04:50:12Z

Duplicate of #97

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