Skip to content

Commit

Permalink
mev.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrent committed Jul 31, 2024
1 parent 0c04a2f commit 7a8752d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/mev.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ Bidding instructions from the `DutchTrade` contract:
`DutchTrade` (relevant) interface:

```solidity
function bid() external; // execute a bid at the current block number via transferFrom
function bid() external; // execute a bid at the current block via transferFrom
function bidWithCallback(bytes memory data) external; // execute a bid at the current block number with post-hook callback for transfer of tokens
function bidWithCallback(bytes memory data) external; // execute a bid at the current block with post-hook callback for transfer of tokens
function sell() external view returns (IERC20);
Expand All @@ -79,7 +79,7 @@ function status() external view returns (uint8); // 0: not_started, 1: active, 2
function lot() external view returns (uint256); // {qSellTok} the number of tokens being sold
function bidAmount(uint256 blockNumber) external view returns (uint256); // {qBuyTok} the number of tokens required to buy the lot, at a particular block number
function bidAmount(uint48 timestamp) external view returns (uint256); // {qBuyTok} the number of tokens required to buy the lot, at a particular timestamp
```

Expand All @@ -93,7 +93,7 @@ OR

1. Call `status()` view; the auction is ongoing if return value is 1
2. Call `lot()` to see the number of tokens being sold
3. Call `bidAmount()` to see the number of tokens required to buy the lot, at various block numbers
3. Call `bidAmount()` to see the number of tokens required to buy the lot, at various timestamps
4. After finding an attractive bidAmount, provide an approval for the `buy()` token. The spender should be the `DutchTrade` contract.
**Note**: it is very important to set tight approvals! Do not set more than the `bidAmount()` for the desired bidding block else reorgs present risk.
5. Wait until the desired block is reached (hopefully not in the first 40% of the auction)
Expand Down

0 comments on commit 7a8752d

Please sign in to comment.