V1
Overview
Odos V1 marks a significant milestone in the evolution of DEX aggregation. It stands as the first DEX Aggregator designed to support multiple inputs and outputs within a single, atomic transaction. This innovative approach enhances the efficiency of cryptocurrency exchanges, while streamlining the trading process for our users.
At its core, the Odos V1 contract has been meticulously designed to be minimalist yet powerful. Its primary role is to facilitate a swap, but it goes beyond this basic functionality. It incorporates an essential safeguard for users - a mechanism to ensure the minimum expected output is indeed returned to the user after a transaction. This feature underscores our commitment to protecting user interests and delivering a fair and transparent trading experience.
Features
- Enforce the expected minimum output. Revert if at the end of the swap transactions, the output is less than the minimum specified
- Allow for multiple input tokens to support multi-input swaps
- Allow for multiple output tokens to support multi-output swaps
- Revenue mechanism built around positive slippage
- Non-upgradeable static contract
- Single function that a user interacts with
Revenue Streams
Function | Fee |
---|---|
Swap | Positive Slippage |
Audit
Router V1 was audited by Certik in March 2022. A copy of the report can be found in the Certik Console.
Deployments
Each of these addresses can be retrieved from the Odos API using the /info/router/v1/{chain_id}
endpoint. More information about our API can be found here.
ABI
This is retrievable from our API using the /info/contract-info/v1
endpoint. More information about our API can be found here.
|
|
Events
Swapped
This event is emitted when the swap
function successfully performs a swap operation. The event provides crucial information about the swap operation which includes details about input tokens, output tokens, the sender of the operation, and other related details.
Parameters:
- sender: This is an
address
type parameter that holds the address of the initiator of the swap operation. - amountsIn: This is a dynamic array of type
uint256
that holds the amounts of input tokens that were swapped in the operation. - tokensIn: This is a dynamic array of type
address
that holds the addresses of the input tokens that were swapped in the operation. - amountsOut: This is a dynamic array of type
uint256
that holds the amounts of output tokens that were received in the operation. - outputs: This is a dynamic array of type
outputToken
struct that contains details about the output tokens in the swap. EachoutputToken
struct includes the token address, relative value, and receiver. - valueOutQuote: This is a
uint256
type parameter that represents the quoted value of the destination tokens for the executed path.