### Quick proposal on phase 1 rewards
1. Remove the `BASE_REWARDS_PER_EPOCH` denominator from `get_base_reward`, so reward/penalty calculations would have to explicitly take a fraction of the base reward.
```
def get_base_reward(state: BeaconState, index: ValidatorIndex, denominator: uint64) -> Gwei:
total_balance = get_total_active_balance(state)
effective_balance = state.validators[index].effective_balance
return Gwei(effective_balance * BASE_REWARD_FACTOR // integer_squareroot(total_balance))
```
2. Remove `get_proposer_reward`
3. Remove source rewards (the justification being the if an attestation does not have a valid source it cannot be included at all regardless, so we may as well just say that the source reward is just your ability to try to get all the other rewards)
4. Modify the `get_standard_flag_deltas` function to take as input another argument `denominator`. Assign the following denominators (listed as `1/n` for ease of reading/adding; obviously the actual denominator would be `n`):
| Flag | Denominator |
| - | - |
| `FLAG_TARGET` | `1/4` |
| `FLAG_HEAD` | `1/8` |
| `FLAG_VERY_TIMELY` | `1/16` |
| `FLAG_TIMELY` | `1/8` |
| `FLAG_CROSSLINK` | `1/4` |
Additionally, we only set `FLAG_HEAD` in attestations that are very timely, preserving a high reward for very-timeliness.
Note that 3/16 of a base reward remains. We use this for (1/16) beacon proposer rewards, (1/16) shard proposer rewards and (1/16) miscellaneous micro rewards.
The beacon proposer rewards would be done by modifying existing code, specifically the lines:
```python
if not flags[active_position][FLAG_SOURCE]:
increase_balance(state, get_beacon_proposer_index(state), get_proposer_reward(state, participant))
for flag in flags_to_set:
flags[active_position][flag] = True
```
Would be changed to:
```python
for flag in flags_to_set:
if not flags[active_position][flag]:
increase_balance(state, get_beacon_proposer_index(state), get_base_reward(state, participant) // 16)
flags[active_position][flag] = True
```
The shard proposer rewards would be done by changing the code here:
```python
proposer_index = get_shard_proposer_index(state, slot, shard)
proposer_reward = (
get_base_reward(state, proposer_index)
* len(get_online_validator_indices(state))
// get_active_shard_count(state)
)
increase_balance(state, proposer_index, proposer_reward)
```
To:
```python
proposer_index = get_shard_proposer_index(state, slot, shard)
online_participants = get_online_transition_participants(state, candidate)
proposer_reward = (
sum([get_base_reward(state, index) for index in online_participants])
// get_active_shard_count(state)
)
increase_balance(state, proposer_index, proposer_reward)
```
Micro rewards TBD.
5. Adjust fixed penalties in the inactivity leak so that the total sum of rewards for a perfectly functioning validator is zero.