osmosis-labs / isotonic

Smart Contracts for the Lendex Protocol
MIT License
1 stars 0 forks source link

The last of rounding issues #138

Closed uint closed 2 years ago

uint commented 2 years ago

Closes #40

I tried reproducing the last issue mentioned there by writing some tests, but it all seems to be green. @ueco-jb is there a test scenario I'm missing? Or is this fixed now?

ueco-jb commented 2 years ago

is there a test scenario I'm missing? Or is this fixed now?

You didn't make a time progress in those testcases. On network (where it's 1block/s) it takes couple seconds before withdraw, and probably those micro charges are messing the values.

uint commented 2 years ago

You didn't make a time progress in those testcases. On network (where it's 1block/s) it takes couple seconds before withdraw, and probably those micro charges are messing the values.

Do you mean waiting a charge period so that some interest is charged or less than that?

uint commented 2 years ago

Ah, I keep using the high_credit_line stuff. I should probably test with an actual realistic credit line...

uint commented 2 years ago

AHA! Got it. :sunglasses:

uint commented 2 years ago

Ah, so the last nitpick is to actually add tests for transferring while price_rate/collateral is 0

It looks like we don't have tests for TransferFrom at all in market tests. Is a follow-up issue alright? #139