The getDivorced
function in the Soulmate protocol allows users to cancel the possibility for two lovers to collect LoveToken from the airdrop. However, this functionality can be exploited by malicious users to launch a Denial of Service (DoS) attack, disrupting the Soulmate protocol and preventing legitimate users from claiming rewards.
The vulnerability arises from the lack of rate limiting or access controls in the getDivorced
function, which allows users to call it repeatedly without any restrictions. Below is the function:
This function can be called multiple times by the same user or different users, leading to a significant disruption in the Soulmate protocol's functionality.
Disruption of the Soulmate protocol's functionality.
Prevention of legitimate users from claiming LoveToken rewards.
Financial losses for users relying on LoveToken rewards for staking or other purposes.
Through code review and analysis.
To mitigate the risk of DoS attacks, it is recommended to implement rate limiting or access controls in the getDivorced
function. Sample of to enhance the function to include rate limiting:
Additionally, consider implementing mechanisms such as cooldown periods or gas cost adjustments to discourage repeated calls to this function. These measures will help protect the Soulmate protocol from DoS attacks and ensure the stability of the platform.
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.