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

Can not payback loan when dToken pool is deactivated in v3.0 #1588

Open
kuegi opened this issue Nov 21, 2022 · 3 comments
Open

Can not payback loan when dToken pool is deactivated in v3.0 #1588

kuegi opened this issue Nov 21, 2022 · 3 comments

Comments

@kuegi
Copy link
Contributor

kuegi commented Nov 21, 2022

What happened:

trying to payback dTSLA loans on testnet right now fails with message PaybackLoanTx: Pool trading is turned off! (code 16)

What you expected to happen:

Payback must always work.

How to reproduce it (as minimally and precisely as possible):

  • have a loan on testnet with dTSLA
  • try to payback this loan
@defichain-bot
Copy link
Member

@kuegi: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details

I am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the DeFiCh/oss-governance-bot repository.

@prasannavl
Copy link
Member

prasannavl commented Nov 22, 2022

Thanks Kuegi. Will look into this.

@Jouzo
Copy link
Collaborator

Jouzo commented Nov 22, 2022

As the TSLA-DUSD poolpair is desactivated, the payback fails when interests are being burned. See the path taken here

res = SwapToDFIorDUSD(mnview, loanTokenId, subInterest, obj.from, consensus.burnAddress, height);

It does not handle a direct dToken burn but tries to swap it to DUSD or DFI.
This could be handled by burning dToken directly when its DUSD poolpair is desactivated.

It should be considered for a later release. Low priority as none of the mainnet dToken poolpairs are desactivated nor plan to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants