# Earning System

Point system for lending platform activity.

### Overview

GM Points represent the user's positive-sum participation in the GM Lending platform. The main activities that earn points are below. Points are never taken away. When claimed, they are translated from "earned" to "claimed." In other words, they ride forever. See the Calculations section below for specific examples. Any other questions not answered here might be in the FAQs (link)

### Point Parameters and Formulas

Lending USDC earns 2 points per dollar coin per day (must have 100 USDC or more deposited)

Borrowing USDC earns 1 points per dollar coin per day

Point boost per referral is determined at contract deployment

The maximum referral boost for each referrer is determined at contract deployment

Points accrue based on the following formulas:

total referral boost = 1 + (number of eligible referrals * referral boost per referral)

lending USDC points = lending balance * days lent * 2 points/day * total referral boost

borrowing USDC points = borrowing balance * days borrowed * 1 points/day * total referral boost

users' total earned points = lending USDC points + borrowing USDC points

Notes:

Eligible referrals have at least 100 USDC deposited in the Gloop Lending Pool.

Due to the way Solidity handles decimals, the above equations also use a PRECISION factor of 10,000. However, to keep the formulas as digestible as possible, it has been abstracted away here.

Days are calculated via

`lastUpdateTime`

, which is the last time the user transacted with the Lending Pool. This number gets updated to the timestamp of the block that the most recent transaction was executed in. So if a user borrows 10 days after their one and only deposit, then they will accrue points on that deposit for those 10 days, but not the immediate borrow, and the`lastUpdateTime`

will be updated to the time of the borrow.

### Claiming Points

After the Points Program ends, users can click/tap the "Claim Points" button on the Points page to claim and store their accumulated points. These points will be used for other stuffies in the near future.

**To ensure point earning, keep at least the minimum amount of USDC deposited until the program ends.** You may withdraw at any time after you claim your final points.

### Point Calculation Examples

Assumptions: For all examples, the GM Points Program is 60 days, lending earns 2 points per dollar per day, borrowing earns 1 point per dollar per day, the point boost per referral is 10%, and the max referral boost is 100% (so max of 10 referrals allowed per user address). The users have also deposited GM tokens enabled as collateral, so that they can borrow. The amount of GM tokens deposited doesn't matter for GM Point calculation purposes.

#### Example Calculation #1: Depositing and Withdrawing

A user deposits 500 USDC for ten days, then withdraws 200 USDC. Five days later, the same user deposits 500 more USDC, giving a total of 800 USDC deposited. The user has 0 referrals.

(500 USDC * 10 days * 2 pts/day) + (300 USDC * 5 days * 2 pts/day) = 13,000 points

#### Example Calculation #2: Borrowing and Repaying (with Referrals)

User 4484 refers Referral A and Referral B. All three users have the minimum USDC deposited to be point and referral boost eligible.

User 4484 deposits 4,000 USDC (and other GM tokens enabled as collateral) and borrows 2,000 USDC for ten days.

(4,000 USDC * 10 days * 2 pts/day * 1.2 referral boost) + (2,000 USDC * 10 days * 1 pts/day * 1.2 referral boost) = 96,000 lending points + 24,000 borrowing points = 120,000 total earned points

Referral A and B both withdraw their USDC from the platform, which brings User 4484's referral boost back to zero. Ten days pass again before User 4484 repays their entire borrow.

(4,000 USDC * 10 days * 2 pts/day) + (2,000 USDC * 10 days * 1 pts/day = 80,000 lending points + 20,000 borrowing points = 100,000 total earned points

#### Example Calculation #3: Max Referrals

User 1559 deposits 1,000 USDC and borrows 400 USDC for 20 days. User has obtained 25 eligible referrals.

(1,000 USDC * 20 days * 2 pts/day * 2 referral boost) + (400 USDC * 20 days * 1 pts/day * 2 referral boost) = 80,000 lending points + 16,000 borrowing points = 96,000 total earned points

As you can see, although the user has 25 referrals, which would mean a total referral boost of 3.5 referral boost, the total referral boost is only 2, since there are 10 max referrals allowed at a referral boost of 10% each.

Last updated