Sienna
  • Introduction
  • SiennaSwap
    • Rewards Contracts
    • How do the Rewards Work?
  • Wallets
  • Bridges
    • Available Bridges
    • Bridging SIENNA
    • Ethereum Bridge Guide
    • Binance Smart Chain Bridge Guide
    • Monero Bridge
  • Viewing Keys
    • How to Create Viewing Keys
    • How to Remove Viewing Keys
    • How to Import Existing Viewing Key
  • Contract Addresses
    • SiennaSwap LP Pools and Rewards Contracts
    • SiennaLend Markets and Rewards Contracts
  • IBC Wrapping
    • Supported Tokens
    • Links
    • How to Deposit/Withdraw IBC Tokens on SiennaSwap
    • How to Wrap/Unwrap IBC Tokens on SiennaSwap
  • SiennaLend
    • Overview
    • Rewards Contracts
    • Markets
    • Interest Model
    • Market Contract
    • Loan Repayment
    • Overseer Contract
    • Notes
    • SiennaLend User Guide
  • Audits
    • SIENNA
    • wSIENNA
    • Rewards V3
    • SiennaSwap V1
    • SiennaSwap V2
    • SiennaLend
    • SiennaLend updated code
  • Frequently Asked Questions
Powered by GitBook
On this page
  1. SiennaLend

Notes

PreviousOverseer ContractNextSiennaLend User Guide

Last updated 3 years ago

  • If you only provide liquidity to a lending market (and not borrow), there is no risk associated with depositing your sl-Tokens in the rewards pools.

  • If you have open borrow positions, ensure that there is enough collateral left behind to cover your loan positions when depositing a portion of your collateral in the rewards pools.

  • The SiennaLend contracts are written using a macro from fadroma, message names (in PascalCase) are derived from method names (snake_case).

  • In order for the contracts to be able to read the necessary private data internally we have used what is called a . It is a single viewing key shared throughout the protocol. The MasterKey is only known by the contract internally and cannot be queried or extracted.

  • Some information (such as loans up for liquidation) has to be shared in order for the protocol to work as intended. In order for this information to be visible without knowing whose address it is tied to we have introduced IDs throughout the protocol. These IDs are issued by the Market contract once for each user (at the first borrow. This way liquidators can view relevant information for a loan without knowing who the loan is tied to. An ID is a derived from an address + seed. Each market has its own private seed, issued during init, so a single user address will have a different ID in each market.

SiennaLend Mechanics Diagram

derive-contract
MasterKey
sha256 hash