Skip to content

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. 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.

    From the lessons: Migration permit revocation and reactivation.; Reward accumulation updates in staking and vault contracts.

  2. 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.

    From the lessons: Two-step admin and ownership transfer functions.; Migration permit revocation and reactivation.

  3. 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.

    From the lessons: Migration permit revocation and reactivation.; Two-step admin and ownership transfer functions.

  4. 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. 5

    Test reward maths overflow boundaries in stake

    DoS Read the lesson

    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.

    From the lessons: Reward accumulation updates in staking and vault contracts.; Vault deposit, withdraw and redeem functions across yield and staking...

  6. 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.

    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. 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.

    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. 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.

    From the lessons: Reward accumulation updates in staking and vault contracts.; Vault deposit, withdraw and redeem functions across yield and staking...

  9. 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.

    From the lessons: Initialise and setup functions on newly deployed contracts.; Two-step admin and ownership transfer functions.

  10. 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.

    From the lessons: Reward accumulation updates in staking and vault contracts.; Migration permit revocation and reactivation.

  11. 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. 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.

    From the lessons: Migration permit revocation and reactivation.; Two-step admin and ownership transfer functions.

  13. 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.

    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.

Public bounties only; many reports disclose without the amount.

ClassReportsPaidMedianHighestIn 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 reports

The 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.