Code Monkey home page Code Monkey logo

Comments (3)

alcueca avatar alcueca commented on September 28, 2024

The link to the documentation is wrong, but I assume that it intended to point here. In there, it specifies that otherAddress is unused, and same for primaryMarketId.

However, here the Withdraw action takes a to parameter. I assume that the first linked documentation is wrong, and the otherAddress parameter in Action is actually used as to in Withdraw. Otherwise that feature would be not implemented, which would be weird.

Furthermore, our tests use a separate contract to receive the flash loans, which the MockBorrower pulls funds from. Given that we are giving the loanReceiver address to Dolomite in the otherAddress variable, and the funds are actually appearing in the loanReceiver (shown below) it follows that the implementation is right, and the documentation wrong.

image

On primaryMarketId being also described as "unused" in the same documentation, Dolomite uses a single contract as entry point for all operations and the only way that we can tell Dolomite which token we are taking a flash loan of is with primaryMarketId as seen here. As a test, if we don't pass a primaryMarketId to Withdraw the token transferred from Dolomite to LoanReceiver is not the asset that we wanted to borrow (probably it defaults to something).

From Dolomite to LoanReceiver:
image

Attempted retrieval of asset
image

from erc7399-wrappers.

ultrasecreth avatar ultrasecreth commented on September 28, 2024

Sorry, but where does it say primaryMarketId is unused?
image
First comment says it's needed for Deposit & Withdraw

from erc7399-wrappers.

devtooligan avatar devtooligan commented on September 28, 2024

Great, I'm glad this wasn't an issue after all.

I think it says not needed for otherAddress and data. Agree with ultrasecreth it says it's needed for primaryMArketId.

Anyways, closing, sorry for the fire drill!

from erc7399-wrappers.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.