How time-weighted average price can reduce the market impact of large trades

Please fol­low and like us:
Pin Share

Time-weight­ed aver­age price is an algo­rith­mic trade exe­cu­tion strat­e­gy com­mon­ly used in tra­di­tion­al finance tools. The goal of the strat­e­gy is to pro­duce an aver­age exe­cu­tion price that is rel­a­tive­ly close to the time-weight­ed aver­age price (TWAP) for the peri­od that the user specifies.

TWAP is main­ly used to reduce a large order’s impact on the mar­ket by break­ing it down into small­er orders and exe­cut­ing each one at reg­u­lar inter­vals over a peri­od of time. 

How TWAP can reduce the price impact of a large order

Bids can influ­ence the price of an asset in the order books or liq­uid­i­ty in the liq­uid­i­ty pools. For exam­ple, order books have mul­ti­ple buy and sell orders at dif­fer­ent prices. When a large buy order is placed, the price of an asset ris­es because all of the cheap­est buy orders are being executed. 

For exam­ple, Coin A is cur­rent­ly priced at $10 and has the following: 

  • 50 buy orders at $10
  • 50 buy orders at $11
  • 50 buy orders at $13
  • 100 buy orders at $15
  • 500 buy orders at $17

Trad­er A places a buy order of 300 Coin A tokens at a price o $17. Since the order amount is larg­er than the cheap­er orders, the pro­to­col will exe­cute the $10, $11, $13 and $15 price points to ful­fill the order. 

How­ev­er, since the total buy order isn’t enough to fill all the bids at $17, the price for Coin A will stop at that lev­el. That’s a price increase of 70%, most­ly seen with low liq­uid­i­ty coins. In most cas­es, the price increase would be less dramatic.

Even though most decen­tral­ized exchanges (DEXs) don’t have order books, they have auto­mat­ed mar­ket mak­ers (AMMs) that adjust the price of a token based on order size and the size of the liq­uid­i­ty pool. Liq­uid­i­ty is sourced from liq­uid­i­ty providers (LPs) who con­tribute a cer­tain amount of a token pair to the pool in return for a cut of the fees. 

Because liq­uid­i­ty in decen­tral­ized finance (DeFi) is more scat­tered than in more estab­lished finan­cial mar­kets, the prob­lem of a sin­gle trans­ac­tion hav­ing an out­sized influ­ence on the mar­ket may be more sig­nif­i­cant. TWAP strate­gies can poten­tial­ly solve the price impact prob­lem, for exam­ple, by exe­cut­ing trades in 4–5 minute inter­vals over an hour. 

Break­ing up the larg­er order can give the DEX time to resolve any price dif­fer­ences with­in the respec­tive liq­uid­i­ty pools, help­ing to bring the asset back to its spot price. The strat­e­gy can ben­e­fit DEXs since larg­er price impacts can affect the token pairs in the liq­uid­i­ty pool. 

For exam­ple, the cheap­er token in the pair can end up with less liq­uid­i­ty, lead­ing to high­er slip­page (the dif­fer­ence between the expect­ed price of a trade and the actu­al price it exe­cutes at). Increased liq­uid­i­ty can facil­i­tate larg­er trad­ing vol­umes for a DEX and pro­vide a bet­ter expe­ri­ence for traders.

Recent: Web3 projects aim to cre­ate engage­ment between fans and sports leagues

Slip­page usu­al­ly occurs due to low liq­uid­i­ty that can­not reach demand, increas­ing an asset’s price. Ran Ham­mer, vice pres­i­dent of busi­ness devel­op­ment at Orbs, a decen­tral­ized pub­lic layer‑1 blockchain, shared his thoughts on whether TWAP could improve slip­page on DEXs. 

Ham­mer told Coin­tele­graph, “TWAP, used prop­er­ly, can def­i­nite­ly improve slip­page and price dis­crep­an­cies. Both of these prob­lems arise on DEX­es when a trade is too large rel­a­tive to the over­all liq­uid­i­ty in the pool and has a dis­pro­por­tion­ate effect.” He con­tin­ued to say:

“TWAP strate­gies can mit­i­gate this prob­lem by cre­at­ing small­er orders and giv­ing arbi­trageurs a short win­dow to close any price dis­crep­an­cies and bring the reserves back to equilibrium.”

Deg3ntrades, part of the undoxxed devel­op­ment team at Spir­itSwap — a decen­tral­ized exchange and DeFi plat­form on Fan­tom — also shared his thoughts, men­tion­ing decen­tral­ized TWAP (dTWAP), the ver­sion of TWAP imple­ment­ed on SpiritSwap. 

Deg3ntrades told Coin­tele­graph, “By design, dTWAP orders frag­ment trades into batch­es of small­er trades allow­ing the user to spec­i­fy when these trades are exe­cut­ed at reg­u­lar inter­vals over a pre-defined peri­od of time. This results in the mar­ket being able to absorb and min­i­mize the price impact of large orders across trad­ing pairs suf­fer­ing low liquidity.” 

“Due to recent events in the mar­ket that are out of the con­trol of the DeFi com­mu­ni­ty, liq­uid­i­ty crunch­es are a promi­nent issue right now, so Orbs inte­grat­ing dTWAP with Spir­itSwap couldn’t have come at a bet­ter time.”

Based on the com­ments above, small­er orders can improve liq­uid­i­ty by reduc­ing the num­ber of tokens exchanged and allow­ing the liq­uid­i­ty pools to be re-stocked between trad­ing intervals.

How TWAP can automate the dollar-cost average process

The phrase dol­lar-cost aver­ag­ing (DCA) refers to an invest­ing strat­e­gy in which an investor makes fixed dol­lar-amount pur­chas­es of an asset or port­fo­lio of assets (i.e., $100 every week). The DCA strat­e­gy is used when mar­ket volatil­i­ty is high or a trad­er has a par­tial amount they want to invest at the time. 

For exam­ple, if Coin B’s price fluc­tu­ates every oth­er day for a month, an investor can buy $250 worth of Coin B every week instead of try­ing to buy at a per­fect time. This is because the cost will even­tu­al­ly reach an aver­age price point over time, despite the asset’s fluc­tu­at­ing price.

TWAP can be imple­ment­ed by a trad­er to auto­mat­i­cal­ly dol­lar-cost aver­age their orders. The strat­e­gy works by plac­ing longer inter­vals between orders and a larg­er over­all time peri­od for the trades. For exam­ple, trades can be placed at bi-week­ly, week­ly or month­ly inter­vals over a few months, a year or indefinitely.

Decentralized time-weighted average price

Decen­tral­ized time-weight­ed aver­age price is a ver­sion of TWAP devel­oped by Orbs for DEXs and AMMs. The pro­to­col enables decen­tral­ized trad­ing plat­forms to spread out trades over time and has already been imple­ment­ed on the Spir­itSwap DEX.

The dTWAP smart con­tract uses a “mak­er” and “tak­er” sys­tem. The mak­er is the user who places the order on a DEX, and they’ll be able to con­fig­ure the lim­it price, order inter­vals and order expiration. 

The phrase “tak­er” refers to an inde­pen­dent par­ty that over­sees the orders sub­mit­ted by users (mak­ers) on the DEX. The tak­er aims to find the best way to exe­cute the batch of orders and bid on those same orders when found. Tak­ers receive a fee for bid­ding on orders and com­pete with oth­er tak­ers who may be bid­ding on the same orders.

Tak­ers set a fee, with the min­i­mum amount being enough to cov­er the trans­ac­tion fee for trades. Val­ida­tors on the Orbs net­work, known as “Guardians,” func­tion as tak­ers in the pro­to­col, auto­mat­i­cal­ly cal­cu­lat­ing and bid­ding on mul­ti­ple orders for the maker.

dTWAP user experience

The decen­tral­ized time-weight­ed aver­age price pro­to­col has a portable user inter­face that can be inte­grat­ed into DEXs. Trades using the pro­to­col can be split into mar­ket orders (exe­cut­ed at cur­rent mar­ket prices) or lim­it orders (exe­cut­ed at a spe­cif­ic price or better).

When set­ting trades to exe­cute at the cur­rent mar­ket price, the dTWAP smart con­tract will do so at the user’s inter­vals. Regard­ing lim­it orders, once a user sets the lim­it price, trades will only exe­cute if that price is avail­able at the cho­sen inter­vals. The trade will not be placed if the lim­it price is unavail­able. Due to this, an order might only have part of its trades exe­cut­ed if the desired lim­it prices aren’t reached. 

For exam­ple, a user sets a lim­it price of $50 or less for Coin C, with sev­en inter­vals over four weeks (28 trades total). Dur­ing week two, the price did not reach $50 for three days, so four trades were exe­cut­ed (out of sev­en for that week). So in total, 25 of the 28 trades for the order were executed.

Who benefits

TWAP can be ben­e­fi­cial for traders who want to buy into low­er liq­uid­i­ty tokens or auto­mate their trad­ing process. 

Recent: Users need to go under the engine in Web3 — HashEx CEO

“TWAP has two basic uses that ben­e­fit traders. One is the abil­i­ty to make large trades or trades in pairs that are long-tail and low-liq­uid­i­ty with­out dis­rupt­ing the price. Sec­ond, it can be used to auto­mate dol­lar-cost aver­ag­ing strate­gies (where the trad­er pur­chas­es an asset or sets of assets on a spe­cif­ic sched­ule),” Ham­mer said, continuing:

“TWAP can be used to con­struct such strate­gies in a way that does not require any addi­tion­al action from the trad­er oth­er than mak­ing sure enough funds are avail­able to com­plete all trades.”

Deg3ntrades stat­ed, “The abil­i­ty to uti­lize TWAP orders not only reduces traders’ expo­sure to high slippage/price impact on large orders or when trad­ing in low liq­uid pairs but also opens up and makes avail­able a pletho­ra of new trad­ing strate­gies to more well-versed and advanced DeFi users, such as auto­mat­ed dol­lar cost averaging.”

Decen­tral­ized time-weight­ed aver­age price strate­gies can improve the expe­ri­ence of both traders and decen­tral­ized exchanges. In addi­tion, the increased liq­uid­i­ty, low­er price impact and trade automa­tion of dTWAP could also increase engage­ment between users and DEXs.

Source link

Please fol­low and like us:
Pin Share

Leave a Reply

Your email address will not be published. Required fields are marked *