{"id":24716945,"url":"https://github.com/sc4recoin/bestlend","last_synced_at":"2026-04-20T19:31:20.068Z","repository":{"id":225927152,"uuid":"767264261","full_name":"SC4RECOIN/bestlend","owner":"SC4RECOIN","description":"always get the best rates on your debt and collateral","archived":false,"fork":false,"pushed_at":"2024-05-14T23:36:21.000Z","size":901,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-15T18:30:09.135Z","etag":null,"topics":["bestlend","colosseum","defi","hackathon","solana"],"latest_commit_sha":null,"homepage":"https://bestlend.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SC4RECOIN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-05T01:22:24.000Z","updated_at":"2024-05-06T15:30:23.000Z","dependencies_parsed_at":"2024-05-02T03:32:23.776Z","dependency_job_id":"c1af479d-6c99-4411-bf25-da0329222d4b","html_url":"https://github.com/SC4RECOIN/bestlend","commit_stats":null,"previous_names":["sc4recoin/bestlend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC4RECOIN%2Fbestlend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC4RECOIN%2Fbestlend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC4RECOIN%2Fbestlend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SC4RECOIN%2Fbestlend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SC4RECOIN","download_url":"https://codeload.github.com/SC4RECOIN/bestlend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235826622,"owners_count":19051122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bestlend","colosseum","defi","hackathon","solana"],"created_at":"2025-01-27T09:15:02.254Z","updated_at":"2026-04-20T19:31:20.063Z","avatar_url":"https://github.com/SC4RECOIN.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bestlend - Solana Renaissance Hackathon\n\n[Solana Renaissance Hackathon](https://blog.colosseum.org/announcing-the-winners-of-the-solana-renaissance-hackathon/) honorable mention in DeFi \u0026 Payments Track!\n\n---\n\nBestlend maximizes your lending and borrow rates to save you time and money. It will find the best rates from different lending apps on Solana and automatically move your funds for you. Bestlend will also swap between correlated assets so you can deposit any stablecoin or LST and know you're getting the best yield.\n\nFor example, you might deposit JitoSOL on Kamino Finance and at some point in the future the lending rate of SOL on Marginfi exceeds the lending and staking rate of JitoSOL so the Bestlend performer will swap and move your collateral on your behalf\n\n## Directories\n\n| Folder             | Desription                                      |\n| ------------------ | ----------------------------------------------- |\n| programs/bestlend  | bestlend program                                |\n| programs/dumyswap  | swap program for testing on devnet              |\n| programs/klend     | fork of https://github.com/Kamino-Finance/klend |\n| programs/mock-pyth | writing oracle rates for testing on devnet      |\n| api                | ts backend for app data and performer actions   |\n| app                | react app front-end                             |\n| clients            | solita generated sdks from idls                 |\n\n## How does Bestlend work?\n\nDebt obligations for each protocol are held by a PDA with strict permissions. A user can perform any action against their position but the Bestlend performer can only do specific actions against whitelisted programs. The value of the position must be established before any action and must be checked after every action to ensure the action results in a position of the same value.\n\n### Sample performer transaction\n\nExample devnet performer tx: [solana.fm](https://solana.fm/tx/4SqwsgiqyuPVVKYDke2kuxNMrENJR6njCKRoSbZ3Ua4SDpKTqW9J8Bj6wjHbvQcoTn4DCP95xFJUMcsJ1wEPnSBr?cluster=devnet-alpha)\n\nAll performer instructions are included in a single transaction.\n\nFor example (swapping SOL collateral to JitoSOL):  \n[preaction](/programs/bestlend/src/instructions/handle_action.rs#L9) → [withdraw SOL](/programs/bestlend/src/instructions/handle_klend_withdraw.rs#14) → [swap SOL to JitoSOL](/programs/bestlend/src/utils/action.rs#L15) → [deposit JitoSOL](/programs/bestlend/src/instructions/handle_klend_deposit.rs#L10) → [postaction](/programs/bestlend/src/instructions/handle_action.rs#L48)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsc4recoin%2Fbestlend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsc4recoin%2Fbestlend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsc4recoin%2Fbestlend/lists"}