teeter Contract
For all of those under-the-hood details, read on
Contract address
Kovan
FACTORY
0xD8e39D7D6297f239E800890C5c3CeB9B1d4A9e75
FrontDesk01
0x4Bf60aFFdB8E4fa92a983002fbE890030e7396De
USDT (for teeter in Kovan)
0xe538Eada62aC2466CA10CD0f1F73Cf829c84daC5
WETH9
0x021861cC8d0Ad95C1C7E8BA77517bA9344e9a64F
Get teeter's USDT on Kovan:
You can use Kovan's test ETH to do traders in uniswap:
Uniswap ETH / USDT contract address on Kovan: 0xEc835EadAb771EC73Ac57a217d8b398e43E0FdD4
USDT on Kovan: 0xe538Eada62aC2466CA10CD0f1F73Cf829c84daC5
Create a liquidity pool or add liquidity
Input parameters
token0
Yes
address
The address of the underlying token
initLever
Yes
uint8
3
direction
Yes
uint8
0 for short ;1 for long
amtToken0
Yes
uint256
The number to add liquidity in underlying
to
Yes
address
The address to receive the LP token
deadline
Yes
uint128
The time limit, in seconds;
If the transaction is not completed over time, it is rolled back
Output parameters
liquidity
uint256
Number of LP Tokens sent
Remove Liquidity
FrontDesk01.recycle()
Input parameters
amtliquIn
Y
uint256
Number of LP tokens to remove
token0
Y
address
The token address of the underlying asset of the pool
initLever
Y
uint8
The initial leverage multiple of the pool
direction
Y
uint8
The long/short direction of the pool
to
Y
address
The address to receive the asset
deadline
Y
uint256
The time limit
Output parameters
amtToken0
uint256
The amount of the underlying asset to be acquired
amtU
uint256
The number of base currency acquired
Query the details of a liquidity pool
Query the market data of a pool
IFolloUnderlying(underlying).getReserves()
Output parameters
Parameters ending in "En" indicate that the data has been moved 112 bits to the left and needs to be shifted 112 bits to the right to restore to the original value.
_fundSoldValueEn
uint256
Position of leveraged tokens sold, moved 112 to the left, decimal is 18
_fundAvaiValueEn
uint256
Position of unsold leveraged tokens, moved 112 to the left, decimal is 18
_fundSoldQTY
uint256
Number of Leveraged Tokens Sold, DECIMAL IS 18
_fundAvaiQTY
uint256
Number of Unsold Leveraged Tokens, Decimal is 18
_nvEn
uint256
Net value
_presLeverEn
uint256
The latest real leverage multiples
_underlyingQTY
uint256
The amount of the underlying asset
_priceEn
uint256
Latest price
_underlyingValueEn
uint256
The value of the underlying asset
_capPoolU
uint256
The value of the current margin liability pool when the price changes
_usrMarginU
uint256
Trader's margin
_feeU
uint256
fee in total
_capU
uint256
The value transferred to the pool when a user liquidated a position at a loss
_usrPoolQ
uint256
The value owed to investors in liquidity as prices change
Last updated