Skip to content

Latest commit

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Offramp EURe bot Vyper smart contract

offramp_bot_eth.vy

deposit

This function deploys a bot contract using blueprint and create a loan.

KeyTypeDescription
swap_infosSwapInfo[]swap info array to swap tokens on Curve

SwapInfo (struct)

This struct is to define swap information using Curve swap router.

KeyTypeDescription
routeaddress[11]Array of tokens, pool or zap addresses that Curve swap router uses for exchange into DAI
swap_paramsuint256[5][5]Multidimensional array of [i, j, swap type, pool_type, n_coins] that Curve swap router uses for exchange
amountuint256The amount of input token (route[0]) to be sent
expecteduint256The minimum DAI amount received after the final swap
poolsaddress[5]Array of pools for swaps via zap contracts. This parameter is only needed for swap_type = 3.

offramp_bot_eth.vy

swap

This function swaps xDAI into EURe and sends to the depositor. Compass-EVM can run this function.

KeyTypeDescription
receiveraddressArray of tokens, pool or zap addresses that Curve swap router uses for exchange into DAI
amountuint256The amount of DAI
expecteduint256The minimum EURe amount received after the final swap
deposit_iduint256Deposit id on the ETH Vyper contract
returnuint256EURe amount that the user receives

get_expected

This view function returns EURe amount from Curve exchange by DAI amount.

KeyTypeDescription
amountuint256Input DAI amount
returnuint256Expected EURe amount that the user receives

update_compass

Update Compass-EVM address. This is run by Compass-EVM only.

KeyTypeDescription
new_compassaddressNew compass-evm address

update_refund_wallet

Update gas refund wallet address. This is run by Compass-EVM only.

KeyTypeDescription
new_refund_walletaddressNew refund wallet address

update_fee

Update gas fee amount to pay. This is run by Compass-EVM only.

KeyTypeDescription
new_feeuint256New fee amount

set_paloma

Set Paloma CW address in bytes32. This is run by Compass-EVM only and after setting paloma, the bot can start working.

update_service_fee_collector

Update service fee collector address. This is run by the original fee collector address. The address receives service fee from swapping.

KeyTypeDescription
new_service_fee_collectoraddressNew service fee collector address

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages