Skip to content

Security Switches

Michael Elliot edited this page Mar 19, 2021 · 4 revisions

Local Switches

Functions pausable via whenNotPaused (OpenZeppelin Pausable.sol):

LoanFactory

  • createLoan
Pausable by: Governor (MapleGlobals.governor) or Security Admins (LoanFactory.admins)
Security Admins managed by: Governor (MapleGlobals.governor)

PoolFactory

  • createPool
Pausable by: Governor (MapleGlobals.governor) or Security Admins (PoolFactory.admins)
Security Admins managed by: Governor (MapleGlobals.governor)

Loan

  • fundLoan
Pausable by: Borrower (Loan.borrower) or Security Admins (Loan.admins)
Security Admins managed by: Borrower (Loan.borrower)

StakeLocker

  • stake
Pausable by: Pool Delegate (Pool.poolDelegate) or Security Admins (Pool.admins)
Security Admins managed by: Pool Delegate (Pool.poolDelegate)

Pausable by limiting liquidityCap via setLiquidityCap(0):

Pool

  • deposit
Pausable by: Pool Delegate (Pool.poolDelegate) or Security Admins (Pool.admins)
Security Admins managed by: Pool Delegate (Pool.poolDelegate)

Global Switches

Functions affected by the protocol-wide MapleGlobals.protocolPaused switch:

Pausable:

  • LoanFactory

    • createLoan
  • Loan

    • fundLoan
    • unwind
    • drawdown
    • triggerDefault
    • makePayment
    • makeFullPayment
    • withdrawFunds
    • setAdmin
  • PoolFactory

    • createPool
  • Pool

    • transfer
    • setLiquidityCap
    • deposit
    • withdraw
    • claim
    • withdrawFunds
    • finalize
    • fundLoan
    • deactivate
    • setPenaltyDelay
    • setPrincipalPenalty
    • setLockupPeriod
    • openPoolToPublic
    • setAllowList
    • setAllowlistStakeLocker
    • triggerDefault
    • setAdmin
  • StakeLocker

    • transfer
    • stake
    • unstake
    • withdrawFunds
Pausable by: Emergency Admin (MapleGlobals.admin)
Emergency Admin managed by: Governor (MapleGlobals.governor)