28 August 2020
Z
04:34
Zack
a binary oracle can be created at any step
04:34
there is the new_oracle page
mx
04:36
mr x
yeah ok contracts.html has creation for scalar oracles
Z
04:36
Zack
for the scalar oracle you have to wait until the result is known to be able to make the oracle
04:36
because the final price is embedded in the question
04:37
im thinking I can set up a loop to mine a block every 2 minutes
mx
04:37
mr x
yes
04:39
npm install derivatives
Z
04:48
Zack
ok, it is finding a block every 2 minutes now
mx
05:27
mr x
Is there minimum for oracle bet?
MF
05:27
Mr Flintstone
like on chain?
mx
05:27
mr x
yes
MF
05:27
Mr Flintstone
no
05:27
dont think so
Z
05:27
Zack
In reply to this message
yes, and it is kind of complicated
MF
05:28
Mr Flintstone
rly
05:28
oh is this the doublign thing
Z
05:28
Zack
there is an on-chain order book for the oracle
mx
05:28
mr x
just for shits
Z
05:28
Zack
the minimum bet size doubles as the number of bets in the order book increases
05:28
this way the amount of time required to process a tx stays short
mx
05:28
mr x
i created already
MF
05:29
Mr Flintstone
in testnet land i hope you dont need to wait 1000 blocks
mx
05:29
mr x
yes testnet
Z
05:29
Zack
processing a trade can take as long as the number of orders in the order book. so there needs to be some limit on the number of orders. we enforce this limit using the minimum bet size
05:29
in the testnet instead of 1000 blocks it is something really short
05:29
because we need to test the oracle in a reasonable amount of time
MF
05:30
Mr Flintstone
cool
Z
05:30
Zack
looks like it is 5 blocks
05:30
this "testnet" is actually a single-node running in the mode I use for unit tests.
05:31
and we do unit tests of the oracle
mx
05:31
mr x
so it is resolved as bad question already?
Z
05:31
Zack
it doesn't resolve unless someone does the oracle_close tx
05:31
that way we are able to do a soft fork to prevent the oracle_close tx, to prevent the oracle from settling in certain ways.
mx
05:32
mr x
aTdMAXdA7GXrkFQr1nmAEZcMtjlVw0RCCp1YpHWb8n0= oracle id
05:32
done timer 28
05:33
so i can still bet?
Z
05:33
Zack
you can still bet, and it will reset the timer when you do
mx
05:33
mr x
how much to bet?
Z
05:33
Zack
I think it resets it to 5 blocks in the future
05:33
oh
05:37
it is pretty low.
you can get the bet back afterwards if you win the oracle result
05:37
I think 0.02 veo is enough to change the state of the oracle
05:37
I can check
05:38
0.023 veo
05:38
a bit more than I thought
mx
05:38
mr x
ok
05:40
ok current type true, done timer at 43
Z
05:42
Zack
I can mine a couple blocks to speed things up
mx
05:44
mr x
oracle closed
05:46
hmm "server rejected tx" when claim winnings
Z
05:48
Zack
Probably the nonce is no good
05:49
I should set it up to take into account the zeroth confirmation txs when making your nonce for txs
05:49
If you wait a block it will probably work
mx
05:53
mr x
still rejected hmm
Z
05:55
Zack
I see errors for a "contract_winnings_tx".
it says that the contract is not yet closed.
05:55
I had thought you were trying to get your oracle winnings out
05:55
after closing the oracle, then you can close the contract
mx
05:55
mr x
😅..
Z
05:55
Zack
after closing the contract, then you can collect your winnings
mx
05:55
mr x
right
MF
05:56
Mr Flintstone
maybe we can multi-tx that
mx
05:56
mr x
close oracle AND close contract
MF
05:56
Mr Flintstone
so it is all in one
Z
05:56
Zack
well, closing the oracle is an involved process
05:56
it doesn't fit in a multi-tx
05:56
there are bets
MF
05:56
Mr Flintstone
isnt the final close tx simple?
Z
05:56
Zack
the final step of closing it can be part of a multi-tx
MF
05:56
Mr Flintstone
yeah
mx
06:04
mr x
Claimed my winnings. Now sell rest of liquidity shares and claim winnings again.
Z
06:06
Zack
Great.
So you went through most of it now.
I think you can still try publishing and accepting a swap?

Any suggestions on how this could have been easier?
mx
06:11
mr x
Ok created swap. Selling all subcurrency on losing side(4472057) for 1000000 on winning side.
06:11
["signed",["swap_offer","BC/onePSJa25mp5+Cz54cSciAx8RwuXr6rSezgY6KpCZXGxHYlsA9cqnCIUrU6t4nsBog5+j8/McAhUSRy7KkH8=",53,74,"2UBrYLOZp/5o4kIwtZYvrB1iF8bXC+k40OsasMfQlp8=",4472057,"lDmbiOzgvvEmnnBtk9kMW0fNR1P6WKhLwYStvtKGMKQ=",2,1000000,"lDmbiOzgvvEmnnBtk9kMW0fNR1P6WKhLwYStvtKGMKQ=",1,152050,9],"MEUCIBbuWMor4iO5N9bPyJKtObYp7ophEbU+gijUpCHCPrt/AiEA/v4aBdw6pSaLLEKqHBrO3qQzLovxwqarKeWKSRH1HtQ=",[-6]]
MF
06:12
Mr Flintstone
you can publish it
06:12
publish swap offer
06:12
oh i can too i guess
mx
06:12
mr x
oh right
Z
06:12
Zack
I had to leave the computer a bit
06:12
You need to teach the server the Oracle text before you can publish the swap
mx
06:13
mr x
i guess i teached at some point
MF
06:13
Mr Flintstone
yeah its weird, wont let me accept it for testnet veo from teh explorer
06:14
you can still view it from pasting it manually
Z
06:14
Zack
I think it might not accept coins from a contract that already settled
06:15
Since you can exchange those for Veo directly
MF
06:15
Mr Flintstone
oh
mx
06:15
mr x
well yes :P
Zhou Jj invited Zhou Jj
mx
08:59
mr x
So when fully documented amoveo.js?
Z
17:08
Zack
In reply to this message
I don't know what you are asking for
mx
17:29
mr x
Just all the api calls in one place and explained
17:34
set server ip/port, request headers, set key, basic sends... all of it
Z
17:40
Zack
In reply to this message
17:41
https://github.com/zack-bitcoin/amoveo/blob/master/apps/amoveo_http/src/ext_handler.erl#L58
this is the api command to find out the current block height for example.
17:41
17:42
there is also an internal api that you can only access from other programs on the same computer as the full node. the p2p derivatives server has an api too.
mx
17:50
mr x
Yeah. Guess I mean just put the whole light node in single js file so that you could interact with it purely from browser console for example.
17:52
just include amoveo.js
17:55
someone just 100 veo market buy??
C
17:55
Callum Wright
sorry fatfingered
mx
17:56
mr x
is ok
Z
18:03
Zack
oh, like one of those javascript packager things
18:03
you can already interact with it from the javascript console
18:03
but instead of one giant amoveo.js, there are a bunch of bite-sized js files that have specialized purposes
18:04
like, one of them is a virtual machine for the smart contracts. one of them manages your private key.
mx
18:11
mr x
Right. Guess full separation of api and ui would be nice.
...... invited ......
Makedonskiy invited Makedonskiy
I
18:20
Instinct
In reply to this message
Lol
Z
18:38
Zack
In reply to this message
"api" is a language you use to communicate with the full node. to request data from the full node.
the JS files are a different application running in your browser. they make up a light node. The light node gives you access to different resources than the full node.
mx
18:43
mr x
Yeah. Requesting stuff from server logic and updating ui logic should be separated is what im saying.
Z
18:49
Zack
They are.
You can use the Api from curl or anything.
You don't need to use the light node to access the Api.
18:50
The p2p derivatives server uses the Api.
The Explorer I am writing now uses the Api.
Mining pools use the Api.
Full nodes use each other's api.
Exchanges use the Api
18:50
The Api is independent of the javascript light node software already
Erik 🌖 invited Erik 🌖
Z
19:51
Zack
there is a channel for price talk in the discord
Z
21:03
Zack
there is so much spread in the btc/veo market on qtrade.

If we make an on chain AMM for VEO/stable-btc, would that make the qtrade market less volatile too?
JS
21:04
Jon Snow
Think so
21:05
It will broaden the liquidity
21:05
Not just the current spot market
Z
21:08
Zack
I think it wasn't a straight market buy.
They kept buying a little more and waiting for the market to respond.
I think someone got 200 veo today at a decent price.

Our liquidity is so low, it is an effort to buy in bigger amounts.
Ken Saxon invited Ken Saxon
K
21:12
Ken Saxon
interesting market is doing better than i thought
21:12
i take back my comments. there’s a chance that the market has simply been wrong for a long time.
21:12
if we break an all time high, this thing can reach at least 250 million market cap, maybe even 1 billion
Z
21:13
Zack
price chat is in discord
21:14
also, this isn't your first time trying to manipulate the price here.
I don't want this thread to fall apart that way, so I may have to ban you if you keep doing this.
K
21:24
Ken Saxon
any plans for amm?
21:24
can we please do some marketing? if you really were the first creator of amm and have innovations, this should be marketed everywhere
Z
21:24
Zack
lets start with a smart group of users, and wait until they feel comfortable using it.
Then it will make sense to market
21:25
marketing before we have a usable product is a waste
21:25
im trying to clone something like this https://app.uniswap.org/#/swap
B
21:25
Ben
first we need an interface that the broad mass can understand and use. I like the approach of Zack to start with tech savy people and take in from there.
Z
21:25
Zack
like, the interface
K
21:26
Ken Saxon
we need to connect with eth liquidity asap
21:26
if you don’t realize that yet, i’m sorry this project is still doomed
Z
21:26
Zack
would making an eth stablecoin help?
K
21:26
Ken Saxon
that’s why dot and atom have been doing the best as alternative platforms
21:26
i don’t reallly know what dot and atom is doing but you should definitely look into it
21:27
since they are connecting with all the assets that are run on eth somehow, oracles or something no idea
21:27
there needs to be a real practical way to connect to that pool of liquidity, once you start bringing just a bit of liquidity this project can take off. tvl is a real metric
21:28
but you have to basically make this a priority, since market is moving fast, this is really your last shot at getting tvl
21:28
also it may be helpful to study ponzinomics
21:28
can we do migration mining?
21:29
something like sushiswap, or one of the yfi clones
Z
21:29
Zack
I just want to focus on the product. can you handle the ponzinomics for us CK?
21:29
haha
21:29
ponzinomics is a serious part of gaining the liquidity
21:29
the product is worthless without liquidity
Z
21:29
Zack
im glad to know we have a serious ponzinomicist on our side.
K
21:30
Ken Saxon
well I did 3x my portfolio this year, so i think it’s pretty useful
21:30
i mean aren’t you on twitter? everyone is talking about ponzinomics and liquidity mining
21:31
to take yourself too seriously, and to take the seemingly unserious ideas as a joke might be an indication of not enough critical thinking
21:31
either way the current iteration or ponzinomics is migration mining with sushiswap type protocols
Z
21:31
Zack
this migratoin mining stuff seems really complicated
K
21:32
Ken Saxon
just clone some ranodm shit like uniswap, whatever, and get the liquidity
21:32
asap
21:32
sushiswap was made literally in 3 days and already has 16M tvl prior to mining, will probably hit 200M in a week of tvl
21:33
fork some project , do migration mining, and then have veo somehow capture the value
Z
21:33
Zack
we have the uniswap clone, it will activate in like 11 days. I am making a javascript interface of it
K
21:33
Ken Saxon
veo can caputre the value by getting some of the rewards that are generated from the fees made through sushiswap style protocol
21:33
oh wow
21:33
what does it do
21:34
can you make sure 1) it does migration mining, 2) veo captures value. that’s all that’s needed to 100x this project right now
Z
21:34
Zack
i still don't understand migration mining
K
21:34
Ken Saxon
nobody takes this project seriously since there’s no TVL, that’s the whole problem. as soon as that changes, this becomes long term project
21:34
please read about it and look into sushiswap
21:35
yes it appears as a joke but i follow some seirous investors in twitter and they think this is a breakthrough
21:36
also this woman is pretty smart
21:36
there are tons of projects to fork liquidity from right now
Z
21:37
Zack
so they make a new currency "sushi", and they give that to all the liquidity providors, and a fraction of all the fees in their system also gets paid to sushi holders.

Seems like sushi holders are an unnecessary rent collectors that could be circumvented to make a cheaper platform with the same functionality.
K
21:38
Ken Saxon
of course everything can be circumvented, but first movers always have an advantage
21:38
you can make the argument that eth is worthless rent collecting and can be circumvented, but what world are you living in?
21:39
can happen is not same as will happen, and doesn’t indicate how fast it will happen
Z
21:39
Zack
eth is containing the value produced from the PoW. it is a necessary component of the Nakamoto consensus mechanism
K
21:40
Ken Saxon
i always thought you were either low IQ high coding ability , or high IQ high coding ability
21:40
i hope you are not in one of those memes with medium bell curve that doesn’t capture the value
21:40
either way if you still don’t understand the importance of liquidity this project is fucked
21:40
it’s so obvious at this point
21:41
who cares what happens tomorrow, get the liquidity first so that the platform is actually useful, then worry about it
21:42
don’t be 100 steps removed from the vision. liquidity first, then project becomes value and you can bring on users
21:42
there’s actually a theory out there
21:43
that you can basically just fork every major project quick enough that has TVL, and that project itself will be worth billions
21:43
basically if you fork yfi, uniswap, and every other TVL protocol, and then you give rewards to VEO, I buy a $1 billlion valuation
Kevin zhou invited Kevin zhou
Kz
22:00
Kevin zhou
hello everyone
22:00
😁
Z
22:00
Zack
Hello Kevin. Kevin wants advice on setting up an FPGA mining pool.
Kz
22:00
Kevin zhou
yes
Z
22:02
Zack
I think we don't have software for all kinds of hardware
Kevin zhou invited Ivy Huang
Z
22:02
Zack
I know this guy made FPGA software for a few different boards, https://github.com/dedmarozz
I think there is other software out there too
Kz
22:04
Kevin zhou
I think you can communicate with us more and we will provide you with the corresponding data
Z
22:07
Zack
sounds good
K
22:33
K
What's wrong with having an un official one?
MF
22:40
Mr Flintstone
In reply to this message
not an expert on this stuff but do they open source it? so we can easily just plug the amoveo AMM into the interface
Z
22:41
Zack
we need to do a flash loan to combine multiple markets in many cases to get this interface to work correctly
22:42
im working on it now
MF
22:49
Mr Flintstone
In reply to this message
well the idea is that while it is rent collection it front-loads revenue so the application can pay for liquidity now, much like how a company can sell equity so it can leverage the future revenue as current capital
Z
23:01
Zack
so, it is like taking a loan to be a loss-leader, in the hopes that network effects will make the loan back later.
And you bundle investing in liquidity along with this loan, so everyone has to do both at once.
23:04
maybe this kind of business strategy makes sense in a world where you can build a legal moat around your product, or there are strong network effects preventing your customers from switching out later.
But I think that isn't the situation we are in.
I think the switching cost between AMM on the same blockchain is low.
MF
23:07
Mr Flintstone
i think so if you are doing a 1:1 clone
23:07
but other AMM like to add new features
23:08
so there is an advantage to having been on-chain without bugs for time
23:08
to be fair the most popular AMM doesnt do this trick but it was first more or less
Z
23:08
Zack
so this is a way to compensate for the risk of bugs during the early stages
MF
23:09
Mr Flintstone
In reply to this message
it is actually hard to know if they do this trick. sometimes the application will come out with a token, way after the launch of the application, that gets distributed to any of the people providing liquidity since the application started
23:10
so you can even cash in on the probability that this event will happen
Z
23:30
Zack
im working on the uniswap clone.
uniswap works with the assumption that you already own the currency that you want to sell.
Amoveo doesn't need this limitation.
If you don't have a subcurrency, but you do own the source currency for the contract that can produce that subcurrency, then you can atomically buy the subcurrency that you need in order to make the trade that you want to make.

Maybe conceptualizing this tool in terms of "currencies" is wrong.
Instead we should be thinking about your risk profile
23:35
What if this tool looked at all the markets, and it looked at all the swaps it could see in the p2p derivatives order book, and it made a flash loan using whatever it could to get you the best price for your trade that it can.
EA
23:42
Eric Arsenault
Should we maybe create a group to talk about UX?
Z
23:42
Zack
is this group not going to work for that?
23:45
im thinking the way this swap tool will work, you don't necessarily need to own something to be able to sell it. Since you can automically buy a complete set and then sell it in the same tx.

So you will choose any currency to sell, and any currency you want to buy.
Then it will give you a summary of all the things that will happen to achieve your goal. possibly trading in multiple markets, buying shares in multiple contracts.
So you have a chance to review what is happening and approve it. so you know exactly which currencies you are gaining and losing.
EA
23:48
Eric Arsenault
That’s interesting
23:48
It works a bit similarly in uniswap
23:49
In you try to swap a pair that doesn’t have a market, it shows you the trades that happen in the background
Deleted invited Deleted Account
EA
23:50
Eric Arsenault
In reply to this message
Yeah I guess so, but maybe having a channel specifically would help. It would be great to do some user journey mapping
29 August 2020
Z
00:45
Zack
so you guys want ponzinomic markets.
How about if there is a fee to buy liquidity shares in a market, and zero fee to withdraw.
This fee is used to pay people who already own liquidity shares.
The cost of the fee increases as the market gets bigger.

Fee = base_fee*(total number of shares)/(how many shares you are buying)
00:47
is that what he meant by ponzinomicism?
00:50
we can have this ponzi-fied markets side by side with fair markets, and see which ones people like to use
MF
01:01
Mr Flintstone
i wonder if it is the same effect. i guess early liquidity providers are getting paid much more in this model
01:01
but im not sure if it will have the same economic impact of moving all of the future fee revenue to the present and using that to pay liquidity providers
Z
01:02
Zack
its ponzified on a market level instead of on a team level
Deleted invited Deleted Account
MF
01:37
Mr Flintstone
it looks like migration mining is easier for projects inside ethereum
01:38
it is kind of like these applications are attacking each other
01:38
stealing liquidity
01:39
it also appears to require a long capital lockup. which means you need to print lots of tokens to compensate for time value, opportunity cost + IL risk?
RL invited RL
Z
01:47
Zack
There was a bug that created Veo from nothing
01:48
The recipient voluntarily sent it to the burn address
01:48
That way we could quickly solve the issue with a soft fork, and the system didn't need any down time
01:48
I guess we could do an update to delete that address. It is a lot of money, it is distracting.
01:51
I think amoveo has had less than 12 hours of down time since launch, right?
99.93% uptime
Z
02:09
Zack
I think the way it will work is that the user enters a currency and amount they want to pay, and a currency they want to receive.
The interface gives the current best price it can calculate by looking at every possible combination of markets and contracts and open swap offers.
You can choose to either trade immediately at this current price, or you can post this trade as a swap offer along with a maximum price you are willing to pay.
02:10
So this gives us the advantages of the constant factor market maker, along with an order book, and it abstracts the complexity away behind an interface people have experience with.
s
02:43
sanket
In reply to this message
That's great to hear
Deleted invited Deleted Account
J
03:37
Josh
In reply to this message
Wouldn't this be a lot of computations if there are lots of markets?
Z
03:38
Zack
In reply to this message
I think the explorer can keep a database of the network of markets
MF
03:39
Mr Flintstone
he means iterating over the permutations
03:39
i think there are some tricks you can use to make it less complex
Z
03:39
Zack
In reply to this message
the optimal solution might be complicated, but a decent approximation should be easy enough.
03:39
at first we probably only care about direct pairs, or a 1-step path through veo.
03:39
and swaps
03:43
I think I wont use swaps for the first iteration
03:43
we want to get something done fast to try out
Doc Dagbjört invited Doc Dagbjört
MF
03:56
Mr Flintstone
03:56
so far
Z
03:57
Zack
im going to start by duplicating parts of it, and try to get feedback here as I go
03:57
im making tabs for swap and pool
03:58
but the pool tab is currently empty
MF
03:59
Mr Flintstone
cool
mamur21 invited mamur21
CD
05:58
Crypt Dweller
it literally takes all day for a deposit of VEO to clear at QTrade..
ŽM
06:12
Živojin Mirić
In reply to this message
😳
Z
06:13
Zack
Soon we will be able to do veo/usd trading on-chain
ŽM
06:14
Živojin Mirić
In reply to this message
Omg noice
sudoDeFi invited sudoDeFi
C
11:22
Callum Wright
In reply to this message
what's the other "currency" on this Uniswap clone?
11:22
USD?
11:23
synthetic BTC/ETH?
11:24
anyway will the Amoveo AMM "linear" like Uniswap and contains impermanent loss too?
11:24
if yes then VEO's current high spread might kill LPs
MF
11:32
Mr Flintstone
its the same as uniswap yeah
11:32
you can have whatever 2 currencies you want in the pool
11:32
so like trump wins and trump loses, or veo usd, or like btc eth etc
11:38
it makes most sense to put subcurrencies of the same set into the same pool. so if you have veo, usd, and long-veo, you can go from any one of the three to another with just one usd/long-veo pool. instead of having two pools where one is long-veo/veo and the other is usd/veo which is half as capital efficient
11:41
the UI will abstract it as if you are selling veo for usd, even if you only have veo and you are trading inside the long-veo/usd pool
11:42
thanks to the magic of flash loans and creating the same subcurrencies that are in the pool with your veo
11:44
you could do the same thing if you only have veo and you want to long trump, you can go to the trump wins / trump loses pool
BJ
12:02
Bear Jackson
Has anyone had any luck getting a1 exchange to respond
MZ
12:10
Mathiu Zatch 4 años en cripto 🇦🇷
MZ
Mathiu Zatch 4 años en cripto 🇦🇷 29.08.2020 12:01:21
how long does the transaction take
MZ
12:10
Mathiu Zatch 4 años en cripto 🇦🇷
?
12:10
Pending 30 min
Z
14:01
Zack
Normally blocks are 10 minutes. I think the recent block is slow.
C
14:04
Callum Wright
In reply to this message
if let's say I'm interested in TRUMPWIN/USD is there a way for me to not going through VEO at all? UX wise it is.
14:05
(just thinking out loud how to cut friction and lure liquidity)
Z
14:05
Zack
The tx fees are in Veo
14:06
We don't have an atomic swap to btc system set up yet
14:06
At this time, it isn't convenient to set this up without going through Veo.
C
14:10
Callum Wright
yeah it's ok, just trying to think it through. so the way to go in the future is BTC/ETH atomic swap to users can pay fee in BTC/ETH/USDT whatever?
Z
14:11
Zack
Atomic swaps do not enable fees in other currency
MF
14:13
Mr Flintstone
yes you would just put a usd->veo tx before everything
14:13
if you wanted to buy trump wins with usd
14:13
It is all done atomically in 1 transaction
14:14
i think what zack is building would already support that
14:15
you still need to have some veo in the account to pay tx fees
C
14:17
Callum Wright
okay, let's say I'm a platform owner of a platform built on top of VEO and I want to subsidize users the tx fees, like I have a pool of VEOs to pay on behalf of users, is there a way to implement that
Z
14:17
Zack
Maybe we can put a sub-payment-tx into the multi tx, to send some subcurrency to the miner.
And then the miner would pay the fee for us, and we don't need Veo?
MF
14:17
Mr Flintstone
doesnt that work?
14:18
that would be amazing. 0 veo accounts
14:18
or trade subcurrency for veo at the start of multi tx and use that to pay miners
Z
14:18
Zack
You just need a mining pool offering this service, and to wait for them to find a block
MF
14:18
Mr Flintstone
?
Z
14:18
Zack
In reply to this message
Oh right
14:18
As long as markets exist, you can buy veo to pay the fee inside the same tx
MF
14:19
Mr Flintstone
that is pretty solid ux
14:19
even ethereum doesnt really have that yet
14:19
I feel like they could though?
Z
14:21
Zack
I think flash loans are a hack afterthought on ethereum, and I bet that they can't be used to pay tx fees.
mx
14:35
mr x
In reply to this message
🤔
Z
14:56
Zack
I think i need to make some small changes to get it to work with 0-veo accounts.
But it should work with low-veo accounts once the updates activate
Chris Metals invited Chris Metals
KL
15:38
Karlis L
What do you mean by 0 veo acc? How/why would anyone be able to trade anything with no funds?
MF
15:55
Mr Flintstone
you would only have usd tokens in the account for example
15:59
no veo
15:59
its like on ethereum if you had only erc20 tokens in an account and could still send them around without any eth
KL
16:28
Karlis L
but how did you get the tokens? you still need to have VEO at some point , no?
16:29
i mean...to have value on amoveo chain account, you have to have veo at some point, no?
16:29
or...are you getting those tokens straight through "an exchange"?
16:31
like...i go to qtrade send BTC and buy "veo-wrapped-btc"?
J
16:35
Josh
you could also be a merchant getting synthetic gold payments
s
16:37
sanket
In reply to this message
how will we pay txn fee without veo?
16:37
Also, can sub currencies be mapped by say an exchange like qtrade?
J
16:51
Josh
the idea is that the miners will accept sub-currencies and pay the fees for you
16:51
In reply to this message
sure but we shouldn't really need them anymore
16:52
the only thing we need is to swap real btc for synthetic btc on amoveo
16:52
the price shouldn't really fluctuate
16:54
does it make sense to have an oracle decide if btc was transferred to some address on the Bitcoin blockchain?
16:57
or just use cross-chain atomic swaps
17:02
you can also use a site like localbitcoins to exchange cash for synthetic usd, it's easier because you don't have to worry about price fluctuations
Z
17:08
Zack
In reply to this message
No.
You do a flash loan to pay the fee, then use an AMM to sell your subcurrency for Veo to afford the loan
17:09
In reply to this message
.
J
17:11
Josh
How does the flash loan work? Who gives it to you?
Z
17:14
Zack
In reply to this message
A multi-tx is valid as long as all the balances end non-negative.

The blockchain gives infinite sized loans to whoever needs them, as long as they are paid back within the same multi-tx.

In amoveo using a multi-tx is smaller than publishing multiple normal tx, because there are fewer signatures
J
17:20
Josh
ah cool
Z
18:17
Zack
im thinking that when we remove channels, we should divide the money from any remaining channels between the owners
18:18
and for the unending stablecoin update, we should update the existing markets to the new format instead of supporting both formats at once
J
19:26
Josh
In reply to this message
50/50?
Z
19:26
Zack
right
19:26
we can give a long warning
19:27
if someone really wants their channel contract to continue, I can set up the update to convert that particular channel to the new format
J
19:27
Josh
the easiest is just to force them to close out the channels, if they care enough
19:28
50/50 split would do this
Z
19:29
Zack
yeah, I think that is what will happen.
Deleted invited Deleted Account
Deleted invited Deleted Account
EA
23:49
Eric Arsenault
In reply to this message
That would be 🔥🔥🔥
Z
23:50
Zack
In reply to this message
I think it is even better to use the AMM inside of flash loan, to buy the veo you need to pay the miner, all in the same tx.
MF
23:51
Mr Flintstone
if a block is full of vanilla spends about how many can fit?
Z
23:52
Zack
that way miners don't have to configure anything to accept subcurrencies
23:52
In reply to this message
I think with the original settings it was around 600. but I think we made the blocks smaller at some point
MF
23:55
Mr Flintstone
yeah -33%
23:55
so 400
23:56
so each tx fee is 0.00060657 so 400*0.00060657 = 0.24 veo
23:56
so if blocks were full i think this is all burned? versus the reward of like 0.13 veo
23:56
so i think technically it would be deflationary
23:56
?
Z
23:58
Zack
yeah, I guess if blocks were full it would be deflationary. And spend_tx are significantly cheaper than the other tx types.

this governance fee is burned, so it is like the people who are using veo are paying the people who are holding veo.
MF
23:58
Mr Flintstone
i wonder if this is desirable
23:58
clearly you cant have it be too deflationary
Z
23:58
Zack
it is good in the beginning, because spam attacks are so cheap right now
23:59
someone could pay to fill the blocks with slow to process txs, just to make it take longer to sync amoveo from now on
30 August 2020
Z
00:01
Zack
eventually when user activity increases, I expect that we will need to reduce the size of fees relative to the block reward.
Deleted invited Deleted Account
Z
01:16
Zack
The uniswap swap math gets kind of intense.
There are so many possible combinations to check
s
01:18
sanket
In reply to this message
This is 🔥🔥

With a simple ui I think this will be 👌
Z
01:20
Zack
A direct market is simplest.

We also need to care about 2 steps of markets, or 3 steps etc.

If there is a path of markets that connects all subcurrency flavors from a contract, then that means it is possible to go from any of those subcurrencies to the source currency.

So either the currency you are selling, or buying, we should check if they can be converted to a source currency this way, and if the source currency has some chain of markets connecting to the other currency.
Or if the 2 source currencies connect together.

And we can chain these different operations together.

I think the final solution is going to be similar to calculating how much electricity is flowing through every path of a circuit.
01:21
It's a weird circuit though, because the markets, they are like resisters whose resistance chances based on the amount of current through them.
01:22
In reply to this message
Yeah, I think it will make the user experience nicer
s
01:23
sanket
When do you think we will be implement and use this?
Z
01:25
Zack
The perfect solution might take me some time. Weeks.
But I want to have a really basic version available for when the amm update activates in like 10 days.
The basic version will only consider a handful of hard-coded paths, like the direct path, or the one-hop through Veo
01:25
The perfect solution should also consider open swap offers in order books.
01:27
In reply to this message
Oh, you are asking about zero Veo accounts.
01:28
The hard update is pretty small, less than a day to do I think. But then we need to wait 2 weeks for it to activate
s
01:28
sanket
Yeah. But its good if we can have that amm built.
Z
01:29
Zack
There is a lot going on now, it might take a few days for me to have a chance to write the 0-veo account stuff
01:29
I'm also looking forward to the perpetual stablecoin update soon
s
01:31
sanket
Ok. perp stablecoin and amm sounds really potential stuff
Z
02:12
Zack
currently when providing evidence to a smart contract to close it, it is still possible to buy shares in that contract or withdraw.

But the plan for the perpetual stablecoin update, with that plan sometimes a contract changes the source currency it is priced in.
When the source currency is in the process of changing, we can't let people buy a full set or combine a full set back into the source currency, because we don't know which one is the source currency.
02:13
or maybe we should allow people to withdraw to the first source, and it simultaneously refunds part of the safety deposit for the swap to the new source.
mx
04:42
mr x
one can also do simple tokenization/ICO with subcurrency
Z
04:55
Zack
Amoveo only has derivatives. I think an ico wouldn't work well
I
04:59
Instinct
In reply to this message
I guess u could try to determine fair price by having a market for the ico token
mx
04:59
mr x
just send "winning" type to burn address?
I
05:06
Instinct
In reply to this message
I wonder if that will get traction, markets for synthetic tokens that don’t exist yet like dfinity for example. Some projects take a long time to launch & traders want in or holders with long vesting periods might want to hedge
mx
05:54
mr x
or simply only allow initial set buy and disallow combining to source
05:55
or whatever way shouldnt be too hard lol
I
05:56
Instinct
In reply to this message
How would u set your address for the actual token distribution? It would only be a derivative trading on Amoveo.
mx
05:58
mr x
i just mean putting trusted tokens like tether/revenue shares on amoveo rails
06:00
yeah just make a subcurrency and declare one type to mean something xD
06:00
sorry im drunk
I
06:01
Instinct
In reply to this message
😂
06:01
In reply to this message
Got you 👍
MF
06:06
Mr Flintstone
no blacklist tho
mx
06:19
mr x
right
mrFEARless invited mrFEARless
m
06:58
mrFEARless
Hello
Ken Saxon invited Ken Saxon
K
07:09
Ken Saxon
I’m up 250% already this week. Please don’t let me down Zack.
07:09
If you make a fork of an eth project (on eth) not amoveo that accures value to VEO, I will hodl all the way past $1000
07:09
as long as you grab the eth liquidity. we will hodl for you to $1000 and beyond.
07:10
250% on my other coins I mean.
07:12
fork that liquidity, don’t build it on your own platform. but just have veo get the rewards from eth. Make us all get to $1000, and we will love you forever.
G
07:13
Gregory
given the defi mania veo can trade similar to YFI if it starts accruing assets
K
07:13
Ken Saxon
the market will end within 4 months. just like 2017. don’t let us down zack.
G
07:13
Gregory
why 4?
K
07:13
Ken Saxon
I still give a 1% probability that you’re not a total retard, even if you have been the past few years.
07:13
4-8 months is my estimate
G
07:14
Gregory
how come
K
07:14
Ken Saxon
no real reason, this looks liek exact repeat of 2017
07:14
#make zack not a total retard so we can make millions please
G
07:14
Gregory
not yet. there is minimal retail involvement relative to 2017 where there was mass mania
K
07:14
Ken Saxon
i’m already up 5x on yfii
07:14
of course its a mania
G
07:14
Gregory
check YFL as well ;)
K
07:14
Ken Saxon
just starting but we only have af ew months tod o it
07:14
fuck yfl
07:14
china team is way better
07:15
i mean its cool and im glad for their gains
07:15
but im like who cares?
Max invited Max
K
07:15
Ken Saxon
higher market cap more liquidity even providing better returns, so i stick with yfii
07:15
we just need our community to help zack come to his senses and not be a total retard
07:15
hopefully he can snap out of it
07:16
i have even more massive capital at my disposal if zack stops being a retard. made massive on 2016-2017 cycle, and now i’m up another 250% on defi.
07:17
but unfortunately i’m 99% sure he’ll keep continue making the wrong decisions. There’s an analysis by ycombinator that basically founders that make a few right decisions, tend to keep making every decision right. and founders that fuck a few things up, fuck everything up. this is veo right now.
07:18
it’s so obvious all he needs to do is use his 150 IQ dev chops to fork an ETHEREUM project (NOT veo codebase), clone the shit out of the ETHEREUM project, do migration mining. and have veo get staking rewards from the ETHEREUM project. then he will be a billionaire and we will all be happy.
07:19
we all understand that you want everything to be built around VEO and the world to revolve around it, we believe it can happen too. But you must COMPROMISE first and have a stepping stone of liquidity to veo. The only way is to fork a project with the ETHEREUM codebase and do MIGRATION MINING.
07:22
please don’t clone uniswap by making a version on the veo codebase. It will fail. Please listen to me just this once. It might only take you a month on my advice, and I GUARANTEE you, this project will fucking take off like you can’t imagine.
07:22
please get ETHEREUM LIQUIDITY ASAP.
T
07:23
Topab
You could do a DAC to fund such a proyect
K
07:23
Ken Saxon
no nobody cares about whatever buzzwords are on veo right now. ETHEREUM. then you can do whatever the fuck you want.
07:25
life is sometimes like the olympics. there are some athletes that train decades to try to win. and every time they fuck up when it matters. Nothing you do after 5 months or so will matter. You need to show your 160 IQ dev chops NOW. and get the liquidity NOW. Please please listen to us.
07:26
If you do not spend your time on the right things now, nothing you do in the next 5 or 10 years for veo will matter at all. the risk/ reward for trying my plan is so much better
07:28
anybody with significant veo with me? I have more than 1000 VEO. We can make futarchy contract if zack can please agree with me.
MF
07:29
Mr Flintstone
you are willing to short veo if your little plan doesnt happen?
07:30
thats how it works
AG
07:40
A G
1000 veo :) (1,35%)
JS
07:55
Jon Snow
In reply to this message
I thought life is like a box of chocolates? When did it turn to Olympic?
CD
08:51
Crypt Dweller
What do people think about C K's plan?
08:52
He's probably right that Amoveo won't attract a userbase without tapping into the DeFi mania
08:53
Whatever marketing attempts this community tries to make will surely fail to make any significant effect
08:53
I think this market could end sooner than 4-8 months and all this side project would achieve then is small PnD on VEO
K
09:13
Ken Saxon
curious did you buy defi coins?
CD
09:34
Crypt Dweller
No
09:34
Why?
K
09:47
Ken Saxon
just interested in investor psychology
09:47
since you used the term “defi mania” it implies that you think it’s a crazy valuation for these projects
09:47
and that you probably didn’t buy the coins
CD
10:03
Crypt Dweller
This is off topic
MC
11:04
Mr Crypto
In reply to this message
LOL
T
14:51
Topab
Vampire attack. Could Amoveo do something like this from eth. This is what ck is proposing https://twitter.com/martinkrung/status/1298363320270032897?s=19
Z
15:35
Zack
I'm getting closer to the uniswap mechanism.
I think I realized how to optimize the different paths.
We want each path to end on the same price.
The price to buy one more satoshi along each path needs to be the same.

So I think we need to calculate formula for the final price of each based on how many we buy, then set these final prices all equal, and solve for how much to buy on each path.

I think it will look something like solving a system of equations.
15:37
Price is the derivative of cost with respect to how many you are buying.

So we start with formula for the cost on each path, we take the derivative of these costs, set them all equal, and solve for how many to buy of each type.
15:39
I think solving a system of equations automatically is the same as diagonalizing the matrix. The values along the diagonal are how much to buy on each path.
15:41
It's a fun problem.
We are using graph theory, linear algebra, and calculus all in the same problem.
15:45
In reply to this message
I feel like that only makes sense in the context of 2 competing liquidity pools on ethereum.
T
15:48
Topab
Yes
Z
15:48
Zack
In reply to this message
I think this solution also tells you which paths to go backwards on, to earn free money by arbitrage to get a better price for your trade.

I wonder how the math changes if we account for whether or not to accept swap offers in the same multi-tx.
15:49
Maybe we should try all 2^N combinations of the N swap offers that exist related to our path, and see which results in the best price?
15:50
Maybe we start by calculating the price without swaps, then we include any swaps which we would be trading at a better price than we are currently trading at.
15:51
Then we calculate the path weights again with the extra swaps.
Then check again if any other swaps are at a better price than we are trading.
And do this loop till we get a fixed point of which swaps to use.
15:59
Actually, I think linear algebra doesn't work here, because the system of equations we are solving, i think they aren't linear equations.

It's still just a system of equations though. There should be a way to automatically solve it.
16:08
I think if we do the same math, but swapping a currency for itself, this is how we calculate arbitrage opportunities in the system.
16:12
The problem of finding the possible paths is graph theory
16:18
Oh, the different paths can be partially overlapping.
So buying shares in one path will change the weights of other paths.

Maybe an exact solution is too expensive in that case.

An approximation could work like this:
We calculate the derivative of the cost we are paying on every path with respect to changing how much we buy by a small amount.
The paths that are more expensive, we should decrease how much we are buying.

The paths that are less expensive or profitable, we should increase.

Then try again with the new values, and see if your guess had improved. If so, then update to the better guess.
If not, then back up, and try again with a smaller step size between iterations.
16:19
Or maybe we can embed an algebra system that can account for the interdependencies between the formula for cost for each path.
16:20
I think i need to actually calculate some examples of these formula to get an idea on whether an exact or approximate solution is more appropriate here.
Z
16:40
Zack
If we are using circuits as a model for the markets, and the flow of trades is the flow of electrons in the circuit, then I think the markets are more like capacitors than resistors.
16:44
I feel like I can solve a system of just markets now.

But if we also include contracts, which give us the ability to combine groups of subcurrencies back into their source currency or the reverse, then I am less confident in how to solve this.
16:48
I think finding the paths wont be too hard. we don't want circles, so we can use a dictionary database to easily verify we aren't circling back on ourselves.
We can use a flood-fill algorithm starting from either end, go outwards 5 steps, and then compare the painted regions together. This gives us almost every path we could care about.
16:54
to use a contract, you need to set up the rest of the trade so that you have equal amounts of each of the subcurrency types for that contract. that way you aren't left holding spare subcurrency in flavors you don't care about.

solving for how to most efficiently buy/sell each of the flavors, it is like this problem is inside of itself again.
I
17:08
Instinct
In reply to this message
Short sighted p&d plan
Z
17:15
Zack
A contract starts with 3 currency types: A, B, C
and A <-> B+C
So only one path is available, and since we are swapping one currency for one currency in this interface, this path is never useful to us.

How can we turn it into a 3-way intersection so we can trade any of the 3 types for any other?
if there is a market-path between B and C, B <-> C
then you can swap A to B by selling A in the contract, and swapping C for B in the market.
Since B and C are symmetric, this also shows that you can swap A to C.
And B and C are solved by a market connection.

if there is a market path between A and B, A <-> B
Then you can swap A for C by using the contract to convert A into B+C, and using the market to sell all your B for A so you are left with only C.
You can swap B for C by using the market to sell your B for A, and using the contract to change your A into B+C.
17:17
So basically, for any market path between any pair of the 3 currencies in one contract, that is one way that we could use this contract as a part of our uniswap.
17:17
I think this pushes the algebra out of the solvable zone, so we need to use some approximation algorithm
17:21
maybe we should specifically disallow contracts that connect a subcurrency to it's source currency, if that contract only has 2 flavors.

Because it seems like it is always more efficient to make the market be between the 2 flavors.

We have shown that all the 3 markets are equivalent, I think dividing liquidity between them and doing math to avoid creating arbitrage opportunities, this just makes part of our trade 3x longer than it needs to be.
Z
17:44
Zack
we want every path to end with the same instantaneous price.
For case where we are using a market, that means the path is splitting into 2 parallel parts, and we want the sum of the instantaneous prices of these parallel paths to be the same as the instantaneous prices on the other paths.

So like, if you are buying/selling B and C to make A, then the final price of B + the final price of C needs to be the same as the final price of A on all the other paths.
17:44
I think we can fit that into an algebra system at least.
31 August 2020
Deleted invited Deleted Account
Deleted invited Deleted Account
Deleted invited Deleted Account
Z
07:03
Zack
Another complication is if 2 paths are partially overlapping.
In that case changing the amount we purchase on one path changes the price on the other.
It makes me think an approximate solution is going to be best here.
Антон invited Антон
А
07:09
Антон
hi, Zack! is the project alive? What are your plans, what key events are planned? Please say something nice)
Z
07:16
Zack
in about a week a hard update will active for a new kind of smart contract system.
This time if you participate in a derivative contract, your side of the contract acts as a spendable currency.

A few days after that the automatic market maker update will activate. that will let us make uniswap type markets out of pairs of the currencies.
07:16
right now im working on a clone of the uniswap interface
А
07:26
Антон
I am very glad that you continue to move! I wish your project success and worldwide recognition! I am sure you will achieve the highest goals!)
Z
07:28
Zack
thanks for the support.
А
07:37
Антон
please tell me, if the tokens are on the exchange for example on qtrade, they can somehow be affected?
Z
07:41
Zack
The tokens on qtrade will still work the same.
You can use those in the light node to access the new features.
А
07:55
Антон
thank you so much for your reply!
LS
08:35
Lyndon Something
hey all, anyone know who to contact for the Exchange Amoveo telegram bot support?
Z
08:42
Zack
I think exantech made it?
@denis_voskvitsov
LS
12:35
Lyndon Something
In reply to this message
Thanks all sorted.. much quicker than I expected.. keep up the great work! ;]
CoinProspector invited CoinProspector
s
13:36
sanket
What happened to Ikigai fund? are they still invested in veo?
CB
15:55
Cream E. Biggums
I highly doubt they sold
C
15:55
Callum Wright
they don't disclose their portfolio me think
B
15:59
Ben
usually fonds don't think in such short timespan
C
16:06
Callum Wright
yeah, i think current price is roughly around the price that they announced their "investment", so actually not that bad
16:13
In reply to this message
I think what more important is remove friction, as no normal people will go to qTrade to buy VEO just to participate in a market. then eventually Zach can build a bridge to wrap the market subcurrencies into ETH tokens if we really have to tap into liquidity in ETH dexes
B
16:28
Ben
yeah true
MasterFrogda invited MasterFrogda
M
16:31
MasterFrogda
what is the token contract address?
I
16:33
Instinct
In reply to this message
It’s not erc20
M
16:33
MasterFrogda
In reply to this message
👌
coindab.com invited coindab.com
c
18:54
coindab.com
hey what's the total supply of VEO?
Z
18:54
Zack
Right now about 74k
c
18:55
coindab.com
so the circulating supply is 74k , and total supply is infinite?
18:55
how many tokens are minted each year?
Z
18:56
Zack
The governance mechanism controls the block reward
I
18:57
Instinct
In reply to this message
Inflation is around 7% rn
c
18:57
coindab.com
cool, cmc data is not correct atm
B
19:01
Beer
if cmc keeps going like theyre going, theyre out by eoy 2020
19:02
almost none of their supplies make sense and it has now become a binance marketing site
Z
19:02
Zack
I think coinpaprika does a better job
B
19:05
Beer
yes agreed. and they can claim the emoticon of the paprika - not unimportant in this market
I
19:06
Instinct
We should get it updated on coingecko, lots of people use that now
Z
19:08
Zack
For capacitors in electrical circuits the basic formula is Q = C * V
(amount of charge in the capacitor) = (capacitance of that capacitor) * (voltage drop across the capacitor)

This formula is nice because it is well studied. We know how to look at complicated systems of capacitors and calculate the capacitance of the entire system for example.

I think there is a similar formula for making trades.
(amount of coins you put into the market) = (liquidity of that market) * (price slippage).

