Rakeoff Docs
Launch dApp
  • welcome
    • About Rakeoff
    • Frequently Asked Questions
    • New to ICP?
  • Rakeoff
    • Tutorials and Guides
      • Staking on Rakeoff
      • The no-loss prize pool
    • For Developers
    • Similar Platforms
    • Brand Material
  • Join the community
    • X
    • Discord
    • Medium
    • GitHub
    • OpenChat
Powered by GitBook
On this page
  • 1. RakeoffKernel smart contract
  • 2. RakeoffAchievements smart contract
  • 3. RakeoffStatistics smart contract
  • 4. RakeoffPayroll smart contract

Was this helpful?

  1. Rakeoff

For Developers

An overview of the dApp's technology

PreviousThe no-loss prize poolNextSimilar Platforms

Last updated 1 year ago

Was this helpful?

An architectural overview

The Rakeoff dApp uses ICP's blockchain technology to bring you features such as ICP staking and the no-loss prize pool. The backend of the Rakeoff dApp is powered by smart contracts. RakeoffKernel, RakeoffAchievements, RakeoffStatistics and RakeoffPayroll are the names of the smart contracts that we have developed for the dApp.

We also use Dfinity's tried and tested smart contracts for features such as:

  • ICP staking, which is implemented on the frontend and uses the Governance smart contract.

  • Our wallet integration, which is implemented in the RakeoffKernel and uses the ICP ledger.

1. RakeoffKernel smart contract

The RakeoffKernel smart contract is currently in beta and remains unaudited and closed source. This is to allow quick refinements, ensure added security, and to plan a detailed third-party audit after finalizing key features. We prioritize transparency and safety, and updates will be shared as we progress.

The Rakeoffkernel smart contract allows users to control an ICP wallet and participate in the prize pool. It utilises a specific function named generateRandomThreshold to determine the winners of the prize pool. This function utilises the Motoko Random.mo module, to select three winners (prizes: 70%, 20%, 10% of the total pool amount) arbitrarily using a weighted selection algorithm - this means the amount of ICP entered into the pool is taken into account when selecting the winners. You can rest assured that the selection is both fair and genuinely random, ensuring a level playing field for all participants.

2. RakeoffAchievements smart contract

The RakeoffAchievements smart contract is designed to reward users with a small ICP bonus which is added to their stake if they reach a predetermined achievement level. It functions by enabling users to submit their staked ICP identification number (neuron ID). The smart contract fetches data about the staked ICP and after performing some verifications on the data, the smart contract then disburses the ICP bonus.

3. RakeoffStatistics smart contract

4. RakeoffPayroll smart contract

The RakeoffPayroll smart contract tops up all the other Rakeoff smart contracts with cycles every week - cycles are the fuel that power smart contracts on the Internet Computer. It also processes the fees to pay the developers that are maintaining the dApp.

The RakeoffAchievements smart contract is open source. The code can be found here:

The RakeoffStatistics smart contract is open source. The code can be found here:

The RakeoffStatistics smart contract tracks important statistics about the Rakeoff dApp such as total stakers, total staked ICP, fees generated, etc. It also provides an API that makes it easy to access these statistics in various places such as and .

The RakeoffPayroll smart contract is open source. The code can be found here:

https://github.com/rakeoff-labs/rakeoff_achievements
https://github.com/rakeoff-labs/rakeoff_statistics
https://analytics.rakeoff.io/
https://defillama.com/protocol/rakeoff
https://github.com/rakeoff-labs/rakeoff_payroll
Snippet of "generating a random winner" code from the RakeoffKernel