| domain | morpho.org |
| summary | This code snippet outlines functions within a smart contract, likely a DeFi protocol related to lending and borrowing. Here’s a summary:
The contract implements several functions with the `inheritdoc IMorphoBase` modifier, suggesting it’s part of a larger, base contract structure. Key functions include:
* `setOwner`: Sets the owner of the contract, requiring the new owner to be the current owner and emitting an `EventsLib.SetOwner` event. * `enableIrm`: Enables the IRM feature, emitting an `EventsLib.EnableIrm` event. * `enableLltv`: Enables the LLTV feature, requiring the LLTV value to be `WAD` and emitting an `EventsLib.EnableLltv` event. * `setFee`: Sets the fee for a market, requiring the market ID to exist and the fee to be within the maximum allowed value, emitting an `EventsLib.SetFee` event. * `repay`: Allows users to repay their loans by transferring assets and shares, accruing interest, and updating internal state variables.
These functions utilize `require` statements to enforce constraints and error handling, and employ `emit` statements to trigger events for external monitoring. The `repay` function contains complex logic involving calculating position, updating share and asset totals, and transferring assets to the receiver. |
| title | Morpho |
| description | A permissionless and non-custodial lending protocol. Earn interest on over-collateralized lending and borrow digital assets using immutable infrastructure. |
| keywords | address, assets, sender, function, shares, external, memory, data, more, import, read, returns, public, return, authorization, mapping, receiver |
| upstreams |
sommelier.finance |
| downstreams |
|
| nslookup | A 18.154.29.5, A 18.154.29.34, A 18.154.29.35, A 18.154.29.77 |
| created | 2024-12-01 |
| updated | 2026-01-29 |
| summarized | 2026-01-31 |
|
|