A Proprietary Solution to Meet the Growing Demands for Liquidity, Scalability and Speculation in DeFi Lending Markets.The Moma Protocol uses a proprietary smart contract factory to produce, manage, accelerate and aggregate the lending markets, creating an ecosystem that can expand infinitely on lending liquidity and market diversity.Four key components: Factory, Launch Pool, Lending Pool and Aggregator.
Before getting started with this repo please read:
- Official Website
- The Moma Whitepaper, describing how Moma works
For questions about interacting with Moma, please visit our Telegram.
We detail a few of the core contracts in the Moma protocol.
The Moma mTokens, which are self-contained borrowing and lending contracts. MToken contains the core logic and MErc20 and MEther add public interfaces for Erc20 tokens and ether, respectively. Each MToken is assigned an interest rate and risk model (see InterestRateModel and MomaMaster sections), and allows accounts to mint (supply capital), redeem (withdraw capital), borrow and repay a borrow. Each MToken is an ERC-20 compliant token where balances represent ownership of the market.
The risk model contract, which validates permissible user actions and disallows actions if they do not fit certain risk parameters. For instance, the MomaMaster enforces that each borrowing user must maintain a sufficient collateral balance across all mTokens.
The Moma Governance Token (MOMA). Holders of this token have the ability to govern the protocol via the governor contract.
The administrator of the Moma timelock contract. Holders of Moma token may create and vote on proposals which will be queued into the Moma timelock and then have effects on Moma mToken and MomaMaster contracts. This contract may be replaced in the future with a beta version.
Contracts which define interest rate models. These models algorithmically determine interest rates based on the current utilization of a given market (that is, how much of the supplied assets are liquid versus borrowed).
Initial interest rate model, as defined in the Whitepaper. This contract accepts a base rate and slope parameter in its constructor.
To run moma, pull the repository from GitHub and install its dependencies. You will need yarn or npm installed.
git clone https://github.com/moma-finance/moma-protocol.git
cd moma-protocol
yarn install --lock-file # or `npm install`
Jest contract tests are defined under the tests directory. To run the tests run:
yarn test