Description: The TokenDivider contract collects ETH fees (1% of transaction value) during token sale operations but lacks any mechanism to withdraw these accumulated fees. This creates a critical vulnerability where ETH becomes permanently locked within the contract. The contract implements fee collection during token sales but fails to provide the contract owner or any other authorized party with the ability to retrieve these fees, effectively burning all collected fees permanently.
Impact: The impact of this vulnerability is severe for several reasons. First, all transaction fees collected by the contract are permanently inaccessible, resulting in a continuous and irreversible loss of funds. This directly affects the protocol's revenue model, as fees meant to compensate the protocol operators become permanently locked. As more transactions occur, the amount of locked ETH will continue to grow, potentially reaching significant values over time. Additionally, this could affect user trust in the protocol, as the permanent locking of fees might be seen as poor contract design or management.
Proof of Concept: The following test demonstrates how ETH becomes permanently locked in the contract:
Recommended Mitigation: To address this vulnerability, implement a secure withdrawal mechanism for collected fees. Here are the recommended changes:
Add a withdrawal function accessible only by the contract owner:
Add an event to track fee withdrawals:
Consider implementing additional safety features:
Add a time-lock mechanism for large withdrawals
Implement a maximum withdrawal amount per transaction
Add an emergency pause mechanism for the withdrawal function
Consider splitting fee withdrawals among multiple authorized recipients
Add comprehensive withdrawal tracking:
The implementation of these mitigations would ensure that collected fees can be properly managed and withdrawn by authorized parties while maintaining security and transparency of the fee collection system.
The extra eth sent by the user in the buy order will be locked in the contract forever
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.