-
Notifications
You must be signed in to change notification settings - Fork 3
New Documentation for vaults contracts #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…itedAMMSV, CompoundV3InvestStrategy & InvestStrategyClient contracts
contracts/InvestStrategyClient.sol
Outdated
| /** | ||
| * @dev Checks if the asset given is the correct one for the strategy detailed. | ||
| * @param strategy Strategy to be checked. | ||
| * @param asset Assets of the strategy to be checked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Está mal la descripción...
/**
* @dev Checks the strategy asset() to ensure it is the same as the asset of the vault.
* @param strategy Strategy to be checked.
* @param asset Asset of the vault.
*/
contracts/InvestStrategyClient.sol
Outdated
|
|
||
| /** | ||
| * @dev Returns the current assets in the strategy given. | ||
| * @param strategy Strategy to be checked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cambiar a
/**
* @dev Returns the total assets in the strategy given.
*
* See {IInvestStrategy.totalAssets()}
*/Es decir, sacar la descripción de los parámetros (que igual está incompleta, porque te falta documentar el valor de retorno) y hacer referencia al método de IInvestStrategy que se llama.
contracts/MSVBase.sol
Outdated
| } | ||
|
|
||
| /** | ||
| * @dev Updated the deposit queue with a new one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates
Documentar además los eventos que se emiten.
Documentar el parámetro y qué requisitos se esperan de ese parámetro, por ejemplo que sea igual a la cantidad de estrategias que hay, y que los índices sean desde 0 para referirse a la primer estrategia, etc. etc.
|
|
||
| /** | ||
| * @dev Returns the list of strategies in the vault in order. | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indicar que el valor devuelto va a tener las estrategias instaladas y que a partir de la primera que es address(0) el resto son 0.
contracts/OutflowLimitedAMMSV.sol
Outdated
| } | ||
|
|
||
| /** | ||
| * @dev Returns the current withdraw limit for each slot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns the net outflow limit that will be applied on two consecutive time slots
contracts/OutflowLimitedAMMSV.sol
Outdated
| /** | ||
| * @dev Returns the current delta variation in assets for the given slot. | ||
| * Calculated as the sum of limit + deposits - withdrawals. | ||
| * @param slot The given slot to check the delta. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En la documentación del parámetro slot de tipo SlotIndex, indicá que es un valor compatible con el generado con makeOutflowSlot
|
|
||
| /** | ||
| * @dev Returns the current delta variation in assets for the given slot. | ||
| * Calculated as the sum of limit + deposits - withdrawals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qué es lo de limit? Sería deposits - withdrawals...
contracts/OutflowLimitedAMMSV.sol
Outdated
| /** | ||
| * @dev Returns a slot calculated by the slotSize and the timestamp. This slot is the one used for example in getAssetsDelta. | ||
| * @param slotSize The size of the slot we want to calculate. | ||
| * @param timestamp The slot timestamp tried to be calculated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@return The resulting value is the combination of the slotSize (first 128 bits) and the index of the timestamp / slotSize
No description provided.