LogoLogo
▶️ App🔩 Sources🔒 Audit💬 Community
Octus Bridge (EN)
Octus Bridge (EN)
  • 🏠Welcome to Octus Bridge
  • 💻USE
    • 🚀Getting started
      • How it works
        • Cross-chain transfers
        • Governance
        • Relayers
        • Staking
      • Roles
      • How to connect wallets
      • Glossary
      • Everscale
      • How to get EVER
    • 🌉Bridge
      • Cross-chain transfer
        • Interface
        • How to
          • Transferring from another network to Everscale
          • Transferring between two outside networks
          • Find my transaction
          • How to return the transfer fee
      • Liquidity requests
      • History
        • Interface
          • Transfer rates
          • All transfers
      • Concepts
        • How Octus Bridge transfers work
        • Available chains and assets
        • Universal Bridge
        • Invisible Bridge
    • 💰Staking
      • My stake
        • Interface
          • My staking performance
          • My staking balance
          • User stake
          • Reward rounds
          • Transactions
        • How to
          • How to Stake
          • How to Claim
          • How to Redeem
      • Explorer
        • Interface
          • Explorer
          • Stakeholders
      • Concepts
        • About Octus Bridge Staking
        • How does Staking work?
    • 🗳️Governance
      • Overview
        • Interface
          • DAO overview
          • Recent proposals
          • TOP voters by voting power
      • Proposals
        • Interface
          • My votes
          • Proposals with my votes
          • Governance proposals
        • How to
          • How to Vote
      • Create proposals
        • Interface
        • How to
          • How to create a proposal
      • Concepts
        • Bridge DAO
        • BRIDGE token
        • BRIDGE economics
        • Proposals
        • Get BRIDGE Tokens
    • ⛓️Relayers
      • How to
        • How to become a relayer
      • Concepts
        • Octus Bridge relayers
    • 📜Litepaper
  • 🛠️Integrate
    • Octus Bridge Integration Guide
    • Octus Bridge Contracts
      • Everscale
        • Bridge section
          • event-configuration-contracts
          • event-contracts-base
          • event-contracts-dao
          • event-contracts-multivault
          • event-contracts-staking
          • event-contracts-token-transfer
          • Factory
          • Bridge
          • Connector
        • DAO Section
          • DAORoot
          • Proposal
        • Staking Section
          • Base
          • Elections
          • Encoder
          • RelayRound
          • Staking
          • StakingV1_1
          • StakingRootDeployer
          • UserData
        • Utils Section
          • Delegate
          • DummyRound
          • Receiver
      • Ethereum
        • Bridge Section
          • Bridge
          • StakingRelayVerifier
        • MultiVault Section
          • MultiVault
          • MultiVaultToken
        • Strategies Section
          • BaseStrategy
          • Convex3crv
          • ConvexAIEth
          • ConvexCrvLp
        • Vault Section
          • Vault
        • DAO
        • Registry
    • Bridge Relay Node
    • Token Contracts
    • Open API
      • Bridge API
        • Relayers
        • DAO
        • Staking
        • Transfers
      • DAO API
        • Proposals
        • Voters
        • Votes
  • see also
    • FlatQube
    • EVER Wallet
    • Broxus Github
Powered by GitBook
On this page

Was this helpful?

  1. Integrate
  2. Octus Bridge Contracts
  3. Ethereum
  4. Strategies Section

ConvexAIEth

calc_wrapped_from_want

Calculates amount of want tokens after wrapping.

function calc_wrapped_from_want(uint256 want_amount) public view override returns (uint256)

Parameters:

Name
Type
Description

want_amount

uint256

Amount of want tokens

Return value:

Type
Description

uint256

Amount of wrapped tokens after calculation

unwrap

If wrapped amount is greater than 0, remove wrapped amount from curve's liquidity and deposit balance of the contract to the wrapped ethereum.

function unwrap(uint256 wrapped_amount) internal override returns (uint256 result_val)

Parameters:

Name
Type
Description

wrapped_amount

uint256

Amount of wrapped tokens to unwrap

Return value:

Name
Type
Description

result_val

uint256

Amount of tokens after unwrapping

wrap

Calculates wrapped amount from want amount, removes wrapped tokens from wrapped ethereum and after converting them, deposits them to the curve's pool.

function wrap(uint256 want_amount) internal override returns (uint256 expected_return)

Parameters:

Name
Type
Description

want_amount

uint256

Amount of want tokens to wrap

Return value:

Name
Type
Description

expected_return

uint256

Amount of tokens after wrapping

prepareReturn

Calculates curve and convex tokens and swaps them to ETH, sells extra rewards, after that is done, calculates and returns value of profit, loss and dept payment.

function prepareReturn(uint256 _debtOutstanding) internal override returns (uint256 _profit, uint256 _loss, uint256 _debtPayment)

Parameters:

Name
Type
Description

_debtOutstanding

uint256

Debt value

Return value:

Name
Type
Description

_profit

uint256

Amount of profit made

_loss

uint256

Amount of loss

_debtPayment

uint256

Amount of debt to be payed

PreviousConvex3crvNextConvexCrvLp

Last updated 2 years ago

Was this helpful?

🛠️