Rewards and penalties
Strategies
You can integrate our orderbook in two ways:
Option 1: LayerAkira Managed Validation and Offchain Incentives ("LayerAkira Router"):
Routers direct volume to the exchange and encode their venue into the order. No on-chain punishment or reward will occur for them. LayerAkira will be responsible for validation, rewards, and punishments. Incentives will be managed later on with respect to the volume provided. Volume will be calculated based on the emitted events on-chain, tracing back to the order origins.
Option 2: Router-Managed Validation and Onchain Incentives:
Routers direct volume to the exchange and take responsibility for ensuring the validity of the taker order at the time of on-chain settlement. In this option, Router can specify own routing fees that it earns for routing
How does the Router-Managed Validation work?
Routers are responsible for ensuring traders can place valid orders and hold the necessary permissions for our Smart Contract to settle the trade.
We have designed a rewards and penalty system where Routers can specify their own fees and earn these fees for proper routing. However, routers will be penalised where malicious activity and trades are directed to our Exchange. This establishes a transparent and fair method to rebate Routers for their services while ensuring they do not engage in malicious activities. It also guarantees that Routers effectively perform their designated tasks.
The trade settlement flow for the Router Book on-chain is as follows:
The Router checks if the user has sufficient ERC20 tokens.
The Router verifies that the user has granted the necessary permissions.
The Router verifies that the order's signature is valid.
Router commitment
Routers must commit 120 STRK into the LayerAkira smart contract before they are eligible to route orders to our Exchange ("Router Deposit"). Once a Router has the Router Deposit locked in our Smart Contract, they can register their address as the taker fee recipient to start earning router fees. This is achieved by interacting with the smart contract method register_router.
Router fees
Routers can specify what fees they wish to charge on each trade.
In cases where all the conditions in the flow for trade settlement are met, the trade is executed, and the Routers will receive their specified router fees. [Nikita - is this just accuring on their contract that they can withdraw rather than immediately receiving fees?]
Router penalties
If any of the conditions in the settlement flow above are not met, we will enact a "penalty" on the Router ("Router Penalty"). The Router Penalty will be the gas cost of executing the transaction and this is deducted directly from the Router's Deposit in our smart contract.
The Router's Penalty will be split between our Exchange and the Maker providing liquidity for the affected trade.
The deducted amount that is allocated to the exchange will be calculated in accordance with the following formula:
punishment_factor * gas_price * gas_per_action
The deducted amount that is allocated to the maker will be calculated in accordance with the following formula:
punishment_factor * gas_price * gas_per_action
Last updated