Skip to content

Echidna testing and flat fee introduction - #312

Merged
alcueca merged 13 commits into
masterfrom
new/echidna
Sep 5, 2020
Merged

Echidna testing and flat fee introduction#312
alcueca merged 13 commits into
masterfrom
new/echidna

Conversation

@alcueca

@alcueca alcueca commented Sep 2, 2020

Copy link
Copy Markdown
Contributor

After echidna testing on trade and trade reversals, a precision of 64 bits for iterative arithmetic and a flat fee of 10**12 wei Dai on trades were imposed.

@alcueca
alcueca requested review from aniemerg and gakonst September 2, 2020 10:34
Comment thread contracts/echidna/YieldMathEchidna.sol Outdated
Comment thread contracts/echidna/YieldMathEchidna.sol Outdated
Comment thread contracts/echidna/YieldMathEchidna.sol Outdated
Comment thread contracts/echidna/YieldMathEchidna.sol
Comment thread contracts/echidna/YieldMathEchidna.sol
Comment thread contracts/mocks/YieldMath64.sol
Comment thread contracts/mocks/YieldMath64.sol
Comment thread contracts/pool/YieldMath.sol Outdated
Comment thread test/echidna/601_liquidity_invariant.ts Outdated
Comment thread test/pool/206_yield_math.ts

@gakonst gakonst left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - 2 minor comments, thanks for this. Super useful.

Comment thread contracts/echidna/YieldMathEchidna.sol Outdated
assert(daiOut <= daiIn);
}

function testLiquidityDaiOutForYDaiIn(uint128 daiReserves, uint128 yDAIReserves, uint128 yDaiIn, uint128 timeTillMaturity)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, even with the fee the invariant doesn't always grow?

Comment thread contracts/echidna/YieldMathEchidna.sol Outdated
@alcueca
alcueca requested a review from danrobinson September 3, 2020 14:03
Comment thread contracts/echidna/YieldMathEchidna.sol Outdated
Comment thread contracts/echidna/YieldMathEchidna.sol Outdated
@alcueca
alcueca merged commit 439fa64 into master Sep 5, 2020
@gakonst
gakonst deleted the new/echidna branch September 23, 2020 11:23
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

Successfully merging this pull request may close these issues.

4 participants