Add PermissionedDomain to LoanBroker#484
Open
Tapanito wants to merge 5 commits into
Open
Conversation
ximinez
requested changes
Feb 26, 2026
ximinez
approved these changes
Mar 6, 2026
Collaborator
ximinez
left a comment
There was a problem hiding this comment.
All my concerns have been addressed.
a1q123456
reviewed
Mar 10, 2026
| 2. The submitter `AccountRoot.Account != LoanBroker(LoanBrokerID).Owner`. (`tecNO_PERMISSION`) | ||
| 3. The transaction `VaultID` does not match `LoanBroker(LoanBrokerID).VaultID`. (`tecNO_PERMISSION`) | ||
| 4. `DebtMaximum` is being reduced to a non-zero value below the current `DebtTotal`. (`tecLIMIT_EXCEEDED`) | ||
| 5. `DomainID` is provided, is non-zero and `LoanBroker.lsfLoanBrokerPrivate` flag is not set. (`tecNO_PERMISSION`) |
There was a problem hiding this comment.
do we allow the case where LoanBroker.lsfLoanBrokerPrivate flag is not set, and domainID is provided as zero?
Collaborator
Author
There was a problem hiding this comment.
Good question! I think if LoanBroker.lsfLoanBrokerPrivate flag is not set, and DomainID is provided in any form, the TX should fail with tecNO_PERMISSION. What do you think?
13 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
Introduces access control for the Lending Protocol via Permissioned Domains. A LoanBroker can be configured as private at creation time, restricting loan issuance to Borrowers with valid credentials.
Changes:
DomainIDfield andlsfLoanBrokerPrivateflag to theLoanBrokerledger entrytfLoanBrokerPrivatetransaction flag toLoanBrokerSetLoanSetLoanPay, Borrowers can always repayContext of Change
Type of Change