makerdao / mkr-mcd-spec

High level KSpecification for the MCD System by Runtime Verification and Maker Foundation
GNU General Public License v3.0
28 stars 9 forks source link

Meeting Notes #22

Open ehildenb opened 4 years ago

ehildenb commented 4 years ago

Unfortunately we didn't take meeting notes from the beginning, but hopefully this helps the project owners on the MKR side report progress.

ehildenb commented 4 years ago

Tuesday September 03, 2019

Done

Discussion

ToDo

ehildenb commented 4 years ago

Tuesday September 10, 2019

Done

Discussion

ToDo

ehildenb commented 4 years ago

Thursday September 12, 2019

Discussion

ehildenb commented 4 years ago

Tuesday September 17, 2019

Done

Discussion

ToDo

ehildenb commented 4 years ago

Thursday September 19, 2019

Discussion

ehildenb commented 4 years ago

Tuesday September 24, 2019

Might Be Done

Done

Discussion

ehildenb commented 4 years ago

Thursday September 26, 2019

Discussion

ehildenb commented 4 years ago

Tuesday October 1, 2019

Done

Discussion

ehildenb commented 4 years ago

Thursday October 03, 2019

Discussion

ehildenb commented 4 years ago

Tuesday October 08, 2019

Done

Discussion

ehildenb commented 4 years ago

Thursday October 10, 2019

Discussion

ehildenb commented 4 years ago

Tuesday October 22, 2019

Meetings interrupted by DevCon, should be back on track.

Done

Discussion

ehildenb commented 4 years ago

Thursday October 24, 2019

Discussion

ehildenb commented 4 years ago

Tuesday October 29, 2019

Done

Discussion

ehildenb commented 4 years ago

Thursday October 31, 2019

Discussion

ehildenb commented 4 years ago

Tuesday November 05, 2019

Might Be Done

Discussion

Pot . drip Jug . drip Vat . frob -> Pot . join -> (delayed as much as possible, but not past the next Jug . drip) Pot . drip -> Pot . exit -> Vat . frob Jug . drip

It's important that the Vat . frob happens on either side so that the dai used to make the attack is not charged the stability fee.

ehildenb commented 4 years ago

Thursday November 7, 2019

ehildenb commented 4 years ago

Tuesday November 12, 2019

Might Be Done

Done

Discussion

ehildenb commented 4 years ago

Tuesday November 19, 2019

Done

In Progress

Discussion

ehildenb commented 4 years ago

Tuesday November 26, 2019

Might be done

Done

Discussion

Potential Properties

ehildenb commented 4 years ago

Tuesday December 03, 2019

Done

Might be done

Pair Programming Agenda

Potential Properties

From the chat:

Chris Smith10:05 AM https://github.com/runtimeverification/mkr-mcd-spec Gonzalo Balabasquer10:37 AM flux doesn't change ink Andy Chorlian10:41 AM Still trying to make sure I get how this works but could something along the lines of this work? Dai joined to the pot can never exit for less than the amount joined? Chris Smith10:42 AM i like that one @andy Kurt Barry10:42 AM ^I think you could actually set the dsr < 1 Andy Chorlian10:43 AM it is a uint how would that work? Chris Smith10:43 AM you could, but eventually the drip is going to hit a negative here: https://github.com/makerdao/dss/blob/master/src/pot.sol#L143 if you set dsr to more than 0 but less than 1 you get a "negative" DSR Andy Chorlian10:44 AM oh I am dumb Chris Smith10:44 AM and would decrease the Pie per user until you ran out of Chi and then drips would fail Gonzalo Balabasquer10:47 AM not sure if I followed the last part, you never can have dsr set lower to 1 otherwise drip will always fail Chris Smith10:48 AM @gonza, if we let DSR run for a bit, we build up some Chi, then we could set it to less than 1 and decrease the chi for a set period of time, right? Gonzalo Balabasquer10:48 AM nope this "uint chi_ = sub(tmp, chi);" will always fail if dsr is set lower to 1 "tmp = rmul(rpow(dsr, now - rho, ONE), chi);" is always lower than chi if dsr is lower than 1 Chris Smith10:49 AM because tmp would immediately be larger than chi? or yeah i meant smaller Gonzalo Balabasquer10:50 AM right Chris Smith10:51 AM ahh ok, so going back to andy's original suggestion, Dai joined to the pot can never exit for less than the amount joined? Gonzalo Balabasquer10:54 AM I'd phrase it as the amount of DAI taken when joining X amount of pie has to be same or lower than the one returned when exiting X amount of pie. Kurt Barry10:56 AM That should work then. Aside: that is a rather tricky way to enforce dsr > 1... Of course, our code is full of all sorts of important things that are only subtly enforced in safe math checks. Chris Smith10:58 AM 4pm ET: https://meet.google.com/weu-axjy-baz

