Back to Case Studies
DeFi / Privacy|Sienna Network

Sienna Lend: Building the World's First Private Lending Protocol

Developed the world's first private lending protocol on Secret Network, enabling users to borrow and lend assets with full position privacy while maintaining protocol transparency for market health.

Cover Image for Sienna Lend: Building the World's First Private Lending Protocol

The Challenge

DeFi lending protocols had unlocked permissionless borrowing and lending, but at a significant cost: complete transparency. Every loan, every position, every liquidation was visible on-chain for anyone to see.

For Sienna Network, this wasn't just a feature gap - it was a fundamental barrier to mainstream adoption:

Financial Privacy as a Requirement: Institutional participants and privacy-conscious users couldn't participate in DeFi lending when their positions, strategies, and financial health were publicly visible. A whale's large borrow position could be front-run; a trader's collateral ratio broadcast their liquidation risk.

Existing Solutions Fell Short: Privacy-focused blockchains existed, but none had successfully implemented a full-featured lending protocol. The technical challenges of combining privacy with the complex mechanics of interest rates, liquidations, and collateral management were substantial.

The Technical Paradox: Lending protocols require transparency for certain operations (price feeds, liquidation checks) while users demand privacy for others (position sizes, addresses). Balancing these competing requirements required novel smart contract architectures.

Trust Without Transparency: Traditional lending relies on visible collateral and public liquidation auctions. How could a protocol maintain market stability when positions are hidden?

Sienna needed a partner who could navigate the intersection of cutting-edge privacy technology and battle-tested DeFi mechanics.

Our Approach

We approached this as a first-of-its-kind engineering challenge, requiring us to rethink fundamental DeFi primitives through a privacy-first lens.

Privacy Architecture Design

We leveraged Secret Network's Trusted Execution Environment (TEE) technology, which enables encrypted computation while maintaining verifiable correctness. This allowed us to:

  • Keep position data encrypted at rest and during computation
  • Enable users to prove collateral sufficiency without revealing amounts
  • Allow liquidators to identify undercollateralized positions without seeing specific details

Why Secret Network?

PlatformPrivacy ModelDeFi CapabilityOur Assessment
Ethereum + mixersTransaction-level onlyFullInsufficient for lending
ZcashStrong transaction privacyLimited smart contractsNot suitable
MoneroNative privacyNo smart contractsNot suitable
Secret NetworkEncrypted state + computationCosmWasm smart contractsSelected

Secret Network's unique combination of privacy-preserving computation and full smart contract capability made it the only viable platform.

Balancing Privacy and Protocol Health

We designed a tiered privacy model:

  1. User Positions: Fully private - only the user can see their deposits, borrows, and collateral ratios.
  2. Aggregate Metrics: Publicly visible - total market utilization, interest rates, and protocol health.
  3. Liquidation Triggers: Privacy-preserving proofs allow liquidators to act without seeing specific positions.

The Solution

We built Sienna Lend as a comprehensive private lending protocol with all the features users expect from leading platforms like Aave or Compound - but with privacy by default.

Core Features

Private Lending Markets

  • Users deposit collateral without revealing amounts to other users
  • Borrowing occurs against private collateral positions
  • Interest accrues privately, with users able to view their own earnings

Dynamic Interest Rates

  • Utilization-based interest rate curves adjust automatically
  • Rate parameters visible for transparency; individual positions remain private
  • Supports both stable and variable rate models

Privacy-Preserving Liquidations

  • Liquidators receive encrypted signals when positions become undercollateralized
  • Liquidation auctions execute without revealing the original position holder
  • Incentive structures ensure timely liquidations despite reduced information

Cross-Chain Assets

  • IBC integration enables assets from across the Cosmos ecosystem
  • Wrapped tokens from other chains supported via bridges
  • Native SCRT and sTokens (Sienna's privacy tokens) fully integrated

Technical Implementation

Smart Contract Architecture

Built on CosmWasm with our Fadroma framework, the protocol comprises:

  • Market Contracts: Individual lending markets for each supported asset
  • Controller: Coordinates cross-market operations and risk parameters
  • Oracle Integration: Band Protocol price feeds with privacy-preserving consumption
  • Token Contracts: sToken standard for private fungible tokens

Privacy Mechanisms

  • Viewing Keys: Users generate keys to access their own data
  • Address Hashing: On-chain references use hashed identifiers
  • Encrypted State: Position data stored encrypted, decrypted only within TEE

Development Timeline

PhaseDurationDeliverables
Research & Design6 weeksPrivacy architecture, economic model, security analysis
Core Protocol8 weeksLending/borrowing, interest rates, collateral management
Liquidation System4 weeksPrivacy-preserving liquidation mechanics
Oracle Integration2 weeksBand Protocol integration with privacy layer
Testing & Audit4 weeksComprehensive testing, security review
Launch2 weeksMainnet deployment, monitoring, documentation

Team: 5 developers specializing in Cosmos/CosmWasm and privacy technologies

Total Duration: 5 months from kickoff to mainnet

Results

Protocol Capabilities

FeatureImplementation
Supported AssetsMultiple tokens including SCRT, sTokens, IBC assets
Privacy LevelFull position privacy with optional disclosure
Interest ModelDynamic utilization-based rates
Liquidation ModelPrivacy-preserving with incentivized liquidators
Wallet SupportKeplr and Ledger integration

Technical Achievements

  • First Private Lending Protocol: Successfully launched the world's first lending protocol with default position privacy.
  • Novel Privacy Patterns: Developed reusable patterns for privacy-preserving DeFi that informed subsequent projects.
  • Production Stability: Protocol operated without security incidents through multiple market cycles.

Ecosystem Impact

The Sienna Lend implementation demonstrated that privacy and DeFi functionality aren't mutually exclusive. Key learnings have been incorporated into our Fadroma framework, enabling future privacy-preserving protocols to build on proven patterns.

Technologies Used

Secret Network CosmWasm Rust Cosmos SDK IBC Protocol Band Protocol Fadroma React TypeScript Keplr Ledger

Ready to ship your blockchain project?

From smart contracts to full-stack dApps, we turn your Web3 vision into reality. Let's talk about what you're building.

hello@hack.bg

By submitting, you agree to our privacy policy.