The HuffStore.huff::IS_HAPPY_HORSE macro is intended to check if a horse has been fed after yesterday. However, due to the use of the lt opcode, it returns true when the horse is starving and the opposite when it is fed. There is an exception with the eq opcode, where it returns true when FEED_HORSE is called in the same transaction as IS_HAPPY_HORSE (in that order), such as in a smart contract.
This inconsistency breaks the logic and the protocol.
To address this issue, change the lt opcode to gt opcode. Additionally, you can remove the eq and dup2 dup2 part, as there is no case where it is reachable now. To return false, keep the jump and add 0x00 before. Here is a suggested solution:
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.