-
Notifications
You must be signed in to change notification settings - Fork 83
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
WIP Sonic Staking #2335
base: master
Are you sure you want to change the base?
WIP Sonic Staking #2335
Conversation
…root with an invalid signature
Added Natspec
* add withdrawal events to the tests * add WETH accounting * add better documentation * add sending WETH to the Vault back to fix manual accounting function * actually wrap the ETH to WETH before sending it to the Vault when manually fixing accounting * add withdrawal event to manually fix accounting * fix bugs and add tests with WETH accounting * add test to verify correct deposits * Gas changes to Native Staking's depositAll --------- Co-authored-by: Nicholas Addison <[email protected]>
* Deployed new NativeStakingSSVStrategy * Generated latest Native Staking Strategy diagrams
* deploy native staking proxy and add auxiliary functions to transfer its governance * Shortened error message in InitializeGovernedUpgradeabilityProxy.initialize --------- Co-authored-by: Nicholas Addison <[email protected]>
* deploy native staking proxy and add auxiliary functions to transfer its governance * Setup basic defender action * update defender-sdk version * add defender client as an external export * configuration update --------- Co-authored-by: Nicholas Addison <[email protected]>
claimWithdrawal collects from Dripper and adds any unallocated WETH to the withdrawal queue if not enough liquidity available
depositToStrategy only deposits WETH not allocated to the withdrawal queue swapCollateral restricted to only swap to WETH swapCollateral adds to withdrawal queue after swap
Fix upgrade script of OETHBase
} | ||
} | ||
|
||
// TODO use Deposit event or something else? |
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.
Maybe we can add a bool flag isRestake
to Deposit
event indicating whether it is a normal deposit or restaking of the rewards
*/ | ||
receive() external payable { | ||
require( | ||
msg.sender == sfc || msg.sender == wrappedSonic, |
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 is a nice check, but there is this little devil lurking around :)
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.
I don't think that donating S to the contract would throw off the math:
- We do the
address(this).balance
only in thewithdrawFromTheSFC
and we are looking at the increment that the withdrawal has caused... ignoring previous amount - Also the checkBalance does ignore the
S
balance on the contract.
The only complaint I have that the check might give a false sense of security, since anyone can call withdrawTo
and send S to the contract
Added governor transfer unit tests
Updated existing OToken diagrams after Yield Delegation
…he Sonic Staking Strategy
Added missing Vault config to Sonic deploy script Sonic Staking Strategy governor fixed in deploy script
Dependencies
Contracts
Tests
Sonic Unit Tests
The Sonic unit tests are in
contracts/test/vault/os-vault.sonic.js
.Sonic Fork Tests
The Sonic fork tests are in:
contracts/test/strategies/sonicStaking.sonic.fork-test.js
contracts/test/zapper/osonic-zapper.sonic.fork-test.js
Deployment
The first Sonic mainnet deployment file is
contracts/deploy/sonic/001_origin_sonic.js
Code Change Checklist
To be completed before internal review begins:
Internal review: