Contracts

All of Ramp's contracts have code verified on etherscan available under the links below.

Escrows

Escrow contracts are responsible for creating and releasing escrows in Ramp Instant. They use smart contracts provided by token sellers (Liquidity Pools) as sources for tokens that are locked when a new escrow is created.

Live smart contracts

Production Environment

Staging Environment

Escrow Events

There are three most important events exposed by the escrows smart contracts that you can track to follow the escrow lifecycle:

  • event Created(bytes32 indexed swapHash);: A new escrow was created.

  • event Released(bytes32 indexed swapHash);: A purchase was successfully completed, the tokens were sent to buyer.

  • event Returned(bytes32 indexed swapHash);: A purchase was not completed, tokens were returned to seller (liquidity pool).

Advanced

Releasing assets to contract address

In situation where you want to send assets to a contract address instead of normal address, your contract should implement the appropriate fallback function to do anything useful when receiving tokens. This function can't be too complex as we create release transaction with only little bit more gas than necessary to send to a normal address.

Liquidity Pools

RampInstant[ETH|Token]Pool smart contract is deployed and controlled by token seller. Each RampInstant[ETH|Token]Pool smart contract represents one asset type from one token seller.

Pool Examples

Since RampInstantPool smart contracts are dynamic we cannot link to any specific address as it might be already closed.