sherlock-audit / 2024-01-napier-judging

9 stars 6 forks source link

AuditorPraise - According to EIP-5095 Tranche.sol should have a view maturity function method but it doesn't #6

Closed sherlock-admin2 closed 7 months ago

sherlock-admin2 commented 7 months ago

AuditorPraise

medium

According to EIP-5095 Tranche.sol should have a view maturity function method but it doesn't

Summary

Tranche.sol doesn't really conform to EIP-5095 standard it doesn't have a view maturity function method

Vulnerability Detail

Standards are strict and must be adhered to for the benefits of everyone.

Other protocols that implement ERC-5095 or ones that interact with ERC-5095 could check and maybe use Tranche.sol's view maturity function method, but since it doesn't really have one they won't be able to.

 maturity
The unix timestamp (uint256) at or after which Principal Tokens can be redeemed for their underlying deposit.

MUST NOT revert.

- name: maturity
  type: function
  stateMutability: view

  inputs: []

  outputs:
    - name: timestamp
      type: uint256

Impact

Tranche.sol doesn't conform to EIP-5095

Code Snippet

https://eips.ethereum.org/EIPS/eip-5095#maturity

https://github.com/sherlock-audit/2024-01-napier/blob/main/napier-v1/src/Tranche.sol#L42

Tool used

Manual Review

Recommendation

add a view maturity function method to tranche.sol.

massun-onibakuchi commented 7 months ago

maturity method is implemented in BaseToken

xiaoming9090 commented 7 months ago

Escalate.

The issue is invalid. The following public maturity variable will automatically create a public view function when deployed.

File: Tranche.sol
66:     /// @inheritdoc IERC5095
67:     /// @notice The timestamp of maturity in unix seconds
68:     uint256 public immutable override(BaseToken, IERC5095) maturity;
sherlock-admin2 commented 7 months ago

Escalate.

The issue is invalid. The following public maturity variable will automatically create a public view function when deployed.

File: Tranche.sol
66:     /// @inheritdoc IERC5095
67:     /// @notice The timestamp of maturity in unix seconds
68:     uint256 public immutable override(BaseToken, IERC5095) maturity;

You've created a valid escalation!

To remove the escalation from consideration: Delete your comment.

You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.

AuditorPraise commented 7 months ago

Escalate.

The issue is invalid. The following public maturity variable will automatically create a public view function when deployed.

File: Tranche.sol
66:     /// @inheritdoc IERC5095
67:     /// @notice The timestamp of maturity in unix seconds
68:     uint256 public immutable override(BaseToken, IERC5095) maturity;

Jeez man, there's no need to escalate it's already judged as invalid

cvetanovv commented 7 months ago

This report is invalid. I don't know why it was escalated to be invalid.

Czar102 commented 6 months ago

Result: Invalid Unique

sherlock-admin3 commented 6 months ago

Escalations have been resolved successfully!

Escalation status: