zlsecure3 / review_Aark

0 stars 0 forks source link

no need to define `SHARE_DECIMAL` for `InsuranceLogic::updateShare` function #13

Open zlsecure3 opened 1 year ago

zlsecure3 commented 1 year ago

subject

no need to define SHARE_DECIMAL for InsuranceLogic::updateShare function

description

Both SHARE_DECIMAL and VALUE_DECIMALS are defined as constant 18, so this will be a noop:

MathUtil.convertUintDecimals(
                liquidity,
                Constants.VALUE_DECIMALS,
                SHARE_DECIMAL
            )

Conceptually, it will also be easier to understand if VALUE_DECIMALS is used as share decimal directly.

recommendation

Remove SHARE_DECIMAL and the above convertUintDecimals call to save some gas.

locations

severity

Informational

damage

exploitability

category

Code Style


system_generated: auditor:alansh submission_id:1761659453

zlsecure3 commented 1 year ago

grading (edit)


submission_id:1761659453


review_type:GRADING


result: TBD-yes,no


rating: TBD-123


comment: TBD-Rejected,Accepted by Secure3.


severity: TBD-Critical,Medium,Low,Informational


category:


description:


zlsecure3 commented 1 year ago

client feedback (manual copy)


submission_id:1761659453


review_type:CLIENT_FEEDBACK


result: TBD-yes,no


severity: TBD-Critical,Medium,Low,Informational


comment:


zlsecure3 commented 1 year ago

client feedback decision(edit)


submission_id:1761659453


review_type:CLIENT_FEEDBACK_DECISION


result: TBD-yes,no,yes-honored,no-honored


severity: TBD-Critical,Medium,Low,Informational


comment: