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
update token balances
calculate the new D value
calculate delta D = new D - old D
calculate mintAmount = delta D - feeAmount = delta D * ( 1- mintFee)
revert if mintAmount < _minMintAmount
mint mintAmount of tapETH for the caller
increase the total supply of tapETH by feeAmount
update balance of token index
i
.calculate the new balance of token index
j
: new ycalculate delta y = new y - old y
calculate outputAmount = delta y - feeAmount = delta y * ( 1- swapFee)
revert if outputAmount < _minDy
send outputAmount of token index
j
to the callerincrease the total supply of tapETH by feeAmount
calculate redeemAmount = _amount - feeAmount = amount * ( 1 - redeemFee).
for each token i :
calculate tokenAmount = balances[i] * redeemAmount / D
revert if tokenAmount < minRedeemAmounts[i]
send tokenAmount of token index i to the caller
update D = D - _amount
burn _amount of tapETH from the caller
increase the totalSupply of tapETH by feeAmount
calculate redeemAmount = _amount - feeAmount = amount * ( 1 - redeemFee).
calculate the new amount of token i (new y ) for D = D - redeemAmount
calculate delta y = new y - old y
revert if delta y < _minRedeemAmount
send delta y of token index
i
to the callerincrease the total supply of tapETH by feeAmount
update balance of each token index
i
.calculate the new D
calculate delta D = new D - old D
calculate redeemAmount = delta D + feeAmount = delta D * ( 1 + redeemFee)
revert if redeemAmount > _maxRedeemAmount
for each token index i, send _amounts[i] to the caller
increase the total supply of tapETH by feeAmount
Functions to be executed only by the governance:
Write Methodes
Last updated