Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function timelocked() internal { | ||
| require(executableAt[msg.data] != 0, DataNotTimelocked()); | ||
| require(block.timestamp >= executableAt[msg.data], TimelockNotExpired()); | ||
| executableAt[msg.data] = 0; | ||
| uint256 executableAt = IVaultV2(parentVault).executableAt(msg.data); | ||
| require(executableAt != 0, DataNotTimelocked()); | ||
| require(block.timestamp >= executableAt, TimelockNotExpired()); | ||
| IVaultV2(parentVault).revoke(msg.data); | ||
| emit Accept(bytes4(msg.data), msg.data); |
There was a problem hiding this comment.
Avoid unauthorized revoke in timelocked adapter flow
Timelocked adapter calls now clear the vault timelock via IVaultV2(parentVault).revoke(msg.data) (lines 66‑70), but VaultV2.revoke only allows the curator or a sentinel to call it (see VaultV2.sol lines 362‑364). When the curator executes setSkimRecipient or burnShares after submitting them through the vault, the adapter performs this revoke as itself and will hit Unauthorized() unless the adapter was pre-added as a sentinel (not the default). That bricks all timelocked adapter actions in production unless an extra sentinel configuration step is done.
Useful? React with 👍 / 👎.
| require(block.timestamp >= executableAt, TimelockNotExpired()); | ||
| IVaultV2(parentVault).revoke(msg.data); | ||
| emit Accept(bytes4(msg.data), msg.data); |
There was a problem hiding this comment.
Here it also emits the Revoke event on the vault, but it is actually accepted. It could be confusing, or difficult to index (maybe that's ok because Revoke logs the sender, which is the adapter in this case)
There was a problem hiding this comment.
agree that's misleading. but on the other side you gain that you don't need to index the adapter's storage
Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com>
|
replaced by #839 |
|
see this thread |
alternative to #839
major drawbacks: