FHELend - Fully Homomorphic Encrypted Lending Platform
FHELend is a global lending/borrowing platform that leverages Fully Homomorphic Encryption for its interest rate calculation algorithm. This approach enhances privacy and security in DeFi lending operations, allowing for confidential yet verifiable interest rate computations.
How It Works
- Users can deposit collateral -> WETH and borrow assets -> FUSD.
- Lenders can provide liquidity by depositing -> FUSD.
- FHE are used to calculate interest rates based on utilization.
- Users receive LendERC20 when they lend, representing their share of the lending pool.
- Borrowers receive DebtERC20 representing their outstanding debt.
- Undercollateralized positions can be liquidated to maintain system solvency.
Composition
1. Contracts
- FHElend.sol -> handling lending, borrowing, FHE yield calculation & liquidations.
- fake_oracle.sol -> simulates price feeds for assets.
- lend_share_ERC20.sol -> ERC20 tokens representing lending positions.
- debt_share_ERC20.sol -> ERC20 tokens representing borrowing positions.
- fakeUSD.sol -> simulated asset for demonstration.
- fakeWETH.sol -> simulated asset for demonstration.
2. Scripts
- initRates.ts -> simple tsnode script using Fhenix protocol sdk to encrypt values.
3. UI
- FHELend -> simple interface for interacting with the FHELend contracts.
Deployments (Fhenix Helium)
- FHElend.sol -> 0x694eeFcfd4f91FB44858378DC5eAf0a1a404E974
- fake_oracle.sol -> 0x880a9F4e4BE83BEdA2F32DC20843b4228aA5F9b0
- lend_share_ERC20.sol -> 0x786e05d54eCc314F18D0efF0A1C2279619f6bD39
- debt_share_ERC20.sol -> 0x93Ab31Bbc22302748Ab284c163e09779E98095dB
- fakeUSD.sol -> 0xb68De1A5C21576d316C105609d1C3916fB080Ff3
- fakeWETH.sol -> 0xF6e801cB6080c4a07BbACD33dbE359e9fB2b6668
Extension options
- Expand FHE integration to health factor computation & liquidation thresholds.
- Implement FHERC20 for enhanced transactional privacy.