bancorprotocol / carbon-contracts

Carbon is a fully decentralized protocol for automating on-chain trading strategies.
https://carbondefi.xyz
Other
105 stars 38 forks source link

Replace internal `struct Uint512` with a pair of `uint256` variables #79

Closed barakman closed 1 year ago

barakman commented 1 year ago

This struct is used only internally in library MathEx (i.e., it is not exposed to other libraries or contracts like in V3).

Replacing it with a pair of uint256 variables saves approximately 500 gas per order per trade.

barakman commented 1 year ago

Handled in PR #80.