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

💥 Implement ERC-4626 Tokenised Vault #74

Merged
merged 34 commits into from
Feb 27, 2023
Merged

💥 Implement ERC-4626 Tokenised Vault #74

merged 34 commits into from
Feb 27, 2023

Conversation

pcaversaccio
Copy link
Owner

@pcaversaccio pcaversaccio commented Feb 15, 2023

Closes #18.

In addition to the standard ERC-4626 functionalities, we also implement a math function called mul_div that calculates x * y / denominator (for, x, y, denominator each of type uint256) with 512-bit precision, following the selected rounding direction. This function is part of the Math contract (see issue #72).

For the property-based tests of the ERC-4626 contract, we make use of ERC4626 Property Tests using the following specifications:

_delta_ = 0;
_vaultMayBeEmpty = true;
_unlimitedAmount = true;

♻️ Refactors

  • We enforce a clean build (via foundry.toml) only for the CI runs and use locally the cache. Also, we set max_test_rejects = 150_0000 for the CI runs to prevent failing tests due to too many rejections triggered by ERC4626 Property Tests.

📖 Improved Documentation

  • Fix typos in ERC20, ERC721, EIP712DomainSeparator.
  • We add CHANGELOG entries for ERC4626 and Math.
  • We add README entries for ERC4626 and Math.
  • We add code comments on external code size checks in BatchDistributor, Multicall, and SignatureChecker.

🔁 Dependencies

  • We add ERC4626 Property Tests as Foundry dependencies.
  • We bump the Solidity version to 0.8.19 (fixes 🔁 Upgrade to Solidity Version 0.8.19 #83).
  • We bump ethers to version 6.0.8.
  • We bump eslint to version 8.35.0.
  • We bump @types/node to version 18.14.0.
  • We bump esquery to version 1.4.2.
  • We bump all submodules to the latest available commits.

Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio added feature 💥 New feature or request dependencies 🔁 Pull requests that update a dependency file labels Feb 15, 2023
@pcaversaccio pcaversaccio added this to the 0.0.1 milestone Feb 15, 2023
@pcaversaccio pcaversaccio self-assigned this Feb 15, 2023
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio added the ci/cd 👷‍♂️ CI/CD configurations label Feb 16, 2023
pcaversaccio and others added 5 commits February 16, 2023 18:30
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio added the refactor/cleanup ♻️ Code refactorings and cleanups label Feb 17, 2023
src/utils/Math.vy Outdated Show resolved Hide resolved
pcaversaccio and others added 2 commits February 19, 2023 09:15
Co-authored-by: bout3fiddy <11488427+bout3fiddy@users.noreply.github.com>

Signed-off-by: Pascal Marco Caversaccio <pcaversaccio@users.noreply.github.com>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
pcaversaccio and others added 12 commits February 19, 2023 14:37
Signed-off-by: Pascal Marco Caversaccio <pcaversaccio@users.noreply.github.com>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio marked this pull request as ready for review February 24, 2023 14:43
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Copy link
Owner Author

@pcaversaccio pcaversaccio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@pcaversaccio pcaversaccio merged commit c94bcd0 into main Feb 27, 2023
@pcaversaccio pcaversaccio deleted the feat/erc4626 branch February 27, 2023 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd 👷‍♂️ CI/CD configurations dependencies 🔁 Pull requests that update a dependency file feature 💥 New feature or request refactor/cleanup ♻️ Code refactorings and cleanups
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🔁 Upgrade to Solidity Version 0.8.19 💥 ERC-4626 Tokenised Vault Implementation
2 participants