Atlendis v2
  • πŸ‘‹Introduction
  • πŸ—žοΈWhitepaper
  • πŸ”“Safety & Audit
  • Protocol
    • 🎨What Sets Atlendis Apart
      • RCL Lending Pools
      • Rate Discovery
      • Non Fungible Positions
    • 🏦Atlendis Borrowers
    • πŸ›£οΈUse Cases
      • Invoice Financing
      • Ramps and Cash Advances
      • Revenue Based Financing
      • Trade Financing
      • Buy Now Pay Later
      • Emerging Market Credit
    • ⚠️Risk Management
  • User manual
    • πŸ§‘Lender
      • πŸ§™Lender Actions
      • ❓Lender FAQ
      • ⏩Tutorial
    • 🏒Borrower
      • πŸ€Έβ€β™‚οΈBorrower Actions
      • 🏦Borrower FAQ
      • πŸ”©Integration
  • Developers
    • πŸ€“Protocol Overview
    • πŸ‘©β€πŸ’»Core concepts
      • Order Book Implementation
      • Position accounting vs. Pool accounting
      • Interests accrual and position accounting granularity
    • πŸ’»Technical integration
      • Deployment procedures
      • Protocol gas consumption
      • Tokens integration considerations
    • πŸ“‘Smart contract interfaces
      • Revolving Credit Line
        • IRevolvingCreditLine
        • IRCLBorrowers
        • IRCLGovernance
        • IRCLLenders
        • IRCLState
      • Roles Manager
        • IRolesManager
        • IStandardRolesManager
      • Error messages
    • ↗️Deployed Contracts
    • πŸ“ˆAtlendis Gateway
  • Governance
    • πŸ§‘β€βš–οΈGovernance
    • πŸ‘›Multisig
  • glossary
    • πŸ§‘β€πŸ«Core concepts
    • πŸ“ŠFrontend Indicators
  • Legal
    • βš–οΈTerms of Use
    • βš–οΈLegal Notice
    • βš–οΈPrivacy Policy
Powered by GitBook
On this page
  1. Developers
  2. Smart contract interfaces

Error messages

// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.13;

/**
 * @title Errors library
 * @dev Defines the errors used in the Revolving credit line product
 */
library RevolvingCreditLineErrors {
    error RCL_ONLY_LENDER(); // "Operation restricted to lender only"
    error RCL_ONLY_BORROWER(); // "Operation restricted to borrower only"
    error RCL_ONLY_OPERATOR(); // "Operation restricted to operator only"

    error RCL_OUT_OF_BOUND_MIN_RATE(); // "Input rate is below min rate"
    error RCL_OUT_OF_BOUND_MAX_RATE(); // "Input rate is above max rate"
    error RCL_INVALID_RATE_SPACING(); // "Input rate is invalid with respect to rate spacing"
    error RCL_INVALID_PHASE(); // "Phase is invalid for this operation"
    error RCL_BORROW_AMOUNT_TOO_LOW(); // "Borrow amount is too low"
    error RCL_DEPOSIT_AMOUNT_TOO_LOW(); // "Deposit amount is too low"
    error RCL_NO_LIQUIDITY(); // "No liquidity available for the amount to borrow"
    error RCL_LOAN_RUNNING(); // "Loan has not reached maturity"
    error RCL_AMOUNT_EXCEEDS_MAX(); // "Amount exceeds maximum allowed"
    error RCL_NO_LOAN_RUNNING(); // No loan currently running
    error RCL_ONLY_OWNER(); // Has to be position owner
    error RCL_TIMELOCK(); // ActionNot possible within this block
    error RCL_CANNOT_EXIT(); // Cannot exit after maturity
    error RCL_POSITION_NOT_BORROWED(); // The positions is currently not under a borrow
    error RCL_POSITION_BORROWED(); // The positions is currently under a borrow
    error RCL_POSITION_NOT_FULLY_BORROWED(); // The position is currently not fully borrowed
    error RCL_POSITION_FULLY_BORROWED(); // The position is currently fully borrowed
    error RCL_HAS_OPTED_OUT(); // Position that already opted out cannot make the target action
    error RCL_REPAY_TOO_EARLY(); // Cannot repay before repayment period started
    error RCL_WRONG_INPUT(); // The specified input does not pass validation
    error RCL_REMAINING_AMOUNT_TOO_LOW(); // Withdraw or exit cannot result in the position being worth less than the minimum deposit
    error RCL_AMOUNT_TOO_HIGH(); // Cannot withdraw more than the position current value
    error RCL_AMOUNT_TOO_LOW(); // Cannot withdraw less that the minimum position deposit
    error RCL_MATURITY_PASSED(); // Cannot perform the target action after maturity
    error RCL_OPT_OUT_NOT_ACTIVE(); // Opt out is not active at the moment
    error RCL_DETACH_NOT_ACTIVE(); // Detach is not active at the moment
    error RCL_LOAN_IN_ROLLOVER_PERIOD(); // Loan is currently in rollover period, action not permitted

    error RCL_INVALID_FEES_CONTROLLER_MANAGED_POOL(); // "Managed pool of fees controller is not the instance one"
}
PreviousIStandardRolesManagerNextDeployed Contracts

Last updated 2 years ago

πŸ“‘