No related function to set fee_protocol #8
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
M-12
primary issue
Highest quality submission among a set of duplicates
🤖_03_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-08-superposition/blob/4528c9d2dbe1550d2660dac903a8246076044905/pkg/seawater/src/pool.rs#L31
Vulnerability details
Impact
There are no related functions to set
fee_protocol
, which prevents the protocol from accumulating protocol fees.Proof of Concept
The pool contract defines the protocol fee rate
fee_protocol
, but there is no function to set it.The contract also defines the
collect_protocol
andcollect_protocol_7540_F_A_9_F
functions to collect fees. However, since the protocol fee rate cannot be set, the protocol will never accumulate any protocol fees.github:link
pkg/seawater/src/lib.rs
github: link
pkg/seawater/src/pool.rs
Tools Used
Manual Review
Recommended Mitigation Steps
Add the relevant functions to enable protocol fees.
pkg/seawater/src/pool.rs
pkg/seawater/src/lib.rs
Assessed type
Other
The text was updated successfully, but these errors were encountered: