Takers
Takers are adapter contracts responsible for handling the execution logic of a take operation. Each taker is linked to a specific third-party provider or routing system and is approved through the pool’s internal whitelist. Takers receive the borrowed assets from the pool and must guarantee that a corresponding repayment occurs on another chain.
Taker implementation must:
call
take
of trusted (generally immutable)pool
contract addressguarantee that
minGiveAssets
will be (or already) provided back to the pool enclaveprovide protection against pool asset double-spending and call reentrancy attacks
return unused part of received assets to its caller (or agreed address from function data)
Taker implementation is not bound to any specific interface. However, it's common that the function name starts with take
prefix and at least accepts assets
value to pass to the pool. The rest of the function parameters, as well as the list of other functions exposed by the taker contract, depend on specifics of the underlying provider.
Takers may rely on paired Giver
contracts deployed on the opposite chain. These contracts wrap a give
operation, emitting verifiable events used to confirm that liquidity has been returned. Givers may enforce additional logic or safety checks required by the taker’s provider.
Last updated