bancorprotocol / contracts-solidity

Bancor Protocol Contracts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optimize transfers

k06a opened this issue · comments

Let's optimize a number of transfers avoiding transfer tokens to BancorNetwork contract. This will optimize gas at least twice.

Maybe BancorNetwork should use transferFrom(msg.sender, converter, amount) to transfer tokens directly to converter...

It might be possible to optimize the number of transfers but one thing to keep in mind is that when tokens are transferred to the converter, they actually affect the price - so need to be careful not to transfer tokens to a converter at the wrong time.

@yudilevi this is an important note 👍