Skip to content

Update core-v1 contract docs for v0.11.0#151

Open
duelinggalois wants to merge 4 commits into
mainfrom
release/core-v1-v0.11.0-contract-docs
Open

Update core-v1 contract docs for v0.11.0#151
duelinggalois wants to merge 4 commits into
mainfrom
release/core-v1-v0.11.0-contract-docs

Conversation

@duelinggalois

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jun 17, 2026 3:45am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the generated Core v1 contract documentation to match the v0.11.0 contract surface (new/changed storage variables, function signatures, events/errors) and refreshes Git Source links to the new core-v1 commit.

Changes:

  • Refresh Git Source links across contract docs to the v0.11.0 commit hash.
  • Update docs for multiple contracts/libraries to reflect API/signature/state changes (e.g., liquidation flow, saturation/TWAP state, validation, token controllers).
  • Add new documentation for the PriceExtremes library.

Reviewed changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
docs/developer-guide/contracts/utils/deployHelper.sol/function.deployFactory.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/tokens/TokenController.sol/contract.TokenController.md Reflect storage visibility + new/changed helper signatures and liquidity docs
docs/developer-guide/contracts/tokens/HookRegistry.sol/contract.HookRegistry.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/tokens/ERC4626DepositToken.sol/contract.ERC4626DepositToken.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/tokens/ERC4626DebtToken.sol/contract.ERC4626DebtToken.md Update Git Source link + approve signature docs
docs/developer-guide/contracts/tokens/ERC20LiquidityToken.sol/contract.ERC20LiquidityToken.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/tokens/ERC20DebtLiquidityToken.sol/contract.ERC20DebtLiquidityToken.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/tokens/ERC20DebtBase.sol/abstract.ERC20DebtBase.md Update Git Source link + approve signature docs
docs/developer-guide/contracts/tokens/ERC20Base.sol/struct.ERC20BaseConfig.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/tokens/ERC20Base.sol/abstract.ERC20Base.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/SaturationAndGeometricTWAPState.sol/contract.SaturationAndGeometricTWAPState.md Document new saturation/TWAP state fields + new/changed methods
docs/developer-guide/contracts/proxy/PairLockedLoans.sol/contract.PairLockedLoans.md Document _initialize lock behavior + new INIT error
docs/developer-guide/contracts/proxy/PairFrozen.sol/contract.PairFrozen.md Document _initialize revert behavior for restricted implementation
docs/developer-guide/contracts/proxy/PairBlockLendingFundRemoval.sol/contract.PairBlockLendingFundRemoval.md Rename doc to match contract + add _initialize lock + INIT error
docs/developer-guide/contracts/proxy/PairBeaconProxy.sol/interface.IPairInitializable.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/proxy/PairBeaconProxy.sol/contract.PairBeaconProxy.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/proxy/PairBeaconProxy.sol/contract.InitializablePair.md Document new onlyProxySelfCall + gated reInitialize + AccessDenied error
docs/developer-guide/contracts/proxy/BeaconController.sol/interface.IBeaconController.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/proxy/BeaconController.sol/contract.BeaconController.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/libraries/Validation.sol/library.Validation.md Update constants visibility + remove scaler param references + new validation docs
docs/developer-guide/contracts/libraries/Uint16Set.sol/library.Uint16Set.md Update remove return name/behavior docs
docs/developer-guide/contracts/libraries/TokenSymbol.sol/library.TokenSymbol.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/libraries/TickMath.sol/library.TickMath.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/libraries/Saturation.sol/library.Saturation.md Add new constants + penalty helpers + refactor signature docs + expanded math docs
docs/developer-guide/contracts/libraries/QuadraticSwapFees.sol/library.QuadraticSwapFees.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/libraries/PriceExtremes.sol/library.PriceExtremes.md Add new library documentation
docs/developer-guide/contracts/libraries/PartialLiquidations.sol/library.PartialLiquidations.md Expand and update partial liquidation theory + function docs/signatures
docs/developer-guide/contracts/libraries/Liquidation.sol/library.Liquidation.md Update leverage/hard liquidation docs + new helpers/errors + signature changes
docs/developer-guide/contracts/libraries/Interest.sol/library.Interest.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/libraries/GeometricTWAP.sol/library.GeometricTWAP.md Update observed mid-term tick API docs + remove outdated lending-state docs
docs/developer-guide/contracts/libraries/Convert.sol/library.Convert.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/libraries/constants.sol/constants.constants.md Update constants docs (remove lending-tick sentinel)
docs/developer-guide/contracts/interfaces/tokens/ITokenController.sol/interface.ITokenController.md Update InterestAccrued event docs + add new error docs
docs/developer-guide/contracts/interfaces/tokens/ITokenController.sol/constants.ITokenController.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/interfaces/tokens/IHookRegistry.sol/interface.IHookRegistry.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/interfaces/tokens/IERC20DebtToken.sol/interface.IERC20DebtToken.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/interfaces/tokens/IAmmalgamERC20.sol/interface.IAmmalgamERC20.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/interfaces/ISaturationAndGeometricTWAPState.sol/interface.ISaturationAndGeometricTWAPState.md Add new saturation/TWAP interface methods + update signatures
docs/developer-guide/contracts/interfaces/IAmmalgamPair.sol/interface.IAmmalgamPair.md Update interface docs (add validateOnUpdate and restructure header)
docs/developer-guide/contracts/interfaces/factories/ITokenFactory.sol/interface.ITokenFactory.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/interfaces/factories/IFactoryCallback.sol/interface.IFactoryCallback.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/interfaces/factories/IAmmalgamFactory.sol/interface.IBeaconCallback.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/interfaces/factories/IAmmalgamFactory.sol/interface.IAmmalgamFactory.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/interfaces/callbacks/ITransferValidator.sol/interface.ITransferValidator.md Add tokens() docs
docs/developer-guide/contracts/interfaces/callbacks/IAmmalgamCallee.sol/interface.ISwapCallback.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/interfaces/callbacks/IAmmalgamCallee.sol/interface.ICallback.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/interfaces/callbacks/IAmmalgamCallee.sol/interface.IBorrowCallback.md Improve parameter descriptions
docs/developer-guide/contracts/factories/ERC4626DepositTokenFactory.sol/contract.ERC4626DepositTokenFactory.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/factories/ERC4626DebtTokenFactory.sol/contract.ERC4626DebtTokenFactory.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/factories/ERC20LiquidityTokenFactory.sol/contract.ERC20LiquidityTokenFactory.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/factories/ERC20DebtLiquidityTokenFactory.sol/contract.ERC20DebtLiquidityTokenFactory.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/factories/AmmalgamFactory.sol/contract.AmmalgamFactory.md Update Git Source link to new core-v1 commit
docs/developer-guide/contracts/AmmalgamPair.sol/contract.AmmalgamPair.md Document new borrow lock state + expanded hard liquidation documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 41 to +43
remove a key.

