Biconomy Hyphen 2.0 contest - shenwilly's results

Next-Gen Multichain Relayer Protocol.

General Information

Platform: Code4rena

Start Date: 10/03/2022

Pot Size: $75,000 USDT

Total HM: 25

Participants: 54

Period: 7 days

Judge: pauliax

Total Solo HM: 10

Id: 97

League: ETH

Biconomy

Findings Distribution

Researcher Performance

Rank: 49/54

Findings: 1

Award: $99.26

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: Jujic

Also found by: IllIllI, Ruhum, defsec, hagrid, minhquanym, shenwilly

Labels

bug
duplicate
2 (Med Risk)

Awards

99.257 USDT - $99.26

External Links

Lines of code

https://github.com/code-423n4/2022-03-biconomy/blob/04751283f85c9fc94fb644ff2b489ec339cd9ffc/contracts/hyphen/LiquidityPool.sol#L165-L170 https://github.com/code-423n4/2022-03-biconomy/blob/04751283f85c9fc94fb644ff2b489ec339cd9ffc/contracts/hyphen/LiquidityProviders.sol#L273 https://github.com/code-423n4/2022-03-biconomy/blob/04751283f85c9fc94fb644ff2b489ec339cd9ffc/contracts/hyphen/LiquidityProviders.sol#L325

Vulnerability details

Impact

There are ERC20 tokens that charge fee for every transfers (most notably USDT, which has a toggleable fee).

LiquidityProviders.addTokenLiquidity(), LiquidityProviders.increaseTokenLiquidity(), and LiquidityPool.depositErc20() assume that the received amount will be the same as the transfer amount, while the the actual transferred amount will be lower, leading to inaccurate accounting.

In LiquidityProviders.sol this will lead to later users not being able to withdraw their deposits. In LiquidityPool.sol it will cause incorrect calculation of reward and fees.

Consider using the difference before and after the transfer as the amount to be used for accounting.

#0 - ankurdubey521

2022-03-30T11:53:01Z

Duplicate of #39

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