Transfer

TransferTaker implementation of taker provides an ability to take available asset from pool after giving asset on another chains though. The give operation is performed via TransferGiver contract, that emits TransferGive event that is verified by the taker.

TransferTaker keep record of already taken operation so double-takes are not possible. The records are per take asset receiver (i.e. taker's caller) and nonce.

Managing nonces is receiver's responsibility and should be done with caution. Sending asset via two or more give (or giveHold) functions with the same takeChain, takeReceiver and takeNonce params will result in only one take possible (since subsequent ones will be blocked after the record of a first one).

Relief Giver

There is another variant of TransferGiver: TransferReliefGiver. It works similarly to the original one, except it's aware of its IExtraRelief-capable tuner (such as ElasticTuner). After providing asset to pool, the giver collects possible surplus assets for the rebalance-beneficial action and sends them back to the caller.

Last updated