Comments (7)
What about passing nothing to the IRM, and letting it get what it needs ?
In my PoC, the state can only be loaded all at once from outside the contract and is already loaded to memory anyway, so this way is cheaper
from morpho-blue.
https://eips.ethereum.org/EIPS/eip-2330 could also help
from morpho-blue.
the state can only be loaded all at once from outside the contract
Yeah you just reminded me that I also expose extsload getters, so this sentence is wrong. I feel like it doesn't cost much considering the size of the state so it's not much of a matter to always pass it to the IRM
from morpho-blue.
Agreed, here's how I did it:
from morpho-blue.
What about passing nothing to the IRM, and letting it get what it needs ?
from morpho-blue.
I agree with Patrick on that point. It is more efficient and elegant to give the IRM the variables we know it will need. Also, it limits the potential effects of the IRM, because imo it shouldn't depend on the market addresses.
from morpho-blue.
I don't think that we should pass specific data to the IRM (except if we could pass everything with a market struct for example) because it would necessarily restrict the possibilities in the IRM. Blue is meant to work with any contract that returns a reasonable rate.
And I think that the IRM should return a rate and not an amount of interests, because it is a more natural split between Blue and IRMs, it let less logic to the IRM, and it seems that we want to emit the rate from Blue directly.
from morpho-blue.
Related Issues (20)
- Unnecessary cast HOT 1
- Contango integration feedback HOT 4
- Revert silent invariant tests HOT 1
- Add return bytes to callbacks
- Restore invariants in CI
- The Cantina security review has a "draft" overlay HOT 1
- Test living vertigo mutations HOT 5
- `MorphoBalancesLib.expectedBorrowAssets` may return a value greater than `totalBorrowAssets` HOT 4
- IRM zero
- `changePrank` is deprecated HOT 2
- re-add the certora rule removed in #642
- remove the test tree
- Should `expectedAssets` precise the rounding HOT 2
- Cantina Managed report is still draft HOT 1
- Fix NPMjs deployment
- Update whitepaper with correct market naming HOT 1
- are you deploy to Sepolia Testnet yet? HOT 1
- Morpho pinned to solc 0.8.19 make it incompatible with latest OpenZeppelin HOT 6
- boundUnhealthyPosition does not use amountCollateral at all
- `forge t` failing on `main`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from morpho-blue.