-
Notifications
You must be signed in to change notification settings - Fork 93
Sonic Staking #2335
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
Sonic Staking #2335
Conversation
* Added max validators check to Native Staking Strategy
…ready done Skip Lido Withdrawal Strategy tests
Added OETH whale request withdrawal to fork tests
Added Dripper collect and setDripDuration Hardhat tasks
OETHVaultCore params with an underscore
…drawal Queue. (#2127) * feat: add delay between request and claim. * test: update test with delay. * fix: move `CLAIM_DELAY` from `VaultStorage.sol` to `OETHVaultCore.sol`. * style: require error message start with capital letter. --------- Co-authored-by: Nicholas Addison <[email protected]>
|
|
||
| const dWOSonic = await deployWithConfirmation("WOSonic", [ | ||
| cOSonicProxy.address, // Base token | ||
| "Wrapped OS", // Token Name |
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.
At some point we should probably override the constructor so it doesn't accept the Token Name & Symbol just to avoid confusion
RequirementsPR supports delegation of Wrapped Sonic to validators to earn staking rewards. Easy ChecksAuthentication
Sonic token
Cryptographic code
Gas problems
Black magic
Overflow
Proxy
Events
Medium ChecksRounding and castsNo Rounding Dependencies
External calls
Tests
Deploy
Strategy SpecificStrategy checks
Downstream
ThinkingLogicThe logic looks sound Deployment ConsiderationsJust a normal deploy governance process Internal State
AttackIf a validator is slashed we could lose user funds. We will be monitoring validators and SFC contract upgrades to detect any anomalies. A hijacked defender action relayer or strategist could undelegate all funds and prevent yield earning for 14 days. There is no way to prevent this in code. FlavorThe code is a cleanly implementing the interface between the vault and the SFC contract. |
* Added setAssetDefaultStrategy to Sonic deploy 003 script * Added setDefaultValidator Hardhat task * Fixed Sonic fork tests now mints are auto allocating to the Sonic Staking Strategy * Sonic deploy 003 contracts
Dependencies
Contracts
Sonic Staking Strategy
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/vault/vault.sonic.fork-test.jscontracts/test/strategies/sonicStaking.sonic.fork-test.jscontracts/test/zapper/osonic-zapper.sonic.fork-test.jsDeployment
The Sonic deployment files for launch are
contracts/deploy/sonic/001_vault_and_token.jscontracts/deploy/sonic/002_oracle_router.jscontracts/deploy/sonic/003_sonic_staking_strategy.jsTo run the deployment to Sonic
When deploying to the Tenderly Testnet, change
SONIC_PROVIDER_URLin your.envfile to point to the Testnet.Code Change Checklist
To be completed before internal review begins:
Internal review: