Skip to content
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

Merged
merged 5 commits into from
Nov 23, 2023
Merged

Fix: Loans adjustments #1616

merged 5 commits into from
Nov 23, 2023

Conversation

lemunozm
Copy link
Contributor

@lemunozm lemunozm commented Nov 21, 2023

Description

A couple of minor tasks before the upgrading process

  • Update MaxFeedValues to 500
  • Borrow proxy type to include transfer_debt and token transfer capabilities

@lemunozm lemunozm added Q0-trivial An issure which is similar to patching code. I3-annoyance The code behaves as expected, but "expected" is an issue. D0-ready Pull request can be merged without special precaution and notification. P7-asap Issue should be addressed in the next days. labels Nov 21, 2023
@lemunozm lemunozm self-assigned this Nov 21, 2023
@mustermeiszer
Copy link
Collaborator

@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?

@lemunozm
Copy link
Contributor Author

Sure!

@mustermeiszer mustermeiszer enabled auto-merge (squash) November 23, 2023 13:43
Copy link
Collaborator

@mustermeiszer mustermeiszer left a 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 { .. }) |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing propose here

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense!

Copy link
Contributor

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.

@mustermeiszer mustermeiszer merged commit 0b104c0 into main Nov 23, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D0-ready Pull request can be merged without special precaution and notification. I3-annoyance The code behaves as expected, but "expected" is an issue. P7-asap Issue should be addressed in the next days. Q0-trivial An issure which is similar to patching code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants