The Passthrough contract is designed to facilitate reward token distribution on L2 networks acting as an intermediary for depositing reward tokens to authorized gauge contracts.
This contract serves as a secure passthrough mechanism that allows authorized distributors and guards to deposit reward tokens to designated gauge contracts.
- Role-Based Access Control
- Guards: Can manage distributors and other guards
- Distributors: Can deposit reward tokens, Guards are also distributors
- Non-removable Guards: Special guard addresses that cannot be removed (OWNERSHIP_ADMIN and PARAMETER_ADMIN)
- OWNERSHIP_ADMIN and PARAMETER_ADMIN are set to the curve agent
add_guard
: Add new guard addressesremove_guard
: Remove existing guards (except non-removable ones)add_distributor
: Add new distributor addressesremove_distributor
: Remove existing distributorsset_single_reward_receiver
: Set the default gauge for reward deposits
- Guards cannot remove themselves
- Core admin addresses are set as non-removable guards
- Role-based access control for all administrative functions
- Deploy the contract with initial reward receivers (currently not used, set to []), guards, and distributors
- Guards can manage the system by adding/removing other guards and distributors
- Set a single reward receiver (gauge) for simplified deposits
- Authorized distributors or guards can deposit reward tokens either to:
- The pre-configured single receiver
- Any specified gauge address
The contract emits events for all significant actions:
PassthroughDeployed
SetSingleRewardReceiver
AddGuard
RemoveGuard
AddDistributor
RemoveDistributor
SentRewardToken
SentRewardTokenWithReceiver
- Maximum of 10 guards
- Maximum of 10 distributors
- Maximum of 10 reward receivers in the initial array (currently not used)
- Reward receivers must be compatible gauge contracts