I think we can reuse math from circuits to calculate the optimal uniswap trade. The optimal trade wont create arbitrage opportunities.
19:21
there is a trading channel on discord. this isn't the right place.
Z
20:06
Zack
I think it doesn't work exactly the same as capacitors.
in constant factor markets, if the initial quantities of coins in market M1 are m1, and m2, and I am paying B of currency 1 to buy currency 2, then the final quantities in the market are (m1 + B), and (m2*(1 - (B/(m1 + B)))).

so the initial price is m2/m1
and the final price is m2*m1/((m1 + B)^2)

To avoid front-running we are often trying to set the final price on different paths to be equal.
In that case we want to solve this formula for how many coins to purchase on this path.

B = sqrt((m2 * m1) / price_final) - m1
It can potentially be negative, and in that case it means we are simultaneously profiting from arbitrage while doing our trade. Like a negative fee.
Z
20:26
Zack
If there are 2 markets in parallel, MA, and MB.
market A has constant factor KA, and market B has constant factor KB, and the initial coins of type 1 in each market are a1 and b1, and we want to buy P coins worth, then we can use this system of equations to calculate how much money to put on each side.

Pa + Pb = P. the total amount paid is the sum of amounts paid on each path.

(a1 + Pa) = (b1 + Pb) * sqrt(KA / KB)

the final amount of coins in market A is a1 + Pa. in market B it is b1 + Pb.
20:33
this is the familiar Q1/C1 = Q2/C2 formula for capacitors in parallel and all share the same voltage drop.

So the analog for "voltage" must be how far the price moves, assuming it had started from a relaxed state with no arbitrage opportunities.

If markets are in parallel, all their prices move the same distance.

so I guess the "capacitance" of a market is the geometric mean of the amount of shares on each side.
the capacitance is the sqrt of the factor that we keep constant.
20:33
I guess it really is like capacitors :0
20:34
So a person could look at the markets, use a circuit board to set up some capacitors to mimic those markets, measure the voltage drop in a couple places, and make the perfect trades based on those voltage drops. haha
20:35
it is a kind of analogue computer
20:36
the current number of shares in the market is roughly the same as it's capacitance.
But always a little less, since the liquidity share holders are being paid fees.
20:41
This is so weird.
Why would math from capacitors be so useful here? haha

I think it only works like this for constant factor markets.
20:54
the choice to include a swap offer or not, that is like the choice of how much charge each capacitor should start with.
Deleted invited Deleted Account
Z
21:56
Zack
Q = C * V

money locked on one side of the market in the trade =
capacitance of that market *
price slippage of the trade.

capacitance = sqrt(coins on side 1 * coins on side 2).
21:59
Now we have a lot of math tools to help make these arbitrage-free trades.

If I plan to drop a certain number of coulombs of electricity into a system of capacitors, and I want to calculate how much the voltage will change in other parts of that system of capacitors, what is the best algorithm for that?
Can we use algebra, or do we need an approximate method?
22:06
I think this is a pretty big discovery. constant factor markets are like a financial version of capacitors.
Z
23:07
Zack
in a constant factor market, the constant is the capacitance squared.
C*C = coins1 * coins2.

if I spend N of coins1 to buy coins2, then the change in price of coins2?
we know that
coins1*coins2 = (coins1 + N) * (coins2 - G)
-> G = coins2*N/(coins1 + N)
where G is how many coins of type 2 you get.
the change in price of 2 is:
original price coin2/coins1
final price (coins2 - G)/(coins1+N)
plugging in G (coins2 - (coins2*N/(coins1+N)))/(coins1 + N)
=coins2((coins1 + N - N)/(coins1 + N)) / (coins1 + N)
=coins2*coins1/((coins1+N)^2)
=C*C/((coins1+N)^2)
=(C/(coins1 + N))^2
23:09
if we consider 2 markets in parallel, then we would want the price slippage for both markets to be equal. that way there is no arbitrage opportunity.
23:12
Ca is the constant for market A.

`Ca*Ca/((coinsa1 + (buy in market A))^2) =
Cb*Cb/((coinsb1 + (buy in market B))^2)`

we can sqrt both sides
Ca/(coinsa1 + (buy in A)) = Cb / (coinsb1 + (buy in B))

for electric capacitors we have the formula for parallel capacitors C1/Q1 = C2/Q2
It is the same here. but instead of a quantity of electrons, it is a quantity of subcurrency.
23:19
If we consider 2 markets in series, then the total price slippage of the system is the sum of the price slippage of the parts. and the quantity of subcurrency pushed through is the same for the entire path.
(total slippage) = slipage1 + slippage2
total slippage = paid / capacitance1 + paid/capacitance2
total paid / total capacitance = paid / capcitance1 + paid / capacitance2
-> 1/C = 1/c1 + 1/c2
Z
23:53
Zack
oh, I think I found a problem in the math
23:53
maybe it isn't exactly like capacitors
1 September 2020
Z
00:00
Zack
Voltage is analogous to the sqrt of the price, not to the price.
00:13
I think the price is growing by the square in the upper limit. with capacitors it is growing linearly.
so it is pretty different.
Z
00:40
Zack
I think the capacitor math works for small trades where the price isn't moving very far.
It is like the first order approximation for how much the trades should be
00:41
but for bigger trades the price starts moving non-linearly
Z
04:57
Zack
so I think the way we will do this, is we will find one or more paths.
All the money we want to spend gets divided on the paths.
And we calculate what the final price would be along each path.
So we keep updating how to divide up the money on the paths until the final price for every path is the same.

If the final price is higher than average, we spend less on that path. if the final price is lower than average, we spend more.
nextrad invited nextrad
Z
05:00
Zack
im considering calculating the paths on the server side
05:02
it just seems like doing individual http requests for every market and smart contract to try and find the paths would be a bigger burden on the server vs just sending the list of paths all at once.
05:04
maybe I should check for paths back to veo, then look for any shortcuts between my paths that skip the veo step.
05:04
that seems like it would almost always find all the paths
05:05
if there is a subcurrency popular enough that it is used to price ancestor contracts on both sides, then surely that subcurrency would also have a market connecting it to veo.
05:07
making paths towards veo is easier, because we just keep heading towards the source
05:09
we could probably make some great visualizations of this once it is running
05:09
showing the single trade pushing money through dozens of markets from a source towards a sink. like a lightning strike.
А
05:11
Антон
In reply to this message
when will it be launched?
Z
05:12
Zack
1700 blocks until the AMM update activates. that is like 12 days.
hopefully the uniswap interface is ready before then. I will do my best.
А
05:19
Антон
I hope everything goes as planned
c
07:28
coindab.com
hold on amoveo's version of uniswap?
JS
08:00
Jon Snow
In reply to this message
And better
c
08:01
coindab.com
wow nice, so it's like a cross-chain swap tool?
JS
09:04
Jon Snow
In reply to this message
Don’t think so
Nyzblossom invited Nyzblossom
А
19:27
Антон
In reply to this message
where, then, can a normal person get a VEO, except on the qTrade?
s
19:30
sanket
What's a good solution to onboard them?
A veo <> Erc20 bridge to onboard them via Ethereum?
x
19:32
x
is there a guid e for using the light node
D
19:32
Deleted Account
In reply to this message
Kulupu and Mix got erc20 wrappers recently
19:32
Both DOT projects
19:33
Similar concept maybe
Z
19:33
Zack
In reply to this message
you can ask questions here. What isn't clear about it?
x
19:34
x
after I cloned to light node github, do i need to enter an IP somewhere
19:35
so
19:36
src/js/home.html
Z
19:37
Zack
Home links to a lot of pages.
Are you trying to spend or receive?
x
19:37
x
i want to check balances only there isn't a link for on the homepage
19:38
* for that
19:39
You can look up the balance of a pubkey here
x
19:39
x
light-node-amoveo/src/js/txs.html?mode=production
19:39
now i'm on this page
19:39
if i want to send or recieve
19:39
do i have to enter an IP on that page
19:40
i remeber that's what i need to do several months ago
19:40
file:///home/xxxx/light-node-amoveo/src/js/txs.html?mode=production
Z
19:41
Zack
I think that page is currently set up to use a full node I am running by default.
x
19:41
x
i see
Z
19:41
Zack
I can expose the interface to connect to others if you want
19:41
We hid it to keep it simpler for now.
x
19:45
x
1e-8 VEO
19:45
what does this mean
Z
19:46
Zack
0.00000001 veo
ŽM
19:47
Živojin Mirić
I heard something about airdrop VEO?
x
19:47
x
ok
Z
19:48
Zack
In reply to this message
sounds like a scam.
ŽM
19:48
Živojin Mirić
In reply to this message
Probably
Matthew Maffew invited Matthew Maffew
Z
21:08
Zack
Ive got a function on the server that can accumulate all the markets and contracts that lie on paths between 2 subcurrencies.
So I think I just need to look at the space of possible contract_liquidity txs and market_swap txs that result in spending our money and buying what we want.
Deleted invited Deleted Account
Z
22:15
Zack
I can make a list of all the txs that are necessary to build the multi-tx. I am just not sure how much to buy/sell in each of the txs.
22:18
I think next I need to take the markets and contracts, and calculate all possible paths from the start to the finish.
22:19
then we can look at combinations of those paths.
S
23:22
Sebsebzen
In reply to this message
bullish
MF
23:37
Mr Flintstone
it costs $40 to make a trade in uniswap right now
23:38
maybe we should dupe the popular markets with synthetics so ppl can trade them on amoveo for cheaper. since they are so volatile would probably need the perpetual update
23:39
could even use uniswap as the resolution source for price
c
23:39
coindab.com
ETH gas fee is a joke
JS
23:40
Jon Snow
In reply to this message
Good idea
MF
23:43
Mr Flintstone
what would be cool is an atomic swap from usdc or dai to amoveo usd once spreads get tighter
23:44
i think both chains have a hash function in common?
23:44
also seems like it might be a worthwhile dac goal
23:45
what should we call synthetics on amoveo? i think the a prefix is taken so maybe v? so like vUSD, vETH etc
I
23:47
Instinct
In reply to this message
+1
JS
23:47
Jon Snow
vUSD Sounds cool
I
23:51
Instinct
In reply to this message
Yep
mx
23:56
mr x
yeah jimboslice proposed the same naming convention a while back
MF
23:58
Mr Flintstone
one problem with that is that the maturity date and collateralization are different
23:58
or could be different for two things called vUSD
Z
23:59
Zack
even perpetual USD could be customized to have different amounts of margin
MF
23:59
Mr Flintstone
but you could be like vUSD - Sep 2020 - 7x
2 September 2020
MF
00:00
Mr Flintstone
i think with perpetual contracts the lower the margin the more fees you end up paying
00:00
as you get rotated through contracts
00:01
vTRUMP vBIDEN etc
00:02
since they are their own tokens
MF
00:22
Mr Flintstone
what do u guys think about a testnet trading competition
00:24
whoever ends the day with the most testnet veo gets some real veo
Z
00:25
Zack
is the testnet still operational?
00:25
do I need to restart it?
MF
00:25
Mr Flintstone
maybe once we can mess around with the uniswap clone?
Z
00:26
Zack
I can generate the paths that get produced from only markets.
im working on including contract_use_txs in the paths too.
MF
00:26
Mr Flintstone
that way there would be good testing before it goes live
mx
00:37
mr x
In reply to this message
yes
MF
00:37
Mr Flintstone
maybe like winner take all a few hundred usd?
00:38
or prize pool
Z
00:38
Zack
Sounds like the trick to win is to make the biggest coalition, and write a lottery contract to choose a winner in that coalition
MF
00:38
Mr Flintstone
hey if you do that good for you
00:39
we can disqualify certain behavior
00:39
like spends
Z
00:40
Zack
Can we?
MF
00:41
Mr Flintstone
yeah if you spend you dont get to win
00:41
of course you can do other manipulative things outside spends
Z
00:41
Zack
I'm pretty sure you can hide the spend in the off chain part of a contract
MF
00:41
Mr Flintstone
i would be honestly shocked if someone went to those lengths for a few hundred
00:42
i put up a bet that 2+2 = 5 once for like 2 or 3 veo and nobody took that
JS
00:42
Jon Snow
In reply to this message
This jimboslice fella sounds like a smart dude
Z
00:43
Zack
He usually uses the discord
MF
00:46
Mr Flintstone
it would be worth the price of admission to see people come up with ways to cheat to win the prize
00:46
but i think that ppl probably would just trade in the amm like they are supposed to
EA
00:47
Eric Arsenault
In reply to this message
+1
00:47
In reply to this message
this would be fun
00:49
but how would oracle resolve on testnet?
Z
00:50
Zack
Is oracle resolution part of the game? You can profit from resolving it first
00:51
But if someone tries to lie, we can't fork the testnet.
00:51
I could just agree to use the block rewards to force the oracle
MF
00:51
Mr Flintstone
whoever controls the prize dictates the rules
00:51
this is completely centralized
00:52
reporting or profiting off of a lie in the oracle is a disqualification
00:52
this is all testnet anyhow
00:53
but i suppose it would get messy
EA
00:53
Eric Arsenault
lol that works
MF
00:53
Mr Flintstone
so maybe we can do poa or something
00:54
or like zack said use the block rewards to force the outcome
00:55
in the case of malfeasance
00:55
but that by itself would ensure there isnt any
Z
01:09
Zack
im calculating a bunch of paths you can take from one subcurrency to another, using smart contracts and markets along the way.
Because the ideal trade will be some combination of these paths.

