Assessment reports>Aura Finance>Threat Models>Function: distributeAura(uint16 _srcChainId, address _sendFromZroPaymentAddress, byte[] _sendFromAdapterParams)

Function: distributeAura(uint16 _srcChainId, address _sendFromZroPaymentAddress, byte[] _sendFromAdapterParams)

Function allows to transfer AURA tokens to another chain. Before the transfer, tokens will be minted by calling IBooster(booster).distributeL2Fees(_feeAmount). Function is available only for whitelisted distributor.

Inputs

  • _srcChainId

    • Control: Full control.

    • Constraints: Should be whitelisted by owner as trusted chain.

    • Impact: ID of the recipient chain.

  • _sendFromZroPaymentAddress

    • Control: Full control.

    • Constraints: No checks.

    • Impact: The address of the contract that will provide an LZ protocol fee using the LZ tokens.

Branches and code coverage (including function calls)

Intended branches

  • AURA tokens were distributed properly.

Negative behavior

  • feeDebtOf[_srcChainId] is zero.

  • Caller is not whitelisted distributor.

Function call analysis

  • _distributeAura -> IBooster(booster).distributeL2Fees(_feeAmount) -> IERC20(crv).safeTransferFrom(bridgeDelegate, lockRewards, _lockIncentive)

    • External/internal? External.

    • Argument control? No.

    • Impact Distribute fees.

  • _distributeAura -> IBooster(booster).distributeL2Fees(_feeAmount) -> IERC20(crv).safeTransferFrom(bridgeDelegate, stakerRewards, _stakerIncentive)

    • External/internal? External.

    • Argument control? No.

    • Impact Distribute fees.

  • _distributeAura -> IBooster(booster).distributeL2Fees(_feeAmount) -> ITokenMinter(minter).mint(bridgeDelegate, eligibleForMint)

    • External/internal? External.

    • Argument control? No.

    • Impact Mint CVX to current contract.

  • _lzSend -> lzEndpoint.send

    • External/internal? External.

    • Argument control? _srcChainId.

    • Impact On the side of L2Coordinator, there will be the triggered function _nonblockingLzReceive that will increase the accAuraRewards.

  • IOFT(auraOFT).sendFrom

    • External/internal? External.

    • Argument control? _sendFromZroPaymentAddress and _sendFromAdapterParams.

    • Impact Transfer auraAmount of AURA tokens to the _srcChainId.

Zellic © 2024Back to top ↑