# endOfDay

FUND EOD NAV&#x20;

FUNCTION

```solidity
function endOfDay(
    address[] calldata accounts,
    uint256[] calldata adjustedShares,
    bytes32[] calldata txIds,
    uint256 date,
    int256 rate,
    uint256 price
)
    external
    virtual
    override
    onlyAdmin
    onlyWithValidRate(rate)
    onlyValidPaginationSize(accounts.length, MAX_ACCOUNT_PAGE_SIZE)
    onlyValidPaginationSize(adjustedShares.length, MAX_ACCOUNT_PAGE_SIZE)
    onlyValidPaginationSize(txIds.length, MAX_TX_PAGE_SIZE)
{
    require(
        accounts.length == adjustedShares.length,
        "ARRAY_LENGTH_MISMATCH"
    );
    moneyMarketFund.updateLastKnownPrice(price);
    for (uint i = 0; i < accounts.length; ) {
        uint256 accountBalance;
        if (adjustedShares[i] == 0) {
            accountBalance = moneyMarketFund.balanceOf(accounts[i]);
        } else {
            accountBalance = adjustedShares[i];
        }
        _processDividends(accounts[i], accountBalance, date, rate, price);
        _processSettlements(txIds, accounts[i], date, price);
        unchecked {
            i++;
        }
    }
}
```

INTERFACE

```solidity
function endOfDay(
    address[] memory accounts,
    uint256 date,
    int256 rate,
    uint256 price
) external;

function endOfDay(
    address[] calldata accounts,
    bytes32[] calldata txIds,
    uint256 date,
    int256 rate,
    uint256 price
) external;

function endOfDay(
    address[] calldata accounts,
    uint256[] calldata adjustedShares,
    bytes32[] calldata txIds,
    uint256 date,
    int256 rate,
    uint256 price
) external;
```

USER FLOW

RESOURCES


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xft.finance/bitnet/use-cases/drs/technical/endofday.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