Previously I had been thinking I would look at the price of each path, and then adjust how much I spend in each path until the price of each path is the same.

But now I am realizing that the prices are different depending on the order I process the trades in.
01:18
If there are only 2 paths, I know some quick methods to find out the best combination of those 2.
A simple solution is a binary search.
But faster might be to take estimates right next to each other to estimate the slope at a point, so we can do newton's method and close in on the optimal value more quickly.

So if there are more than 2, one option is to keep dividing them into 2 groups, and doing the newtons method to decide how to balance the value between those 2 groups.

If we keep doing this, it will keep improving the price at which we can trade, asymptotically approaching the optimal trade.
01:18
or maybe we can do something like newtons method, but generalized for N-dimentional space
01:19
we could take a partial derivative in each of the N directions and make a vector out of that, and it would point in the direction we need to move to get a better price more quickly.
01:20
estimating the partial derivative by calculating the price at 2 points in N-dimentional space that are very near to each other.
01:30
we would estimate the price 2*N times to do one partial derivative.
And maybe 5 partial derivatives to find the optimal price.

If there are 4 primary paths between you and your goal currency, that is like 40 path-price-calculations. which should be well below a second, even in javascript.
01:31
oh, I think this is called the "gradient vector"
01:32
I think this will work.
x
01:42
x
In reply to this message
how
Z
01:43
Zack
oh right.
I think my capacitor math does work for making very small trades. because very small trades are linear, so the capacitor math that uses linear capacitors, it works.
So I think we can use that math to generate an algebraic formula for partial derivative of price in each direction.
Then we can calculate the gradient instantly.
01:48
we can use that simple formula for combining the market-capacitance of each path, and then calculating the the partial derivative on the path is O(1).

Trading doesn't change the market capacitances. so you only need to calculate the capacitance of each path once, and then you can keep calculating the gradient from any position as many times as you want.
EA
02:00
Eric Arsenault
Maybe this problem doesn’t need to be solved yet Zack? I mean, let’s just use it and get user feedback on what we need? Might make more sense to just work on getting the UX to a point where it’s intuitive
02:00
Just an idea
Z
02:01
Zack
What would be more useful for making the ux intuitive than this?
EA
02:01
Eric Arsenault
If people really want to swap from one currency to any other and have the path all mapped out, then solve that?
02:01
In reply to this message
Just a nice intuitive interface
Z
02:01
Zack
?
MF
02:01
Mr Flintstone
all of what zack is working on is under the hood
02:01
uniswap interface shouldnt change
02:02
much, i mean there wouldnt be metamask
EA
02:02
Eric Arsenault
👍 nw,just wanted to throw it out there
Z
02:03
Zack
what is our other option?
expecting users to first use their veo in a smart contract to divide it into true and false subcurrencies, and then they swap the true currency back for veo, then they use that veo to buy more into the smart contract.

I really would prefer that the users not know what a smart contract is.
They just use veo to swap into owning a bet or a stablecoin or whatever.
MF
02:04
Mr Flintstone
yeah
EA
02:05
Eric Arsenault
Right
Z
02:10
Zack
oh, there is a super easy closed form to calculate the gradient.
The partial derivative in a direction, that is the price.
The price in that direction, it is (how much you get)/(how much you spend), which is (# coins on other side)/(# coins on your side)
And if a path has multiple steps, you just multiply the price of each step together.
MF
02:11
Mr Flintstone
what about the slippage?
Z
02:12
Zack
you need to write it seperate on each tx that makes up the multi-tx
02:12
on each market_swap_x
02:13
I was going to default it at like, 1%.
I figure at first the trades will be slow enough, there wont be two people publishing at the same time anyway.
K
02:13
K
Is amoveo illegal to use in the USA? I can create a financial derivative with people from countries that don't allow it. Why don't any US based centralized derivative platforms allow for things like this to happen?
Z
02:14
Zack
In reply to this message
I don't offer legal advice. haha
02:14
use it at your own risk.
02:16
maybe someone can get a lawyer in here to find out
MF
02:18
Mr Flintstone
i wonder if they would make ethereum illegal to use in the usa. would be pretty surprising
J
04:22
Josh
In reply to this message
v is cool because it also sounds like "virtuals", we could call them virts
04:26
In reply to this message
If someone tried to make a company that does centralized Bitcoin or Ethereum it would be shut down in a second. There are different rules for decentralized systems. This is something government reaction to cryptos taught us.
CD
05:31
Crypt Dweller
exciting stuff, this could be the turning point for amoveo
JS
05:58
Jon Snow
Cannot wait to buy some vYFI
mx
06:40
mr x
when vQTRADE
JS
06:49
Jon Snow
vQtrade is like selling/buying vUSD
mx
06:56
mr x
just some index of qtrade coins
JS
06:57
Jon Snow
Can be done
mx
07:00
mr x
dunno if anyone wants that but it could be sort of thing to do in our niche
I
07:00
Instinct
vVEO o.O
mx
07:00
mr x
In reply to this message
💪
07:02
(i dont own any other qtrade coins)
JS
07:02
Jon Snow
VEO Squared
Z
09:07
Zack
scalar contracts aren't so bad. they have 3 currencies. the source, the stablecoin, and the long-veo.
if there is a market between any pair of the 3, then we can move money between any of the 3.

binary markets are more complicated.
They have 4 types.
true, false, bad-question, and the source currency.
We need at least 2 markets to be sure that we are able to convert between any of the 4 types.
at most there can be 6.
C
10:21
Callum Wright
In reply to this message
yeah, need to make sure they can't arb easily though
10:21
synthetic on illiquid assets is quite risky
JS
10:48
Jon Snow
In reply to this message
First, we need people come to arb
EA
14:00
Eric Arsenault
Another thing that would be super nice from usability @zack_amoveo is getting rid of the expiries on all the virtual assets
14:00
I think that ads a whole other level of complexity from a usability perspective
14:01
Not something I want to think about as a user personally
x
15:06
x
anywhere else i can find some trade history besides this ?https://amoveobook.com/expiredMarkets
x
16:17
x
seems to be this:
x
18:22
x
currenctly suppose there are not enough users, and it's a very short term trade, and no one take a bet , what will happen?
Z
19:13
Zack
In reply to this message
we have a plan to achieve this.
the same way we managed to embed the price inside the scalar oracle, we can embed the start height inside as well.
19:13
In reply to this message
that isn't a trade history. that is some oracles that expired.
19:14
In reply to this message
no, those are oracles.
Amoveo trading so far has all been off-chain, in the channels.
Z
20:32
Zack
Now it looks like I can generate the paths between any pair of currencies.
Next I need to figure out how much money to put through each path so we can generate the tx.
20:35
oh, I only programmed it to do scalar contracts
20:36
in many cases you can fit a binary question into a scalar. the drawback is that we lose the "bad question" case.
20:36
Ill add binary contracts later if we are happy with how it works
20:40
I made 2 scalar contracts with 4 markets joining random subcurrencies together, then asked it to generate the paths between pairs of the 4 new subcurrencies.

for one of the pairs it can find 8 paths.
20:41
so next up I need to simulate running the trades in javascript to calculate how much it will cost to use different ratios of the paths.
Z
21:16
Zack
I was double-counting some things.
now the biggest set of pairs only has 3 paths.
Z
22:50
Zack
there is this combinatorial explosion of ways that a contract and a market can interact, if the market is linking parts of the smart contract to itself.
22:51
im able to process the updates that only involve markets.
im working on the ones that involve contracts.
22:54
trying to combine a market trade with a contract_use_tx.
it kind of reminds me of that math problem.
The man is walking to the gate at 1 meter per second, his dog runs at 5 meters per second, back and forth between the gate and the man until the man gets to the gate.
If it takes the man 10 seconds to get to the gate, how far did the dog run?

Except my dog loses his patience and keeps speeding up until I get to the gate.
22:55
also, I don't know how far away the gate is until I get there
23:00
you can start from any of 3 positions, and request any of the remaining 2.
there can be a market that starts in any of the 3, and ends in any of the remaining 2.

That is 72 possibilities
23:01
I guess starting from any of the 2 subcurrencies is a symmetry.
so there are only 36 cases that need to be programmed.
23:01
??
23:01
that just seems like a lot
23:01
maybe there is some more symmetries to simplify it
Z
23:29
Zack
I found out some combinations are already covered by direct market paths, and I think some other symmetries. so I got it down to 6 possibilities to program
RF
23:30
Rafi F
Where can I buy this coin.
23:30
?
Z
23:30
Zack
RF
23:32
Rafi F
Thanks mate
Z
23:33
Zack
haha, realizing now I didn't push any progress for a week.
don't worry guys, a lot has been happening. I just pushed the uniswap.js file to the light node
https://github.com/zack-bitcoin/light-node-amoveo/commit/a4468d5231f2ab33ca3afcd56ff88af4252a1aac
23:34
its not done yet, but a lot of the pieces are working well now
I
23:42
Instinct
In reply to this message
Nice
3 September 2020
Z
00:14
Zack
I finally used the quadratic formula while programming
00:14
balancing the contract and market trade is solving a second order equation
x
00:48
x
indeed
00:49
there should be a market for this coming election
J
00:50
Josh
just leave plenty of time for the oracle
MF
01:00
Mr Flintstone
We fixed that issue
01:01
now you dont even need to specify when the event should be resolved :)
01:01
which means we are free to make block times change
Z
01:30
Zack
Well, I need to make that smart contract and tooling still
01:30
We have a plan at least
J
01:37
Josh
nice
EA
01:48
Eric Arsenault
In reply to this message
I missed that
01:49
what do you mean?
Z
03:32
Zack
In reply to this message
the same trick we did to make scalar oracles so small.
We don't ask the oracle question until after we know how it will resolve.
The smart contract has rules about the kinds of oracle questions that can be used to settle that smart contract.
03:32
so the oracle question could be something like "this oracle was started at a block height after the result of X is known and the result of X is False."
J
05:29
Josh
If I'm betting that the result of X is True, wouldn't I be fine starting the oracle before the result is known because then the oracle should return false and I'd win?
Z
05:29
Zack
if you wait to create the oracle until after the event occurs, then you can know exactly the block height when reporting in the oracle became possible. you don't have to guess.
05:30
so people can get their money out of the contract a lot faster.
05:31
and we can make bets that are far in the future without worrying about having to guess the block heights
EA
05:34
Eric Arsenault
so: you make a bet now... then once the event happens, you create the oracle? who will create the oracle?
05:34
Or: the oracle only gets created if there is an issue
Z
05:35
Zack
anyone can create the oracle.
Or we can just agree on how the contract would settle without making the oracle, and save on the tx fee.
EA
05:35
Eric Arsenault
👍
Z
05:36
Zack
to do that, I could make a swap-tx to give you my side of the contract in exchange for some veo.
You can use a flash loan to accept this swap, combine both sides of the contract to get the veo out, and pay me my part of the veo, all in one tx atomically.
05:36
So even if you don't have any veo, we can still do this
J
06:48
Josh
In reply to this message
I was wondering about the wording in that contract though. It sounds like if I make an oracle for that a week before the result of X is known, the oracle should give a False answer, so shouldn't that force the money to go to me if I'm betting that X is not false? Even though in the end it might turn out that X is False.
Z
06:59
Zack
In reply to this message
The smart contract can ignore any oracle that doesn't return true.
06:59
Whatever the result is, use the Oracle question to make a true description of it.
06:59
It can be true that trump won. It can be true that he lost.
MF
07:23
Mr Flintstone
payout of a contract can be triggered by an oracle that returns true. i think then the contract would parse the oracle language on how to pay out
07:26
so in the trump case. in the contract you agree that if any “trump has won the election” oracle returns true, address1 gets paid. if any “trump has lost the election” oracle returns true, address2 gets paid
Z
07:27
Zack
yeah, that is a better explanation
MF
07:27
Mr Flintstone
this way you dont need to care about block height
Z
07:28
Zack
yes, a better design too.
MF
07:31
Mr Flintstone
its no big deal if someone opens the oracle too early
07:31
you can just open another one after the event happens
07:31
this avoids some of the ambiguity found in the augur oracle design
Z
07:33
Zack
Some of the biggest discoveries in blockchain derivative design are just changing the order of events.
07:33
Making the Oracle after instead of before.
J
07:39
Josh
In reply to this message
ah ok, so you only care about true results, not false results but you can have multiple questions
Z
07:40
Zack
Right
MF
07:41
Mr Flintstone
same trick for scalars
07:41
if any oracle with “price was $x” is true
07:41
for any x
JS
07:47
Jon Snow
So 3 days left for the sub currency update activated?
J
07:48
Josh
In reply to this message
don't we need a timestamp for when the price was $x?
Z
07:48
Zack
In reply to this message
Sounds about right
MF
08:05
Mr Flintstone
In reply to this message
yeah
J
08:13
Josh
and how do you put those together to make a perpetual coin?
Z
08:14
Zack
If we get to near/far from the margin, then someone makes an Oracle to show this.
From that point it becomes possible for someone to swap out the source currency of the contract for another.
J
16:36
Josh
what's the margin here?
Z
17:05
Zack
We want it to stay in some range. Too big is wasteful, because too much money is locked up unnecesarily. The leverage on the long Veo is too low.

Too small is dangerous, because a sudden drop in veos price could break the stablecoin.
ET
18:53
Enri Topciu
Hallo
18:53
What happens to pool
18:54
Is the mining pool down or what
Z
18:58
Zack
http://explorer.veopool.pw/index.php looks like 25 minutes since the last block
18:58
why do you think it could be down?
Z
19:17
Zack
looks like I have to program the quadratic equation in 10 slightly different ways.
Can't we find a 13 year old to do this? haha
19:18
In reply to this message
more blocks have been found since then.
the pool is finding blocks at least.
Deleted invited Deleted Account
Manaf invited Manaf
M
20:59
Manaf
Hello, question about mining in the pool. All the mining guides i found are regarding using graphics on Windows/Linux. Is there a guide/capacibily of using an ASIC miner? I configured an antminer S9 with usual configuration I use to do on Bitcoin (since its similar Hashing algorithm) but didnt see any transaction
Z
21:00
Zack
the hashing algorithm is not compatible with bitcoin miners
ET
21:10
Enri Topciu
I’m getting lots of reject shares
21:10
Any changes to the pool
21:10
Or algo
Z
21:18
Zack
@Simon3456 manages the pool
S
21:21
Sy
In reply to this message
all good, miners just left again since the price dropped, we had 12 th running
21:21
and we are down to 7
Z
21:22
Zack
thanks for the quick response sy
S
21:22
Sy
im looking into the shares from enri
21:24
all nodes are running
Version: ["ok",35,130700]
21:24
and we arent at fork height yet so...thats not it :D
Z
21:24
Zack
Is Enri mining from a remote location?
21:24
maybe it has something to do with the ping rate
S
21:25
Sy
he hasnt answered yet but our blocks are so slow that low ping doesnt have such a big effect...usually
21:25
its worse if work changes more often
21:26
our top hasher increased again and has 0% rejects so the pool is running
21:26
21:26
you will notice this in blockfinds obviously
21:27
thats my timezone, should be UTC+2 right now
Z
21:40
Zack
here is a tough one.
you start out owning currency type 1.
there is a market between type 2 and the source.
You want to transform your type 1 currency into type 2 currency.
21:42
i think if we use a flash loan, there is a way to atomically buy source currency, while also converting that source currency into type 2, and you end up holding just type 2 at the end.
21:43
but im having trouble setting up the quadratic formula to calculate how much money you would get out of this.
21:44
it feels magical, since you don't have money to do even a little of the parts, and yet when you put them together you can afford it
21:45
do ethereum flash loans let you combine uniswap with creating/combining gnosis conditional tokens, or sides of a synthetix contract or whatever?
21:46
If someone already did it, maybe I can reuse some of their math
EA
21:48
Eric Arsenault
I feel like gnosis tried to solve this sort of thing
Z
21:49
Zack
oh right. the ring matching tool
21:49
do people use that?
EA
21:49
Eric Arsenault
Yeah exactly
21:49
Yeah, but the usability is bad
Z
21:49
Zack
because it is slow?
EA
21:49
Eric Arsenault
You place your order and need to wait until the next solution comes along
Z
21:50
Zack
I think the ring batch tool is trying to solve both at once. front running, and arbitrage.
the quadratic math I am doing now, it is only for preventing arbitrage, not front running.
21:51
we will make some off-chain tools with single price batches to prevent front running
21:52
We felt like having a uniswap type market on-chain could get the initial liquidity going, even if it is somewhat vulnerable to front running.
22:01
The interface for creating conditional tokens can be the same as the one for trading them.
Z
23:14
Zack
I wrote all the quadratic formula stuff
23:15
now I can create a database in javascript of all the markets. I can take the list of paths through the markets, and a distribution of how to push my money through the paths. I can calculate the database after processing that distribution.
Deleted invited Deleted Account
Z
23:25
Zack
Now I can calculate the price on every path using this updated database.
4 September 2020
EA
00:18
Eric Arsenault
When all this is working, it’s going to be pretty epic.
Z
00:37
Zack
Now i can calculate how much money to put onto each path to get the optimal price.
Now to build the tx.
00:38
Oh, I think my algorithm to find the optimal set of paths isn't optimal.
00:38
Sometimes it blows up and gives really bad trades. Usually only in extreme cases where you wouldn't want to trade anyway
Z
02:26
Zack
I solved a bug in how weighted averages are calculated.

now if I make a small trade, it puts all the money on the one path. and if I make a big trade, it spreads it out on many paths. it is coming along.
02:32
it doesn't blow up and give bad trade values.

it is starting to feel pretty solid.
If you make a trade with a small number of satoshis, and the price is really extreme, then you can get some divide by zero issue that make it fail.
02:40
There is this kind of interesting attack against on-chain AMM
02:41
a mining pool could lie about the trades that are in it's mempool
02:42
If you are making a trade, you will probably set the limit order price based on what you think the current price is in the AMM.
And you want to include zeroth confirmation txs in this calculation, to make sure your tx has enough of a fee to get included.
02:43
so miners can trick people into over-paying, and then the miner can front run to take the extra profit.
02:46
When I make this multi-tx that involves multiple markets, I can't be 100% certain of the price that each market will get matched at.
So if there is a chain of markets, I can't be sure how much money will come out of the first market, and be available to go into the second.
So I need a small buffer zone between each market in series.
After you make a trade, you will end up owning a small amount of the other subcurrencies on the path between where you came from and where you went.
02:47
i think we should update the market_swap_tx to say something like "sell everything I own, up to this limit".
So you don't own dust on the path in between.
Z
04:49
Zack
Using a contract with a market, there are 12 basic cases that I had to program.
I think if we used a contract with 3 subcurrencies instead of 2, this is going to explode into 60 cases.

