Problem
The harvest_yield function verifies that the keeper signed the transaction (keeper.require_auth()), but it never checks if that keeper is actually an authorized protocol address, meaning anyone can call it.
Expected behavior
The DataKey enum is expanded to include a Keeper role, which is set during initialization and explicitly validated against the caller in harvest_yield.
Files to update
src/lib.rs
src/strategy.rs
src/test.rs
Project relevance
This fixes a critical authorization flaw, ensuring that only trusted, whitelisted keeper networks can trigger automated yield strategies.
Acceptance criteria
Problem
The
harvest_yieldfunction verifies that thekeepersigned the transaction (keeper.require_auth()), but it never checks if thatkeeperis actually an authorized protocol address, meaning anyone can call it.Expected behavior
The
DataKeyenum is expanded to include aKeeperrole, which is set during initialization and explicitly validated against the caller inharvest_yield.Files to update
src/lib.rssrc/strategy.rssrc/test.rsProject relevance
This fixes a critical authorization flaw, ensuring that only trusted, whitelisted keeper networks can trigger automated yield strategies.
Acceptance criteria
env.storage().instance().get(&DataKey::Keeper)is checked against the signed caller address