ehildenb commented 4 years ago

Tuesday December 10, 2019

ehildenb commented 4 years ago

Tuesday December 17, 2019

ehildenb commented 4 years ago

Tuesday January 13, 2019

ehildenb commented 4 years ago

Tuesday January 21, 2019

ehildenb commented 4 years ago

Tuesday January 28, 2019

ehildenb commented 4 years ago

Tuesday February 3, 2020

ehildenb commented 4 years ago

Friday February 07, 2020

ehildenb commented 4 years ago

Tuesday February 11, 2020

ehildenb commented 4 years ago

Monday March 30, 2020

ehildenb commented 4 years ago

Monday April 06, 2020

ehildenb commented 4 years ago

Tuesday April 14, 2020

ehildenb commented 4 years ago

Monday April 20, 2020

ehildenb commented 4 years ago

Tuesday April 28, 2020

ehildenb commented 4 years ago

Monday May 4, 2020

ehildenb commented 4 years ago

Monday May 11, 2020

ehildenb commented 4 years ago

Tuesday May 19, 2020

ehildenb commented 4 years ago

Tuesday May 26, 2020

pragma solidity ^0.5.12;

import "./MkrMcdSpecSolTests.t.sol";

contract TestExample is MkrMcdSpecSolTestsTest {

    function test0() public {

        // Test Run

        admin.vat_rely(address(goldJoin));
        admin.spotter_setPrice("gold", 3000000000000000000000000000);
        admin.spotter_file("mat", "gold", 1000000000000000000000000000);
        admin.spotter_file("par", 1000000000000000000000000000);
        admin.goldFlip_rely(address(end));
        admin.vat_file("line", "gold", 1000000000000000000000000000000000000000000000000000000000);
        admin.Gem_gold_mint(address(alice), 20000000000000000000);
        admin.Gem_gold_mint(address(bobby), 20000000000000000000);
        alice.vat_hope(address(pot));
        alice.vat_hope(address(goldFlip));
        alice.vat_hope(address(end));
        alice.vat_hope(address(flop));
        bobby.vat_hope(address(pot));
        bobby.vat_hope(address(goldFlip));
        bobby.vat_hope(address(end));
        bobby.vat_hope(address(flop));
        alice.goldJoin_join(address(alice), 10000000000000000000);
        bobby.goldJoin_join(address(bobby), 10000000000000000000);
        alice.vat_move(address(alice), address(alice), 0);
        admin.pot_file("dsr", 1000000000000000000000000000);
        hevm.warp(1);
        bobby.vat_hope(address(alice));
        hevm.warp(2);
        hevm.warp(1);

        // Assertions

        assertTrue( vat.can(address(bobby), address(pot)) != 0 );
        assertTrue( vat.can(address(bobby), address(flop)) != 0 );
        assertTrue( vat.can(address(bobby), address(alice)) != 0 );
        assertTrue( vat.can(address(bobby), address(goldFlip)) != 0 );
        assertTrue( vat.can(address(bobby), address(end)) != 0 );
        assertTrue( vat.can(address(alice), address(pot)) != 0 );
        assertTrue( vat.can(address(alice), address(flop)) != 0 );
        assertTrue( vat.can(address(alice), address(goldFlip)) != 0 );
        assertTrue( vat.can(address(alice), address(end)) != 0 );

    }

    function test1() public {

        // Test Run

        admin.vat_rely(address(goldJoin));
        admin.spotter_setPrice("gold", 3000000000000000000000000000);
        admin.spotter_file("mat", "gold", 1000000000000000000000000000);
        admin.spotter_file("par", 1000000000000000000000000000);
        admin.goldFlip_rely(address(end));
        admin.vat_file("line", "gold", 1000000000000000000000000000000000000000000000000000000000);
        admin.Gem_gold_mint(address(alice), 20000000000000000000);
        admin.Gem_gold_mint(address(bobby), 20000000000000000000);
        alice.vat_hope(address(pot));
        alice.vat_hope(address(goldFlip));
        alice.vat_hope(address(end));
        alice.vat_hope(address(flop));
        bobby.vat_hope(address(pot));
        bobby.vat_hope(address(goldFlip));
        bobby.vat_hope(address(end));
        bobby.vat_hope(address(flop));
        alice.goldJoin_join(address(alice), 10000000000000000000);
        bobby.goldJoin_join(address(bobby), 10000000000000000000);
        bobby.vat_move(address(bobby), address(alice), 0);
        alice.goldJoin_join(address(alice), 4000000000000000000);
        bobby.vat_hope(address(alice));
        admin.pot_file("dsr", 1000000000000000000000000000);
        hevm.warp(2);
        hevm.warp(2);
        hevm.warp(2);

        // Assertions

        // UNIMPLEMENTED << assertTrue( Gems.cell() == GemCellMapItem( <gem-id>
        //  "gold"
        //</gem-id> , <gem>
        //  <gem-id>
        //    "gold"
        //  </gem-id>
        //  <gem-wards>
        //    .Set
        //  </gem-wards>
        //  <gem-balances>
        //    "bobby" |-> FInt( 10000000000000000000 , 1000000000000000000 )
        //    GemJoin "gold" |-> FInt( 24000000000000000000 , 1000000000000000000 )
        //    "alice" |-> FInt( 6000000000000000000 , 1000000000000000000 )
        //  </gem-balances>
        //</gem> ) ); >>
        assertTrue( vat.can(address(bobby), address(pot)) != 0 );
        assertTrue( vat.can(address(bobby), address(flop)) != 0 );
        assertTrue( vat.can(address(bobby), address(alice)) != 0 );
        assertTrue( vat.can(address(bobby), address(goldFlip)) != 0 );
        assertTrue( vat.can(address(bobby), address(end)) != 0 );
        assertTrue( vat.can(address(alice), address(pot)) != 0 );
        assertTrue( vat.can(address(alice), address(flop)) != 0 );
        assertTrue( vat.can(address(alice), address(goldFlip)) != 0 );
        assertTrue( vat.can(address(alice), address(end)) != 0 );
        assertTrue( vat.gem("gold", address(end)) == 0 );
        assertTrue( vat.gem("gold", address(alice)) == 14000000000000000000 );
        assertTrue( vat.gem("gold", address(goldFlip)) == 0 );
        assertTrue( vat.gem("gold", address(bobby)) == 10000000000000000000 );

    }
}
ehildenb commented 4 years ago

