Case Study: Sienna Lend – Private Decentralized Lending Protocol

Cover Image for Case Study: Sienna Lend – Private Decentralized Lending Protocol


HackBG‘s expertise in full-stack blockchain application development was put into action to build the world’s first private lending protocol – Sienna Lend. The project utilizes Secret Network’s blockchain privacy properties derived from the TEE technology underneath. Sienna Lend was built using CosmWasm contracts to achieve a private by default lending protocol. Sienna Lend utilizes a variable interest and over-collateralization model for borrowing.

Challenges & Development Process

  • Market contracts: This contract had to be developed to combine several functionalities while keeping the initial requirement of preserving user’s privacy. Functionalities include deposits, redeeming, borrows, loan repayments, and liquidator functionalities.
  • Oracle integration: For a lending protocol to run properly we had to implement an oracle consumer contract to ensure constant and timely assets price updates. We did integrate Band Protocol’s oracle solution for this project.
  • Liquidations: Liquidations are in the roots of a healthy lending market, so as part of developing the lending protocol we had to develop and provide software for liquidators to be able to run to ensure market stability. We did develop a lending liquidation bot which allows anyone to become a protocol market liquidator. The liquidators are incentivized with a small premium to liquidate borrow positions which fall out of their healthy threshold.
  • Interest model: Interest rates had to be taken into account and incorporated in a private manner in the projects architecture and contracts. The interest rates chosen for the project are dynamic and are calculated based on the utilization of a given market (how much of the supplied liquidity is available vs. borrowed) following Compound Protocol’s Jump Rate model.
  • Permissionless Access: Users can access the lending protocol without the need for intermediaries or approval. Anyone with a compatible wallet lend or borrow assets or become a liquidator to ensure the protocol’s stability.

Project details

  • Development Aspects: HackBG‘s role spanned across several domains including the development of smart contracts, Oracle integrations, monitoring architecture to keep track of utilization, Azure serverless backend components, and front-end implementation with React.
  • Integration: The project’s front-end integrates provides a modern minimal UI and UX and it integrates with Keplr and Ledger wallets.
  • Technological Stack: The project was built using a range of technologies such as Go, Prometheus, Grafana, Cosmos, Rust, CosmWasm, Fadroma, along with React, TypeScript, and JavaScript.
  • The project was developed by a team of five HackBG developers, specializing in full-stack blockchain development and Cosmos, over a five months period. This project is a testament for our efficiency and skill in blockchain development.

Unique Features

  • Privacy: The lending protocol utilizes private fungible tokens and Cosmos’ IBC (inter blockchain communication protocol) assets. Users can borrow and lend assets in a private manner.
    • The lending protocol leverages Secret Network’s privacy-preserving smart contracts.
    • To further enhance privacy Sienna Lend anonymizes users’ addresses by substituting them with an ID hash that is used in all public queries.

Technological Innovation and Impact

This project steps on our values at HackBG for preserving user privacy and leverages our expertise in building end-to-end blockchain solutions, smart contracts and decentralized applications.

Project Repository
Project Website

Have a project in mind?

We have the expertise! Drop us a line and lets talk!