Giter Site home page Giter Site logo

Comments (5)

jeffywu avatar jeffywu commented on September 1, 2024

Fix in e9fdc88

from contracts-v2.

T-Woodward avatar T-Woodward commented on September 1, 2024

This is a misleading comment:

// in the discount factors from risk adjusted versus liquidation. A liquidator may purchase at 1000 fCash
// at a discount factor of 0.90 but the risk adjusted discount factor is 0.95. fCashBenefit in this case
// is 0.05 * 1000 = 50

The liquidation discount factor will be closer to 1 than the risk adjusted discount factor. In this scenario, the liquidator should purchase at a discount of .95 with a risk adjusted discount factor of .9.

from contracts-v2.

T-Woodward avatar T-Woodward commented on September 1, 2024

The left side of this inequality should not be fCashLiquidationPV:

if (fCashLiquidationPV > c.factors.collateralAvailable.add(fCashBenefit)) {

It should be fCashCollateralPV where:

fCashCollateralPV = fCashToLiquidate * riskAdjustedDiscountFactor

from contracts-v2.

jeffywu avatar jeffywu commented on September 1, 2024

@T-Woodward is this correct then?

        int256 localToPurchase;
        (fCashToLiquidate, localToPurchase) = LiquidationHelpers.calculateLocalToPurchase(
            c.factors,
            c.liquidationDiscount,
            fCashLiquidationPV,
            fCashToLiquidate
        );

We should be using fCashLiquidationPV in that call?

from contracts-v2.

jeffywu avatar jeffywu commented on September 1, 2024

@T-Woodward please review and confirm: 118b899

from contracts-v2.

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.