Wednesday June 03, 2020

ehildenb commented 4 years ago

Wednesday June 10, 2020

Slow week (updates to KEVM needed to be pushed through downstream projects).

ehildenb commented 4 years ago

Wednesday June 17, 2020

https://github.com/makerdao/k-dss/issues/17

ehildenb commented 4 years ago

Wednesday July 01, 2020

ehildenb commented 3 years ago

Wednesday July 08, 2020

ehildenb commented 3 years ago

Wednesday July 15, 2020

Discussion


module MY-MODULE
    imports oenuthe
    ....
endmodule

module VERIFICATION
    imports MY-MODULE
endmodule

module MY-SPEC
   imports VERIFICATION
endmodule
ehildenb commented 3 years ago

Wednesday July 29, 2020

Something to target model at: Once there is more info on new liquidations, maybe we can target test generation with them. Likely a month or so out.

Otherwise focus on CI specs (ordered roughly by priority):

Let's pick out one such proof to start with:

ehildenb commented 3 years ago

Wednesday August 19, 2020

Steps to go from

make spec
make proofs
# klab get-gas SPEC_NAME/HASH (retrieve gas expressions from rough specs)
# klab solve-gas SPEC_NAME/HASH (build gas expressions, this step may not be needed or used actually)
# klab build (sees that there are accepted rough specs with gas expressions, builds the pass proof with exact gas expressions)
# klab prove PASS_SPEC
# klab build (sees that there are accepted pass specs for _lemmas_ of big proofs, so generate spec for big proofs)
# klab prove BIG_SPEC
ehildenb commented 3 years ago

Wednesday August 27, 2020

Done

In Progress

ehildenb commented 3 years ago

Wednesday September 2, 2020

ehildenb commented 3 years ago

Wednesday September 16, 2020

ehildenb commented 3 years ago

Wednesday September 23, 2020