11# ContinuousClearingAuction
2- [ Git Source] ( https://github.com/Uniswap/twap-auction/blob/c9923b6612650531d4151de2f459778059410469 /src/ContinuousClearingAuction.sol )
2+ [ Git Source] ( https://github.com/Uniswap/twap-auction/blob/37817840a05eb60581df70139cc71f280836677f /src/ContinuousClearingAuction.sol )
33
44** Inherits:**
55[ BidStorage] ( /src/BidStorage.sol/abstract.BidStorage.md ) , [ CheckpointStorage] ( /src/CheckpointStorage.sol/abstract.CheckpointStorage.md ) , [ StepStorage] ( /src/StepStorage.sol/abstract.StepStorage.md ) , [ TickStorage] ( /src/TickStorage.sol/abstract.TickStorage.md ) , [ TokenCurrencyStorage] ( /src/TokenCurrencyStorage.sol/abstract.TokenCurrencyStorage.md ) , BlockNumberish, ReentrancyGuardTransient, [ IContinuousClearingAuction] ( /src/interfaces/IContinuousClearingAuction.sol/interface.IContinuousClearingAuction.md )
@@ -173,7 +173,8 @@ function onTokensReceived() external;
173173
174174Returns the LBP initialization parameters as determined by the implementing contract
175175
176- The implementing contract MUST ensure that these values are correct at the time of calling
176+ The calling contract must be aware that the values returned in this function for ` currencyRaised ` and ` tokensSold `
177+ may not be reflective of the actual values if the auction did not graduate.
177178
178179
179180``` solidity
@@ -192,7 +193,7 @@ Implements IERC165.supportsInterface to signal support for the ILBPInitializer i
192193
193194
194195``` solidity
195- function supportsInterface(bytes4 interfaceId) external view returns (bool);
196+ function supportsInterface(bytes4 interfaceId) external pure returns (bool);
196197```
197198** Parameters**
198199
@@ -201,38 +202,38 @@ function supportsInterface(bytes4 interfaceId) external view returns (bool);
201202| ` interfaceId ` | ` bytes4 ` | The interface identifier to check|
202203
203204
204- ### isGraduated
205+ ### clearingPrice
205206
206- Whether the auction has graduated as of the given checkpoint
207+ Get the most up to date clearing price
207208
208- The auction is considered graduated if the currency raised is greater than or equal to the required currency raised
209+ This will be at least as up to date as the latest checkpoint. It can be incremented from calls to ` forceIterateOverTicks `
209210
210211
211212``` solidity
212- function isGraduated () external view returns (bool );
213+ function clearingPrice () external view returns (uint256 );
213214```
214215** Returns**
215216
216217| Name| Type| Description|
217218| ----| ----| -----------|
218- | ` <none> ` | ` bool ` | bool True if the auction has graduated, false otherwise |
219+ | ` <none> ` | ` uint256 ` | The current clearing price in Q96 form |
219220
220221
221- ### clearingPrice
222+ ### isGraduated
222223
223- Get the most up to date clearing price
224+ Whether the auction has graduated as of the given checkpoint
224225
225- This will be at least as up to date as the latest checkpoint. It can be incremented from calls to ` forceIterateOverTicks `
226+ The auction is considered graduated if the currency raised is greater than or equal to the required currency raised
226227
227228
228229``` solidity
229- function clearingPrice () external view returns (uint256 );
230+ function isGraduated () external view returns (bool );
230231```
231232** Returns**
232233
233234| Name| Type| Description|
234235| ----| ----| -----------|
235- | ` <none> ` | ` uint256 ` | The current clearing price in Q96 form |
236+ | ` <none> ` | ` bool ` | bool True if the auction has graduated, false otherwise |
236237
237238
238239### _ isGraduated
@@ -376,8 +377,7 @@ function _checkpointAtBlock(uint64 _blockNumber) internal returns (Checkpoint me
376377
377378Return the final checkpoint of the auction
378379
379- Only called when the auction is over. Changes the current state of the ` step ` to the final step in the auction
380- any future calls to ` step.mps ` will return the mps of the last step in the auction
380+ Only called when the auction is over
381381
382382
383383``` solidity
@@ -391,7 +391,7 @@ Internal function for bid submission
391391Validates ` maxPrice ` , calls the validation hook (if set) and updates global state variables
392392For gas efficiency, ` prevTickPrice ` should be the price of the tick immediately before ` maxPrice ` .
393393
394- Does not check that the actual value ` amount ` was received by the contract
394+ Implementing functions must check that the actual value ` amount ` is received by the contract
395395
396396
397397``` solidity
0 commit comments