Repository navigation
Feat/sprl2v2 - #12
Merged
Merged
Feat/sprl2v2#12
Conversation
A new staking vault that holds the 20WETH-80PRL Balancer V3 BPT directly, with the same time-lock and penalty mechanics as sPRL2.
Use block 24_905_586 where Aura pool PID 258 exists and set real contract addresses.
One-click migration via emergencyWithdraw (paused sPRL2) and depositBPT into sPRL2V2.
FabienCoutant
force-pushed
the
feat/sprl2v2
branch
from
April 28, 2026 12:07
c2ef0fd to
9a7a30b
Compare
During the migration window both sPRL2 and sPRL2V2 are live and shared the same "sPRL2" symbol. Any downstream consumer keying on the token symbol (explorers, the reward-merkle distributor's off-chain eligibility input, dashboards) could conflate the two tokens, excluding or double-counting balances. Renames the SYMBOL constant to "sPRL2V2" so the new token is unambiguously distinguishable on-chain. NAME already differed from the legacy "...Aura Deposit Vault" so it is left untouched. The constructor integration test asserts the new symbol.
… requests requestWithdraw could be called with amount = 0, minting an empty WithdrawalRequest that occupies a request ID and can even be cancelled. It serves no purpose in normal operation and only adds tail risk / a precondition for other invalid states. Reverts with NullAmount() when the unlocking amount is zero. The guard lives in the shared base so sPRL1/sPRL2/sPRL2V2 all inherit it. Adds an integration test asserting the revert.
… zero address Premature exits transfer the BPT slash to feeReceiver inside the withdrawal flow. If feeReceiver were address(0), every early withdrawPRLAndWeth / withdrawBPT would revert on the slash transfer, DoS-ing all premature withdrawals until governance fixes the address. Adds a zero-address check both in the base constructor and in updateFeeReceiver so the fee receiver can never be set to address(0) at deploy time or via governance. Reverts with FeeReceiverZeroAddress(). Adds constructor and updateFeeReceiver revert tests.
…le tokens The BPT backing sPRL2V2 sits idle in the contract, so reward tokens claimed on the contract's behalf (e.g. MERKL distributions routed onBehalf to the holder) would otherwise be permanently locked with no way to retrieve them. Adds a restricted recoverERC20(token) that forwards the full balance of an arbitrary token to feeReceiver. The guard reverts with CannotRecoverUnderlying() when token == underlying, so the share- backing asset (BPT for sPRL2V2, PRL for sPRL1) can never be drained. Placed in the shared base keyed on `underlying` rather than a contract-specific BPT check, so every derived staking token benefits. Adds integration tests in the timeLockPenaltyERC20 suite (matching the base contract): successful recovery to feeReceiver, revert on the underlying token, and revert for an unauthorized caller.
…-sPRL2v2 audit(sPRL2V2): Bailsec June 2026 remediation (Bailsec-02/03/05/06)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Aura's sunset on the 20WETH-80PRL pool means sPRL2 can no longer rely on its gauge/rewards. This PR introduces a leaner replacement that just holds the Balancer V3 BPT directly.
sPRL2V2— new vault that deposits PRL+WETH into the Balancer V3 pool and holds the BPT itself (no gauge, no reward forwarding). Same time-lock and penalty mechanics as sPRL2.sPRL2Migrator— one-click migration: pulls sPRL2, callsemergencyWithdraw(sPRL2 must be paused), and deposits the BPT into sPRL2V2.sPRL2V2.Test plan
forge test(integration) passesforge test --match-path "test/forks/**"passes against mainnet fork