Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 3.41 KB

README.md

File metadata and controls

71 lines (48 loc) · 3.41 KB

Arken.fi

Premissionless auto compounder factory to let anyone deploy their own auto compounder without any difficulty on top of any ERC20.

Motivation

This project offers a user-friendly solution for deploying personalized auto compounding tools on various yield-bearing assets. The primary focus is to cater to DeFi protocols looking to benefit from auto compounding without the high costs of extensive development and research.

To achieve this, the protocol can easily deploy their own strategy using a simple Solidity interface, consisting of four functions that we provide. Then, they can use our protocol to create a customized vault following the ERC4626 standard, which enhances compatibility with other DeFi protocols.

The last step to enable the auto compounder is to fund the operator by sending native tokens to it.

Once the vault is set up, it becomes accessible to all users through our interface, allowing them to conveniently deposit and withdraw funds. In the background, we handle the process of harvesting rewards and compounding them at regular intervals, as determined by the admin's preferences.

Architecture

The project has three main components:

How to use

image

Deploying a strategy

To deploy a strategy, you need to implement the following interface:

interface IStrategy {
    function beforeWithdraw(uint256 assets, uint256 shares) external;
    function afterDeposit(uint256 assets, uint256 shares) external;
    function harvest() external;
    function compound() external;
    function totalAssets() external view returns (uint256);
}

The beforeWithdraw and afterDeposit functions are called before and after a user withdraws or deposits funds, respectively. The harvest function is called when the operator harvests the rewards. The compound function is called when the operator compounds the rewards. The totalAssets function returns the total amount of assets held by the strategy.

Deploy a vault

You can now use the frontend to deploy a vault. You need to provide the following information:

  • The strategy address
  • The name of the vault
  • The symbol of the vault
  • The asset inside the vault
  • The operator address givent to you by the operator server
  • The admin address
  • The harvest fee
  • The fee recipient address

Addresses

Here are the addresses for the deployed contracts:

Factory