RPC and Trade Execution

RPC URLs

Because Adrena is a decentralized exchange, querying of data and submitting of transactions is done through an RPC URL.

There are currently 3 RPC options to choose from. You can select which RPC you prefer to use by clicking settings on the top right of the screen after your wallet is connected. There is also an 'automatic switch' button which will automatically choose the best RPC endpoint based on latency.

Below are the 3 RPC options:

Trade Execution

Many onchain perp dex's (or any dex really) use an offchain keeper in order to manage most of the transactions of the dapp. This usually is hosted by the company and is helpful to ensure that transactions are executed with a delay, to prevent arbitrage. However, this "blackbox" situation where you don't have insight into the logic of the keeper invites the opportunity for transaction manipulation, and also isn't great UX wise for the users, as there are virtual delays.

In the Adrena spirit of being transparent, we decided to put these automations on chain with a fork of Clockwork that we call Sablier. (See Sablier for more details)

This enable OPOS trading speed, and make the app feel snappier. For how we counteract what is colloquially called "toxic flow" (but is more akin to oracle arbitrage), see "Toxic Flow" Countermeasures.

Below is the current usage of Sablier:

  • Trigger the end of genesis campaign - once, after genesis period ends

  • Resolve users ALP/ADX locked stakings - one time per stake, at the end of the period

  • Trigger close position through Stop Loss / Take Profit - one time per position, if enabled

  • Automatic claim of users rewards accrued for staked ALP/ADX - every 18 days per user having at least one stakes

Last updated