Transfer-accept ownership pattern implemented in commit 52ccfde
Since the trade is with a counterparty, and there is no scope for the order amount to change since it's submitted by the taker, the order will either fail or succeed depending on the taker amount passed as a parameter. This can be calculated up front without needing to pass in a slippage tolerance or any bounds. In the case of a partial fill, the amount can also be calculated up front.
Rounding is done to favor the maker. For fees, rounding is done to favor the user.
Fixed in commit f9a4a47
safeApprove added in commit 0ea0ba8
Approval will only be called once, and it's going to be set to the max uint value, so no need to approve 0 first.
The receive
function is required for the fillOrderWithChainToken
method to work. Removing the receive
function will cause functionality to break and all fillOrderWithChainToken
tests to fail.
The signature verification would fail if the order maker was the zero address, so there's no need to add another check here.
Zero address checks were added to the constructor on commit c7d936c.
We don't plan to support inflationary tokens in the forseeable future, and tokens need to be added to a curated AssetsRegistry contract first so that options can be created for them. So as long as the protocol multisig and a possible future governance contract don't add inflationary tokens to the AssetsRegistry, the RollaOrderProtocol should be safe from those possible issues. Additionally, for the maker asset no inflationary tokens will be used.
We decided to leave floating pragmas for the interfaces. Version pragmas are locked in the implementation contracts.
Additional tests were written and run, and no gas savings was noticed when using immutable
for the typehashes over constant
. In fact, gas usage was lower when using constant
.
IController is just an interface. We don't have any upgradable proxy contracts in the rolla-order-protocol repo.
The relevant code already follows the checks-effects-interactions pattern, so there's no need for extra re-entrancy protection.
No change required.