Skip to content

Commit

Permalink
Renaming leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
markolazic01 committed Aug 9, 2024
1 parent aebeb6a commit 34b1ebc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/Design.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Uniswap V3 Staker
# Dragonswap V2 Staker

There is a canonical position staking contract, Staker.

Expand All @@ -25,7 +25,7 @@ struct Stake {
State:

```solidity
IUniswapV3Factory public immutable factory;
IDragonswapV2Factory public immutable factory;
INonfungiblePositionManager public immutable nonfungiblePositionManager;
/// @dev bytes32 refers to the return value of IncentiveId.compute
Expand Down Expand Up @@ -113,7 +113,7 @@ struct EndIncentiveParams {

**Check:**

- Make sure sender is univ3 nft
- Make sure sender is dsv2 nft

**Effects:**

Expand Down Expand Up @@ -176,7 +176,7 @@ To unstake an NFT, you call `unstakeToken`, which takes all the same arguments a
### `getRewardInfo`

- It computes `secondsInsideX128` (the total liquidity seconds for which rewards are owed) for a given Stake, by:
- using`snapshotCumulativesInside` from the Uniswap v3 core contract to get `secondsPerLiquidityInRangeX128`, and subtracting `secondsPerLiquidityInRangeInitialX128`.
- using`snapshotCumulativesInside` from the Dragonswap v2 core contract to get `secondsPerLiquidityInRangeX128`, and subtracting `secondsPerLiquidityInRangeInitialX128`.
- Multiplying that by `stake.liquidity` to get the total seconds accrued by the liquidity in that period
- Note that X128 means it's a `UQ32X128`.

Expand Down

0 comments on commit 34b1ebc

Please sign in to comment.