Contract Addresses

Goerli Testnet Address

constant: 0x07e70721C1737a9D410bcd038BA7e82e8BC19e2a

rETHRate: 0xf2dD62922B5f0cb2a72dAeda711018d6F56EEb17

tapETH: 0x0C68f684324551b4B6Ff6DFc6314655f8e7d761a

WTapETH: 0x31CcC35cbed56B6e8f01E8207B1302f009ABC27c

stETHSwap: 0x79106c599A6A320DFB0686513631a92fF8343b44

rETHSwap: 0x9719443a2BBb5AB61744C1B3C71C2E3527101a91

applicationStableAsset: 0x44A54f1cc211cfCFfE8b83C22f44728F3Fa5004C

wETHAddress: '0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6'

stETHAddress: '0x1643E812aE58766192Cf7D2Cf9567dF2C37e9B7F'

rETHAddress: '0x178e141a0e3b34152f73ff610437a7bf9b83267a'

Smart Contracts Overview

The main contracts of Tapio V1.5 are the following:

TapEth : contract of rebase token tapETH

WtapETH: contract of wrapped tapETH

StableAsset: contract of stableswap pool

StableAssetApplication: user contract interface for different stableSwap pools

Contract TapETH

The contract TapETH is upgradable and uses the interface IERC20.

Write Methods

View Methods

Contract WTapETH

The contract WTapETH is upgradable and inherits from the contract ERC20Permit.

Write Methods

View Methodes

Contract StableAsset

The contract StableAsset is upgradable and inherits from the contract ReentrancyGuard.

Write Methodes

  1. update token balances

  2. calculate the new D value

  3. calculate delta D = new D - old D

  4. calculate mintAmount = delta D - feeAmount = delta D * ( 1- mintFee)

  5. revert if mintAmount < _minMintAmount

  6. mint mintAmount of tapETH for the caller

  7. increase the total supply of tapETH by feeAmount

  1. update balance of token index i .

  2. calculate the new balance of token index j: new y

  3. calculate delta y = new y - old y

  4. calculate outputAmount = delta y - feeAmount = delta y * ( 1- swapFee)

  5. revert if outputAmount < _minDy

  6. send outputAmount of token index j to the caller

  7. increase the total supply of tapETH by feeAmount

  1. calculate redeemAmount = _amount - feeAmount = amount * ( 1 - redeemFee).

  2. for each token i :

    • calculate tokenAmount = balances[i] * redeemAmount / D

    • revert if tokenAmount < minRedeemAmounts[i]

    • send tokenAmount of token index i to the caller

  3. update D = D - _amount

  4. burn _amount of tapETH from the caller

  5. increase the totalSupply of tapETH by feeAmount

  1. calculate redeemAmount = _amount - feeAmount = amount * ( 1 - redeemFee).

  2. calculate the new amount of token i (new y ) for D = D - redeemAmount

  3. calculate delta y = new y - old y

  4. revert if delta y < _minRedeemAmount

  5. send delta y of token index i to the caller

  6. increase the total supply of tapETH by feeAmount

  1. update balance of each token index i .

  2. calculate the new D

  3. calculate delta D = new D - old D

  4. calculate redeemAmount = delta D + feeAmount = delta D * ( 1 + redeemFee)

  5. revert if redeemAmount > _maxRedeemAmount

  6. for each token index i, send _amounts[i] to the caller

  7. increase the total supply of tapETH by feeAmount

Functions to be executed only by the governance:

Write Methodes

Last updated