Asymmetry contest - Englave's results

A protocol to help diversify and decentralize liquid staking derivatives.

General Information

Platform: Code4rena

Start Date: 24/03/2023

Pot Size: $49,200 USDC

Total HM: 20

Participants: 246

Period: 6 days

Judge: Picodes

Total Solo HM: 1

Id: 226

League: ETH

Asymmetry Finance

Findings Distribution

Researcher Performance

Rank: 165/246

Findings: 1

Award: $13.13

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

L01. Ether receive without sender restriction The current contract implementation presents a potential risk for users due to its unrestricted nature, allowing anyone to send Ether to the contracts. It will result in the permanent loss of funds without providing any benefits to the affected users. To mitigate this risk and enhance the security of the contract implementation, it is recommended to incorporate the receive function along with a msg.sender check. This approach will allow only designated contracts to send native tokens, effectively protecting users from unintended loss of funds.

L02. Risks Associated with Floating Pragma The use of floating pragma in Solidity contracts has been identified as a potential source of security risks and unintended behavior. Floating pragma refers to the practice of using non-specific or non-fixed version numbers in the pragma statement, which may cause the contract to compile with different compiler versions, each with its own set of features and potential vulnerabilities.

Risks:

  1. Security Vulnerabilities: Compiling with different compiler versions may inadvertently introduce security vulnerabilities that were not present in the intended version. This can leave the contract susceptible to attacks and exploitation.
  2. Unintended Behavior: Different compiler versions can lead to varying interpretations of the contract code, resulting in unintended behavior and potential loss of funds or data.
  3. Incompatibilities: As new versions of the Solidity compiler are released, backward compatibility is not always guaranteed. Using a floating pragma can cause compilation errors or unexpected behavior due to deprecated features or breaking changes.
  4. Difficulty in Auditing: The use of floating pragma makes it challenging to ascertain which compiler version was used during the contract's deployment, hindering the auditing process and reducing overall confidence in the contract's security.

Recommended Solution: To minimize the risks associated with a floating pragma, it is advised to specify a fixed compiler version in the pragma statement. By doing so, developers can ensure that their contracts are compiled using a stable and secure version of the Solidity compiler.

#0 - c4-sponsor

2023-04-07T22:16:54Z

elmutt marked the issue as sponsor confirmed

#1 - c4-judge

2023-04-24T19:07:13Z

Picodes 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