In the PerpetuelVault.sol (617-618) contract resets flowData
and flow
when a trade signal change fails, but it does not emit an event before doing so. This creates a lack of transparency for off-chain bots and keepers tracking positions, making it difficult to debug and restart processes when failures occur.
When a trade signal change fails, the contract resets flowData
and flow
without notifying off-chain tracking mechanisms.
Off-chain bots that rely on event logs will have no way of knowing why the reset occurred.
This could lead to inefficiencies, requiring manual intervention to investigate and restart the process.
Lack of transparency: Keepers and bots monitoring the contract will be unaware of failed trade signals.
Difficulty in debugging: Without an event, developers and off-chain services cannot easily determine when and why a signal change was reset.
Potential operational inefficiencies: Bots may continue operating under incorrect assumptions, leading to potential errors or delays in trade execution.
Manuel Review
Modify the existing logic to include an event emission before deleting flowData
and flow
:
Improved debugging: Keepers and bots can listen for the FlowReset
event to understand why the reset happened.
Increased contract transparency: Event logs will provide a historical record of trade signal failures.
Better off-chain tracking: Off-chain services can use the event to adjust their strategies accordingly.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.