Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we compound continuously ? #253

Closed
MathisGD opened this issue Aug 9, 2023 · 11 comments · Fixed by #254
Closed

Should we compound continuously ? #253

MathisGD opened this issue Aug 9, 2023 · 11 comments · Fixed by #254

Comments

@MathisGD
Copy link
Contributor

MathisGD commented Aug 9, 2023

          Should we compound continuously ? 
continuous_compounding

Originally posted by @peyha in #222 (comment)

@MerlinEgalite
Copy link
Contributor

Is the implementation simple?

@pakim249CAL
Copy link
Contributor

Yes. It only involves removing the zero floor subs.

@pakim249CAL pakim249CAL self-assigned this Aug 9, 2023
@MerlinEgalite
Copy link
Contributor

Then let's go

@Rubilmax
Copy link
Collaborator

Rubilmax commented Aug 9, 2023

I love the idea, but I feel like it's way more easy for everyone in the world to understand that interests are compounded each second rather than continuously...

By that I mean that if I was a strategic lender who wants to calculate my compounded rate over a defined period, I intuitively (meaning: it is way more broadly known this way) go for the formula $x_{t+n} = (1+r)^n x_t$ rather than $x_{t+n} = e^{nr} x_t$

I unfortunately think that it makes more sense to compound every second from a business perspective
I'm ok if we go for compounding continuously as I don't think it's a big deal either with proper documentation ; just feel like it'll be easier for those TradFi we'll talk to

@pakim249CAL
Copy link
Contributor

I don't think it makes a big difference either way, but I made a quick PR for it. Feel free to veto!

@peyha
Copy link

peyha commented Aug 9, 2023

I love the idea, but I feel like it's way more easy for everyone in the world to understand that interests are compounded each second rather than continuously...

By that I mean that if I was a strategic lender who wants to calculate my compounded rate over a defined period, I intuitively (meaning: it is way more broadly known this way) go for the formula xt+n=(1+r)nxt rather than xt+n=enrxt

I unfortunately think that it makes more sense to compound every second from a business perspective I'm ok if we go for compounding continuously as I don't think it's a big deal either with proper documentation ; just feel like it'll be easier for those TradFi we'll talk to

I feel like it is possible to find a way to explain it quite "simply" to everyone in the world (saying that interests are compounded at each instant which is even better than compounding every second)

I don't really agree with you for the business perspective. The interest improvement through continuous compounding can be pretty significant for long term suppliers whom we want to attract as much as possible. Furthermore, I am not sure that TradFi people do not know about this technique (I saw the continuous interest formula in a paper from Simtopia so I think quants are familiar with it)

@pakim249CAL
Copy link
Contributor

In the first place, we have to explain that the compounded interest is approximated by a taylor series expansion anyway. So I don't consider it a huge leap to move to continuous compounding. It comes with the benefit of not having to do (n-1), (n-2).... and so is a bit more gas efficient as well.

And yes, I pretty much agree with @peyha. Continuous compounding is a pretty well understood concept, and is probably more "pure" mathematically. But I don't want to overstate the benefits either. Besides the simpler taylor series formula saving a tiny bit of gas and complexity, the additional interest from continuous compounding is very unlikely to ever be a significant amount, and the error from approximating the taylor series in the first place will largely overshadow any difference this change makes.

@Rubilmax
Copy link
Collaborator

Rubilmax commented Aug 10, 2023

I didn't want to mean continuous compounding couldn't be understood or is not largely understood, my bad. I'm arguing it's very uncommon. Do you have an example of a financial product using continuous compounding?

Everything lies in this change to me: we are going to change the way people intuitively calculate compounding interests given an interest rate, for the sake of mathematical purism (and again, I'm a fan of it)
image

We do live in a continuous world, but people think with $dt = 1s$ 😄

But we're a primitive, we can change things... I'm curious to know what others think

@MathisGD
Copy link
Contributor Author

We do live in a continuous world

if you refuse the simulation hypothesis..

More seriously, @morpho-labs/offchain also team matters here

@julien-devatom
Copy link
Contributor

In Ethereum world, $dt = 12s$

I don't have a strong opinion on it, too, nerd on financial topics to have a relevant opinion. From a mathematic aspect, both are elegant. From an integrator pow, this is the same (not easier / harder to compute the APY).

However, from 1s compounding to continuous, the diff is really small (especially for low rates) as mentioned before.

@ghivert
Copy link

ghivert commented Aug 10, 2023

I'm not sure it's really changing anything from my point of view: we'll build libs on top of the primitive, and most people will use libs or will read the docs. In the end it's not a big deal.
And with the approximation of the computation, it seems to me that we're more talking on theory than anything. I think I have two interrogations:

  • Because we're using a Tailor expansion, is there really a huge difference from one or the other?
  • Is continuous really more gas-efficient?

Maybe we could leverage on this to do some marketing and assume Blue will be the best protocol in the world because it's so mathematical right? 😂

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 a pull request may close this issue.

7 participants