project screenshot 1
project screenshot 2
project screenshot 3

Morgante

A financial instrument to gain a yield by providing flash loans and investing in other activities to diversify the risk.

Morgante

Created At

ETHOnline 2023

Winner of

🏊 Scroll — Pool Prize

Project Description

Morgante Protocol is a decentralized finance (DeFi) platform designed to facilitate the creation of a passive and diversificate income stream for lenders, encouraging them to participate in the platform.

The main feature offered by the protocol are flash loans, a type of uncollateralized loan that allows users to borrow assets instantly without providing collateral, provided the borrowed funds are returned within the same transaction block. Despite being quite a lucrative investment, flash loans are considered to be an hazardous financial activity, hence Morgante takes a proactive approach to risk management by strategically diversifying its on-chain investments beyond flash loans. In fact Morgante protocol allows also token swaps.

Moreover Morgante protocol can mint a predefined amount of Mordred tokens to LPs in order to incetivize them into partecipating in the governance of the protocol (defining the fees of the flash loans). It is also peculiar that Mordred is an algorithmic stablecoin backed by the liquidity provided and pegged to USD. This is was chosen to (ideally) have a direct alignment between lenders' stakes and their decision power, reflecting the essence of informed investors' commitment.

How it's Made

Morgante is built with Solidity in order to have contracts as readable as possible and with the Foundry framework, which allows to do invariant testing. React will be used for the frontend. The main contract is Pool.sol, which act as an intermediary between the lender / borrower and the core of the protocol (represented by the MordredEngine.sol contract). Pool.sol is the contract that allows borrowers / lenders to deposit liquidity, withdraw liquidity, mint Mordred (protocol's governance token), burn Mordred, borrow collateral (in the form of a flash loan), liquidate one's position if undercollateralized, claim rewards and swap tokens. To assert that no user can have more Mordred that the value of the provided liquidity, the protocol relies on Chainlink price oracles. The other contracts are for governance. There is also a contract that shows how to perform a flash loan. I also wanted to test as much as possible to ensure that the protocols does what it intended to do.

background image mobile

Join the mailing list

Get the latest news and updates