Creating Order (Providing Liquidity)

A. Opening a position in CoastDAO, depositing collateral to generate CUSD, and creating an order in the specified trading strategy contract (providing the trading pair and trading strategy as bytes32

function openLockGemAndDrawAndCreateOrder(
    address gemJoin,
    bytes32 ilk,
    uint amtC,
    uint wadD,
    bytes32 strategyName,
    uint8 strategyId
)

  gemJoin:The contract addresses of these collateral assets in CoastDAO (there are as many addresses as there are collateral assets).
 ilkCollateral type
 amtCAmount of collateral
 wadDAmount of cusd
 strategyName Name of the trading pair
 strategyId  Trading strategy Id (1,2,3,4)

b. Opening a position in CoastDAO, depositing collateral to generate CUSD, and creating an order in the specified trading strategy contract (providing the trading pair address)

function openLockGemAndDrawAndCreateOrderByPair{
    address gemJoin,
    bytes32 ilk,
    uint256 amtC,
    uint256 wadD,
    address strategyPair
}

 gemJoin: The contract address of the collateral asset(s) in CoastDAO (there are as many addresses as there are collateral assets)
 cdp:Vault ID
 amtC:Amount of collateral
 wadD:Amount of CUSD
 strategyName Name of the trading pair
 strategyId  Trading strategy Id (1,2,3,4)

C.In CoastDAO, specify the vault for storing collateral to generate CUSD and create an order in the specified trading strategy contract (providing the trading pair and trading strategy as bytes32).

function lockGemAndDrawAndCreateOrder(
    address gemJoin,
    uint cdp,
    uint amtC,
    uint wadD,
    bytes32 strategyName,
    uint8 strategyId
)


 gemJoin: The contract address of the collateral asset(s) in CoastDAO (there are as many addresses as there are collateral assets)
 cdpVault ID
 amtCAmount of collateral
 wadDAmount of CUSD
 strategyName Name of the trading pair
 strategyId  Trading strategy Id (1,2,3,4)

D.Specify the vault in CoastDAO for storing collateral to generate CUSD and create an order in the specified trading strategy contract (providing the trading pair address)

function lockGemAndDrawAndCreateOrderByPair(
    address gemJoin,
    uint256 cdp,
    uint256 amtC,
    uint256 wadD,
    address strategyPair
)

 gemJoin: The contract address of the collateral asset(s) in CoastDAO (there are as many addresses as there are collateral assets)
 cdpVault ID
 amtCAmount of collateral
 wadDAmount of CUSD
 strategyName Name of the trading pair
 strategyId  Trading strategy Id (1,2,3,4)

Last updated