Literally anybody, even those who haven't found their soulmate, can execute the getDivorced
public function. Consequently, the execution results in a successful divorce between the individual who invoked the getDivorced
function and a nonexistent (address(0))
person.
Place the following test code snippet into the test/unit/soulmateTest.t.sol file. Put it at the very bottom but before the last closing semicolon }
.
Open Your Bash Terminal
and execute the following command...
Ouput should indicate that test Passed Successfully and not reverted anywhere. So, It's ambiguous that Anyone can get divorced with a nonexistent person so called address(0)
.
This behavior doesn't result in any tangible consequences other than creating ambiguity within the Soulmate
Protocol.
Foundry Framework (Solidity, Rust)
Update the src/Soulmate.sol
file with the following code modifications...
After modifying and updating the Soulmate.sol
file, try to re-execute the test discussed in the Proof of Concept (PoC). It should get reverted with the error Soulmate__DontHaveAnySoulmate(0x0000000000000000000000000000000000000000)
, which may also have one argument of a zero address.
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.