-
Notifications
You must be signed in to change notification settings - Fork 247
[EPIC] stVaults #874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
[EPIC] stVaults #874
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slither found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Hardhat Unit Tests Coverage Summary
Diff against master
Results for commit: fb4f7e5 Minimum allowed coverage is β»οΈ This comment has been updated with latest results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π
contracts/0.8.25/Accounting.sol
Outdated
} | ||
|
||
// Distribute protocol fee (treasury & node operators) | ||
if (_update.sharesToMintAsFees > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this name might be misleading, should be named smth 'sharesToMintAsLidoV2ProtocolFees'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π
contracts/0.8.25/vaults/VaultHub.sol
Outdated
import {AccessControlEnumerableUpgradeable} from "contracts/openzeppelin/5.0.2/upgradeable/access/extensions/AccessControlEnumerableUpgradeable.sol"; | ||
import {IHubVault} from "./interfaces/IHubVault.sol"; | ||
import {Math256} from "contracts/common/lib/Math256.sol"; | ||
import {ILido as StETH} from "contracts/0.8.25/interfaces/ILido.sol"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this iface not in common
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should revise iface structure in the future
contracts/0.8.25/vaults/VaultHub.sol
Outdated
|
||
/// @notice disconnects a vault from the hub | ||
/// @dev can be called by vaults only | ||
function disconnectVault(address _vault) external { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add emergency flow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's consider the following cases:
- voluntary disconnect (this one)
- stop new minting
- eject and withdraw
- disconnect forcibly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- disconnect and dust issue
contracts/0.8.25/vaults/VaultHub.sol
Outdated
/// @notice force rebalance of the vault to have sufficient reserve ratio | ||
/// @param _vault vault address | ||
/// @dev can be used permissionlessly if the vault's min reserve ratio is broken | ||
function forceRebalance(IHubVault _vault) external { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Embed auto-disconnect if resulting valuation is too small
...acts/openzeppelin/5.0.2/upgradeable/access/extensions/AccessControlEnumerableUpgradeable.sol
Fixed
Show fixed
Hide fixed
...acts/openzeppelin/5.0.2/upgradeable/access/extensions/AccessControlEnumerableUpgradeable.sol
Fixed
Show fixed
Hide fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π π π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π π π
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First lap finished π
4af82f0
to
de33222
Compare
fix: review comments
[VAULTS] Audit fixes 2
Rework NodeOperatorFee
fix: prevent owner from lowering NO fee via unguaranteed deposit
β¦ate-topup [VAULTS] Improve PDG UX
[VAULTS] PDG side-activation
[VAULTS] Audit fixes 3
} | ||
|
||
/** | ||
* @dev Checks the confirming roles and sets the owner on the StakingVault. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comment is not quite correct, it's better to copy the comment from public version of this method here
β π§ Under construction π§ β
Staking Vaults
New way of isolated staking, through separate vaults, with optional stETH liquidity