Missing events/timelocks for owner/admin only functions that change critical parameters
Owner/admin functions in LongShort.sol that change critical parameters do not emit events and lack timelocks. An attacker with owner/admin access could change parameters without transparency, potentially causing users to exit and reducing liquidity.
Submitted by 0xRajeev, also found by tensors
Owner/admin only functions that change critical parameters should emit events and have timelocks. Events allow capturing the changed parameters so that off-chain tools/interfaces can register such changes with timelocks that allow users to evaluate them and consider if they would like to engage/exit based on how they perceive the changes as affecting the trustworthiness of the protocol or profitability of the implemented financial services. The alternative of directly querying on-chain contract state for such changes is not considered practical for most users/usages.
Missing events and timelocks do not promote transparency and if such changes immediately affect users’ perception of fairness or trustworthiness, they could exit the protocol causing a reduction in liquidity which could negatively impact protocol TVL and reputation.
There are owner/admin functions that do not emit any events in LongShort.sol. It is not apparent that any owner/admin functions will have timelocks.
See similar High-severity H03 finding in OpenZeppelin’s Audit of Audius and Medium-severity M01 finding OpenZeppelin’s Audit of UMA Phase 4
See issue page for referenced code.
Recommend adding events to all owner/admin functions that change critical parameters. Add timelocks to introduce time delays for critical parameter changes that significantly impact market/user incentives/security.
We will manage timelocks and multi-sigs externally to these contracts.
I would consider this a duplicate of #84 in many ways. (or at least #84 is a sub-issue of this issue)
duplicate of #84 as both offer solutions for dealing with privileged functionality (including the transfer of ownership). Leaving severity as 2 based on the potential risks associated with an incorrect admin change or similar.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
If critical parameters are changed without events or timelocks, users may perceive unfairness and exit the protocol, reducing liquidity and harming TVL and reputation.
What the attacker needed
Owner/admin access
The fix
Add events to all owner/admin functions that change critical parameters and add timelocks for critical parameter changes.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In smart contracts, some functions can only be called by the owner or admin. If these functions change important settings without announcing it (no events) or without a waiting period (timelock), users might not know and could lose trust. This report says such functions exist and should be improved.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.