So I need to find some way to simplify this before adding binary contracts.
Maintaining 60 cases is just too much.
04:49
Maybe we need an embedded prolog, or logic based algebra system.
04:50
To get some more powerful syntax.
04:50
Or maybe I can find some more symmetries and simplify it in vanilla js
04:52
Or maybe we can just like, pretend the third currency doesn't exist.
It will accumulate like dust. And then we can clean that up as a second step.
04:52
Well, I think scalar contracts are going to be more important anyway
Z
05:09
Zack
I added the governance trading fee to the uniswap calculations.
05:16
300 blocks till the subcurrency update activates
05:17
around 2 days 8 hours
ŽM
05:21
Živojin Mirić
When is VEO uniswap?
Z
05:22
Zack
hopefully the first version will be active in 700 blocks. about 5 days.
05:22
I think the software is nearly ready now.
ŽM
05:23
Živojin Mirić
Very good Zack
05:23
Cheers
05:24
I would send a picture but can't
JS
06:03
Jon Snow
In reply to this message
You can send to the Amoveo meme channel
ŽM
06:06
Živojin Mirić
In reply to this message
I did
Z
06:14
Zack
I think i'm going to change goals for a bit.
It would be nice if the new version of stablecoins are ready before the subcurrency update activates.
So we don't have to support both versions.
06:28
oh, it looks like the scalar oracle smart contract already has the property we had wanted.
06:29
ill hide the interface to the binary contract stuff, since the uniswap tool doesn't support it, and ill get rid of the unnecessary stuff about "height" related to the oracle.
ŽM
06:30
Živojin Mirić
Good plan
Z
06:53
Zack
oh, nvm. we do need a new smart contract.
but the change is fairly minimal.
Z
08:50
Zack
I hid the binary contract stuff.
I updated the smart contract so you don't need to choose the height until the very end.
I updated the light node interface because we don't choose the height until the end.
Deleted invited Deleted Account
C
12:00
Callum Wright
In reply to this message
will it be open source?
JS
12:31
Jon Snow
In reply to this message
I’m sure it will be on Zack’s github so it will be open source
Bityann invited Bityann
Raga invited Raga
C
15:04
Callum Wright
In reply to this message
yeah saw it now, lousy question haha
15:06
uniswap.js and uniswap.html on the lightnode repo
Z
15:06
Zack
Everything I write is open source.
Z
15:43
Zack
im going to merge the p2p derivatives explorer update.
Because we don't want to use the old kind of channels any more. this explorer should be for hosting offers to swap between subcurrencies.
tjZ invited tjZ
Nope invited Nope
Z
19:31
Zack
I used the uniswap tool to generate a valid tx and publish it in the test node.
19:33
my tests so far only make very tiny contract_use txs.
they mostly just swap in markets.
maybe all my quadratic math was a waste, and we should just trade through markets.
That would make 3-way contract implementation a lot easier.
S
21:04
Sy
Did someone here create the veopool token?
21:05
It's not me so don't buy it...
s
21:08
sanket
wtf😂
Is it a sign that we need such a token)
I
21:10
Instinct
💀
S
21:26
Sy
So Enri is blaming the "crappy" pool now because he is having problems and everyone else doesn't, so my service is bad - what a day
Z
21:27
Zack
its just one guy. i think no one cares
S
21:28
Sy
Yeah just blocked him, he is getting salty
21:29
He is having problems but it's nothing I can change since it's not poolside
Z
21:31
Zack
I think the uniswap tool works.
It probably still has bugs.
But it seems like it does what I want it to almost all the time.
S
21:31
Sy
Almost? 😅
Z
21:31
Zack
it tells you the price and how much money will be transfered and how much you will receive before you accept it
21:34
I got the frequency of bugs low enough to justify working on something else for a while
21:35
oh, I think this might only work for one trade per block. haha
21:35
I need to make it aware of the state after processing txs in the mempool.
Z
22:19
Zack
I can make multiple trades per block now
Z
22:57
Zack
looks like the explorer we need for making these trades can't connect to the mainnet nodes yet
22:59
I think one of the databases is inefficient or something
23:01
its probably because I am using dictionaries.
23:02
Deleted Account
РМ
Роман Михалкин 04.09.2020 18:38:42
Спасибо большое
Z
23:03
Zack
без проблем
23:06
oh, I see. jobs are overfilling somewhere while syncing.
23:08
no, thats not it. all the blocks are empty of the kind of data I am looking for
23:09
oh, it is because there is a tool to automatically check for new blocks to sync
23:09
so it is running multilple syncing threads at once
23:09
and that crashes it
Z
23:27
Zack
well, we don't care about blocks before 130000 anyway. so I just told it to start there.
23:39
oh I think this server just had a bunch of zombie processes.
I had launched a lot of software and forgotten about it.
So there wasn't enough space to sync the blocks
23:47
oh there was a data overflow all along.
23:50
I think there could be pretty big arbitrage opportunities between markets and the conditional contracts that can create tokens in those markets.
our version of the uniswap tool might be significantly better than others because of how we solved this issue.
23:51
I guess next I need to convert our new pages to use Veo units instead of satoshi units
23:52
I added some text to the uniswap page. it explains about your balance in every subcurrency where you have more than zero tokens.
23:52
im not sure if that is the right spot for it. we can move it if we need to.
5 September 2020
Z
01:16
Zack
so im thinking about the pool tab.
maybe if you want to deposit liquidity, but don't have the right amounts of subcurrency, it should use the same trading software internally to atomically purchase what you want, and deposit into the market, all in one tx.
It could reuse some stuff from how swaps get matched too.
01:16
does that make sense?
is that what we want?
01:17
or maybe it makes more sense for them to do trades to buy the kinds of money they need, and then deposit that?

I think it might be nice to see the price of doing the entire thing in one operation.
J
01:22
Josh
Yeah that sounds good. If someone has a lot of one subcurrency they might just want to make money on that.
01:22
I think Uniswap is popular because of its super simple UI.
Z
03:10
Zack
I think a couple major upgrades would be:
If there isn't enough liquidity to match your trade at a good price, it should offer to make it as a swap offer instead.

And when you make trades, it should scan the available swap offers to see if your trade causes any of them to give free arbitrage.
If there is opportunity for arbitrage, you should atomically take it along with your trade.

This would make the order book and market maker systems seamlessly integrated into one small interface.
03:16
I think single threaded markets aren't an issue.

By single threaded, I mean that if 2 people make trades simultaneously in the same market, that one will fail. Where 'simultanious' is defined by within less than the amount of time it takes the slower peer to check the network.

So, interestingly, the miner is incentivized to charge a fee based on how slow your ping connection is.

So let's say your ping is 0.2 seconds. It is this slow necause you are using WiFi.
That means people like you can do 5 tx per second.
Any single market, if the traders are as slow as you, they are limited to 5 tx per second.

But a block is 10 minutes and only holds like 600 trades.
10 minutes is 600 seconds.
So 5 tx per second limit on markets is very reasonable. It would not even be near the bottleneck of tx processing.
Deleted invited Deleted Account
Z
16:15
Zack
the LMSR really has a lot of potential as a market maker.

With LMSR, if you have 2 markets M1 and M2 with N1 and N2 possibilities each with liquidity of L1 and L2 locked in them, you can combine them into one market M3 with N1*N2 possibilities, and L1+L2 liquidity locked in it.

If you use market M3 as if it was market M1, and you ignore the M2 aspects of it, then it is as if you are using an M1 market that has L1+L2 liquidity in it.

When you combine markets in LMSR, they share liquidity extremely efficiently.

The current cost trade off is that if we combine many markets, there are N1*N2 different kinds of shares that need to be kept track of, and a naive implementation of processing a trade takes an amount of time linear with the number of kinds of shares.

I think the reason lmsr hasn't gotten popular yet is because of how we have been representing ownership in them.
If a market has 256 kinds of shares, but you only want to make a binary bet, in existing designs you would end up holding 128 different subcurrencies. and it makes the trade infeasible.

there has been progress in merkle tree design in recent years. in particular the idea about filling up the tree with all zeros, and why this is actually cheap, because the elements in the tree are all duplicates, so we only store one copy and have lots of pointers to it.
This way a merkel tree is kind of compressed. Repeated data is only stored once, and as long as we have some computational process to get the data we want, that is as good as storing it.

Maybe it makes sense to bring these same principles to the design for the LMSR market.
If a person wants to buy 128 of the 256 possibilities, and we just store some short description of which ones he owns value in.

I guess it's other issue is the difficulty of depositing more liquidity into an existing market.
16:21
we can use an LMSR for like, a stablecoin/VEO market, right?
16:21
what if stable-btc, VEO, and stable-usd are 3 different kinds of shares in the same market?
16:23
I had mostly thought about lmsr in terms of predictions previously.
Z
16:53
Zack
it seems like to buy liquidity in an lmsr without changing the price, besides depositing money at the current ratio, you also need to buy some of the less-expensive kinds of coins to keep the price where it was.

Whatever side of the market has more shares, you need to buy extra on that side beyond a fixed ratio
17:05
the price of a market is based on the absolute difference in each kind of share.
so if there is 100 on one side, and 20 on the other, the price is the same as if there are 100080 on one side and 100000 on the other.
17:07
if the price is right in the middle, the liquidity shares have a maximum value of ln(2)(share1 price + share2 price) / 2
but as the ratio of share prices gets further from 1:1, the value of the liquidity shares approaches zero.
17:09
the liquidty shares value are like an extra reward for whoever moved the price first.
It is kind of the opposite incentive we want in the blockchain context.
This means that if the miners can front run a big trade, not only do they steal from that trader, they also win all the value from the liquidity shares in that market.
17:10
so maybe lmsr is only useful for prediction markets, where there is someone who is paying to find out a price.
17:12
about 1 day left until the subcurrency update activates.
17:12
it looks like the full nodes are all ready for it.
Deleted invited Deleted Account
mx
17:33
mr x
Always liked lmsr except the frontrunning stuff... how about liquidity sensitive lmsr?
17:36
augur got rid of it cause too high onchain costs?
BS
17:46
Bo Smubo
Can somebody bump up this coin?
17:47
I am in desperate need of money
17:47
Still have 20 veo mined in 2017
17:50
I thought 1 veo worth 0.5 eth
zhaxzhax invited zhaxzhax
z
18:38
zhaxzhax
curious about how to hold veo. I mean I have no veo but want to hold some veo.
Михаил Иванов invited Михаил Иванов
Z
19:11
Zack
In reply to this message
Check out the github. Use the light node.
МИ
19:13
Михаил Иванов
Zack hi. why doesn't it work https://veoscan.io ?
Z
19:13
Zack
Catweed stopped supporting it
19:13
He was a volunteer
19:13
You can get the same info from other tools
19:14
What do you want to know?
МИ
19:18
Михаил Иванов
I want to understand your project and understand how things are at the moment.
Z
19:18
Zack
The github has info. You can ask questions here too
МИ
19:20
Михаил Иванов
Yes ok. thank you Zack
Z
20:10
Zack
http://159.89.87.58:3010/uniswap.html?mode=test
I set up a testnode so you can try out the uniswap with test money
20:11
it mines a block every 2 minutes
20:12
oh, looks like the page is expecting localhost
20:12
ill fix that
Z
20:41
Zack
ok, looks good now
20:42
contract trump election
V81cxFUeFlL4jfKySlFCQnHj12flYAPRwiXPdz1fAWI=

market
Bni3pg9cUuA6d6CZhyb0OLiNzO2rEYgCuG6NSL0yEAI=
20:43
i made a test market to play with
МИ
20:47
Михаил Иванов
uniswap is very good
Z
21:00
Zack
put your pubkey in this chat to get test money
mx
21:01
mr x
BC/onePSJa25mp5+Cz54cSciAx8RwuXr6rSezgY6KpCZXGxHYlsA9cqnCIUrU6t4nsBog5+j8/McAhUSRy7KkH8=
Z
21:02
Zack
done
21:10
I think I broke something when I switched to veo units
D
21:17
Devender
BDtRqpJDgLWg3i1s+nA6y7Dvh9nMhzR9KftxMdeBMWl28IPjoj0iA0PXEUZCeoSldemwQWywZuquuK2QV8X4h8c=
21:20
Is there any faucet to get test coins?
Z
21:27
Zack
I think I misprogrammed one of the 8 quadratic formula, and that is the one we are using in the test node
21:28
oh, it is the pathfinder that fails
Deleted invited Deleted Account
Z
21:53
Zack
I added a couple more paths to the path finder
21:53
now I can make bets in the market on the test node.
21:54
its funny, this is the very simplest path. a market between 2 sides of a contract, and trading the source currency for one of them. and it is the case I forgot.
21:54
at least it was easy to add now
z
22:48
zhaxzhax
Hello Zack, I have read your opinion about other blockchains except for polkadot. Have you heard about polkadot?
Deleted joined group by link from Group
z
23:28
zhaxzhax
Ok I know your point. Proof of Stake could cause the situation that attacker forced other node to make corrupt computation by delete their coins when attack successfully.
Z
23:30
Zack
It's a soft fork attack. You use bribes to push it through. The cost of the bribes is surprisingly low.
z
23:32
zhaxzhax
But why they are still building POS system, If POS system is volunerable than centralize system? Ethereum will still tend to POS in next years. Have they heard about your opinion about POS?
Z
23:34
Zack
In reply to this message
As long as there is someone who wants to buy PoS coins, then it can be profitable to build and sell them.

PoS's flaw is based on similar game theory as democracy. Given how popular democracy is today, it's not surprising that people want to bring this system onto the blockchain.