celo-proposals
celo-proposals copied to clipboard
CIP 43 - Block Context - Discussion
trafficstars
Discussion for CIP-43: Block Context
I think we can (and should) add the results of the Tobin tax check (i.e. taxRatio and recipient) to the block context, as I don't see a reason why we would need to have taxRatio and recipient reflect changes within a single block.
The actual tobin tax calculation (applying the ratio to the transfer amount) would have to be done per-transaction, but that is just a multiplication, not a contract call.
Code reference of what I think should be folded into the block context: https://github.com/celo-org/celo-blockchain/blob/0458ca354800c132686c3737b879320bd96f05d0/contracts/reserve/tobin_tax.go#L27-L53