Skip to content

Commit facefbd

Browse files
committed
update lending project
1 parent c65782b commit facefbd

File tree

19 files changed

+59
-60
lines changed

19 files changed

+59
-60
lines changed

project-10-lending/Anchor.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[toolchain]
2+
anchor_version = "0.30.1"
23

34
[features]
45
resolution = true

project-10-lending/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
### Disclaimer: This code is not audited and should not be used in production. There are several edge cases that have not been addressed and error handling that has not been implemented. This is for education purposes only.
44

5-
## Program Terminology
5+
## Protocol Terminology
66

77
1. Health Factor -
8-
2. Max Loan to Value Ratio (LTV) - Max percentage of collateral that can be borrowed
8+
2. Max Loan to Value Ratio (LTV) -
99
3. Collateral -
1010
4. Liquidation Threshold -
1111
5. Shares -
@@ -19,9 +19,9 @@
1919
When a user deposits assets, they receive a proportion of total shares relative to their deposit.
2020
The value of each share increases over time as interest accrues to the pool, but the number of shares owned by each depositor remains constant. This way, the system only needs to update the total balance and the share value, not each individual's balance.
2121

22-
Interest Rate Model for implementing a dynamic APY:
22+
Interest Rate Model
2323

24-
## Formulas
24+
## Calculations Needed
2525

2626
**Variable Interest Rate Model:**
2727

@@ -43,8 +43,6 @@ where,
4343
- $d_m = Deposit Max Rate$
4444
- $b_m = Borrow Max Rate$
4545

46-
Note: This is to be used if you are attempting the challenge to implement a dynamic apy into the program
47-
4846
**Share Value**
4947

5048
- $TotalAssets = TotalDeposits + AccruedInterest$

project-10-lending/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"@coral-xyz/anchor": "^0.30.1",
99
"@pythnetwork/price-service-client": "^1.9.0",
1010
"@pythnetwork/pyth-solana-receiver": "^0.8.0",
11-
"@solana/spl-token": "^0.4.8",
11+
"@solana/spl-token": "0.4.8",
1212
"@solana/web3.js": "1.94.0",
13-
"anchor-bankrun": "^0.4.0",
14-
"solana-bankrun": "^0.2.0",
13+
"anchor-bankrun": "0.4.0",
14+
"solana-bankrun": "0.2.0",
1515
"spl-token-bankrun": "0.2.5",
1616
"rpc-websockets": "7.11.0"
1717
},
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)