I'm evaluating a new security tool for Move that highlighted a variable misuse in one suspicious case.
Here it is:
// check that the guardian is valid
assert!(oracle.expiration_time_ms() > clock.timestamp_ms(), EGuardianInvalid);
Comment says "guardian", error says EGuardianInvalid, but code checks oracle. The other suspicious signs I found after manual evaluation:
guardian.expiration_time_ms is never checked in the source code
- Other
oracle.expiration_time_ms checks raise EOracleInvalid (here and here).
So, I suspect the warning is valid. It is likely a typo; should be guardian.expiration_time_ms() or comment/error is wrong.
Impact: the intended validation logic seems to not work as expected, but it is not exploitable because of min_attestations.