- Amoveo p2p derivatives, prediction markets & DEX are fully functional. If you try this now, you are an early adopter of trust-free p2p derivatives trading. There aren’t many users yet.
- Amoveo Telegram Channel: https://t.me/amoveo
- Most of the content on this page are from: https://github.com/zack-bitcoin/amoveo-docs <– Visit this page to learn more
Choose the wallet for amoveo #
Using Offline version with git: This is the most secure way to run the light node.
- install git
- open command line interface (For windows, it’s cmd or powershell, For apple OS or linux it’s the terminal)
- choose a folder for saving the light node files
cd (path of that folder)Enter
- Command for downloading the files:
git clone https://github.com/zack-bitcoin/light-node-amoveo.git
- Open this file with browser, then add this page to your bookmark bar in your browser
- Commands for upgrading to latest version
- Open command line interface
- Go to folder of the light node
cd ./light-node-amoveo(enter the full path of this folder)
Using Offline version with zip file: This is the most secure way to run the light node. Upgrading is less convenient than using git.
- Or you can download a zip file the light node onto your own computer from here. Unzip
- Open this file with your browser, and add this page to your bookmark bar in your browser
Server version: Easiest, no need to download anything
Amoveo Wallet developed by exan.tech : More user friendly, but currently offers much less features
- Apple: https://apps.apple.com/app/veo-wallet/id1439959709
- Android: https://play.google.com/store/apps/details?id=com.exa.amoveowallet
- Webwallet: https://myveowallet.com/
- Telegram Group: https://t.me/amoveo_wallet
- The p2p derivatives tool is a feature supported by Amoveo’s browser light node
- You can also use the light node with a browser on mobile phone
P2P derivatives Trading - How to #
- This tool is for making smart contracts.
- Here you can see a place where you can publish offers to trade p2p derivatives.
- You can make a offer for a smart contract, and post it to a forum.
- Anyone else can accept your offer and participate on the opposite side of the contract.
- If there is a football game, Alice can post an offer to bet $100 on team A.
- Then anyone can take that offer, and make a tx that locks the $100 from Alice with $100 of their own money so that they are betting with Alice on the outcome of the football game in a new channel.
- If Bob thinks that the price of VEO will go up, he can sell stablecoins on Amoveo, and this will give him long-veo. - An asset that has higher leverage, so Bob can have even more exposure to Veo price risk.
- If the price of Veo increases 10%, Bob’s contract increases in value 20%. If the price of Veo decreases 20%, Bob’s contract decreases in value 40%.
Smart contract - Description of all steps #
- We need some question to bet on.
- We can use the new oracle page to select new topics to bet on.
- Binary oracles are true/false questions.
- Scalar oracles can measure a price, or some other value in a range.
- documentation for making good oracles
- Once you have created the oracle, you will receive the oracle ID.
- You use this so the smart contract knows which oracle will determine who gets the money.
- We can use the new oracle page to select new topics to bet on.
- Someone creates an offer for a new smart contract.
- Someone accepts the offer of a smart contract.
- this page can be used to accept a smart contract offer.
- the event occurs.
- Now we know who won the football game or election, or whatever we are betting on.
- we close the smart contract to get our money out.
- this page can be used to close the channel.
- If both participants work together, closing the channel takes only 1 block.
- If one participant refuses to cooperate, then you have to wait for the oracle to settle, and return to the otc_finisher.html page a couple times to completely get your money out.
Amoveo Decentralized Exchange (DEX) for crypto to crypto trading - How to #
- First, join Amoveo DEX telegram group to discuss & publish buy and sell offers: https://t.me/joinchat/Hf0n-acs4mcSVHdw
- Create an Amoveo wallet using the wallet link below. Open the link, hit “Generate new account” and save the file somewhere you will remember.
- When you come back to this link later, you need to choose this file with the “Choose file” button to be able to use your wallet.
- http://22.214.171.124:8080/wallet.html <— Add this link to bookmark bar
- You need a small amount of VEO to get started. Get it from here: qtrade.
- Once you have acquired some VEO, you can use the DEX.
- Open the wallet link, choose the file for your account, and then hit the “crosschain DEX” button all the way to the right.
- There are two different processes currently for using this page to buy and sell VEO.
How to Buy VEO using the DEX #
- i. Once you have hit the “crosschain DEX” button, hit the “refresh available actions” button.
- ii. If someone is selling VEO, there will be a button that looks something like the below. If nobody is selling VEO, you can make a WTB quote in the telegram chat and wait until someone makes an offer to sell VEO, then the offer will look like the below and you can continue to follow these instructions. they offered to give 1.00000000 VEO in exchange for 0.0014 BTC to address 12V8QeUULY93uxAfDaUKPVXXRNPfkTXiQT ; The money must arrive before 18 Feb 2021 15:52 GMT ; Offer expires in 130 blocks.
- iii. This means that if you click the button, you are accepting a trade where you are selling 0.0014 BTC for 1 VEO + a small security deposit paid by you (will be returned)
- iv. Once you have accepted this trade, you will see an “Unconfirmed balance” at the top of the wallet. This is your security deposit.
- v. Once your security deposit has been confirmed after 1 Amoveo block, you need to send 0.0014 BTC to address 12V8QeUULY93uxAfDaUKPVXXRNPfkTXiQT.
- vi. You need to make sure the BTC gets there (i.e. in a Bitcoin block) before 18 Feb 2021 15:52 GMT.
- vii. Go back to the wallet, and navigate to the crosschain DEX tab. Hit the “refresh available actions” button.
- iix. At the bottom, you should see a button that says “you have already delivered the coins on the other blockchain”. Press it. You can now go offline.
- ix. This completes the trade and you should receive your VEO within several minutes to an hour.
How to Sell VEO using the DEX #
- i. Once you have hit the “crosschain DEX” button, you will see fields in the “Make Trade Offer” section.
- ii. There is a pre-populated example that makes an offer to sell 1 VEO for 100,000 DOGE.
- iii. Replace the fields with what you want, then hit the “make crosschain trade offer” button. You can now go offline. If you see the coins have been delivered, the trade is over. If you want to make a bit of VEO back in exchange for helping the other side finalize the trade, or if you never received the coins on the other blockchain, you can optionally complete the following steps.
OPTIONAL / I DIDN’T RECEIVE MY COINS #
- iv. Return to the “crosschain DEX” tab and hit “refresh available actions”.
- v. If you received the coins on the other blockchain, hit the “you have already been paid” button. This settles the trade for your counterparty and as a reward you will get 0.5% VEO back
- vi. If you did not receive the coins on the other blockchain, hit the “you have not been paid, and they ran out of time” button. You can now go offline. You will receive your VEO back plus the security deposit of the counterparty.
- Ask directly here:
- To participate in the market, first you need to make a channel
- You need to wait until the new_channel tx is included in a block before you can make any bets.
- You need to download all the headers before you can make any bets in the market.
- if your price is 25, and the amount you bet is 1, then at most you can win 3, and at most you can lose 1.
- If your price is 75 and you bet 3, then at most you can lose 3, and at most you can win 1.
- price is the same as percentage odds.
- When your bet is successfully accepted, the “amount” should disappear.
Make Channel #
- Make sure that the channel will stay open long enough so that you can participate in the market you are interested in.
- The channel delay needs to be 100 or bigger.
- Make sure to save your channel state every time it is updated.
- It is possible to trustfully download the channel state from the server, but trust is bad.
- We are trying to make trust-free technology.
Accepting a Channel Offer #
- Lets say that Bob made a bet on the outcome of a football game, and he posted it online. Now you want to accept the other side of the bet. What do you need to do?
- Take the raw contract data that Bob posted online, and use the otc_listener.html page of the light node, for example it is hosted here
- When you copy/paste the raw contract data from Bob, or upload the file to otc_listener, it will allow you to view the details of the contract from inside the light node before you choose to accept.
- This way it is not possible for an attacker to trick you into accepting a contract that you did not want to accept.
- An oracle is an on-chain mechanism designed to get users to accurately report information to the blockchain.
Oracle ID #
- An Oracle ID or OID is a short binary value used to identify an Oracle. Both binary and scalar oracles have OIDs. If you want to make a contract that references an oracle, you need to write that oracle’s OID into the contract.
- We often encode OIDs into base64 when we want to copy/paste them. For example abQmqMdgpas0zRpAji1DShVFD7kauQrCrZJJC6005c4=
- The OID is uniquely defined by the question being asked of the oracle, and the height at which the resolution process will begin. This way we are able to use an OID before an oracle has been created.
Oracle Question #
- This is a question that people will read to decide how to report information to the blockchain.
- Example binary oracle questions: “Donald Trump was elected president for a second term.” “The high temperature in New York on March 2, 2019 will be less than 25 Celcius.”
- Example scalar oracle questions: “The price of USD in VEO from 0 to 0.05 on March 2, 2019.” “The price of BTC in VEO from 0 to 130 on March 2, 2019.” “The price of BTC in USD from 0 to 10 000 on March 2, 2019.”
- If you want to make a stablecoin, it is important to always ask for “the price of X in VEO”. Do not ask for “the price of VEO in X”, or else the contract will not work as a stablecoin.
- The otc_derivatives page can auto-fill the upper oracle limit from the oracle text, if you format the oracle correctly. otc_derivatives searches for the word “from”, then it seraches for the word “to”, and it assumes that the next number displayed is the upper limit of what the oracle can measure. So it is good to use the substring “from 0 to “, if you intend to use it for stablecoins.
Oracle Starts #
- This is the earliest date at which people can start reporting to the oracle mechanism. It is measured by the block height.
- If you want to bet on a football game, you should find out a date and time when you are certain that the result of the game will be known. Figure out what the Amoveo block height will be at that time.
- For example, there are currently 130 blocks per day, and we are at block height 55000. So, in 3 days, we will be at block 55390. So if I wanted to bet on a football game that I was sure would end 3 days, then I should use “55390” for the oracle starts variable.
Oracle Types #
- There are 2 basic kinds of oracles in Amoveo, scalar and binary.
Binary Oracle #
An oracle is an on-chain mechanism designed to get users to accurately report information to the blokchain. A binary oracle is for when the blockchain wants to find out the answer to a true/false question.
If you want to bet on who will win a football game, you will need to conect the betting contract to the oracle. That way the contract will know who won the bet, so it will know who to give money to.
Here is a page where you can ask the oracle new questions http://126.96.36.199:8080/new_oracle.html
Scalar Oracle #
- An oracle is an on-chain mechanism designed to get users to accurately report information to the blokchain. A scalar oracle is for when the blockchain wants to find out a numerical value.
- If you want to make a stablecoin that stays the same value as the Euro, you will need to connect the stablecoin contract to a scalar oracle that is measuring the price of the Euro in Veo. That way the contract will know how to distribute the Veo to correctly enforce a stablecoin contract.
- Here is a page where you can ask the oracle new questions http://188.8.131.52:8080/new_oracle.html
Binary Bet #
- A binary bet is one where one of the two parties ends up winning all the money from the contract. To make a binary contract, you need to connect to a binary oracle.
- Caution, each of the 10 bits of a scalar oracle is actually a binary oracle, so don’t make a bet on the first bit of a scalar oracle, thinking it is a binary oracle.
Scalar Bet #
- A scalar bet is where the money in the contract gets divided between the two participants based upon a 10-bit value measured by the oracle. A scalar oracle can return any number between 0 and 1023.
- With a scalar bet, the money gets split up based upon what number is returned by the oracle.
- For scalar bets, you need to use a scalar oracle. binary oracles will not work.
Stablecoin Bet #
- A stablecoin bet is a type of scalar bet. The difference is that the interface on otc_derivatives is optimized for making stablecoin type contracts.
- A BTC stablecoin contract is an asset that stays the same value at BTC. If one participant in the channel has stablecoins, that means the other participant has extra exposure to VEO.
- To use a stablecoin bet, it must be connected with a scalar type oracle, and the oracle must ask “what is the price of X in VEO.” you cannot ask “what is the price of VEO in X”, because that will not work for stablecoins.
Stablecoin Current Value #
in otc_derivatives, if you want to make a stablecoin contracts, you are asked to prove the “current value”.
For example, if the oracle is asking “What is the price of BTC in VEO?”, and it wont expire for 1 month, then we cannot predict what the oracle will resolve to in 1 month. But we do know that the current price of BTC is in VEO. This current price is the “current value” that you need to provide in the contract.
For example, if BTC is worth $4000, and VEO is worth $80, then the current value would be 50.
Stablecoin Leverage #
- When you are making a stablecoin contract, you are asked to provide a value called “leverage”. This is a number that must be greater than 1.
- For example, if I buy a stablecoin contract connected to BTC with a leverage of 1, and the price of BTC increases by 10% over the lifetime of my contract, then my side of the contract will be worth 10% more by the end.
- If I buy a stablecoin contract connected to BTC with a leverage of 3, and the price of BTC increases by 10% over the lifetime of the contract, then my side of the contract will be worth 30% more by the end.
- Leverage and margins are deeply connected. Margins are the prices beyond which only one side controls all the veo in the contract. If you increase the leverage, the margins must necessarily become tighter.
every contract is enforced by locking up some veo in it.
Lets say we made a contract that is worth $50 of USD stablecoins. in order to enforce that someone owns the $50, the contract would need to have at least $50 worth of veo locked inside of it. If the price of veo/usd falls, then eventually the value of the veo locked in the contract could become worth less than $50, and the stablecoin becomes worth less than USD.
In order to protect the value of the stablecoin, we need to lock more than $50 of veo into the contract, just in case the price of veo falls before the contract finishes.
If we lock $75 of veo in the contract, then the contract is 150% collateralized. because 75/50 = 1.5
if we lock $110 of veo in the contract, then it is 220% collateralized, because 110/50 = 2.2
The collateralization of the stablecoin is connected to the leverage of the inverse-stablecoin. higher collateralization means lower leverage.
Derivatives Payment #
- When you make a derivative from the otc_derivatives page, you need to say how much you are paying or being paid for this contract.
- For example, I want to double my VEO exposure quickly. To convince many people to sell me their VEO exposure right away, I offer to pay them a 5% premium. So if they buy $100 of stablecoin from me, and hold it for a month, they will have $105 at the end of the month.
- To do this, I need to tell the otc_derivatives page to lock up $100 of veo into the stablecoin contract, and to keep to just pay $5 to the other person directly.
- The otc_derivatives tool atomically combines the payment with the smart contract, so neither of you has any risk.
- If you want to pay someone to do a contract with you, this value should be positive. If you want to get paid to make a contract with someone, then you should make this number negative.
Messenger Credits #
- If you want to send encrypted messeges through an Amoveo messenger server, you need to buy credits.
- Your light node will automatically purchase more credits if you run out.
- You need to wait for the next block to be mined before you receive the credits.
User Stories #
- different people have a different process of using Amoveo’s light node.
liquidity farmer process #
- acquire the 2 kinds of currency needed for the market
- deposit them into the market to get liquidity shares
- exchange your liquidity shares for the 2 kinds of currency + trading fees you have earned.
trader in high volume standardized markets process #
- swap veo for the subcurrency that represents the bet that you want to make.
- later sell your subcurrency, hopefully at a higher price. or if you won the bet, withdraw your winnings.
selling customized bespoke contracts #
- use the id generator to know the id of the currency that represents the contract you want to own, generate the ID.
- use that id to make a swap offer, where you would buy what you want.
- someone accepts the swap offer to take the other side of your custom contract, this also creates the contract on-chain.
new market creator process #
- if the contract doesn’t yet exist, then use the new_contract tool to specify how the money in the contract should get divided among the subcurrencies.
- use the set_buy tool to acquire the different flavors of subcurrency from the contract, that represent participating in the different sides of the contract.
- create the market using the new_market tool and depositing the initial liqudity into the market.
market resolution process #
- use the oracle_bet tool to make a report on the outcome of the oracle.
- wait enough time for the oracle to become resolvable.
- use the oracle_close tool to finalize the outcome of the oracle.
- use the contract_resolve tool so the smart contract will read from the oracle, and decide how to divide up it’s value between it’s subcurrencies.
Using the Oracle #
Trump won the 2020 election.
scalar oracle to make an asset that moves the same as USD:
P = the price of USD in VEO from 0 to 0.05 on January 1, 2019, at 5:00 AM GMT; return P * 1024 / 0.05
When making a scalar oracle you have to choose a range of values that can be measured, this is because a scalar oracle is actually 10 binary oracles, each of which is providing one bit of the scalar value. So a scalar oracle can only measure integer values from 0 to 1023. You need to choose a good range to measure, that way the difference between 2 values that can be measured is small for the range of expected outputs. For example, if the oracle is set to measure from 0 to 0.05, and the value measured is 0.00025, then that means the scalar is internally using the binary value 0000000101 Which is 20% different from the 2 adjacent values 0000000100 and 0000000110. 20% difference between 2 adjacent measurable values isnt so good, that means on average the oracle’s output is being rounded by 5%, so the money will be divided 5% differently than had been intended. So this is why it is important to choose a good range of values to measure when making an oracle.
A scalar oracle for stablecoins that stay the same value as Euros.
P the price of Euro in VEO on date D from 0 to 0.04; return P*1023 / 0.04
scalar oracle to make an asset that moves inversely to Amazon shares:
P = the price of amazon in veo from 0 to 20 on January 1, 2019, at 4:00 AM GMT; return (20 - P) * 1024 / 20
scalar oracle to predict the weather:
P = the temperature in Vancouver at noon on April 23, 2019 from -10 to 50 Celsius according to this website https://www.timeanddate.com/weather/canada/vancouver/historic ; return (P+10) * 1024 / 60.
If I am willing to pay 0.5 to go long, that means I will profit as long as the temperature is above 20 celcius. If I am willing to pay 0.2 to go short, that means I will profit as long as the temperature is below 4 celcius.
Scalar oracle with free-option protections:
P1 = the price of USD in VEO on December 3, 2019, at 5:00 AM GMT?; P2 = the price of USD in VEO on January 1, 2019, at 5:00 AM GMT; return min(1023, 512 * (1 + ((P2 - P1) / P1)))
scalar oracle with BTC hedge:
P = the price of BTC in VEO from 0 to 200 on January 1, 2019, at 5:00 AM GMT; if Trump wins the 2020 election return 0, otherwise return P;
example, making a bet hedged against a currency: let’s say you want to long some African stock trading in ZAR (South African currency), but you don’t want to have the veo price risk so then what you basically do, is short veo and long the South African stock at the same time, using one oracle. “What is the price of the stock X measured in VEO, from 0 to 50?”
so for example, say the stock goes up 10%, but veo drops 10% at the same time this means that your return in veo is 1.1*1.1 -1 times the amount of veo you started betting with
or like 20% increase in VEO terms.
so your synthetic position exactly matched the return of the stock despite the price of VEO going down
scalar oracle to make an asset that moves inversely to amazon shares with frontrunning protections.
P0 = the price of amazon in veo on January 1, 2019, at 7:00 AM GMT;
P2 = P0 * 2;
P = the price of amazon in veo on Febuary 1, 2019, at 1:00 AM GMT;
Z = min(P2, max(0, P2 - P));
round(Z*1024 / P2)
A scalar oracle that moves inversely with BSV/USD
veo price source: Close price on https://coinpaprika.com/coin/veo-amoveo/#!historical-data
bsv price source; Close price on https://coinpaprika.com/coin/bsv-bitcoin-sv/#!historical-data
final date: Sep 23, 2019;
starting date: Sep 16, 2019;
fV = final number of usd per veo;
sV = starting number of usd per veo;
fB = final number of usd per bsv;
sB = starting number of usd per bsv;
return 512*(2 - (fB/sB))/(fV/sV)
Using DAC(Dominant assurance contract) #
Lets say Bob wants to be paid to write a book. Then Bob should make a bet that the book will get written, so that if he writes the book, he profits.
Usually, Bob puts less money in the contract than his customers. The money Bob could lose is only supposed to compensate for a small interest rate, for the amount of time that the money was inaccessible to his customers.
Using governance (Futarchy) #
We need to make futarchy markets before we update the governance variable, that way the community can come to consensus about what updates should be made.
The oracle is a reporting mechanism, it isn’t made for coming to consensus. If you try to use it to come to consensus, it is like a game of chicken, and is bad for the network.
The basic idea of governance in Amoveo is called futarchy. If you can show that a certain decision is good for the price of VEO, then the community makes that decision.
For example, you could start by making the binary contract: “Hard update X merged before block height H?”
So the “true” shares are only valuable if we merge, and the “false” shares are only valuable if we do not merge. Lets call them T and F.
Next we use each of these kinds of shares as the source currencies to make markets for the price of veo relative to some stable asset. So now there are 4 more currencies:
- TV, which is worth long-veo, but only if we merge the update.
- TB, which is worth stable btc, but only if we merge the update.
- FV, which is worth long-veo, but only if we do not merge the update.
- FB, which is worth stable btc, but only if we do not merge the update.
So we have 2 important markets. Market1 has 2 currencies: T and TV. So the price of market 1, it shows what the price of long-veo would be, conditional on us merging the hard update.
Market 2 has 2 currencies: F and FV. So the price of market 2, it shows what the price of long-veo would be, conditional on us not merging the hard update.
By comparing the prices in market1 and market2, we can tell if this hard update will positively or negatively impact the price of veo relative to the stable currency.
This same technique can be used by any community of people who have a shared goal. They can ask the oracle how well their goal will be satisfied in 1 year time, conditional on which strategy they use. So any community can find out which strategy would be most effective for them.