Architecture
Last updated
Last updated
The infrastructure of tapETH consists of three components: tapETH Swap, tapETH tokens, and a Merkle Distributor for yield/fee.
A tapETH swap is an exchange that manages the underlying tokens in the baskets and bootstraps the value of ETH. For more information about tapETH swap, please refer to the section on the algorithm.
tapETH swaps are the only minters for tapETH tokens. Minting tapETH is identical to adding liquidity in Curve.fi: users only need to deposit underlying tokens to the swap. After receiving the additional tokens, the tapETH swap computes the new value of D, and mints new tapETH token equal to the difference between new D and old D. Users receive tapETH token instead of the LP tokens in Curve.fi.
There is one big difference between tapETH token and Curve.fiβs LP token: LP token is essentially a yield token whose value grows as transaction fees accumulate in the swap, and also serves as a "share" of the pool itself. This generates profits for LP but makes LP tokensβ price volatile and dependent on the swap performance. Therefore, LP tokens are mostly used for staking purposes and cannot be used as a payment method.
By separating token base value and yield, tapETH token can maintain a good peg with native ETH without being affected by the price fluctuation of individual ERC20 staking ETH tokens(LSTs). This tapETH can then be wrapped to produce wtapETH, for use within DeFi and cross-chain, and also used as loan collateral or a payment/transfer method.
The fees and yield generated from tapETH swap are distributed through a Merkle distributor. On a per block basis, as staking rewards are generated, and protocol fees are collected - these are then calculated in terms of tapETH and then distributed to holders, allowing them to claim the rewards accordingly.