Sharpe Earn Architecture

Core Parts of Sharpe Earn

  1. Smart Account: The Smart Account (DSProxy) is both created and owned solely by the user, with all management responsibilities resting solely in the user's hands. This ensures that you maintain complete ownership of the contract at all times. By utilizing a Smart Account, it becomes possible to combine multiple transactions for decentralized finance (defi) operations into a single transaction. This is not achievable when relying solely on an Ethereum account, also known as an Externally Owned Account (EOA).

  2. Assembly: An Assembly is a set of Defi transactions that are grouped together and executed in one order. These transactions are designed to work together and can even share return values, which can then be used as inputs for subsequent transactions within the Assembly. Example: Let’s say the user want to create a leveraged WstETH position on AaveV3, then the user can make an assembly of all the transaction that is required to create this position in one transaction. Below is a list of Defi transactions required to be executed in sequence to create leveraged WstETH position on AaveV3 in one transaction (consider 3x leverage):

    Transaction No.

    Defi transaction


    Flash borrow 2x WETH from Aave v3


    Wrap x ETH


    Swap 3x WETH to WstETH


    Activate AaveV3 E-mode


    Supply the swapped WstETH on AaveV3


    Borrow 2x WETH from AaveV3


    Pay the 2x WETH flashloan borrowed

    So Defi transactions are grouped together and they are executed in sequence via AssemblyExecutor contract. This is how a user can make an assembly of defi transactions and execute them in one transaction.

  3. Defi transaction: This contract is designed to execute a particular defi transaction, such as Aave supply, DEX swap,etc. These Defi transactions are implemented as logic contracts that are invoked via a Smart Account and do not hold any state.

  4. Sharpe Earn Registry contract: The Sharpe Earn Registry contract serves as a central registry for managing contract addresses within the Earn smart contract ecosystem. This contract is designed to provide flexibility and timelock mechanisms for managing contract changes, enhancing the security and reliability of the smart contract ecosystem.

  5. Proxy Registry Contract: The ProxyRegistry contract is used in the Sharpe Earn smart contract ecosystem to manage and deploy proxy instances (specifically, Smart Account). These proxy instances can be associated with different users or owners, and the ProxyRegistry contract keeps track of these associations.

Last updated