Giter VIP home page Giter VIP logo

Comments (3)

cvalkan avatar cvalkan commented on August 12, 2024

Alternative solution 2: restrict withdrawGainsFromSPtoCDP to large positions with >$1000 worth of ETH as collateral. Also restrict liquidateCDPs to sequences of CDPs that do not have stability deposits, i.e. revert if any CDP along the way is linked to an SP. CDPs with stability deposits can thus only be liquidated individually via liquidate().

Rationale:

  • We'd also probably expect borrowers close to the MCR to be less likely to be stability pool users (except in black swan events). So liquidateCDPs should still be useful.
  • The main motivation behind withdrawGainsFromSPtoCDP is to make stability deposits more attractive and to eventually increase the amount of deposits. Given the expected wealth distribution in crypto, the stability pool will likely be dominated by whales anyway, so barring out small CDPs might not change the overall deposited amount too much.

from dev.

RickGriff avatar RickGriff commented on August 12, 2024

Liquidations no longer require a hint - I'll mark this issue closed.

Instead of calling withdrawFromSPtoCDP and applying the Borrower's ETH gain earned by his stability deposit, liquidations now use a new function, getNewICRFromPendingSPGain, to check what the ICR would be if the Borrower's pending ETH gain was applied.

If the CDP would be left active, the liquidation halts - otherwise, it proceeds.

With this approach no reinsertion is required (and nor a hint). It also gives a significant gas saving.

from dev.

RickGriff avatar RickGriff commented on August 12, 2024

Liquidations are now completely decoupled from SP gains. Liquidation of a trove is conditional only on the raw ICR of the trove.

Borrowers can still voluntarily call withdrawFromSPtoCDP, and withdraw their ETH gain to their trove.

from dev.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.