-
Notifications
You must be signed in to change notification settings - Fork 0
Rewards Process
sam bacha edited this page Jul 25, 2024
·
1 revision
sequenceDiagram
participant U as User
participant SC as Smart Contract (FoldCaptiveStaking.sol)
participant PM as Position Manager (INonfungiblePositionManager)
participant UP as Uniswap V3 Pool
participant DB as Database (User Info & Balances)
U->>SC: Request to claim rewards
SC->>DB: Retrieve user's stake details
DB-->>SC: User stake info (amount, rewardDebt)
SC->>UP: Calculate total pool rewards
UP-->>SC: Total rewards data
SC->>SC: Calculate pro rata share based on user stake
SC->>DB: Update user's reward debt
DB-->>SC: Confirm update
SC->>U: Transfer pro rata rewards to user