Skip to content

Conversation

0xSachinK
Copy link
Contributor

@0xSachinK 0xSachinK commented Aug 31, 2021

  • Fix flaky tests and make them pass every time
  • Explain reasons for using WBTC
  • In Issuance, add test for the case when default and external positions overlap
  • In redemption, add tests for the case when 2 default positions and 2 external positions
    • Test both overlapping and non-overlapping cases
  • Avoid using greater than or equal to comparisons.
  • When can't avoid gte comparisons. Replace it with greater than or equal to with an upper bound comparison. And give a clear reason to use it.

* Remove extra 'greater than equal to' comparisons.
* WBTC only has 8 decimal places which is less compared to 18 decimal
places in WETH. Lesser the number of decimal places, lesser is the
chance of the aToken returning a balance with 1 wei error.
* Also interest accrues with less granularity which saves us the pain
of having to calculate interest rates and take those extra few wei into
account.
Copy link
Contributor

@bweick bweick left a comment

Choose a reason for hiding this comment

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

Can you expand on the reasoning why aBTC doesn't face some of the same rounding issues as aETH? Where were you getting reverts for aETH? Is it possible we just need to issue more Sets?

Other than that a couple comments. I think we need to beef up the testing on the double borrow/repay stuff.

…emption

* when default and external positions do not overlap
* Add an explanation for why we used WBTC and USDC
* Explain why use greater than equal to, whenever it is used
* Being more explicit with the checks
@0xSachinK 0xSachinK merged commit 99a57dd into master Sep 3, 2021
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