Open zlsecure3 opened 1 year ago
submission_id:1765494217
review_type:GRADING
result: TBD-yes,no
rating: TBD-123
comment: TBD-Rejected,Accepted by Secure3.
severity: TBD-Critical,Medium,Low,Informational
category:
description:
submission_id:1765494217
review_type:CLIENT_FEEDBACK
result: TBD-yes,no
severity: TBD-Critical,Medium,Low,Informational
comment:
submission_id:1765494217
review_type:CLIENT_FEEDBACK_DECISION
result: TBD-yes,no,yes-honored,no-honored
severity: TBD-Critical,Medium,Low,Informational
comment:
subject
observer design is very gas in-efficiency
description
observer take the
push
way to write all the cache data into various contracts, such as vault, lpManager etc. this method has some advantage, for example, when u want to change thelpManager
address, you can just call thesetLpManager
function, and it will update the newlpManager
address into all the related contracts. however, it is especially gas costly during the initialize process. consider the following schema: after deploy, when initialize:futureManager
cache data for 1st timefutureManager
cache data for 2nd time,lpManager
cache data for 1st timefutureManager
cache data for 3rd time,lpManager
cache data for 2nd time,priceOracle
cache data for 1st timefutureManager
cache data for 4th time,lpManager
cache data for 3rd time,priceOracle
cache data for 2nd time,vault
cache data for 1st timefutureManager
cache data for 5th time,lpManager
cache data for 4th time,priceOracle
cache data for 3rd time,vault
cache data for 2nd time,masterRouter
cache data for 1st timefutureManager
cache data for 6th time,lpManager
cache data for 5th time,priceOracle
cache data for 4th time,vault
cache data for 3rd time,masterRouter
cache data for 2nd time,sethInsuranceManager
cache data for 1st timerecommendation
set the corresponding address, such as
vault
,lpManager
,futuresManager
,masterRouter
,insuranceManager
,priceOracle
inside the initialize function, to avoid the recursive cache data. you may refer to the following modification:locations
severity
Low
damage
exploitability
category
Logical
system_generated: auditor:comcat submission_id:1765494217