Energy Station (testnet only)¶
What is Energy Station¶
Bancor protocol powered VET/VTHO exchange contract.
The Bancor Protocol enables automatic price determination and an autonomous liquidity mechanism for tokens on smart contract blockchains. In this case, we took advantage of the automatic price adjustment mechanism from the Bancor protocol. We use the concept of Relay Token but simplified the process of buying and selling. So the concepts of
Energy Station are:
- Create a Bancor conversion contract connecting two tokens.
- One connector token is VET, the other one is VTHO token.
- The weight of connector token is 50%.
- No smart token concept needed. Just allow the convention between VET and VTHO token.
Buying VTHO by spending VET¶
+----+ +--------------+ | | ---VET-->| | |User| |Energy-Station| | | <--VTHO--| | +----+ +--------------+
Buying VET by spending VTHO¶
+----+ +--------------+ | | --VTHO-->| | |User| |Energy-Station| | | <--VET---| | +----+ +--------------+
EnergyStation.setConversionFee(conversionFee in ppm)
- Send VET by
- Approve EnergyStation for VTHO token
- Send VTHO by
- Enable conversion by
The amount of VET and VTHO sent to
EnergyStation will be the initial supply of two connector token.
EnergyStation.getVETReturn(amount)to get converted value and calc minimum return as
- Convert VET to VTHO:
- Convert VTHO to VET: