Canto Liquidity Mining Protocol - taner2344's results

Execution layer for original work.

General Information

Platform: Code4rena

Start Date: 03/10/2023

Pot Size: $24,500 USDC

Total HM: 6

Participants: 62

Period: 3 days

Judge: LSDan

Total Solo HM: 3

Id: 288

League: ETH

Canto

Findings Distribution

Researcher Performance

Rank: 58/62

Findings: 1

Award: $4.94

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

4.9369 USDC - $4.94

Labels

bug
grade-b
QA (Quality Assurance)
sufficient quality report
Q-21

External Links

Loss of precision

Multiplication should always be performed before division to avoid loss of precision.

https://github.com/code-423n4/2023-10-canto/blob/40edbe0c9558b478c84336aaad9b9626e5d99f34/canto_ambient/contracts/mixins/LiquidityMining.sol#L96C21-L97C77

https://github.com/code-423n4/2023-10-canto/blob/40edbe0c9558b478c84336aaad9b9626e5d99f34/canto_ambient/contracts/mixins/LiquidityMining.sol#L208C17-L209C73

Impact

Because of nextWeek effects time-weighted concentrated liquidity , this could cause of miscalculation.

Recommended Mitigation Steps

-- uint32 currWeek = uint32((time / WEEK) * WEEK);
-- uint32 nextWeek = uint32(((time + WEEK) / WEEK) * WEEK);

++ uint32 currWeek = uint32((time * WEEK) / WEEK);
++ uint32 nextWeek = uint32(((time + WEEK) * WEEK) / WEEK);

#0 - c4-pre-sort

2023-10-09T17:22:15Z

141345 marked the issue as sufficient quality report

#1 - c4-judge

2023-10-18T22:47:52Z

dmvt marked the issue as grade-b

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