PieDAO
  • 👋 Welcome
  • PieDAO
  • Products
    • Pies
      • Overview
      • Pricing Pies
      • Fee Structure
      • PIEs
        • PieVaults
          • PLAY
          • DEFI++
        • Smart Pools
          • BCP
        • Legacy
          • DEFI+L
          • DEFI+S
          • USD++
          • YPIE
          • BTC++
    • Oven
  • Governance
    • DOUGH
    • Governance Mining
      • KPI Options
    • Pie Improvement Proposals
    • Snapshot
    • Aragon DAO
    • Initiatives
  • Dev Docs
    • Audits
    • Oven V2
    • Pies (PieVaults)
    • Pies (Smart Pools)
    • Experinator
    • Staking
    • Deployed Smart Contracts
    • Updating a Smart Pool Implementation
    • Tools
    • Multisigs
  • Communication
    • Newsletter
    • Community Calls
    • Calendar
    • Special Events
    • Emergency Release
    • Roadmap
    • Reports
  • Management
    • Issue management Portal
    • Daily Stand-Ups
    • DAO Member vs Freelancer
Powered by GitBook
On this page
  • Deposit
  • Withdraw
  • Distribute rewards
  • Participation
Export as PDF
  1. Dev Docs

Staking

Guide to interacting with the staking smart contracts

PreviousExperinatorNextDeployed Smart Contracts

Last updated 3 years ago

Deposit

Only EOAs and whitelisted addresses can call the function depositByMonths function on the SharesTimeLock contract. A sufficient approval and balance for the depositToken specified in the contract is needed. The amount locked and the time for the lock needs to be greater or equal to minLockAmount and minLockDuration . The deposit can revert if emergencyUnlockTriggered is true. For the SharesTimeLock address refer to the .

function depositByMonths(uint256 amount, uint256 months, address receiver) external;

Withdraw

Any address is able to call the withdraw function on the SharesTimeLock contract. The function needs an existing lockId as input argument. For the SharesTimeLock address refer to the .

function withdraw(uint256 lockId) external;

Distribute rewards

Any address is able to call the distributeRewards function on the dToken (veDOUGH) contract. A sufficient approval and balance for the token specified in the dToken contract is needed.

For the veDOUGH address please refer to the

function distributeRewards(uint256 amount) external;

Participation

Participation is tracked in the participation merkle tree. There are three states an address can be in

  • INACTIVE - included in the merkle tree as 0

  • ACTIVE - included in the merkle tree as 1

  • UNSPECIFIED - not included in the merkle tree, default state

INACTIVE

An address which gets labeled as such can have its reward redistributed by other participants. This can be done by any other address and other stakers are incentivised to do so to increase their own rewards. This can be done in batches using the following smart contract call:

function redistribute(address[] calldata accounts, bytes32[][] calldata proofs) 

ACTIVE

An address which gets labeled as such has been active in governance and is able to claim its accrued rewards:

function claim(bytes32[] calldata proof) external;

Its also possible to claim rewards for another address:

function claimFor(address account, bytes32[] memory proof) public;

UNSPECIFIED

Not included in the merkle tree. Rewards cannot be claimed but also not redistributed

deployed contract addresses
deployed contract addresses
deployed contract addresses