*key to remove must exist.*
*If the key does not exist, this function is a no-op and returns true.*
Comment on lines 58 to +60
|Name|Type|Description|
|----|----|-----------|
|`keyDidNotExist`|`bool`|whether the key already did not yet exist in the set|
|`isSetEmpty`|`bool`|whether the key did not exist or the set still has items after removal|
Comment on lines +40 to +42
|Name|Type|Description|
|----|----|-----------|
|`tokenType`|`uint256`|The type of token for which the scaler is being computed. Can be one of BORROW_X, DEPOSIT_X, BORROW_Y, DEPOSIT_Y, BORROW_L, or DEPOSIT_L.|
Comment on lines 88 to +91
### allAssets
The first position in this array is never stored because it is instead computed as
$$\sqrt{reserveX * reserveY} + borrowedLAssets$$. We keep this storage spot because
we heavily use DEPOSIT_L, DEPOSIT_X, DEPOSIT_Y, BORROW_L, BORROW_X, BORROW_Y to look
actual amount transferred prior to calling `liquidate()` by the amount passed in for the
repayXAssets and repayYAssets parameters.
## Calculating a Hard Liquidation
Hard liquidations can be partial subset of the borrower's entire position based on
@@ -1211,7 +1230,46 @@ function findHighestSetLeafDownwards(

### calcLiqSqrtPriceQ72

Calc sqrt price at which positions' LTV would reach LTV_MAX
Calc sqrt price at which positions' LTV would reach LTV_MAX. Given the net $$L$$,
$$X$$, and Y, we define the the sqrt price $$s_p$$ at which the position would be at the
|`pairAddress`|`address`|The address of the pair|
|`account`|`address`|The account for which we are calculating the saturation change ratio.|

**Returns**

|Name|Type|Description|
|----|----|-----------|
|`ratioNetXBips`|`uint256`|The ratio representing the change in netX saturation for account.|
|`ratioNetYBips`|`uint256`|The ratio representing the change in netY saturation for account.|
|`ratioBips`|`uint256`|The ratio representing the change saturation for account.|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants