Is it really time to test?

in #stem5 months ago (edited)

Busy Busy


I know there's a couple of people wanting to run DLUX nodes, interested in the DLUX token, or in general just excited to see more options for DeFi on HIVE. Let me fill you in on where I am and where we are all going.

To my knowledge I've put all the safegaurds in to the protocol that I can think of. I'll briefly try to explain each.

Since the DeFi protocol is one that doesn't require an intermediary token(If you can have enough accounts to run the network there is no reason to find an exchange to list your coins. It's build directly onto HIVE) there are some considerable advantages to deploying your business logic via this paradigm. But let's talk about the automated market maker as that's what I've been working on.

The network knows the current price, called the "tick" as well as a Volume Weighted Moving Average. Every time an order is purchased both the tick and VWMA will be adjusted. The VWMA controls listing curbs and forced cancels. To maintain available liquidity at the current price interface only swaps withing 20% of the VWMA will be accepted, and any currently listed trades further than 40% from the VWMA will be canceled.

Since the network is simple and accepts escrows to any participants one attack vector would be to wash trade to raise or lower the price with out fulfilling orders that aren't in your wash circle. To prevent this swaps can only be purchased if they are with in 1% of the cheapest listing, or sold if they are within 1% of the most expensive listing.

Unfortunately there is very little feedback at this time, so if your trade doesn't execute you might not know why.

Some of the cooler aspects of this is trades execute in under three minutes, as opposed to ~10 minutes via similar protocols on Ethereum. Also for the GAS cost to execute one trade on Bancor or Uniswap you can buy and power enough HIVE to run your own node.

On my todo list is find a fee schedule that is both low and fair. This system could easily be feeless, but the exceptionally low friction does make wash trading very appealing...

There is work to be done on the consensus algorithm. Namely election and impeachment of nodes.

I strongly encourage all who can read javascript to look over the progress and give me feedback. Sometime this week I hope to have an open season on white hat hacking the protocol. I want to set trade limits and let anybody who can break the protocol keep up to the limit for every method they can find to break, and double if they can suggest the fixes via github. Also... while development is ongoing I may be making commits every few minutes... But if you're comfortable putting a low balance account with at least 150HP behind the wheel with a CI pipeline be my guest.

Anybody who wants to participate must join the DLUX discord server

There is a boatload of work to be done on the UI on and I'm sorry I only have two hands to type with. If there is considerable support I'll try to make a Hive Development Fund request, tell me what you think. I think the token architecture is HDF worthy, but the UI/UX is not as portable for the community.


This is starting to sound extremely interesting.

Having DeFi on Hive just like there is on Ethereum without the outrageous fees and with must quicker transaction times is very appealing.

GAS fees are prohibitive for many types of transactions, especially as the network gets busy.

Preventing wash trading is certainly a priority so there is a fine line that needs to be walked.

Interesting stuff. Do you have thoughts on how to prevent speculation on the token that is used for paying transaction fees?

So transaction fees would be in HIVE in the form of escrow fees. As not everybody buying into the token would have DLUX. Because of this only people buying a sell order, or placing a buy order would pay fees as that's the only entry with escrow fees. The fee's would be exceptionally low for buying sell orders as it only ties liquidity for 3~ish minutes. While placing a buy order could be anywhere from 1 to 120 hours(Very short time limits on these as they tie up liquidity the entire time the escrow transaction is open ended. If the network was shooting for half liquidity utilization: APR of 20%, half utilized at 40%, would be roughly .2% for a 5 day hold. and 0.002% for a one hour hold. I'm not sure what the network would demand and it may be useful to put in the machinery for individual nodes to set their own price... at least that way there would be an active market... However only the agent gets to keep the fees. So there would be a significant imbalance to overcome in this scenario; which would be easy to program around once thought-ware exists.

Have you thought of using Resource Credits for transaction fees?

Effectively that's what the nodes are doing. Turning their RCs into transactions by handling escrow transactions. Invisible to traders for every in network tranaction they handle they get a piece of the internal markets inflation