Skip to content

Option 1 for WOETH rounding error #2419

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

Merged

Conversation

sparrowDom
Copy link
Member

Option 1 for WOETH rounding error

Copy link

github-actions bot commented Feb 25, 2025

Warnings
⚠️ 👀 This PR needs at least 2 reviewers

Generated by 🚫 dangerJS against 0d19ee8

@sparrowDom sparrowDom merged commit c005824 into sparrowDom/woeth_hack_proof Feb 26, 2025
12 of 17 checks passed
@sparrowDom sparrowDom deleted the sparrowDom/woeth_hack_proof_v1 branch February 26, 2025 08:43
sparrowDom added a commit that referenced this pull request Apr 15, 2025
* intermittent work committed

* add draft solution for preparing WOETH for the landing markets

* add tests that confirm lending market protection works as exepcted

* add test to protect agains calling initialize twice

* add comments

* remove unneeded files

* minor bug fix

* add fork script tests and fix bug

* add comments

* add another test

* divide after multiply

* change credits per token to highres

* add comment

* comments

* lint

* minor changes

* correct fixture

* make code slighlty better regarding re-entry

* prettier

* add explicit visibility

* minor test enhancement

* better function name

* remove comment

* simplify

* simplify code

* simplify code

* refactor

* add redeem all test

* prettier

* Add wOETH donation fork tests (#2122)

* Add wOETH donation fork tests

* test: add fork test for deposit/mint/withdraw/redeem.

* test: add test for redeem after rebase.

---------

Co-authored-by: clement-ux <[email protected]>

* rename deploy script

* add another test and simplify constructor

* fix: specify override for name and symbol.

* fix: import IERC20Metadata.

* add gap

* update reference to code

* fix compile errors

* move initialize2() into primary initializer

* remove virtual where not needed

* pick a more appropriate method for fetching highres CPT

* round in the favour of the protocol

* Revert "round in the favour of the protocol"

This reverts commit 637cd3c.

* rounding error fixes

* Option 1 for WOETH rounding error (#2419)

* option 1 to combat the rounding error

* naming

* simplify

* add comment

* prettier

* add require 0 checks

* allow 0 value mints and redeems

* to establish exchange rate for WOETH trust OETH completely

* remove unneeded overrides

* add comment and prettier

* fix a denomination bug

* add fork test for the expected rate increase

* add comment

* add tests for WOETH upgrade not changing the existing WOETH balances

* denominate all rates to 1e27 for better precision

* undo the change

* add comment

* further simplify the WOETH rate calculation code

* add comments

* prettier

* update test to confirm that redemption amounts of WOETH before and after the upgrade are a perfect (1 wei difference to rounding) match

* Fix bug with rounding direction on deposits

* nit: unify comment

* sligth code simplification

* fix typo

* remove unused imports

* remove todo

* switch to BUSL

* improve comment

* no need to call governable anymore

* fix comment

* make WOSonic extend WOETH. Add deploy file and basic fork test

* use the more appropriate natspec compliant inheritdoc

* more appropriate naming

* add aditiona test

* make WOUSD inherit from WOETH

* add deploy and fork test file for WOUSD

---------

Co-authored-by: Shah <[email protected]>
Co-authored-by: clement-ux <[email protected]>
Co-authored-by: Daniel Von Fange <[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.

1 participant