Staking (Under Development)
What is Staking on MCAP?​
Staking on MCAP allows token holders to earn passive income by providing liquidity to gaming platforms. When you stake tokens, you become a liquidity provider and receive a share of the profits generated by the games on the platform.
How Staking Works​
The Staking Process​
- Deposit Tokens: You deposit supported ERC-20 tokens into the liquidity pool
- Receive Shares: You get LCS (Liquidity Cache Shares) tokens representing your ownership
- Earn Rewards: As games generate profits, the value of your shares increases
- Compound or Withdraw: You can leave rewards to compound or withdraw at any time
Share-Based System​
MCAP uses an ERC-4626 tokenized vault share system:
- Shares Represent Ownership: Your LCS tokens represent your portion of the total pool
- Value Appreciation: Share value increases as game profits are added to the pool
- No Lock-up Period: You can withdraw your stake at any time (subject to liquidity)
- Automatic Compounding: Rewards are automatically reinvested
Getting Started with Staking​
Prerequisites​
- Supported Wallet: MetaMask, WalletConnect, or other Web3 wallets
- Supported Tokens: Check available tokens through the MCAP API
- Network: Ensure you're on the correct blockchain network
- Gas Tokens: Have native tokens for blockchain transaction fees
Step-by-Step Staking Process​
1. Check Available Tokens​
First, verify which tokens are supported for staking:
// Using MCAP SDK
const availableTokens = await mcap.tokens.search({
// Add any filters if needed
});
2. Approve Token Spending​
Before staking, you need to approve the liquidity pool smart contract:
// Using ethers.js
const tokenContract = new ethers.Contract(tokenAddress, ERC20_ABI, signer);
const approvalTx = await tokenContract.approve(
liquidityPoolAddress,
ethers.utils.parseUnits(amount, tokenDecimals)
);
await approvalTx.wait();
3. Deposit Tokens (Stake)​
// Using ethers.js
const liquidityContract = new ethers.Contract(
liquidityPoolAddress,
LIQUIDITY_CACHE_ABI,
signer
);
const depositTx = await liquidityContract.deposit(
ethers.utils.parseUnits(amount, tokenDecimals),
userAddress // receiver of shares
);
await depositTx.wait();
4. Monitor Your Position​
Track your staking position and rewards:
// Get your share balance
const shareBalance = await liquidityContract.balanceOf(userAddress);
// Get current share value
const totalAssets = await liquidityContract.totalAssets();
const totalShares = await liquidityContract.totalSupply();
const shareValue = totalAssets.div(totalShares);
// Calculate your position value
const positionValue = shareBalance.mul(shareValue);
Understanding Rewards​
How Rewards are Generated​
Rewards come from gaming platform profits:
- Game Profits: When users lose bets, profits flow to the liquidity pool
- Platform Fees: A portion of platform fees may be distributed to stakers
- Yield Generation: Pool assets may be used for additional yield strategies
Reward Calculation​
Your rewards are calculated based on your share of the total pool:
Your Reward Share = (Your Shares / Total Shares) × Total Profits Added
Reward Distribution​
- Automatic: Rewards are automatically reflected in share value
- Real-time: Share value updates as profits are added
- Compounding: Rewards compound automatically unless withdrawn
Withdrawal Options​
Full Withdrawal (Redeem All Shares)​
// Withdraw all your shares
const allShares = await liquidityContract.balanceOf(userAddress);
const redeemTx = await liquidityContract.redeem(
allShares,
userAddress, // receiver of assets
userAddress // owner of shares
);
Partial Withdrawal (Specific Asset Amount)​
// Withdraw specific amount of underlying assets
const withdrawTx = await liquidityContract.withdraw(
ethers.utils.parseUnits(assetAmount, tokenDecimals),
userAddress, // receiver of assets
userAddress // owner of shares
);
Preview Withdrawals​
Before executing, you can preview how many assets you'll receive:
// Preview withdrawal
const assetsToReceive = await liquidityContract.previewRedeem(shareAmount);
const sharesToBurn = await liquidityContract.previewWithdraw(assetAmount);
Advanced Staking Strategies​
Dollar-Cost Averaging​
Instead of staking a large amount at once, consider regular smaller deposits:
// Example: Weekly staking automation
const weeklyStakeAmount = "100"; // 100 tokens per week
setInterval(async () => {
await stakeTokens(weeklyStakeAmount);
}, 7 * 24 * 60 * 60 * 1000); // Weekly
Yield Optimization​
Monitor pool performance and adjust your staking strategy:
- Track APY: Monitor the annual percentage yield
- Compare Pools: If multiple pools exist, compare their performance
- Timing: Consider market conditions when adding or removing stake
Risk Management​
- Diversification: Don't stake more than you can afford to lose
- Liquidity Management: Keep some assets liquid for opportunities
- Regular Monitoring: Check pool health and platform performance
Monitoring Your Staking Position​
Key Metrics to Track​
- Share Balance: Your LCS token balance
- Share Value: Current value per share
- Position Value: Total value of your staked position
- Unrealized Gains: Profit since your last deposit
- Pool Performance: Overall pool metrics
Using the MCAP Dashboard​
The MCAP dashboard provides real-time information about:
- Your current staking positions
- Historical performance
- Reward earnings over time
- Pool statistics and health metrics
APIs for Monitoring​
// Get current position value
const getCurrentPositionValue = async (userAddress) => {
const shares = await liquidityContract.balanceOf(userAddress);
const assets = await liquidityContract.convertToAssets(shares);
return assets;
};
// Calculate returns
const calculateReturns = async (userAddress, initialDeposit) => {
const currentValue = await getCurrentPositionValue(userAddress);
const returns = currentValue.sub(initialDeposit);
const returnPercentage = returns.mul(100).div(initialDeposit);
return { returns, returnPercentage };
};
Risk Considerations​
Smart Contract Risk​
- Audit Status: Verify the contract has been audited
- Admin Controls: Understand admin capabilities (pause, etc.)
- Upgrade Mechanism: Check if the contract is upgradeable
Platform Risk​
- Gaming Performance: Poor game performance affects rewards
- Regulatory Risk: Changes in regulations could impact operations
- Competition: New platforms could affect user adoption
Liquidity Risk​
- Withdrawal Availability: Large withdrawals might not be immediately available
- Pool Drain: Significant losses could reduce pool size
- Market Conditions: Token price volatility affects position value
Mitigation Strategies​
- Start Small: Begin with a small amount to understand the system
- Stay Informed: Monitor platform announcements and updates
- Diversify: Don't put all assets in a single pool
- Regular Review: Periodically reassess your staking strategy
Troubleshooting Common Issues​
Transaction Failures​
Problem: Deposit transaction fails Solutions:
- Check token approval amount
- Ensure sufficient gas fees for blockchain execution
- Verify contract is not paused
- Check network connectivity
Problem: Withdrawal fails Solutions:
- Verify sufficient liquidity in pool
- Check if contract is paused
- Ensure you own the shares you're trying to redeem
Share Value Discrepancies​
Problem: Share value seems incorrect Solutions:
- Wait for transaction confirmations
- Check for recent profit additions
- Verify you're looking at the correct pool
- Contact support if discrepancy persists
Best Practices​
Security​
- Verify Contracts: Always verify smart contract addresses
- Use Hardware Wallets: For large amounts, use hardware wallets
- Regular Backups: Keep wallet backups secure and up-to-date
Financial Management​
- Only Stake What You Can Afford: Never stake more than you can lose
- Regular Monitoring: Check your positions regularly
- Tax Considerations: Understand tax implications in your jurisdiction
Operational​
- Keep Records: Track all staking transactions
- Stay Updated: Follow platform announcements
- Plan Exits: Have a strategy for when to withdraw
Getting Help​
- Documentation: Review the technical reference
- Integration Guide: Check the integration guide for developers
- Support: Contact MCAP support for assistance
- Community: Join the MCAP community for discussions and tips
Next Steps​
- Explore the technical implementation
- Learn about integrating liquidity pools
- Review the complete overview