AbstractKandelSeeder
AbstractKandelSeederβ
This seeder deploys Kandel strats on demand and binds them to an AAVE router if needed.
deployer of this contract will gain aave manager power on the AAVE router (power to claim rewards and enter/exit markets) when deployer is a contract one must therefore make sure it is able to call the corresponding functions on the router
MGVβ
contract IMangrove MGV
The Mangrove deployment.
KANDEL_GASREQβ
uint256 KANDEL_GASREQ
the gasreq to use for offers.
constructorβ
constructor(contract IMangrove mgv, uint256 kandelGasreq) internal
constructor for AbstractKandelSeeder
.
Parametersβ
Name | Type | Description |
---|---|---|
mgv | contract IMangrove | The Mangrove deployment. |
kandelGasreq | uint256 | the gasreq to use for offers |
sowβ
function sow(struct OLKey olKeyBaseQuote, bool liquiditySharing) external returns (contract GeometricKandel kandel)
deploys a new Kandel contract for the given seed parameters.
Parametersβ
Name | Type | Description |
---|---|---|
olKeyBaseQuote | struct OLKey | The OLKey for the outbound_tkn base and inbound_tkn quote offer list Kandel will act on, the flipped OLKey is used for the opposite offer list. |
liquiditySharing | bool | if true, msg.sender will be used to identify the shares of the deployed Kandel strat. If msg.sender deploys several instances, reserve of the strats will be shared, but this will require a transfer from router to maker contract for each taken offer, since we cannot transfer the full amount to the first maker contract hit in a market order in case later maker contracts need the funds. Still, only a single AAVE redeem will take place. |
Return Valuesβ
Name | Type | Description |
---|---|---|
kandel | contract GeometricKandel | the Kandel contract. |
_deployKandelβ
function _deployKandel(struct OLKey olKeyBaseQuote, bool liquiditySharing) internal virtual returns (contract GeometricKandel kandel)
deploys a new Kandel contract for the given seed parameters.
Parametersβ
Name | Type | Description |
---|---|---|
olKeyBaseQuote | struct OLKey | The OLKey for the outbound_tkn base and inbound_tkn quote offer list Kandel will act on, the flipped OLKey is used for the opposite offer list. |
liquiditySharing | bool | if true, msg.sender will be used to identify the shares of the deployed Kandel strat. If msg.sender deploys several instances, reserve of the strats will be shared, but this will require a transfer from router to maker contract for each taken offer, since we cannot transfer the full amount to the first maker contract hit in a market order in case later maker contracts need the funds. Still, only a single AAVE redeem will take place. |
Return Valuesβ
Name | Type | Description |
---|---|---|
kandel | contract GeometricKandel | the Kandel contract. |