@@ -15,7 +15,7 @@ contract DutchTradeRouter is IDutchTradeCallee {
15
15
IERC20 sellToken;
16
16
/// @notice The amount of tokenIn the protocol got {qSellAmt}
17
17
uint256 sellAmt;
18
- /// @notice The token bought from the trade
18
+ /// @notice The token bought from the trade
19
19
IERC20 buyToken;
20
20
/// @notice The amount of tokenOut the we got {qBuyAmt}
21
21
uint256 buyAmt;
@@ -26,9 +26,9 @@ contract DutchTradeRouter is IDutchTradeCallee {
26
26
/// @param trade The DutchTrade that was bid on
27
27
/// @param bidder The address of the bidder
28
28
/// @param sellToken The token being sold by the protocol
29
- /// @param soldAmt The amount of sellToken sold
29
+ /// @param soldAmt The amount of sellToken sold {qSellToken}
30
30
/// @param buyToken The token being bought by the protocol
31
- /// @param boughtAmt The amount of buyToken bought
31
+ /// @param boughtAmt The amount of buyToken bought {qBuyToken}
32
32
event BidPlaced (
33
33
IMain main ,
34
34
DutchTrade trade ,
@@ -55,7 +55,7 @@ contract DutchTradeRouter is IDutchTradeCallee {
55
55
/// @notice Callback for DutchTrade
56
56
/// @param caller The caller of the callback, should be the router
57
57
/// @param buyToken The token DutchTrade is expecting to receive
58
- /// @param buyAmount The amt the DutchTrade is expecting to receive
58
+ /// @param buyAmount The amt the DutchTrade is expecting to receive {qBuyToken}
59
59
/// @notice Data is not used here
60
60
function dutchTradeCallback (
61
61
address caller ,
@@ -65,7 +65,7 @@ contract DutchTradeRouter is IDutchTradeCallee {
65
65
) external {
66
66
require (caller == address (this ), "Invalid caller " );
67
67
require (msg .sender == address (_currentTrade), "Incorrect callee " );
68
- IERC20 (buyToken).safeTransfer (msg .sender , buyAmount);
68
+ IERC20 (buyToken).safeTransfer (msg .sender , buyAmount); // {qBuyToken}
69
69
}
70
70
71
71
function _sendBalanceTo (IERC20 token , address to ) internal {
@@ -88,14 +88,14 @@ contract DutchTradeRouter is IDutchTradeCallee {
88
88
out.buyAmt = trade.bidAmount (block .number ); // {qBuyToken}
89
89
out.buyToken.safeTransferFrom (bidder, address (this ), out.buyAmt);
90
90
91
- uint256 sellAmt = out.sellToken.balanceOf (address (this )); // {qSellToken}
91
+ uint256 sellAmt = out.sellToken.balanceOf (address (this )); // {qSellToken}
92
92
93
93
uint256 expectedSellAmt = trade.lot (); // {qSellToken}
94
94
trade.bid (new bytes (0 ));
95
95
96
- sellAmt = out.sellToken.balanceOf (address (this )) - sellAmt; // {qSellToken}
96
+ sellAmt = out.sellToken.balanceOf (address (this )) - sellAmt; // {qSellToken}
97
97
require (sellAmt >= expectedSellAmt, "insufficient amount out " );
98
- out.sellAmt = sellAmt; // {qSellToken}
98
+ out.sellAmt = sellAmt; // {qSellToken}
99
99
100
100
_currentTrade = DutchTrade (address (0 ));
101
101
emit BidPlaced (
0 commit comments