# Collateral Accounts

Collateral accounts help users manage collateral across Perennial markets on a single chain in a gas-less manner. Colloquially called "1-click-trading".

The majority of actions are performed using [EIP-712](https://eips.ethereum.org/EIPS/eip-712) message payloads submitted to keepers through a relayer. Users may self-sign their messages or delegate one or more signers.

### Benefits

* **Gasless Trading** - Moving collateral among markets can now be done with signed EIP712 transactions.
* **Bundled actions** - Multiple different collateral actions can be bundled into a single transaction.
* **Dynamic Rebalancing** - **LPs** can leverage the rebalancing deatures of collateral accounts to automatically shift collateral between markets.

### Account Creation

Account creation was designed to be as flexible as possible. Rather than requiring a transaction from an EOA send a transaction, a user can instead just send USDC to the deterministic address of the future collateral account & rely on a relayer to execute the creation.&#x20;

#### Process:

* Get deterministic address from Controller contract.
* Before the account is created, transfer DSU or USDC to that address for keeper compensation.
* Send a message to the relayer requesting account creation.

Note: A user's EOA may deploy only one collateral account.

### Collateral

All USDC in the account is implicitly wrapped to [DSU](https://docs.perennial.finance/protocol/markets/collateral) when transferring an amount greater than the account's [DSU](https://docs.perennial.finance/protocol/markets/collateral) balance into a market. Funds transferred out of markets are not unwrapped until withdrawal.&#x20;

### Implementation

You can see the implementation of this system [here](https://github.com/equilibria-xyz/perennial-v2/tree/v2.3/packages/perennial-account)
