Closed grandizzy closed 1 year ago
I am uncomfortable with:
* Half the parameters of `addQuoteToken` used for stale TX/frontrunning mitigation. It is not good DX. * Interface changes this late in the development cycle.
If we are more concerned about frontrunning than stale TXes, we could just replace
expiry_
withrevertIfBelowLup_
.
I don't think one exclude the other (stale tx vs frontrunning) but happy to get rid of expiry_
and stick with revertIfBelowLup_
@ith-harvey @mattcushman wdyt?
I am uncomfortable with:
* Half the parameters of `addQuoteToken` used for stale TX/frontrunning mitigation. It is not good DX. * Interface changes this late in the development cycle.
If we are more concerned about frontrunning than stale TXes, we could just replace
expiry_
withrevertIfBelowLup_
.I don't think one exclude the other (stale tx vs frontrunning) but happy to get rid of
expiry_
and stick withrevertIfBelowLup_
@ith-harvey @mattcushman wdyt?
If the concern is about interface changes, I think we just keep expiry_
and say to lenders that they need to accept the risk that they get hit with the penalty.
I don't see the sheer number of parameters being a big deal, I do think that this provides real functionality, but it's something we can live without as well. My vote would be 60/40 to include but not strongly.
My vote is to keep both expiry
and revertIfBelowLup_
if the interface change is not that big of an issue. The expiry
was added in this PR here https://github.com/ajna-finance/contracts/pull/600. As per this PR the expiry
is required to decrease the probability of deposits at sub-optimal price. But expiry
doesn't always prevent from deposit penalty and hence revertIfBelowLup_
is also needed.
I'm Switzerland on this one... Don't care either way.
I believe the question we are debating is:
Does the value of the front run protection outweigh the downstream work and possible timeline extension of altering the interface at this stage in the project?
I'm unaware of the later implications... Maybe @EdNoepel can share with us what he thinks those are in standup?
Description of change
High level
revertIfBelowLup
param added toPool.addQuoteToken
functiontrue
then the tx will revert if price of the bucket to which the quote tokens will be added is belowLUP
price (hence avoid paying fee for deposit belowLUP
).false
deposit belowLUP
will go through and deposit fee paidContract size
Pre Change
Post Change
Gas usage
Pre Change
Post Change