trustline-inc / probity

A transparent asset-based lending protocol implemented for the EVM.
https://docs.trustline.co
Other
3 stars 1 forks source link

User will not be able to zero out their equity position without collecting interest #371

Closed shine2lay closed 2 years ago

shine2lay commented 2 years ago

This maybe a deal breaker,

If you call modifyEquity with the intent to clear the equity position and the accumulator goes up right before the user calls the function, user won't be able to zero the position because equityCreated > initialEquity.

Possible solution could be to check if equityCreated > initialEquity and call collectIntrest if true. Another possible solution would be to just call CollectInterest everytime user call modifyEquity

shine2lay commented 2 years ago

blocked by #373