Skip to Content
Introduction

Veil Protocol

Veil is a lending protocol on Solana that lets users pledge native Bitcoin, Ethereum, and physical gold as collateral — without bridging or wrapping — while keeping positions optionally private through on-chain FHE encryption.

It is built with Pinocchio , Solana’s zero-dependency, zero-copy program framework, which gives Veil significantly lower compute unit consumption than equivalent Anchor-based protocols.

What Veil Solves

ProblemSolution
Native BTC/ETH can’t be used as on-chain collateral without bridgingIka dWallet integration — MPC-governed cross-chain signing with no bridge
Physical gold has no DeFi accessOro/GRAIL integration — regulated on-chain gold with transparent custody
All positions are publicly visibleFHE via Encrypt — observer-private balances, plaintext health enforcement
Flash loans require upfront capitalNative flash loan primitive with atomic revert and fee splitting

Program Overview

Program ID: TBD — will be published after mainnet deployment Discriminator format: first byte of instruction data Architecture: Pinocchio 0.11.1, zero-copy account access, no std

Protocol Components

Core Lending

Standard over-collateralised lending with a two-slope (kink) interest rate model, index-based share accounting, and a multi-step liquidation engine with close-factor and liquidation bonus controls.

Ika dWallet Integration

Users transfer a dWallet’s authority to Veil’s CPI PDA. The program then controls cross-chain signing: it can approve Bitcoin/Ethereum transactions atomically with Solana state changes. No bridge. No synthetic. See Ika Reference.

FHE Privacy Layer

EnablePrivacy creates an EncryptedPosition alongside the standard UserPosition. Encrypted balance handles are stored on-chain; only the user can decrypt. Health factor checks still run in plaintext — the protocol is never blind to solvency. See Privacy Reference.

Pyth Oracle

Prices are read directly from Pyth legacy push-oracle accounts without any SDK dependency. The program validates magic, atype, status, and confidence interval (≤ 2 % of price) before writing to the pool cache. See Oracle Reference.

Flash Loans

Atomic borrow-and-repay within a single transaction. Fee: 0.09 % (split 90/10 between LPs and protocol). The in-flight amount is recorded in the pool; a missing or underpaid repay reverts the entire transaction. See Flash Loans Reference.

Last updated on