Skip to content
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: Project A #12

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft

wip: Project A #12

wants to merge 30 commits into from

Conversation

sakulstra
Copy link
Contributor

@sakulstra sakulstra commented Jul 2, 2024

  • add missing 4626 methods (while this is not a 100% compliant 4626 for usability would be nice to add support for a bigger subset of methods)
  • totalAssets: returning the amount of underlying managed by the vault
  • remove the pending slashing logic
  • patch distribution end logic (this is not really needed, but for idealistic reasons)
  • hook to external incentive manager
  • add ownable and remove role system
  • remove the maxSlashing
  • add rescuable
  • make unstake window mutable
  • use upgradable oz
  • make impl reusable
  • use Error() over string undecided yet as require() syntax is nicer, but require(Error()) relies on via-ir
  • improve the tests (foundry has changed quite a lot since this was originally developed, so we should now properly utilize fuzzing etc)
  • follow 4626
  • use named mappings
  • upgrade to use v3-origin
  • use aave acl

@sakulstra sakulstra changed the title wip wip: Project A Jul 2, 2024
sakulstra and others added 18 commits July 9, 2024 09:24
* feat: use upgradable contracts

* fix: add todo
* feat: add pausability

* fix: check pausable

* fix: add mssing tests

* fix: add transfer test

* fix: remove now obsolete interface

* Delete src/contracts/interfaces/IStaticATokenLM.sol
* chore: upgrade helpers

* fix: upgrade to origin
* erc-4626 draft-ready

* Fixed rounding + removed named returns

* moved converting to internal functions

---------

Co-authored-by: Pavel Menshikov <[email protected]>
* added OZ erc4626 + rewrite half functions

* removed excess functions, changed errors to OZ style

* slash function is rewritten

* lint of StakeToken

* Simplification of maxWithdraw (#33)

* Move whenNotPaused to internal method (#34)

* deleted old versions + little code-style fixes

* finished StakeToken

* removed excess contracts

* erc-4626 tests ready

* deleted excess files

* tests for ERC20/4626 ready

* removed StataStakeToken

* cooldown tests are ready

* Added pause tests, added modifier to slash function, some little fixes made

* slashing tests + cooldownOnBehalf tests

* depositWithPermit added + some little name/description fixes

* tests finished

* storage refactored to OZ like, added comments to errors, fixed try-catch with permit

* TestnetProcedures is deleted

* remove aave-v3-origin dependencies

---------

Co-authored-by: Pavel Menshikov <[email protected]>
Co-authored-by: Andrei Kozlov <[email protected]>
Co-authored-by: Pavel Menshikov <[email protected]>
* added OZ erc4626 + rewrite half functions

* removed excess functions, changed errors to OZ style

* slash function is rewritten

* lint of StakeToken

* Simplification of maxWithdraw (#33)

* Move whenNotPaused to internal method (#34)

* deleted old versions + little code-style fixes

* finished StakeToken

* removed excess contracts

* erc-4626 tests ready

* deleted excess files

* tests for ERC20/4626 ready

* removed StataStakeToken

* cooldown tests are ready

* Added pause tests, added modifier to slash function, some little fixes made

* slashing tests + cooldownOnBehalf tests

* depositWithPermit added + some little name/description fixes

* tests finished

* remove  whenNotPaused

* Remove aave v3 (#39)

* storage refactored to OZ like, added comments to errors, fixed try-catch with permit

* TestnetProcedures is deleted

* remove aave-v3-origin dependencies

* BUSL license

---------

Co-authored-by: Pavel Menshikov <[email protected]>

* forge install: openzeppelin-contracts-upgradeable

v5.0.2

* deleted aave-helpers/token-v3, added OZ

* forge install: solidity-utils

v1.1.0

* fixed gramma error in link + removed OZ to solidity-utils

* moved to extension

* little fixes

* fixed extension

* OZ dependendies refactor

* removed excess from interfaces

* little style fixes

* permit tests added

* deleted smConfig

* Delete exchange rate (#40)

* initial commit without exchange rate

* moved to OZ finally + added virtual assets counting

* add decimalsOffset = 3 + fixed tests, cause shares were messed with assets

* little fixes + commented 1 test

* removed forge-std

* change AC model to ownable, make permissioned methods virtual

* tests are fixed after deleting slashingAdmin and ACLManager

* Refactoring of _update on ERC4626StakeTokenUpgradeable (#41)

* dependencies are sorted like like oz-up, oz, our

* optimized _update + added event

* renamed IStakeToken to IERC4626StakeToken as made in stata + license updated + inheritdoc inserted

* little fix

* micro opt

* Rescuable returned

* added test for non-admins fuzz

* Tests added

* Docs are added

* Grammar fixed

* non-admin tests fixed

* precision losses are added into the limitations p

* little foundry fix

* Update LICENSE

Co-authored-by: Andrey <[email protected]>

* Update README.md

Co-authored-by: Andrey <[email protected]>

* Update tests/Rescuable.t.sol

Co-authored-by: Andrey <[email protected]>

* deleted excess function

* add comment

---------

Co-authored-by: Pavel Menshikov <[email protected]>
Co-authored-by: Andrei Kozlov <[email protected]>

* accept right changes + removed outdated condition for combined test

* Update README.md

Co-authored-by: Lukas <[email protected]>

* Update README.md

Co-authored-by: Lukas <[email protected]>

* renamed timestamp to endOfCooldown

* forge install: erc4626-tests

* a16z tests added

* added withdrawalWindow

* Added test to cover window and cooldown change

* added setUp yield into a16z tests

* little fixes

---------

Co-authored-by: Pavel Menshikov <[email protected]>
Co-authored-by: Pavel Menshikov <[email protected]>
Co-authored-by: pavelvm5 <[email protected]>
Co-authored-by: pavelvm5 <[email protected]>
Co-authored-by: Lukas <[email protected]>
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