Description
The FarmingPool's emergency_withdraw function allows admin to withdraw any user's funds. This is a powerful privilege that should be documented clearly.
Current behavior
pub fn emergency_withdraw(env: Env, user: Address) -> Result<i128, PoolError> {
require_initialized(&env)?;
let admin = get_admin(&env)?;
admin.require_auth();
// ... withdraws user's funds
}
Expected behavior
Document:
- When emergency_withdraw should be used
- What happens to the user's credits
- Whether the user is notified
- Audit trail requirements
Why this matters
Admin abuse of emergency_withdraw could harm users. Clear documentation and audit requirements help prevent misuse.
Labels
documentation, farming-pool, hard
Description
The FarmingPool's
emergency_withdrawfunction allows admin to withdraw any user's funds. This is a powerful privilege that should be documented clearly.Current behavior
Expected behavior
Document:
Why this matters
Admin abuse of emergency_withdraw could harm users. Clear documentation and audit requirements help prevent misuse.
Labels
documentation, farming-pool, hard