celo-proposals icon indicating copy to clipboard operation
celo-proposals copied to clipboard

CIP 43 - Block Context - Discussion

Open trianglesphere opened this issue 4 years ago • 1 comments
trafficstars

Discussion for CIP-43: Block Context

trianglesphere avatar Aug 12 '21 15:08 trianglesphere

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

oneeman avatar Aug 26 '21 16:08 oneeman