Reports

Smart Contract Security Assessment

Vfat - Automation

The Automation contracts implement fine-grained access control for specific off-chain infrastructure operators to execute permissioned actions on behalf of a Sickle.

2
Issues
0
C/H/M
Period
Sep 10, 2025 - Sep 11, 2025
Auditors
Panda, Watermelon

Review Summary

Protocol Overview

The Automation contracts implement fine-grained access control for specific off-chain infrastructure operators to execute permissioned actions on behalf of a Sickle.

Protocol
Sickle
Timeline
Sep 10, 2025 - Sep 11, 2025
Audit Team
Panda, Watermelon

Audit Overview

Scope and Resources

Scope

This audit covers a single smart contract and a library totaling 461 lines of code across 2 days of review.

Overall Assessment

The reviewed smart contract was found to be free of major vulnerabilities and work as expected. Minor suggestions are proposed to the Sickle team to polish the smart contract.

Evaluation Matrix

access control

mathematics

complexity

libraries

decentralization

code stability

documentation

monitoring

testing

Key Findings

Findings Summary

0
Critical
0
High
0
Medium
0
Low
2
Informational
0
Gas
I-1 Finding

I-1: Admin may set automators for any Sickle without explicit approval

Informational

Summary:

Automation.sol is used to enable protocol-approved accounts, controlled by off-chain infrastructure, to execute privileged actions on a user's Sickle periodically.

Description:

Automation.admin may invoke any of the following methods to create an automator for a Sickle:

These methods do not require the Sickle owner to have explicitly allowed a given automator to be set for his Sickle.

Impact:

Informational.

Recommendation:

Within the highlighted methods, add a verification step to ensure the owner of the Sickle has approved such automator. This may be achieved, for example, by verifying an ECDSA signature signed by the Sickle owner over the automator's address, the permissions granted, a nonce, and optionally a deadline timestamp.

Developer Response:

This is done one layer up, the Sickle user has to enable automation by calling setApproved on their Sickle with the address of the Automation contract.

I-2 Finding

I-2: `permissions` bit map isn't checked to have unused bits set to `0`

Informational

Summary:

The Automation.sol contract uses a 256-bit map to track which actions a given automator can execute on a Sickle.

Description:

The AutomationPermissions.sol library defines the 7 valid flags settable within a permissions bit map.

The methods used to set custom permissions for an automator, Automation.setCustomAutomatorForSickle and Automation.setApprovedAutomatorWithPermissions fail to verify that the unused bits in the bit map are set to 0.

Impact:

Informational.

Recommendation:

Implement a validatePermissions modifier and apply it to the highlighted methods, to ensure the upper, unused bits in the permissions bit map are all set to 0:

modifier validatePermissions(uint256 permissions) {
    require(permissions <= AutomationPermissions.ALL, "Malformed permissions");
    _;
}

Developer Response:

Fixed as recommended in commit b00f831

Methodology

Severity Classification

Critical

Immediate threat to user funds or protocol integrity

Direct loss of funds, protocol compromise

High

Significant security risk requiring urgent attention

Potential fund loss, major functionality disruption

Medium

Important issue that should be addressed

Limited fund risk, functionality concerns

Low

Minor issue with minimal impact

Best practice violations, minor inefficiencies

Gas

Findings that improve gas efficiency

Increased transaction costs

Informational

Code quality and best practice recommendations

Reduced maintainability and readability