Description:
Safety mechanism to recover incorrectly sent tokens or handle edge cases where users lose funds due to platform bugs. Admin operations must be time-locked and transparent.
Key functions:
emergency_withdraw(env, asset, to, amount) — timelocked admin
recover_token(env, asset, to, amount) — for accidentally sent tokens
set_admin(env, new_admin) — admin transfer with delay
Acceptance criteria:
Description:
Safety mechanism to recover incorrectly sent tokens or handle edge cases where users lose funds due to platform bugs. Admin operations must be time-locked and transparent.
Key functions:
emergency_withdraw(env, asset, to, amount)— timelocked adminrecover_token(env, asset, to, amount)— for accidentally sent tokensset_admin(env, new_admin)— admin transfer with delayAcceptance criteria:
emergency_withdrawhas 24-hour timelock (stored aspending_until)recover_tokenonly works for tokens not owned by the contract's intended logicEmergencyActionevent with reason hash