Skip to content

Commit

Permalink
docs: add erin edits to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
erin-koen authored and apbendi committed Feb 19, 2024
1 parent ab9af61 commit f714ca7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@

## What it does

This repository contains contracts which allow Uniswap Governance to enable and manage protocol fees on Uniswap V3. While DAO governance retains the right to set protocol fees on Uniswap v3 Pools, it cannot control the fee assets themselves. Instead, the revenue generate by the fees is trustlessly distributed to those UNI holders who choose to stake their tokens.
This repository contains contracts which allow Uniswap Governance to enable and manage protocol fees on Uniswap V3. If Uniswap Governance choose to upgrade to these contracts, it will retain the right to set protocol fees on Uniswap v3 Pools, it will not control the fee assets themselves. Instead, the revenue generated by the fees is trustlessly distributed to those UNI holders who choose to delegate and stake their tokens.

Rewards do no accumulate to stakers in the fee tokens. Rather, rewards accumulate in WETH. The fees accrued by each pool are continually auctioned to any entity who is willing to pay a fixed amount of WETH to the staking contract in exchange for the fee tokens accrued by a given pool.
Rewards do no accumulate to stakers in the fee tokens. Rather, rewards accumulate in a token defined during the deployment of the contracts in this repo. The fees accrued by each pool are continually auctioned to any entity who is willing to pay a fixed amount of that token to the staking contract in exchange for the fee tokens accrued by a given pool.

UNI holders who stake their tokens retain the right to delegate their governance voting weight, either to themselves, or to another entity who can vote on their behalf.
UNI holders who stake their tokens are required to delegate their governance voting weight, either to themselves, or to another entity who can vote on their behalf.

Stakers earn a share of rewards proportional to their share of the total UNI staked. Stakers only earn rewards while their tokens are deposited. When a staker deposits, they begin earning rewards being distributed. When a staker withdraws, they stop earning rewards.

Stakers may designate the address which is the beneficiary of their staking powers. This means stakers can earn rewards on behalf of an address different from the one that deposits the UNI tokens. The address which performs the deposit retains the right to withdraw or update the staking position.
Stakers may designate an address which is the beneficiary of their staking rewards. This means stakers can earn rewards on behalf of an address different from the one that deposits the UNI tokens. The address which performs the deposit retains the right to withdraw or update the staking position.

Each deposit is tracked on a per-position basis. Stakers may add to or withdraw UNI from a given deposit balance, or may alter the governance delegation and reward beneficiary associated with that deposit. A given address can have any number of deposit positions which are each tracked and managed independently.

To take effect, this system must be approved by vote of the Uniswap DAO Governance system. Once transferred to these contracts, ownership of the Uniswap V3 Factory cannot be revoked. While Governance may continue to adjust fee levels and rewards parameters, it irrevocably relinquishes the ability to claim the fees earned for itself. These would forever be distributed to UNI stakers.
To take effect, this system must be approved by a Uniswap Governance vote. Once transferred to these contracts, ownership of the Uniswap V3 Factory cannot be revoked. While Governance may continue to adjust fee levels and rewards parameters, it irrevocably relinquishes the ability to claim the fees earned for itself. These would forever be distributed to UNI stakers.

The staking system allows for other contracts to be added as revenue sources for staking reward distribution in the future.

Expand All @@ -42,11 +42,11 @@ When a third party claims the fees by paying for them in WETH, the WETH is sent

### `UniStaker`

The mechanics of the [`UniStaker`](src/UniStaker.sol) contract are heavily inspired by the Synthetix [`StakingRewards.sol`](https://github.com/Synthetixio/synthetix/blob/develop/contracts/StakingRewards.sol) implementation. It manages the distribution of rewards to stakers by dripping those rewards out over a fixed period of time. Rewards distribution restarts if more are distributed. In this case, reward distribution comes from the `V3FactoryOwner`. This Synthetix style staking mechanism has been highly discussed in the DeFi ecosystem and should reviewed by any part seeking to understand the mechanics of UniStaker.
The mechanics of the [`UniStaker`](src/UniStaker.sol) contract are heavily inspired by the Synthetix [`StakingRewards.sol`](https://github.com/Synthetixio/synthetix/blob/develop/contracts/StakingRewards.sol) implementation. It manages the distribution of rewards to stakers by dripping those rewards out over a fixed period of time. This period restarts if more rewards are distributed (e.g. by the pulic fee claiming mechanism on `V3FactoryOwner` detailed above). This Synthetix style staking mechanism has been highly discussed in the DeFi ecosystem and should reviewed by any part seeking to understand the mechanics of UniStaker.

The UniStaker contract diverges from `StakingRewards.sol` in several ways:

First, UniStaker enfranchises depositors by allowing them to retain their UNI governance rights. It does this by depositing staked tokens to an instance of [`DelegationSurrogate`](src/DelegationSurrogate.sol), a dummy contract whose sole purpose is delegate voting weight to a designated entity.
First, UniStaker enfranchises depositors by allowing them to retain their UNI governance rights. It does this by depositing staked tokens to an instance of [`DelegationSurrogate`](src/DelegationSurrogate.sol), a dummy contract whose sole purpose is delegate voting weight to a designated entity. UniStaker requires stakers to delegate to themselves or another address. They cannot delegate to the zero address.

Second, UniStaker allows depositors to designate the beneficiary of their staking rewards. Effectively, any given deposit can earn rewards on behalf of any designated address.

Expand Down Expand Up @@ -102,4 +102,4 @@ This command will use the names of the contract's unit tests to generate a human

The code in this repository is licensed under the [GNU Affero General Public License](LICENSE) unless otherwise indicated.

Copyright (C) 2024 The Uniswap Foundation
Copyright (C) 2024 The Uniswap Foundation

0 comments on commit f714ca7

Please sign in to comment.