-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Loans adjustments #1616
Fix: Loans adjustments #1616
Conversation
@lemunozm I will take of this in the restricted transfers PR as we also need to add transfer capcabilities to the borrower proxy, if this is fine for you? |
Sure! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are missing a propose in the NonTransfer
proxz type but otherwise fine.
@@ -490,6 +490,7 @@ impl InstanceFilter<RuntimeCall> for ProxyType { | |||
RuntimeCall::Loans(pallet_loans::Call::propose_write_off_policy{..}) | | |||
RuntimeCall::Loans(pallet_loans::Call::apply_write_off_policy{..}) | | |||
RuntimeCall::Loans(pallet_loans::Call::update_portfolio_valuation{..}) | | |||
RuntimeCall::Loans(pallet_loans::Call::apply_transfer_debt { .. }) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing propose here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not sure about how to interpret that. Could propose()
imply a transfer if later somebody apply it? Is transfer_debt()
taken into account as something that transfers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By definricion transfer debt does juts transfer internally, right? So it think it is fine.
If you think differently, then I would remove also the apply one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apply()
is permissionless, so anybody could call it, I understand it should be there then.
And transfer_debt
transfers logically the debt, but there are not any token/asset/balance transferred from one account to another. So it all depends of what we understand by NonTransfer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If transferring the debt locally counts as a transfer, then we should not add it
If it's not a transfer, we should add it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe @hieronx can help us here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
He is off. Let's go with adding it!
transferring is just concerned for the acting account to move their funds which will not be the case here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with @mustermeiszer, transferring debt is separate (and much less impactful from security perspective) from transferring stablecoins.
Description
A couple of minor tasks before the upgrading process
MaxFeedValues
to500
transfer_debt
and token transfer capabilities