PieDAO
Search…
Staking
Guide to interacting with the staking smart contracts

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 deployed contract addresses.
1
function depositByMonths(uint256 amount, uint256 months, address receiver) external;
Copied!

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 deployed contract addresses.
1
function withdraw(uint256 lockId) external;
Copied!

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 deployed contract addresses
1
function distributeRewards(uint256 amount) external;
Copied!

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:
1
function redistribute(address[] calldata accounts, bytes32[][] calldata proofs)
Copied!

ACTIVE

An address which gets labeled as such has been active in governance and is able to claim its accrued rewards:
1
function claim(bytes32[] calldata proof) external;
Copied!
Its also possible to claim rewards for another address:
1
function claimFor(address account, bytes32[] memory proof) public;
Copied!

UNSPECIFIED

Not included in the merkle tree. Rewards cannot be claimed but also not redistributed
Last modified 13d ago