-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
additional tests for v1 hook as well as some cleanup/fixes
- Loading branch information
1 parent
3f3ec62
commit 832c0a7
Showing
6 changed files
with
198 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
sequenceDiagram | ||
title Starport Origination Sequence Diagram | ||
participant F as Fulfiller | ||
participant L as Lender | ||
participant B as Borrower | ||
|
||
|
||
F->>LoanManager: originate | ||
|
||
opt F is not Borrower | ||
loop 1->n | ||
LoanManager->>CaveatEnforcer: validate | ||
end | ||
end | ||
opt F is not Lender | ||
loop 1->n | ||
LoanManager->>CaveatEnforcer: validate | ||
end | ||
end | ||
loop Transfer 1->n collateral items | ||
B->>Custodian: Move Collateral to Custodian | ||
end | ||
opt Custodian is not default | ||
LoanManager->>Custodian: custody (optional) | ||
end | ||
|
||
alt Fees Disabled | ||
loop Transfer 1->n debt items | ||
L->>B: Move debt to borrower | ||
end | ||
else Fees Enabled | ||
LoanManager->>LoanManager: compute feeRake | ||
opt FeeItems length > 0 | ||
loop Transfer 1->n fee items | ||
L->>FeeRecipient: Move Fee to FeeRecipient | ||
end | ||
end | ||
loop Transfer 1->n debt items | ||
L->>B: Move debt to Borrower | ||
end | ||
end | ||
|
||
opt AdditionalTransferItems length > 0 | ||
loop 1->n | ||
alt From is Borrower | ||
B->>AdditionalTransferRecipient: AdditionalTransferItem from Borrower => AdditionalTransferRecipient | ||
else From is Lender | ||
L->>AdditionalTransferRecipient: AdditionalTransferItem from Lender => AdditionalTransferRecipient | ||
else From is F | ||
F->>AdditionalTransferRecipient: AdditionalTransferItem from Fulfiller => AdditionalTransferRecipient | ||
end | ||
end | ||
end | ||
|
||
opt Lender is contract | ||
LoanManager->>L: onERC721Received | ||
end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters