---
# System prepended metadata

title: Untitled

---


## Question for contracts
- shouldn't these 2 functions has `Static` suffix? **@Long:** these two functions are now named `mintSyFromTokenStatic` & `redeemSyToTokenStatic` to be more inline with the new naming scheme

![](https://i.imgur.com/rsX6dbV.png)

- Giữ hàm `getUserMarketInfo`, lí do là để show được lượng pt, sy tương ứng: ![](https://i.imgur.com/D2NFbeL.png). @Long done 


- Giữ hàm `getUserSYInfo`, sdk đang không dùng hàm này, nhưng **sẽ dùng** khi có tính năng claim SY reward @Long done 


- Giữ hàm getPy (lấy ra pt nếu input là yt, và ngược lại) @Long done 

- Đổi tên biến để phân biệt py/market/sy exchange rate, kèm theo fee hoặc không @Long done 


- Các hàm trả về `unclaimedrewards` thì cần trả về luôn cả các token đang có 0 rewards (đảm bảo là output có độ dài = mảng rewards token) @Long done

## Note for SDK:

`getMarketInfo` removed, use `getMarketState`


==============



```solidity=
    
    // no comment @Long this was removed
    function getPYInfo(address py)
        external
        returns (
            uint256 exchangeRate,
            uint256 totalSupply,
            RewardIndex[] memory rewardIndexes
        )
    {
        (, address yt) = getPY(py);
        IPYieldToken YT = IPYieldToken(yt);
        exchangeRate = YT.pyIndexCurrent();
        totalSupply = YT.totalSupply();
        address[] memory rewardTokens = YT.getRewardTokens();
        rewardIndexes = new RewardIndex[](rewardTokens.length);

        uint256[] memory indexes = YT.rewardIndexesCurrent();
        for (uint256 i = 0; i < rewardTokens.length; ++i) {
            address rewardToken = rewardTokens[i];
            rewardIndexes[i].rewardToken = rewardToken;
            rewardIndexes[i].index = indexes[i];
        }
    }

    // not using // @Long removed 
    function getPendleTokenType(address token)
        external
        view
        returns (
            bool isPT,
            bool isYT,
            bool isMarket
        );

    // should get latest exchange rate 
    // should work with zero-liquidity markets
    // @Long removed
    function getMarketInfo(address market)
        external
        returns (
            address pt,
            address sy,
            MarketState memory state,
            int256 impliedYield,
            uint256 exchangeRate
        );

    // ============= USER INFO =============

    // not in use
    // @Long removed
    function getUserPYPositionsByPYs(address user, address[] calldata pys)
        external
        view
        returns (UserPYInfo[] memory userPYPositions);

    // not in use
    // @Long removed
    function getUserMarketPositions(address user, address[] calldata markets)
        external
        view
        returns (UserMarketInfo[] memory userMarketPositions);

    // get latest rewards
    // @Long fixed
    function getUserSYInfo(address sy, address user)
        external
        view
        returns (uint256 balance, TokenAmount[] memory rewards)

    // latest rewards
    // @Long Fixed
    function getUserPYInfo(address py, address user)
        public
        view
        returns (UserPYInfo memory userPYInfo)
    }

    // good, no comment
    function getUserMarketInfo(address market, address user)
        public
        view
        returns (UserMarketInfo memory userMarketInfo);

    // not using
    // @Long removed
    function hasPYPosition(UserPYInfo calldata userPYInfo) public pure returns (bool hasPosition) {
        hasPosition = (userPYInfo.ytBalance > 0 ||
            userPYInfo.ptBalance > 0 ||
            userPYInfo.unclaimedInterest.amount > 0 ||
            userPYInfo.unclaimedRewards.length > 0);
    }

    // ============= OTHER HELPERS =============

    
    function getAmountTokenToMintSy(
        IStandardizedYield SY,
        address tokenIn,
        address bulk,
        uint256 netSyOut
    ) public view returns (uint256 netTokenIn);

    // 
    // Would want `getSyToRedeemToken`
    // @Long what's the use of this function?

```