Copra aims to create the first ‘corporate bond’ market in DeFi where
LiquidityWarehouse
contract by calling the relevant functions.
depositBorrower
to deposit assets and withdrawBorrower
to withdraw assetsdepositLender
to deposit assets and withdrawLender
to withdraw assets.DebtCovenant
monitors the net asset values of both the borrower and lender deposits. This contract can call deactivate
to deactivate the LiquidityWarehouse
if the liquidation threshold has been breached as well as activate
to reactivate the LiquidityWarehouse
if the liquidation threshold is fulfilled. A full description on how the liquidation threshold is calculated is outlined here.LiquidityWarehouse
are periodically deployed to the borrower’s smart contracts in exchange for shares on the borrower’s protocol. These assets are withdrawn to the LiquidityWarehouse
in two cases namely
withdrawLender
and there is insufficient liquidity in the LiquidityWarehouse
deactivate
is called to automatically withdraw all deployed assets from the borrower’s smart contracts.There are two privileged roles
PAUSER_ROLE
: this will be owned by a 2 out of 3 multisig contract, and has the ability to pause (and unpause) the Liquidity Warehouse contract
depositLender
and depositBorrower
cannot be calledDEFAULT_ADMIN_ROLE
: The DEFAULT_ADMIN
will be able to update the terms of the LiquidityWarehouse
and interact with the underlying borrower protocol to deploy and withdraw assets. This introduces a degree of centralization risk as a malicious DEFAULT_ADMIN
will be able to steal user funds. In order to mitigate this risk, all LiquidityWarehouses
will be owned by a Timelock contract so that there is a delay period before sensitive transactions are executed. A Gnosis Multisig requiring 2 out of 3 signer addresses will be granted the PROPOSER
, EXECUTOR
and CANCELLER
roles on the Timelock contract so that the the multisig can propose, execute or cancel operations.