Skip to content

Abduovv/Flashix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

⚡ Flashix — Flash Loan Protocol on Solana

Flashix is a lightweight flash loan protocol on Solana that allows anyone to borrow tokens without collateral, as long as they repay within the same transaction. Liquidity providers (LPs) can deposit tokens to earn a share of the fees collected from borrowers.

Solana Anchor

Banner

 Liquidity Provider (LP)
        │
        └──▶ deposit_liquidity
                    │
                    ▼
            [Vault is funded]
                    │
         ┌──────────┴──────────┐
         ▼                     ▼
 Borrower                  LP holds LP tokens
        │
        └──▶ request_flash_loan (amount)
                    │
                    ▼
       [Vault transfers amount to borrower]
                    │
        borrower executes arbitrary logic
                    │
        ┌────────────┴────────────┐
        ▼                         ▼
repay_loan_with_fee       (Fails: TX reverts)
        │
        ▼
[Vault receives amount + fee]
        │
        ▼
[Update vault.total + collected_fees]
        │
        ▼
   LP wants to exit position
        │
        └──▶ withdraw_with_fees
                    │
                    ▼
[Calculate LP share + fee share]
        │
        ▼
[Transfer funds & burn LP tokens]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published