Withdrawal and borrowing

Flow
Both withdrawal and borrowing transactions will work in the similar technical flows as described below:
At first, user will send a payment transaction to the Axelar multisig account on XRPL. The sent amount, gas fee amount payload, destination address, destination chain will be included in memos field of the transaction. In particular, the memo data representing the payload will contain information about the user action. In this case, it will either be withdrawal or borrowing. It is important to note that the sent amount will be a payment of zero because we are sending a payment transaction to trigger withdrawal or borrowing, and not to send funds over.
Axelar and its relayers will handle the cross-chain communication. The details are explained in Deposit and repayment as well as https://docs.axelar.dev/dev/general-message-passing/overview/.
When the message is being executed on EVM Sidechain, Axelar ITS contract will call
executeWithInterchainToken
method of Strobe's core contract that inheritsIInterchainTokenExecutable
.After the message is executed, Strobe's core lending contract will call
interchainTransfer
method of Axelar ITS contract. This will trigger Strobe's core contract's balance to be deducted at the relevant interchain token contract and funds to be sent back to the XRPL side.Axelar and its relayers will handle the cross-chain communication similarly to Step 2, but in the opposite direction.
When the message is executed, Axelar's multisig account will send payment to the user address.
Last updated