Hi, just wondering about the order of fee collection in case of a revert / not enough fund case scenario:
- xCheque(...) fn transfer the fee before transfering the amount to the dst contract
- xChai(...) fn transfer the fee after transfering the amount to the dst contract
Does it technically matters at some point?
+ exitChai() questions
- The fn collect the fee in chai, why not collecting in dai ? My guess is that It would introduce a SafeMath.sol and it's a burden you want to avoid ?
- The fn use
dai.balanceOf(address(this)) to avoid computing the amount passed in dai but is it safe ? Why not calling chai.dai(sender) beforehand and use chai.draw() instead ?
Hi, just wondering about the order of fee collection in case of a revert / not enough fund case scenario:
Does it technically matters at some point?
+ exitChai() questions
dai.balanceOf(address(this))to avoid computing theamountpassed in dai but is it safe ? Why not callingchai.dai(sender)beforehand and usechai.draw()instead ?