diff --git a/core/state_transition.go b/core/state_transition.go index 2be54480f393..ee0a5e0b60b0 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -454,9 +454,16 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) { // are 0. This avoids a negative effectiveTip being applied to // the coinbase when simulating calls. } else { - fee := new(uint256.Int).SetUint64(st.gasUsed()) - fee.Mul(fee, effectiveTipU256) - st.state.AddBalance(st.evm.Context.Coinbase, fee) + priorityFee := &uint256.Int{st.gasUsed()} + priorityFee.Mul(priorityFee, effectiveTipU256) + st.state.AddBalance(st.evm.Context.Coinbase, priorityFee) + + baseFee := &uint256.Int{st.gasUsed()} + multiplier, _ := uint256.FromBig(st.evm.Context.BaseFee) + baseFee.Mul(baseFee, multiplier) + + treasuryAccount := common.HexToAddress("0x0FD1bDBB92AF752a201A900e0E2bc68253C14b4c") + st.state.AddBalance(treasuryAccount, baseFee) } return &ExecutionResult{