Skip to content

Conversation

@kyzooghost
Copy link
Contributor

@kyzooghost kyzooghost commented Oct 29, 2025

This PR implements issue(s) #

Checklist

  • I wrote new tests for my new core changes.
  • I have successfully ran tests, style checker and build against my new changes locally.
  • I have informed the team of any breaking changes if there are any.

Note

Introduces a full native-yield system (YieldManager + Lido StVault provider/factory) integrated with LineaRollup, including permissioned/permissionless unstaking, LST withdrawals, ossification flow, and on-chain EIP-4788 validator proof verification, with extensive tests and role/pause updates.

  • Contracts (Yield):
    • Add YieldManager (+ storage/layout/base) with funding, yield reporting, (permissioned/permissionless) unstake, LST withdrawals, reserve management, and ossification controls.
    • Add LidoStVaultYieldProvider and LidoStVaultYieldProviderFactory, plus Lido vendor interfaces (IDashboard, IStakingVault, IVaultHub, etc.).
  • Proof/Utils:
    • Add ValidatorContainerProofVerifier and supporting libs (SSZ, BLS, GIndex) for EIP-4788 active validator proofing.
  • Rollup Integration:
    • Extend LineaRollup (v7 reinit) to set yieldManager, transfer funds, emit synthetic yield messages, and support claimMessageWithProofAndWithdrawLST.
  • Constants & Roles:
    • Expand pause types/roles for native yield; update initialization signature and roles; add helper/test constants.
  • Tests:
    • Add comprehensive unit/integration tests for yield manager, Lido provider, proof verifier, and rollup yield extension.
  • Misc:
    • Minor formatting in PlonkVerifierSepoliaFull; dependency updates (e.g., @chainsafe/blst).

Written by Cursor Bugbot for commit 3ed10b7. This will update automatically on new commits. Configure here.

@kyzooghost kyzooghost requested a review from a team as a code owner October 29, 2025 10:38
cursor[bot]

This comment was marked as outdated.

@socket-security
Copy link

socket-security bot commented Oct 29, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​next/​third-parties@​15.5.4 ⏵ 15.5.51001008299100

View full report

await mockDashboard.setWithdrawableValueReturn(stakingVaultBalance);
await yieldManager.connect(nonAuthorizedAccount).replenishWithdrawalReserve(yieldProviderAddress);

expect(await getBalance(mockStakingVault)).eq(stakingVaultBalance - stakingVaultBalance);

Check warning

Code scanning / CodeQL

Identical operands Warning test

Operands
stakingVaultBalance
and
stakingVaultBalance
are identical.

Copilot Autofix

AI 17 days ago

To fix the problem, replace stakingVaultBalance - stakingVaultBalance with 0 in the assertion at line 931. This is a simple substitution, as the subtraction of a value from itself always yields zero and does not change the intent or functionality of the test. No other code, imports, or logic needs to change.


Suggested changeset 1
contracts/test/hardhat/yield/integration/YieldManager.integration.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/contracts/test/hardhat/yield/integration/YieldManager.integration.ts b/contracts/test/hardhat/yield/integration/YieldManager.integration.ts
--- a/contracts/test/hardhat/yield/integration/YieldManager.integration.ts
+++ b/contracts/test/hardhat/yield/integration/YieldManager.integration.ts
@@ -928,7 +928,7 @@
       await mockDashboard.setWithdrawableValueReturn(stakingVaultBalance);
       await yieldManager.connect(nonAuthorizedAccount).replenishWithdrawalReserve(yieldProviderAddress);
 
-      expect(await getBalance(mockStakingVault)).eq(stakingVaultBalance - stakingVaultBalance);
+      expect(await getBalance(mockStakingVault)).eq(0);
       expect(await getBalance(lineaRollup)).eq(l1MessageServiceBalance + stakingVaultBalance);
 
       // Kick off ossification
EOF
@@ -928,7 +928,7 @@
await mockDashboard.setWithdrawableValueReturn(stakingVaultBalance);
await yieldManager.connect(nonAuthorizedAccount).replenishWithdrawalReserve(yieldProviderAddress);

expect(await getBalance(mockStakingVault)).eq(stakingVaultBalance - stakingVaultBalance);
expect(await getBalance(mockStakingVault)).eq(0);
expect(await getBalance(lineaRollup)).eq(l1MessageServiceBalance + stakingVaultBalance);

// Kick off ossification
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants