trustline-inc / probity

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

Interest is being created twice in vaultEngine #369

Closed shine2lay closed 2 years ago

shine2lay commented 2 years ago

Right now, interest is created twice, here is how it working right now:

When we update accumulator, we do two things (that is relevant to this topic)

Since the interest collected from debt position is going to treasury, it can be reused again for more loans while equity positions holders are able to mint interests

mrosendin commented 2 years ago

Would a possible solution be that the interest collected from the debt position is not counted, since it's being counted in equity accumulator?

Ultimately I think the point you are making is that both accumulators include the interest calculation which results in double counting, so we need to subtract one side of it in order to count interest only once. I am not sure about the most elegant solution just yet