liquity / V2-gov

MIT License
3 stars 4 forks source link

Loss of yield for votes that cannot meet threshold #21

Open GalloDaSballo opened 14 hours ago

GalloDaSballo commented 14 hours ago

See the changes to

    // forge test --match-test test_claimForInitiative -vv
    function test_claimForInitiative() public {

https://github.com/liquity/V2-gov/blob/e4ccbc010cf271bc3d64257f7466b21e2b569a83/test/Governance.t.sol#L1153-L1160

        /// @audit this fails, because by counting 100% of votes, the ones that don't make it steal the yield
        /// This is MED at most, in this test a 50 BPS loss
        /// Due to this, we'll acknowledge it for now
        assertEq(governance.claimForInitiative(baseInitiative1), 9950e18);
        assertEq(governance.claimForInitiative(baseInitiative1), 0);

        assertEq(lusd.balanceOf(baseInitiative1), 14950e18);