For the complete documentation index, see llms.txt. This page is also available as Markdown.

69188 sc low setmigrationpermit revoke blocked after migrator role revocation

Submitted on Mar 13th 2026 at 12:12:08 UTC by @kujen for Audit Comp | Folks Finance: Staking Contracts

  • Report ID: #69188

  • Report Type: Smart Contract

  • Report severity: Low

  • Target: https://github.com/Folks-Finance/folks-staking-contracts/blob/main/src/interfaces/IMigratorV1.sol

  • Impacts:

    • Griefing (e.g. no profit motive for an attacker, but damage to the users or the protocol)

Description

Brief/Intro

Users should always be able to revoke their migration permissions, but the current implementation blocks revocation when a migrator loses the MIGRATOR_ROLE. This can result in stale migration permits that reactivate automatically if the role is restored, violating user autonomy.

Vulnerability Details

src/Staking.sol:

function setMigrationPermit(address _migrator, bool _isMigrationPermitted) external {
        if (!hasRole(MIGRATOR_ROLE, _migrator)) revert MigratorNotFound(_migrator);

        migrationPermits[_migrator][msg.sender] = _isMigrationPermitted;
        emit MigrationPermitUpdated(_migrator, msg.sender, _isMigrationPermitted);
    }

Impact Details

Users should always be able to revoke migration permissions. The hasRole guard currently blocks revocation once a migrator loses their role, leaving users permanently unable to clean up stale permits.

  1. Admin revokes MIGRATOR_ROLE from migratorV1.

  2. Users who previously granted migrationPermits[migratorV1][user] = true cannot clear it.

  3. If the role is later re-granted, all stale permits reactivate without user consent.

Users lose control over their migration permits for deprecated migrators.

Proof of Concept

Output:

Was this helpful?