Bebop JAM API
The following guide explains how to use Liquorice together with Bebop JAM API
1. Providing JamSettlement address in the RFQ
From the perspective of Liquorice, trade is performed with the JamSettlement contract, not directly with the trader.
Therefore, a solver must first and foremost provide the address of the JamSettlement smart contract in both trader
and effectiveTrader
fields of the RFQ message.
2. Calling JamSettlement.settle function
2.1 Solver data argument
During the settlement process, funds from the trader must first be transferred to the JamSettlement contract.
For this reason, balanceRecipient
of the ExecInfo.SolverData
has to be set to the address of the JamSettlement contract.
Solidity example
2.2. Jam Interactions argument
To assemble Jam Interactions, solver would need to use following fields from the Quote payload
baseToken
baseTokenAmount
market
interactions
Reference
Approval
When performing the trade, Liquorice Balance Manager contract must have a baseToken
approval given by the JamSettlement contract.
Quote interactions
The rest of the interactions must be assembled from the interactions
and market
fields.
Solidity example
2.3 Rest arguments
Remaining arguments such as hooks
, signature
and order
provided as is.
Last updated