Hunt prep
Before you test Folks Finance: Staking Contracts
What 68 disclosed reports say about Folks Finance: Staking Contracts: what was found and paid, what was fixed, and where it may be worth looking next.
- with a public bounty
- 0
- median public bounty
- –
- highest public bounty
- –
Gaps worth testing 13
Ideas drawn from this program's disclosed reports and our class lessons. None of them is a known bug: each is a place to look, and the reports linked under it are why. Check the current scope before testing anything.
-
1
Test migration permit state after successful migration
Access control Read the lesson
Check whether a user's migration permit is cleared once migratePositionsFrom has run for that user, and whether a second migration can be attempted against a newly created position. The reports show the permit mapping is keyed by migrator and user and is not cleared on role revocation, so test whether it is also left set after a successful migration and whether that lets a previously approved migrator act on fresh stakes.
Backed byAudit: Multiple authorization and migration bugs in Folks stakin... (2026) Revoked migrators leave non revocable stale permits that reactiv... (2026) SetMigrationPermit blocks users from revoking permits after role... (2026)From the lessons: Migration permit revocation and reactivation.; Reward accumulation updates in staking and vault contracts.
-
2
Test role revocation side effects on stored permits
Access control Read the lesson
Probe whether revoking MIGRATOR_ROLE from an address clears or invalidates any stored permits for that address, and whether re-granting the role to a different address leaves old approvals usable. The reports repeatedly show permits surviving role changes, so test the admin-side role functions for missing cleanup of dependent state.
Backed byRevoked migrators leave non revocable stale permits that reactiv... (2026) Stale migration permits can be reactivated by re granting migrat... (2026) Access control defect in setmigrationpermit leads to irrevocable... (2026)From the lessons: Two-step admin and ownership transfer functions.; Migration permit revocation and reactivation.
-
3
Test permit revocation when migrator role is paused or rotated
Business logic Read the lesson
Exercise the permit flow while the contract is paused and during a migrator rotation window, checking whether users can still clear consent. Several reports describe revocation being blocked by the live role check, so test whether pause or rotation creates the same stuck state through a different path.
Backed byProtocol's Explicit "Revoke at Any Time" Promise Broken — Users... (2026) Users cannot revoke migration permission during migrator role ro... (2026) SetMigrationPermit blocks revocation after role revoke, enabling... (2026)From the lessons: Migration permit revocation and reactivation.; Two-step admin and ownership transfer functions.
-
4
Test stakeWithPermit nonce and allowance handling after revert
Business logic Read the lesson
Look at how stakeWithPermit consumes the permit signature when the stake itself reverts, for example because a period cap is reached. The report on this path suggests the nonce may not be consumed on failure, so test whether a failed stake leaves a reusable signature and whether a later call can be blocked or replayed.
From the lessons: Reward accumulation updates in staking and vault contracts.; Call every transfer and transferFrom path with a token that returns fa...
-
5
Test reward maths overflow boundaries in stake
Probe the reward calculation in the stake path with large amounts, high APR values and long durations near the accepted limits. One report flags an intermediate multiplication overflow, so test whether the same pattern appears in other accrual or reward helpers and whether period parameter updates can push values into that range.
Backed byReward calculation intermediate multiplication overflow (2026) Missing "reward" Parameter in "Staked" Event Breaks Off-Chain Ac... (2026)From the lessons: Reward accumulation updates in staking and vault contracts.; Vault deposit, withdraw and redeem functions across yield and staking...
-
6
Test recoverERC20 reentrancy and event ordering
Smart contracts Read the lesson
Check recoverERC20 and migratePositionsFrom for state changes and event emission after external token transfers, and whether a callback token can re-enter. Reports note missing reentrancy guards and CEI ordering issues here, so test with tokens that call back on transfer and confirm balances and events stay consistent.
Backed byMissing reentrancy guard on function recovererc20 (2026) Events emitted after external calls in recovererc20 and migratep... (2026) Recovered event missing recipient makes fund attribution impossi... (2026)From the lessons: Functions that make external calls to tokens, native currency or NFTs...; Check withdrawal functions for a missing non-reentrancy modifier and r...; Re-enter through a token callback or a read-only call rather than the...
-
7
Test token variants against stake and recover paths
Smart contracts Read the lesson
Run the stake, withdraw and recover flows with tokens that return no value, return false, charge a transfer fee or reject non-zero approvals. The contract handles arbitrary ERC20 tokens, and the reports on recoverERC20 and migration transfers suggest accounting assumes exact amounts, so test whether balances and stored stakes diverge.
Backed byMissing reentrancy guard on function recovererc20 (2026) Events emitted after external calls in recovererc20 and migratep... (2026)From the lessons: Call every transfer and transferFrom path with a token that returns fa...; Use a token whose approve and transfer do not return a boolean and che...; Use a token that returns false or no value from transfer and check whe...; Test the protocol with several ERC20 variants (different decimals, no...; Use a fee-on-transfer token as the asset or collateral and check wheth...
-
8
Test withdraw return values and view helpers
Business logic Read the lesson
Check whether withdraw and its internal helper expose the computed amount and reward, and whether any view function reports the withdrawable amount. A report notes these are missing, so test integrator-facing paths for rounding differences between on-chain accrual and off-chain reconstruction, and whether a view helper can be added without changing state.
Backed byMissing return value on withdraw and missing view function for w... (2026) Missing "reward" Parameter in "Staked" Event Breaks Off-Chain Ac... (2026)From the lessons: Reward accumulation updates in staking and vault contracts.; Vault deposit, withdraw and redeem functions across yield and staking...
-
9
Test interface completeness and supportsInterface
Misconfiguration Read the lesson
Compare IStakingV1 and IMigratorV1 against the concrete contract for missing getters and selectors, and check what supportsInterface returns for the declared and complete interface ids. Reports flag missing paused and total getters, so test whether integrators relying on the interface can misread state or fail interface detection.
Backed byEssential function declarations missing from istakingv1 (2026) Copy paste typo in error parameter names (2026) Event Parameter Typo, referer in Staked Event vs referrer in Sta... (2026)From the lessons: Initialise and setup functions on newly deployed contracts.; Two-step admin and ownership transfer functions.
-
10
Test migration event accounting for off-chain indexers
Info disclosure Read the lesson
Inspect the MigrateFrom and Staked events for missing amounts, reward values and recipient fields, and check whether an indexer can reconstruct migrated principal and rewards. Reports note these omissions, so test whether a migration or stake can be made to look different off-chain than on-chain, including with multiple managers.
Backed byInsufficient event emission in migratepositionsfrom leads to los... (2026) Missing "reward" Parameter in "Staked" Event Breaks Off-Chain Ac... (2026) Recovered event missing recipient makes fund attribution impossi... (2026)From the lessons: Reward accumulation updates in staking and vault contracts.; Migration permit revocation and reactivation.
-
11
Test unused struct fields and storage writes
Business logic Read the lesson
Check whether fields such as stakeTime are written but never read, and whether any other struct member is dead storage. A report flags this pattern, so test whether a future or partial feature leaves state that can be set inconsistently or wastes gas on every stake.
From the lessons: Reward accumulation updates in staking and vault contracts.; Vault deposit, withdraw and redeem functions across yield and staking...
-
12
Test migrator interface assumptions in IMigratorV1
Access control Read the lesson
Exercise the migrator-facing interface paths, including how migratePositionsFrom validates the caller and the user, and whether the migrator contract can be swapped or upgraded. Reports on stale permits and role checks centre on this interface, so test whether a migrator that loses and regains the role can act on positions created in between.
Backed byUsers cannot revoke stale migration approvals after a migrator i... (2026) Setmigrationpermit revoke blocked after migrator role revocation (2026) Revoked migrators leave non revocable stale permits that reactiv... (2026)From the lessons: Migration permit revocation and reactivation.; Two-step admin and ownership transfer functions.
-
13
Test pause and period parameter changes against live stakes
Business logic Read the lesson
Check whether pausing the contract or updating a period's APR and duration affects already stored rewards and permits. Reports on missing paused getter and reward reconstruction suggest state can diverge, so test whether a manager update changes what a user can withdraw or what a migrator can move.
Backed byEssential function declarations missing from istakingv1 (2026) Missing "reward" Parameter in "Staked" Event Breaks Off-Chain Ac... (2026) Missing return value on withdraw and missing view function for w... (2026)From the lessons: Reward accumulation updates in staking and vault contracts.; Vault deposit, withdraw and redeem functions across yield and staking...; Two-step admin and ownership transfer functions.
What was found and what it paid
Public bounties only; many reports disclose without the amount.
| Class | Reports | Paid | Median | Highest | In all |
|---|---|---|---|---|---|
| Access control lesson | 50 | 0 | – | – | $0 |
| Business logic lesson | 10 | 0 | – | – | $0 |
| Smart contracts lesson | 3 | 0 | – | – | $0 |
| DoS lesson | 2 | 0 | – | – | $0 |
| Misconfiguration lesson | 1 | 0 | – | – | $0 |
What was fixed
All reportsThe newest fixes, in our words. A fixed bug is not worth re-reporting, but a sibling feature, an older API version or a regression may be.
-
Cannot Revoke Migration Permit After Role Revocation (Stale Permits Re-Activate on Re-Grant)
The role check should only apply when granting a permit, so revocation is always allowed.
Disclosed
-
Users cannot revoke migration permission during migrator role rotation window
The role check should only apply when granting permission, so that revocation is always allowed.
Disclosed
-
Users Cannot Revoke Migration Permits After MIGRATOR_ROLE Is Revoked - Stale Permits Enable Unconsented Future Migrations
The setMigrationPermit function should only require the MIGRATOR_ROLE check when granting a permit, not when revoking it.
Disclosed
-
Users cannot revoke migration permits once the migrator s role has been revoked
The role check should only apply when setting a permit to true, so users can always clear a permit.
Disclosed
-
Inability to revoke migrationpermits for revoked migrators leads to permanent state persistence of user approvals
The role check should only apply when granting a permit, so that revoking is always allowed.
Disclosed
-
Users cannot revoke migration permits after MIGRATOR_ROLE is removed, enabling fund migration without re-consent
The role check should only apply when granting a permit, so that revoking a permit is always allowed.
Disclosed
-
Stale migration approvals cannot be revoked after role revocation and automatically reactivate on role re grant
The revocation path should not require the target address to hold MIGRATOR_ROLE, so users can always clear their own approval.
Disclosed
-
Users won t be able to revoke migration permits from revoked migrators
The check should only be enforced when granting permission (setting it to true), allowing users to revoke even if the migrator no longer has the role.
Disclosed
-
Events emitted after external calls in recovererc20 and migratepositionsfrom violate cei pattern
The events should be emitted before the external token transfers so the contract follows the same ordering everywhere.
Disclosed
-
Users are permanently prevented from revoking migration permits if the migrator s role is temporarily or permanently revoked
The role check should only be enforced when granting permission, not when revoking it.
Disclosed
-
Stale migration permits cannot be revoked after migrator role removal
The revoke path should clear the stored permit even when the target no longer holds the migrator role.
Disclosed
-
User cannot revoke migration approval if migrator loses migrator role
The role check should only apply when granting permission, so users can always revoke their own approval.
Disclosed
-
Setmigrationpermit does not deliver on specified functionalities
The function should allow revoking a permission (setting it to false) without requiring the target migrator to still have the MIGRATOR_ROLE.
Disclosed
-
Staking.setMigrationPermit - Unnecessary hasRole Check on Revocation Blocks Users From Managing Own Permits
The role check should only be applied when granting a permit, not when revoking it.
Disclosed
-
Broken migration permit revocation allows stale user consent to reactivate after migrator role is re granted
The role check should only apply when granting a permit, not when revoking it, so users can always revoke their approval.
Disclosed