Skip to main content

Getting Started with Deepr

Deepr Degen

Welcome to Deepr Degen, the testing ground for Deepr Finance on the ShimmerEVM Mainnet. This version serves as a dedicated playground, allowing you to test and experience Deepr Finance in a unique environment before the official launch of our final Lending protocol. Let's delve into what sets Deepr Degen apart:

What is Deepr Degen?

Deepr Degen is a special release designed to offer you a sneak peek into the future of Deepr Finance. It is distinct from our final Lending protocol in several ways, allowing you to try out Deepr Finance before the full release, but please be mindful of the disclaimers and only lend/borrow what you can afford to lose, as many of the risk mitigation tools which we will implement on the final version are not included:

  1. Meme Coin Lending Markets: In Deepr Degen, we introduce meme coin lending and borrowing markets for $FISH and $WEN tokens trading on ShimmerSea Dex, adding a fun and engaging dimension to your DeFi experience.

  2. DEEPR Tokens Rewards: Please note that in this initial version of Deepr Degen, $DEEPR token rewards will not be available. These rewards will be introduced in the full release of the Deepr Finance platform.

  3. Supply Liquidity Limits: To ensure the stability and security of the Deepr Degen ecosystem, we've implemented limits on liquidity supply on our front end. These limits are essential to maintain a controlled environment while ensuring a safe space for all participants.

Exercise Caution on Deepr Degen

While Deepr Degen offers an exciting opportunity to explore and experiment with Deepr Finance on the ShimmerEVM Mainnet, we want to emphasize the need for caution. As with any financial platform, there are inherent risks involved in trading and engaging with cryptocurrency markets. Prices can be volatile, and the meme coins market, in particular, may carry additional unpredictabilities. It's crucial to conduct thorough research, assess your risk tolerance, and only invest funds you can afford to lose. Always exercise prudence, stay informed, and be vigilant when participating in Deepr Degen to ensure a safe and enjoyable experience within our ecosystem. Your security and financial well-being are of utmost importance to us.

Why get involved with Deepr Degen?

Deepr Degen serves as a stepping stone to our final Lending protocol, providing you with a hands-on opportunity to test and familiarize yourself with our lending platform. It allows you to explore, experiment, and learn about the future of decentralized finance on ShimmerEVM Mainnet.

With its distinctive features and innovative approach, Deepr Degen empowers you to embrace the DeFi landscape in a dynamic and interactive way. Whether you're an experienced DeFi enthusiast or a newcomer to the space, Deepr Degen offers a unique experience worth exploring.

So, dive into the world of Deepr Degen, where boundaries are pushed, and possibilities are endless. Test Deepr Finance on the ShimmerEVM Mainnet, and get ready to embark on a thrilling journey into the future of decentralized finance!

About Deepr

Deepr Finance is a decentralized finance (DeFi) platform built on the Shimmer EVM that enables users to lend and borrow digital assets without the need for intermediaries, such as banks or traditional financial institutions. Users can supply their assets to the platform, earning interest on their deposits, while borrowers can take out loans by providing collateral. This creates a permissionless, transparent, and highly accessible financial ecosystem that promotes financial inclusion and innovation.

Tokenomics

Deepr has a simple tokenomics model. The model will have a Total Supply of 1000Mi Tokens (named Deepr). Deeprs will be minted and distributed according to the following scheme.

DEEPR Allocation

Token Allocation

DEEPR Emission

Emission Chart

We’ve made it really simple for you to earn $Deepr:

  • Liquidity Mining: Earn $DEEPR rewards by simply supplying collateral and borrowing from the protocol (for example, imagine if you received shares in a bank for depositing funds and borrowing).
  • Airdrop: Through an airdrop to the community for participating in the soon to be launched Shimmer EVM Beta and via our partners (yet to be announced).
  • DEX Initial Liquidity Offer: Prior to launch we will announce an opportunity to provide initial liquidity for our token via our ShimmerSea partner.

We have decided to focus on launching via a fair launch model which has been a successful model for lending platforms. The model of fair launch means that no VCs or early stage investors gained any advantage through any presales.

We’ve allocated a huge percentage of the $DEEPR tokens to the community, because we want to ensure that as many of our tokens as possible are in the hands of our users. This strategy ultimately creates long term success and value creation for all stakeholders.

DEEPR Token Value & Utility

Governance

Deepr protocol’s governance will initially lie in the hands of the Deepr team. Strategic decisions such as collateralization ratio, interest rates, emission rates etc. will only be made after consulting with advisors and our community. But as we believe in decentralized decision making, that involves all stakeholders we intend to gradually pass on full governance to the community and stakeholders. For this governance process, the DEEPR token plays an essential role as an utility token with voting functionality. According to the governance rules, token holders will be able to submit ideas, vote on them, and delegate votes for proposals in a decentralized manner.

Passive income

In the future users will be able stake their $DEEPR tokens to receive a portion of the fees generated by the protocol. Therefore $DEEPR token holders will have the ability to earn passive income from the lending markets with the intention of locking large percentages of the token during this process.

As we add more features to the Deepr platform, the$DEEPR token will see an increase in utility and value accrual.

Emission Model

The Emission Distribution will be a spread of Tokens to the users of the platform per Block for 156 weeks (3 years), in return for their participation in the platform.

An amount of Tokens per block will be delivered to users, depending on the Deepr Market in which they are participating (Supply and/or Borrow), and the percentage of participation of the user in the Market.

The model is designed to deliver fewer and fewer Tokens each week (a linear function with a negative slope that will be explained later in the document), so that once week 157 arrives, there are no more tokens left to distribute to users.

It is key to mention that Deepr Finance application uses an important part of the original distribution logic of Compound, which has a constant distribution of the tokens, instead of our decreasing distribution (technical details of this can be found here).

Linear Equation Contract

The Emission Distribution Model used is a Linear Equation with a negative slope that reaches a distribution of 0 Tokens in week/epoch 157. This means that in the first week we will have the Maximum Rate (RateMAX) and from there it will decrease linearly in a proportional rate to the slope, until reaching 0 in week 157.

Before presenting the equation, the RateMAX and the Slope will be calculated so that the equation is easier to see. Recall that the amount of tokens to distribute is 864M Deepr.

Rate and Slope formulas

With these values we can already obtain the linear function:

Rate and Slope formulas

Deeprs Distribution Model

To implement this model, a new smart contract called LinearRateModel has been created, which will contain all the logic of the linear equation. The Comptroller contract, responsible for distributing tokens to users, can easily access this contract to obtain the current rate that complies with the equation whenever it needs to be consulted.

As block creation is done on demand, epochs will be measured in fixed numbers of weeks, in units of seconds (with one week being one epoch). Using block intervals would have led to complications, as a spamming agent could increase the number of blocks, leading to more calculations in the emission of Deeprs.

Guides

Networks

Deepr Finance is currently deployed on Shimmer EVM, we will consider migrating to other EVM blockchains in the future.

You can also see a full list of all deployed contract addresses here which have been audited by Hashex a report of which is available here.

Protocol Math

The Deepr protocol contracts use a system of exponential math, ExponentialNoError.sol, in order to represent fractional quantities with sufficient precision.

Most numbers are represented as a mantissa, an unsigned integer scaled by 1 * 10 ^ 18, in order to perform basic math at a high level of precision.

Technical information

cToken and Underlying Decimals

Prices and exchange rates are scaled by the decimals unique to each asset; cTokens are ERC-20 tokens with 8 decimals, while their underlying tokens vary, and have a public member named decimals.

cTokencToken DecimalsUnderlyingUnderlying Decimals
dWMIOTA8WMIOTA6
dSMR8SMR18
dETH8WETH18
dUSDC8USDC6
dUSDT8USDT6
dWBTC8WBTC8

{: .decimals-events-table }

Interpreting Exchange Rates

The cToken Exchange Rate is scaled by the difference in decimals between the cToken and the underlying asset.

oneCTokenInUnderlying = exchangeRateCurrent / (1 * 10 ^ (18 + underlyingDecimals - cTokenDecimals))

