Skip to content

Commit

Permalink
mermaid fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wildmolasses committed Feb 21, 2024
1 parent 87a3fe3 commit 21cb917
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,29 @@ The system consists of two core contracts which are designed to be deployed into

```mermaid
flowchart TD
A[Uniswap Governance] -->|
A[Uniswap Governance] -->|"
Can set fees on specific pools
fa:fa-ban Can not collect fees
fa:fa-ban Can not transfer ownership
| A1[V3FactoryOwner]:::new
Can not collect fees
Can not transfer ownership
"| A1[V3FactoryOwner]:::new
A1 --> B["`Uniswap V3 Factory`"]
B --> C[(Pool 1)]
B --> D[(Pool 2)]
B --> E[...]
style E fill:transparent,stroke:transparent,stroke-width:4px
classDef new stroke:#F7F,padding:10px,stroke-width:3px,line-height:3.5,font-weight:bold
B --> F[(Pool N)]
B ..-> |<div style="padding:1px;background-color:rgba&lpar;244, 220, 244, 0.9&rpar;;">Collect fees on fee-enabled pools via <div style="font-family:monospace;background-color:#FE">V3FactoryOwner.claimFees</div>|A1
A1 ..-> |<div style="padding:1px;background-color:rgba&lpar;244, 220, 244, 0.9&rpar;;">Rewards immediately deposited into UniStaker|GG[UniStaker]:::new
G((UNI holders)) --> |
<div style="padding:1px;background-color:rgba&lpar;244, 220, 244, 0.9&rpar;;">Delegate and stake UNI to
B ..-> |"<div style="color:#333;padding:1px;background-color:rgba(244, 220, 244, 0.9);color:#555;">Collect fees on fee-enabled pools via <div style="font-family:monospace;">V3FactoryOwner.claimFees</div></div>"|A1
A1 ..-> |"<div style="padding:1px;background-color:rgba(244, 220, 244, 0.9);color:#555;">Rewards immediately deposited into UniStaker</div>"|GG[UniStaker]:::new
G((UNI holders)) --> |"
<div style="padding:1px;background-color:rgba(244, 220, 244, 0.9);color:#555;">Delegate and stake UNI to
earn rewards from fee-enabled pools
</div>
|GG
"|GG
G ---> |Vote on governance proposals|A
M((MEV searcher)) <..-> | <div style="padding:1px;background-color:rgba&lpar;244, 220, 244, 0.9&rpar;;">Collect fees by sending WETH
to be used as rewards|A1
M((MEV searcher)) <..-> |"<div style="padding:1px;background-color:rgba(244, 220, 244, 0.9);color:#555;">Collect fees by sending WETH
to be used as rewards</div>"|A1
```

### `V3FactoryOwner`
Expand All @@ -72,18 +72,20 @@ The mechanics of the [`UniStaker`](src/UniStaker.sol) contract are heavily inspi

```mermaid
flowchart LR
A[UniStaker] --> |Hold deposit tokens and
delegate on behalf of depositor|SurrogateFork
SurrogateFork --> |Yes|Surrogate[Surrogate contract for delegate
&lpar;Holds stake deposits, delegates to delegate address&rpar;]
SurrogateFork --> |No, deploy new surrogate|Surrogate
A1((UNI holder)) --> |Stake UNI
Withdraw UNI|A
A .-> |Earns rewards|B((Beneficiary
&lpar;original holder or
other address&rpar;))
SurrogateFork{{Was a surrogate contract previously
deployed for this delegate?}}
A[UniStaker] --> |"Hold deposit tokens and
delegate on behalf of depositor"|SurrogateFork
SurrogateFork --> |Yes|Surrogate["Surrogate contract for delegate
(Holds stake deposits, delegates
to delegate address)"]
SurrogateFork --> |"No, deploy new surrogate"|Surrogate
A1((UNI holder)) --> |"Stake UNI
Withdraw UNI"|A
A .-> |Earns rewards|B(("Beneficiary
(original holder or
other address)"))
SurrogateFork{{"Was a surrogate contract previously
deployed for this delegate?"}}
```

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

0 comments on commit 21cb917

Please sign in to comment.