Skip to content

Fix first deposit rounding#3

Merged
ChaoticWalrus merged 7 commits intomasterfrom
fix-first-deposit-rounding
Apr 3, 2023
Merged

Fix first deposit rounding#3
ChaoticWalrus merged 7 commits intomasterfrom
fix-first-deposit-rounding

Conversation

@ChaoticWalrus
Copy link
Copy Markdown
Contributor

@ChaoticWalrus ChaoticWalrus commented Mar 31, 2023

fixes issue that occurs when underlyingToken rounds down amounts, so transferAmountIn = (transferAmountOut - 1), rather than TransferAmountIn = TransferAmountOut.
Fee-on-transfer tokens still not supported (these will need their own Strategy)
cursed token transfers in 1 wei less than the amount transferred out.
test `testDepositTokenWithOneWeiFeeOnTransfer` passes with the changes to StrategyBase in the previous commit (7c8ba7f) but fails without them.
Still need to add more complex tests for better coverage on this.
…sfer tokens

Also add instructions for preparing the environment to run forked tests.
NOTE: the new `FeeOnTransfer_StrategyBase` contract has not been extensively tested yet. This is also captured in a top-level TODO
@ChaoticWalrus ChaoticWalrus marked this pull request as ready for review March 31, 2023 18:10
@ChaoticWalrus ChaoticWalrus requested a review from gpsanant March 31, 2023 18:10
Copy link
Copy Markdown
Contributor

@gpsanant gpsanant left a comment

Choose a reason for hiding this comment

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

nice, gud change

@ChaoticWalrus
Copy link
Copy Markdown
Contributor Author

CI failures are unrelated to changes; will sort these out after merging.

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.

2 participants