Here is an example of finding the value of 1 cWMIOTA in WMIOTA with Web3.js JavaScript.

const cTokenDecimals = 8; // all cTokens have 8 decimal places
const underlying = new web3.eth.Contract(erc20Abi, wmiotaAddress);
const cToken = new web3.eth.Contract(cTokenAbi, cWmiotaAddress);
const underlyingDecimals = await underlying.methods.decimals().call();
const exchangeRateCurrent = await cToken.methods.exchangeRateCurrent().call();
const mantissa = 18 + parseInt(underlyingDecimals) - cTokenDecimals;
const oneCTokenInUnderlying = exchangeRateCurrent / Math.pow(10, mantissa);
console.log(`1 cWMIOTA can be redeemed for ${oneCTokenInUnderlying} WMIOTA`);

There is no underlying contract for SMR, so to do this with cSMR, set underlyingDecimals to 18.

To find the number of underlying tokens that can be redeemed for cTokens, multiply the number of cTokens by the above value oneCTokenInUnderlying.

underlyingTokens = cTokenAmount * oneCTokenInUnderlying

Calculating Accrued Interest

Interest rates for each market update on any block in which the ratio of borrowed assets to supplied assets in the market has changed. The amount interest rates are changed depends on the interest rate model smart contract implemented for the market, and the amount of change in the ratio of borrowed assets to supplied assets in the market.

Interest accrues to all suppliers and borrowers in a market when any Shimmer address interacts with the market’s cToken contract, calling one of these functions: mint, redeem, borrow, or repay. Successful execution of one of these functions triggers the accrueInterest method, which causes interest to be added to the underlying balance of every supplier and borrower in the market. Interest accrues for the current block, as well as each prior block in which the accrueInterest method was not triggered (no user interacted with the cToken contract). Interest compounds only during blocks in which the cToken contract has one of the aforementioned methods invoked.

Here is an example of supply interest accrual:

Alice supplies 1 SMR to the Deepr protocol. At the time of supply, the supplyRatePerBlock is 37893605 Wei, or 0.000000000037893605 SMR per block. No one interacts with the cSMR contract for 3 blocks. On the subsequent 4th block, Bob borrows some SMR. Alice’s underlying balance is now 1.000000000151574420 SMR (which is 37893605 Wei times 4 blocks, plus the original 1 SMR). Alice’s underlying SMR balance in subsequent blocks will have interest accrued based on the new value of 1.000000000151574420 SMR instead of the initial 1 SMR. Note that the supplyRatePerBlock value may change at any time.

Calculating the APY Using Rate Per Block

The Annual Percentage Yield (APY) for supplying or borrowing in each market can be calculated using the value of supplyRatePerBlock (for supply APY) or borrowRatePerBlock (for borrow APY) in this formula:

Rate = cToken.supplyRatePerBlock(); // Integer
Rate = 37893566
SMR Mantissa = 1 * 10 ^ 18 (SMR has 18 decimal places)
Blocks Per Day = 6570 (13.15 seconds per block)
Days Per Year = 365

APY = ((((Rate / SMR Mantissa * Blocks Per Day + 1) ^ Days Per Year)) - 1) * 100

Here is an example of calculating the supply and borrow APY with Web3.js JavaScript:

const smrMantissa = 1e18;
const blocksPerDay = 6570; // 13.15 seconds per block
const daysPerYear = 365;

const cToken = new web3.eth.Contract(cSmrAbi, cSmrAddress);
const supplyRatePerBlock = await cToken.methods.supplyRatePerBlock().call();
const borrowRatePerBlock = await cToken.methods.borrowRatePerBlock().call();
const supplyApy =
(Math.pow(
(supplyRatePerBlock / smrMantissa) * blocksPerDay + 1,
daysPerYear
) -
1) *
100;
const borrowApy =
(Math.pow(
(borrowRatePerBlock / smrMantissa) * blocksPerDay + 1,
daysPerYear
) -
1) *
100;
console.log(`Supply APY for SMR ${supplyApy} %`);
console.log(`Borrow APY for SMR ${borrowApy} %`);