-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
67e3177
commit 8ac5598
Showing
6 changed files
with
49 additions
and
34 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
sequenceDiagram | ||
title Starport Settlement Sequence Diagram | ||
Box green | ||
participant F as Fulfiller | ||
|
||
participant Seaport | ||
end | ||
Box rgb(112, 100, 0) | ||
participant Custodian | ||
participant Status | ||
participant Pricing | ||
participant Settlement | ||
participant Starport | ||
participant Authorized | ||
end | ||
F->>Seaport: fulfillAdvancedOrder/matchAdvancedOrder | ||
Seaport->>Custodian: generateOrder | ||
Custodian->>Status: isActive | ||
Status->>Custodian: (true/false) | ||
alt Action is Repayment and Status is Active | ||
Custodian->>Custodian: _beforeApprovalsSetHook | ||
Custodian->>Custodian: _setOfferApprovalsWithSeaport | ||
Custodian->>Pricing: getPaymentConsideration | ||
Pricing->>Custodian: (SpentItem[] payment, SpentItem[] carry) | ||
Custodian->>Starport: settle loan | ||
Custodian->>Settlement: postRepayment | ||
else Action Settlement and Custodian->>Status: isActive is false | ||
Custodian->>Custodian: _beforeGetSettlement | ||
Custodian->>SettlementHandler: getSettlement | ||
SettlementHandler->>Custodian: (ReceivedItem[] consideration, address authorized) | ||
Custodian->>Custodian: _afterGetSettlement | ||
Custodian->>Settlement: getSettlement | ||
Settlement->>Custodian: (ReceivedItem[] consideration, address authorized) | ||
alt authorized is address(0) || authorized is Fulfiller | ||
Custodian->>Custodian: _beforeApprovalsSetHook | ||
Custodian->>Custodian: _setOfferApprovalsWithSeaport | ||
else authorized is loan handler || authorized is loan issuer | ||
Custodian->>Custodian: _moveCollateralToAuthorized | ||
Custodian->>Custodian: _beforeSettlementHandlerHook | ||
alt authorized is loan handler | ||
Custodian->>SettlementHandler: execute | ||
Custodian->>Custodian: _afterSettlementHandlerHook | ||
end | ||
Custodian->>Authorized: transfer 1->n collateral | ||
end | ||
Custodian->>Starport: settle loan | ||
opt Lender is contract | ||
Starport->>Lender: onLoanSettledHook | ||
end | ||
Custodian->>Settlement: postSettlement | ||
|
||
end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.