This RewardManager allows to use deposit_reward_token() only on a preset of gauges provided on contract creation.
The manager can decide on the time and on the size of the reward, but has no access to funds anytime.
If set, a RecoveryGauge can be used to send back funds to a RecoveryAddress
graph TD
subgraph Deployment
A1[Deployer]
A2[RewardManager]
A3[RecoveryGauge]
A1 -->|deploys| A2
A1 -->|deploys| A3
end
subgraph RewardManager Deploy
A2 -->|sets| B1[Managers: Manager0, Manager1, Manager3]
A2 -->|sets| B2[RewardToken: ARB]
A2 -->|sets| B3[Gauges: RecoveryGauge, Gauge0, Gauge1, Gauge2, Gauge3]
end
subgraph RecoveryGauge Deploy
A3 -->|sets| C1[RecoveryAddress]
end
subgraph Interaction RewardManager & RecoveryGauge
D1[Manager]
D2[RewardManager]
D1 -->|"deposit_reward_token(gauge, amount)"| D2
D2 -->|"forwards ARB from Manager" | E1[RecoveryGauge]
D2 -->|"forwards ARB from Manager" | R1[Gauge0/1/2]
D1 -->|"deposit_reward_token_from_contract(gauge, amount)"| D2
D2 -->| sends ARB from RewardManager| E1
D2 -->| sends ARB from RewardManager| R1
R1 -->| ARB used as reward| Z1[staked lp]
F1[Anyone]
F1 -->|"recover()"| E1
E1 -->|sends ARB to| G1[RecoveryAddress]
end
Based on https://github.com/curvefi/curve-dao-contracts/blob/master/contracts/streamers/RewardStream.vy
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install eth-ape'[recommended-plugins]'
ape plugins install arbitrum
ape test