Coder Social home page Coder Social logo

farmpot-investment-protocol's Introduction

FarmPot-Investment-protocol

PharaohFarmPoTFull PharaohFarmPoTFull is a smart contract that allows users to make deposits and earn rewards through a referral system. It is implemented in Solidity and includes features such as depositing, withdrawing, claiming rewards, and referral rewards.

Getting Started To get started with PharaohFarmPoTFull, follow the steps below:

Prerequisites Make sure you have an Ethereum wallet to interact with the contract. You will need the address of the CAFToken contract (0xf8e81D47203A594245E36C48e151709F0C19fBe8). Deployment Deploy the PharaohFarmPoTFull contract on the Ethereum network. Set the MIN_DEPOSIT_AMOUNT constant to specify the minimum deposit amount required. Set the startTime variable to the current timestamp. Contract Details The PharaohFarmPoTFull contract includes the following features:

Deposit Function: deposit(uint256 amount, address referAddress)

Allows users to make a deposit by specifying the deposit amount and referral address. Validates the deposit amount against the minimum deposit amount. Transfers the specified amount of CAFToken from the user to the contract. Calculates the final deposit amount after deducting the deposit tax. Sets the maximum payout based on the final deposit amount. Tracks the user's deposit, referral rewards, total referrals, and other relevant information. Emits the DepositMade and Referred events. Claim Rewards Function: claimRewards()

Allows users to claim their available rewards. Calculates the available rewards based on the user's deposit, referral rewards, and previous double-up rewards. Calculates the withdrawal tax based on the user's initial deposit percentage. Updates the user's claimed rewards and previous double-up rewards. Emits the ClaimedAdjusted event. Referral Rewards Function: refer(address referAddress, uint256 amount)

Handles the referral rewards distribution. Distributes referral rewards to the referrer based on the referral level. Updates the referrer's total referrals and referral rewards. Emits the ReferralRewarded and Referred events. Other Functions The contract also includes various getter functions to retrieve information such as the user's maximum payout, available rewards, withdrawal tax, and more.

Events The PharaohFarmPoTFull contract emits the following events:

DepositMade: Indicates that a deposit has been made by a user. Referred: Indicates that a user has been referred by another user. ClaimedAdjusted: Indicates the amount of rewards claimed by a user. WithdrawAdjusted: Indicates the amount of rewards withdrawn by a user. ReferralRewarded: Indicates the referral rewards given to a user. Disclaimer Please note that this README provides a general overview of the PharaohFarmPoTFull contract. It is essential to review the contract's implementation and conduct thorough testing before using it in a production environment.# FarmPot-Investment-protocol

farmpot-investment-protocol's People

Contributors

bhanufromblockcoder avatar

Watchers

Bhanu Pratap Rana(Blockcoders) avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.