BreadchainCoop / breadchain

0 stars 1 forks source link

Fix: Refactor yield distribution to single transfer instead of double #8

Closed RonTuretzky closed 3 months ago

RonTuretzky commented 3 months ago

Imo, an improved design would be returning the amount to distribute from the _distributeBaseYield and _distributedVotedYield functions and doing a single transfer with their sum. Reduces gas costs and improves readability by allowing these two functions to be changed to "view" to ensure no secret state changes. @bagelface

bagelface commented 3 months ago

Adding tests deferred to ticket https://github.com/BreadchainCoop/breadchain/issues/21