Debt DAO Docs

Creating a Secured Line of Credit

The sequence of events
A Borrower and a Lender agree on some fundamental aspects of their agreement:
Fundamental parameters of the Line of Credit
  • The expiry date of the Line of Credit. It remains fixed for all Lenders.
  • The terms of the first credit line (interest rates, the Credit Token and the amount)
  • An Arbiter (a neutral 3rd party trusted by both parties)
The terms 'Secured Line of Credit', 'Line of Credit' or sometimes simply 'Line' are interchangeable here and all refer to an overall lending facility.
Within a single Line, a Borrower can draw down on any number of credit positions made available by Lenders at any interest rate and denominated in any token.
Revenue-Based Lending
During the deployment of a Line of Credit, a Spigot can be attached to a smart contract of the Borrower that is generating on-chain revenue (Revenue Contract) so that it will provide security for the loan.
A Spigot is deployed once per Line of Credit and can attach to multiple Revenue Contracts of a Borrower.
The Borrower and the first Lender must agree:
  • The address of the Borrower’s Revenue Contract that will secure the loan
  • The initial default split between the Borrower and Lenders of Revenue Tokens (i.e. tokens from the Revenue Contract)
  • The trading router which will convert the Borrower’s Revenue Tokens into the Credit Tokens it will actually borrow and later repay (Debt DAO has already arranged this but the parties must agree anyway)
  • The whitelisted functions that the Borrower is allowed to perform on the Revenue Contracts whilst the Spigot is attached so that the Borrower can carry on business as usual
  • The contract address of the Spigot Owner which will escrow tokens for Lenders to withdraw to repay debt
  • The contract address of the Spigot Operator, an address through which the Borrower can still conduct business as usual on the Revenue Contract within the constraints of the whitelisted functions. This is also the address through which the Borrower receives all remaining Revenue Tokens not escrowed in the Spigot for the benefit of Lenders.
If collateral is to be posted, the Borrower and the Lender must agree:
  • The collateral token(s), which must furthermore be whitelisted ('enabled') by the Arbiter to protect against malicious ERC4626 tokens and DoS attacks
  • The minimum collateral ratio to be maintained, if any. By default this is 30% but it can be agreed upon otherwise by the parties at the outset (and then remains fixed).
Deploying the Line of Credit
The Line of Credit is deployed according to the agreed terms.
The Spigot is automatically deployed and a check is undertaken to verify that any collateral escrow is pointed towards the correct address for the Line that its securing.
The Lender can test that the Line can claim Revenue Tokens. If all is good, Revenue Tokens should be claimed from the Borrower’s Revenue Contract into the Spigot escrow.
The Line is now ready to receive deposits from Lenders and, if required, collateral from Borrowers.